/* ============================================================
   Power4Locals GmbH — styles.css
   Custom styles complementing Tailwind CSS
   ============================================================ */


/* ---------- CSS Custom Properties ---------- */
:root {
  --color-navy: #0f2d52;
  --color-blue: #1a4a8a;
  --color-orange: #f97316;
  --color-orange-dark: #ea6c0a;
  --color-orange-light: #fdba74;
  /* Schrift auf orangen Flächen (WCAG AA, Entscheidung 16.11.2026):
     Navy auf #F97316 = 4,94:1 (Weiß nur 2,8:1). Hover wird HELLER
     (#FB923C, Navy darauf 6,11:1) – Navy auf #EA6C0A hätte nur 4,38:1.
     Icons, Rahmen, Balken, Akzente bleiben #F97316. */
  --color-on-orange: var(--color-navy);
  --color-orange-hover: #fb923c;
  /* Orange als TEXT auf hellem Grund (Weiß, Grau-50/100, Orange-Tönungen):
     dunkles Orange, gleicher Farbton wie #F97316. #BA4F05 ist der hellste
     Ton, der auf ALLEN hellen Gründen der Seite 4,5:1 schafft (Weiß 4,99,
     Orange/10 4,51). Tailwind: text-orange-ink / hover:text-orange-ink-dark.
     Auf Navy statt dessen #FB923C (text-orange-soft). */
  --color-orange-text: #ba4f05;
  --color-orange-text-hover: #a14504;
  --color-white: #ffffff;
  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-600: #4b5563;
  --color-gray-700: #374151;
  --color-gray-900: #111827;
  --color-red: #ef4444;
  --color-yellow: #f59e0b;
  --color-green: #22c55e;

  --font-family: 'Inter', sans-serif;
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,.1), 0 2px 6px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.12), 0 4px 10px rgba(0,0,0,.06);
  --shadow-xl: 0 20px 50px rgba(0,0,0,.15);
  --border-radius: 12px;
  --border-radius-lg: 20px;

  /* ---- Fixierte Kopfzeile: Topbar + Navbar ----
     Höhe der kompletten fixierten Kopfleiste. Wird von app.js beim Laden
     und bei Resize auf den exakt gemessenen Wert (header.offsetHeight)
     gesetzt; die Werte hier sind ein robuster Fallback ohne JS.
     Desktop (>=1024px): Topbar 60 + Nav 80 = 140px */
  --topbar-h: 60px;
  --nav-h: 80px;
  --header-h: calc(var(--topbar-h) + var(--nav-h));
}

/* ---------- Icons (Inline-SVG statt Font-Awesome-Webfont) ----------
   Icon-Pfade: Font Awesome Free 6.7.2 by @fontawesome – https://fontawesome.com
   Lizenz der Icons: CC BY 4.0 (https://fontawesome.com/license/free),
   Copyright 2024 Fonticons, Inc.
   Markup: <svg class="icon icon-NAME" width="…em" viewBox="0 0 W 512" aria-hidden="true">.
   Maße wie beim Webfont: Höhe 1em, Breite = W/512 em (width-Attribut,
   entspricht der Vorschubbreite der Glyphe), Grundlinie 0.125em tiefer.
   Größe und Farbe also weiter über font-size/color (text-xl, text-orange …).
   Box-Höhe wie beim <i>: eine Zeile (1lh). Tailwinds text-* setzt neben der
   Schriftgröße auch line-height (text-xl: 20px/28px); die Glyphe saß dann
   mittig in der Zeile. Daher Innenabstand oben/unten (1lh - 1em)/2 und die
   Grundlinie entsprechend tiefer. line-height: 1 wie Font Awesome.
   display/vertical-align explizit, weil Tailwinds Preflight svg auf
   display:block setzt. */
.icon {
  display: inline-block;
  box-sizing: content-box;
  height: 1em;
  line-height: 1;
  padding-block: calc((1lh - 1em) / 2);
  vertical-align: -0.125em;
  vertical-align: calc(0.375em - 0.5lh);
  fill: currentColor;
  overflow: visible;
}
.icon-spin { animation: icon-spin 2s linear infinite; }
@keyframes icon-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .icon-spin { animation: none; }
}

/* Tablet (<1024px): Nav ist niedriger (h-16 = 64px) */
@media (max-width: 1023px) {
  :root { --nav-h: 64px; }
}
/* Mobile (<768px): Topbar ist niedriger (min-height 54px) */
@media (max-width: 767px) {
  :root { --topbar-h: 54px; }
}

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

html {
  scroll-behavior: smooth;
  /* Anker-Ziele nicht unter die fixierte Kopfzeile scrollen, mit 16 px Luft –
     dieselben 16 px wie die Spruenge aus app.js (Klick-Handler, Aufruf mit
     #anker). Die nutzen window.scrollTo und werden hiervon nicht beeinflusst. */
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  font-family: var(--font-family);
  color: var(--color-gray-900);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Custom Scrollbar ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--color-gray-100); }
::-webkit-scrollbar-thumb {
  background: var(--color-blue);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--color-navy); }

/* ---------- Hero Gradient ---------- */
.hero-gradient {
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-blue) 60%, #1e3a6e 100%);
  position: relative;
  overflow: hidden;
}

.hero-gradient::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(249,115,22,.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(26,74,138,.4) 0%, transparent 50%);
  pointer-events: none;
}

.hero-gradient::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,.05));
  pointer-events: none;
}

/* ---------- Hero-Abstand zur fixierten Kopfzeile ----------
   Der erste Hero liegt unter der fixierten Kopfzeile (position:fixed).
   Padding-top = komplette Kopfzeilenhoehe (Topbar + Nav) + Puffer, damit der
   Hero-Text garantiert vollstaendig unterhalb der Navbar beginnt – auf allen
   Bildschirmgroessen. Ersetzt das fruehere feste pt-32 bzw. pt-36.
   Hoehere Spezifitaet als die Tailwind-Utilities, daher ohne !important. */
main > section.hero-gradient {
  padding-top: calc(var(--header-h) + 2.5rem);
}

/* ---------- Erster Inhaltsblock unter der fixierten Kopfzeile ----------
   Für alle Seiten, deren erster Block KEIN .hero-gradient ist (Blog, Blog-
   Artikel, AGB, Impressum, Datenschutz, Gratis-Inhalte, Mobile-Hero der
   Startseite). Diese hatten bisher ein hartkodiertes pt-32 / lg:pt-36 (128px
   bzw. 144px), das die tatsächliche Kopfzeilenhöhe NICHT mitverfolgt: sobald
   die Topbar auf schmalen Screens umbricht (ab ca. 320px wird die Kopfzeile
   136px hoch), rutschte der Inhalt darunter.
   --header-h wird von app.js (initHeaderHeightVar) per ResizeObserver immer
   auf die real gerenderte Höhe gesetzt – damit stimmt der Abstand auf jeder
   Breite und auch nach spätem Font-Nachladen.
   Doppelter Klassenselektor => Spezifität 0-2-0, schlägt zuverlässig die
   Tailwind-Utilities (pt-32 = 0-1-0), obwohl assets/tailwind.css als letztes
   Stylesheet NACH styles.css im <head> steht. */
.below-header.below-header {
  padding-top: calc(var(--header-h) + 2rem);
}

/* ---------- Gradient Text ---------- */
.gradient-text {
  background: linear-gradient(135deg, var(--color-orange) 0%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--color-orange);
  color: var(--color-on-orange);
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--border-radius);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition-base), transform var(--transition-fast), box-shadow var(--transition-base);
  box-shadow: 0 4px 14px rgba(249,115,22,.35);
  white-space: nowrap;
}

.btn-primary:hover {
  background: var(--color-orange-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(249,115,22,.45);
}

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

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--color-navy);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--border-radius);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition-base), transform var(--transition-fast);
  white-space: nowrap;
}

.btn-secondary:hover {
  background: var(--color-blue);
  transform: translateY(-2px);
}

.btn-outline-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 27px;
  background: transparent;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--border-radius);
  border: 2px solid rgba(255,255,255,.6);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition-base), border-color var(--transition-base), transform var(--transition-fast);
  white-space: nowrap;
}

.btn-outline-white:hover {
  background: rgba(255,255,255,.12);
  border-color: #fff;
  transform: translateY(-2px);
}

/* ---------- Card Hover ---------- */
.card-hover {
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.card-hover:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

/* ---------- Section Divider ---------- */
.section-divider {
  width: 60px;
  height: 4px;
  background: var(--color-orange);
  border-radius: 2px;
  margin: 0 auto 1.5rem;
}

.section-divider-left {
  width: 60px;
  height: 4px;
  background: var(--color-orange);
  border-radius: 2px;
  margin: 0 0 1.5rem;
}

/* ---------- Nur fuer Screenreader (.p4l-sr-only) ----------
   Visuell unsichtbar, aber im Accessibility-Tree vorhanden. Genutzt von
   der Counter-Animation in app.js (animateCounter): waehrend eine Zahl
   von 0 hochzaehlt, liest die Vorlesesoftware den echten Endwert aus
   einem solchen unsichtbaren Zwilling statt der Zwischenwerte.
   Bewusst als eigene Klasse und nicht als Tailwind-Utility (sr-only):
   der Tailwind-Build erzeugt nur Klassen, die in HTML/JS ausgeschrieben
   vorkommen (siehe scripts/README.md) – eine eigene Klasse ist davon
   unabhaengig. */
.p4l-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Sticky Nav ---------- */
#main-nav {
  transition: background var(--transition-base), box-shadow var(--transition-base), backdrop-filter var(--transition-base);
}

#main-nav.nav-scrolled {
  background: rgba(15,45,82,.96) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0,0,0,.25);
}

/* ---------- Mobile Menu ---------- */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu.open {
  max-height: 500px;
}

/* ---------- Navbar Responsive-Härtung ----------
   Reihe bricht nie um, Link-/Button-Text stapelt nie (kein „Übereinander"),
   Logo bleibt links & wird nie abgeschnitten. Ab <1024px übernimmt das
   Hamburger-Menü (Tailwind-Breakpoint lg = 1024px). */
#main-nav .max-w-7xl > .flex {
  flex-wrap: nowrap;      /* Kopfzeile nie in zweite Zeile umbrechen */
  gap: 0.75rem;           /* Mindestabstand zwischen Logo / Links / CTA */
  min-width: 0;
}
#main-nav a,
#main-nav .btn-primary { white-space: nowrap; }   /* Text nie auf 2 Zeilen */
#main-nav > .max-w-7xl > .flex > a,               /* Logo-Link */
#main-nav img { flex-shrink: 0; }                 /* Logo nie stauchen/abschneiden */

/* Enger Desktop-Bereich (1024–1279px): Abstände + CTA-Padding reduzieren,
   damit alle Menüpunkte + CTA garantiert nebeneinander passen.
   Seit "Über uns" dazugekommen ist, stehen hier bis zu SIEBEN Menüpunkte
   (Agentur, Akademie, Blog, Sichtbarkeits-Check, Whitepaper, Über uns,
   Kontakt) plus Logo und CTA in einer Zeile. Der Abstand ist deshalb von
   1.25rem auf 1rem reduziert – bei 1024px bleiben damit rund 35px Reserve.
   Wird ein achter Menüpunkt ergänzt, passt die Reihe nicht mehr: dann
   entweder einen Punkt entfernen oder den lg-Breakpoint der Navbar
   (Hamburger-Menü) nach oben ziehen. */
@media (min-width: 1024px) and (max-width: 1279px) {
  #main-nav .max-w-7xl > .flex > div { gap: 1rem; }
  #main-nav .btn-primary { padding-left: 0.9rem; padding-right: 0.9rem; }
}

/* ---------- Kontakt-Leiste rechts (.p4l-contact-rail) ----------
   Vertikale, fixierte Tab-Leiste am rechten Rand, vertikal mittig.
   Wird zentral von app.js (initContactRail) injiziert – die Ziel-Links
   stehen NICHT im HTML, sondern werden dort per JS zusammengesetzt.
   z-index unter dem Chat-Overlay (9999), aber über allem anderen.
   Kollision mit dem Nora-Button (unten rechts) ist ausgeschlossen:
   diese Leiste sitzt mittig, der Chat-Button unten. */
.p4l-contact-rail {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9990;
  display: flex;              /* Desktop UND Mobile sichtbar */
  flex-direction: column;
  gap: 4px;
}

.p4l-contact-rail a {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0F2D52;                 /* Navy */
  color: #fff;                         /* weißes Icon */
  font-size: 1.15rem;
  line-height: 1;
  border-radius: 8px 0 0 8px;
  box-shadow: -2px 2px 10px rgba(0, 0, 0, 0.28);
  text-decoration: none;
  transition: transform 0.2s ease, background-color 0.2s ease, filter 0.2s ease;
}

.p4l-contact-rail .pcr-whatsapp { background: #25D366; }   /* WhatsApp-Grün */

.p4l-contact-rail a:hover,
.p4l-contact-rail a:focus-visible {
  transform: translateX(-3px);         /* fährt leicht nach links aus */
  filter: brightness(1.15);
}

/* Mobile: etwas kleinere Tabs */
@media (max-width: 768px) {
  .p4l-contact-rail a { width: 40px; height: 40px; font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .p4l-contact-rail a { transition: none; }
  .p4l-contact-rail a:hover { transform: none; }
}

/* ---------- Mobile-Optimierung index.html (< 768px) ----------
   KI-Bot raus aus dem Split-Hero-Fließcontent → Floating-Button.
   Chat-Bubble wird auf Mobile zum Roboter im orangen Kreis, höher
   gesetzt (bottom:70px), damit sie die Sticky-Bottom-Bar nicht berührt. */
@media (max-width: 767px) {
  #splitscreen { display: none !important; }  /* Split-Hero auf Mobile aufgeben → Cards */
  .sp-divider { display: none !important; }   /* KI-Bot-Auslöser im Hero ausblenden */

  .page-index #p4l-chat-root { bottom: 70px; }
  .page-index .p4l-chat-toggle { background: var(--color-orange); }
  /* Früher wurde hier das Toggle-Icon ausgeblendet und per ::before durch
     ein Font-Awesome-Roboter-Glyph ersetzt. Seit dem Nora-SVG entfällt das:
     das Icon soll auf allen Seiten und Breakpunkten dasselbe sein.
     Hintergrund (orange) und höhere Position bleiben wie gehabt. */
}

/* ---------- FAQ Accordion ---------- */
.faq-item {
  border-bottom: 1px solid var(--color-gray-200);
}

.faq-item:last-child { border-bottom: none; }

.faq-btn {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-navy);
  font-family: var(--font-family);
  transition: color var(--transition-fast);
}

.faq-btn:hover { color: var(--color-blue); }

.faq-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-gray-100);
  border-radius: 50%;
  transition: transform var(--transition-base), background var(--transition-base);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-navy);
}

.faq-icon.open {
  transform: rotate(45deg);
  background: var(--color-orange);
  color: var(--color-on-orange);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-content.open {
  max-height: 600px;
}

.faq-content-inner {
  padding: 0 0 20px;
  color: var(--color-gray-600);
  line-height: 1.7;
}

/* ---------- Tab System ---------- */
.tab-btn {
  padding: 10px 20px;
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: 8px;
  border: 2px solid transparent;
  background: none;
  cursor: pointer;
  color: var(--color-gray-600);
  transition: all var(--transition-base);
  white-space: nowrap;
  font-family: var(--font-family);
}

.tab-btn:hover {
  background: var(--color-gray-100);
  color: var(--color-navy);
}

.tab-btn.active {
  background: var(--color-navy);
  color: #fff;
  border-color: var(--color-navy);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeInUp 0.35s ease forwards;
}

/* ---------- Pricing Cards ---------- */
.pricing-card {
  border-radius: var(--border-radius-lg);
  padding: 32px;
  background: #fff;
  border: 2px solid var(--color-gray-200);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.pricing-card:hover {
  border-color: var(--color-blue);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.pricing-featured {
  border-color: var(--color-orange) !important;
  transform: scale(1.04);
  box-shadow: 0 16px 48px rgba(249,115,22,.2), var(--shadow-lg);
  position: relative;
  z-index: 1;
}

.pricing-featured:hover {
  transform: scale(1.04) translateY(-4px);
}

/* ---------- Paketkarten mit gleicher Höhe und CTA am unteren Rand ----------
   Modifier, damit die bestehende .pricing-card auf den übrigen Tabs
   unverändert bleibt. Das Grid streckt die Karten ohnehin auf gleiche Höhe;
   flex + margin-top:auto schiebt den Button in allen Karten auf dieselbe
   Grundlinie, egal wie viele Leistungen aufgelistet sind. */
.pricing-card--stack {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.pricing-card--stack .pkg-list { flex: 1 1 auto; }
.pricing-card--stack .pkg-cta { margin-top: auto; }

/* Farbakzent je Paket: dünner Balken oben + eingefärbtes Label.
   Die Farbe kommt per --pkg-accent aus dem HTML, damit die Regel für alle
   drei Karten identisch bleibt. Bewusst dezent – die Karten behalten die
   einheitliche Optik der übrigen .pricing-card auf der Seite. */
.pricing-card--accent {
  position: relative;
  overflow: hidden;
  padding-top: 40px;
}
.pricing-card--accent::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: var(--pkg-accent, var(--color-orange));
}
.pkg-label {
  color: var(--pkg-accent, var(--color-navy));
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

/* "ab"-Preis als Orientierung: kleines "ab", große Zahl, Einheit darunter. */
.pkg-price { margin-bottom: 24px; }
.pkg-price-from {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-gray-600);
  margin-right: 5px;
}
.pkg-price-value {
  font-size: 2rem;
  font-weight: 900;
  color: var(--color-navy);
  letter-spacing: -0.02em;
}
.pkg-price-unit {
  display: block;
  font-size: 0.85rem;
  color: var(--color-gray-600);
  margin-top: 2px;
}

/* ---------- Package Popular Badge ---------- */
.package-popular {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  background: var(--color-orange);
  color: var(--color-on-orange);
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------- Traffic Light / Ampel ---------- */
.ampel-red { color: var(--color-red); }
.ampel-yellow { color: var(--color-yellow); }
.ampel-green { color: var(--color-green); }

.ampel-bg-red { background-color: #fef2f2; border-left: 4px solid var(--color-red); }
.ampel-bg-yellow { background-color: #fffbeb; border-left: 4px solid var(--color-yellow); }
.ampel-bg-green { background-color: #f0fdf4; border-left: 4px solid var(--color-green); }

.score-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.score-dot-red { background: var(--color-red); box-shadow: 0 0 6px rgba(239,68,68,.5); }
.score-dot-yellow { background: var(--color-yellow); box-shadow: 0 0 6px rgba(245,158,11,.5); }
.score-dot-green { background: var(--color-green); box-shadow: 0 0 6px rgba(34,197,94,.5); }

.score-bar {
  width: 100%;
  height: 8px;
  background: var(--color-gray-200);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 8px;
}

.score-fill {
  height: 100%;
  border-radius: 4px;
  width: 0%;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.score-fill-red { background: linear-gradient(90deg, var(--color-red), #f87171); }
.score-fill-yellow { background: linear-gradient(90deg, var(--color-yellow), #fcd34d); }
.score-fill-green { background: linear-gradient(90deg, var(--color-green), #4ade80); }

/* ---------- Loading Spinner ---------- */
.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--color-gray-200);
  border-top-color: var(--color-orange);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner-lg {
  width: 64px;
  height: 64px;
  border-width: 5px;
}

/* ---------- Shimmer Animation ---------- */
.shimmer {
  background: linear-gradient(90deg, var(--color-gray-100) 25%, var(--color-gray-200) 50%, var(--color-gray-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}

/* ---------- Counter Animation ---------- */
.counter-wrap {
  transition: opacity 0.3s ease;
}

/* ---------- Step Indicators ---------- */
.step-indicator {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-orange);
  color: var(--color-on-orange);
  font-weight: 700;
  font-size: 1.125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(249,115,22,.35);
}

.step-line {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--color-orange), var(--color-gray-200));
}

/* ---------- Testimonials ---------- */
.testimonial-card {
  background: #fff;
  border-radius: var(--border-radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-gray-100);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.testimonial-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.125rem;
  color: #fff;
  flex-shrink: 0;
}

.stars {
  color: #fbbf24;
  font-size: 1rem;
  letter-spacing: 1px;
}

/* ---------- Reviews Slider (Google-Bewertungen, 3 pro Ansicht) ---------- */
.reviews-slider {
  display: flex;
  gap: 32px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;              /* Firefox */
  padding: 6px 2px 12px;             /* Raum fuer Hover-Lift/Fokusring */
  /* NICHT ENTFERNEN. Gleicht die 2px Seiten-Padding fuer das Einrasten aus:
     Ohne scroll-padding-inline liegt die Einrast-Position der ersten Karte
     bei scrollLeft 2, der Slider rastet beim Laden von selbst um 2px ein.
     Chrome wertet das als Scroll und beendet die LCP-Messung -> PageSpeed
     meldete NO_LCP auf der Startseite. Ausserdem prueft atStart() in app.js
     auf scrollLeft <= 0; bei 2 blieb "Zurueck" am Anfang aktiv. */
  scroll-padding-inline: 2px;
}
.reviews-slider::-webkit-scrollbar { display: none; }  /* WebKit */

.reviews-slide {
  flex: 0 0 calc((100% - 64px) / 3); /* 3 pro Ansicht (2x 32px gap) */
  scroll-snap-align: start;
}

.reviews-nav {
  width: 46px; height: 46px;
  border-radius: 9999px;
  border: 2px solid var(--color-navy, #0f2d52);
  background: #fff;
  color: var(--color-navy, #0f2d52);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1rem; cursor: pointer;
  transition: background var(--transition-base), color var(--transition-base), opacity var(--transition-base);
}
.reviews-nav:hover { background: var(--color-navy, #0f2d52); color: #fff; }
.reviews-nav:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(249,115,22,0.5); }
.reviews-nav:disabled { opacity: 0.35; cursor: default; }
.reviews-nav:disabled:hover { background: #fff; color: var(--color-navy, #0f2d52); }

@media (max-width: 1023px) {
  .reviews-slide { flex-basis: calc((100% - 32px) / 2); } /* 2 pro Ansicht */
}
@media (max-width: 639px) {
  .reviews-slider { gap: 16px; }
  .reviews-slide { flex-basis: 100%; }                    /* 1 pro Ansicht */
}

/* ---------- Scroll Animations ---------- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

/* ---------- Pulse Ring ---------- */
.pulse-ring {
  position: relative;
}

.pulse-ring::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--color-orange);
  animation: pulse-ring 2s ease-out infinite;
}

/* ---------- Check List Items ---------- */
.check-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 10px;
  line-height: 1.6;
}

.check-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-orange);
  font-weight: 700;
}

/* ---------- Loading Steps ---------- */
.loading-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  opacity: 0.4;
  transition: opacity 0.4s ease;
}

.loading-step.done {
  opacity: 1;
}

.loading-step-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 13px;
  transition: background 0.4s ease, color 0.4s ease;
}

.loading-step.done .loading-step-icon {
  background: var(--color-green);
  color: #fff;
}

/* ---------- Overall Score Display ---------- */
.score-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font-weight: 800;
  font-size: 2.25rem;
  line-height: 1;
  border: 6px solid var(--color-gray-200);
  margin: 0 auto;
}

.score-circle-red { border-color: var(--color-red); color: var(--color-red); }
.score-circle-yellow { border-color: var(--color-yellow); color: var(--color-yellow); }
.score-circle-green { border-color: var(--color-green); color: var(--color-green); }

/* ---------- Score Card ---------- */
.score-card {
  background: #fff;
  border-radius: var(--border-radius);
  padding: 20px;
  border: 2px solid var(--color-gray-100);
  transition: border-color var(--transition-base);
}

.score-card-red { border-left: 4px solid var(--color-red); }
.score-card-yellow { border-left: 4px solid var(--color-yellow); }
.score-card-green { border-left: 4px solid var(--color-green); }

/* Website Performance Score – eigener großer Block unter den 4 Kacheln.
   Volle Breite, prominenter als eine Kachel, im bestehenden Stil. */
.perf-block {
  margin-top: 1rem;
  background: #fff;
  border-radius: var(--border-radius-lg);
  padding: 28px;
  border: 2px solid var(--color-gray-100);
  box-shadow: var(--shadow-sm);
}
.perf-block-red { border-left: 6px solid var(--color-red); }
.perf-block-yellow { border-left: 6px solid var(--color-yellow); }
.perf-block-green { border-left: 6px solid var(--color-green); }

.perf-block-head {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.perf-score-display {
  display: flex;
  align-items: baseline;
  flex-shrink: 0;
}
.perf-score-num {
  font-size: 3.25rem;
  font-weight: 900;
  line-height: 1;
}
.perf-score-num.perf-na { color: var(--color-gray-200); }
.perf-score-max {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-gray-600);
  margin-left: 4px;
}
.perf-block-body { min-width: 0; flex: 1; }
.perf-block-label {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--color-navy);
}
.perf-block-einschaetzung {
  margin-top: 4px;
  font-size: 0.9rem;
  color: var(--color-gray-600);
  line-height: 1.5;
}
.perf-block-ladezeit {
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--color-gray-600);
}
.perf-block-ladezeit strong { color: var(--color-navy); }

/* Mobil: Score über Text stapeln, etwas kompakter. */
@media (max-width: 640px) {
  .perf-block { padding: 20px; }
  .perf-block-head { gap: 14px; }
  .perf-score-num { font-size: 2.5rem; }
}

/* ---------- Keyframes ---------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.8; }
  80%, 100% { transform: scale(1.6); opacity: 0; }
}

@keyframes shimmer {
  from { background-position: -200% 0; }
  to { background-position: 200% 0; }
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* ---------- Result Section Animations ---------- */
#check-results {
  animation: scaleIn 0.5s ease forwards;
}

/* ---------- Responsive Adjustments ---------- */
@media (max-width: 768px) {
  .pricing-featured {
    transform: none;
  }

  .pricing-featured:hover {
    transform: translateY(-4px);
  }

  .btn-primary,
  .btn-secondary,
  .btn-outline-white {
    padding: 12px 20px;
    font-size: 0.9rem;
  }

  .tab-btn {
    padding: 8px 14px;
    font-size: 0.8rem;
  }

  .faq-btn {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .section-divider { margin: 0 auto 1rem; }

  .step-indicator {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}

/* ---------- Utility Additions ---------- */
.text-navy { color: var(--color-navy); }
.text-blue { color: var(--color-blue); }
.text-orange { color: var(--color-orange); }
.bg-navy { background-color: var(--color-navy); }
.bg-blue { background-color: var(--color-blue); }
.bg-orange { background-color: var(--color-orange); }

.border-orange { border-color: var(--color-orange); }

.shadow-orange { box-shadow: 0 4px 20px rgba(249,115,22,.3); }

/* ---------- Hero Badge ---------- */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(249,115,22,.18);
  border: 1px solid rgba(249,115,22,.4);
  border-radius: 99px;
  color: var(--color-orange-light);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* ---------- Trust Badge ---------- */
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
  color: rgba(255,255,255,.9);
  font-size: 0.875rem;
  font-weight: 500;
}

/* ---------- Feature Item ---------- */
.feature-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.feature-check-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(249,115,22,.12);
  color: var(--color-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ---------- Course Card ---------- */
.course-card {
  background: #fff;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-gray-100);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.course-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

.course-card-header {
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--color-gray-100);
}

.course-card-body { padding: 20px 24px 24px; }

/* ---------- Module List ---------- */
.module-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.module-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-gray-100);
  font-size: 0.9rem;
}

.module-list li:last-child { border-bottom: none; }

.module-num {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--color-navy);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ---------- Guarantee Badge ---------- */
.guarantee-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #f0fdf4;
  border: 2px solid var(--color-green);
  border-radius: var(--border-radius);
  color: #166534;
  font-size: 0.875rem;
  font-weight: 600;
}

/* ---------- Highlight Box ---------- */
.highlight-box {
  background: linear-gradient(135deg, #eff6ff 0%, #fff7ed 100%);
  border-left: 4px solid var(--color-orange);
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  padding: 20px 24px;
}

/* ---------- Nav Logo (Image) ---------- */
/* Logo wird als <img src="logo-color.png"> eingebunden */
/* h-12 / h-14 via Tailwind gesetzt */
/* Auf scrolled-Nav: Logo bleibt unverändert (RGBA-transparent, funktioniert auf hell & dunkel) */
nav img[alt*="Power4Locals"] {
  transition: opacity var(--transition-base);
  object-fit: contain;
}
nav img[alt*="Power4Locals"]:hover {
  opacity: 0.9;
}

/* Footer Logo */
footer img[alt="Power4Locals"] {
  filter: brightness(1.05);
}


/* ============================================================
   SPLITSCREEN HERO
   ============================================================ */

.splitscreen-hero {
  position: relative;
}

.splitscreen-wrap {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 80px);
}

@media (min-width: 1024px) {
  .splitscreen-wrap {
    flex-direction: row;
  }
}

/* --- Panels --- */
.split-panel {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: flex 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 50vh;
}

@media (min-width: 1024px) {
  .split-panel {
    min-height: calc(100vh - 80px);
  }
  .split-panel:hover {
    flex: 1.4;
  }
  .splitscreen-wrap:has(.split-left:hover) .split-right {
    flex: 0.7;
  }
  .splitscreen-wrap:has(.split-right:hover) .split-left {
    flex: 0.7;
  }
}

/* --- Backgrounds --- */
.split-left {
  background: linear-gradient(145deg, #0f2d52 0%, #162d4a 100%);
}

.split-right {
  background: linear-gradient(145deg, #162d4a 0%, #0f2d52 100%);
}

.split-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
  opacity: 0;
}

.split-bg-left {
  background: radial-gradient(ellipse at 40% 50%, rgba(249,115,22,0.18) 0%, transparent 65%);
}

.split-bg-right {
  background: radial-gradient(ellipse at 60% 50%, rgba(99,179,237,0.12) 0%, transparent 65%);
}

.split-panel:hover .split-bg {
  opacity: 1;
}

/* Hover shine sweep */
.split-shine {
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255,255,255,0.04) 50%,
    transparent 60%
  );
  transform: skewX(-15deg);
  transition: left 0.7s ease;
  pointer-events: none;
}

.split-panel:hover .split-shine {
  left: 130%;
}

/* --- Content layout --- */
.split-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3rem 2.5rem;
  max-width: 480px;
  width: 100%;
}

@media (min-width: 1280px) {
  .split-content {
    padding: 4rem 3rem;
  }
}

/* --- Elements --- */
.split-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-orange);
  margin-bottom: 1.5rem;
  display: block;
}

.split-label-white {
  color: rgba(255,255,255,0.45);
}

.split-icon {
  width: 5rem;
  height: 5rem;
  border-radius: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.75rem;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.split-panel:hover .split-icon {
  transform: translateY(-4px) scale(1.05);
}

.split-icon-orange {
  background: rgba(249, 115, 22, 0.15);
  border: 1.5px solid rgba(249, 115, 22, 0.35);
  box-shadow: 0 0 30px rgba(249,115,22,0);
}

.split-panel:hover .split-icon-orange {
  box-shadow: 0 0 30px rgba(249,115,22,0.2);
  background: rgba(249, 115, 22, 0.22);
}

.split-icon-white {
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.2);
}

.split-panel:hover .split-icon-white {
  background: rgba(255,255,255,0.14);
}

.split-title {
  font-size: 3rem;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
  transition: letter-spacing 0.4s ease;
}

@media (min-width: 1280px) {
  .split-title {
    font-size: 3.75rem;
  }
}

.split-panel:hover .split-title {
  letter-spacing: -0.03em;
}

.split-sub {
  font-size: 1.1rem;
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  margin-bottom: 0.875rem;
}

.split-desc {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.45);
  line-height: 1.65;
  margin-bottom: 1.75rem;
  max-width: 340px;
  transition: color 0.3s ease;
}

.split-panel:hover .split-desc {
  color: rgba(255,255,255,0.6);
}

.split-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  text-align: left;
  width: 100%;
  max-width: 300px;
}

.split-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.75);
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: color 0.2s ease;
}

.split-list li:last-child {
  border-bottom: none;
}

.split-panel:hover .split-list li {
  color: rgba(255,255,255,0.9);
}

/* --- CTA Buttons --- */
.split-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 2rem;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.split-cta-orange {
  background: var(--color-orange);
  color: var(--color-on-orange);
  box-shadow: 0 4px 20px rgba(249,115,22,0.25);
}

.split-panel:hover .split-cta-orange {
  background: var(--color-orange-hover);
  box-shadow: 0 8px 30px rgba(249,115,22,0.4);
  transform: translateY(-2px);
}

.split-cta-white {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.25);
}

.split-panel:hover .split-cta-white {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.45);
  transform: translateY(-2px);
}

.split-arrow {
  transition: transform 0.3s ease;
}

.split-panel:hover .split-arrow {
  transform: translateX(4px);
}

/* --- Vertical Divider (desktop) --- */
.split-divider {
  display: none;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 10;
  width: 0;
  overflow: visible;
}

@media (min-width: 1024px) {
  .split-divider {
    display: flex;
  }
}

.split-divider-line {
  flex: 1;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.15), transparent);
}

.split-divider-badge {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 24px rgba(0,0,0,0.35);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transform: translateX(-50%) scale(1);
  margin-left: -36px;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  z-index: 20;
  position: relative;
}

.splitscreen-wrap:hover .split-divider-badge {
  transform: translateX(-50%) scale(1.08);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

/* Horizontal divider line (mobile) */
@media (max-width: 1023px) {
  .split-divider {
    display: none;
  }
}

/* --- Scroll Hint --- */
.split-scroll-hint {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  color: rgba(255,255,255,0.35);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 10;
  pointer-events: none;
}

@media (max-width: 1023px) {
  .split-scroll-hint {
    display: none;
  }
}

/* ============================================================
   KI-Chatbot-Widget (global). Markenstil: Dunkelblau/Orange.
   ============================================================ */
#p4l-chat-root {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  font-family: var(--font-family);
}

.p4l-chat-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: var(--color-navy);
  color: #fff;
  box-shadow: var(--shadow-lg);
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease, transform 0.3s ease;
  /* Sanfte, sich ausbreitende Puls-Welle, damit der Button auffällt (nur eingeklappt). */
  animation: noraPulse 2s ease-out infinite;
}

/* Nora-Icon im eingeklappten Button: weißes SVG mit orangem Funken.
   Der Button ist bereits flex-zentriert -> Icon sitzt mittig. Die Farben
   stecken im SVG, sind also unabhängig von der color-Eigenschaft des
   Buttons und bleiben auch auf dem orangen Hover-Hintergrund weiß. */
.p4l-chat-toggle-icon {
  width: 28px;
  height: 28px;
  display: block;
  pointer-events: none;
}

@keyframes noraPulse {
  0%   { box-shadow: 0 0 0 0 rgba(245, 168, 0, 0.55); }
  70%  { box-shadow: 0 0 0 16px rgba(245, 168, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 168, 0, 0); }
}

/* Hover: Orange-Hintergrund, Icon in Navy (guter Kontrast), leichtes Vergrößern,
   Puls pausiert -> beim Draufgehen wirkt der Button ruhig. */
.p4l-chat-toggle:hover {
  background: #F5A800;
  color: var(--color-navy);
  transform: scale(1.08);
  animation-play-state: paused;
}

/* Geöffnetes Chatfenster: Button pulsiert NICHT. */
.p4l-chat-open .p4l-chat-toggle { background: var(--color-orange); animation: none; }

/* Barrierefreiheit: reduzierte Bewegung -> keine Puls-Animation. */
@media (prefers-reduced-motion: reduce) {
  .p4l-chat-toggle { animation: none; }
}

/* ---------- Nora-CTA-Label neben dem Floating-Button ----------
   Kleines Label links vom runden Chat-Button. Ersetzt den früheren, mittig
   im Split-Hero platzierten Nora-Auslöser, der Spalten-Inhalt überlappt hat.
   Button + Label sitzen als Zeile unten rechts (root ist position:fixed). */
#p4l-chat-root { display: flex; align-items: center; gap: 10px; }

.p4l-chat-cta {
  border: none; cursor: pointer;
  background: #fff; color: var(--color-navy);
  padding: 8px 14px; border-radius: 999px;
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; align-items: flex-end; gap: 1px;
  font-family: var(--font-family); line-height: 1.15;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.p4l-chat-cta:hover { transform: translateY(-1px); box-shadow: var(--shadow-xl); }
.p4l-chat-cta-title { font-weight: 700; font-size: 0.9rem; white-space: nowrap; }
.p4l-chat-cta-sub {
  font-size: 0.66rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--color-gray-600); white-space: nowrap;
}
/* Bei geöffnetem Chat das Label ausblenden (Fokus liegt im Panel). */
.p4l-chat-open .p4l-chat-cta { display: none; }

/* Auf Mobile kein Label (Platz für Sticky-Bottom-Bar / kompakter Button). */
@media (max-width: 767px) {
  .p4l-chat-cta { display: none; }
  #p4l-chat-root { gap: 0; }
}

.p4l-chat-panel {
  position: absolute;
  right: 0;
  bottom: 76px;
  width: 360px;
  max-width: calc(100vw - 40px);
  height: 520px;
  max-height: calc(100vh - 120px);
  background: #fff;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--color-gray-200);
}
.p4l-chat-panel[hidden] { display: none; }

.p4l-chat-header {
  background: var(--color-navy);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.p4l-chat-header-title { font-weight: 800; font-size: 1rem; }
.p4l-chat-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.p4l-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--color-gray-50);
}
.p4l-msg {
  max-width: 85%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.p4l-msg-bot {
  align-self: flex-start;
  background: #fff;
  color: var(--color-gray-900);
  border: 1px solid var(--color-gray-200);
  border-bottom-left-radius: 4px;
}
.p4l-msg-user {
  align-self: flex-end;
  background: var(--color-orange);
  color: var(--color-on-orange);
  border-bottom-right-radius: 4px;
}

.p4l-chat-typing { padding: 4px 18px 8px; display: flex; gap: 5px; background: var(--color-gray-50); }
.p4l-chat-typing[hidden] { display: none; }
.p4l-chat-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9ca3af;
  animation: p4lTyping 1s infinite ease-in-out;
}
.p4l-chat-typing span:nth-child(2) { animation-delay: 0.15s; }
.p4l-chat-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes p4lTyping {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

.p4l-chat-form {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--color-gray-200);
  background: #fff;
  flex-shrink: 0;
}
.p4l-chat-input {
  flex: 1;
  border: 1px solid var(--color-gray-200);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.9rem;
  outline: none;
  font-family: var(--font-family);
}
.p4l-chat-input:focus { border-color: var(--color-orange); }
.p4l-chat-send {
  background: var(--color-navy);
  color: #fff;
  border: none;
  border-radius: 10px;
  width: 46px;
  cursor: pointer;
  font-size: 18px;
}
.p4l-chat-send:hover { background: var(--color-blue); }

/* KI-Transparenzhinweis (Art. 50 Abs. 1 KI-VO): steht oberhalb des
   Nachrichtenbereichs und ist damit VOR der ersten Eingabe sichtbar. */
.p4l-chat-ainotice {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 0;
  padding: 9px 12px;
  font-size: 0.72rem;
  line-height: 1.45;
  color: #7c3d0a;
  background: #fff7ed;
  border-bottom: 1px solid #fed7aa;
  flex-shrink: 0;
}
.p4l-chat-ainotice .icon { color: #f97316; margin-top: 1px; flex-shrink: 0; }
.p4l-chat-ainotice strong { color: #7c2d12; font-weight: 700; }
.p4l-chat-ainotice a {
  color: var(--color-blue);
  text-decoration: underline;
  white-space: nowrap;
}

.p4l-chat-dsgvo {
  font-size: 0.68rem;
  color: #6b7280;
  padding: 0 12px 10px;
  margin: 0;
  text-align: center;
  background: #fff;
  flex-shrink: 0;
}
.p4l-chat-dsgvo a { color: var(--color-blue); text-decoration: underline; }

/* Mobil: Vollbild-Panel */
@media (max-width: 640px) {
  #p4l-chat-root { right: 14px; bottom: 14px; }
  .p4l-chat-panel {
    position: fixed;
    inset: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }
}

/* ---- Chatbot-Erweiterung: Persona Nora, Avatar, Mikrofon ---- */
.p4l-chat-header { gap: 10px; }
.p4l-chat-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  flex-shrink: 0; overflow: hidden; position: relative;
  background: var(--color-orange); display: flex; align-items: center; justify-content: center;
}
.p4l-chat-avatar .icon-robot { color: #fff; font-size: 18px; line-height: 1; }
.p4l-chat-header-text { display: flex; flex-direction: column; line-height: 1.15; flex: 1; min-width: 0; }
.p4l-chat-header-sub { font-size: 0.72rem; font-weight: 500; color: rgba(255,255,255,0.75); }

/* Mikrofon-Button (nur sichtbar, wenn Browser SpeechRecognition unterstützt) */
.p4l-chat-mic {
  flex-shrink: 0; width: 44px; border: 1px solid var(--color-gray-200);
  border-radius: 10px; background: #fff; cursor: pointer; font-size: 18px; line-height: 1;
  transition: background var(--transition-base), border-color var(--transition-base);
}
.p4l-chat-mic[hidden] { display: none; }
.p4l-chat-mic:hover { border-color: var(--color-orange); }
.p4l-chat-mic.p4l-mic-active {
  background: var(--color-orange); border-color: var(--color-orange);
  animation: p4lMicPulse 1.2s ease-in-out infinite;
}
@keyframes p4lMicPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(249,115,22,0.55); }
  50% { box-shadow: 0 0 0 7px rgba(249,115,22,0); }
}

/* ============================================================
   Obere Info-Leiste (Topbar): höher, größere Schrift/Icons,
   vertikal zentriert. Dezenter als die Hauptnavigation.
   ============================================================ */
.site-topbar {
  background: #0a1e38;
  min-height: 60px;
  display: flex; align-items: center; justify-content: center;
  gap: 2rem; flex-wrap: wrap;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.site-topbar a {
  display: inline-flex; align-items: center; gap: 0.55rem;
  color: rgba(255,255,255,0.7); text-decoration: none;
  font-size: 0.9rem; font-weight: 500; line-height: 1;
  transition: color 0.2s;
}
.site-topbar a:hover { color: #f97316; }
.site-topbar svg { width: 20px; height: 20px; }
.site-topbar-sep { width: 1px; height: 22px; background: rgba(255,255,255,0.15); flex-shrink: 0; }

@media (max-width: 767px) {
  .site-topbar { gap: 1.1rem; min-height: 54px; padding: 0.5rem 0.75rem; }
  .site-topbar a { font-size: 0.82rem; }
  .site-topbar svg { width: 18px; height: 18px; }
  .site-topbar-sep { height: 18px; }
}

/* ============================================================
   Aktiver Navigationspunkt (.nav-active)
   Markiert einheitlich auf allen Seiten den Menüpunkt der gerade
   geöffneten Seite: orange Fläche, Navy-Schrift, Navy-Unterstreichung
   (WCAG AA, siehe --color-on-orange).
   Nur EIN Punkt pro Seite trägt die Klasse.
   ============================================================ */
.nav-active {
  background-color: var(--color-orange);       /* #F97316 */
  color: var(--color-on-orange);               /* Navy */
  text-decoration: underline;
  text-decoration-color: var(--color-on-orange);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  border-radius: 8px;
  padding: 6px 12px;
  transition: background-color var(--transition-base);
}

/* Icons (SVG nutzt das stroke-Attribut) im aktiven Punkt mitfärben. */
.nav-active svg { stroke: var(--color-on-orange); }

.nav-active:hover { background-color: var(--color-orange-hover); }  /* #FB923C */

/* Die Nav-Links tragen Tailwind-Utilities (text-gray-300, hover:opacity-80,
   px-4 py-3). assets/tailwind.css steht als letztes Stylesheet NACH
   styles.css im <head> – bei gleicher Spezifität würde es gewinnen. Die
   folgenden Regeln sind daher über #main-nav / #mobile-menu gescoped
   (Spezifität 1-1-0 bzw. 1-2-0) und setzen sich zuverlässig durch. */
#main-nav .nav-active { color: var(--color-on-orange); }

#main-nav .nav-active:hover {
  background-color: var(--color-orange-hover);
  color: var(--color-on-orange);
  opacity: 1;                                  /* hover:opacity-80 neutralisieren */
}

/* Hamburger-Menü: der aktive Punkt füllt die Zeile genauso wie die anderen
   Einträge (entspricht px-4 py-3), damit die Liste nicht springt. */
#mobile-menu .nav-active { padding: 12px 16px; }

/* ============================================================
   .btn-cta — einheitlicher CTA-Button "Kostenloses Erstgespräch buchen"
   Kein width/max-width, das den Text abschneidet; kein overflow:hidden.
   Der Button wächst mit seinem Text (width:auto) und bleibt einzeilig.
   ============================================================ */
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;                       /* Abstand für optionales Icon */
  width: auto;                    /* KEINE feste Breite */
  padding: 14px 28px;
  background-color: var(--color-orange);   /* #F97316 */
  color: var(--color-on-orange);
  font-weight: 700;
  font-size: 1rem;
  /* KEIN eigenes line-height: sonst wird der Button flacher als die
     benachbarten .btn-primary/.btn-outline-white und die Höhen laufen
     in gemischten Button-Reihen auseinander. */
  border: none;
  border-radius: var(--border-radius);     /* wie .btn-primary/.btn-secondary */
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;            /* Text bleibt in einer Zeile */
  overflow: visible;              /* nichts abschneiden */
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-cta:hover {
  background-color: var(--color-orange-hover);  /* #FB923C */
  transform: translateY(-1px);
}

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

/* Volle Breite nur, wenn der Button allein in seiner Zeile steht:
   .btn-cta-block wird auf Mobile 100% breit, ab 640px wieder auto.
   Steht der Button neben anderen Elementen, bleibt er ohne diese Klasse auto. */
.btn-cta-block { width: 100%; }
@media (min-width: 640px) {
  .btn-cta-block { width: auto; }
}

/* Fit-Variante für sehr schmale Container (z.B. die Kurs-Preisboxen in der
   3-spaltigen Ansicht: dort stehen nur ~222px zur Verfügung, die Beschriftung
   braucht einzeilig 361px). Statt aus der Karte zu laufen, darf der Text hier
   umbrechen – zentriert und mit etwas kleinerem Innenabstand. */
.btn-cta-fit {
  white-space: normal;
  text-wrap: balance;
  padding: 12px 20px;
  width: 100%;
}

/* Mobile: gleiche Stauchung wie die übrigen Buttons der Seite. */
@media (max-width: 768px) {
  .btn-cta {
    padding: 12px 20px;
    font-size: 0.9rem;
  }
}

/* ============================================================
   BLOG-TITELBILDER – fester Rahmen 4:3.
   Container gibt das Seitenverhältnis vor (verhindert Layout-Shift),
   das Bild füllt ihn per object-fit:cover.
   ============================================================ */
.blog-hero-img {
  aspect-ratio: 4 / 3;
  border-radius: 1rem;
  overflow: hidden;
  background: #f3f4f6;
}
.blog-hero-img picture { display: block; width: 100%; height: 100%; }
.blog-hero-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* In den Übersichts-Karten sind nur die oberen Ecken rund (Karte clippt). */
.blog-card-img { border-radius: 1rem 1rem 0 0; }

/* Kennzeichnung KI-generierter Bilder: dezentes "AI"-Badge unten rechts */
.ai-badge-wrap { position: relative; }
.ai-badge-wrap::after {
  content: "AI";
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  box-sizing: border-box;
  border-radius: 10px;
  background: rgba(15, 45, 82, 0.75);
  color: #fff;
  font: 600 9.5px/1 Inter, system-ui, sans-serif;
  letter-spacing: 0.03em;
  pointer-events: none;
}
