/* ==========================================================================
   Centar kulture Ribnjak — style.css
   ========================================================================== */

/* ---- Fonts ---- */
@font-face {
  font-family: "InterVariable";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "InterVariable";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---- Tokens ---- */
:root {
  --bg: #faf9f5;
  --surface: #ffffff;
  --ink: #171713;
  --ink-2: #57544b;
  --line: #e5e2d8;
  --line-strong: #171713;
  --accent: #1e5a37;
  --accent-soft: rgba(30, 90, 55, 0.08);
  --scrim: rgba(12, 14, 10, 0.45);
  --shadow: 0 16px 48px rgba(23, 23, 19, 0.10);
  --header-h: 72px;
  --radius: 2px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #141412;
  --surface: #1c1c19;
  --ink: #f1efe8;
  --ink-2: #a9a69b;
  --line: #2c2c27;
  --line-strong: #f1efe8;
  --accent: #93d1a9;
  --accent-soft: rgba(147, 209, 169, 0.09);
  --scrim: rgba(5, 6, 4, 0.55);
  --shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

/* ---- Base ---- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html:focus-within { scroll-behavior: smooth; }
body {
  font-family: "InterVariable", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }
::selection { background: var(--accent); color: var(--bg); }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  padding: 12px 20px; background: var(--ink); color: var(--bg); font-weight: 600;
}
.skip:focus { left: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.container { max-width: 1240px; margin-inline: auto; padding-inline: clamp(20px, 4.5vw, 48px); }

/* ---- Typography helpers ---- */
.kicker {
  display: block;
  font-size: 12px; font-weight: 650; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}
h1, h2, h3 { font-weight: 640; letter-spacing: -0.025em; line-height: 1.12; text-wrap: balance; }
.sec { padding-block: clamp(64px, 9vw, 116px); }
.sec + .sec { padding-top: 0; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: clamp(32px, 5vw, 56px); }
.sec-head h2 { font-size: clamp(28px, 4vw, 46px); }
.sec-head .more { flex-shrink: 0; margin-bottom: 6px; }
.lead { font-size: clamp(17px, 2vw, 20px); line-height: 1.65; color: var(--ink-2); max-width: 68ch; }
.prose { max-width: 72ch; }
.prose p { margin-bottom: 1.2em; color: var(--ink-2); font-size: 16.5px; }
.prose p strong { color: var(--ink); }
.prose h3 { font-size: 22px; margin: 1.8em 0 0.7em; }
.prose ul { margin: 0 0 1.2em; padding-left: 1.1em; list-style: none; }
.prose ul li { position: relative; padding-left: 18px; margin-bottom: 8px; color: var(--ink-2); }
.prose ul li::before { content: ""; position: absolute; left: 0; top: 11px; width: 8px; height: 1.5px; background: var(--accent); }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* arrow link */
.more {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 600; color: var(--ink);
  border-bottom: 1px solid transparent; padding-bottom: 2px;
  transition: color .25s, border-color .25s;
}
.more svg { width: 15px; height: 15px; transition: transform .25s; }
.more:hover { color: var(--accent); border-color: var(--accent); }
.more:hover svg { transform: translateX(3px); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px; border: 1px solid var(--ink);
  font-size: 15px; font-weight: 600; letter-spacing: 0.01em;
  border-radius: var(--radius);
  transition: background .25s, color .25s, border-color .25s;
}
.btn svg { width: 15px; height: 15px; }
.btn-solid { background: var(--ink); color: var(--bg); }
.btn-solid:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
:root[data-theme="dark"] .btn-solid:hover { color: #10130f; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }
.btn-light { border-color: #fff; color: #fff; background: transparent; }
.btn-light:hover { background: #fff; color: #17171f; }
.btn-lightsolid { border-color: #fff; background: #fff; color: #17171a; }
.btn-lightsolid:hover { background: transparent; color: #fff; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  /* hairline as a shadow, not a border: it must not add to the header's
     height, which the hero's negative margin has to match exactly */
  box-shadow: 0 1px 0 var(--line);
  transition: background-color .35s ease, box-shadow .35s ease;
}
.site-header .brand-top, .site-header .brand-name,
.nav-list > li > a, .theme-btn, .menu-btn, .sub-toggle { transition: color .35s ease, background-color .2s ease; }
.header-in {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: var(--header-h);
}
/* logo lockup */
.brand-logo { display: flex; align-items: center; }
.brand-logo img { height: 40px; width: auto; }
.f-logo img { height: 48px; width: auto; margin-bottom: 18px; }
:root[data-theme="dark"] .brand-logo img,
:root[data-theme="dark"] .f-logo img { filter: brightness(1.2) saturate(1.06); }
/* over the hero photo the mark needs a touch of lift */
html.js body.hero-top:not(.nav-open) .brand-logo img {
  filter: brightness(1.14) saturate(1.04) drop-shadow(0 1px 7px rgba(0, 0, 0, 0.5));
}
@media (max-width: 560px) {
  .brand-logo img { height: 33px; }
  .f-logo img { height: 42px; }
}

.brand { display: flex; flex-direction: column; line-height: 1.05; flex-shrink: 0; }
.brand-top { font-size: 10.5px; font-weight: 620; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-2); }
.brand-name { font-size: 21px; font-weight: 760; letter-spacing: -0.02em; color: var(--ink); }
.brand-name em { font-style: normal; color: var(--accent); }

/* nav */
.nav-list { display: flex; align-items: center; gap: 2px; }
.nav-list > li { position: relative; }
.nav-list > li > a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 13px; font-size: 14.5px; font-weight: 540; color: var(--ink);
  border-radius: var(--radius);
  transition: color .2s, background .2s;
}
.nav-list > li > a:hover { color: var(--accent); }
.nav-list > li > a[aria-current="page"] { color: var(--accent); font-weight: 650; }
.nav-list > li > a[aria-current="page"]::after {
  content: ""; position: absolute; left: 13px; right: 13px; bottom: 2px; height: 2px; background: var(--accent);
}
.nav-list a .ext { width: 11px; height: 11px; opacity: .55; }

.sub-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; margin-left: -8px; border-radius: 50%;
  color: var(--ink-2); transition: transform .25s, color .2s;
}
.sub-toggle svg { width: 12px; height: 12px; }
.has-sub:hover > .sub-toggle, .has-sub:focus-within > .sub-toggle { transform: rotate(180deg); color: var(--accent); }

.sub {
  position: absolute; top: calc(100% + 10px); left: 6px; min-width: 268px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 4px;
  box-shadow: var(--shadow); padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .22s, transform .22s, visibility .22s;
  z-index: 90;
}
.has-sub:hover > .sub, .has-sub:focus-within > .sub, .has-sub.open > .sub {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.sub a {
  display: block; padding: 10px 14px; font-size: 14.5px; font-weight: 500;
  color: var(--ink); border-radius: 3px; transition: background .18s, color .18s;
}
.sub a:hover { background: var(--accent-soft); color: var(--accent); }
.sub .sub-sep { height: 1px; background: var(--line); margin: 7px 6px; }
.sub .sub-label {
  display: block; padding: 8px 14px 4px; font-size: 10.5px; font-weight: 650;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2);
}

.header-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.theme-btn, .menu-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  color: var(--ink-2); transition: color .2s, background .2s;
}
.theme-btn:hover, .menu-btn:hover { color: var(--ink); background: var(--accent-soft); }
.theme-btn svg { width: 19px; height: 19px; }
.theme-btn .icon-moon { display: none; }
:root[data-theme="dark"] .theme-btn .icon-moon { display: block; }
:root[data-theme="dark"] .theme-btn .icon-sun { display: none; }

.menu-btn { display: none; }
.menu-btn svg { width: 21px; height: 21px; }
.menu-btn .icon-close { display: none; }

/* ---- Mobile nav ---- */
@media (max-width: 1100px) {
  .menu-btn { display: inline-flex; }
  /* the header's backdrop-filter would become the containing block for the
     fixed menu panel, collapsing it — drop it while the menu is open */
  body.nav-open .site-header {
    background: var(--bg);
    backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 0 0; z-index: 95;
    background: var(--bg);
    padding: 28px clamp(20px, 5vw, 48px) 48px;
    overflow-y: auto;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .28s, transform .28s, visibility .28s;
  }
  body.nav-open .site-nav { opacity: 1; visibility: visible; transform: none; }
  body.nav-open { overflow: hidden; }
  body.nav-open .menu-btn .icon-burger { display: none; }
  body.nav-open .menu-btn .icon-close { display: block; }

  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list > li { border-bottom: 1px solid var(--line); }
  .nav-list > li > a {
    padding: 18px 2px; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; width: 100%;
  }
  .nav-list > li > a[aria-current="page"]::after { display: none; }
  .has-sub { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; }
  .has-sub > a { flex: 1; }
  .sub-toggle { width: 44px; height: 44px; margin: 0; }
  .sub-toggle svg { width: 16px; height: 16px; }
  .sub {
    position: static; min-width: 0; width: 100%; border: 0; box-shadow: none; background: transparent;
    padding: 0 0 10px; transform: none;
    display: none; opacity: 1; visibility: visible;
  }
  .has-sub:hover > .sub, .has-sub:focus-within > .sub { display: none; }
  .has-sub.open > .sub { display: block; }
  .sub a { padding: 11px 14px; font-size: 16px; color: var(--ink-2); }
}

/* ==========================================================================
   Hero
   ========================================================================== */
/* Full-viewport photo hero, pinned while the content curtain scrolls over it */
.hero {
  position: sticky; top: 0; z-index: 0;
  margin-top: calc(var(--header-h) * -1);
  height: 100svh; min-height: 520px;
  display: flex; align-items: flex-end;
  overflow: hidden;
}
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 58%; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(8, 10, 7, 0.80) 0%, rgba(8, 10, 7, 0.42) 38%, rgba(8, 10, 7, 0.34) 100%);
}
.hero-in {
  position: relative; z-index: 2; width: 100%; color: #fff;
  padding-bottom: clamp(72px, 11vh, 132px);
}
.hero .kicker { color: #d9e6d4; }
.hero h1 { font-size: clamp(42px, 7vw, 92px); font-weight: 700; letter-spacing: -0.035em; color: #fff; max-width: 14ch; }
.hero p { margin-top: 22px; font-size: clamp(16px, 1.8vw, 19px); line-height: 1.6; color: rgba(255, 255, 255, 0.9); max-width: 56ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-cue {
  position: absolute; left: 50%; bottom: 26px; z-index: 2;
  transform: translateX(-50%); color: rgba(255, 255, 255, 0.7);
  animation: cue 2.6s ease-in-out infinite;
}
.hero-cue svg { width: 18px; height: 18px; }
@keyframes cue { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 6px); } }
/* sits at the curtain's top edge; drives the header colour swap */
.hero-sentinel { position: absolute; left: 0; top: 0; width: 1px; height: 1px; }
@media (max-width: 640px) { .hero-cue { display: none; } }

/* the curtain: light content that slides up over the pinned photo */
.curtain {
  position: relative; z-index: 1;
  background: var(--bg);
  box-shadow: 0 -28px 60px rgba(8, 10, 7, 0.22);
}
.site-footer { position: relative; z-index: 1; background: var(--bg); }

/* header sits transparently over the photo until the curtain reaches it */
html.js body.hero-top:not(.nav-open) .site-header {
  background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none;
  box-shadow: none;
}
html.js body.hero-top:not(.nav-open) .brand-top { color: rgba(255, 255, 255, 0.78); }
html.js body.hero-top:not(.nav-open) .brand-name,
html.js body.hero-top:not(.nav-open) .brand-name em,
html.js body.hero-top:not(.nav-open) .nav-list > li > a,
html.js body.hero-top:not(.nav-open) .theme-btn,
html.js body.hero-top:not(.nav-open) .menu-btn { color: #fff; }
html.js body.hero-top:not(.nav-open) .nav-list > li > a:hover { color: #d9e6d4; }
html.js body.hero-top:not(.nav-open) .nav-list > li > a[aria-current="page"]::after { background: #fff; }
html.js body.hero-top:not(.nav-open) .sub-toggle { color: rgba(255, 255, 255, 0.75); }
html.js body.hero-top:not(.nav-open) .theme-btn:hover,
html.js body.hero-top:not(.nav-open) .menu-btn:hover { background: rgba(255, 255, 255, 0.14); }

/* ---- Stats ---- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--line); }
.stat { padding: clamp(28px, 4vw, 48px) clamp(20px, 3vw, 40px); }
.stat + .stat { border-left: 1px solid var(--line); }
.stat b { display: block; font-size: clamp(34px, 4.6vw, 60px); font-weight: 680; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat b sup { font-size: 0.5em; color: var(--accent); font-weight: 650; }
.stat span { display: block; margin-top: 10px; font-size: 14.5px; color: var(--ink-2); }
@media (max-width: 720px) {
  .stats { grid-template-columns: 1fr; }
  .stat + .stat { border-left: 0; border-top: 1px solid var(--line); }
}

/* ==========================================================================
   News (Aktualno)
   ========================================================================== */
.news-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(32px, 5vw, 72px); }
.news-item { border-top: 1px solid var(--line); }
.news-item a {
  display: flex; align-items: baseline; gap: 18px;
  padding: 20px 2px; transition: color .2s;
}
.news-item .idx { font-size: 12.5px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.news-item .t { font-size: clamp(16.5px, 1.6vw, 19px); font-weight: 600; letter-spacing: -0.01em; flex: 1; }
.news-item svg { width: 14px; height: 14px; flex-shrink: 0; align-self: center; color: var(--ink-2); transition: transform .25s, color .25s; }
.news-item a:hover { color: var(--accent); }
.news-item a:hover svg { color: var(--accent); transform: translate(2px, -2px); }
@media (max-width: 860px) { .news-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   Event cards
   ========================================================================== */
.event-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 1060px) { .event-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 660px) { .event-grid { grid-template-columns: 1fr; } }

.event-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: 4px;
  padding: 24px 24px 20px;
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.event-card:hover { border-color: var(--ink); transform: translateY(-3px); box-shadow: var(--shadow); }
.event-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.event-date {
  font-size: 12.5px; font-weight: 680; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink); font-variant-numeric: tabular-nums;
}
.event-date b { color: var(--accent); font-weight: 680; }
.event-cat {
  font-size: 11px; font-weight: 650; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft);
  padding: 4px 10px; border-radius: 100px;
}
.event-title { font-size: 20px; font-weight: 650; letter-spacing: -0.015em; line-height: 1.25; }
.event-desc { margin-top: 8px; font-size: 14.5px; color: var(--ink-2); flex: 1; }
.event-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 14px; font-variant-numeric: tabular-nums;
}
.event-meta .time { font-weight: 600; color: var(--ink); }
.event-meta .price { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); font-weight: 550; text-align: right; }
.event-meta .price.free { color: var(--accent); font-weight: 650; }
.event-meta svg { width: 13px; height: 13px; flex-shrink: 0; }

/* month divider on raspored page */
.day-sep {
  grid-column: 1 / -1; margin-top: 18px;
  font-size: 12px; font-weight: 650; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2);
}
.day-sep:first-child { margin-top: 0; }

/* ==========================================================================
   Program cards
   ========================================================================== */
.prog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 36px); row-gap: clamp(40px, 5vw, 56px); }
@media (max-width: 1000px) { .prog-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .prog-grid { grid-template-columns: 1fr; } }

.prog-card { display: flex; flex-direction: column; }
.prog-card figure { overflow: hidden; border-radius: 4px; aspect-ratio: 4 / 3; background: var(--line); }
.prog-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2, .6, .2, 1); }
.prog-card:hover img { transform: scale(1.045); }
.prog-card .pc-kicker {
  margin-top: 18px; font-size: 11.5px; font-weight: 650; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
}
.prog-card h3 { margin-top: 8px; font-size: 21px; letter-spacing: -0.015em; display: flex; align-items: center; gap: 10px; }
.prog-card h3 svg { width: 16px; height: 16px; flex-shrink: 0; opacity: 0; transform: translateX(-6px); transition: opacity .25s, transform .25s; color: var(--accent); }
.prog-card:hover h3 svg { opacity: 1; transform: none; }
.prog-card p { margin-top: 8px; font-size: 14.5px; color: var(--ink-2); }

/* ==========================================================================
   Wide banner (Scena Ribnjak)
   ========================================================================== */
.band { position: relative; overflow: hidden; }
.band-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.band::after { content: ""; position: absolute; inset: 0; background: var(--scrim); }
.band-in { position: relative; z-index: 2; padding-block: clamp(72px, 11vw, 150px); color: #fff; max-width: 640px; }
.band .kicker { color: #d9e6d4; }
.band h2 { font-size: clamp(30px, 4.5vw, 52px); color: #fff; }
.band p { margin-top: 16px; font-size: 16.5px; color: rgba(255, 255, 255, 0.85); }
.band .btn { margin-top: 30px; }

/* ==========================================================================
   Gallery / prostori
   ========================================================================== */
.gal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2vw, 24px); }
@media (max-width: 900px) { .gal-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .gal-grid { grid-template-columns: 1fr; } }
.gal-grid figure { border-radius: 4px; overflow: hidden; }
.gal-grid figure > .imgwrap { aspect-ratio: 3 / 2; overflow: hidden; background: var(--line); }
.gal-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2, .6, .2, 1); }
.gal-grid figure:hover img { transform: scale(1.04); }
.gal-grid figcaption { padding: 10px 2px 0; font-size: 13.5px; color: var(--ink-2); }

/* ==========================================================================
   Staff
   ========================================================================== */
.staff-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 clamp(24px, 4vw, 56px); }
@media (max-width: 960px) { .staff-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .staff-grid { grid-template-columns: 1fr; } }
.staff { border-top: 1px solid var(--line); padding: 20px 0 24px; }
.staff h3 { font-size: 17px; letter-spacing: -0.01em; }
.staff .role { margin-top: 3px; font-size: 14px; color: var(--accent); font-weight: 570; }
.staff .c { margin-top: 8px; font-size: 13.5px; color: var(--ink-2); line-height: 1.7; overflow-wrap: anywhere; }
.staff .c a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ==========================================================================
   Schedule rows (programi)
   ========================================================================== */
/* age-group tabs */
.tablist {
  display: flex; flex-wrap: wrap; gap: 4px clamp(24px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
}
.tab {
  position: relative; display: flex; flex-direction: column; gap: 4px;
  padding: 4px 0 18px; text-align: left; color: var(--ink-2);
  transition: color .22s;
}
.tab .tab-label { font-size: clamp(19px, 2.3vw, 26px); font-weight: 640; letter-spacing: -0.02em; }
.tab .tab-note { font-size: 13px; font-weight: 500; letter-spacing: 0.01em; color: var(--ink-2); }
.tab::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--ink); transform: scaleX(0); transform-origin: left;
  transition: transform .3s cubic-bezier(.2, .6, .2, 1);
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); }
.tab[aria-selected="true"] .tab-note { color: var(--accent); }
.tab[aria-selected="true"]::after { transform: scaleX(1); }
.tabpanel { padding-top: 6px; }
.tabpanel[hidden] { display: none; }
html.js .tabpanel:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
html.js .panel-h { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.panel-h { font-size: clamp(22px, 2.6vw, 30px); padding: 24px 0 16px; }
html.js .tabpanel:not([hidden]) { animation: panel-in .32s cubic-bezier(.2, .6, .2, 1); }
@keyframes panel-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html.js .tabpanel:not([hidden]) { animation: none; }
  .tab::after { transition: none; }
}
@media (max-width: 560px) {
  .tablist { gap: 0 20px; }
  .tab { padding-bottom: 14px; }
  .tab .tab-note { font-size: 12px; }
}
.sched-row {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 10px clamp(20px, 3vw, 40px);
  padding: 20px 0; border-bottom: 1px solid var(--line); align-items: baseline;
}
.sched-row .name { font-size: 17px; font-weight: 640; letter-spacing: -0.01em; }
.sched-row .name small { display: block; font-size: 13.5px; font-weight: 480; color: var(--ink-2); margin-top: 3px; }
.sched-row .when { font-size: 14.5px; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.55; }
.sched-row .info { font-size: 13.5px; color: var(--ink-2); line-height: 1.55; overflow-wrap: anywhere; }
.sched-row .info b { color: var(--accent); font-weight: 640; }
.sched-row .info a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 760px) {
  .sched-row { grid-template-columns: 1fr; gap: 6px; }
}

/* ==========================================================================
   Documents
   ========================================================================== */
.doc-group { margin-bottom: clamp(40px, 6vw, 60px); }
.doc-group > h3 { font-size: clamp(20px, 2.4vw, 26px); padding-bottom: 14px; border-bottom: 2px solid var(--ink); }
.doc-list li { border-bottom: 1px solid var(--line); }
.doc-list a {
  display: flex; align-items: center; gap: 16px; padding: 15px 2px;
  transition: color .2s;
}
.doc-list a:hover { color: var(--accent); }
.doc-list .t { flex: 1; font-size: 15.5px; font-weight: 550; letter-spacing: -0.005em; }
.doc-list .ft {
  flex-shrink: 0; font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--ink-2); border: 1px solid var(--line); border-radius: 3px; padding: 3px 7px;
}
.doc-list a:hover .ft { color: var(--accent); border-color: var(--accent); }
.doc-list svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--ink-2); }
.doc-list a:hover svg { color: var(--accent); }

/* ==========================================================================
   Archive
   ========================================================================== */
.arh-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(32px, 5vw, 72px); }
@media (max-width: 860px) { .arh-grid { grid-template-columns: 1fr; } }
.arh-grid .news-item .t { font-size: 16px; }

/* ==========================================================================
   Page hero (subpages)
   ========================================================================== */
/* padding-block only — must not cancel the container's horizontal padding */
.page-head { padding-block: clamp(48px, 7vw, 96px) clamp(36px, 5vw, 64px); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(36px, 5.5vw, 68px); letter-spacing: -0.03em; max-width: 20ch; }
.page-head .lead { margin-top: 22px; }

.page-img { margin-top: clamp(36px, 5vw, 64px); }
.page-img img { width: 100%; max-height: 560px; object-fit: cover; border-radius: 4px; }

/* two-col layout for text pages */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(40px, 6vw, 96px); align-items: start; }
@media (max-width: 980px) { .split { grid-template-columns: 1fr; } }
.aside { position: sticky; top: calc(var(--header-h) + 24px); display: flex; flex-direction: column; gap: 28px; }
.aside-box { border: 1px solid var(--line); border-radius: 4px; padding: 26px; background: var(--surface); }
.aside-box h3 { font-size: 13px; font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.aside-box p { font-size: 14.5px; color: var(--ink-2); line-height: 1.7; }
.aside-box p b { color: var(--ink); font-weight: 640; }
.aside-box a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.aside-box .btn { margin-top: 14px; width: 100%; justify-content: center; }

/* contact cards */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card {
  display: flex; flex-direction: column; gap: 10px;
  border: 1px solid var(--line); border-radius: 4px; background: var(--surface);
  padding: 30px 28px;
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.contact-card:hover { border-color: var(--ink); transform: translateY(-3px); box-shadow: var(--shadow); }
.contact-card .num { font-size: 12.5px; font-weight: 650; color: var(--accent); letter-spacing: 0.1em; }
.contact-card h3 { font-size: 21px; letter-spacing: -0.015em; }
.contact-card p { font-size: 14.5px; color: var(--ink-2); flex: 1; }
.contact-card .more { margin-top: 14px; }

/* info list (javi nam se) */
.info-rows { border-top: 1px solid var(--line); }
.info-rows > div { display: grid; grid-template-columns: 220px 1fr; gap: 8px clamp(20px, 4vw, 56px); padding: 18px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 640px) { .info-rows > div { grid-template-columns: 1fr; } }
.info-rows dt { font-size: 13px; font-weight: 650; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); padding-top: 3px; }
.info-rows dd { font-size: 16.5px; font-weight: 550; }
.info-rows dd a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.info-rows dd small { display: block; font-weight: 450; font-size: 14px; color: var(--ink-2); margin-top: 2px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { border-top: 1px solid var(--line); margin-top: clamp(40px, 6vw, 80px); }
.footer-in {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: clamp(28px, 4vw, 56px);
  padding-block: clamp(48px, 7vw, 80px);
}
@media (max-width: 1000px) { .footer-in { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-in { grid-template-columns: 1fr; } }
.f-brand .brand-top { font-size: 11px; }
.f-brand .brand-name { font-size: 24px; }
.f-brand p { margin-top: 16px; font-size: 14.5px; color: var(--ink-2); max-width: 34ch; }
.site-footer h3 { font-size: 12px; font-weight: 650; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 18px; }
.f-col li { margin-bottom: 10px; }
.f-col a { font-size: 15px; font-weight: 530; transition: color .2s; }
.f-col a:hover { color: var(--accent); }
.f-col p { font-size: 15px; line-height: 1.75; color: var(--ink-2); }
.f-col p a { color: var(--ink); font-weight: 550; }
.f-col p a:hover { color: var(--accent); }
.footer-bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding-block: 22px; border-top: 1px solid var(--line);
  font-size: 13.5px; color: var(--ink-2);
}
.footer-bottom a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ==========================================================================
   Reveal animations
   ========================================================================== */
html.js .rv { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2, .6, .2, 1), transform .7s cubic-bezier(.2, .6, .2, 1); }
html.js .rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .rv { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ==========================================================================
   Archive listing + recreated posts
   ========================================================================== */
.arh-year { margin-bottom: clamp(40px, 6vw, 68px); }
.arh-year-h {
  display: flex; align-items: baseline; gap: 16px;
  font-size: clamp(24px, 3vw, 34px); padding-bottom: 14px;
  border-bottom: 2px solid var(--ink);
}
.arh-count { font-size: 13px; font-weight: 550; letter-spacing: 0.04em; color: var(--ink-2); }
.arh-list { margin-top: 4px; }
.arh-item { border-bottom: 1px solid var(--line); }
.arh-item a {
  display: grid; grid-template-columns: 150px 1fr auto auto; align-items: center;
  gap: 8px clamp(16px, 3vw, 40px); padding: 16px 2px; transition: color .2s;
}
.arh-cat {
  font-size: 11px; font-weight: 650; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); white-space: nowrap;
}
.arh-t { font-size: clamp(15.5px, 1.5vw, 17.5px); font-weight: 570; letter-spacing: -0.01em; }
.arh-date { font-size: 13.5px; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.arh-item svg { width: 14px; height: 14px; color: var(--ink-2); transition: transform .25s, color .25s; }
.arh-item a:hover { color: var(--accent); }
.arh-item a:hover .arh-t { color: var(--accent); }
.arh-item a:hover svg { color: var(--accent); transform: translate(2px, -2px); }
@media (max-width: 720px) {
  .arh-item a { grid-template-columns: 1fr auto; gap: 4px 16px; padding: 15px 2px; }
  .arh-cat { grid-row: 1; grid-column: 1; }
  .arh-date { grid-row: 1; grid-column: 2; text-align: right; }
  .arh-t { grid-row: 2; grid-column: 1 / -1; }
  .arh-item svg { display: none; }
}

/* post pages */
.post-head { display: block; }
.back-link {
  display: inline-flex; align-items: center; gap: 7px; margin-bottom: 22px;
  font-size: 14px; font-weight: 600; color: var(--ink-2); transition: color .2s, gap .2s;
}
.back-link svg { width: 14px; height: 14px; }
.back-link:hover { color: var(--accent); gap: 10px; }
.post-date { margin-top: 18px; font-size: 14.5px; font-weight: 550; color: var(--ink-2); }
.post-body { max-width: 74ch; }
.post-body h2 { font-size: clamp(23px, 2.7vw, 32px); letter-spacing: -0.02em; margin: 1.5em 0 0.5em; }
.post-body h3 { font-size: clamp(19px, 2vw, 23px); margin: 1.4em 0 0.5em; }
.post-body h4 { font-size: 17px; margin: 1.3em 0 0.4em; }
.post-body img {
  width: 100%; height: auto; border-radius: 4px; margin: 1.6em 0;
  background: var(--line);
}
.post-body figure { margin: 1.6em 0; }
.post-body figure img { margin: 0; }
.post-body figcaption { margin-top: 10px; font-size: 13.5px; color: var(--ink-2); text-align: center; }
.post-body blockquote {
  margin: 1.4em 0; padding: 6px 0 6px 22px; border-left: 2px solid var(--accent);
  font-size: 18px; color: var(--ink); font-style: normal;
}
.post-body hr { border: 0; height: 1px; background: var(--line); margin: 2em 0; }
.post-body table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 14.5px; }
.post-body th, .post-body td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.post-body th { font-weight: 640; }
