/*
Theme Name:   Soziator
Theme URI:    https://soziator.ch
Author:       PIXELS – Digitale Kreativagentur
Author URI:   https://pixels.ch
Description:  Custom-Theme für soziator.ch nach Design-System 2026. Marine, kultiviertes Rot, Fraunces + Inter (self-hosted), Mega-Menu, Mobile-Fullscreen-Navigation, CSS-first Micro-Animations.
Version:      1.0.2
Requires at least: 6.5
Requires PHP: 8.1
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  soziator
*/

/* =========================================================
   1. FONTS (self-hosted, variable)
   ========================================================= */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('assets/fonts/fraunces-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: 'Fraunces';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('assets/fonts/fraunces-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url('assets/fonts/fraunces-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;
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url('assets/fonts/fraunces-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('assets/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: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('assets/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* =========================================================
   2. DESIGN-TOKENS
   ========================================================= */
:root {
  /* Marke */
  --color-navy:        #0C0C3C;
  --color-navy-800:    #1A1A54;
  --color-navy-600:    #34346E;
  --color-navy-100:    #E9E9F2;
  --color-red:         #E30613;
  --color-red-700:     #B8000F;
  --color-red-100:     #FDE8EA;

  /* Neutrals */
  --color-ink:         #14142B;
  --color-text:        #3A3A4A;
  --color-text-muted:  #6E6E80;
  --color-border:      #DDDDE6;
  --color-surface:     #F6F6FA;
  --color-bg:          #FFFFFF;
  --color-on-navy-2nd: #B9B9D6;

  /* Funktional */
  --color-focus:       #2B59C3;
  --color-success:     #1E7F4F;
  --color-error:       #C22333;

  /* Typografie */
  --font-head: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Inter', -apple-system, 'Segoe UI', sans-serif;
  --text-display: clamp(2.4rem, 5vw, 3.6rem);
  --text-h1:      clamp(2rem, 4vw, 2.8rem);
  --text-h2:      clamp(1.6rem, 3vw, 2rem);
  --text-h3:      1.375rem;
  --text-h4:      1.125rem;
  --text-lead:    1.25rem;
  --text-body:    1.0625rem;
  --text-small:   0.875rem;
  --text-overline: 0.8125rem;

  /* Spacing */
  --space-1: 0.25rem;  --space-2: 0.5rem;  --space-3: 0.75rem;
  --space-4: 1rem;     --space-6: 1.5rem;  --space-8: 2rem;
  --space-12: 3rem;    --space-16: 4rem;   --space-24: 6rem;
  --section-y: clamp(4rem, 10vw, 7.5rem);

  /* Radii */
  --radius-s: 4px;
  --radius-m: 8px;
  --radius-l: 16px;
  --radius-pill: 999px;

  /* Shadows (navygetönt) */
  --shadow-s: 0 1px 2px rgb(12 12 60 / 0.06), 0 1px 3px rgb(12 12 60 / 0.08);
  --shadow-m: 0 4px 12px rgb(12 12 60 / 0.10);
  --shadow-l: 0 12px 32px rgb(12 12 60 / 0.14);

  /* Layout */
  --container: 72rem;
  --container-narrow: 42rem;
  --grid-gap: clamp(1rem, 2.5vw, 2rem);

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 72px;
  --header-h-compact: 56px;
}

/* =========================================================
   3. BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* Anker-Ziele: unter dem Sticky-Header freistellen (Header 72px + Puffer) */
[id] { scroll-margin-top: calc(var(--header-h) + 1.5rem); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
body.nav-locked { overflow: hidden; }

img { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }

h1, h2, h3, .h-like {
  font-family: var(--font-head);
  color: var(--color-ink);
  font-variation-settings: 'opsz' 60, 'SOFT' 30;
  margin: 0 0 0.5em;
}
h1 { font-size: var(--text-h1); font-weight: 560; line-height: 1.15; letter-spacing: -0.01em; }
h2 { font-size: var(--text-h2); font-weight: 540; line-height: 1.2; }
h3 { font-size: var(--text-h3); font-weight: 520; line-height: 1.3; }
h4, h5, h6 { font-family: var(--font-body); font-size: var(--text-h4); font-weight: 600; line-height: 1.4; color: var(--color-ink); margin: 0 0 0.5em; }
p { margin: 0 0 1em; }

.text-display { font-size: var(--text-display); font-weight: 560; line-height: 1.1; letter-spacing: -0.015em; }
.lead { font-size: var(--text-lead); line-height: 1.6; }
.overline {
  font-family: var(--font-body);
  font-size: var(--text-overline);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-red);
  display: block;
  margin-bottom: var(--space-3);
}

/* Links im Content: rot, unterstrichen, Underline-Slide (#3) */
a { color: var(--color-red-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--color-red); }

/* Ruhezustand: dezente 1px-Unterstreichung (Design-System: Content-Links
   unterstrichen); Hover/Fokus: volle Farbe statt Slide-from-zero. */
.prose a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgb(184 0 15 / 0.4);
}
.prose a:hover, .prose a:focus-visible { text-decoration-color: currentColor; }
@media (prefers-reduced-motion: no-preference) {
  .prose a { transition: text-decoration-color 200ms var(--ease-out), color 200ms var(--ease-out); }
}

/* Fokus-Stil, sichtbar */
:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: 2px;
}
.on-navy :focus-visible { outline-color: #fff; }

/* Skip-Link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--color-navy);
  color: #fff;
  padding: var(--space-3) var(--space-6);
  border-radius: 0 0 var(--radius-m) 0;
}
.skip-link:focus { left: 0; }

/* Container */
.container { max-width: var(--container); margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 2.5rem); }
.container-narrow { max-width: calc(var(--container-narrow) + 2 * clamp(1.25rem, 4vw, 2.5rem)); margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 2.5rem); }

/* Lesespalte für Fliesstext */
.prose > * { max-width: var(--container-narrow); }
.prose > .alignwide { max-width: var(--container); }
.prose > .alignfull { max-width: none; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose img, .prose figure { border-radius: var(--radius-l); overflow: hidden; }
.prose ul, .prose ol { padding-left: 1.25rem; margin: 0 0 1em; }
.prose li { margin-bottom: 0.35em; }
.prose blockquote {
  margin: 2em 0;
  padding-left: var(--space-6);
  border-left: 3px solid var(--color-red);
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-style: italic;
  color: var(--color-ink);
  line-height: 1.45;
}
.prose blockquote p { margin: 0; }
.prose hr { border: 0; border-top: 1px solid var(--color-border); margin: 2.5em 0; }

/* =========================================================
   4. BUTTONS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.9em 1.6em;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  background: var(--color-navy);
  color: #fff;
}
.btn:hover { background: var(--color-navy-800); color: #fff; }
.btn--outline { background: transparent; color: var(--color-navy); border-color: var(--color-navy); }
.btn--outline:hover { background: var(--color-navy); color: #fff; }
.btn--red { background: var(--color-red); }
.btn--red:hover { background: var(--color-red-700); }
.on-navy .btn--outline { color: #fff; border-color: rgb(255 255 255 / 0.6); }
.on-navy .btn--outline:hover { background: #fff; color: var(--color-navy); border-color: #fff; }
@media (prefers-reduced-motion: no-preference) {
  .btn { transition: transform 150ms var(--ease-out), box-shadow 150ms var(--ease-out), background-color 150ms var(--ease-out), color 150ms var(--ease-out); }
  .btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-m); }
}

/* Text-Link-CTA mit Chevron */
.link-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-weight: 600;
  color: var(--color-red-700);
  text-decoration: none;
}
.link-cta .chev { transition: transform 200ms var(--ease-out); }
.link-cta:hover .chev { transform: translateX(3px); }
.link-cta:hover { color: var(--color-red); }

/* =========================================================
   5. HEADER + DESKTOP-NAV + MEGA-MENU
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-navy);
  color: #fff;
}
.site-header .header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  height: var(--header-h);
}
@media (prefers-reduced-motion: no-preference) {
  .site-header .header-bar { transition: height 200ms var(--ease-out); }
}
.site-header.is-scrolled { box-shadow: var(--shadow-m); }
.site-header.is-scrolled .header-bar { height: var(--header-h-compact); }

/* Wortmarke */
.brand {
  font-family: var(--font-head);
  font-weight: 600;
  font-variation-settings: 'opsz' 40, 'SOFT' 40;
  font-size: 1.55rem;
  letter-spacing: -0.01em;
  color: #fff;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}
.brand:hover, .brand:focus-visible { color: #fff; }
.brand .brand-dot { color: var(--color-red); }
.brand .brand-tld { color: var(--color-on-navy-2nd); font-weight: 400; }

/* Desktop-Nav */
.nav-desktop { display: none; }
@media (min-width: 900px) {
  .nav-desktop { display: block; }
  .nav-desktop > ul {
    display: flex;
    align-items: center;
    gap: clamp(0.25rem, 1.5vw, 1rem);
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .nav-desktop .nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    padding: 0.55em 0.75em;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #fff;
    text-decoration: none;
    background: none;
    border: 0;
    font-family: var(--font-body);
    cursor: pointer;
  }
  /* Aktiv-/Hover-Indikator: roter Unterstrich, skaliert von der Mitte (#4) */
  .nav-desktop .nav-link::after {
    content: '';
    position: absolute;
    left: 0.75em;
    right: 0.75em;
    bottom: 0.25em;
    height: 2px;
    background: var(--color-red);
    transform: scaleX(0);
    transform-origin: center;
  }
  @media (prefers-reduced-motion: no-preference) {
    .nav-desktop .nav-link::after { transition: transform 250ms var(--ease-out); }
  }
  .nav-desktop .nav-link:hover::after,
  .nav-desktop .nav-link[aria-expanded="true"]::after,
  .nav-desktop .current-menu-item > .nav-link::after,
  .nav-desktop .current-menu-ancestor > .nav-link::after { transform: scaleX(1); }

  .nav-desktop .nav-chev { width: 10px; height: 10px; opacity: 0.7; transition: transform 200ms var(--ease-out); }
  .nav-desktop .nav-link[aria-expanded="true"] .nav-chev { transform: rotate(180deg); }

  /* Kontakt als Pill abgesetzt — Outline statt Rot: max. 1 roter
     Primär-CTA above the fold pro Seite (der gehört dem Seiteninhalt). */
  .nav-desktop .menu-item-contact > .nav-link {
    background: transparent;
    border: 1.5px solid rgb(255 255 255 / 0.6);
    border-radius: var(--radius-pill);
    padding: 0.6em 1.3em;
    font-weight: 600;
    margin-left: 0.5rem;
  }
  .nav-desktop .menu-item-contact > .nav-link:hover { background: #fff; color: var(--color-navy); border-color: #fff; }
  .nav-desktop .menu-item-contact > .nav-link::after { display: none; }
}

/* Dropdown-/Mega-Panels */
.nav-panel {
  position: absolute;
  top: 100%;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  z-index: 90;
}
@media (prefers-reduced-motion: no-preference) {
  .nav-panel { transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out), visibility 0s linear 220ms; }
}
.nav-panel.is-open {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  transition-delay: 0s;
}

/* schlankes Dropdown (Der Soziator) */
.nav-panel--drop {
  background: var(--color-navy-800);
  border-radius: 0 0 var(--radius-m) var(--radius-m);
  box-shadow: var(--shadow-l);
  min-width: 16rem;
  padding: var(--space-3);
}
.nav-panel--drop ul { list-style: none; margin: 0; padding: 0; }
.nav-panel--drop a {
  display: block;
  padding: 0.65em 0.9em;
  border-radius: var(--radius-s);
  color: #fff;
  font-size: 0.9375rem;
  text-decoration: none;
}
.nav-panel--drop a:hover, .nav-panel--drop a:focus-visible { background: var(--color-navy-600); color: #fff; }

/* Mega-Menu (Angebot): volle Breite */
.nav-panel--mega {
  left: 0;
  right: 0;
  background: var(--color-navy-800);
  box-shadow: var(--shadow-l);
  border-top: 1px solid rgb(255 255 255 / 0.08);
}
.mega-grid {
  list-style: none;
  margin: 0;
  padding-inline: 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1.15fr;
  gap: var(--grid-gap);
  padding-block: var(--space-8);
  align-items: stretch;
}
.mega-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-6);
  border-radius: var(--radius-m);
  background: rgb(255 255 255 / 0.04);
  border: 1px solid rgb(255 255 255 / 0.08);
  color: #fff;
  text-decoration: none;
}
@media (prefers-reduced-motion: no-preference) {
  .mega-card { transition: background-color 200ms var(--ease-out), transform 200ms var(--ease-out); }
  .mega-card:hover { background: rgb(255 255 255 / 0.09); transform: translateY(-2px); }
  .nav-panel.is-open .mega-anim { animation: megaIn 320ms var(--ease-out) backwards; }
  .nav-panel.is-open .mega-anim:nth-child(2) { animation-delay: 50ms; }
  .nav-panel.is-open .mega-anim:nth-child(3) { animation-delay: 100ms; }
  .nav-panel.is-open .mega-anim:nth-child(4) { animation-delay: 150ms; }
}
@keyframes megaIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.mega-card:hover { color: #fff; }
.mega-card .mega-num {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 560;
  line-height: 1;
  color: var(--color-red);
}
.mega-card .mega-title { font-family: var(--font-head); font-size: 1.15rem; font-weight: 540; }
.mega-card .mega-desc { font-size: 0.875rem; color: var(--color-on-navy-2nd); line-height: 1.5; flex: 1; }
.mega-card .mega-more { font-size: 0.875rem; font-weight: 600; color: #fff; display: inline-flex; align-items: center; gap: 0.35em; }
.mega-card:hover .mega-more { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* Themenkompass-Karte im Mega-Menu */
.mega-kompass {
  background: var(--color-red-100);
  border-radius: var(--radius-m);
  padding: var(--space-6);
  color: var(--color-ink);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.mega-kompass .mega-title { font-family: var(--font-head); font-size: 1.15rem; font-weight: 540; color: var(--color-ink); }
.mega-kompass p { margin: 0; font-size: 0.875rem; color: var(--color-text); }
.mega-kompass .mega-links { display: flex; flex-direction: column; gap: 0.35em; font-size: 0.875rem; }

/* =========================================================
   6. MOBILE-NAV (Fullscreen-Overlay)
   ========================================================= */
.nav-burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: 0;
  cursor: pointer;
  color: #fff;
  padding: 0;
}
@media (min-width: 900px) { .nav-burger { display: none; } }
.nav-burger .burger-box { position: relative; width: 22px; height: 16px; }
.nav-burger .burger-line {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}
.nav-burger .burger-line:nth-child(1) { top: 0; }
.nav-burger .burger-line:nth-child(2) { top: 7px; }
.nav-burger .burger-line:nth-child(3) { top: 14px; }
@media (prefers-reduced-motion: no-preference) {
  .nav-burger .burger-line { transition: transform 250ms var(--ease-out), opacity 200ms var(--ease-out); }
}
.nav-burger[aria-expanded="true"] .burger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] .burger-line:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] .burger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--color-navy);
  color: #fff;
  padding-top: var(--header-h-compact);
  display: flex;
  flex-direction: column;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .nav-overlay { transition: opacity 250ms var(--ease-out), visibility 0s linear 250ms; }
}
.nav-overlay.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transition-delay: 0s;
}
@media (min-width: 900px) { .nav-overlay { display: none; } }

.nav-overlay .overlay-scroll {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-8) clamp(1.25rem, 6vw, 2.5rem) var(--space-6);
}
.nav-mobile ul { list-style: none; margin: 0; padding: 0; }
.nav-mobile > ul > li { border-bottom: 1px solid rgb(255 255 255 / 0.12); }
@media (prefers-reduced-motion: no-preference) {
  .nav-overlay.is-open .nav-mobile > ul > li {
    animation: mobItem 350ms var(--ease-out) backwards;
  }
  .nav-overlay.is-open .nav-mobile > ul > li:nth-child(1) { animation-delay: 30ms; }
  .nav-overlay.is-open .nav-mobile > ul > li:nth-child(2) { animation-delay: 60ms; }
  .nav-overlay.is-open .nav-mobile > ul > li:nth-child(3) { animation-delay: 90ms; }
  .nav-overlay.is-open .nav-mobile > ul > li:nth-child(4) { animation-delay: 120ms; }
  .nav-overlay.is-open .nav-mobile > ul > li:nth-child(5) { animation-delay: 150ms; }
  .nav-overlay.is-open .nav-mobile > ul > li:nth-child(6) { animation-delay: 180ms; }
}
@keyframes mobItem {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.nav-mobile .mob-link,
.nav-mobile .mob-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 56px;
  padding: var(--space-3) 0;
  font-family: var(--font-head);
  font-variation-settings: 'opsz' 30, 'SOFT' 30;
  font-size: 1.5rem;
  font-weight: 540;
  color: #fff;
  text-decoration: none;
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
}
.nav-mobile .mob-toggle .nav-chev { width: 14px; height: 14px; flex: none; transition: transform 250ms var(--ease-out); }
.nav-mobile .mob-toggle[aria-expanded="true"] .nav-chev { transform: rotate(180deg); }

/* Accordion (#11): grid-template-rows 0fr → 1fr */
.mob-acc {
  display: grid;
  grid-template-rows: 0fr;
}
@media (prefers-reduced-motion: no-preference) {
  .mob-acc { transition: grid-template-rows 250ms var(--ease-out); }
}
.mob-acc.is-open { grid-template-rows: 1fr; }
.mob-acc > div { overflow: hidden; }
.mob-acc ul { padding-bottom: var(--space-3); }
.mob-acc a {
  display: block;
  padding: 0.55em 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  color: var(--color-on-navy-2nd);
  text-decoration: none;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.mob-acc a:hover, .mob-acc a:focus-visible { color: #fff; }

.overlay-footer {
  padding: var(--space-6) clamp(1.25rem, 6vw, 2.5rem) calc(var(--space-6) + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgb(255 255 255 / 0.12);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.overlay-footer .btn { justify-content: center; }
.overlay-footer .overlay-contact { display: flex; flex-direction: column; gap: 0.25em; font-size: 0.9375rem; }
.overlay-footer .overlay-contact a { color: var(--color-on-navy-2nd); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.overlay-footer .overlay-contact a:hover { color: #fff; }

/* =========================================================
   7. HERO (Homepage)
   ========================================================= */
.hero {
  position: relative;
  background: var(--color-navy);
  color: #fff;
  overflow: clip;
}
.hero-grid {
  display: grid;
  gap: var(--space-8);
  align-items: center;
  padding-block: var(--space-16);
  min-height: min(78vh, 44rem);
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: var(--space-12); }
}
.hero .overline { color: var(--color-red); }
.hero h1, .hero .text-display { color: #fff; margin-bottom: var(--space-4); }
.hero .lead { color: var(--color-on-navy-2nd); max-width: 34rem; margin-bottom: var(--space-8); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* Hero-Kicker-Stagger (#9) */
@media (prefers-reduced-motion: no-preference) {
  .hero .hero-line { animation: heroLine 600ms var(--ease-out) backwards; }
  .hero .hero-line:nth-child(2) { animation-delay: 150ms; }
  .hero .hero-line:nth-child(3) { animation-delay: 300ms; }
  .hero .hero-line:nth-child(4) { animation-delay: 450ms; }
}
@keyframes heroLine {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-media { position: relative; }
.hero-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-l);
}
@media (max-width: 899px) {
  .hero-grid { padding-block: var(--space-12); min-height: 0; }
}

/* =========================================================
   8. SEKTIONEN & KARTEN
   ========================================================= */
.section { padding-block: var(--section-y); }
.section--surface { background: var(--color-surface); }
.section--navy { background: var(--color-navy); color: #fff; }
.section--navy h2, .section--navy h3 { color: #fff; }
.section--navy p { color: var(--color-on-navy-2nd); }
.section-head { max-width: 46rem; margin-bottom: var(--space-12); }

.card-grid {
  display: grid;
  gap: var(--grid-gap);
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }

/* Blog-Karte (#7) */
.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-m);
  overflow: hidden;
  box-shadow: var(--shadow-s);
}
@media (prefers-reduced-motion: no-preference) {
  .post-card { transition: box-shadow 300ms var(--ease-out), transform 300ms var(--ease-out); }
  .post-card:hover { box-shadow: var(--shadow-l); transform: translateY(-3px); }
  .post-card .card-media img { transition: transform 300ms var(--ease-out); }
  .post-card:hover .card-media img { transform: scale(1.03); }
}
.post-card .card-media { overflow: hidden; aspect-ratio: 16 / 9; background: var(--color-navy-100); }
.post-card .card-media img { width: 100%; height: 100%; object-fit: cover; }
.post-card .card-media--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-navy);
}
.post-card .card-body { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-6); flex: 1; }
.post-card .card-kicker { font-size: var(--text-overline); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-red); }
.post-card h3 { font-size: 1.2rem; margin: 0; line-height: 1.35; }
.post-card h3 a { color: var(--color-ink); text-decoration: none; }
.post-card h3 a::after { content: ''; position: absolute; inset: 0; }
.post-card:hover h3 a { color: var(--color-navy-600); }
.post-card .card-excerpt { font-size: 0.9375rem; color: var(--color-text); margin: 0; }
.post-card .card-meta { margin-top: auto; padding-top: var(--space-2); font-size: var(--text-small); color: var(--color-text-muted); display: flex; gap: 0.6em; flex-wrap: wrap; }

/* Featured-Post (Blogindex) */
.post-featured {
  display: grid;
  gap: var(--space-6);
  margin-bottom: var(--space-16);
}
@media (min-width: 900px) {
  .post-featured { grid-template-columns: 3fr 2fr; gap: var(--space-12); align-items: center; }
}
.post-featured .card-media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-l);
  aspect-ratio: 16 / 9;
  background: var(--color-navy);
  box-shadow: var(--shadow-m);
}
.post-featured .card-media img { width: 100%; height: 100%; object-fit: cover; }
@media (prefers-reduced-motion: no-preference) {
  .post-featured .card-media img { transition: transform 300ms var(--ease-out); }
  .post-featured:hover .card-media img { transform: scale(1.03); }
}
.post-featured h2 { margin-bottom: var(--space-3); }
.post-featured h2 a { color: var(--color-ink); text-decoration: none; }
.post-featured h2 a:hover { color: var(--color-navy-600); }
.post-featured .card-meta { font-size: var(--text-small); color: var(--color-text-muted); display: flex; gap: 0.6em; flex-wrap: wrap; margin-bottom: var(--space-3); }

/* Scroll-Reveal (#1) */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out);
    transition-delay: calc(var(--reveal-i, 0) * 60ms);
  }
  .js [data-reveal].is-inview { opacity: 1; transform: none; }
}

/* Bild-Reveal (#14) */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal-img] {
    clip-path: inset(8% 8% 8% 8% round var(--radius-l));
    transform: scale(1.04);
    transition: clip-path 500ms var(--ease-out), transform 500ms var(--ease-out);
  }
  .js [data-reveal-img].is-inview { clip-path: inset(0 0 0 0 round var(--radius-l)); transform: none; }
}

/* =========================================================
   9. BLOG-INDEX & SINGLE
   ========================================================= */
.page-hero { padding-block: var(--space-16) var(--space-8); }
.page-hero .intro { font-size: var(--text-lead); color: var(--color-text-muted); max-width: 40rem; }

.pagination { margin-top: var(--space-16); display: flex; justify-content: center; }
.pagination .nav-links { display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; }
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  height: 2.75rem;
  padding-inline: 0.75em;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  color: var(--color-ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
}
.pagination .page-numbers.current { background: var(--color-navy); color: #fff; border-color: var(--color-navy); }
.pagination a.page-numbers:hover { border-color: var(--color-navy); }

/* Single Post */
.single-article { padding-block: var(--space-16); }
.article-header { margin-bottom: var(--space-8); }
.article-header .overline { margin-bottom: var(--space-2); }
.article-header h1 { margin-bottom: var(--space-4); }
.article-meta {
  display: flex;
  align-items: center;
  gap: 0.75em;
  flex-wrap: wrap;
  font-size: var(--text-small);
  color: var(--color-text-muted);
}
.article-meta .meta-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 65% 30%;
}
.article-meta .meta-dot::before { content: '·'; }
.article-hero-img { margin-block: var(--space-8); }
.article-hero-img img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-l); }
.single-article .prose { font-size: 1.125rem; }

.post-nav {
  margin-top: var(--space-16);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-border);
  display: grid;
  gap: var(--space-4);
}
@media (min-width: 640px) { .post-nav { grid-template-columns: 1fr 1fr; } }
.post-nav a {
  display: flex;
  flex-direction: column;
  gap: 0.35em;
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-m);
  text-decoration: none;
  color: var(--color-ink);
}
@media (prefers-reduced-motion: no-preference) {
  .post-nav a { transition: box-shadow 200ms var(--ease-out), transform 200ms var(--ease-out); }
  .post-nav a:hover { box-shadow: var(--shadow-m); transform: translateY(-2px); }
}
.post-nav .nav-label { font-size: var(--text-overline); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-muted); }
.post-nav .nav-title { font-family: var(--font-head); font-size: 1.05rem; font-weight: 540; line-height: 1.35; }
.post-nav .post-nav-next { text-align: right; align-items: flex-end; }
.post-nav a:hover .nav-title { color: var(--color-red-700); }

/* Autoren-Box (Soll 4.5) */
.author-box {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  margin-top: var(--space-12);
  padding: var(--space-6);
  background: var(--color-surface);
  border-radius: var(--radius-m);
}
.author-box .author-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 65% 30%;
  flex: none;
}
.author-box .author-name {
  display: block;
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 540;
  color: var(--color-ink);
  margin-bottom: 0.25em;
}
.author-box p { margin: 0; font-size: 0.9375rem; }

/* Dezenter Themenkompass-CTA am Artikelende */
.article-cta {
  margin-top: var(--space-8);
  padding: var(--space-6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-m);
}
.article-cta p { margin: 0 0 var(--space-3); font-size: 0.9375rem; }
.article-cta .article-cta-links { display: flex; flex-wrap: wrap; gap: var(--space-6); }

/* Verwandte Beiträge */
.related-posts { padding-block: var(--space-16); border-top: 1px solid var(--color-border); margin-top: var(--space-16); }
.related-posts h2 { margin-bottom: var(--space-8); }

/* =========================================================
   10. KONTAKT-BAND + ZITAT
   ========================================================= */
.contact-band { background: var(--color-navy); color: #fff; }
.contact-band .band-grid {
  display: grid;
  gap: var(--space-8);
  padding-block: var(--section-y);
  align-items: center;
}
@media (min-width: 900px) { .contact-band .band-grid { grid-template-columns: 3fr 2fr; } }
.contact-band h2 { color: #fff; }
.contact-band p { color: var(--color-on-navy-2nd); }
.contact-band .band-contact { display: flex; flex-direction: column; gap: 0.4em; font-size: 1.0625rem; }
.contact-band .band-contact a { color: #fff; text-decoration: none; border-bottom: 1px solid rgb(255 255 255 / 0.3); width: fit-content; }
.contact-band .band-contact a:hover { border-color: var(--color-red); color: #fff; }
.band-cta { display: flex; flex-direction: column; gap: var(--space-3); align-items: flex-start; }
@media (min-width: 900px) { .band-cta { align-items: flex-end; } }

.quote-close {
  background: var(--color-navy);
  color: var(--color-on-navy-2nd);
  padding-block: 0 var(--space-16);
}
.quote-close blockquote {
  margin: 0 auto;
  max-width: 38rem;
  text-align: center;
  font-family: var(--font-head);
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1.6;
  border-top: 1px solid rgb(255 255 255 / 0.15);
  padding-top: var(--space-12);
}
.quote-close cite { display: block; margin-top: var(--space-3); font-style: normal; font-family: var(--font-body); font-size: var(--text-small); }

/* =========================================================
   11. FOOTER
   ========================================================= */
.site-footer { background: var(--color-navy); color: var(--color-on-navy-2nd); font-size: 0.9375rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-grid {
  display: grid;
  gap: var(--space-8);
  padding-block: var(--space-16) var(--space-8);
  border-top: 1px solid rgb(255 255 255 / 0.1);
}
@media (min-width: 640px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-brand .brand { font-size: 1.35rem; }
.footer-brand p { margin: var(--space-3) 0 0; max-width: 22rem; }
.footer-col h2 {
  color: #fff;
  font-family: var(--font-body);
  font-size: var(--text-overline);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}
.footer-col ul, .footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5em; }
.footer-col address { font-style: normal; line-height: 1.7; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: space-between;
  align-items: center;
  padding-block: var(--space-6);
  border-top: 1px solid rgb(255 255 255 / 0.1);
  font-size: var(--text-small);
}
.footer-bottom .footer-nav ul { flex-direction: row; gap: var(--space-6); }

/* =========================================================
   12. FORMULARE / SUCHE / 404
   ========================================================= */
.search-form { display: flex; gap: var(--space-2); max-width: 26rem; }
.search-form input[type="search"] {
  flex: 1;
  min-width: 0;
  font: inherit;
  padding: 0.7em 1em;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-s);
  color: var(--color-ink);
}
.search-form input[type="search"]:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 0; }

/* --- FluentForms (Wrapper-Klasse ist ffs_default, nicht .ff-default) --- */

/* Sichtbarer 2px-Fokus-Ring auf allen Feldern (Kat. #13).
   !important nötig: FluentForms-Plugin-CSS lädt nach dem Theme
   und setzt outline auf none. */
.ffs_default .ff-el-form-control:focus,
.ffs_default input:focus,
.ffs_default textarea:focus,
.ffs_default select:focus {
  outline: 2px solid var(--color-focus) !important;
  outline-offset: 1px;
  border-color: var(--color-focus) !important;
}

/* Submit-Buttons ins Pill-System der Site überführen */
.ffs_default .ff-btn-submit,
.ffs_default button[type="submit"] {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.9em 1.6em;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  background-color: var(--color-navy);
  color: #fff;
  cursor: pointer;
}
.ffs_default .ff-btn-submit:hover,
.ffs_default button[type="submit"]:hover { background-color: var(--color-navy-800); }
@media (prefers-reduced-motion: no-preference) {
  .ffs_default .ff-btn-submit { transition: transform 150ms var(--ease-out), box-shadow 150ms var(--ease-out), background-color 150ms var(--ease-out); }
  .ffs_default .ff-btn-submit:hover { transform: translateY(-1px); box-shadow: var(--shadow-m); }
}

/* Checkboxen/Radios (Symptom-Check): gestylt statt 13px-Native */
.ffs_default input[type="checkbox"],
.ffs_default input[type="radio"] {
  accent-color: var(--color-red);
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  margin-right: 0.5em;
  vertical-align: middle;
  cursor: pointer;
}
.ffs_default .ff-el-form-check-label { display: flex; align-items: flex-start; gap: 0.35em; cursor: pointer; }
.ffs_default .ff-el-form-check-label input[type="checkbox"],
.ffs_default .ff-el-form-check-label input[type="radio"] { flex: none; margin-top: 0.15em; }

/* --- Themenkompass: Personalisierung via ?gemeinde=X --- */
.gemeinde-greeting {
  font-family: var(--font-head);
  font-size: var(--text-lead);
  font-style: italic;
  color: var(--color-red-700);
  margin: var(--space-3) 0 0;
}
#ihre-gemeinde li.gemeinde-hit {
  background: var(--color-red-100);
  border-radius: var(--radius-s);
  padding: 0.15em 0.5em;
  font-weight: 600;
  color: var(--color-ink);
  width: fit-content;
}

.error-404 { text-align: center; padding-block: var(--space-24); }
.error-404 .err-code {
  font-family: var(--font-head);
  font-size: clamp(5rem, 18vw, 10rem);
  font-weight: 560;
  line-height: 1;
  color: var(--color-navy);
  position: relative;
  display: inline-block;
}
.error-404 .err-code .err-dot { color: var(--color-red); }
.error-404 h1 { margin-top: var(--space-4); }
.error-404 p { max-width: 34rem; margin-inline: auto; }
.error-404 .search-form { margin: var(--space-8) auto 0; }

/* Zahlen-Counter (#8) */
.stat-num { font-family: var(--font-head); font-size: clamp(2.2rem, 4vw, 3rem); font-weight: 560; color: var(--color-red); line-height: 1; font-variant-numeric: tabular-nums; }

/* WP-Basics */
.aligncenter { margin-inline: auto; }
.alignleft { float: left; margin: 0 var(--space-6) var(--space-4) 0; }
.alignright { float: right; margin: 0 0 var(--space-4) var(--space-6); }
.wp-block-image img { border-radius: var(--radius-l); }
.wp-block-quote { border-left: 3px solid var(--color-red); }
.screen-reader-text {
  clip-path: inset(50%);
  height: 1px; width: 1px;
  overflow: hidden;
  position: absolute !important;
  white-space: nowrap;
}
