/*
 * home-sections.css v2.1 - Homepage High-End-Polish (2026-05-19/20)
 * v2.1: Section-Kicker-Pattern + Calculator-Border + Tips runter auf alt
 *       + Section-Header-Konsolidierung + :has-Fallback (Safari <15.4)
 *
 * STRATEGIE: Verstaerken des existing .page-section-Systems (aus sections.css,
 * Standing Rule W) statt ein paralleles System aufzubauen. Hoehere CSS-Spezifitaet
 * durch .home-page-Scope. Surface-Alternation + Border-Top + Section-Header-Pattern.
 *
 * Loader: <link rel="stylesheet" href="/assets/home-sections.css?v=2.0">
 * Marker: <!-- gos:home-sections v2.0 -->
 *
 * MUST-NOT: kein DOM-Reorder, keine eigene .home-section-Klasse mehr. Pure CSS.
 */

/* ============================================================
   1. CANONICAL TOKENS auf body.home-page
   ============================================================ */
body.home-page {
  --home-container-wide: 1120px;
  --home-container-narrow: 720px;
  --home-section-py: clamp(72px, 9vw, 120px);
  --home-section-py-sm: clamp(48px, 6vw, 80px);
  --home-section-px: clamp(20px, 4vw, 40px);
  --home-section-header-gap: clamp(40px, 6vw, 56px);

  /* Surface-Alternation: subtle warm-Amber-Tint statt harter BG-Wechsel */
  --home-surface-0: transparent;
  --home-surface-1: rgba(245, 158, 11, 0.025);
  --home-surface-2: rgba(245, 158, 11, 0.05);
  --home-section-divider: rgba(245, 158, 11, 0.10);
}

/* ============================================================
   2. PAGE-SECTION CONSISTENT PADDING (home only)
   ============================================================ */
body.home-page .page-section {
  padding: var(--home-section-py) 0 !important;
  scroll-margin-top: 80px;
  position: relative;
}

body.home-page .page-section + .page-section {
  border-top: 1px solid var(--home-section-divider);
}

/* Container-Konsolidierung: alle Sections nutzen .container mit 1120px max-width */
body.home-page .page-section > .container {
  max-width: var(--home-container-wide);
  margin: 0 auto;
  padding: 0 var(--home-section-px);
  position: relative;
  z-index: 1;
}

/* News-Teaser: kompaktere Section (oben unter Hero) */
body.home-page .page-section.news-teaser-section {
  padding: var(--home-section-py-sm) 0 !important;
}

/* SEO-Content: bekommt narrow-Container weil reine Prose */
body.home-page .page-section.seo-section > .container {
  max-width: var(--home-container-narrow);
}

/* ============================================================
   3. SURFACE-ALTERNATION SUBTIL UND SICHTBAR
   ============================================================ */
body.home-page .page-section--alt {
  background: var(--home-surface-1) !important;
}

body.home-page .page-section--highlight {
  background: var(--home-surface-2) !important;
}

body.home-page .page-section--default {
  background: var(--home-surface-0) !important;
}

/* ============================================================
   4. ASIDES (cta-bridge, faq-cta, seo-cta) als Mini-Sections
      Visuell integriert in den Section-Rhythmus statt freistehend
   ============================================================ */
body.home-page .cta-bridge,
body.home-page .faq-cta,
body.home-page .seo-cta {
  max-width: var(--home-container-narrow) !important;
  margin: 0 auto !important;
  padding: clamp(28px, 4vw, 40px) clamp(24px, 3vw, 32px) !important;
  background: linear-gradient(135deg,
    rgba(245, 158, 11, 0.08) 0%,
    rgba(245, 158, 11, 0.03) 100%) !important;
  border: 1px solid rgba(245, 158, 11, 0.22) !important;
  border-radius: 16px !important;
  text-align: center;
  position: relative;
  overflow: hidden;
}

body.home-page .cta-bridge::before,
body.home-page .faq-cta::before,
body.home-page .seo-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 100% at 50% 0%,
    rgba(245, 158, 11, 0.04) 0%,
    transparent 70%);
  pointer-events: none;
  z-index: 0;
}

body.home-page .cta-bridge > *,
body.home-page .faq-cta > *,
body.home-page .seo-cta > * {
  position: relative;
  z-index: 1;
}

body.home-page .cta-bridge h3,
body.home-page .faq-cta h3,
body.home-page .seo-cta h3 {
  font-size: clamp(22px, 2.5vw, 28px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  color: var(--txt, #f5f5f5);
}

body.home-page .cta-bridge p,
body.home-page .faq-cta p,
body.home-page .seo-cta p {
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.72);
  max-width: 540px;
  margin: 0 auto 20px !important;
}

body.home-page .cta-bridge .btn,
body.home-page .faq-cta .btn,
body.home-page .seo-cta .btn {
  margin-top: 0;
}

/* Mini-Section CTAs sitzen jetzt visuell innerhalb des Section-Rhythmus.
   Container wrapper bekommt ebenfalls section-typisches padding. */
body.home-page section + .container:has(.cta-bridge),
body.home-page section + .container:has(.faq-cta),
body.home-page section + .container:has(.seo-cta) {
  padding-top: 0 !important;
  padding-bottom: clamp(48px, 6vw, 80px) !important;
}

/* ============================================================
   5. SECTION-HEADLINE UND LEAD KONSISTENT
   ============================================================ */
body.home-page .page-section h2,
body.home-page .page-section .section-h,
body.home-page .page-section .section-headline {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
  font-weight: 800;
}

/* News-Teaser-Title bleibt KLEIN (war ein Live-Label, kein Section-H2) */
body.home-page .page-section.news-teaser-section .news-teaser-title {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: var(--acc, #f59e0b) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  line-height: 1.4 !important;
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
  margin: 0 !important;
}

/* News-Teaser braucht keinen eigenen Section-Kicker - der Title IST schon Live-Label */
body.home-page .page-section.news-teaser-section .section-kicker {
  display: none !important;
}

body.home-page .page-section .section-sub,
body.home-page .page-section .section-lead,
body.home-page .page-section #countryHubTitle + p {
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.72);
  max-width: 640px;
  margin: 0 auto 32px;
}

/* SEO-Section: H2 etwas kleiner (Article-Style) */
body.home-page .page-section.seo-section .seo-article h2 {
  font-size: clamp(24px, 3vw, 32px);
}

/* ============================================================
   6. CALCULATOR-TRIGGER High-End-Glow
   ============================================================ */
body.home-page #calculator.page-section .calc-trigger {
  max-width: var(--home-container-narrow);
  margin: 0 auto;
  border-radius: 20px !important;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.4),
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 0 0 1px rgba(245, 158, 11, 0.10) inset !important;
}

/* ============================================================
   7. COUNTRY-CARDS-GRID Konsistenz
   ============================================================ */
body.home-page #countryHubTeaser .country-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(16px, 2vw, 24px);
  margin-top: 24px;
}

body.home-page #countryHubTeaser .country-card {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 14px !important;
  padding: clamp(20px, 2.5vw, 26px) !important;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  color: inherit;
}

body.home-page #countryHubTeaser .country-card:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.30) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

/* ============================================================
   8. MOBILE-RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  body.home-page .page-section {
    padding: var(--home-section-py-sm) 0 !important;
  }
  body.home-page .cta-bridge,
  body.home-page .faq-cta,
  body.home-page .seo-cta {
    margin: 0 16px !important;
    padding: 24px 20px !important;
    border-radius: 14px !important;
  }
  body.home-page .page-section h2.section-h {
    font-size: clamp(24px, 6vw, 32px);
  }
}

/* ============================================================
   9. REDUCED-MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  body.home-page .page-section,
  body.home-page #countryHubTeaser .country-card {
    transition: none !important;
  }
  body.home-page .cta-bridge::before,
  body.home-page .faq-cta::before,
  body.home-page .seo-cta::before {
    background: rgba(245, 158, 11, 0.02);
  }
}

/* End of home-sections.css v2.0 */

/* ============================================================
   9. SECTION-KICKER-PATTERN (v2.1) — Mono-Font Amber Tag oben
   Bringt Section-Header-Konsistenz analog Methodik-Hub
   ============================================================ */
body.home-page .page-section .section-kicker {
  display: inline-block;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--acc, #f59e0b);
  margin: 0 auto 14px;
  padding: 4px 10px;
  background: rgba(245, 158, 11, 0.08);
  border-radius: 4px;
}

/* Center-Wrapper für Section-Header (Kicker + H2 + Sub) */
body.home-page .page-section > .container > .section-kicker,
body.home-page .page-section > .container > h2:first-child,
body.home-page .page-section > .container > h2.section-h:first-child {
  display: block;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
body.home-page .page-section > .container > .section-kicker {
  display: table;
}

/* ============================================================
   10. CALCULATOR-TRIGGER High-End-Border (v2.1)
   ============================================================ */
body.home-page #calculator.page-section .calc-trigger {
  border: 1px solid rgba(245, 158, 11, 0.15) !important;
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.02) 0%,
    rgba(245, 158, 11, 0.025) 100%) !important;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
body.home-page #calculator.page-section .calc-trigger:hover {
  border-color: rgba(245, 158, 11, 0.30) !important;
}

/* ============================================================
   11. TIPS-SECTION runter auf --alt (v2.1)
   Surface-Pattern: alt/default/alt/default/alt/alt - atmet besser
   ============================================================ */
body.home-page #tips.page-section.page-section--highlight {
  background: var(--home-surface-1) !important;
}

/* ============================================================
   12. CTA-Asides Fallback ohne :has() für Safari <15.4
   ============================================================ */
body.home-page .cta-bridge,
body.home-page .faq-cta,
body.home-page .seo-cta {
  margin-top: clamp(48px, 6vw, 80px) !important;
  margin-bottom: clamp(48px, 6vw, 80px) !important;
}

/* ============================================================
   13. INLINE-STYLE-NEUTRALIZE für Country-Cards (v2.1)
   Falls Inline-style:background/border noch da: CSS schlägt durch
   ============================================================ */
body.home-page #countryHubTeaser .country-cards-grid > a[style] {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 14px !important;
}
body.home-page #countryHubTeaser .country-cards-grid > a[style]:hover {
  border-color: rgba(245, 158, 11, 0.30) !important;
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

/* CountryHubTitle: zentrieren via CSS statt inline */
body.home-page #countryHubTeaser h2#countryHubTitle {
  text-align: center;
  margin-bottom: 8px !important;
}
body.home-page #countryHubTeaser h2#countryHubTitle + p {
  text-align: center;
  margin-bottom: 32px !important;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* End of home-sections.css v2.1 polish-pass */
