/* Innviertel — public design system.
   Palette is the Founder-approved binding source of truth (BRAND-0001). Light + dark themes,
   tuned for WCAG 2.2 AA. "Brain" wording never appears in the public product. */

:root {
  /* approved brand palette */
  --brand-forest: #163F35;   /* Braunau / primary */
  --brand-teal:   #4D7C73;   /* Ried */
  --brand-amber:  #D79A2B;   /* Schärding / calls to action */
  --brand-cream:  #F6F1E7;   /* warm background */
  --brand-charcoal:#202624;  /* primary text */
  --support-sage: #A7B59F;
  --support-blue: #BFD6D3;
  --support-mist: #E6EAE7;
  --support-slate:#6B7371;
  --support-navy: #0E1A24;

  /* semantic tokens (light) */
  --bg:           var(--brand-cream);
  --surface:      #ffffff;
  --surface-2:    #FBF8F1;
  --text:         var(--brand-charcoal);
  --text-muted:   #545B58;               /* darkened slate → AA on cream/white */
  --line:         #E2DCCF;
  --brand:        var(--brand-forest);
  --brand-contrast:#F6F1E7;
  --accent:       var(--brand-amber);
  --accent-text:  var(--brand-charcoal); /* charcoal on amber ≈ 6.7:1 */
  --link:         var(--brand-forest);
  --focus:        #1c6b8c;
  --danger:       #A3402F;
  --district-braunau: var(--brand-amber);
  --district-ried:    var(--brand-forest);
  --district-schaerding: var(--brand-teal);

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(20,30,25,.05), 0 8px 24px rgba(20,30,25,.06);
  --shadow-lg: 0 12px 40px rgba(14,26,20,.16);
  --maxw: 1120px;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Merriweather", Georgia, "Times New Roman", serif;
}

:root[data-theme="dark"] {
  --bg:           var(--support-navy);
  --surface:      #16242C;
  --surface-2:    #12202A;
  --text:         var(--brand-cream);
  --text-muted:   #AFBDB8;
  --line:         #26343B;
  --brand:        #12312A;
  --brand-contrast:#F6F1E7;
  --accent:       var(--brand-amber);
  --accent-text:  var(--brand-charcoal);
  --link:         var(--support-blue);
  --focus:        #7FB4C6;
  --danger:       #E7A08F;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 17px/1.6 var(--font-body);
  font-feature-settings: "cv11", "ss01";
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .display { font-family: var(--font-display); font-weight: 700; line-height: 1.18;
  letter-spacing: -.01em; color: var(--text); }
h1 { font-size: clamp(1.9rem, 1.2rem + 3vw, 3.1rem); margin: 0 0 .5rem; }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2rem); margin: 0 0 .6rem; }
h3 { font-size: 1.2rem; margin: 0 0 .3rem; }
p { margin: 0 0 1rem; }
a { color: var(--link); text-underline-offset: 2px; }
img, svg { max-width: 100%; }

/* accessibility */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--accent);
  color: var(--accent-text); padding: .6rem 1rem; border-radius: 0 0 8px 0; z-index: 100; }
.skip:focus { left: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* layout */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem); }
.section { padding: clamp(2.2rem, 6vw, 4rem) 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.eyebrow { font: 700 .72rem/1 var(--font-body); letter-spacing: .16em; text-transform: uppercase;
  color: var(--brand-teal); margin: 0 0 .5rem; }
:root[data-theme="dark"] .eyebrow { color: var(--support-blue); }

/* header / nav */
.site-header { background: var(--brand-forest); color: var(--brand-cream); position: sticky;
  top: 0; z-index: 50; }
.site-header a { color: var(--brand-cream); text-decoration: none; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 64px; }
.brandmark { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--font-display);
  font-weight: 700; font-size: 1.32rem; letter-spacing: -.01em; }
.brandmark .mark { width: 30px; height: 30px; flex: 0 0 auto; }
.nav-links { display: flex; align-items: center; gap: 1.4rem; }
.nav-links a { font-weight: 500; font-size: .98rem; opacity: .92; }
.nav-links a:hover, .nav-links a:focus-visible { opacity: 1; text-decoration: underline; }
.iconbtn { background: rgba(246,241,231,.12); color: var(--brand-cream); border: 0;
  width: 40px; height: 40px; border-radius: 10px; cursor: pointer; font-size: 1.1rem;
  display: inline-grid; place-items: center; }
.iconbtn:hover { background: rgba(246,241,231,.2); }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: .5rem; font: 600 1rem/1 var(--font-body);
  padding: .8rem 1.25rem; border-radius: 10px; border: 1px solid transparent; cursor: pointer;
  text-decoration: none; transition: transform .06s ease, background .15s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover { background: #c78c22; }
.btn-secondary { background: transparent; color: var(--brand); border-color: var(--line);
  background: var(--surface); }
.btn-ghost { background: rgba(246,241,231,.14); color: var(--brand-cream); }
.btn-ghost:hover { background: rgba(246,241,231,.24); }

/* hero */
.hero { background:
    radial-gradient(1200px 500px at 15% -10%, rgba(77,124,115,.18), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(215,154,43,.14), transparent 55%),
    var(--bg);
  border-bottom: 1px solid var(--line); }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2.5rem; align-items: center;
  padding-top: clamp(2rem, 5vw, 3.5rem); padding-bottom: clamp(2rem, 5vw, 3.5rem); }
.hero h1 .accent { color: var(--brand-amber); }
.hero .lead { font-size: 1.15rem; color: var(--text-muted); max-width: 40ch; }
.hero .cta-row { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.25rem; }
.hero-art { aspect-ratio: 1 / 1; display: grid; place-items: center; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 320px; margin: 0 auto; } }

/* photo hero variant — the approved temporary lead image (05-brand/assets/hero). A forest
   scrim keeps the cream copy at WCAG AA over the photo in both themes. */
.hero--photo { position: relative; isolation: isolate; overflow: hidden; border-bottom: 0; }
.hero--photo .hero-bg { position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 42%; z-index: -2; }
.hero--photo .hero-scrim { position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(90deg, rgba(11,26,20,.90) 0%, rgba(11,26,20,.66) 48%, rgba(11,26,20,.34) 100%),
  linear-gradient(0deg, rgba(11,26,20,.55), rgba(11,26,20,0) 42%); }
.hero--photo .wrap { display: block; padding-top: clamp(3rem, 9vw, 6.5rem);
  padding-bottom: clamp(3rem, 9vw, 6.5rem); }
.hero--photo .hero-copy { max-width: 60ch; }
.hero--photo h1 { color: var(--brand-cream); text-shadow: 0 2px 18px rgba(11,26,20,.35); }
.hero--photo .lead { color: rgba(246,241,231,.94); max-width: 46ch; }
.hero--photo .eyebrow { color: var(--support-blue); }

/* district chips */
.districts { display: flex; gap: .6rem; flex-wrap: wrap; }
.district { display: inline-flex; align-items: center; gap: .5rem; padding: .5rem .9rem;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  text-decoration: none; color: var(--text); font-weight: 600; font-size: .95rem; }
.district:hover { box-shadow: var(--shadow); }
.district .dot { width: 12px; height: 12px; border-radius: 50%; flex: 0 0 auto; }
.district .dot.braunau { background: var(--district-braunau); }
.district .dot.ried { background: var(--district-ried); }
.district .dot.schaerding { background: var(--district-schaerding);
  outline: 1px solid rgba(0,0,0,.12); }

/* event grid + cards */
.grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.ecard { display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  text-decoration: none; color: inherit; box-shadow: var(--shadow); transition: box-shadow .15s, transform .08s; }
a.ecard:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
a.ecard:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.ecard .cover { aspect-ratio: 16 / 9; background:
    linear-gradient(135deg, var(--brand-teal), var(--brand-forest)); position: relative; }
/* per-municipality cover flavour; unknown codes fall back to the base gradient above */
.ecard .cover--ried-im-innkreis { background:
    linear-gradient(135deg, var(--brand-teal), var(--brand-forest)); }
.ecard .cover--schildorn { background:
    linear-gradient(135deg, var(--brand-amber), var(--brand-forest)); }
/* Optional real event photo overlaid on the gradient cover; gradient shows if it fails to load */
.ecard .cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  border: 0; display: block; }
.ecard .cover .when { position: absolute; left: .7rem; bottom: .7rem; background: var(--surface);
  color: var(--text); border-radius: 8px; padding: .3rem .6rem; font: 700 .8rem var(--font-body);
  box-shadow: var(--shadow); z-index: 1; }
/* Event-detail hero photo */
.detail-image { margin: 0 0 1.4rem; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: linear-gradient(135deg, var(--brand-teal), var(--brand-forest)); }
.detail-image img { display: block; width: 100%; max-height: 460px; object-fit: cover; }
.detail-image figcaption { padding: .5rem .8rem; font-size: .9rem; color: var(--text-muted);
  background: var(--surface); }
.ecard .body { padding: .9rem 1rem 1.1rem; display: flex; flex-direction: column; gap: .35rem; }
.ecard .title { font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; }
.ecard .meta { color: var(--text-muted); font-size: .92rem; display: flex; gap: .4rem;
  flex-wrap: wrap; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: .35rem; font: 600 .74rem/1 var(--font-body);
  padding: .28rem .55rem; border-radius: 999px; background: var(--support-mist); color: #33403b; }
:root[data-theme="dark"] .chip { background: #22333a; color: var(--support-blue); }
.chip.cancelled { background: #F3E1DC; color: var(--danger); }
.chip.district-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand-teal); display: inline-block; }

/* filters / forms */
.filters { display: flex; gap: .7rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.filters .field { flex: 1 1 200px; min-width: 150px; }
label { display: block; font-weight: 600; font-size: .9rem; margin: 0 0 .3rem; }
select, input, textarea { width: 100%; padding: .7rem .8rem; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
select:focus, input:focus, textarea:focus { outline: none; border-color: var(--brand-teal);
  box-shadow: 0 0 0 3px rgba(77,124,115,.25); }
.field { margin-bottom: .9rem; }
.errors { background: #F3E1DC; color: var(--danger); border-radius: 10px; padding: .8rem 1rem;
  margin-bottom: 1rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* event detail */
.detail-hero { background: linear-gradient(135deg, var(--brand-forest), var(--brand-teal));
  color: var(--brand-cream); border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 2.5rem);
  margin: 1.5rem 0; }
.detail-hero h1 { color: var(--brand-cream); }
.detail-grid { display: grid; grid-template-columns: 1.4fr .8fr; gap: 1.75rem; }
@media (max-width: 780px) { .detail-grid { grid-template-columns: 1fr; } }
.factbox { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.2rem; box-shadow: var(--shadow); }
.factbox dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-muted); margin-top: .8rem; }
.factbox dt:first-child { margin-top: 0; }
.factbox dd { margin: .1rem 0 0; font-weight: 600; }

/* empty / misc */
.empty { text-align: center; color: var(--text-muted); padding: 3rem 1rem; }
.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.6rem; }
.muted { color: var(--text-muted); }
.notice { background: var(--surface-2); border: 1px dashed var(--line); border-radius: 10px;
  padding: .7rem .9rem; color: var(--text-muted); font-size: .9rem; }

/* brand tagline lockup (as in BRAND-0001: amber rule above letter-spaced caps) */
.brand-tagline { display: inline-block; font: 700 .72rem/1 var(--font-body); letter-spacing: .2em;
  text-transform: uppercase; color: var(--brand-cream); margin: .1rem 0 .7rem; }
.brand-tagline::before { content: ""; display: block; width: 40px; height: 2px;
  background: var(--brand-amber); margin: 0 0 .5rem; }

/* footer */
.site-footer { background: var(--brand-forest); color: var(--brand-cream); margin-top: 3rem; }
.site-footer a { color: var(--brand-cream); }
.site-footer .wrap { padding-top: 2.2rem; padding-bottom: 2.2rem; display: grid;
  grid-template-columns: 1.4fr 1fr 1fr; gap: 1.5rem; }
.site-footer h4 { margin: 0 0 .6rem; font: 700 .8rem/1 var(--font-body); letter-spacing: .1em;
  text-transform: uppercase; opacity: .8; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.site-footer .fine { border-top: 1px solid rgba(246,241,231,.18); opacity: .82; font-size: .85rem;
  padding: 1rem 0; text-align: center; }
@media (max-width: 700px) { .site-footer .wrap { grid-template-columns: 1fr; } }

/* generic panel (legacy templates: detail info box, submit, legal) */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.25rem; box-shadow: var(--shadow); margin-bottom: 1rem; }
.card h2, .card h3 { margin-top: 0; }
.badge { display: inline-block; font: 600 .74rem/1 var(--font-body); padding: .28rem .55rem;
  border-radius: 999px; background: var(--support-mist); color: #33403b; margin-right: .35rem; }
:root[data-theme="dark"] .badge { background: #22333a; color: var(--support-blue); }
.badge.cancelled { background: #F3E1DC; color: var(--danger); }
.btn.secondary { background: var(--surface); color: var(--brand); border: 1px solid var(--line); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.feedback { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .9rem 1.1rem; margin-top: 2rem; display: flex; gap: .6rem; align-items: center;
  flex-wrap: wrap; }
details > summary { cursor: pointer; font-weight: 600; padding: .5rem 0; }

/* ============================================================================
   Board-faithful homepage (BRAND-0001 approved layout) + logo lockup
   ========================================================================== */

/* Logo lockup: wordmark with the tagline "Events. Kultur. Leben." underneath,
   used everywhere the logo appears (header + footer). */
.brandmark .lockup { display: inline-flex; flex-direction: column; line-height: 1.05; gap: 3px; }
.brandmark .wordmark { font-family: var(--font-display); font-weight: 700; letter-spacing: -.01em; }
.brandmark .lockup-tag { font: 700 .52rem/1 var(--font-body); letter-spacing: .17em;
  text-transform: uppercase; color: var(--brand-amber); }
.brandmark--footer { font-size: 1.2rem; display: inline-flex; align-items: center; gap: .6rem; }
.brandmark--footer .wordmark { font-size: 1.35rem; }
.brandmark--footer .lockup-tag { font-size: .58rem; }

/* Header nav (board): more items + search + "Event eintragen" */
.nav-links { gap: 1.15rem; }
.nav-links .nav-mid { font-size: .96rem; }
.nav-search { display: inline-grid; place-items: center; width: 38px; height: 38px;
  border-radius: 10px; color: var(--brand-cream); }
.nav-search:hover { background: rgba(246,241,231,.14); }
.btn-sm { padding: .55rem .95rem; font-size: .92rem; }
.nav-links .btn-primary { color: var(--accent-text); }
.iconbtn--footer { margin-top: 1rem; }
/* Mobile disclosure menu: native <details>, hidden on desktop; reveals the mid links that the
   ≤960px breakpoint hides so navigation stays reachable on phones. */
.nav-more { position: relative; display: none; }
.nav-more > summary { list-style: none; cursor: pointer; padding: .5rem .8rem; border-radius: 10px;
  color: var(--brand-cream); font-weight: 500; }
.nav-more > summary::-webkit-details-marker { display: none; }
.nav-more > summary:hover, .nav-more > summary:focus-visible { background: rgba(246,241,231,.14); }
.nav-more[open] > summary { background: rgba(246,241,231,.14); }
.nav-more-panel { position: absolute; right: 0; top: calc(100% + .4rem); z-index: 40;
  background: var(--brand-forest, #163F35); border: 1px solid rgba(246,241,231,.18);
  border-radius: 12px; padding: .5rem; min-width: 200px; display: grid; gap: .1rem;
  box-shadow: 0 12px 30px rgba(0,0,0,.28); }
.nav-more-panel a { display: block; padding: .6rem .8rem; border-radius: 8px; color: var(--brand-cream); }
.nav-more-panel a:hover, .nav-more-panel a:focus-visible { background: rgba(246,241,231,.14); text-decoration: none; }
@media (max-width: 960px) { .nav-mid { display: none; } .nav-more { display: inline-block; } }
@media (max-width: 560px) { .nav-search { display: none; }
  .brandmark .lockup-tag { display: none; } }

/* Full-bleed hero: the church photo flows behind the whole hero (incl. behind the copy).
   Only a soft, left-weighted forest scrim sits behind the text for legibility — never an
   opaque green panel; the image stays visible across the hero. */
.hero2 { position: relative; overflow: hidden; background: var(--brand-forest);
  color: var(--brand-cream); }
.hero2-media { position: absolute; inset: 0; z-index: 0; }
.hero2-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 38%; }
.hero2-media::after { content: ""; position: absolute; inset: 0; background:
  linear-gradient(90deg, rgba(13,26,20,.68) 0%, rgba(13,26,20,.48) 30%, rgba(13,26,20,.20) 55%, rgba(13,26,20,0) 80%); }
.hero2 .wrap { position: relative; z-index: 1; }
.hero2-copy { max-width: 34rem; padding: clamp(3rem, 8vw, 6rem) 0; }
.hero2-copy h1 { color: var(--brand-cream); text-shadow: 0 2px 16px rgba(11,26,20,.45);
  font-size: clamp(2.1rem, 1.2rem + 3.4vw, 3.4rem); }
.hero2-copy h1 .accent { color: var(--brand-amber); }
.hero2-copy .lead { color: var(--brand-cream); font-size: 1.12rem; max-width: 30rem;
  margin-top: .5rem; text-shadow: 0 1px 12px rgba(11,26,20,.55); }
.hero2-copy .cta-row { margin-top: 1.6rem; }
.btn-hero-outline { background: rgba(13,26,20,.28); color: var(--brand-cream);
  border: 1px solid rgba(246,241,231,.55); }
.btn-hero-outline:hover { background: rgba(13,26,20,.45); }
@media (max-width: 860px) {
  .hero2-media::after { background:
    linear-gradient(0deg, rgba(13,26,20,.82), rgba(13,26,20,.3) 62%),
    linear-gradient(90deg, rgba(13,26,20,.5), rgba(13,26,20,.08) 82%); }
  .hero2-copy { max-width: none; padding: 2.6rem 0; min-height: 320px; display: flex;
    flex-direction: column; justify-content: flex-end; }
}

/* Feature cards: white panel overlapping the hero bottom */
.feature-wrap { position: relative; z-index: 2; margin-top: -3.5rem; }
.feature-cards { background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); display: grid;
  grid-template-columns: repeat(4, 1fr); overflow: hidden; }
.feature { padding: 1.4rem 1.5rem; border-right: 1px solid var(--line); }
.feature:last-child { border-right: 0; }
.feature .ficon { width: 30px; height: 30px; color: var(--brand-forest); margin-bottom: .7rem; }
:root[data-theme="dark"] .feature .ficon { color: var(--support-blue); }
.feature h3 { font-family: var(--font-display); margin: 0 0 .3rem; font-size: 1.12rem; }
.feature p { color: var(--text-muted); font-size: .94rem; margin: 0 0 .85rem; }
.feature-link { color: var(--brand-forest); font-weight: 700; font-size: .92rem;
  text-decoration: none; }
:root[data-theme="dark"] .feature-link { color: var(--support-blue); }
.feature-link span { color: var(--accent); }
.feature-link:hover { text-decoration: underline; }
@media (max-width: 900px) { .feature-cards { grid-template-columns: repeat(2, 1fr); }
  .feature:nth-child(2n) { border-right: 0; }
  .feature:nth-child(1), .feature:nth-child(2) { border-bottom: 1px solid var(--line); } }
@media (max-width: 520px) { .feature-cards { grid-template-columns: 1fr; }
  .feature { border-right: 0; border-bottom: 1px solid var(--line); }
  .feature:last-child { border-bottom: 0; } }

/* Trust band: "Vertrauenswürdig." + the three district emblems */
.trust { background: var(--brand-forest); color: var(--brand-cream);
  padding: clamp(2.2rem, 5vw, 3.4rem) 0; margin-top: 2rem; }
.trust-grid { display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  flex-wrap: wrap; }
.trust-lead h2 { color: var(--brand-cream); margin: 0; font-size: clamp(1.4rem, 1rem + 1.6vw, 2rem); }
.trust-lead h2 .accent { color: var(--brand-amber); }
.districts-row { display: flex; gap: 2.2rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.district-emblem { display: flex; align-items: center; gap: .7rem; }
.district-emblem svg { color: var(--brand-cream); opacity: .95; flex: 0 0 auto; }
.district-emblem strong { display: block; font-family: var(--font-display); font-size: 1.02rem;
  letter-spacing: .02em; }
.district-emblem span { display: block; font-size: .7rem; letter-spacing: .14em;
  text-transform: uppercase; opacity: .82; }

/* district emblems become links (homepage trust band) */
a.district-emblem { color: var(--brand-cream); text-decoration: none; }
a.district-emblem:hover { opacity: .82; }

/* region cards (/regionen) */
.region-card { display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.4rem;
  box-shadow: var(--shadow); text-decoration: none; color: inherit;
  transition: box-shadow .15s, transform .08s; }
a.region-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
a.region-card:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.region-dot { width: 22px; height: 22px; border-radius: 50%; margin-bottom: .6rem; display: block; }
.region-dot.braunau { background: var(--district-braunau); }
.region-dot.ried { background: var(--district-ried); }
.region-dot.schaerding { background: var(--district-schaerding); outline: 1px solid rgba(0,0,0,.1); }
.region-card h2 { margin: 0; font-size: 1.4rem; }
.region-name { color: var(--text-muted); font-size: .8rem; margin: .1rem 0 .5rem;
  text-transform: uppercase; letter-spacing: .06em; }
.region-count { color: var(--brand-forest); font-weight: 700; margin-top: auto; padding-top: .9rem; }
:root[data-theme="dark"] .region-count { color: var(--support-blue); }

/* content-page header band (Über uns, Für Veranstalter) */
.page-hero { background: var(--brand-forest); color: var(--brand-cream);
  padding: clamp(2.4rem, 6vw, 4rem) 0; }
.page-hero h1 { color: var(--brand-cream); }
.page-hero .lead { color: rgba(246,241,231,.9); max-width: 48ch; margin-top: .5rem; }
.page-hero .eyebrow { color: var(--support-blue); }

/* readable prose column */
.prose { max-width: 68ch; }
.prose h2 { margin-top: 2rem; }

/* wider search field in the filter row */
.field-search { flex: 2 1 260px; }

/* event-detail action row (calendar / share / map) */
.detail-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin: 1.2rem 0 1.6rem; }

/* homepage: browse-by-category tiles */
.cat-tiles { display: flex; flex-wrap: wrap; gap: .7rem; }
.cat-tile { display: inline-flex; align-items: center; padding: .7rem 1.1rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text); font-weight: 600;
  text-decoration: none; font-size: .98rem; transition: box-shadow .15s, transform .08s, border-color .15s; }
.cat-tile:hover { box-shadow: var(--shadow); transform: translateY(-1px); border-color: var(--brand-teal); }

/* homepage: featured (soonest) event */
.featured-event { display: grid; grid-template-columns: 1fr 1.25fr; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); text-decoration: none; color: inherit; margin-bottom: 1.3rem;
  transition: box-shadow .15s, transform .08s; }
a.featured-event:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
a.featured-event:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.featured-cover { position: relative; min-height: 220px;
  background: linear-gradient(135deg, var(--brand-teal), var(--brand-forest)); }
.featured-cover .chip { position: absolute; top: .8rem; left: .8rem;
  background: var(--accent); color: var(--accent-text); }
.featured-body { padding: 1.5rem 1.7rem; display: flex; flex-direction: column; gap: .5rem; }
.featured-body .meta { color: var(--text-muted); font-size: .92rem; display: flex; gap: .4rem;
  flex-wrap: wrap; align-items: center; }
.featured-title { font-family: var(--font-display); font-size: 1.5rem; margin: .2rem 0 0; }
.featured-desc { color: var(--text-muted); }
@media (max-width: 680px) { .featured-event { grid-template-columns: 1fr; }
  .featured-cover { min-height: 150px; } }

/* ---- Municipality landing pages + regional gemeinde index ---- */
.crumbs { font-size: .82rem; margin: 0 0 1rem; color: rgba(246,241,231,.82); }
.crumbs a { color: rgba(246,241,231,.94); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs [aria-current="page"] { color: var(--brand-cream); font-weight: 600; }
.cat-count { display: inline-flex; min-width: 1.5em; height: 1.5em; margin-left: .4rem;
  padding: 0 .45em; align-items: center; justify-content: center; border-radius: 999px;
  background: var(--support-mist); color: var(--support-slate); font-size: .72rem; font-weight: 700; }
:root[data-theme="dark"] .cat-count { background: #22333a; color: var(--support-blue); }
.muni-index { margin: 0 0 2rem; }
.muni-index h2 { display: flex; align-items: center; gap: .55rem; font-size: 1.2rem; margin: 0 0 .9rem; }
.muni-index .dot { width: 12px; height: 12px; border-radius: 50%; flex: 0 0 auto; }
.muni-index .dot.braunau { background: var(--district-braunau); }
.muni-index .dot.ried { background: var(--district-ried); }
.muni-index .dot.schaerding { background: var(--district-schaerding); outline: 1px solid rgba(0,0,0,.08); }
.muni-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.muni-chip { display: inline-flex; align-items: center; padding: .42rem .8rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none;
  font-size: .86rem; font-weight: 500; transition: box-shadow .15s, border-color .15s, transform .15s; }
.muni-chip:hover { box-shadow: var(--shadow); border-color: var(--brand-teal); transform: translateY(-1px); }

/* ---- Editor: public-preview banner ---- */
.preview-banner { background: var(--accent); color: var(--accent-text); padding: .6rem 1rem;
  border-radius: var(--radius-sm); font-weight: 600; margin-bottom: 1rem; }

/* ---- Accessibility & responsive hardening ---- */
/* Restore a clear KEYBOARD focus ring on form fields (the :focus rule above drops the outline
   in favour of a border colour, which is too weak on its own for keyboard users). */
select:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 1px; }
/* Never let media force horizontal scrolling on a 320px screen. */
img, svg, video, iframe { max-width: 100%; }
/* Comfortable touch targets on touch devices (WCAG 2.2 target size). */
@media (pointer: coarse) {
  .btn, .cat-tile, .muni-chip { min-height: 44px; }
  select, input, textarea { min-height: 44px; }
}


/* Live event counters (upcoming + total in the portal) — homepage hero */
.hero-stats { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.1rem; }
.stat-pill { display: inline-flex; align-items: center; gap: .45rem;
  padding: .34rem .8rem; border-radius: 999px; font-size: .9rem;
  color: var(--brand-cream); background: rgba(11,26,20,.34);
  border: 1px solid rgba(246,241,231,.28); backdrop-filter: blur(4px);
  text-shadow: 0 1px 8px rgba(11,26,20,.5); }
.stat-pill strong { font-weight: 800; font-variant-numeric: tabular-nums; }
.stat-pill--muted { background: rgba(11,26,20,.22); opacity: .92; }
.stat-pill .stat-dot { width: .5rem; height: .5rem; border-radius: 50%;
  background: var(--brand-amber); box-shadow: 0 0 0 3px rgba(215,154,43,.28); flex: 0 0 auto; }


/* Legal pages (Impressum / Datenschutz / Kontakt) */
.legal { max-width: 52rem; }
.legal h2 { font-family: var(--font-display); font-size: 1.2rem; margin: 1.8rem 0 .5rem; }
.legal p, .legal dd { line-height: 1.6; }
.legal .card { background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem 1.2rem; margin: .6rem 0; }
.legal-dl { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.2rem; margin: .6rem 0; }
.legal-dl dt { font-weight: 700; color: var(--text-muted); }
.legal-dl dd { margin: 0; }
@media (max-width: 560px){ .legal-dl { grid-template-columns: 1fr; gap: .1rem 0; }
  .legal-dl dd { margin-bottom: .6rem; } }
.field-check label { display: flex; gap: .5rem; align-items: flex-start; font-size: .95rem; line-height: 1.5; }
.field-check input { margin-top: .25rem; flex: 0 0 auto; }
.linklike { background: none; border: 0; padding: 0; color: inherit; font: inherit;
  text-decoration: underline; cursor: pointer; }
.cookie-banner { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 60;
  max-width: 40rem; margin: 0 auto; background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 1rem 1.1rem; display: flex; flex-wrap: wrap; gap: .8rem; align-items: center;
  justify-content: space-between; }
.cookie-banner p { margin: 0; font-size: .92rem; flex: 1 1 16rem; }
.cookie-actions { display: flex; gap: .5rem; flex: 0 0 auto; }
.cookie-banner[hidden]{display:none !important;}


/* Per-Gemeinde photo gallery (info band below events) */
.gemeinde-gallery { padding-top: 0; }
.gphoto-grid { display: grid; gap: 1.4rem; margin-top: 1.4rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.gphoto { margin: 0; display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.gphoto__frame { position: relative; line-height: 0; }
.gphoto__frame img { width: 100%; height: 210px; object-fit: cover; display: block; }
.gphoto__credit { position: absolute; left: .6rem; bottom: .6rem;
  background: rgba(22,63,53,.72); color: var(--brand-cream);
  font: 600 .72rem/1.4 var(--font-body); letter-spacing: .01em;
  padding: .18rem .55rem; border-radius: 999px; backdrop-filter: blur(2px); }
.gphoto__cap { padding: .85rem 1rem 1.05rem; display: flex; flex-direction: column; gap: .25rem; }
.gphoto__cap strong { font-family: var(--font-display); font-size: 1.02rem; color: var(--text); }
.gphoto__cap span { color: var(--text-muted); font-size: .9rem; line-height: 1.45; }
.gphoto__note { margin-top: 1.4rem; font-size: .82rem; }

/* Per-Gemeinde map silhouette in the page hero */
.page-hero { position: relative; overflow: hidden; }
.gemeinde-map { position: absolute; top: 50%; right: max(4vw, 1.5rem); transform: translateY(-50%);
  width: clamp(130px, 22vw, 250px); height: auto; pointer-events: none;
  filter: drop-shadow(0 1px 6px rgba(0,0,0,.25)); }
@media (max-width: 820px) { .gemeinde-map { position: static; transform: none; display: block;
  width: 118px; margin: 1.2rem 0 0; } }


/* Per-Gemeinde knowledge factbox (info band below events) */
.gemeinde-knowledge { padding-bottom: 0; }
.knowledge-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 1.8rem; margin-top: 1.2rem; align-items: start; }
@media (max-width: 720px){ .knowledge-grid { grid-template-columns: 1fr; } }
.knowledge-intro p { margin: 0 0 1rem; line-height: 1.6; }
.knowledge-sources { font-size: .82rem; color: var(--text-muted); }
.knowledge-facts { padding: 1.1rem 1.25rem; }
.knowledge-facts h3 { margin: 0 0 .5rem; font-size: 1rem; font-family: var(--font-display); }
.knowledge-facts dl { margin: 0; }
.factrow { display: flex; justify-content: space-between; gap: 1rem; padding: .42rem 0; border-bottom: 1px solid var(--line); }
.factrow:last-child { border-bottom: 0; }
.factrow dt { color: var(--text-muted); }
.factrow dd { margin: 0; text-align: right; font-weight: 600; }
.factnote { font-weight: 400; color: var(--text-muted); font-size: .82rem; }
