/* Domača stran — portal »Grosuplje v podatkih«. Gradi na style.css. */

:root {
  /* Ista kategorialna paleta kot na /proracun (barva sledi področju). */
  --cat-1: #2a78d6; --cat-2: #eb6834; --cat-3: #1baf7a;
  --cat-4: #eda100; --cat-5: #e87ba4; --cat-6: #008300; --cat-other: #a7b0ba;
}
@media (prefers-color-scheme: dark) {
  :root {
    --cat-1: #3987e5; --cat-2: #d95926; --cat-3: #199e70;
    --cat-4: #c98500; --cat-5: #d55181; --cat-6: #008300; --cat-other: #56636f;
  }
}

/* ---------- Naslov + »Grosuplje danes« ---------- */
.home-hero {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(1.25rem, 4vw, 2.5rem);
  align-items: center; margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}
.home-copy h1 {
  margin: 0; font-size: clamp(2.4rem, 7vw, 3.6rem); font-weight: 700;
  line-height: 1.02; letter-spacing: -0.025em; color: var(--ink);
}
.home-copy h1 .accent { color: var(--blue); }
.home-cta { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.3rem; }
.btn {
  display: inline-flex; align-items: center; font-size: 0.88rem; font-weight: 700; text-decoration: none;
  color: var(--blue-deep); background: var(--tint); border-radius: 999px; padding: 0.6rem 1.15rem;
  transition: background 200ms var(--ease), transform 200ms var(--ease);
}
.btn:hover { background: var(--tint-2); transform: translateY(-1px); }
.btn-primary { background: var(--blue-fill); color: var(--on-blue); }
.btn-primary:hover { background: var(--blue-deep); color: var(--on-blue); }

.today {
  background: var(--tint-2); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(1rem, 3vw, 1.35rem); box-shadow: var(--shadow-sm);
}
.today h2 { margin: 0 0 0.8rem; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue-deep); }
.today-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.kpi {
  display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 0.75rem 0.85rem;
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease), border-color 200ms var(--ease);
}
.kpi:hover, .kpi:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: var(--blue-soft); }
.kpi-label { font-size: 0.72rem; font-weight: 700; color: var(--ink-3); }
.kpi-val { font-size: clamp(1.35rem, 4vw, 1.65rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.kpi-note { font-size: 0.74rem; font-weight: 600; color: var(--ink-3); }
.kpi-note .dot { display: inline-block; width: 0.55rem; height: 0.55rem; border-radius: 50%; margin-right: 0.3rem; vertical-align: 0; background: var(--unknown); }
.kpi-note .dot.good { background: var(--good); }
.kpi-note .dot.moderate { background: var(--moderate); }
.kpi-note .dot.bad { background: var(--bad); }
.kpi-spark svg { display: block; width: 100%; height: 26px; margin-top: 0.25rem; overflow: visible; }
.kpi-spark path { fill: none; stroke: var(--blue); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.kpi-spark circle { fill: var(--blue); stroke: var(--card); stroke-width: 2; }

/* ---------- Kaj se dogaja ---------- */
.insights { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: clamp(0.7rem, 2vw, 1rem); }
.insight {
  display: flex; flex-direction: column; gap: 0.3rem; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--blue);
  border-radius: var(--r); padding: 0.9rem 1rem 0.95rem; box-shadow: var(--shadow-sm);
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease);
  animation: rise 460ms var(--ease) both;
}
.insight:hover, .insight:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.insight b { font-size: 1.55rem; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.insight p { margin: 0; font-size: 0.88rem; color: var(--ink-2); }
.insight small { margin-top: auto; padding-top: 0.25rem; font-size: 0.72rem; font-weight: 600; color: var(--ink-3); }
.insight small::after { content: " · več →"; color: var(--blue-deep); }

/* ---------- Od vsakih 100 € ---------- */
.bar100 { display: flex; height: 38px; gap: 2px; border-radius: 10px; overflow: hidden; }
.bar100 a { display: block; min-width: 3px; background: var(--seg); transition: filter 160ms var(--ease); }
.bar100 a:hover, .bar100 a:focus-visible { filter: brightness(1.12); }
.flow-legend { display: flex; flex-wrap: wrap; gap: 0.35rem 1.1rem; margin: 0.65rem 0 0; padding: 0; list-style: none; }
/* Barvni kvadratek absolutno, da se dolgo ime in znesek lomita skupaj. */
.flow-legend li { position: relative; padding-left: 1.05rem; font-size: 0.82rem; color: var(--ink-2); }
.flow-legend li::before { content: ""; position: absolute; left: 0; top: 0.3em; width: 0.7rem; height: 0.7rem; border-radius: 3px; background: var(--seg); }
.flow-legend a { color: inherit; text-decoration: none; }
.flow-legend a:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.flow-legend b { color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Razišči ---------- */
.ex-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: clamp(0.7rem, 2vw, 1rem); }
.ex-card {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto 1fr auto; column-gap: 0.75rem; row-gap: 0.2rem;
  text-decoration: none; color: inherit; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 1rem 1.05rem; box-shadow: var(--shadow-sm);
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease), border-color 220ms var(--ease);
}
.ex-card:hover, .ex-card:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: var(--blue-soft); }
.ex-icon {
  grid-row: 1 / span 3; width: 40px; height: 40px; padding: 8px; border-radius: 12px;
  background: var(--tint-2); fill: none; stroke: var(--blue); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.ex-title { font-size: 1.02rem; font-weight: 700; color: var(--ink); }
.ex-title::after { content: "\00a0→"; color: var(--blue); }
.ex-text { font-size: 0.84rem; color: var(--ink-2); }
.ex-src { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); padding-top: 0.2rem; }

/* ---------- O strani ---------- */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(1rem, 3vw, 2rem); align-items: start; }
.note-list { margin: 0; padding-left: 1.1rem; color: var(--ink-2); font-size: 0.9rem; }
.note-list li + li { margin-top: 0.45rem; }
.about-h3 { margin: 0 0 0.5rem; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--blue-deep); }
.fresh { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; font-size: 0.84rem; }
.fresh li { display: flex; justify-content: space-between; gap: 0.6rem; border-bottom: 1px dashed var(--line); padding-bottom: 0.3rem; }
.fresh a { color: var(--ink-2); text-decoration: none; }
.fresh a:hover { color: var(--blue); }
.fresh span { color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }

@media (max-width: 760px) {
  .home-hero, .about-grid { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
  .today-grid { grid-template-columns: 1fr; }
}

/* ---------- Kaj se gradi in kaj je načrtovano ---------- */
.works { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(1rem, 3vw, 1.6rem); }
.works-col h3 { margin: 0 0 0.6rem; font-size: 1rem; }
.built-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.6rem; margin: 0 0 0.7rem; padding: 0; list-style: none; }
.built-list a { display: flex; flex-direction: column; gap: 0.2rem; height: 100%; text-decoration: none; color: inherit; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--cat-1); border-radius: 12px; padding: 0.65rem 0.8rem; transition: transform 200ms var(--ease), box-shadow 200ms var(--ease); }
.built-list a:hover, .built-list a:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.built-year { font-size: 0.72rem; font-weight: 700; color: var(--ink-3); }
.built-list b { font-size: 0.86rem; line-height: 1.3; color: var(--ink); }
.built-val { margin-top: auto; padding-top: 0.2rem; font-size: 1.05rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.built-list small { font-size: 0.72rem; color: var(--ink-3); }
.plan-big { margin: 0 0 0.6rem; color: var(--ink-3); font-size: 0.86rem; }
.plan-big b { font-size: clamp(1.6rem, 5vw, 2rem); color: var(--ink); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.plan-years-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; align-items: end; height: 120px; margin-bottom: 0.8rem; }
.py-col { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; height: 100%; }
.py-bar { flex: 1; display: flex; align-items: flex-end; width: 100%; max-width: 54px; border-radius: 6px; background: var(--tint); overflow: hidden; }
.py-bar span { display: block; width: 100%; background: var(--cat-3); border-radius: 6px 6px 0 0; }
.py-val { font-size: 0.72rem; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.py-year { font-size: 0.74rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.plan-top { margin: 0 0 0.6rem; padding: 0; list-style: none; }
.plan-top li { display: flex; flex-direction: column; padding: 0.4rem 0; border-bottom: 1px solid var(--line); }
.plan-top b { font-size: 0.86rem; color: var(--ink); line-height: 1.3; }
.plan-top span { font-size: 0.76rem; color: var(--ink-3); }
.works-exec { margin: 0 0 0.6rem; font-size: 0.84rem; }
.works-exec a, .works-more { color: var(--blue-deep); font-weight: 700; font-size: 0.86rem; }
