/* ===================================================================
 * UX-Rhythm v1.0 (2026-05-05)
 * State-of-the-art Vertical Rhythm + Container-Width-Konsistenz
 *
 * User-Direktive: „im hero. bereich auch die psychologisch wichtigen
 * abstànde einhalten z.B der brent preisanstig ist direkt an dem cto
 * bitte den header psychologisch und designerisch im gesamten richtig
 * aufràumen auch wenn mann dann nach unten scrollt springt das auge
 * zu oft weil alles unterschiedlich breit ist"
 *
 * Basis: 8px-Grid (Material Design / Apple HIG / Nielsen Norman)
 * =================================================================== */

/* -------------------------------------------------------------------
 * 1) HERO — Vertical Rhythm aufräumen
 *    Atmungsraum zwischen Brent-Urgency und CTA-Buttons
 * ------------------------------------------------------------------- */

/* .urgency-line („Brent +17%") brauchte margin-bottom — klebte am CTA */
.urgency-line {
  margin-top: 24px !important;     /* 24px statt --sp-3 (~12px) */
  margin-bottom: 32px !important;  /* NEU: 32px Atmungsraum zum CTA */
}

/* Mobile: enger (24px Bottom-Spacing) */
@media (max-width: 768px) {
  .urgency-line {
    margin-top: 20px !important;
    margin-bottom: 24px !important;
  }
}

/* .btn-row: konsistente Bottom-Spacing zur trust-row (8px-grid: 48px) */
.hero .btn-row {
  margin-bottom: 48px !important;
}
@media (max-width: 768px) {
  .hero .btn-row {
    margin-bottom: 36px !important;
  }
}

/* .trust-row → stats: einheitlich 40px */
.hero .trust-row {
  margin-bottom: 40px !important;
}
@media (max-width: 768px) {
  .hero .trust-row {
    margin-bottom: 32px !important;
  }
}

/* .stats Bottom-Padding für Atmungsraum vor scroll-cue */
.hero .stats {
  margin-bottom: 24px !important;
}

/* -------------------------------------------------------------------
 * 2) CONTAINER-WIDTH-KONSISTENZ
 *    Alle Section-Container auf einheitliche Outer-Width
 *    Damit das Auge beim Scrollen NICHT zwischen 1120/1040/880/720
 *    hin- und herspringt.
 * ------------------------------------------------------------------- */

/* Standard-Container — alle Sections auf gleiche maximale Breite */
.container,
.section-lg .container,
.section-md .container,
section > .container,
main .container {
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 24px !important;
  padding-right: 24px !important;
  box-sizing: border-box !important;
}

/* Narrow-Container — für Text-heavy Content (FAQ, Tipps-Body) */
.container-narrow,
.container.narrow {
  max-width: 760px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 24px !important;
  padding-right: 24px !important;
  box-sizing: border-box !important;
}

/* Hero behält eigene max-width (typisch breiter für hero impact) */
.hero-inner {
  max-width: 1200px !important;
  padding-left: 24px !important;
  padding-right: 24px !important;
  box-sizing: border-box !important;
}

/* Mobile: konsistent 16px Side-Padding */
@media (max-width: 768px) {
  .container,
  .container-narrow,
  .hero-inner,
  section > .container,
  main .container {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

/* -------------------------------------------------------------------
 * 3) SECTION-PADDING — vertikaler Rhythm zwischen Sections
 *    Konsistent 80px desktop / 48px mobile zwischen großen Sections
 * ------------------------------------------------------------------- */

main > section,
main > .section,
.section-lg,
.section-md {
  padding-top: 80px !important;
  padding-bottom: 80px !important;
}

@media (max-width: 768px) {
  main > section,
  main > .section,
  .section-lg,
  .section-md {
    padding-top: 48px !important;
    padding-bottom: 48px !important;
  }
}

/* News-Teaser direkt unter Hero — etwas weniger Padding-Top */
.news-teaser-section,
section.news-teaser-section {
  padding-top: 56px !important;
}
@media (max-width: 768px) {
  .news-teaser-section,
  section.news-teaser-section {
    padding-top: 32px !important;
  }
}

/* -------------------------------------------------------------------
 * 4) SECTION-HEADINGS — konsistente Spacing zur darauffolgenden Content
 * ------------------------------------------------------------------- */
main h2,
main .section-head,
main .section-title {
  margin-bottom: 32px;
}
@media (max-width: 768px) {
  main h2,
  main .section-head,
  main .section-title {
    margin-bottom: 24px;
  }
}

/* -------------------------------------------------------------------
 * 5) Reduced motion — keine zusätzlichen Animationen
 * ------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .urgency-line,
  .btn-row,
  .trust-row,
  .stats {
    animation: none !important;
    transition: none !important;
  }
}

/* -------------------------------------------------------------------
 * 6) MOBILE ABOVE-FOLD-OPTIMIERUNG (User-Bug 2026-05-05 Screenshot):
 *    „in der mobilen sicht der seite lädt wird man mit text überschlagen"
 *    Ziel: H1 + 1 Sub + CTA passen auf 360-430px Viewport ohne scroll
 * ------------------------------------------------------------------- */
@media (max-width: 768px) {
  /* Brent-Source („yahoo_q2 · Cache · vor 44 Sek.") = Debug-Info,
     auf Mobile komplett versteckt. Quelle ist im Stat „Live Brent" sichtbar. */
  .hero .brent-source {
    display: none !important;
  }

  /* Sub-Small („Dein persönliches Mehrkosten-Budget in 30 Sekunden")
     = redundant zur .sub + zur stats-Anzeige „30s Rechenzeit" */
  .hero .sub-small {
    display: none !important;
  }

  /* Hero-Kicker kompakter */
  .hero .hero-kicker {
    font-size: 11px !important;
    padding: 6px 14px !important;
    margin-bottom: 14px !important;
    letter-spacing: .8px !important;
  }

  /* H1 etwas kompakter — clamp Min hochziehen damit auf 360px noch lesbar */
  .hero .headline {
    font-size: clamp(28px, 7.5vw, 40px) !important;
    line-height: 1.08 !important;
    margin-bottom: 18px !important;
  }

  /* Sub etwas kürzer dargestellt */
  .hero .sub {
    font-size: 15px !important;
    line-height: 1.5 !important;
    margin-bottom: 16px !important;
  }

  /* Ticker kompakter */
  .hero .ticker {
    font-size: 12px !important;
    padding: 6px 12px !important;
    margin-bottom: 16px !important;
  }

  /* Urgency-Line: kleiner damit weniger Vertical-Space */
  .urgency-line {
    font-size: 12px !important;
    padding: 5px 12px !important;
    margin-top: 16px !important;
    margin-bottom: 24px !important;
  }

  /* Hero-Padding reduzieren — mehr space für CTA above-fold */
  .hero,
  header.hero {
    padding-top: 24px !important;
    padding-bottom: 32px !important;
    min-height: auto !important;
  }
}

/* iPhone Mini & sehr schmale Viewports */
@media (max-width: 380px) {
  .hero .headline {
    font-size: clamp(26px, 7vw, 34px) !important;
  }
  .hero .hero-kicker {
    font-size: 10px !important;
  }
}

/* -------------------------------------------------------------------
 * 7) MOBILE HOMEPAGE-VERKÜRZUNG (User-Direktive 2026-05-05):
 *    „auf der mobilen ansicht ist die startseite viel zu lang
 *     mit zu viel info und ewig zu scrollen das soll auch psycologisch
 *     perfekt und UX màssig state of the art sein"
 *
 *  Psychologische Conversion-Hierarchie auf Mobile (8sec-Attention):
 *  1. Hero CTA (immer voll sichtbar)
 *  2. News-Teaser kompakter (Credibility-Boost)
 *  3. Calculator Trigger (Main-CTA)
 *  4. Tips (Value Add — 4 Karten)
 *  5. CTA-Bridge
 *  6. FAQ — nur Top-3 (Hick's Law: weniger Choices = bessere UX)
 *  7. News [voll] — HIDDEN (redundant zu Teaser oben)
 *  8. SEO-Block — bleibt collapsed (war schon)
 *  9. Country-Grid — nur Top-7 (DACH + USA/UK/FR/IT) statt 26
 *  10. Footer
 * ------------------------------------------------------------------- */

@media (max-width: 768px) {

  /* === A) NEWS-TEASER kompakter — nur 1 Top-Card statt 3 === */
  .news-teaser-grid > :nth-child(n+2) {
    display: none !important;
  }
  .news-teaser-section {
    padding-top: 28px !important;
    padding-bottom: 28px !important;
  }

  /* === B) CALCULATOR Section kompakter === */
  #calculator {
    padding-top: 32px !important;
    padding-bottom: 32px !important;
  }
  /* HINWEIS: .howto:not([open]) Override entfernt 2026-05-05 —
     <details> macht das nativ, redundante CSS-Regel verursachte Bug
     (collapsed-state wurde doppelt gehidet). */

  /* === C) TIPS Section kompakter === */
  #tips {
    padding-top: 36px !important;
    padding-bottom: 36px !important;
  }
  #tips .section-h {
    margin-bottom: 8px !important;
  }
  #tips .section-sub {
    margin-bottom: 20px !important;
  }

  /* === D) FAQ — alle 8 sichtbar (Schema-Konsistenz mit FAQPage Microdata) ===
     User-Direktive 2026-05-05: alle 8 Fragen MÜSSEN auf Mobile sichtbar bleiben
     weil sie wichtig sind (SEO + User-Wert). FAQs sind bereits <details>-Elements
     (collapsed by default) → kompakt. Nur Section-Padding + Heading-Margins
     kompakter, kein Item-Hide. */
  #faq {
    padding-top: 36px !important;
    padding-bottom: 36px !important;
  }
  #faq .section-h {
    margin-bottom: 6px !important;
  }
  #faq .section-sub {
    margin-bottom: 18px !important;
  }
  /* Faq-Summary-Padding etwas tighter auf Mobile fuer kompaktere Liste */
  #faq .faq summary {
    padding: 12px 14px !important;
  }
  #faq .faq-body {
    padding: 6px 14px 14px 14px !important;
  }

  /* === E) NEWS [voll] komplett verstecken (redundant zu Teaser) === */
  #news {
    display: none !important;
  }

  /* === F) SEO-Section kompakter === */
  #seoContent {
    padding-top: 36px !important;
    padding-bottom: 36px !important;
  }
  #seoContent .seo-section h2,
  #seoContent #seoTitle {
    font-size: 22px !important;
    line-height: 1.25 !important;
  }
  /* Country-Grid: zeige nur Top-7 Länder (DACH + USA/UK/FR/IT) */
  #seoContent .seo-country-grid > li:nth-child(n+8) {
    display: none !important;
  }
  /* Wenn Read-More-Btn geklickt (is-collapsed weg) → alle Länder zeigen */
  #seoContent .seo-content-block:not(.is-collapsed) .seo-country-grid > li:nth-child(n+8) {
    display: block !important;
  }

  /* === G) CTA-Bridges/Asides kompakter === */
  .cta-bridge,
  .faq-cta,
  .seo-cta {
    padding: 20px 16px !important;
    margin-top: 16px !important;
    margin-bottom: 16px !important;
  }
  .cta-bridge h3,
  .faq-cta h3,
  .seo-cta h3 {
    font-size: 18px !important;
    line-height: 1.3 !important;
    margin-bottom: 8px !important;
  }
  .cta-bridge p,
  .faq-cta p,
  .seo-cta p {
    font-size: 14px !important;
    line-height: 1.5 !important;
    margin-bottom: 14px !important;
  }
}

/* iPhone Mini noch tighter */
@media (max-width: 380px) {
  .news-teaser-section,
  #calculator,
  #tips,
  #faq,
  #seoContent {
    padding-top: 28px !important;
    padding-bottom: 28px !important;
  }
}

/* -------------------------------------------------------------------
 * 8) HOWTO-AKKORDEON FOLLOWUPS — Tipps + Lexikon Hint-Cards
 *    User-Direktive 2026-05-05: „der wie es funktioniert button braucht
 *    eine kleine anleitung als drop dorn desktop und mobil das soll UX
 *    konform sein und psychologisch wertvoll es soll auch sagen wie der
 *    rechner geht und das es danach tips und das lexikon gibt"
 *
 *  Psychologisch:
 *  - Erwartung managen: User weiss VOR Calculation was danach kommt
 *  - Loss Aversion umkehren: „nicht nur Zahl, du bekommst auch Hilfe"
 *  - Authority Signal: Lexikon = wir sind Experten
 *  - Reciprocity: kostenlose Tipps nach kostenloser Berechnung
 * ------------------------------------------------------------------- */
.howto-followups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(245, 158, 11, .15);
}

.howto-followup {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(245, 158, 11, .06);
  border: 1px solid rgba(245, 158, 11, .20);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
  -webkit-tap-highlight-color: transparent;
}

.howto-followup:hover,
.howto-followup:focus-visible {
  background: rgba(245, 158, 11, .12);
  border-color: rgba(245, 158, 11, .40);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(245, 158, 11, .14);
  outline: none;
}

.howto-followup .hf-ico {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(245, 158, 11, .18);
  color: var(--color-primary, #f59e0b);
}

.howto-followup .hf-ico svg {
  width: 20px;
  height: 20px;
}

.howto-followup .hf-text {
  flex: 1 1 auto;
  min-width: 0;
}

.howto-followup .hf-t {
  font-weight: 700;
  font-size: 14.5px;
  line-height: 1.3;
  margin-bottom: 4px;
  color: var(--color-text, #f8fafc);
}

.howto-followup .hf-b {
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-2, #94a3b8);
  margin-bottom: 8px;
}

.howto-followup .hf-link {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary, #f59e0b);
  letter-spacing: .2px;
}

.howto-followup:hover .hf-link,
.howto-followup:focus-visible .hf-link {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Mobile: Stack vertical, kompakter */
@media (max-width: 640px) {
  .howto-followups {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 16px;
    padding-top: 14px;
  }
  .howto-followup {
    padding: 12px 14px;
    gap: 10px;
  }
  .howto-followup .hf-ico {
    width: 32px;
    height: 32px;
  }
  .howto-followup .hf-ico svg {
    width: 18px;
    height: 18px;
  }
  .howto-followup .hf-t {
    font-size: 14px;
  }
  .howto-followup .hf-b {
    font-size: 12.5px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .howto-followup {
    transition: none !important;
  }
  .howto-followup:hover,
  .howto-followup:focus-visible {
    transform: none !important;
  }
}
