/* ---------- design tokens ---------- */
:root {
  --green-900: #1f3b2d;
  --green-700: #2f6b46;
  --green-500: #4a9367;
  --green-100: #e6f1eb;
  --earth-700: #8a5a2b;
  --earth-500: #c08a4f;
  --sand-100: #f6f0e6;
  --sand-50:  #faf7f1;
  --ink-900: #1a1f1b;
  --ink-700: #3b4a40;
  --ink-500: #6b776f;
  --ink-300: #a8b1ab;
  --line:    #d8ddd6;
  --warn:    #c0392b;
  --warn-bg: #f9e7e3;
  --shadow:  0 6px 22px rgba(31, 59, 45, 0.08);
  --radius:  14px;
  --container: 1100px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink-900);
  background: var(--sand-50);
  line-height: 1.55;
}
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}
h1, h2, h3 { color: var(--green-900); line-height: 1.2; margin: 0 0 .6em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4vw + 1rem, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 1.4vw + 1rem, 2.1rem); font-weight: 700; margin-top: 0; }
h3 { font-size: 1.15rem; font-weight: 700; }
p  { margin: 0 0 1em; color: var(--ink-700); }
.lead { font-size: 1.08rem; color: var(--ink-700); max-width: 60ch; }
.muted { color: var(--ink-500); font-size: .92rem; }

/* ---------- hero ---------- */
.hero {
  background:
    linear-gradient(140deg, rgba(31, 59, 45, .82), rgba(47, 107, 70, .72)),
    radial-gradient(at top right, var(--green-500), var(--green-900));
  color: #fff;
  padding: 4.5rem 0 5rem;
}
.hero h1 { color: #fff; }
.hero p, .hero .subtitle { color: rgba(255,255,255,.9); }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .15em;
  font-size: .82rem;
  font-weight: 600;
  color: rgba(255,255,255,.75);
  margin-bottom: .8em;
}
.subtitle { max-width: 60ch; font-size: 1.15rem; margin-bottom: 2em; }
.cta { display: flex; gap: .8rem; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: .8rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn-primary { background: #fff; color: var(--green-900); }
.btn-primary:hover { transform: translateY(-1px); background: var(--sand-100); }
.btn-ghost { color: #fff; border-color: rgba(255,255,255,.5); }
.btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn-ig {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  color: #fff;
  border-color: transparent;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
}
.btn-ig:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn-ig svg { flex-shrink: 0; }
.btn-wa {
  background: #25d366;
  color: #0b3d22;
  border-color: transparent;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
}
.btn-wa:hover { transform: translateY(-1px); filter: brightness(1.06); }
.btn-wa svg { flex-shrink: 0; }

/* ---------- pregled / KPI ---------- */
.pregled { padding: 4rem 0; }
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 1rem;
  margin-top: 2rem;
}
.kpi {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.2rem;
  box-shadow: var(--shadow);
}
.kpi-value {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--green-700);
  line-height: 1;
  margin-bottom: .35rem;
}
.kpi-label { font-weight: 600; color: var(--ink-900); margin-bottom: .15rem; }
.kpi-sub   { font-size: .88rem; color: var(--ink-500); }

/* ---------- mapa ---------- */
.mapa-section { padding: 3rem 0 4rem; background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
#map {
  height: 620px;
  width: 100%;
  margin: 1.5rem 0 1rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.legend-note {
  background: var(--sand-100);
  border-radius: var(--radius);
  padding: .9rem 1.1rem;
  font-size: .93rem;
  color: var(--ink-700);
}
.mreza-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.4rem;
  margin: .8rem 0 1.2rem;
  font-size: .9rem;
  color: var(--ink-700);
}
.mreza-legend .ml-item { display: inline-flex; align-items: center; gap: .5rem; }
.mreza-legend .ml-line {
  display: inline-block;
  width: 26px;
  height: 4px;
  border-radius: 2px;
  flex-shrink: 0;
}
.lead-list { margin: .6rem 0 .9rem; padding-left: 1.2rem; }
.lead-list li { margin-bottom: .35rem; }
.btn-inline {
  display: inline-block;
  padding: .5rem .95rem;
  border-radius: 999px;
  background: var(--green-700, #2f6b46);
  color: #fff;
  font-weight: 600;
  font-size: .9rem;
  text-decoration: none;
  transition: transform .15s ease, filter .15s ease;
}
.btn-inline:hover { transform: translateY(-1px); filter: brightness(1.08); }
.shademap-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 36px !important;
  height: 36px !important;
  background: #fff;
  color: #d8a93a;
  font-size: 22px;
  font-weight: 700;
  text-decoration: none;
  line-height: 1;
}
.shademap-btn:hover { background: var(--sand-100); color: #b88a2a; }

.leaflet-popup-content { font-family: inherit; font-size: .95rem; }
.leaflet-popup-content strong { color: var(--green-900); }
.popup-images {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .7rem;
}
.popup-images a { display: block; line-height: 0; }
.popup-images img {
  max-width: 100%;
  max-height: 150px;
  border-radius: 6px;
  border: 1px solid var(--line);
  cursor: zoom-in;
}
.leaflet-control-layers { font-size: .92rem; box-shadow: var(--shadow); border: 1px solid var(--line); }
.leaflet-control-layers-overlays label { display: block; margin: 2px 0; }

/* Vidljiviji "Slojevi" toggle kada je kontrola sklopljena (mobile UX) */
.leaflet-touch .leaflet-control-layers-toggle,
.leaflet-control-layers-toggle {
  width: auto;
  min-width: 44px;
  height: 44px;
  background-color: #fff;
  background-position: 10px center;
  background-size: 22px 22px;
  padding-left: 38px;
  padding-right: 14px;
  border-radius: 8px;
  font-weight: 600;
  color: var(--green-900);
  line-height: 44px;
  font-size: .95rem;
  white-space: nowrap;
}
.leaflet-control-layers-toggle::after {
  content: "Slojevi";
}
.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
  display: none;
}

/* ---------- analiza / bars ---------- */
.analiza { padding: 4rem 0; }
.analiza-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.6rem;
  box-shadow: var(--shadow);
}
.card-sub { font-size: .92rem; color: var(--ink-500); margin: -.4em 0 1.4em; }

.bars { display: flex; flex-direction: column; gap: .9rem; }
.bar-row {
  display: grid;
  grid-template-columns: 9.5em 1fr auto;
  gap: .7rem;
  align-items: center;
  font-size: .94rem;
}
.bar-row .label { color: var(--ink-700); }
.bar-row .track {
  background: var(--green-100);
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
}
.bar-row .fill {
  height: 100%;
  border-radius: 999px;
  background: var(--green-500);
  transition: width .6s ease;
}
.bar-row .fill.earth   { background: var(--earth-500); }
.bar-row .fill.stone   { background: #9aa5a2; }
.bar-row .fill.dark    { background: var(--ink-700); }
.bar-row .fill.warn    { background: var(--warn); }
.bar-row .fill.green   { background: var(--green-500); }
.bar-row .fill.sun     { background: #d8a93a; }
.bar-row .fill.water   { background: #4f87a5; }
.bar-row .value { color: var(--ink-900); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- po deonicama ---------- */
.deonice-section { padding: 4rem 0; background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.deonice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}
.deonica-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem 1.3rem 1.5rem;
  box-shadow: var(--shadow);
}
.deonica-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .6rem;
  margin-bottom: 1.1rem;
  padding-bottom: .8rem;
  border-bottom: 1px solid var(--line);
}
.deonica-card-head h3 { margin: 0; font-size: 1.15rem; }
.deonica-card-km {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--green-700);
  white-space: nowrap;
}
.deonica-card-section { margin-top: 1.1rem; }
.deonica-card-section:first-of-type { margin-top: 0; }
.deonica-card-section h4 {
  margin: 0 0 .8em;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-500);
  font-weight: 600;
}
.deonica-card .bar-row {
  grid-template-columns: 6.5em 1fr auto;
  font-size: .9rem;
  gap: .6rem;
}

.deonica-label {
  background: rgba(255,255,255,.85);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 10px;
  font-weight: 700;
  font-size: .82rem;
  color: var(--green-900);
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
.deonica-label::before { border: none !important; }

/* ---------- galerija ---------- */
.galerija-section {
  padding: 4rem 0;
  background: var(--sand-50);
  border-bottom: 1px solid var(--line);
}
.chip-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 1.8rem 0 0;
}
.chip {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .5rem 1rem;
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink-700);
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, border-color .15s, color .15s;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.chip:hover { background: var(--sand-100); }
.chip.active {
  background: var(--green-700);
  border-color: var(--green-700);
  color: #fff;
}
.chip-count {
  font-size: .78rem;
  opacity: .75;
  font-variant-numeric: tabular-nums;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.gallery-item {
  display: block;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.gallery-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(31, 59, 45, 0.14);
}
.gallery-item img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: var(--sand-100);
}
.gallery-caption { padding: .75rem .9rem .9rem; }
.gallery-name { font-weight: 600; color: var(--green-900); font-size: .92rem; line-height: 1.3; }
.gallery-meta { color: var(--ink-500); font-size: .8rem; margin-top: .2rem; }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1.5rem;
}
.lightbox[hidden] { display: none; }
.lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
  max-height: 100%;
}
.lightbox-content img {
  max-width: 92vw;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 12px 50px rgba(0, 0, 0, .5);
  background: #1a1a1a;
}
.lightbox-caption { margin-top: 1.1rem; text-align: center; color: #fff; max-width: 92vw; }
.lb-name { font-size: 1.05rem; font-weight: 600; }
.lb-meta { color: rgba(255, 255, 255, .7); margin-top: .3rem; font-size: .88rem; }
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 1.6rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  line-height: 1;
  padding: 0;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgba(255, 255, 255, .22); }
.lightbox-close { top: 1rem; right: 1rem; }
.lightbox-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) {
  .lightbox-prev, .lightbox-next { top: auto; bottom: 1rem; transform: none; }
  .lightbox-prev { left: 1rem; }
  .lightbox-next { right: 1rem; }
}

/* ---------- visinski profil ---------- */
.visina-section { padding: 4rem 0; background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.profile-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
  gap: 1rem;
  margin: 2rem 0 1.5rem;
}
.profile-stat {
  background: var(--sand-50);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
}
.profile-stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--green-700);
  line-height: 1;
  margin-bottom: .3rem;
  font-variant-numeric: tabular-nums;
}
.profile-stat-value .unit { font-size: 1rem; color: var(--ink-500); font-weight: 600; margin-left: .2em; }
.profile-stat-label { font-weight: 600; color: var(--ink-900); font-size: .92rem; }
.profile-stat-sub   { font-size: .82rem; color: var(--ink-500); margin-top: .15em; }

.profile-chart-wrap {
  background: var(--sand-50);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1rem .6rem;
  margin-bottom: 2rem;
}
.profile-svg { display: block; width: 100%; height: auto; }
.profile-svg .band         { opacity: .14; }
.profile-svg .grid-line    { stroke: var(--line); stroke-width: 1; }
.profile-svg .axis-tick    { fill: var(--ink-500); font-size: 11px; font-family: inherit; }
.profile-svg .axis-label   { fill: var(--ink-700); font-size: 11px; font-weight: 600; font-family: inherit; }
.profile-svg .area         { fill: var(--green-500); opacity: .25; }
.profile-svg .line         { fill: none; stroke: var(--green-700); stroke-width: 2; stroke-linejoin: round; }
.profile-svg .band-label   { fill: var(--ink-700); font-size: 10px; font-weight: 600; font-family: inherit; opacity: .7; text-transform: uppercase; letter-spacing: .04em; }
.profile-svg .hover-line   { stroke: var(--green-900); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; }
.profile-svg .hover-dot    { fill: var(--green-900); r: 4; opacity: 0; }
.profile-tooltip {
  position: absolute;
  background: var(--ink-900);
  color: #fff;
  padding: .5rem .7rem;
  border-radius: 6px;
  font-size: .82rem;
  pointer-events: none;
  white-space: nowrap;
  transform: translate(-50%, -110%);
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  opacity: 0;
  transition: opacity .12s;
}
.profile-tooltip .tt-elev { font-weight: 700; font-variant-numeric: tabular-nums; }
.profile-tooltip .tt-meta { color: rgba(255,255,255,.7); font-size: .76rem; margin-top: .15em; }
.profile-chart-wrap { position: relative; }

.profile-deonice {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 1rem;
}
.profile-deonica-card {
  background: var(--sand-50);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}
.profile-deonica-card h4 {
  margin: 0 0 .7em;
  font-size: 1rem;
  color: var(--green-900);
}
.profile-deonica-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: .88rem;
  padding: .15rem 0;
}
.profile-deonica-row .label { color: var(--ink-500); }
.profile-deonica-row .value { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink-900); }

@media (max-width: 640px) {
  .profile-stat-value { font-size: 1.5rem; }
  .profile-svg .axis-tick { font-size: 10px; }
  .profile-svg .band-label { display: none; }
}

/* ---------- senka i zelenilo ---------- */
.zelenilo-section { padding: 4rem 0; background: var(--sand-50); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }


.shade-strip-wrap {
  margin: 1.2rem 0 1.4rem;
  position: relative;
}
.shade-strip {
  display: flex;
  height: 28px;
  border-radius: 6px;
  overflow: hidden;
  background: #fffaee;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}
.shade-strip .strip-seg {
  min-width: 1px;
  height: 100%;
  cursor: default;
}
.shade-strip .strip-seg.shade { background: #2f6b46; }
.shade-strip .strip-seg.sun   { background: #f0d684; }
.shade-strip-axis {
  display: flex;
  justify-content: space-between;
  font-size: .76rem;
  color: var(--ink-500);
  font-variant-numeric: tabular-nums;
  margin-top: .35rem;
  padding: 0 1px;
}

.shade-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
  gap: .85rem;
  margin: 1rem 0;
}
.shade-stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}
.shade-stat-value {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--green-700);
  line-height: 1;
  margin-bottom: .25rem;
  font-variant-numeric: tabular-nums;
}
.shade-stat-value .unit { font-size: .9rem; color: var(--ink-500); font-weight: 600; margin-left: .2em; }
.shade-stat-value.warn { color: var(--warn); }
.shade-stat-label { font-weight: 600; color: var(--ink-900); font-size: .9rem; }
.shade-stat-sub   { font-size: .8rem; color: var(--ink-500); margin-top: .12em; }

.shade-by-deonica {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
  gap: 1rem;
}
.shade-deonica-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem 1.1rem;
}
.shade-deonica-card h4 {
  margin: 0 0 .55em;
  font-size: 1rem;
  color: var(--green-900);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.shade-deonica-card h4 .pct {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--green-700);
  font-variant-numeric: tabular-nums;
}
.shade-deonica-card h4 .pct.low  { color: var(--warn); }
.shade-deonica-card .mini-strip {
  display: flex;
  height: 14px;
  border-radius: 4px;
  overflow: hidden;
  background: #fffaee;
  margin: .35rem 0 .8rem;
}
.shade-deonica-card .mini-strip .strip-seg.shade { background: #2f6b46; }
.shade-deonica-card .mini-strip .strip-seg.sun   { background: #f0d684; }
.shade-deonica-card .mini-strip .strip-seg { min-width: 1px; height: 100%; }
.shade-deonica-row {
  display: flex;
  justify-content: space-between;
  font-size: .85rem;
  padding: .1rem 0;
}
.shade-deonica-row .label { color: var(--ink-500); }
.shade-deonica-row .value { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink-900); }

@media (max-width: 640px) {
  .shade-stat-value { font-size: 1.4rem; }
}
.lc-legend { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; margin: 1.5rem 0; }
.lc-legend-item { display: inline-flex; align-items: center; gap: .45rem; font-size: .9rem; color: var(--ink-700); }
.lc-legend-swatch { width: 14px; height: 14px; border-radius: 3px; border: 1px solid rgba(0,0,0,.1); }
.lc-bar-row {
  display: grid;
  grid-template-columns: 8em 1fr 4.5em;
  align-items: center;
  gap: .8rem;
  margin-bottom: .6rem;
}
.lc-bar-row .label { color: var(--ink-700); font-weight: 600; font-size: .92rem; }
.lc-bar-row .km { font-size: .85rem; color: var(--ink-500); font-variant-numeric: tabular-nums; text-align: right; }
.lc-bar {
  display: flex;
  height: 26px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--line);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.04);
}
.lc-bar > div {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.95);
  font-size: .74rem;
  font-weight: 700;
  min-width: 0;
  padding: 0 4px;
  text-shadow: 0 1px 1px rgba(0,0,0,.25);
  overflow: hidden;
  white-space: nowrap;
  cursor: default;
}
.lc-bar > div.ink-dark { color: var(--ink-900); text-shadow: none; }
.lc-by-deonica { display: flex; flex-direction: column; gap: 0; margin-top: .5rem; }

@media (max-width: 640px) {
  .lc-bar-row {
    grid-template-columns: 1fr auto;
    grid-template-areas: "label km" "bar bar";
    row-gap: .25rem;
  }
  .lc-bar-row .label { grid-area: label; }
  .lc-bar-row .km    { grid-area: km; }
  .lc-bar            { grid-area: bar; }
  .lc-bar > div      { font-size: .68rem; }
}

/* ---------- anketa ---------- */
.anketa-section {
  padding: 4rem 0;
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.anketa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}
.anketa-card {
  background: var(--sand-50);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem 1.3rem 1.4rem;
}
.anketa-card h3 {
  font-size: 1.05rem;
  margin: 0 0 1rem;
}
.anketa-card-meta {
  font-size: .82rem;
  color: var(--ink-500);
  margin-bottom: .9rem;
  font-variant-numeric: tabular-nums;
}

/* donut chart */
.donut-wrap {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.1rem;
  align-items: center;
}
.donut-svg { width: 100%; height: auto; display: block; }
.donut-center { fill: var(--ink-900); font-weight: 800; font-family: inherit; font-size: 24px; text-anchor: middle; dominant-baseline: middle; }
.donut-center-sub { fill: var(--ink-500); font-weight: 600; font-family: inherit; font-size: 11px; text-anchor: middle; }
.donut-legend { display: flex; flex-direction: column; gap: .4rem; font-size: .87rem; }
.donut-legend-item { display: grid; grid-template-columns: 14px 1fr auto; gap: .55rem; align-items: baseline; line-height: 1.3; }
.donut-legend-swatch { width: 12px; height: 12px; border-radius: 3px; align-self: center; }
.donut-legend-label { color: var(--ink-700); min-width: 0; overflow-wrap: break-word; }
.donut-legend-val   { color: var(--ink-900); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* multi-select bar chart unutar kartice */
.anketa-bar-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .35rem .6rem;
  font-size: .87rem;
  margin-bottom: .55rem;
  align-items: baseline;
}
.anketa-bar-row .label { color: var(--ink-700); grid-column: 1 / 2; line-height: 1.25; }
.anketa-bar-row .value { color: var(--ink-900); font-weight: 700; font-variant-numeric: tabular-nums; }
.anketa-bar-row .track { grid-column: 1 / 3; background: var(--green-100); height: 9px; border-radius: 999px; overflow: hidden; }
.anketa-bar-row .fill  { height: 100%; background: var(--green-500); border-radius: 999px; transition: width .5s ease; }

@media (max-width: 640px) {
  .donut-wrap { grid-template-columns: 1fr; }
  .donut-svg { max-width: 220px; margin: 0 auto; }
}

/* ---------- glas građana (komentari ispod hero-a) ---------- */
.glas-section {
  padding: 2rem 0 2.5rem;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.glas-intro {
  font-size: .92rem;
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 600;
  margin: 0 0 1.2rem;
  text-align: center;
}
.glas-intro a { color: var(--green-700); text-decoration: none; border-bottom: 1px solid var(--green-500); }
.glas-intro a:hover { color: var(--green-900); }

/* karusel u .glas-section nasleđuje .anketa-quotes stilove ispod */

/* ---------- anketa: komentari carousel ---------- */
.anketa-quotes {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  gap: .8rem;
  align-items: stretch;
  margin-top: 2.5rem;
}
.quote-card {
  position: relative;
  background: var(--green-100);
  border-radius: var(--radius);
  padding: 1.6rem 1.8rem 1.3rem;
  box-shadow: var(--shadow);
  min-height: 8rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.quote-mark {
  position: absolute;
  top: -.4rem;
  left: 1rem;
  font-size: 4.2rem;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--green-500);
  opacity: .35;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}
.quote-text {
  color: var(--ink-900);
  font-size: 1.05rem;
  line-height: 1.55;
  margin: 0 0 .9rem;
  font-style: italic;
  text-align: center;
  transition: opacity .25s ease;
}
.quote-text.fade { opacity: 0; }
.quote-meta {
  text-align: center;
  color: var(--ink-500);
  font-size: .82rem;
  font-variant-numeric: tabular-nums;
}
.quote-nav {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  width: 44px;
  height: 44px;
  align-self: center;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--green-700);
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
  padding: 0;
  transition: background .15s, color .15s, transform .15s;
}
.quote-nav:hover { background: var(--green-700); color: #fff; transform: scale(1.05); }

@media (max-width: 640px) {
  .anketa-quotes { grid-template-columns: 1fr; gap: .6rem; }
  .quote-nav { width: 100%; height: 40px; border-radius: 8px; font-size: 1.3rem; }
  .quote-nav.quote-prev { order: 3; }
  .quote-nav.quote-next { order: 2; }
  .quote-card { order: 1; }
}

/* ---------- CTA section ---------- */
.cta-section {
  background: var(--green-100);
  padding: 4rem 0;
  border-top: 1px solid var(--line);
}
.cta-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 1rem;
  margin-top: 2rem;
}
.cta-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow);
}
.cta-card h3 { margin-bottom: .4em; }

.cta-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform .15s ease, box-shadow .15s ease;
}
.cta-card-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(31, 59, 45, 0.14);
}
.cta-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  margin-bottom: .8rem;
  color: #fff;
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  box-shadow: 0 4px 12px rgba(220, 39, 67, 0.25);
}
.cta-card-ig h3 { color: var(--green-900); }
.cta-card-ig strong { color: #cc2366; font-weight: 700; }
.cta-card-wa .cta-card-icon {
  background: #25d366;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}
.cta-card-wa h3 { color: var(--green-900); }
.cta-card-wa p { margin-bottom: .5rem; }
.cta-list { margin: 0; padding-left: 1.1rem; }
.cta-list li { margin-bottom: .45rem; color: var(--ink-700); }
.cta-list li:last-child { margin-bottom: 0; }
.cta-list li::marker { color: #25d366; }
.cta-list strong { color: var(--green-900); }

/* ---------- dnevnik (poseban article layout) ---------- */
.dnevnik-body { background: var(--sand-50); }
.dnevnik-hero {
  background: linear-gradient(140deg, var(--green-900), var(--green-700));
  color: #fff;
  padding: 3rem 0 2.5rem;
  border-bottom: 1px solid var(--line);
}
.dnevnik-hero h1 { color: #fff; font-size: clamp(1.6rem, 2vw + 1rem, 2.6rem); margin-bottom: .3em; }
.dnevnik-hero .subtitle { color: rgba(255,255,255,.85); max-width: 60ch; margin: 0; font-size: 1.05rem; }
.dnevnik-hero .back-link { color: rgba(255,255,255,.8); text-decoration: none; font-weight: 600; font-size: .85rem; }
.dnevnik-hero .back-link:hover { color: #fff; text-decoration: underline; }

.dnevnik-main { padding: 3rem 0 4rem; }
.container-narrow { max-width: 760px; margin: 0 auto; padding: 0 1.25rem; }

.post {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.8rem 1.8rem;
  margin-bottom: 1.6rem;
  box-shadow: var(--shadow);
}
.post-head { margin-bottom: 1rem; }
.post-head time {
  display: block;
  color: var(--ink-500);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .35em;
}
.post-head h2 {
  font-size: 1.4rem;
  margin: 0;
  line-height: 1.25;
  color: var(--green-900);
}
.post-summary {
  color: var(--ink-700);
  font-size: 1rem;
  margin: 0 0 1.2rem;
  line-height: 1.5;
}
.post-body { color: var(--ink-700); font-size: .95rem; line-height: 1.65; }
.post-body h3 {
  font-size: .82rem;
  color: var(--ink-900);
  margin: 1.4em 0 .5em;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
}
.post-body h3:first-child { margin-top: 0; }
.post-body p { margin: 0 0 .8em; }
.post-body code {
  background: var(--green-100);
  color: var(--green-900);
  padding: .12em .35em;
  border-radius: 3px;
  font-size: .88em;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  /* dugačke putanje i URL-ovi inače razvuku stranicu na telefonu */
  overflow-wrap: anywhere;
}
.post-body a { color: var(--green-700); }
.post-body a:hover { color: var(--green-900); }
.tech-list { padding-left: 1.4em; margin: 0 0 .9em; }
.tech-list li { margin-bottom: .4em; }

/* mala tabela unutar unosa u dnevniku */
.tech-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1em;
  font-size: .9rem;
  font-variant-numeric: tabular-nums;
}
.tech-table th, .tech-table td {
  border-bottom: 1px solid var(--line);
  padding: .4em .6em;
  text-align: right;
}
.tech-table th:first-child, .tech-table td:first-child { text-align: left; }
.tech-table thead th {
  border-bottom-width: 2px;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--ink-500);
}

.dnevnik-footer {
  background: var(--green-900);
  color: rgba(255,255,255,.7);
  padding: 2rem 0;
  font-size: .9rem;
}
.dnevnik-footer p { color: rgba(255,255,255,.7); margin: 0 0 .4em; }
.dnevnik-footer a { color: rgba(255,255,255,.85); text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.25); }
.dnevnik-footer a:hover { color: #fff; border-bottom-color: rgba(255,255,255,.6); }
.dnevnik-footer .muted { color: rgba(255,255,255,.55); }

/* ---------- footer ---------- */
footer {
  background: var(--green-900);
  color: rgba(255,255,255,.7);
  padding: 2rem 0;
  font-size: .9rem;
}
footer p { color: rgba(255,255,255,.7); margin: 0 0 .3em; }
footer .muted { color: rgba(255,255,255,.45); }
footer a { color: rgba(255,255,255,.85); text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.25); }
footer a:hover { color: #fff; border-bottom-color: rgba(255,255,255,.6); }
.footer-nav { margin-top: 1.1em; font-size: 1rem; font-weight: 600; }
.footer-nav a { border-bottom-width: 2px; border-bottom-color: rgba(255,255,255,.45); }
.footer-meta { margin-top: .9em; font-size: .82rem; }
.footer-sep { color: rgba(255,255,255,.3); margin: 0 .45em; }

/* ---------- map markers ---------- */
.dot {
  display: block;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.35);
}
.tri {
  width: 0; height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.45));
}

/* ---------- zaglavlje stranica analiza (analize.html + pojedinačne) ---------- */
.page-hero { padding: 3rem 0 3.2rem; }
.page-hero .eyebrow a { color: rgba(255,255,255,.75); text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.3); }
.page-hero .eyebrow a:hover { color: #fff; border-bottom-color: rgba(255,255,255,.7); }
.page-hero .subtitle { margin-bottom: 0; }

/* ---------- spisak analiza (analize.html) ---------- */
.analize-main { padding: 2.6rem 0 3.4rem; }
.analize-main > .container > .lead { max-width: 760px; }

.analiza-grupa { margin-top: 2.6rem; }
.analiza-grupa h2 { margin-bottom: .3em; }
.grupa-lead { max-width: 640px; margin-top: 0; }

.analiza-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1rem;
  margin-top: 1.4rem;
}

.analiza-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.25rem 1.3rem;
  box-shadow: var(--shadow);
}
.analiza-card h3 { margin-bottom: .45em; }
.analiza-card p { margin: 0 0 .8em; color: var(--ink-700); font-size: .95rem; }
.analiza-card p:last-of-type { margin-bottom: 0; }

.analiza-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  margin-bottom: .7rem;
}
.analiza-num {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--green-500);
  font-variant-numeric: tabular-nums;
}
.analiza-status {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .2em .6em;
  border-radius: 999px;
}
.status-live { background: var(--green-100); color: var(--green-700); }
.status-plan { background: var(--sand-100); color: var(--ink-500); }

.analiza-nalaz {
  background: var(--green-100);
  border-left: 3px solid var(--green-500);
  border-radius: 0 8px 8px 0;
  padding: .6rem .75rem;
  font-size: .9rem !important;
}
.analiza-nalaz strong { color: var(--green-900); }

.analiza-card-live {
  text-decoration: none;
  color: inherit;
  border-color: var(--green-500);
  transition: transform .15s ease, box-shadow .15s ease;
}
.analiza-card-live:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(31, 59, 45, 0.14);
}
.analiza-cta {
  margin-top: auto;
  padding-top: 1rem;
  font-weight: 700;
  color: var(--green-700);
  font-size: .95rem;
}

.analiza-card-plan { background: var(--sand-100); box-shadow: none; }
.analiza-card-plan h3 { color: var(--ink-700); }

.analiza-grupa-najava { margin-top: 3rem; }
.analiza-grupa-najava p { max-width: 720px; }

@media (max-width: 640px) {
  .analiza-list { grid-template-columns: 1fr; }
  .analize-main { padding: 2rem 0 2.6rem; }
}

/* ---------- analiza 9.1 (9.1.shade_and_tree_canopy_coverage.html) ---------- */
.senka-analiza { border-bottom: none; }

.heatmap-wrap {
  position: relative;
  margin: 1rem 0 .6rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .8rem .6rem .5rem;
  box-shadow: var(--shadow);
}
#senka-heatmap { display: block; width: 100%; }
.heatmap-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--ink-900);
  color: #fff;
  border-radius: 8px;
  padding: .45rem .65rem;
  font-size: .8rem;
  line-height: 1.35;
  white-space: nowrap;
  z-index: 5;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
}
.heatmap-tooltip .tt-state { font-weight: 700; }
.heatmap-tooltip .tt-meta { color: rgba(255,255,255,.75); font-variant-numeric: tabular-nums; }
.heatmap-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: .82rem;
  color: var(--ink-700);
  margin-bottom: .4rem;
}
.hl-item { display: inline-flex; align-items: center; gap: .4rem; }
.hl-swatch {
  width: 14px; height: 14px;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.12);
}

.shade-map-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem 1.4rem;
  margin: 1rem 0 .8rem;
}
.shade-map-controls .chip-filters { margin: 0; }
.hour-slider-row[hidden], .hour-gradient-legend[hidden] { display: none; }
.hour-slider-row {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  flex: 1 1 240px;
  max-width: 380px;
}
.hour-label {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--green-900);
  min-width: 3.2em;
}
#hour-slider {
  flex: 1;
  accent-color: var(--green-700);
  cursor: pointer;
}
.hour-gradient-legend {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-size: .8rem;
  color: var(--ink-500);
  font-variant-numeric: tabular-nums;
}
.gradient-bar {
  display: inline-block;
  width: 120px; height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, #2f6b46, #d8a93a);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.1);
}
#shade-map, #safety-map, #geom-map, #kk-map {
  height: 420px;
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  z-index: 0;
}

.table-scroll { overflow-x: auto; }
.senka-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: .92rem;
  box-shadow: var(--shadow);
}
.senka-table th, .senka-table td {
  padding: .55rem .8rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.senka-table thead th {
  background: var(--green-100);
  color: var(--green-900);
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.senka-table td.num { font-variant-numeric: tabular-nums; text-align: right; }
.senka-table th:nth-child(n+2), .senka-table thead th:nth-child(n+2) { text-align: right; }
.senka-table tbody tr:last-child td { border-bottom: none; background: var(--sand-100); }
.senka-table tfoot td { font-size: .78rem; border-bottom: none; padding-top: .5rem; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 640px) {
  .hero { padding: 3rem 0 3.5rem; }
  #map { height: 460px; }
  .card { padding: 1.1rem 1rem 1.3rem; }
  .bar-row {
    grid-template-columns: 1fr auto;
    grid-template-areas: "label value" "track track";
    row-gap: .3rem;
    column-gap: .7rem;
    font-size: .88rem;
  }
  .bar-row .label { grid-area: label; }
  .bar-row .value { grid-area: value; }
  .bar-row .track { grid-area: track; }
  #shade-map, #safety-map, #geom-map, #kk-map { height: 340px; }
  .hour-slider-row { flex-basis: 100%; max-width: none; }
}

/* ---------- analiza 8 (8.safety_audit.html) ---------- */

.stanja-timeline-wrap {
  position: relative;
  margin: 1rem 0 2rem;
}

.stanja-track {
  height: 12px;
  background: var(--sand-200, #e8e5df);
  border-radius: 6px;
  position: relative;
}

.stanja-pins {
  position: relative;
  height: 52px;
}

.stanja-pin {
  position: absolute;
  transform: translateX(-50%);
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.stanja-pin .pin-line {
  width: 2px;
  height: 28px;
  background: var(--pin-color, #888);
  opacity: .75;
}

.stanja-pin .pin-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--pin-color, #888);
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
  flex-shrink: 0;
}

.stanja-pin:hover .pin-dot {
  transform: scale(1.4);
}

.stanja-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink-900, #1a1f1b);
  color: #fff;
  font-size: .8rem;
  padding: .35em .6em;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s;
  z-index: 10;
}

.stanja-pin:hover .stanja-tooltip {
  opacity: 1;
}

.stanja-timeline-axis {
  position: relative;
  height: 18px;
  margin-top: .25rem;
  font-size: .78rem;
  color: var(--ink-500);
}

.stanja-timeline-axis span {
  position: absolute;
  transform: translateX(-50%);
}

/* ---------- analiza 9.2 (9.2.noise_and_air_quality_exposure.html) ---------- */

/* ključni nalazi — ono što treba zapamtiti i ako se ostalo preskoči */
.nalazi-section { background: var(--sand-100); padding: 2.4rem 0; border-bottom: 1px solid var(--line); }
.nalazi {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.1rem;
}
.nalaz {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green-500);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow);
}
.nalaz-warn { border-left-color: var(--warn); }
.nalaz-broj {
  margin: 0 0 .3em;
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1;
  color: var(--green-700);
  font-variant-numeric: tabular-nums;
}
.nalaz-warn .nalaz-broj { color: var(--warn); }
.nalaz-tekst { margin: 0; font-size: .93rem; color: var(--ink-700); }

/* izdvojene napomene */
.callout {
  border-radius: var(--radius);
  padding: .95rem 1.15rem;
  margin: 1.4rem 0;
  border-left: 4px solid;
}
.callout p { margin: 0; font-size: .95rem; }
.callout-info { background: var(--sand-100); border-left-color: var(--ink-300); color: var(--ink-700); }
.callout-good { background: var(--green-100); border-left-color: var(--green-500); color: var(--green-900); }

/* profil buke */
.profil-wrap {
  position: relative;
  margin: 1rem 0 .6rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .8rem .6rem .5rem;
  box-shadow: var(--shadow);
}
#buka-profil { display: block; width: 100%; }
#buka-map,
#vazduh-map,
#termo-map {
  height: 420px;
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  z-index: 0;
}
.idx-pill {
  display: inline-block;
  min-width: 2.4em;
  padding: .12em .45em;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  font-size: .85rem;
  text-align: center;
}

/* vazduh */
.vazduh-section { padding: 3rem 0; border-bottom: 1px solid var(--line); }
.vazduh-kartice {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1.4rem 0 2rem;
}
.vazduh-kartica {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem 1.2rem;
  box-shadow: var(--shadow);
}
.vazduh-kartica h4 { margin: 0 0 .5em; font-size: .95rem; color: var(--ink-700); }
.vk-broj {
  margin: 0 0 .15em;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--green-700);
  font-variant-numeric: tabular-nums;
}
.vk-broj.warn { color: var(--warn); }
.vk-jed { font-size: .85rem; font-weight: 600; color: var(--ink-500); }
.vk-sub { margin: 0 0 .8em; font-size: .85rem; color: var(--ink-700); }
.vk-bar { height: 6px; background: var(--sand-100); border-radius: 999px; overflow: hidden; }
.vk-bar span { display: block; height: 100%; background: var(--warn); border-radius: 999px; }
.vk-note { margin: .45em 0 0; font-size: .8rem; color: var(--ink-500); }

/* mesečni graf — CSS stupci umesto canvasa: čitljivo i dostupno */
.mesec-graf { margin: 1.2rem 0 .6rem; }
.mg-plot {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: .3rem;
  align-items: end;
  height: 210px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .9rem .8rem .4rem;
  box-shadow: var(--shadow);
}
/* linija smernice SZO — mera prema kojoj se sve čita */
.mg-plot::after {
  content: "";
  position: absolute;
  left: .8rem; right: .8rem;
  bottom: calc(1.9rem + (100% - 3.3rem) * var(--szo) / 100);
  border-top: 2px dashed var(--warn);
  pointer-events: none;
}
.mg-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.mg-val { font-size: .72rem; color: var(--ink-500); font-variant-numeric: tabular-nums; margin-bottom: .15em; }
.mg-bar { width: 100%; max-width: 42px; background: var(--green-500); border-radius: 4px 4px 0 0; min-height: 2px; }
.mg-bar.over { background: var(--warn); }
.mg-ime { font-size: .72rem; color: var(--ink-500); margin-top: .3em; }
.mg-legend { font-size: .82rem; color: var(--ink-500); margin: .6rem 0 0; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.mg-key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.mg-key.over { background: var(--warn); }
.mg-key.ok { background: var(--green-500); margin-left: .8rem; }

/* polen kalendar */
.polen-kalendar {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem .8rem;
  box-shadow: var(--shadow);
  margin-top: 1.2rem;
}
.pk-red { display: grid; grid-template-columns: 6.5rem 1fr 6.5rem; align-items: center; gap: .7rem; margin-bottom: .5rem; }
.pk-ime { font-size: .9rem; font-weight: 600; color: var(--ink-900); }
.pk-traka { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px; }
.pk-cel {
  height: 22px;
  border-radius: 3px;
  /* prozirnost nosi intenzitet — jedna boja, bez legende koja traži učenje */
  background: color-mix(in srgb, var(--earth-500) calc(var(--t) * 100%), var(--sand-100));
}
.pk-vrh { font-size: .78rem; color: var(--ink-500); text-align: right; }
.pk-osa { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px; margin: .3rem 0 0 7.2rem; padding-right: 7.2rem; }
.pk-osa span { font-size: .7rem; color: var(--ink-500); text-align: center; }

/* metod */
.metod-section { padding: 2.8rem 0 3.2rem; }
.metod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
  margin: 1.4rem 0;
}
.metod-item { background: var(--sand-100); border-radius: var(--radius); padding: 1rem 1.1rem 1.1rem; }
.metod-item h4 { margin: 0 0 .4em; font-size: .92rem; color: var(--green-900); }
.metod-item p { margin: 0; font-size: .88rem; color: var(--ink-700); }
.metod-foot { font-size: .85rem; max-width: 760px; }

@media (max-width: 640px) {
  .nalaz-broj { font-size: 1.8rem; }
  #buka-map,
  #vazduh-map,
  #termo-map { height: 340px; }
  .mg-plot { height: 175px; gap: .15rem; padding: .7rem .5rem .4rem; }
  .mg-val { display: none; }
  .mg-ime { font-size: .62rem; }
  .pk-red { grid-template-columns: 4.6rem 1fr; }
  .pk-vrh { display: none; }
  .pk-osa { margin-left: 5.3rem; padding-right: 0; }
  .pk-osa span { font-size: .58rem; }
}
/* reč, ne broj — zaglavlje prati poravnanje sadržaja */
.senka-table th.tl, .senka-table thead th.tl { text-align: left; }

/* ---------- pokazatelji sekcije 9 (analize.html) ---------- */
.pokazatelji { margin: 2.6rem 0 0; }
.pokazatelji h3 { margin-bottom: .6rem; }
.pokazatelji-table { min-width: 720px; }
.pokazatelji-table .pk-naziv { font-weight: 600; color: var(--ink-900); white-space: nowrap; }
.pokazatelji-table .pk-en {
  display: block;
  font-weight: 400;
  font-size: .76rem;
  color: var(--ink-500);
  letter-spacing: .01em;
}
.pokazatelji-table .pk-mera { color: var(--ink-700); font-size: .88rem; }
.pokazatelji-table td.pk-best,
.senka-table td.pk-best { font-weight: 800; color: var(--green-700); }
.pokazatelji-table tr.pk-plan td { background: var(--sand-50); }
.pokazatelji-nota { font-size: .85rem; margin-top: .7rem; max-width: 760px; }
.pokazatelji-table .pk-short,
.pokazatelji-table .pk-mera-mob { display: none; }

@media (max-width: 640px) {
  /* telefon: brojevi moraju da se vide bez skrolovanja unutar tabele */
  .pokazatelji-table { min-width: 0; width: 100%; }
  .pokazatelji-table .pk-col-mera,
  .pokazatelji-table .pk-col-izvor { display: none; }
  .pokazatelji-table .pk-long { display: none; }
  .pokazatelji-table .pk-short { display: inline; }
  .pokazatelji-table .pk-naziv { white-space: normal; }
  .pokazatelji-table .pk-mera-mob {
    display: block;
    font-weight: 400;
    font-size: .76rem;
    color: var(--ink-700);
    margin-top: .25rem;
    line-height: 1.35;
  }
  .pokazatelji-table th, .pokazatelji-table td { padding-left: .45rem; padding-right: .45rem; }
  .pokazatelji-table td.num { white-space: nowrap; font-size: .88rem; }
}

/* ---------- sadržaj (analize.html) ---------- */
.sadrzaj {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem 1.35rem 1.2rem;
  max-width: 560px;
  margin-bottom: 2rem;
}
.sadrzaj[hidden] { display: none; }
.sadrzaj-naslov {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--ink-500);
  margin: 0 0 .7rem;
}
.sadrzaj ol { list-style: none; margin: 0; padding: 0; }
.sadrzaj ol ol { margin: .4rem 0 .1rem; padding-left: 1.2rem; border-left: 2px solid var(--green-100); }
.sadrzaj li { margin: .3rem 0; }
.sadrzaj a { color: var(--green-900); font-weight: 700; text-decoration: none; }
.sadrzaj a:hover { color: var(--green-700); text-decoration: underline; }
.sadrzaj ol ol a { font-weight: 500; color: var(--ink-700); }
.sadrzaj a, .sadrzaj .sd-plan {
  display: grid;
  grid-template-columns: 2.4em 1fr;
  align-items: baseline;
}
.sd-num {
  color: var(--green-500);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.sd-go { color: var(--ink-300); margin-left: .35rem; }
.sadrzaj a:hover .sd-go { color: var(--green-700); }
.sd-plan { color: var(--ink-500); }
.sd-status {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: var(--sand-100);
  color: var(--ink-500);
  padding: .12em .55em;
  border-radius: 999px;
  margin-left: .45rem;
}
.sd-extra a { font-style: italic; }

/* ── merne stanice (9.2) ───────────────────────────────────────── */
.stanice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin: 1.2rem 0 1.4rem;
}
.st-kartica {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem 1.1rem;
  box-shadow: var(--shadow);
}
/* stanica koja predstavlja kej nosi sve nivoe na stranici, pa se i vidi */
.st-kartica.glavna { border-color: var(--green-500); border-width: 2px; }
.st-znak {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--ink-500);
  background: var(--sand-100);
  border-radius: 999px;
  padding: .25em .7em;
  margin-bottom: .7em;
}
.st-kartica.glavna .st-znak { color: #fff; background: var(--green-700); }
.st-d {
  margin: 0 0 .1em;
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
  color: var(--green-700);
  font-variant-numeric: tabular-nums;
}
.st-d-sub { font-size: .8rem; font-weight: 600; color: var(--ink-500); }
.st-tip { margin: 0 0 .6em; font-size: .85rem; font-weight: 600; color: var(--ink-700); }
.st-opis { margin: 0 0 .7em; font-size: .88rem; color: var(--ink-700); }
.st-meta { margin: 0; font-size: .76rem; color: var(--ink-500); }

.vk-zakon {
  margin: .5em 0 0;
  font-size: .78rem;
  font-weight: 700;
  color: var(--warn);
}

/* ── prekoračenja po godini (9.2) ──────────────────────────────── */
.godine-graf { margin: 1.2rem 0 .6rem; }
.gg-plot {
  position: relative;
  display: flex;
  align-items: end;
  gap: .35rem;
  height: 230px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .9rem 5.4rem .4rem .9rem;
  box-shadow: var(--shadow);
}
/* linija dopuštenog broja dana — sve iznad nje je prekoračenje zakona */
.gg-plot::after {
  content: "";
  position: absolute;
  left: .9rem; right: 5.4rem;
  bottom: calc(1.6rem + (100% - 3rem) * var(--dop) / 100);
  border-top: 2px dashed var(--warn);
  pointer-events: none;
}
.gg-dop-oznaka {
  position: absolute;
  right: .7rem;
  bottom: calc(1.6rem + (100% - 3rem) * var(--dop) / 100);
  transform: translateY(50%);
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--warn);
  width: 4.2rem;
}
.gg-col { flex: 1 1 0; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; min-width: 0; }
.gg-stupci { display: flex; align-items: end; justify-content: center; gap: 2px; height: 100%; }
.gg-bar {
  position: relative;
  flex: 1 1 0;
  max-width: 18px;
  border-radius: 3px 3px 0 0;
  min-height: 2px;
}
.gg-saob { background: var(--warn); }
.gg-poz  { background: var(--earth-500); }
.gg-val {
  position: absolute;
  top: -1.05em; left: 50%;
  transform: translateX(-50%);
  font-size: .65rem;
  color: var(--ink-500);
  font-variant-numeric: tabular-nums;
}
.gg-ime { font-size: .72rem; color: var(--ink-500); text-align: center; margin-top: .3em; }
.gg-key-saob { background: var(--warn); }
.gg-key-poz { background: var(--earth-500); margin-left: .8rem; }
.gg-praznine { margin-left: .8rem; font-style: italic; }
.gg-vek { color: var(--ink-300); }

/* ── raspodela NO₂ na delove (9.2) ─────────────────────────────── */
.raspodela {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem 1rem;
  box-shadow: var(--shadow);
  margin: 1.2rem 0 1.4rem;
}
.rp-red { display: grid; grid-template-columns: 11rem 1fr 5.2rem; align-items: center; gap: .8rem; margin-bottom: .8rem; }
.rp-ime { font-size: .88rem; font-weight: 700; color: var(--ink-900); line-height: 1.25; }
.rp-ime-sub { display: block; font-size: .76rem; font-weight: 500; color: var(--ink-500); }
.rp-traka { display: flex; height: 20px; border-radius: 5px; overflow: hidden; background: var(--sand-100); }
.rp-seg { display: block; height: 100%; }
.rp-reg { background: var(--ink-300); }
.rp-urb { background: var(--earth-500); }
.rp-saob { background: var(--warn); }
.rp-suma { font-size: 1.05rem; font-weight: 800; color: var(--ink-900); text-align: right; font-variant-numeric: tabular-nums; }
.rp-jed { font-size: .7rem; font-weight: 600; color: var(--ink-500); }
.rp-key-reg { background: var(--ink-300); }
.rp-key-urb { background: var(--earth-500); margin-left: .8rem; }
.rp-key-saob { background: var(--warn); margin-left: .8rem; }
.rp-nota { margin: .7rem 0 0; font-size: .85rem; }

@media (max-width: 640px) {
  .tech-table { font-size: .82rem; }
  .tech-table th, .tech-table td { padding: .35em .3em; }
  .gg-plot { height: 190px; gap: .15rem; padding: .8rem 3.5rem .4rem .5rem; }
  .gg-plot::after { right: 3.5rem; }
  .gg-val { display: none; }
  .gg-ime { font-size: .62rem; }
  .gg-vek { display: none; }
  .gg-dop-oznaka { font-size: .62rem; right: .35rem; width: 3rem; }
  .gg-praznine { display: none; }
  .rp-red { grid-template-columns: 1fr 4.6rem; gap: .5rem .7rem; }
  .rp-ime { grid-column: 1 / -1; }
  .st-d { font-size: 1.35rem; }
}

.mapa-nota { margin: .5rem 0 1.6rem; font-size: .82rem; }

/* ── sunce protiv senke (9.3) ──────────────────────────────────── */
.uporedba {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem 1rem;
  box-shadow: var(--shadow);
  margin: 1.2rem 0 2rem;
}
.up-red { display: grid; grid-template-columns: 9rem 1fr 5.4rem 11rem; align-items: center; gap: .9rem; margin-bottom: .8rem; }
.up-ime { font-size: .92rem; font-weight: 700; color: var(--ink-900); }
.up-traka { height: 22px; border-radius: 5px; background: var(--sand-100); overflow: hidden; }
.up-traka span { display: block; height: 100%; border-radius: 5px; }
.up-broj { font-size: 1.25rem; font-weight: 800; color: var(--ink-900); text-align: right; font-variant-numeric: tabular-nums; }
.up-jed { font-size: .72rem; font-weight: 600; color: var(--ink-500); }
.up-kat { font-size: .82rem; color: var(--ink-700); }
.up-nota { margin: .9rem 0 0; font-size: .88rem; }

/* ── sat po sat (9.3) ──────────────────────────────────────────── */
.sat-graf { margin: 1.2rem 0 .6rem; }
.sg-plot {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: .5rem;
  align-items: end;
  height: 180px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .9rem 1rem .4rem;
  box-shadow: var(--shadow);
}
.sg-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.sg-val { font-size: .74rem; color: var(--ink-700); font-variant-numeric: tabular-nums; margin-bottom: .2em; }
.sg-bar { width: 100%; max-width: 54px; border-radius: 5px 5px 0 0; min-height: 3px; }
.sg-ime { font-size: .76rem; color: var(--ink-500); margin-top: .35em; }

/* ── činioci (9.3) ─────────────────────────────────────────────── */
.cinioci {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin: 1.3rem 0 0;
}
.cinilac {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem 1.1rem;
  box-shadow: var(--shadow);
}
.ci-broj {
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.05;
  color: var(--green-700);
  font-variant-numeric: tabular-nums;
}
.ci-sub { font-size: .9rem; font-weight: 700; color: var(--ink-500); }
.ci-naslov { margin: .25em 0 .5em; font-size: .88rem; font-weight: 600; color: var(--ink-700); }
.ci-opis { margin: 0; font-size: .85rem; color: var(--ink-500); }

@media (max-width: 640px) {
  .up-red { grid-template-columns: 1fr 5rem; gap: .4rem .7rem; }
  .up-ime { grid-column: 1 / -1; }
  .up-kat { grid-column: 1 / -1; font-size: .78rem; margin-top: -.2rem; }
  .sg-plot { height: 150px; gap: .25rem; padding: .8rem .5rem .4rem; }
  .sg-val { font-size: .66rem; }
  .sg-ime { font-size: .68rem; }
  .ci-broj { font-size: 1.4rem; }
}
