/* ==============================================================
   UTŽO ŽALEC – Design System & Global Styles
   ============================================================== */

/* ── 0. Fonts ────────────────────────────────────────────────── */
/* Self-hosted (Google Fonts, OFL), so no visitor data goes to Google.
   Variable files; latin-ext covers č, š, ž. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  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+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url('../fonts/lora-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url('../fonts/lora-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Lora';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/lora-italic-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Lora';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/lora-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── 1. Design Tokens ─────────────────────────────────────────── */
:root {
  --green:       #2D5A45;
  --green-mid:   #3A7057;
  --green-dark:  #1A3829;
  --green-l:     #E8F2EC;
  --green-xl:    #F1F8F4;

  --amber:       #C97F1A;
  --amber-l:     #FEF2D8;
  --amber-xl:    #FFFBF0;
  --amber-text:  #6E450D;  /* amber for text/icons on light backgrounds (≥ 7:1, WCAG AAA) */
  --amber-btn:   #E0A040;  /* primary button fill: 7.6:1 with --text (agreed look 2026-10-13) */
  --amber-btn-hover: #E8B05C;  /* 8.9:1 with --text */

  --cream:       #FAF8F4;
  --white:       #FFFFFF;

  --text:        #1B1B19;
  --text-soft:   #3E3930;
  --text-muted:  #5A524B;  /* ≥ 7:1 on white, cream and green-xl */
  --text-faint:  #A19890;

  --border:      #E4DDD6;
  --border-s:    #C9C1B6;
  --error:       #962819;  /* ≥ 7:1 on white and cream */
  --border-input: #857D74;  /* form field borders: ≥ 3:1 on white and cream (WCAG 1.4.11) */

  --ff-head: 'Lora', Georgia, 'Times New Roman', serif;
  --ff-body: 'Inter', system-ui, -apple-system, Arial, sans-serif;

  --header-h: 74px;

  --r-s:  6px;
  --r-m:  12px;
  --r-l:  20px;
  --r-xl: 28px;

  --sh-xs: 0 1px 3px rgba(0,0,0,.05);
  --sh-s:  0 2px 8px -2px rgba(0,0,0,.08);
  --sh-m:  0 6px 22px -6px rgba(0,0,0,.11);
  --sh-l:  0 14px 44px -12px rgba(0,0,0,.15);
  --sh-xl: 0 26px 62px -18px rgba(0,0,0,.18);

  --ease: cubic-bezier(.4, 0, .2, 1);
  --t-fast: 150ms var(--ease);
  --t-base: 250ms var(--ease);
  --t-slow: 480ms var(--ease);

  /* Focus ring colour; dark sections switch it to a light one (see §2). */
  --focus-ring: var(--green-dark);

  font-size: clamp(17px, 1.05vw + 12px, 20px);
}

/* ── 2. Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* keeps focused and anchored elements clear of the fixed header (WCAG 2.4.11) */
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--ff-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a   { text-decoration: none; color: inherit; }

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

/* On dark backgrounds the ring is light (≥ 7:1 against green). */
.page-hero,
.hero-split,
.quote-card,
.cta-section,
.site-footer,
.lightbox {
  --focus-ring: var(--amber-l);
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  left: 50%;
  top: 12px;
  width: auto;
  height: auto;
  padding: .6rem 1.2rem;
  background: var(--amber-btn);
  color: var(--text);
  font-weight: 600;
  border-radius: var(--r-m);
  transform: translateX(-50%);
  z-index: 9999;
}

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

/* ── 3. Typography ────────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  font-family: var(--ff-head);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.01em;
  margin: 0 0 1rem;
  color: var(--text);
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
h4 { font-size: 1.1rem; font-weight: 600; }

.lead {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.65;
  color: var(--text-soft);
  max-width: 68ch;
}

p { margin: 0 0 1rem; }
/* Consecutive paragraphs get extra space (WCAG 1.4.8, technique C21). */
p:has(+ p) { margin-bottom: 2em; }
p:last-child { margin-bottom: 0; }

/* ── 4. Layout ────────────────────────────────────────────────── */
.container {
  width: min(1200px, 92%);
  margin: 0 auto;
}

section {
  padding: clamp(3rem, 5vw, 5rem) 0;
  position: relative;
}

section.bg-cream { background: var(--cream); }

.cols-2 { display: grid; gap: clamp(1rem, 2.5vw, 2rem); }
@media (min-width: 700px) { .cols-2 { grid-template-columns: 1fr 1fr; } }

.cols-3 { display: grid; gap: clamp(1rem, 2.5vw, 1.8rem); }
@media (min-width: 640px) { .cols-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .cols-3 { grid-template-columns: repeat(3, 1fr); } }

/* ── 5. Header & Navigation ───────────────────────────────────── */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  z-index: 1000;
  transition: background 400ms var(--ease), backdrop-filter 400ms var(--ease),
    border-color var(--t-base), box-shadow var(--t-base);
}

.site-header.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--sh-m);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  flex-shrink: 0;
  color: var(--text);
  font-family: var(--ff-head);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: .01em;
  line-height: 1.2;
}

.brand-logo {
  width: 52px;
  height: 52px;
  min-width: 52px;
  background-image: url('../images/logo-icon.png');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  display: inline-block;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.brand-text .brand-name { font-size: 1rem; }
.brand-name abbr { text-decoration: none; }
.brand-text .brand-sub  { font-size: .68rem; font-weight: 400; color: var(--text-muted); font-family: var(--ff-body); letter-spacing: .04em; text-transform: uppercase; }

.primary-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: .2rem;
  align-items: center;
  flex-wrap: nowrap;
}

.primary-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .55rem .9rem;
  font-size: .93rem;
  font-weight: 500;
  color: var(--text-soft);
  border-radius: var(--r-m);
  white-space: nowrap;
  transition: background var(--t-fast), color var(--t-fast);
}

@media (hover: hover) {
  .primary-nav a:hover {
    background: var(--green-xl);
    color: var(--green);
  }
}

.primary-nav a[aria-current="page"] {
  background: var(--green);
  color: var(--white);
  font-weight: 600;
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: var(--green-xl);
  border: 1px solid var(--green-l);
  color: var(--green);
  width: 44px;
  height: 44px;
  border-radius: var(--r-m);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
  flex-shrink: 0;
  transition: background var(--t-fast);
}

@media (hover: hover) {
  .nav-toggle:hover { background: var(--green-l); }
}

.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--t-base), opacity var(--t-fast);
}

.hamburger { position: relative; }
.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
}
.hamburger::before { top: -6px; }
.hamburger::after  { top:  6px; }

.nav-toggle[aria-expanded="true"] .hamburger { background: transparent; }
.nav-toggle[aria-expanded="true"] .hamburger::before { transform: rotate(45deg) translate(4px, 4px); }
.nav-toggle[aria-expanded="true"] .hamburger::after  { transform: rotate(-45deg) translate(4px, -4px); }

/* The collapsed menu needs main.js (.js comes from the inline <head> script).
   Without it the header is static and the menu wraps below the brand. */
@media (max-width: 1279px) {
  .brand {
    transition: opacity 400ms var(--ease), visibility 0s;
  }

  .js .nav-toggle {
    display: flex;
    position: relative;
    z-index: 2;
  }

  .js .primary-nav {
    position: fixed;
    inset: var(--header-h) 0 auto;
    z-index: 1;
    background: var(--white);
    border-bottom: 0 solid var(--border);
    box-shadow: none;
    padding: 0;
    height: 0;
    overflow: hidden;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
  .js .primary-nav.open {
    background: var(--white);
    border-bottom-width: 0;
    box-shadow: none;
    height: calc(100vh - var(--header-h));
    height: calc(100dvh - var(--header-h));
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  body.nav-open {
    overflow: hidden;
  }

  body.nav-open .site-header {
    background: var(--white);
    backdrop-filter: blur(0);
    -webkit-backdrop-filter: blur(0);
    border-bottom-color: transparent;
    box-shadow: none;
  }

  body.nav-open .brand {
    opacity: 0;
    visibility: hidden;
    transition: opacity 400ms var(--ease), visibility 0s linear 400ms;
  }

  .js .primary-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: .2rem;
    padding: .65rem 1rem 1rem;
  }

  .js .primary-nav a {
    font-size: 1.1rem;
    padding: .8rem 1rem;
    width: 100%;
  }
}

@media (max-width: 1279px) {
  html:not(.js) .site-header {
    position: static;
    height: auto;
  }

  html:not(.js) .nav-inner {
    flex-wrap: wrap;
    padding-block: .75rem;
  }

  html:not(.js) .primary-nav ul { flex-wrap: wrap; }

  html:not(.js) main { padding-top: 0; }
}

/* ── 6. Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--amber-btn);
  color: var(--text);
  padding: .85rem 1.6rem;
  font-family: var(--ff-body);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .01em;
  border: none;
  border-radius: var(--r-l);
  cursor: pointer;
  box-shadow: 0 4px 14px -4px rgba(201,127,26,.4);
  transition: background var(--t-base), transform var(--t-base), box-shadow var(--t-base);
  white-space: nowrap;
  text-align: center;
}

@media (hover: hover) {
  .btn:hover {
    background: var(--amber-btn-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px -6px rgba(201,127,26,.45);
  }
}

.btn:active { transform: translateY(0); }

.btn.btn-green {
  background: var(--green);
  box-shadow: 0 4px 14px -4px rgba(45,90,69,.35);
  color: var(--white);
}

@media (hover: hover) {
  .btn.btn-green:hover {
    background: var(--green-dark);
    box-shadow: 0 8px 22px -6px rgba(45,90,69,.4);
  }
}

.btn.btn-ghost {
  background: transparent;
  color: var(--white);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.6);
}

@media (hover: hover) {
  .btn.btn-ghost:hover {
    background: rgba(255,255,255,.12);
    box-shadow: inset 0 0 0 2px rgba(255,255,255,.9);
  }
}

.btn.btn-outline {
  background: transparent;
  color: var(--green);
  box-shadow: inset 0 0 0 2px var(--green);
}

@media (hover: hover) {
  .btn.btn-outline:hover {
    background: var(--green-xl);
  }
}

.btn-sm {
  min-height: 44px;
  padding: .55rem 1.1rem;
  font-size: .9rem;
  border-radius: var(--r-m);
}

/* ── 7. Page main spacing ─────────────────────────────────────── */
main { padding-top: var(--header-h); }

/* ── 10. Section Headers ──────────────────────────────────────── */
.section-header {
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--amber-l);
  color: var(--amber-text);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .3rem .75rem;
  border-radius: var(--r-xl);
  margin-bottom: .75rem;
}

/* A short centred intro, e.g. above a single call to action */
.section-intro {
  max-width: 660px;
  margin-inline: auto;
  text-align: center;
}

/* The link that closes a section ("Vsi krožki", "Celoten koledar" …) */
.section-action {
  margin-top: 2rem;
  text-align: center;
}

.section-header h2 { margin-bottom: .5rem; }
.section-header .lead { margin-bottom: 0; }

/* ── 11. Cards ────────────────────────────────────────────────── */
.cards-grid {
  display: grid;
  gap: clamp(1rem, 2vw, 1.5rem);
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-l);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--sh-s);
}

.card figure {
  margin: 0;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--green-xl);
}

.card figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  padding: 1.2rem 1.3rem 1.4rem;
}

.card-tag {
  display: inline-flex;
  align-items: center;
  background: var(--green-xl);
  color: var(--green);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .25rem .65rem;
  border-radius: var(--r-xl);
  width: fit-content;
}

.card h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text);
  line-height: 1.3;
}

.card p {
  margin: 0;
  font-size: .93rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.card .club-detail-link {
  margin-top: auto;
  align-self: flex-start;
}

.card-meta {
  font-size: .82rem;
  color: var(--text-muted);
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

.card-meta strong { color: var(--text-soft); }

/* Category grouping */
.category-block {
  padding: 0 0 2rem;
}

.category-title {
  font-family: var(--ff-head);
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-weight: 700;
  color: var(--text);
  margin: 0 0 1rem;
  padding: 0 0 .6rem;
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  gap: .6rem;
}

.category-title::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 1.2em;
  background: var(--amber);
  border-radius: 2px;
}

/* /krozki hero: the school year the programme is for (as on the homepage banner) */
.page-hero-year {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.year-mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 7.5rem;
  height: 7.5rem;
  margin: 0;
  border: 2px solid var(--amber-btn);
  border-radius: 50%;
  color: var(--white);
  font-family: var(--ff-head);
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1;
  transform: rotate(-8deg);
}

@media (max-width: 699px) {
  .year-mark { display: none; }
}

/* Keep the 26/27 mark clear of the hop cone at the right edge */
@media (min-width: 700px) {
  .page-hero-year { padding-right: clamp(5rem, 16vw, 14rem); }
}

.club-detail-section { background: var(--cream); }

.club-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.club-detail-image {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: var(--white);
  box-shadow: var(--sh-m);
}

.club-detail-image img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.club-detail-content {
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: var(--white);
  box-shadow: var(--sh-s);
}

.club-detail-content h2 { margin-top: 0; }
.club-detail-content > p { line-height: 1.75; }
.club-detail-mentor {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.club-detail-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

@media (min-width: 800px) {
  .club-detail-layout { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
}

@media (max-width: 600px) {
  .club-detail-actions { flex-direction: column; align-items: flex-start; }
}


.category-block[aria-hidden="true"] {
  display: none;
}

/* ── 13. About section layout ─────────────────────────────────── */
.about-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

@media (min-width: 800px) {
  .about-grid { grid-template-columns: 1fr 1fr; }
}

.about-image {
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--sh-l);
  aspect-ratio: 4/3;
  background: var(--green-xl);
}

.about-image img { width: 100%; height: 100%; object-fit: cover; }

.quote-card + .about-image { margin-top: 1.5rem; }

.about-action { margin-top: 1.8rem; }

.about-values {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.value-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.value-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: var(--amber-l);
  color: var(--amber-text);
  border-radius: var(--r-m);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.lucide-icon {
  display: block;
  flex: 0 0 auto;
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.value-text h3 { margin: 0 0 .25rem; font-size: 1rem; font-weight: 600; }
.value-text p  { font-size: .9rem; color: var(--text-muted); margin: 0; }

.network-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  max-width: 760px;
  margin: clamp(2rem, 4vw, 3rem) auto 0;
  padding: 1.5rem 1rem 0;
  border-top: 1px solid var(--border);
}

.network-note img {
  width: min(220px, 42%);
  height: auto;
  flex: 0 1 220px;
}

.network-note p {
  max-width: 34ch;
  margin: 0;
  color: var(--text-muted);
  font-size: .88rem;
}

@media (max-width: 520px) {
  .network-note {
    flex-direction: column;
    gap: .75rem;
    text-align: center;
  }

  .network-note img {
    width: min(220px, 75%);
    flex: 0 0 auto;
    height: auto;
    object-fit: contain;
  }
}

.contact-section-heading {
  max-width: 68ch;
  margin: 0 0 clamp(1.75rem, 4vw, 3rem);
  text-align: left;
}

.contact-section-heading h2 { margin-bottom: .5rem; }
.contact-section-heading p { margin: 0; color: var(--text-muted); }

.contact-layout {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: stretch;
}

@media (min-width: 800px) {
  .contact-layout { grid-template-columns: minmax(300px, .85fr) minmax(0, 1.15fr); }
}

.contact-info {
  display: grid;
  gap: 1rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-l);
}

.contact-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.contact-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.contact-item h3 { margin: 0 0 .2rem; font: 600 .95rem var(--ff-body); }
.contact-item p { margin: 0; color: var(--text-muted); font-size: .9rem; overflow-wrap: anywhere; }
.contact-item a { color: var(--green); font-weight: 400; padding-block: 13px; } /* 44px target, no layout change */
@media (hover: hover) {
  .contact-item a:hover { text-decoration: underline; text-underline-offset: .18em; }
}

/* Bergmanova vila on /kontakt: a line drawing so visitors recognise the building */
.villa {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.villa-drawing { margin: 0; }
.villa-drawing img { display: block; width: 100%; max-width: 560px; height: auto; }

.villa-text { max-width: 60ch; }
.villa-text h2 { margin-bottom: .75rem; }
.villa-text p { color: var(--text-soft); }

@media (min-width: 800px) {
  .villa { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
}

/* Quote box */
.quote-card {
  background: var(--green);
  color: var(--white);
  border-radius: var(--r-xl);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  position: relative;
  overflow: hidden;
}

.quote-card::before {
  content: '"';
  position: absolute;
  top: -20px;
  left: 10px;
  font-family: var(--ff-head);
  font-size: 12rem;
  line-height: 1;
  color: rgba(255,255,255,.08);
  pointer-events: none;
}

.quote-card blockquote {
  margin: 0;
  font-family: var(--ff-head);
  font-style: italic;
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  line-height: 1.65;
  color: var(--white);
  position: relative;
}

.quote-card cite {
  display: block;
  margin-top: 1rem;
  font-style: normal;
  font-size: .9rem;
  font-family: var(--ff-body);
  font-weight: 500;
  color: var(--amber-l);
}

/* ── 14. Gallery ──────────────────────────────────────────────── */
.gallery-item {
  display: block;
  break-inside: avoid;
  margin-bottom: clamp(.75rem, 1.5vw, 1.2rem);
  border-radius: var(--r-l);
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.gallery-item img {
  width: 100%;
  display: block;
  transition: transform var(--t-slow), filter var(--t-base);
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(20,48,33,0);
  transition: background var(--t-base);
}

@media (hover: hover) {
  .gallery-item:hover img { transform: scale(1.04); }
}
@media (hover: hover) {
  .gallery-item:hover::after { background: rgba(20,48,33,.18); }
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(20,48,33,.75), transparent);
  color: white;
  padding: 1.5rem 1rem .9rem;
  font-size: .85rem;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--t-base), transform var(--t-base);
  z-index: 1;
}

@media (hover: hover) {
  .gallery-item:hover .gallery-caption {
    opacity: 1;
    transform: translateY(0);
  }
}

.home-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: clamp(115px, 14vw, 190px);
  gap: clamp(.65rem, 1.5vw, 1.1rem);
  margin-bottom: 2rem;
}

.home-gallery .gallery-item {
  min-width: 0;
  height: 100%;
  margin: 0;
  border-radius: var(--r-m);
  background: var(--green-dark);
}

.home-gallery .gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-gallery .home-gallery-featured {
  grid-column: span 2;
  grid-row: span 2;
}

.home-gallery .home-gallery-wide { grid-column: span 2; }

.home-gallery .gallery-caption {
  opacity: 1;
  transform: none;
  background: linear-gradient(to top, rgba(20,48,33,.8), rgba(20,48,33,0) 100%);
  padding: 2.25rem 1rem .8rem;
}

@media (hover: hover) {
  .home-gallery .gallery-item:hover img { filter: brightness(.88); }
}
@media (hover: hover) {
  .home-gallery .gallery-item:hover::after { background: transparent; }
}

.gallery-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.gallery-heading h2 { margin-bottom: .55rem; }
.gallery-heading .lead { margin: 0; }

.gallery-count {
  flex: 0 0 auto;
  margin-bottom: .25rem;
  padding: .45rem .8rem;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: rgba(255,255,255,.75);
  color: var(--text-muted);
  font-size: .78rem;
  font-weight: 600;
}

.gallery-page-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: clamp(130px, 16vw, 210px);
  gap: clamp(.7rem, 1.5vw, 1.15rem);
}

.gallery-page-grid .gallery-item {
  min-width: 0;
  height: 100%;
  margin: 0;
  border: 1px solid rgba(27,27,25,.06);
  border-radius: var(--r-m);
  background: var(--green-dark);
  box-shadow: var(--sh-s);
}

.gallery-page-grid .gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-page-grid .gallery-page-featured {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-page-grid .gallery-page-wide { grid-column: span 2; }

.gallery-page-grid .gallery-caption {
  opacity: 1;
  transform: none;
  background: linear-gradient(to top, rgba(20,48,33,.82), rgba(20,48,33,0) 100%);
  padding: 2.5rem 1rem .85rem;
}

@media (hover: hover) {
  .gallery-page-grid .gallery-item:hover img { filter: brightness(.88); }
}
@media (hover: hover) {
  .gallery-page-grid .gallery-item:hover::after { background: transparent; }
}

@media (max-width: 900px) {
  .gallery-page-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gallery-page-grid .gallery-page-featured { grid-row: span 2; }
}

@media (max-width: 600px) {
  .gallery-heading { align-items: flex-start; }
  .gallery-count { display: none; }
  .gallery-page-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: clamp(135px, 39vw, 200px); }
  .gallery-page-grid .gallery-page-featured { grid-column: span 2; grid-row: span 1; }
  .gallery-page-grid .gallery-page-wide { grid-column: span 2; }
  .gallery-page-grid .gallery-caption { font-size: .76rem; padding: 2.1rem .75rem .7rem; }
}

@media (max-width: 760px) {
  .home-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-gallery .home-gallery-featured { grid-column: span 2; }
}

@media (max-width: 520px) {
  .home-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: clamp(125px, 38vw, 190px); }
  .home-gallery .home-gallery-featured { grid-column: span 2; grid-row: span 1; }
  .home-gallery .gallery-caption { font-size: .75rem; padding: 2rem .7rem .65rem; }
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10,20,14,.94);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  /* visibility switches after the fade, so the closed dialog is not focusable */
  transition: opacity var(--t-base), visibility 0s linear 250ms;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity var(--t-base), visibility 0s;
}

.lightbox-img {
  max-width: 92vw;
  max-height: 90dvh;
  border-radius: var(--r-l);
  box-shadow: var(--sh-xl);
  object-fit: contain;
  transform: scale(.95);
  transition: transform var(--t-slow);
}

.lightbox.open .lightbox-img { transform: scale(1); }

.lightbox-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  color: white;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast);
}

@media (hover: hover) {
  .lightbox-close:hover { background: rgba(255,255,255,.28); }
}

.lightbox-caption {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.8);
  font-size: .9rem;
  text-align: center;
  max-width: 60ch;
}

/* ── 15. Calendar ─────────────────────────────────────────────── */
/* Events: list (server-rendered), month view and homepage list */
.calendar-toolbar {
  display: inline-flex;
  gap: .25rem;
  padding: .25rem;
  margin-bottom: 2rem;
  border: 1px solid var(--border-input);
  border-radius: var(--r-m);
  background: var(--white);
}

html:not(.js) .calendar-toolbar { display: none; }

.calendar-view-button {
  min-height: 44px;
  padding: .5rem 1.1rem;
  border: 0;
  border-radius: calc(var(--r-m) - 3px);
  background: transparent;
  color: var(--green);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.calendar-view-button[aria-pressed="true"] {
  background: var(--green);
  color: var(--white);
}

@media (hover: hover) {
  .calendar-view-button[aria-pressed="false"]:hover { background: var(--green-xl); }
}

.calendar-month-group + .calendar-month-group { margin-top: 2.5rem; }
.calendar-month-group h2 { font-size: clamp(1.3rem, 2.4vw, 1.6rem); }

.event-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.event-item {
  display: grid;
  grid-template-columns: 4.25rem minmax(0, 1fr);
  gap: 1.1rem;
  padding: 1.1rem 1.25rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-l);
  box-shadow: var(--sh-xs);
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.event-item:target { border-color: var(--green); box-shadow: 0 0 0 2px var(--green); }

.event-date {
  display: grid;
  place-content: center;
  text-align: center;
  height: 4.25rem;
  border-radius: var(--r-m);
  background: var(--green-xl);
  color: var(--green-dark);
}

.event-day { font-family: var(--ff-head); font-size: 1.5rem; font-weight: 700; line-height: 1; }
.event-weekday { margin-top: .2rem; font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }

.event-title { margin: 0 0 .35rem; font-size: clamp(1.1rem, 2vw, 1.25rem); }
.event-title a { color: var(--green); text-decoration: underline; text-underline-offset: .15em; }
.event-meta { margin: 0 0 .2rem; color: var(--text-soft); }

.event-details { margin-top: .5rem; }
.event-details summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--green);
  font-weight: 600;
  cursor: pointer;
}
.event-details p { margin: .25rem 0 .75rem; color: var(--text-soft); }
.event-details a { color: var(--green); text-decoration: underline; }

.calendar-empty,
.upcoming-events-note { color: var(--text-soft); }
.calendar-empty a { color: var(--green); text-decoration: underline; }
.calendar-stale { margin-top: 1.5rem; }
.calendar-unavailable a { color: var(--green); text-decoration: underline; white-space: nowrap; }

.upcoming-events { max-width: 760px; margin: 0 auto 2rem; }

/* Month view */
.month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.month-title { margin: 0; font-size: clamp(1.3rem, 2.4vw, 1.6rem); text-align: center; }
.month-step[disabled] { opacity: .45; cursor: default; }

.month-grid {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  background: var(--white);
}

.month-grid th {
  padding: .5rem 0;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.month-grid td {
  height: 6.5rem;
  padding: 0;
  vertical-align: top;
  border: 1px solid var(--border);
}

.month-grid td.is-outside { background: var(--cream); }

.month-grid .day-number {
  display: block;
  padding: .45rem .55rem 0;
  font-weight: 600;
  color: var(--text-soft);
}

.month-grid td.is-today { background: var(--amber-xl); }
.month-grid td.is-today .day-number { color: var(--text); }

.day-button {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  height: 100%;
  min-height: 44px;
  padding: 0 0 .4rem;
  border: 0;
  background: var(--green-xl);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.day-button .day-number { color: var(--green-dark); }
.day-button[aria-pressed="true"] { background: var(--green); }
.day-button[aria-pressed="true"] .day-number,
.day-button[aria-pressed="true"] .day-event { color: var(--white); }
.day-button:focus-visible { outline-offset: -3px; }

@media (hover: hover) {
  .day-button[aria-pressed="false"]:hover { background: var(--green-l); }
}

.day-events { display: grid; gap: .2rem; padding: .3rem .4rem 0; min-width: 0; }
.day-event {
  overflow: hidden;
  font-size: .78rem;
  line-height: 1.3;
  color: var(--green-dark);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.day-detail { margin-top: 1.5rem; }
.day-detail:empty { display: none; }
.day-detail-title { font-size: clamp(1.15rem, 2vw, 1.35rem); }

@media (max-width: 700px) {
  /* Every day cell has the same size; the event dot does not add height. */
  .month-grid td { height: 3.5rem; }
  .month-grid th { font-size: .75rem; letter-spacing: 0; }
  .month-grid .day-number { padding: .55rem 0 0; text-align: center; }
  .day-button { position: relative; align-items: center; padding: 0; }
  .day-events { display: none; }
  /* a dot marks days with events */
  .day-button::after {
    content: '';
    position: absolute;
    bottom: .45rem;
    left: 50%;
    width: 6px;
    height: 6px;
    margin-left: -3px;
    border-radius: 50%;
    background: var(--green);
  }
  .day-button[aria-pressed="true"]::after { background: var(--white); }
  .month-step { padding-inline: .7rem; }
}

/* Below 340px seven columns would drop under 44px; the grid uses part of the side gutter. */
@media (max-width: 339px) {
  .month-grid-wrap { margin-inline: -8px; }
}

@media (max-width: 480px) {
  .month-step { min-width: 44px; justify-content: center; }
  .month-step-label { display: none; }
}

@media (max-width: 480px) {
  .event-item { grid-template-columns: 3.5rem minmax(0, 1fr); gap: .85rem; padding: 1rem; }
  .event-date { height: 3.5rem; }
  .event-day { font-size: 1.25rem; }
}

/* ── 16. Forms ────────────────────────────────────────────────── */
form { display: grid; gap: 1.1rem; }

fieldset {
  border: 1px solid var(--border);
  border-radius: var(--r-l);
  padding: 1.2rem 1.4rem;
  margin: 0;
}

legend {
  font-weight: 600;
  font-size: 1rem;
  padding: 0 .5rem;
  color: var(--text);
}

label {
  font-weight: 500;
  font-size: .94rem;
  color: var(--text-soft);
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

input[type=text],
input[type=email],
input[type=date],
input[type=tel],
input[type=search],
textarea,
select {
  background: var(--white);
  border: 1.5px solid var(--border-input);
  border-radius: var(--r-m);
  padding: .8rem 1rem;
  font-size: 1rem;
  font-family: var(--ff-body);
  color: var(--text);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  -webkit-appearance: none;
  appearance: none;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath fill='%23706860' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  border-color: var(--green);
  outline-offset: 2px;
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(192,57,43,.15);
}

textarea { min-height: 150px; resize: vertical; }

.form-row { display: grid; gap: 1rem; }
@media (min-width: 600px) { .form-row.cols-2 { grid-template-columns: 1fr 1fr; } }

.form-note { font-size: .8rem; color: var(--text-muted); margin: .25rem 0 0; }
.form-note.fieldset-note { margin: 0 0 .8rem; }
.form-note.fieldset-subhead { margin: .9rem 0 .8rem; }

.btn-submit {
  width: 100%;
  justify-content: center;
  margin-top: .5rem;
}

.field-hint { display: block; margin-top: .3rem; font-size: .85rem; font-weight: 400; color: var(--text-muted); }
.field-error { color: var(--error); font-size: .85rem; display: none; margin-top: .25rem; }
.field-error.show { display: block; }

.success-message {
  background: #E8F6ED;
  color: #1A5C35;
  border: 1px solid #A8D8BC;
  border-radius: var(--r-m);
  padding: 1rem 1.2rem;
  display: none;
  font-size: .95rem;
}

.success-message.show { display: block; }
.success-message.error {
  background: #FDEDEC;
  color: #922B21;
  border-color: #E6B0AA;
}

.form-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
}

.membership-layout {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

@media (min-width: 1000px) {
  .membership-layout {
    grid-template-columns: minmax(0, 1.65fr) minmax(300px, .85fr);
  }
}

.membership-layout > * { min-width: 0; }

.membership-form {
  min-width: 0;
  padding: clamp(1.2rem, 2.8vw, 2rem);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-m);
}

.membership-form > *,
.membership-form .form-row > *,
.membership-form fieldset { min-width: 0; }

@media (min-width: 600px) {
  .membership-form .form-row.cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.membership-form .section-header { margin-bottom: 1.5rem; }
.membership-form .field-label { display: block; }
.membership-form .required-mark { color: var(--amber-text); font-weight: 700; }
.membership-form fieldset { background: var(--cream); }
.membership-form legend { padding: 0 .55rem; }
.membership-form > .btn { min-height: 3.2rem; font-size: 1rem; }

.membership-form input[type="text"],
.membership-form input[type="email"],
.membership-form input[type="date"],
.membership-form input[type="tel"],
.membership-form input[type="search"],
.membership-form select,
.membership-form textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

/* Consent checkbox */
label.consent {
  flex-direction: row !important;
  align-items: flex-start;
  gap: .7rem;
  font-weight: 400;
}

label.consent input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  margin-top: .15rem;
  accent-color: var(--green);
  cursor: pointer;
}

.membership-events-option {
  padding: .9rem 1rem;
  border: 1px solid var(--green-l);
  border-radius: var(--r-m);
  background: var(--white);
  cursor: pointer;
}

.membership-events-option > span {
  display: grid;
  gap: .2rem;
}

.membership-events-option strong { color: var(--green); }
.membership-events-help { color: var(--text-muted); font-size: .88rem; line-height: 1.5; }

/* Krožki checklist */
.krozki-picker {
  display: grid;
  gap: .55rem;
}

.krozki-search { margin-bottom: .5rem; }
.krozki-selection-count { margin: 0; font-weight: 600; }
.krozki-selected {
  margin: 0;
  color: var(--green);
  overflow-wrap: anywhere;
}

.krozki-category {
  border: 1px solid var(--border);
  border-radius: var(--r-m);
  background: var(--white);
  overflow: hidden;
}

.krozki-category[hidden],
.krozki-list label[hidden],
.card[hidden] { display: none; }

.krozki-category-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .75rem .9rem;
  border: 0;
  background: transparent;
  color: var(--green);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.krozki-category-toggle::after { content: '+'; font-size: 1.2rem; line-height: 1; }
.krozki-category.open .krozki-category-toggle::after { content: '−'; }
.krozki-category-toggle:focus-visible { outline-offset: -4px; }
.krozki-category-count { margin-left: auto; color: var(--text-muted); font-size: .85rem; font-weight: 500; }

.krozki-category-options {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 280ms var(--ease);
}

.krozki-category.open .krozki-category-options { grid-template-rows: 1fr; }

.krozki-list {
  display: grid;
  gap: .5rem;
  padding: 0;
  min-height: 0;
  overflow: hidden;
}

.krozki-list label {
  min-height: 44px;
  margin-inline: .7rem;
  flex-direction: row;
  align-items: center;
  gap: .6rem;
  font-weight: 400;
  font-size: .9rem;
  padding: .5rem .7rem;
  border: 1px solid var(--border);
  border-radius: var(--r-m);
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast);
}

.krozki-list label:last-child { margin-bottom: .7rem; }

@media (hover: hover) {
  .krozki-list label:hover { background: var(--green-xl); border-color: var(--green-l); }
}

.krozki-list input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  accent-color: var(--green);
  cursor: pointer;
}

.krozki-no-results { margin: .25rem 0 0; }

@media (prefers-reduced-motion: reduce) {
  .krozki-category-options { transition: none; }
}

/* Without JS the membership form cannot send (CSRF token comes from main.js),
   so the contact fallback replaces it. */
.form-fallback { display: none; }
.form-fallback h2 { font-size: clamp(1.3rem, 2.4vw, 1.6rem); }
.form-fallback a { color: var(--green); font-weight: 600; text-decoration: underline; white-space: nowrap; }
html:not(.js) .form-fallback { display: block; }
html:not(.js) .membership-form { display: none; }

::placeholder { color: var(--text-muted); opacity: 1; }

/* Filter bar */
.filter-bar {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1.5rem;
}

.filter-bar input {
  background: var(--white);
  border: 1.5px solid var(--border-input);
  border-radius: var(--r-m);
  padding: .6rem .9rem;
  font-size: .95rem;
  line-height: 1.6;
  color: var(--text);
}

.filter-bar input { flex: 1 1 260px; min-width: 200px; }

.filter-bar .filter-clear {
  height: calc(1.6em + 1.2rem + 3px);
  padding-block: 0;
  font-size: .95rem;
  line-height: 1.6;
}

@media (max-width: 600px) {
  .filter-bar { flex-wrap: nowrap; }
  .filter-bar input { flex: 1 1 0; min-width: 0; }
  .filter-bar .filter-clear { flex: 0 0 auto; padding-inline: .7rem; }
}

.category-overview {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-bottom: 1.5rem;
}

.category-overview-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: .55rem;
  padding: .45rem .75rem;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: var(--white);
  color: var(--green);
  cursor: pointer;
  font: inherit;
  font-size: .9rem;
  font-weight: 600;
  transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}

.category-overview-link::before {
  content: '';
  display: inline-grid;
  width: 1rem;
  height: 1rem;
  place-items: center;
  font-size: .8rem;
  line-height: 1;
}

.category-overview-link.is-active::before {
  content: '✓';
}

@media (hover: hover) {
  .category-overview-link:hover {
    background: var(--green-xl);
    border-color: var(--green-l);
    transform: translateY(-1px);
  }
}

.category-overview-link.is-active {
  border-color: var(--green);
  background: var(--green);
  color: var(--white);
}

@media (hover: hover) {
  .category-overview-link.is-active:hover {
    border-color: var(--green-mid);
    background: var(--green-mid);
  }
}

.category-overview-link:focus-visible {
  outline-offset: 2px;
}

.category-overview-count {
  display: inline-grid;
  min-width: 1.35rem;
  height: 1.35rem;
  place-items: center;
  padding: 0 .25rem;
  border-radius: 50%;
  background: var(--green-xl);
  color: var(--green-dark);
  font-size: .75rem;
  line-height: 1;
}

.category-overview-link.is-active .category-overview-count {
  background: var(--green-dark);
  color: var(--white);
}

/* Buttons keep one line where there is room, but may wrap on narrow screens
   (long labels, enlarged text spacing). */
@media (max-width: 480px) {
  .btn { white-space: normal; max-width: 100%; }
}

@media (max-width: 600px) {
  .category-overview {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-overview-link {
    width: 100%;
    min-width: 0;
    justify-content: space-between;
    gap: .3rem;
    padding-inline: .5rem;
    font-size: .82rem;
  }

  .category-overview-link::before {
    width: .9rem;
    flex: 0 0 .9rem;
  }

  /* Labels may wrap so enlarged text spacing never overflows (WCAG 1.4.12). */
  .category-overview-link > span:first-child {
    min-width: 0;
    text-align: left;
  }
}

/* ── 17. Map ──────────────────────────────────────────────────── */
.map-wrap {
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--sh-l);
  aspect-ratio: 16/9;
  border: 1px solid var(--border);
}

.map-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }

.contact-map {
  width: 100%;
  min-width: 0;
  height: 340px;
  min-height: 0;
  aspect-ratio: auto;
  background: var(--cream);
}

.mobile-map-link {
  display: none;
}

@media (max-width: 600px) {
  .contact-map {
    height: auto;
    min-height: 0;
    padding: 1.5rem;
    display: grid;
    place-items: center;
    text-align: center;
  }

  .contact-map iframe {
    display: none;
  }

  .mobile-map-link {
    display: block;
  }

  .mobile-map-link p {
    margin: 0 0 1rem;
    color: var(--text-muted);
    font-size: .92rem;
  }
}

@media (min-width: 800px) {
  .contact-map { height: 100%; min-height: 500px; aspect-ratio: auto; }
}

/* Click-to-load placeholder for Google Maps / Calendar */
.embed-consent {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1rem;
  height: 100%;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: var(--cream);
  text-align: center;
}

.embed-consent p {
  max-width: 46ch;
  margin: 0;
  color: var(--text-soft);
}

.embed-consent .embed-consent-note {
  font-size: .85rem;
  color: var(--text-muted);
}

.embed-consent-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .75rem;
}

/* The load button needs main.js; without it only the link to Google remains. */
html:not(.js) [data-embed-load] { display: none; }

@media (max-width: 600px) {
  .contact-map .embed-consent { display: none; }
}

/* ── 18. Page Hero (inner pages) ──────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 100%);
  color: var(--white);
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(2.5rem, 5vw, 4rem);
  position: relative;
  overflow: hidden;
}

/* A hop cone (Žalec, the hop-growing Savinjska valley) as a faint watermark */
.page-hero::after {
  content: '';
  position: absolute;
  top: -12%;
  right: max(-4rem, calc((100vw - 1200px) / 2 - 6rem));
  width: clamp(9rem, 30vw, 22rem);
  aspect-ratio: 3 / 4;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 64' fill='none' stroke='%23fff' stroke-width='.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M24 1v9'/%3E%3Cpath d='M24 10c-4 2-6 5-6 8 3 1 5 0 6-2 1 2 3 3 6 2 0-3-2-6-6-8z'/%3E%3Cpath d='M18 18c-3 2-5 5-5 9 3 1 6 0 8-2M30 18c3 2 5 5 5 9-3 1-6 0-8-2M21 25c1 2 2 3 3 3s2-1 3-3c-1-3-2-5-3-6-1 1-2 3-3 6zM13 27c-2 3-3 6-2 10 3 1 7 0 9-3M35 27c2 3 3 6 2 10-3 1-7 0-9-3M20 34c1 3 2 4 4 4s3-1 4-4c-1-3-2-6-4-7-2 1-3 4-4 7zM11 37c0 4 2 8 5 11 3-1 6-3 7-6M37 37c0 4-2 8-5 11-3-1-6-3-7-6M16 48c2 4 5 7 8 9 3-2 6-5 8-9'/%3E%3C/svg%3E") no-repeat center / contain;
  opacity: .12;
  transform: rotate(14deg);
  pointer-events: none;
}

.page-hero > .container { position: relative; z-index: 1; }

.page-hero h1 {
  color: var(--white);
  margin-bottom: .6rem;
}

.page-hero .lead {
  color: rgba(255,255,255,.95);
  margin-bottom: 0;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
  color: rgba(255,255,255,.95);
  /* the 44px link targets overlap the space around the row instead of growing it */
  margin: -11px 0 calc(1rem - 11px);
}

.breadcrumb a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; color: var(--white); text-decoration: underline; text-underline-offset: .15em; }
@media (hover: hover) {
  .breadcrumb a:hover { text-decoration-thickness: 2px; }
}
.breadcrumb span { color: rgba(255,255,255,.95); }

/* ── 19. Footer ───────────────────────────────────────────────── */
.site-footer {
  background: var(--green-dark);
  color: rgba(255,255,255,.75);
  padding: clamp(3rem, 5vw, 4.5rem) 0 0;
  margin-top: clamp(3rem, 6vw, 5rem);
}

/* A cream last section meets the footer directly, without a white strip */
main:has(> section.bg-cream:last-child) + .site-footer { margin-top: 0; }

.footer-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
  padding-bottom: 2.5rem;
}

@media (min-width: 600px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

.footer-brand .brand-logo-ft {
  width: 56px;
  height: 56px;
  background-image: url('../images/logo-icon.png');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  display: inline-block;
  margin-bottom: .8rem;
}

.footer-brand p {
  font-size: .9rem;
  line-height: 1.6;
  max-width: 34ch;
  color: rgba(255,255,255,.8);
  margin: 0 0 1.2rem;
}

.footer-social {
  display: flex;
  gap: .6rem;
}

.footer-social a {
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--r-m);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.8);
  font-size: .9rem;
  transition: background var(--t-fast), color var(--t-fast);
}

@media (hover: hover) {
  .footer-social a:hover {
    background: var(--amber-btn);
    color: var(--text);
    border-color: var(--amber-btn);
  }
}

.site-footer h2 {
  font-weight: 600;
  color: var(--white);
  font-size: .88rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 0 0 1rem;
  font-family: var(--ff-body);
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .5rem;
}

/* Footer links are 44px tall targets (WCAG 2.5.5); the list gap shrinks so
   the rhythm stays close to the plain-text lines. */
.site-footer ul:has(a) { gap: 0; }
.footer-bar-links { display: flex; flex-wrap: wrap; column-gap: 1.25rem; }
.form-note a,
.embed-consent-note a { color: var(--green); text-decoration: underline; }

.site-footer li > a,
.footer-bar a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }

.site-footer ul li { font-size: .9rem; }

.site-footer a {
  color: rgba(255,255,255,.8);
  transition: color var(--t-fast);
}

@media (hover: hover) {
  .site-footer a:hover { color: var(--white); }
}

.footer-bar {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 1.4rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
  justify-content: space-between;
  font-size: .78rem;
  color: rgba(255,255,255,.7);
}

.site-footer ul li.footer-hours {
  font-size: .82rem;
  color: rgba(255,255,255,.7);
}

/* Legal / long-form text pages */
/* ≤ 80 characters per line (WCAG 1.4.8); tables may use more width */
.legal-text > :not(.table-scroll) { max-width: 56ch; }
.legal-text > .table-scroll { max-width: 60rem; }
.legal-text h2 { font-size: clamp(1.3rem, 2.4vw, 1.6rem); margin-top: 2.4rem; }
.legal-text ul { padding-left: 1.3rem; margin: 0 0 1rem; display: grid; gap: .4rem; }
.legal-text a { color: var(--green); text-decoration: underline; }
.legal-text code { font-size: .9em; }
.legal-action { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; }

/* Tables in legal text scroll sideways on narrow screens instead of squeezing */
.table-scroll { position: relative; overflow-x: auto; margin: 1rem 0 1.5rem; border: 1px solid var(--border); border-radius: var(--r-m); }
.legal-table { width: 100%; min-width: 36rem; border-collapse: collapse; font-size: .92rem; }
.legal-table th,
.legal-table td { padding: .7rem .8rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.legal-table thead th { background: var(--cream); font-family: var(--ff-body); font-weight: 600; }
.legal-table tbody th { font-weight: 600; }
.legal-table tr:last-child > * { border-bottom: 0; }
.legal-table code { overflow-wrap: anywhere; }

/* Draft markers: only on pages that are not published yet */
.draft-notice {
  padding: 1rem 1.2rem;
  border: 2px dashed var(--amber);
  border-radius: var(--r-m);
  background: var(--amber-xl);
  color: var(--text-soft);
}
.draft-fill { background: var(--amber-l); color: var(--text); padding: 0 .2em; border-radius: 3px; }

/* ── 21. Loading / Misc ───────────────────────────────────────── */
.loading {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-size: 1rem;
}

.loading::after {
  content: '';
  display: block;
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--green);
  border-radius: 50%;
  margin: 1rem auto 0;
  animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Gradient card */
.gradient-box {
  background: linear-gradient(135deg, var(--white), var(--amber-xl));
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: clamp(1.4rem, 2.5vw, 2.2rem);
  box-shadow: var(--sh-m);
  position: relative;
  overflow: hidden;
}

.gradient-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 10%, rgba(201,127,26,.12), transparent 60%);
  pointer-events: none;
}

/* Values on /o-nas: plain text under a short green rule, no boxes or icons */
.value-box {
  padding-top: 1rem;
  border-top: 3px solid var(--green);
}
.value-box h3 { margin: 0 0 .5rem; }
.value-box p { color: var(--text-soft); margin: 0; }

/* Sidebar boxes on /pristopna-izjava */
.side-box { margin-bottom: 1.5rem; }
.side-box h3 { margin-top: 0; }
.side-box p { font-size: .9rem; color: var(--text-muted); }
.side-box .btn { margin-top: .5rem; }

.steps-list {
  display: grid;
  gap: .6rem;
  margin: 0;
  padding-left: 1.3rem;
  font-size: .93rem;
  line-height: 1.55;
  color: var(--text-soft);
}

/* CTA section */
.cta-section {
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  color: var(--white);
  text-align: center;
  padding: clamp(4rem, 8vw, 7rem) 0;
}

.cta-inner { max-width: 58ch; margin-inline: auto; }
.cta-section h2 { color: var(--white); font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
.cta-section .lead { color: rgba(255,255,255,.95); margin: 0 auto 2rem; }
.cta-section .btn-group { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Consent text */
.consent-text {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--r-l);
  padding: 1.2rem 1.4rem;
  font-size: .85rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.consent-text h3 { font-size: .95rem; color: var(--text-soft); margin: 0 0 .75rem; }
.consent-text p  { margin: 0 0 .5rem; }
.consent-text ul { margin: 0 0 .75rem; padding-left: 1.1rem; display: grid; gap: .4rem; }
.consent-text p:last-child { margin: 0; }

/* ── 22. Print ────────────────────────────────────────────────── */
@media print {
  .site-header,
  .nav-toggle,
  .site-footer,
  .btn { display: none !important; }

  body { background: #fff; color: #000; }
  a    { color: #000; }
  .page-hero { background: none; color: #000; }
  .page-hero h1 { color: #000; }
  .page-hero::after { display: none; }
}

/* ── Split Hero (homepage) ────────────────────────────────────── */
.hero-split {
  display: grid;
  grid-template-rows: auto auto;   /* mobile: image auto, text auto */
  background: var(--green-dark);
  padding: 0 !important;  /* override default section padding */
}

/* Text side */
.hero-split-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 4vw, 4.5rem) clamp(1.5rem, 5vw, 5rem);
  background: var(--green-dark);
  position: relative;
  z-index: 1;
  overflow: hidden;
}

/* Main heading */
.hero-split-title {
  font-family: var(--ff-head);
  font-size: clamp(2rem, 3.6vw, 3.3rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.02em;
  color: var(--white);
  margin: 0 0 1rem;
}

/* Description */
.hero-split-desc {
  font-size: clamp(.9rem, 1.3vw, 1.08rem);
  line-height: 1.65;
  color: rgba(255,255,255,.72);
  max-width: 46ch;
  margin: 0 0 1.8rem;
}

/* CTA buttons */
.page-hero .hero-split-btns { margin-top: 1.5rem; }

.hero-split-btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* Photo side */
.hero-split-image {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: clamp(1rem, 3vw, 2.5rem);
  background: var(--green-dark);
}

.hero-split-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--r-m);
  box-shadow: var(--sh-m);
}

/* ── Enrollment announcement ─────────────────────────────────── */
.enrollment-banner {
  padding: clamp(1.25rem, 2.5vw, 2rem) 0;
  background: var(--amber-xl);
  border-bottom: 1px solid var(--amber-l);
}

.enrollment-banner-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
}

.enrollment-banner-mark {
  display: grid;
  place-items: center;
  width: clamp(4.25rem, 8vw, 5.5rem);
  height: clamp(4.25rem, 8vw, 5.5rem);
  border: 2px solid var(--amber);
  border-radius: 50%;
  color: var(--green-dark);
  font-family: var(--ff-head);
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 700;
  line-height: 1;
  transform: rotate(-8deg);
}

.enrollment-banner-copy .section-tag {
  color: var(--amber-text);
  margin-bottom: .35rem;
}

.enrollment-banner-copy h2 {
  margin-bottom: .35rem;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
}

.enrollment-banner-copy p {
  max-width: 62ch;
  margin: 0;
  color: var(--text-soft);
  font-size: .95rem;
}

.enrollment-banner-action {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.enrollment-banner-btn {
  background: transparent;
  color: var(--green-dark);
  box-shadow: inset 0 0 0 2px var(--green), var(--sh-s);
}

@media (hover: hover) {
  .enrollment-banner-btn:hover {
    background: var(--green);
    color: var(--white);
    box-shadow: 0 8px 22px -6px rgba(45,90,69,.4);
  }
}

.enrollment-banner-btn span {
  display: inline-block;
  margin-left: .25rem;
  transition: transform var(--t-fast);
}

@media (hover: hover) {
  .enrollment-banner-btn:hover span {
    transform: translateX(3px);
  }
}

@media (max-width: 859px) {
  .hero-split-image { padding: 0 clamp(1.5rem, 5vw, 5rem) 2rem; }
}

@media (min-width: 860px) {
  .hero-split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto;
  }

  .hero-split-image {
    padding-right: clamp(1.5rem, 5vw, 5rem);
  }
}

/* ── 23. Responsive Tweaks ────────────────────────────────────── */
@media (max-width: 600px) {
  .enrollment-banner-inner {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1rem;
  }
  .enrollment-banner-action {
    grid-column: 1 / -1;
    justify-content: flex-start;
    padding-left: calc(clamp(4.25rem, 8vw, 5.5rem) + 1rem);
  }
}

@media (max-width: 600px) {
  .brand-text .brand-sub { display: none; }
}
/* ── 24. Reduced motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
}
