/* Vremenska postaja Stražišče pri Kranju */

:root {
  --ozadje: #F3F5F5;
  --crnilo: #18242B;
  --sivo: #5B6870;
  --crta: #D3DADD;
  --modra: #2B6A9E;
  --modra-pas: rgba(43, 106, 158, 0.10);
  --opozorilo: #8A5A00;
  --opozorilo-ozadje: #FBF1DC;

  --pisava: "Barlow", "Segoe UI", system-ui, sans-serif;
  --ovoj: 68rem;
  --rob: 1rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ozadje: #141B20;
    --crnilo: #E4E9EB;
    --sivo: #93A0A7;
    --crta: #2A353C;
    --modra: #4E9BDD;
    --modra-pas: rgba(78, 155, 221, 0.12);
    --opozorilo: #F0C674;
    --opozorilo-ozadje: #2E2717;
  }
}
:root[data-theme="dark"] {
  --ozadje: #141B20;
  --crnilo: #E4E9EB;
  --sivo: #93A0A7;
  --crta: #2A353C;
  --modra: #4E9BDD;
  --modra-pas: rgba(78, 155, 221, 0.12);
  --opozorilo: #F0C674;
  --opozorilo-ozadje: #2E2717;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ozadje);
  color: var(--crnilo);
  font-family: var(--pisava);
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 400;
}

a { color: var(--modra); text-underline-offset: 0.15em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--modra); outline-offset: 3px; border-radius: 2px; }

img { max-width: 100%; height: auto; display: block; }

h1, h2 { margin: 0; font-weight: 500; line-height: 1.2; }
p { margin: 0; }

.skrito {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.ovoj {
  max-width: var(--ovoj);
  margin: 0 auto;
  padding: 0 var(--rob);
}
@media (min-width: 48rem) {
  :root { --rob: 2rem; }
}

/* ---------- Glava ---------- */

/* Glava ostane na vrhu tudi med drsenjem; ko se stran premakne, dobi spodnjo črto. */
html { scroll-padding-top: 6rem; }

.glava {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--ozadje);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.glava.je-pomaknjena { border-bottom-color: var(--crta); }

.glava-vsebina {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.ime { color: inherit; text-decoration: none; display: block; min-width: 0; }
.ime-kraj { display: block; font-size: 1.25rem; font-weight: 600; letter-spacing: -0.005em; line-height: 1.25; }
.ime-opis { display: block; color: var(--sivo); font-size: 0.875rem; line-height: 1.35; }

.meni {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}
.meni a {
  display: inline-block;
  padding: 0.375rem 0;
  color: var(--sivo);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 2px solid transparent;
}
.meni a:hover { color: var(--crnilo); }
.meni a[aria-current="page"] { color: var(--crnilo); border-bottom-color: var(--modra); }

/* Gumb s tremi črtami; ob odprtem meniju se spremeni v križec. */
.meni-gumb { display: none; }

@media (max-width: 55.99rem) {
  .js .glava-vsebina { justify-content: flex-start; }
  .js .ime-kraj { font-size: 1.125rem; }
  .js .ime-opis { font-size: 0.8125rem; }

  .js .meni-gumb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 2.75rem;
    height: 2.75rem;
    margin-left: -0.75rem;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: none;
    color: var(--crnilo);
    cursor: pointer;
  }
  .meni-gumb-crte,
  .meni-gumb-crte::before,
  .meni-gumb-crte::after {
    display: block;
    width: 1.25rem;
    height: 2px;
    border-radius: 1px;
    background: currentColor;
    transition: transform 0.2s, background-color 0.2s;
  }
  .meni-gumb-crte { position: relative; }
  .meni-gumb-crte::before,
  .meni-gumb-crte::after { content: ""; position: absolute; left: 0; }
  .meni-gumb-crte::before { top: -6px; }
  .meni-gumb-crte::after { top: 6px; }
  .meni-gumb[aria-expanded="true"] .meni-gumb-crte { background: transparent; }
  .meni-gumb[aria-expanded="true"] .meni-gumb-crte::before { transform: translateY(6px) rotate(45deg); }
  .meni-gumb[aria-expanded="true"] .meni-gumb-crte::after { transform: translateY(-6px) rotate(-45deg); }

  /* Spustni seznam pod glavo, čez vso širino zaslona. */
  .js .glava-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: calc(100vh - 4.5rem);
    max-height: calc(100dvh - 4.5rem);
    overflow-y: auto;
    background: var(--ozadje);
    border-top: 1px solid var(--crta);
    border-bottom: 1px solid var(--crta);
    box-shadow: 0 1rem 1.5rem -1rem rgba(0, 0, 0, 0.25);
  }
  .js .glava.je-odprta .glava-nav { display: block; }
  .js .glava.je-odprta { border-bottom-color: transparent; }

  .js .meni {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
    max-width: var(--ovoj);
    margin: 0 auto;
    padding: 0.25rem var(--rob) 0.75rem;
  }
  .js .meni li + li { border-top: 1px solid var(--crta); }
  .js .meni a {
    display: block;
    padding: 0.75rem 0 0.75rem 0.75rem;
    border-bottom: 0;
    border-left: 2px solid transparent;
    font-size: 1.0625rem;
  }
  .js .meni a[aria-current="page"] { border-left-color: var(--modra); }
}

main.ovoj { padding-top: 2.5rem; padding-bottom: 3rem; }
@media (min-width: 56rem) {
  main.ovoj { padding-top: 3.5rem; }
}

/* ---------- Trenutno: uvod ---------- */

.uvod {
  display: grid;
  gap: 2rem;
  margin-bottom: 3rem;
}
@media (min-width: 56rem) {
  .uvod { grid-template-columns: 5fr 6fr; gap: 3rem; align-items: start; }
}

.temperatura {
  font-size: clamp(5.5rem, 22vw, 10rem);
  font-weight: 300;
  line-height: 0.85;
  letter-spacing: -0.035em;
  margin-left: -0.05em;
}
.temperatura-enota {
  font-size: 0.32em;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--sivo);
  vertical-align: 1.55em;
  margin-left: 0.12em;
}

.izmerjeno { margin-top: 1rem; color: var(--sivo); }
.povzetek { margin-top: 0.25rem; font-size: 1.125rem; max-width: 34em; }
.ura { color: var(--sivo); white-space: nowrap; }
.puscica {
  width: 0.9em;
  height: 0.9em;
  margin-right: 0.3em;
  vertical-align: -0.1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.obvestilo {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: var(--opozorilo-ozadje);
  color: var(--crnilo);
  border-left: 3px solid var(--opozorilo);
  max-width: 40em;
}

.uvod-kamera { margin: 0; }
.uvod-kamera img { width: 100%; border-radius: 3px; }
.uvod-kamera figcaption, .kamera figcaption, .slike figcaption, .zemljevid figcaption {
  margin-top: 0.5rem;
  color: var(--sivo);
  font-size: 0.875rem;
}

/* ---------- Grafi ---------- */

.graf-naslov {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--sivo);
}

.graf {
  --visina: 8.5rem;
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  grid-template-rows: var(--visina) auto;
  font-size: 0.75rem;
  color: var(--sivo);
  font-variant-numeric: tabular-nums;
}
.graf--velik { --visina: 10rem; }

.graf-y { position: relative; }
.graf-y span {
  position: absolute;
  right: 0.5rem;
  transform: translateY(-50%);
  line-height: 1;
}

.graf-ploskev { position: relative; cursor: crosshair; touch-action: pan-y; }
.graf-ploskev:focus-visible { outline-offset: 6px; }
.graf-ploskev svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.graf-mreza line { stroke: var(--crta); stroke-width: 1; vector-effect: non-scaling-stroke; }
.graf-povrsina { fill: var(--modra-pas); }
.graf-crta {
  fill: none;
  stroke: var(--modra);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.graf-crta--pike { stroke-width: 5; }

.stolpec {
  position: absolute;
  bottom: 0;
  max-width: 24px;
  min-width: 3px;
  transform: translateX(-50%);
  background: var(--modra);
  border-radius: 4px 4px 0 0;
  pointer-events: none;
}
.stolpec.je-izbran { opacity: 0.7; }
.stolpec--razpon { border-radius: 4px; min-height: 3px; }

.graf-pika {
  position: absolute;
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
  border-radius: 50%;
  background: var(--modra);
  box-shadow: 0 0 0 2px var(--ozadje);
  pointer-events: none;
}
.graf-kurzor {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--sivo);
  opacity: 0.6;
  pointer-events: none;
}
.graf-namig {
  position: absolute;
  top: -0.25rem;
  transform: translate(-50%, -100%);
  padding: 0.25rem 0.5rem;
  background: var(--crnilo);
  color: var(--ozadje);
  border-radius: 3px;
  font-size: 0.8125rem;
  white-space: nowrap;
  pointer-events: none;
  z-index: 2;
}
.graf-namig strong { font-weight: 600; }
.graf-namig span { opacity: 0.75; }
[hidden] { display: none !important; }

.graf-x { grid-column: 2; position: relative; height: 1.5rem; }
.graf-x span { position: absolute; top: 0.5rem; transform: translateX(-50%); line-height: 1; }

.skupina { margin-top: 3.5rem; }
.skupina > h2 {
  font-size: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--crnilo);
}
.grafi {
  display: grid;
  gap: 2.5rem 3rem;
  margin-top: 1.75rem;
}
@media (min-width: 52rem) {
  .grafi { grid-template-columns: 1fr 1fr; }
  .graf-blok--sirok { grid-column: 1 / -1; }
}
.graf-blok h3 { margin: 0; font-size: 1.125rem; font-weight: 500; line-height: 1.2; }
.graf-blok .enota { color: var(--sivo); font-weight: 400; }
.graf-blok { display: flex; flex-direction: column; }
.graf-povzetek { flex: 1; margin: 0.25rem 0 1.25rem; color: var(--sivo); }
.prazno { color: var(--sivo); }

/* ---------- Tabele meritev ---------- */

.meritve {
  width: 100%;
  max-width: 52rem;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.meritve th, .meritve td {
  text-align: left;
  padding: 0.625rem 1rem 0.625rem 0;
  border-bottom: 1px solid var(--crta);
  vertical-align: baseline;
}
.meritve thead th, .meritve thead td {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--sivo);
  border-bottom-color: var(--crnilo);
}
.meritve tbody th { font-weight: 500; width: 28%; }
.meritve td:empty::after { content: ""; }

.meritve--ekstremi thead tr:first-child th { border-bottom-color: var(--crta); padding-bottom: 0.25rem; }
.meritve--ekstremi .podglava th { font-weight: 400; }
.meritve--ekstremi .meja, .meritve--ekstremi thead th:nth-child(3) { padding-left: 1.5rem; border-left: 1px solid var(--crta); }
.meritve--ekstremi .podglava th:nth-child(4) { padding-left: 1.5rem; border-left: 1px solid var(--crta); }

@media (max-width: 40rem) {
  .meritve thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .meritve tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--crta);
  }
  .meritve tbody th { width: auto; }
  .meritve th, .meritve td { padding: 0; border: 0; }
  .meritve td:empty { display: none; }
  .meritve td::before { content: attr(data-oznaka) " "; color: var(--sivo); }
  .meritve td { font-size: 0.875rem; }
  /* Trenutna vrednost stoji v isti vrstici kot ime meritve. */
  .meritve--trenutno tbody td:first-of-type { font-size: 1rem; text-align: right; }
  .meritve--trenutno tbody td:first-of-type::before { content: none; }
  .meritve--ekstremi tbody th, .meritve--tabela tbody th { grid-column: 1 / -1; }
  .meritve--ekstremi td::before, .meritve--tabela td::before { display: block; font-size: 0.8125rem; }
  .meritve--ekstremi .meja { padding-left: 0; border-left: 0; }
  .meritve--tabela tr { grid-template-columns: repeat(3, 1fr); }
  .meritve.meritve--tabela td { text-align: left; }
  .meritve.meritve--rekordi tbody th { grid-column: 1 / -1; width: auto; }
}

.opomba { margin-top: 1.25rem; color: var(--sivo); font-size: 0.875rem; max-width: 40em; }

/* ---------- Podstrani ---------- */

.naslov { font-size: 2rem; font-weight: 500; letter-spacing: -0.01em; }
.uvodnik { margin-top: 0.5rem; color: var(--sivo); max-width: 40em; }
.meritve--ekstremi { margin-top: 2rem; }
.podnaslov { margin-top: 2.5rem; font-size: 1.125rem; }

/* ---------- Zgodovina ---------- */

.zavihki {
  display: flex;
  gap: 2px;
  width: fit-content;
  margin-top: 1.5rem;
  padding: 2px;
  border: 1px solid var(--crta);
  border-radius: 999px;
}
.zavihki a {
  padding: 0.3125rem 1rem;
  border-radius: 999px;
  color: var(--sivo);
  font-weight: 500;
  text-decoration: none;
}
.zavihki a:hover { color: var(--crnilo); }
.zavihki a[aria-current="page"] { background: var(--crta); color: var(--crnilo); }

.listanje {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: baseline;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--crnilo);
}
.listanje h2 { font-size: 1.5rem; text-align: center; }
.listanje a { text-decoration: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
.listanje a:hover { text-decoration: underline; }
.listanje a[rel="next"] { justify-self: end; }
@media (max-width: 36rem) {
  .listanje { grid-template-columns: 1fr 1fr; }
  .listanje h2 { grid-column: 1 / -1; grid-row: 1; text-align: left; font-size: 1.25rem; }
}

.izbira {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-top: 1rem;
  color: var(--sivo);
  font-size: 0.875rem;
}
.izbira label { display: flex; align-items: center; gap: 0.5rem; }
.izbira input, .izbira select, .izbira button {
  font: inherit;
  font-size: 0.875rem;
  color: var(--crnilo);
  background: var(--ozadje);
  border: 1px solid var(--crta);
  border-radius: 3px;
  padding: 0.25rem 0.5rem;
}
.izbira button { cursor: pointer; color: var(--modra); font-weight: 500; }
.izbira button:hover { border-color: var(--modra); }

.uvod--zgodovina { margin-top: 2rem; margin-bottom: 0; }
.uvod--zgodovina .povzetek { margin-top: 0; }
.povzetek--mesec { margin-top: 1.5rem; }
.grafi--mesec { margin-top: 2rem; }

.meritve--tabela { max-width: none; margin-top: 1.25rem; }
.meritve--tabela thead th, .meritve--tabela td { text-align: right; }
.meritve--tabela thead th:first-child { text-align: left; }
.meritve--tabela tbody th { width: auto; font-weight: 500; white-space: nowrap; }
.meritve--tabela tbody th a { text-decoration: none; }
.meritve--tabela tbody th a:hover { text-decoration: underline; }
.meritve--rekordi { margin-top: 1rem; }
.meritve--rekordi tbody th { width: 40%; }

.seznam-povezav { list-style: none; padding: 0; margin: 0.75rem 0 0; }
.seznam-povezav li { padding: 0.375rem 0; }

.kamera { margin: 1.5rem 0 0; max-width: 50rem; }
.kamera img { width: 100%; border-radius: 3px; }

.trak {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0 0 0.5rem;
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: thin;
}
.trak li { flex: none; }
.slicica {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  color: var(--sivo);
  font: inherit;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  text-align: left;
}
.slicica img { width: 7rem; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 2px; outline: 2px solid transparent; outline-offset: 2px; }
.slicica span { display: block; margin-top: 0.25rem; }
.slicica:hover { color: var(--crnilo); }
.slicica[aria-pressed="true"] { color: var(--crnilo); font-weight: 500; }
.slicica[aria-pressed="true"] img { outline-color: var(--modra); }
.slicica:focus-visible { outline: none; }
.slicica:focus-visible img { outline-color: var(--modra); outline-style: dashed; }

.slike {
  display: grid;
  gap: 2rem;
  margin-top: 1.5rem;
}
@media (min-width: 52rem) {
  .slike { grid-template-columns: 1fr 1fr; }
}
.slike figure { margin: 0; }
.slike img { width: 100%; border-radius: 3px; }

.lokacija { display: grid; gap: 2rem; margin-top: 1.5rem; }
@media (min-width: 52rem) {
  .lokacija { grid-template-columns: 2fr 3fr; gap: 3rem; }
}
.podatki { margin: 0; }
.podatki div { padding: 0.625rem 0; border-bottom: 1px solid var(--crta); }
.podatki div:first-child { padding-top: 0; }
.podatki dt { color: var(--sivo); font-size: 0.875rem; }
.podatki dd { margin: 0; }
.zemljevid { margin: 0; }
.zemljevid iframe { display: block; width: 100%; aspect-ratio: 4 / 3; border: 0; border-radius: 3px; }


/* ---------- Noga ---------- */

.noga {
  border-top: 1px solid var(--crta);
  padding: 1.5rem 0 2.5rem;
  color: var(--sivo);
  font-size: 0.875rem;
}
.noga p { max-width: 44em; }
.noga p + p { margin-top: 0.5rem; }
.noga-vsebina {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem 3rem;
}
.noga-besedilo { flex: 1 1 24rem; }

.tema { display: flex; flex-direction: column; gap: 0.375rem; }
.tema[hidden] { display: none; }
.tema-gumbi {
  display: flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--crta);
  border-radius: 999px;
}
.tema button {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.3125rem 0.75rem;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--sivo);
  font: inherit;
  white-space: nowrap;
  cursor: pointer;
}
.tema button:hover { color: var(--crnilo); }
.tema button[aria-pressed="true"] { background: var(--crta); color: var(--crnilo); }
.tema button:focus-visible { outline-offset: 1px; border-radius: 999px; }
.tema svg {
  flex: none;
  width: 0.875rem;
  height: 0.875rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
}
.tema .polno { fill: currentColor; stroke: none; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

@media print {
  .glava-nav, .meni-gumb, .trak, .tema { display: none !important; }
  .glava { position: static; border: 0; }
  body { background: #fff; color: #000; }
}
