/**
 * File:    assets/css/main.css
 * Purpose: Design-Tokens, Basis, Typografie, Header, Navigation, Footer, Formulare, Buttons
 * Version: 1.0.0
 *
 * Aus dem alten Child (hjg-theme) übernommen, Beaver-Builder-Selektoren entfernt.
 *
 * Inhalte:
 *   1. CSS Custom Properties (Design-Tokens)
 *   2. Reset & Basis
 *   3. Typografie-Helferklassen
 *   4. Layout / Container
 *   5. Site-Header
 *   6. Navigation (Nav-Pille + Mobile)
 *   7. Site-Footer
 *   8. Utility / Accessibility
 */

/* ==========================================================================
   1. CSS Custom Properties — Hermann Jackson Design-Tokens
   ========================================================================== */

:root {
  /* --- Brand-Flaggen-Palette (aus Logo-Marke) --- */
  --brand-red:        #D21214;
  --brand-red-ink:    #AB0E10;
  --brand-yellow:     #FFD900;
  --brand-green:      #009844;

  /* --- Ink (Near-Black) --- */
  --ink-900: #1D1D1D;
  --ink-800: #1D1D1D;
  --ink-700: #2C2C2C;
  --ink-600: #2E333C;

  /* --- Neutrals --- */
  --white:        #FFFFFF;
  --neutral-50:   #F7F7F5;
  --neutral-100:  #F2F2F2;
  --neutral-200:  #ECEBE7;
  --neutral-300:  #E0DFDA;
  --neutral-400:  #C6C5BF;
  --neutral-500:  #9B9B95;
  --neutral-600:  #6B6E74;
  --neutral-700:  #43464D;
  --neutral-800:  #2A2D33;
  --neutral-900:  #1A1C20;

  /* --- Semantische Rollen --- */
  --color-primary:          var(--ink-800);
  --color-primary-hover:    #000000;
  --color-on-primary:       var(--white);
  --color-accent:           var(--brand-red);
  --color-accent-hover:     var(--brand-red-ink);
  --color-on-accent:        var(--white);

  --color-bg:               var(--white);
  --color-surface:          var(--white);
  --color-surface-muted:    var(--neutral-100);
  --color-surface-dark:     var(--ink-700);
  --color-footer:           var(--ink-900);

  --color-text:             var(--neutral-900);
  --color-text-body:        var(--neutral-700);
  --color-text-muted:       var(--neutral-600);
  --color-text-subtle:      var(--neutral-500);
  --color-text-inverse:     var(--white);
  --color-text-inverse-muted: rgba(255,255,255,0.66);

  --color-border:           var(--neutral-300);
  --color-border-strong:    var(--neutral-400);
  --color-border-dark:      rgba(255,255,255,0.14);
  --color-focus-ring:       rgba(210,18,20,0.40);

  /* Glass-Flächen über Architekturfotografie */
  --color-glass:            rgba(245,245,243,0.18);
  --color-glass-border:     rgba(255,255,255,0.30);
  --color-scrim:            rgba(12,13,16,0.45);
  --color-glass-overlay:    rgba(247,247,245,0.62); /* Lightbox-Hintergrund */

  /* --- Typografie --- */
  --font-sans:    'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: var(--font-sans);
  --font-body:    var(--font-sans);
  --font-heading: var(--font-sans);

  --fw-light:     300;
  --fw-regular:   400;
  --fw-semibold:  600;
  --fw-bold:      700;
  --fw-extrabold: 800;

  --text-2xs:  12px;
  --text-xs:   13px;
  --text-sm:   14px;
  --text-base: 16px;
  --text-md:   18px;
  --text-lg:   22px;
  --text-xl:   28px;
  --text-2xl:  36px;
  --text-3xl:  48px;
  --text-4xl:  64px;
  --text-5xl:  88px;
  --text-6xl:  120px; /* Hero-Display (XD: 120px bei 1920px) */

  /* Fluid-Typografie */
  --font-size-base: clamp(1rem, 1vw + 0.75rem, 1.125rem);
  --font-size-sm:   clamp(0.875rem, 0.8vw + 0.6rem, 1rem);
  --font-size-lg:   clamp(1.125rem, 1.5vw + 0.75rem, 1.375rem);
  --font-size-xl:   clamp(1.25rem, 2vw + 0.75rem, 1.75rem);
  --font-size-2xl:  clamp(1.5rem, 3vw + 0.5rem, 2.25rem);
  --font-size-4xl:  clamp(2rem, 5vw + 0.5rem, 3.5rem);

  --leading-compact: 0.92; /* mehrzeilige Display-Headlines */
  --leading-none:    1.0;
  --leading-display: 1.04;
  --leading-tight:   1.15;
  --leading-snug:    1.3;
  --leading-normal:  1.6;
  --leading-relaxed: 1.75;

  --tracking-tight:  -0.02em;
  --tracking-snug:   -0.01em;
  --tracking-normal:  0;
  --tracking-wide:    0.04em;
  --tracking-label:   0.10em;
  --tracking-wider:   0.16em;

  /* --- Abstände (4px-Raster) --- */
  --space-1:   4px;
  --space-2:   8px;
  --space-3:   12px;
  --space-4:   16px;
  --space-5:   20px;
  --space-6:   24px;
  --space-8:   32px;
  --space-10:  40px;
  --space-12:  48px;
  --space-14:  56px;
  --space-16:  64px;
  --space-20:  80px;
  --space-24:  96px;
  --space-32:  128px;

  /* Fluid-Abstände */
  --space-section: clamp(3rem, 8.33vw, 10rem);   /* XD: 160px bei 1920px */
  --space-block:   clamp(1.5rem, 4vw, 3rem);
  --space-col-gap: clamp(2rem, 3.75vw, 4.5rem);  /* Spaltenabstand, XD: 72px */

  /* --- Layout --- */
  /* XD: Inhalt 1600px breit, bei 1920px also 160px Rand links/rechts */
  --page-margin:       clamp(1.25rem, 6.25vw, 7.5rem);
  --content-max:       1600px;
  --container-max:     calc(var(--content-max) + 2 * var(--page-margin));
  --container-narrow:  720px;
  --container-padding: var(--page-margin);
  /* Abstand vom Viewport-Rand bis zur Inhaltskante (für randlose Sektionen) */
  --gutter:            max(var(--page-margin), calc((100vw - var(--content-max)) / 2));
  --header-height:     94px;

  /* --- Radien --- */
  --radius-none: 0;
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-pill: 999px;
  --radius-full: 50%;
  /* Parent-Kompatibilität */
  --radius:      6px;

  /* --- Schatten --- */
  --shadow-xs: 0 1px 2px rgba(12,13,16,0.06);
  --shadow-sm: 0 2px 6px rgba(12,13,16,0.07);
  --shadow-md: 0 6px 18px rgba(12,13,16,0.10);
  --shadow-lg: 0 14px 40px rgba(12,13,16,0.14);
  --shadow-xl: 0 24px 64px rgba(12,13,16,0.20);
  --shadow:    var(--shadow-md);

  /* --- Motion --- */
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out:      cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast:      140ms;
  --dur-base:      220ms;
  --dur-slow:      400ms;
  --transition-base:  all var(--dur-base) var(--ease-standard);
  --transition-fast:  all var(--dur-fast) var(--ease-standard);

  /* --- Navigation --- */
  --nav-dropdown-z: 200;

  /* --- Runde Pfeil-Buttons (Abschnitt 18) ---
     Ein Chevron für alle: 24er-Viewbox, Strichstärke 2, runde Enden.
     Farben im SVG entsprechen --white / --ink-800 (data-URIs können keine Variablen). */
  --arrow-btn-size:  36px;
  --arrow-icon-size: 14px;
  --arrow-chevron-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 5 16 12 9 19'/%3E%3C/svg%3E");
  --arrow-chevron-dark:  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D1D1D' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 5 16 12 9 19'/%3E%3C/svg%3E");
}

/* ==========================================================================
   2. Reset & Basis
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: var(--fw-regular);
  font-size: var(--font-size-base);
  line-height: var(--leading-normal);
  color: var(--color-text-body);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  margin-block: 0;
  color: var(--color-text);
  font-family: var(--font-heading);
  font-weight: var(--fw-extrabold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-snug);
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a {
  color: inherit;
  text-decoration: none;
}

img, svg, video {
  display: block;
  max-width: 100%;
  height: auto;
}

address { font-style: normal; }

::selection {
  background: var(--brand-red);
  color: #fff;
}

:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-focus-ring);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ==========================================================================
   3. Typografie — Überschriften & Fließtext
   ========================================================================== */

/*
 * H1 — Seitentitel: ExtraBold, UPPERCASE, fluid 40px → 64px
 * Wird für Seitentitel wie "LEISTUNGEN", "KONTAKT" verwendet.
 */
h1 {
  font-weight: var(--fw-extrabold);
  font-size: clamp(2.5rem, 5vw + 1rem, 4rem);
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-tight);
  text-transform: uppercase;
  color: var(--color-text);
}

/*
 * H2 — Sektionstitel: Regular, Sentence Case, fluid 26px → 36px
 * Ruhige Strukturüberschrift wie "Referenzen", "Über uns".
 */
h2 {
  font-weight: var(--fw-regular);
  font-size: clamp(1.625rem, 2.5vw + 0.75rem, 2.25rem);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-snug);
  text-transform: none;
  color: var(--color-text);
}

/*
 * H3 — Unterüberschrift: Bold, fluid 20px → 28px
 */
h3 {
  font-weight: var(--fw-bold);
  font-size: clamp(1.25rem, 1.5vw + 0.75rem, 1.75rem);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-snug);
  color: var(--color-text);
}

/*
 * H4 — Card-Titel: Bold, fluid 18px → 22px
 */
h4 {
  font-weight: var(--fw-bold);
  font-size: clamp(1.125rem, 0.8vw + 0.875rem, 1.375rem);
  line-height: var(--leading-tight);
  color: var(--color-text);
}

/*
 * H5 / H6 — Eyebrow-Ebene: Bold, UPPERCASE, tracked
 */
h5, h6 {
  font-weight: var(--fw-bold);
  font-size: var(--text-sm);
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: var(--color-text-muted);
}

/* Fließtext */
p {
  font-size: var(--font-size-base);
  line-height: var(--leading-normal);
  color: var(--color-text-body);
}

/* Links im Fließtext */
.entry-content a,
.wp-block-post-content a {
  color: var(--brand-red);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color var(--dur-fast) var(--ease-standard);
}

.entry-content a:hover,
.wp-block-post-content a:hover {
  color: var(--brand-red-ink);
}

/* ==========================================================================
   4. Layout / Container
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--page-margin);
}

.site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Bausteine regeln ihre Breiten selbst — kein Container um den Inhalt */
.site-content,
.site-main,
#main,
#content {
  flex: 1;
  width: 100%;
  max-width: none;
  padding: 0;
  margin: 0;
}

/* Parent-Reste, die den Inhalt einengen könnten */
.site-main > .container,
.site-content > .container {
  max-width: none;
  padding: 0;
}

/* Automatischen Seitentitel und Edit-Link verstecken (Fallback-CSS) */
.entry-title,
.entry-header,
.entry-footer .edit-link {
  display: none;
}

/* ==========================================================================
   5. Site-Header
   ========================================================================== */

/*
 * Normal: sticky, weißer Hintergrund im Dokumentenfluss.
 *         On scroll (JS: .is-scrolled) → transparent + Blur.
 * Transparent (has-transparent-header): fixed, immer transparent, liegt über dem Content.
 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 0; /* Parent: Linie unter dem Header – hier über box-shadow */
  background: var(--color-surface);
  box-shadow: 0 1px 0 var(--color-border);
  transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

.site-header.is-scrolled {
  background: transparent;
  box-shadow: none;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.has-transparent-header .site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  box-shadow: none;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  height: var(--header-height);
  padding-inline: var(--page-margin);
  max-width: var(--container-max);
  margin-inline: auto;
  width: 100%;
}

/* --- Logo --- */
.site-header__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.site-header__logo-img {
  height: 46px;
  width: auto;
  display: block;
}

/* Standard: dunkles Logo sichtbar, weißes unsichtbar */
.site-header__logo-img--white {
  display: none;
}

/* Transparent-Header: weißes Logo */
.has-transparent-header .site-header__logo-img--dark {
  display: none;
}
.has-transparent-header .site-header__logo-img--white {
  display: block;
}

/* Transparent-Header mit dunklem Logo (Seitenoption „Dunkles Logo“) */
.has-transparent-header.has-dark-logo .site-header__logo-img--dark {
  display: block;
}
.has-transparent-header.has-dark-logo .site-header__logo-img--white {
  display: none;
}

/* Gescrollter Header: immer dunkles Logo — überschreibt auch Transparent-Variante */
.site-header.is-scrolled .site-header__logo-img--dark,
.has-transparent-header .site-header.is-scrolled .site-header__logo-img--dark {
  display: block;
}
.site-header.is-scrolled .site-header__logo-img--white,
.has-transparent-header .site-header.is-scrolled .site-header__logo-img--white {
  display: none;
}

/* --- Aktionen rechts --- */
.site-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

/* Icon-Buttons — immer dunkles Glas */
.site-header__icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--white);
  font-size: 17px;
  text-decoration: none;
  transition: var(--transition-base);
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.site-header__icon-btn:hover {
  background: rgba(0, 0, 0, 0.55);
  border-color: rgba(255, 255, 255, 0.28);
}

/* ==========================================================================
   6. Navigation
   ========================================================================== */

/* Nav-Pille: zentrierter schwarzer Chip mit weißen Links */
.main-navigation {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav__pill {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: 8px var(--space-3);
  background: var(--ink-800);
  border-radius: var(--radius-pill);
}

/* Auf Hero-Seiten: leicht transluzente Nav-Pille statt Vollschwarz */
.has-transparent-header .nav__pill {
  background: rgba(20,23,27,0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Nav-Liste (vom Parent-Walker) */
.nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

/* Nav-Links */
.nav__link {
  display: block;
  padding: 10px var(--space-5);
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-weight: var(--fw-semibold);
  font-size: 15px;
  line-height: 1;
  color: var(--white);
  white-space: nowrap;
  text-decoration: none;
  text-underline-offset: 5px;
  text-decoration-thickness: 2px;
  transition: background var(--dur-fast) var(--ease-standard);
}

.nav__link:hover {
  background: rgba(255,255,255,0.12);
}

/* Parent färbt Links bei Fokus hellgrau hinterlegt – hier nur der Fokusring */
.nav__link:focus-visible {
  background: transparent;
}

/* Aktiver Link: fett + unterstrichen, weiß wie die übrigen Links (Parent färbt ihn sonst dunkel) */
.nav__item--active .nav__link,
.nav__item--ancestor .nav__link,
.nav__item--active > .nav__link,
.nav__item--ancestor > .nav__link {
  color: var(--white);
  font-weight: var(--fw-bold);
  text-decoration: underline;
}

/* --- Hamburger-Button (Mobile) --- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-base);
}

.nav-toggle:hover {
  background: var(--neutral-100);
}

.nav-toggle__bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: var(--transition-base);
}

/* Auf Hero-Seiten: weißer Hamburger */
.has-transparent-header .nav-toggle {
  border-color: var(--color-glass-border);
}
.has-transparent-header .nav-toggle__bar {
  background: var(--white);
}

/* Offen-State via Parent-JS (aria-expanded="true") */
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- Kontaktblock: nur im mobilen Menü --- */
.nav__meta {
  display: none;
}

/* --- Mobile (< 1024px): Vollbild-Menü unter dem Header ---
 * Gleiches Erscheinungsbild auf allen Seiten: Beim Öffnen wird der Header
 * weiß (dunkles Logo, dunkles X) — auch bei transparentem Header über dem Hero.
 * main.js setzt html.nav-is-open, solange .main-navigation.is-open aktiv ist. */
@media (max-width: 1023px) {
  .nav-toggle {
    display: flex;
  }

  .main-navigation {
    position: fixed;
    top: calc(var(--header-height) + var(--wp-admin--admin-bar--height, 0px));
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 999;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: var(--space-10);
    align-items: stretch; /* Parent zentriert die Navigation */
    padding: var(--space-4) var(--page-margin) var(--space-10);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition:
      opacity var(--dur-base) var(--ease-out),
      transform var(--dur-base) var(--ease-out),
      visibility 0s linear var(--dur-base);
  }

  .main-navigation.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition:
      opacity var(--dur-base) var(--ease-out),
      transform var(--dur-base) var(--ease-out),
      visibility 0s;
  }

  /* Desktop-Pille neutralisieren — auch die halbtransparente Variante */
  .nav__pill,
  .has-transparent-header .nav__pill {
    display: block;
    width: 100%;
    padding: 0;
    background: none;
    border-radius: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  /* Parent-Variante des mobilen Menüs (Box unter dem Header) zurücksetzen – hier ist das ganze
     Navigationsfeld das Menü (.main-navigation, fixed). */
  .main-navigation .nav__list {
    position: static;
    display: flex;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
  }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav__item {
    border-bottom: 1px solid var(--color-border);
  }

  /* Große Links mit dem einheitlichen Chevron (Token aus Abschnitt 18) */
  .nav__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-5) 0;
    border-radius: 0;
    font-size: clamp(1.375rem, 5.5vw, 1.75rem);
    font-weight: var(--fw-bold);
    line-height: var(--leading-tight);
    color: var(--color-text);
    white-space: normal;
    text-decoration: none;
  }

  .nav__link::after {
    content: '';
    flex: 0 0 auto;
    width: var(--arrow-icon-size);
    height: var(--arrow-icon-size);
    background: var(--arrow-chevron-dark) center / contain no-repeat;
    transition: transform var(--dur-fast) var(--ease-standard);
  }

  .nav__link:hover,
  .nav__link:focus-visible {
    background: none;
  }

  .nav__link:hover::after {
    transform: translateX(4px);
  }

  .nav__item--active .nav__link,
  .nav__item--ancestor .nav__link {
    color: var(--color-text);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 6px;
  }

  /* Direkter Kontakt am Menüende */
  .nav__meta {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
  }

  .nav__meta-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--font-size-base);
    font-weight: var(--fw-semibold);
    color: var(--color-text);
  }

  .nav__meta-link i {
    width: 1.25em;
    text-align: center;
    color: var(--color-text-muted);
  }

  /* --- Zustand „Menü offen“: Header immer weiß, Seite dahinter fixiert --- */
  html.nav-is-open {
    overflow: hidden;
  }

  .nav-is-open .site-header,
  .nav-is-open .has-transparent-header .site-header {
    background: var(--color-surface);
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .nav-is-open .site-header .site-header__logo-img--dark,
  .nav-is-open .has-transparent-header .site-header .site-header__logo-img--dark {
    display: block;
  }

  .nav-is-open .site-header .site-header__logo-img--white,
  .nav-is-open .has-transparent-header .site-header .site-header__logo-img--white {
    display: none;
  }

  .nav-is-open .nav-toggle,
  .nav-is-open .has-transparent-header .nav-toggle {
    border-color: var(--color-border);
  }

  /* Glas-Icons sind für Fotos gedacht — auf Weiß voll schwarz */
  .nav-is-open .site-header__icon-btn {
    background: var(--color-primary);
    border-color: var(--color-primary);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .nav-is-open .nav-toggle__bar,
  .nav-is-open .has-transparent-header .nav-toggle__bar {
    background: var(--color-text);
  }
}

@media (max-width: 1023px) and (prefers-reduced-motion: reduce) {
  .main-navigation,
  .main-navigation.is-open {
    transform: none;
    transition: none;
  }
}

@media (min-width: 1024px) {
  .nav-toggle {
    display: none;
  }
}

/* ==========================================================================
   7. Site-Footer
   ========================================================================== */

.site-footer {
  padding: 0; /* Parent-Polster, -Linie und -Schriftgröße zurücksetzen – Maße kommen aus __inner */
  border-top: 0;
  background: var(--color-footer);
  color: var(--white);
  font-size: var(--font-size-base);
}

.site-footer__inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding: var(--space-16) var(--page-margin) var(--space-8);
}

/* --- 3-Spalten-Grid: Kontakt | Öffnungszeiten | Logo --- */
.site-footer__top {
  display: grid;
  grid-template-columns: 1.2fr 1fr auto;
  gap: var(--space-10);
  align-items: start;
}

@media (max-width: 767px) {
  .site-footer__top {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .site-footer__col--logo {
    order: -1;
  }
}

/* --- Spalten-Titel --- */
.site-footer__col-title {
  font-family: var(--font-sans);
  font-weight: var(--fw-bold);
  font-size: 16px;
  line-height: 1;
  color: var(--white);
  margin: 0 0 var(--space-5);
}

/* --- Kontakt --- */
.site-footer__contact-grid {
  display: flex;
  gap: var(--space-12);
}

@media (max-width: 479px) {
  .site-footer__contact-grid {
    flex-direction: column;
    gap: var(--space-6);
  }
}

.site-footer__contact-details p,
.site-footer__contact-details {
  font-family: var(--font-sans);
  font-weight: var(--fw-regular);
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-text-inverse-muted);
  margin: 0;
}

.site-footer__contact-label {
  display: inline;
}

.site-footer__contact-details a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-standard);
}

.site-footer__contact-details a:hover {
  color: var(--white);
}

/* --- Adresse --- */
.site-footer__address {
  font-family: var(--font-sans);
  font-weight: var(--fw-regular);
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-text-inverse-muted);
  display: flex;
  flex-direction: column;
}

/* --- Öffnungszeiten --- */
.site-footer__hours {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.site-footer__hours-row {
  font-family: var(--font-sans);
  font-weight: var(--fw-regular);
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-text-inverse-muted);
  display: flex;
  gap: var(--space-6);
}

.site-footer__hours-day {
  min-width: 92px;
}

/* --- Logo --- */
.site-footer__logo {
  height: 52px;
  width: auto;
  display: block;
}

/* --- Trennlinie --- */
.site-footer__divider {
  height: 1px;
  background: var(--color-border-dark);
  margin-block: var(--space-10);
}

/* --- Firmenname --- */
.site-footer__company {
  font-family: var(--font-sans);
  font-weight: var(--fw-bold);
  font-size: 16px;
  line-height: 1;
  color: var(--white);
  margin: 0 0 var(--space-6);
}

/* --- Legal-Bar --- */
.site-footer__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.site-footer__legal {
  display: flex;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.site-footer__legal-link,
.site-footer__legal li a {
  font-family: var(--font-sans);
  font-weight: var(--fw-bold);
  font-size: 13px;
  line-height: 1;
  color: var(--white);
  text-decoration: none;
  transition: opacity var(--dur-fast) var(--ease-standard);
}

.site-footer__legal-link:hover,
.site-footer__legal li a:hover {
  opacity: 0.75;
}

/* Footer-Menü aus WP (Fallback) */
.site-footer__legal-list,
.site-footer__legal ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.site-footer__legal-list li,
.site-footer__legal ul li {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer__legal-list li a,
.site-footer__legal ul li a {
  font-family: var(--font-sans);
  font-weight: var(--fw-bold);
  font-size: 13px;
  line-height: 1;
  color: var(--white);
  text-decoration: none;
  transition: opacity var(--dur-fast) var(--ease-standard);
}

.site-footer__legal-list li a:hover,
.site-footer__legal ul li a:hover {
  opacity: 0.75;
}

/* --- Social-Icons --- */
.site-footer__socials {
  display: flex;
  gap: var(--space-4);
}

.site-footer__social-link {
  color: var(--white);
  font-size: 18px;
  line-height: 1;
  text-decoration: none;
  transition: opacity var(--dur-fast) var(--ease-standard);
}

.site-footer__social-link:hover {
  opacity: 0.75;
}

/* --- Copyright --- */
.site-footer__copyright {
  font-family: var(--font-sans);
  font-weight: var(--fw-regular);
  font-size: 12px;
  color: var(--color-text-inverse-muted);
  margin: var(--space-4) 0 0;
}

/* ==========================================================================
   8. Utility / Accessibility
   ========================================================================== */

/* Skip-Link (ausgegeben vom Parent via wp_body_open) */
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
  text-decoration: none;
}

.skip-link:focus {
  position: fixed;
  top: var(--space-4);
  left: var(--space-4);
  z-index: 10000;
  width: auto;
  height: auto;
  padding: var(--space-3) var(--space-5);
  clip: auto;
  background: var(--color-primary);
  color: var(--white);
  font-size: 14px;
  font-weight: var(--fw-bold);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-lg);
}

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

.screen-reader-text:focus {
  position: fixed;
  top: var(--space-4);
  left: var(--space-4);
  z-index: 10000;
  width: auto;
  height: auto;
  padding: var(--space-3) var(--space-5);
  clip: auto;
  background: var(--color-primary);
  color: var(--white);
  font-size: 14px;
  font-weight: var(--fw-bold);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-lg);
}

/* ==========================================================================
   9. Forms
   ========================================================================== */

/* --- Basis-Reset --- */
input,
textarea,
select,
button {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  box-sizing: border-box;
}

/* --- Labels --- */
label,
.wpcf7 label {
  display: block;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--fw-regular);
  color: var(--color-text-body);
  margin-bottom: var(--space-2);
}

/* --- Text-Inputs, Textarea, Select --- */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="password"],
input[type="search"],
input[type="date"],
input[type="time"],
textarea,
select,
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 textarea,
.wpcf7 select {
  display: block;
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="tel"]::placeholder,
input[type="url"]::placeholder,
input[type="number"]::placeholder,
input[type="password"]::placeholder,
input[type="search"]::placeholder,
textarea::placeholder {
  color: var(--color-text-subtle);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
textarea:focus,
select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-focus-ring);
}

/* --- Textarea --- */
textarea {
  resize: vertical;
  min-height: 140px;
}

/* --- Select: Custom Pfeil --- */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231D1D1D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  padding-right: var(--space-10);
  cursor: pointer;
}

/* --- Checkbox & Radio --- */
input[type="checkbox"],
input[type="radio"] {
  width: 18px;
  height: 18px;
  margin: 0 var(--space-2) 0 0;
  border: 1.5px solid var(--color-border-strong);
  background: var(--color-surface);
  cursor: pointer;
  flex-shrink: 0;
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  vertical-align: middle;
  transition: border-color 0.2s ease, background 0.2s ease;
}

input[type="checkbox"] {
  border-radius: 4px;
}

input[type="radio"] {
  border-radius: var(--radius-full);
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 5px;
  width: 5px;
  height: 9px;
  border: 2px solid var(--white);
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  background: var(--white);
  border-radius: var(--radius-full);
  transform: translate(-50%, -50%);
}

input[type="checkbox"]:focus,
input[type="radio"]:focus {
  box-shadow: 0 0 0 3px var(--color-focus-ring);
  outline: none;
}

/* Checkbox-Label inline */

.wpcf7 .wpcf7-checkbox,
.wpcf7 .wpcf7-acceptance {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}

.wpcf7 .wpcf7-acceptance .wpcf7-list-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  margin: 0;
}

/* --- Buttons (Form-Submit) — via Button-System (Abschnitt 10) --- */
input[type="submit"],
button[type="submit"],
.wpcf7 input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px var(--space-8);
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
  line-height: 1;
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

input[type="submit"]:hover,
button[type="submit"]:hover,
.wpcf7 input[type="submit"]:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
}

/* --- Fehlermeldungen (CF7 / FL) --- */
.wpcf7-not-valid-tip {
  display: block;
  margin-top: var(--space-1);
  font-size: var(--text-xs);
  color: var(--brand-red);
}

.wpcf7-not-valid {
  border-color: var(--brand-red) !important;
}

.wpcf7-response-output {
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-radius: 8px;
  font-size: var(--text-sm);
  border: 1px solid var(--color-border);
}

/* ==========================================================================
   10. Buttons
   --------------------------------------------------------------------------
   Pill-Buttons. Core-Button: Modifier als Klasse am Button-Block
   (.wp-block-button.btn--sm), sonst direkt am Element (.btn.btn--sm).
   ========================================================================== */

/* --- Basis (Shape, Typo, Layout) --- */
.btn,
.wp-block-button__link,
.wp-element-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 14px var(--space-8);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
  line-height: 1;
  text-decoration: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

/* --- Primary (Standard) --- */
.btn,
.btn--primary,
.wp-block-button__link,
.wp-element-button {
  background: var(--color-primary);
  color: var(--color-on-primary);
  border: 2px solid var(--color-primary);
}

.btn:hover,
.btn--primary:hover,
.wp-block-button__link:hover,
.wp-element-button:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  color: var(--color-on-primary);
}

/* --- Secondary (Outline) --- */
.btn.btn--secondary,
.wp-block-button.btn--secondary > .wp-block-button__link,
.wp-block-button.is-style-outline > .wp-block-button__link {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn.btn--secondary:hover,
.wp-block-button.btn--secondary > .wp-block-button__link:hover,
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
  background: var(--color-primary);
  color: var(--color-on-primary);
}

/* --- Accent (Rot) --- */
.btn.btn--accent,
.wp-block-button.btn--accent > .wp-block-button__link {
  background: var(--color-accent);
  color: var(--color-on-accent);
  border-color: var(--color-accent);
}

.btn.btn--accent:hover,
.wp-block-button.btn--accent > .wp-block-button__link:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

/* --- Ghost (auf dunklen Flächen) --- */
.btn.btn--ghost,
.wp-block-button.btn--ghost > .wp-block-button__link {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn.btn--ghost:hover,
.wp-block-button.btn--ghost > .wp-block-button__link:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--white);
}

/* --- Größen --- */
.btn.btn--sm,
.wp-block-button.btn--sm > .wp-block-button__link {
  padding: 10px var(--space-6);
  font-size: var(--text-sm);
}

.btn.btn--lg,
.wp-block-button.btn--lg > .wp-block-button__link {
  padding: 18px var(--space-10);
  font-size: var(--text-md);
}

/* --- Focus --- */
.btn:focus-visible,
.wp-block-button__link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-focus-ring);
}

