/* =======================================================================
   Bohlhof Navigation — Single Source of Truth
   -----------------------------------------------------------------------
   Hier leben ALLE Styles fuer Header, Desktop-Navigation, Dropdowns und
   mobiles Menue. Einzelne HTML-Seiten enthalten diese Regeln nicht mehr
   inline — Aenderungen hier wirken automatisch auf alle Seiten.

   Startseite-Spezialfall:
     <header id="siteHeader" class="... over-hero">
   Darueber liegt das Hero-Video. Solange nicht gescrollt wird, ist der
   Header transparent und die Schrift hell (mit Textschatten). Sobald JS
   .header-light setzt, schaltet er auf den Frost-Look um.

   Inner-Pages: kein .over-hero — der frostige Look ist direkt aktiv.
   ======================================================================= */

/* -----------------------------------------------------------------------
   1) Header Shell — frosted glass als Default (Inner-Pages)
   ----------------------------------------------------------------------- */
#siteHeader .header-shell {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  transition: background-color 0.25s ease, box-shadow 0.25s ease,
              border-color 0.25s ease, backdrop-filter 0.25s ease;
}

/* -----------------------------------------------------------------------
   2) Text & Hover-Farben — dunkel auf hellem Frost (Default)
   ----------------------------------------------------------------------- */
#siteHeader .header-text {
  color: #0f172a;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}
#siteHeader .header-link:hover {
  background: rgba(15, 23, 42, 0.08);
}

/* -----------------------------------------------------------------------
   3) Startseite (".over-hero") — transparent ueber Hero-Video
   ----------------------------------------------------------------------- */
#siteHeader.over-hero:not(.header-light) .header-shell {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
#siteHeader.over-hero:not(.header-light) .header-text {
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
#siteHeader.over-hero:not(.header-light) .header-link:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Startseite nach Scroll -> zurueck auf Frost (wird per JS .header-light getoggelt) */
#siteHeader.over-hero.header-light .header-shell {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
}
#siteHeader.over-hero.header-light .header-text {
  color: #0f172a;
  text-shadow: none;
}
#siteHeader.over-hero.header-light .header-link:hover {
  background: rgba(15, 23, 42, 0.08);
}

/* -----------------------------------------------------------------------
   4) Desktop-Navigation: Basis-Layout
   ----------------------------------------------------------------------- */
#siteHeader nav.md\:flex {
  gap: 0.125rem;
}

#siteHeader .header-link {
  position: relative;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: 0.625rem;
  transition: color 0.18s ease, background-color 0.18s ease,
              box-shadow 0.18s ease;
}

@media (min-width: 768px) {
  #siteHeader nav.md\:flex .header-link {
    font-size: 0.95rem;
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }
}

/* -----------------------------------------------------------------------
   5) Aktiver Menuepunkt — gefuellte Pille (kontraststark, eindeutig)
   ----------------------------------------------------------------------- */
#siteHeader .header-link.is-active,
#siteHeader .header-link[aria-current="page"] {
  color: #0c4a6e !important;
  background: #e0f2fe;
  box-shadow: inset 0 0 0 1px rgba(14, 165, 233, 0.25);
  text-shadow: none !important;
}

/* Ueber dem Hero-Video: helle Pille auf dunklem Bildgrund */
#siteHeader.over-hero:not(.header-light) .header-link.is-active,
#siteHeader.over-hero:not(.header-light) .header-link[aria-current="page"] {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

/* -----------------------------------------------------------------------
   6) Dropdown-Chevron (SVG .nav-caret)
   ----------------------------------------------------------------------- */
#siteHeader .header-link .nav-caret {
  width: 0.7rem;
  height: 0.7rem;
  margin-left: 0.125rem;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
#siteHeader .group:hover .header-link .nav-caret,
#siteHeader .group:focus-within .header-link .nav-caret {
  transform: rotate(180deg);
}

/* -----------------------------------------------------------------------
   7) Dropdown-Panel
   ----------------------------------------------------------------------- */
#siteHeader .group > div.absolute {
  width: 16rem;
  padding: 0.375rem;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12),
              0 2px 8px rgba(15, 23, 42, 0.06);
  border-radius: 0.9rem;
  transform: translateY(2px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}
#siteHeader .group:hover > div.absolute,
#siteHeader .group:focus-within > div.absolute {
  transform: translateY(0);
}
#siteHeader .group > div.absolute a {
  border-radius: 0.55rem;
  padding: 0.55rem 0.75rem;
  line-height: 1.25;
  transition: background-color 0.15s ease, color 0.15s ease;
}
#siteHeader .group > div.absolute a:hover {
  background: #f1f5f9;
  color: #0369a1;
}
#siteHeader .group > div.absolute a.is-active {
  background: #e0f2fe;
  color: #075985;
  font-weight: 600;
}

/* -----------------------------------------------------------------------
   8) Mobile: aufgeklappter Zustand (siteHeader.nav-open)
   ----------------------------------------------------------------------- */
@media (max-width: 767px) {
  #siteHeader.nav-open { z-index: 50; }
  #siteHeader.nav-open .header-shell {
    background: #ffffff !important;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18) !important;
    border-color: #e2e8f0 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  #siteHeader.nav-open .header-text {
    color: #0f172a !important;
    text-shadow: none !important;
  }
  #siteHeader.nav-open .header-link:hover {
    background: #f1f5f9 !important;
  }
  #siteHeader.nav-open #menuToggle {
    border-color: #cbd5e1;
    color: #0f172a;
    background: #f8fafc;
  }
}

/* -----------------------------------------------------------------------
   9) Mobile-Nav — Kacheln, Gruppen, Akkordeon, Unterseiten
   ----------------------------------------------------------------------- */
.mobile-nav-tile {
  display: flex;
  min-height: 3rem;
  align-items: center;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.mobile-nav-tile:hover { background: #f8fafc; }
.mobile-nav-tile:active { background: #f1f5f9; }

.mobile-nav-group {
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  padding: 0.2rem 0.45rem 0.35rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.mobile-nav-accordion-trigger {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.35rem 0.2rem;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 0.5rem;
  -webkit-tap-highlight-color: transparent;
  font: inherit;
  text-align: left;
}
.mobile-nav-accordion-trigger:hover {
  background: rgba(255, 255, 255, 0.5);
}

.mobile-nav-group-title {
  margin: 0;
  flex: 1;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #1e293b;
}

.mobile-nav-chevron {
  width: 1.25rem;
  height: 1.25rem;
  color: #64748b;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.mobile-nav-accordion-trigger[aria-expanded="true"] .mobile-nav-chevron {
  transform: rotate(180deg);
}

.mobile-nav-accordion-panel { padding: 0.1rem 0 0.2rem; }
.mobile-nav-accordion-panel[hidden] { display: none !important; }

.mobile-nav-lead {
  display: flex;
  min-height: 2.75rem;
  align-items: center;
  border-radius: 0.5rem;
  padding: 0.5rem 0.625rem;
  margin-bottom: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s ease;
}
.mobile-nav-lead:hover { background: rgba(255, 255, 255, 0.75); }

.mobile-nav-sublist { display: flex; flex-direction: column; gap: 0.125rem; }

.mobile-nav-sub {
  display: flex;
  min-height: 2.75rem;
  align-items: center;
  border-radius: 0.375rem;
  padding: 0.5rem 0.625rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #334155;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s ease;
}
.mobile-nav-sub:hover { background: rgba(255, 255, 255, 0.65); }

/* Mobile: aktive Hervorhebung */
#siteHeader .mobile-nav-tile.is-active {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #075985;
}
#siteHeader .mobile-nav-sub.is-active,
#siteHeader .mobile-nav-lead.is-active {
  background: #e0f2fe;
  color: #075985;
  font-weight: 600;
}

/* -----------------------------------------------------------------------
   10) Logo-Karte
   ----------------------------------------------------------------------- */
#siteHeader a[href] > span.logo-box,
#siteHeader a[href] > span.rounded-xl.bg-white {
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

/* -----------------------------------------------------------------------
   11) Seitenweite Typografie — einheitliche Titel
   -----------------------------------------------------------------------
   Single Source of Truth fuer alle H1/H2/H3 der OEFFENTLICHEN Seiten.
   Admin-/Back-Office-Seiten (admin_*.html, tankstelle.html-Formular) sind
   bewusst ausgenommen und nutzen eigene Utility-Klassen.

   Spezifitaet: .page-title (0,1,0) + body (0,0,1) => (0,1,1) schlaegt
   einzelne Tailwind-Utilities wie .text-4xl ((0,1,0)). Damit brauchen wir
   kein !important und bleiben Tailwind-kompatibel.
   ----------------------------------------------------------------------- */
:root {
  --bohlhof-font-sans:
    "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji",
    sans-serif;
  --bohlhof-title-color: #0f172a;
}

html, body {
  font-family: var(--bohlhof-font-sans);
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

/* Hero-Titel auf der Startseite — bewusst groesser, skaliert mit Viewport */
body .hero-title {
  font-family: var(--bohlhof-font-sans);
  font-size: clamp(2.25rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* H1 aller Unterseiten — gleiche Groesse, gleiche Schrift, gleiche Farbe */
body .page-title {
  font-family: var(--bohlhof-font-sans);
  font-size: 2.25rem;        /* = text-4xl */
  line-height: 1.15;
  font-weight: 800;          /* = font-extrabold */
  letter-spacing: -0.01em;
  color: var(--bohlhof-title-color);
}
@media (min-width: 768px) {
  body .page-title {
    font-size: 3rem;         /* = text-5xl */
    line-height: 1.1;
  }
}

/* H2 — Section-Ueberschriften */
body .section-title {
  font-family: var(--bohlhof-font-sans);
  font-size: 1.5rem;         /* = text-2xl */
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--bohlhof-title-color);
}
@media (min-width: 768px) {
  body .section-title { font-size: 1.875rem; } /* = text-3xl */
}

/* H3 — Unterabschnitte */
body .subsection-title {
  font-family: var(--bohlhof-font-sans);
  font-size: 1.125rem;       /* = text-lg */
  line-height: 1.3;
  font-weight: 700;
  color: var(--bohlhof-title-color);
}
@media (min-width: 768px) {
  body .subsection-title { font-size: 1.25rem; } /* = text-xl */
}
