/* UI/CRO V4 - Startseite (2026-09-29)
   Nur geladen, wenn der Bereich "Startseite" im Admin (/admin/ui_v4.php) aktiv ist
   (body.ui-v4-home, s. index.php + de/head.php). Ergaenzt newhome.css, ersetzt nichts:
   Breitensystem (Full Bleed / Wide / Reading), Full-width-Hero, Radien, Insider-Modul.
   Konzept: CHEERCITY_UI_CRO_V4_AB_FLAG_VSCODE_AGENT.md, Abschnitte 9 + 14. */

body.ui-v4-home {
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --content-wide: 1440px; /* 2026-09-29: einheitlich mit allen V4-Seiten (vorher 1480px) */
  --content-reading: 1160px;
}

/* ── Breite: Wide (1440px) fuer Header, Inhalt und Footer der Startseite ── */
body.ui-v4-home .page-width { width: min(var(--content-wide), calc(100% - 48px)); }
body.ui-v4-home main { padding-top: 0; }
/* Hero direkt unter der Navigation (altes Layout-CSS setzt Abstand unter .container-header) */
body.ui-v4-home .container-header { margin-bottom: 0; }

/* ── Hero: Full Bleed, Text/CTA im Bild, Verlauf nur links fuer Kontrast ── */
.v4-hero {
  position: relative;
  min-height: clamp(460px, 64vh, 660px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--navy);
  color: #fff;
}
.v4-hero picture,
.v4-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; }
.v4-hero-img { object-fit: cover; object-position: var(--v4-hero-pos, center); }
.v4-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(6, 38, 64, .86) 0%, rgba(6, 38, 64, .62) 36%, rgba(6, 38, 64, 0) 68%);
}
.v4-hero-inner { position: relative; z-index: 1; padding: 64px 0; }
.v4-hero-copy { max-width: 640px; }
.v4-hero-copy h1 {
  color: #fff;
  font-size: clamp(44px, 4.6vw, 72px);
  line-height: .96;
  letter-spacing: -.02em;
  margin-bottom: 18px;
}
.v4-hero-copy h1 em { color: var(--pink); font-style: normal; }
.v4-hero-text { font-size: 18px; line-height: 1.55; color: #e4edf4; max-width: 540px; }
.v4-hero .button-row { margin: 24px 0 0; }

/* Trust-Leiste direkt unter dem Hero (vorher im Hero-Textblock) */
.v4-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 44px;
  padding: 18px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.v4-trust span { display: flex; align-items: center; gap: 8px; }
.v4-trust svg { font-size: 22px; color: var(--turquoise); }

/* ── Sektionen/Karten: moderat gerundet, weniger Rahmen, mehr Weissraum ── */
body.ui-v4-home .section { border-radius: var(--radius-lg); padding: 32px; margin-top: 20px; }
body.ui-v4-home .section-heading { margin-bottom: 20px; }
body.ui-v4-home .section-heading h2 { font-size: 36px; }
body.ui-v4-home .btn { border-radius: var(--radius-sm); }
body.ui-v4-home .category-grid,
body.ui-v4-home .help-grid,
body.ui-v4-home .product-grid,
body.ui-v4-home .world-grid,
body.ui-v4-home .events-grid { gap: 16px; }
body.ui-v4-home .category-card,
body.ui-v4-home .help-card,
body.ui-v4-home .product-card,
body.ui-v4-home .event-card,
body.ui-v4-home .offer-card,
body.ui-v4-home .world-grid > a {
  border-radius: var(--radius-md);
  overflow: hidden;
  border-color: transparent;
  background: #f6f7f8;
}
body.ui-v4-home .world-grid > a { border-top: 1px solid transparent; }
body.ui-v4-home .category-card:hover,
body.ui-v4-home .help-card:hover,
body.ui-v4-home .product-card:hover,
body.ui-v4-home .event-card:hover,
body.ui-v4-home .world-grid > a:hover { border-color: var(--pink); }
body.ui-v4-home .product-card img,
body.ui-v4-home .category-card img { background: #fff; }
body.ui-v4-home .offer-card { background: #fff0f8; }
body.ui-v4-home .feature-grid { gap: 20px; margin-top: 20px; }
body.ui-v4-home .feature-card { border-radius: var(--radius-lg); min-height: 360px; }
body.ui-v4-home .feature-card > div { padding: 40px; }

/* Reading-Breite fuer die FAQ */
body.ui-v4-home section[aria-labelledby="faq-title"] { width: min(var(--content-reading), calc(100% - 48px)); }
body.ui-v4-home .home-faq-list { max-width: none; }
body.ui-v4-home .home-faq-item { border-radius: var(--radius-md); }

/* ── Insider: groessere Flaeche mit Bild + Nutzen, CTA zur Insider-Seite ── */
.v4-insider {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 20px auto 40px;
}
.v4-insider > img { width: 100%; height: 100%; min-height: 380px; object-fit: cover; }
.v4-insider-copy {
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}
.v4-insider h2 { color: #fff; font-size: clamp(32px, 3vw, 44px); line-height: 1; margin: 0 0 20px; }
.v4-insider ul { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 12px; }
.v4-insider li { position: relative; padding-left: 26px; color: #d6e1ea; font-size: 15px; line-height: 1.5; }
.v4-insider li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .42em;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--pink);
}
.v4-insider li strong { color: #fff; }
.v4-insider-note { margin: 12px 0 0; font-size: 12px; color: #b3c3d0; }

/* ── Tablet ── */
@media (max-width: 980px) {
  .v4-hero::after { background: linear-gradient(90deg, rgba(6, 38, 64, .88) 0%, rgba(6, 38, 64, .7) 55%, rgba(6, 38, 64, .25) 100%); }
  .v4-insider { grid-template-columns: 1fr; }
  .v4-insider > img { min-height: 0; height: auto; aspect-ratio: 16 / 9; }
  .v4-insider-copy { padding: 32px 28px; }
}

/* ── Mobil: Bild oben (eigener Crop/Motiv), Text darunter auf Navy - ohne Overlay ── */
@media (max-width: 680px) {
  body.ui-v4-home .page-width { width: min(100% - 24px, var(--content-wide)); }
  body.ui-v4-home section[aria-labelledby="faq-title"] { width: min(100% - 24px, var(--content-reading)); }
  .v4-hero { display: block; min-height: 0; }
  .v4-hero picture,
  .v4-hero-img { position: relative; display: block; height: 300px; }
  .v4-hero-img { object-position: var(--v4-hero-pos-m, var(--v4-hero-pos, center)); }
  .v4-hero::after { display: none; }
  .v4-hero-inner { padding: 28px 0 32px; }
  .v4-hero-copy h1 { font-size: 40px; }
  .v4-hero-text { font-size: 16px; }
  .v4-hero .button-row { flex-direction: column; }
  .v4-trust { flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px 0; }
  body.ui-v4-home .section { padding: 18px; border-radius: var(--radius-md); margin-top: 14px; }
  body.ui-v4-home .section-heading h2 { font-size: 30px; }
  body.ui-v4-home .feature-card > div { padding: 24px; }
  .v4-insider-copy { padding: 26px 20px; }
}
