/**
 * TRUE CARE – Hero-Komponente (BEM)
 * Mobile First | Split-Screen + Default-Varianten
 * ─────────────────────────────────────────────────
 */

/* ═══════════════════════════════════════════════════
   BLOCK: .hero  (Default-Variante – Vollbild)
   ═══════════════════════════════════════════════════ */

.hero {
  position: relative;
  width: 100%;
  min-height: 80vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--color-bg-dark);
}

/* Element: Hintergrundbild */
.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Element: Overlay für Lesbarkeit */
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(42, 42, 42, 0.7) 0%,
    rgba(42, 42, 42, 0.3) 60%,
    rgba(42, 42, 42, 0.1) 100%
  );
}

/* Element: Inhalt über dem Overlay */
.hero__content {
  position: relative;
  z-index: var(--z-raised);
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--spacing-4xl) var(--container-pad);
  color: var(--color-text-inverted);
}

/* Element: Label (z.B. "Studio München") */
.hero__label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--letter-spacing-widest);
  text-transform: uppercase;
  color: var(--color-primary-light);
  margin-bottom: var(--spacing-md);
}

/* Element: Haupttitel */
.hero__title {
  font-family: var(--font-heading);
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-light);
  line-height: var(--line-height-tight);
  color: var(--color-text-inverted);
  margin: 0 0 var(--spacing-lg);
  max-width: 640px;
}

/* Element: Zeilen-Container (ermöglicht Zeilenumbruch-Kontrolle) */
.hero__title-line {
  display: block;
}

/* Modifier: kursive Zeile mit Goldfarbe */
.hero__title-line--italic {
  font-style: italic;
  color: var(--color-primary-light);
}

/* Element: Untertitel / Subheadline */
.hero__subtitle {
  font-family: var(--font-body);
  font-size: var(--font-size-md);
  line-height: var(--line-height-relaxed);
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: var(--spacing-2xl);
  max-width: 480px;
}

/* Element: Body-Text (Split-Variante) */
.hero__text {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-xl);
  max-width: 480px;
}

/* Element: Button-Gruppe */
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--spacing-md);
}

/* Element: Text-Link mit Pfeil */
.hero__link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-family: var(--font-body);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
  color: var(--color-text-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.hero__link-arrow:hover,
.hero__link-arrow:focus-visible {
  color: var(--color-accent);
}

/* ── Modifier: Zentrierter Inhalt ────────────────── */

.hero--centered .hero__content {
  text-align: center;
}

.hero--centered .hero__overlay {
  background: rgba(42, 42, 42, 0.5);
}

.hero--centered .hero__title,
.hero--centered .hero__subtitle {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.hero--centered .hero__actions {
  justify-content: center;
}

/* ═══════════════════════════════════════════════════
   MODIFIER: .hero--split  (Split-Screen – Home Page)
   Mobile: gestapelt (Bild oben, Text unten)
   ═══════════════════════════════════════════════════ */

.hero--split {
  min-height: auto;
  background-color: var(--color-bg-light);
  display: block;
  overflow: visible;
}

/* Flex-Container: Text links, Bild rechts */
.hero__split-inner {
  display: flex;
  flex-direction: column-reverse; /* Mobile: Text zuerst unten, Bild oben */
  width: 100%;
  min-height: auto;
}

/* Text-Seite */
.hero__split-left {
  background-color: var(--color-bg-light);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--spacing-3xl) var(--container-pad);
  order: 2;
}

/* In der Split-Variante: Label-Farbe anpassen */
.hero--split .hero__label {
  color: var(--color-primary);
}

/* In der Split-Variante: Titel-Farbe auf Text-Primär */
.hero--split .hero__title {
  color: var(--color-text-primary);
  max-width: 100%;
  font-size: var(--font-size-3xl);
}

/* Bild-Seite */
.hero__split-right {
  position: relative;
  overflow: hidden;
  min-height: 300px;
  order: 1;
}

/* Bild füllt gesamte rechte Seite */
.hero__split-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 300px;
  object-fit: cover;
  object-position: center top;
}

/* Fallback-Fläche wenn kein Bild vorhanden */
.hero__split-image-placeholder {
  width: 100%;
  height: 100%;
  min-height: 300px;
  background-color: var(--color-secondary);
}

/* ── Tablet (768px+): 50/50 nebeneinander ─────────── */

@media (min-width: 768px) {

  /* Default-Hero */
  .hero__title {
    font-size: var(--font-size-4xl);
  }

  /* Split: Nebeneinander */
  /* Obergrenze verhindert endloses Wachsen auf hohen/Hochformat-Viewports
     (z.B. 1080x1920 Portrait) – 1080px ist die Referenz-Desktop-Höhe
     (1920x1080), bei der der Hero unverändert aussehen soll. Auf normalen
     Querformat-Displays (Höhe ≤ 1080px) greift weiterhin 100vh unverändert;
     als echte min-height wächst die Sektion bei Bedarf trotzdem mit dem
     Inhalt mit (kein Quetschen auf kurzen Landscape-Laptops).
     Selektor bewusst als .hero.hero--split (statt nur .hero--split): das
     Element trägt beide Klassen gleichzeitig, und ohne die zusätzliche
     Spezifität gewinnt ab 1024px sonst per Cascade-Reihenfolge die spätere,
     unveränderte Regel ".hero { min-height: 90vh }" (Default-Hero-Variante)
     und hebelt die Obergrenze wieder aus. */
  .hero.hero--split {
    min-height: min(100vh, 1080px);
  }

  .hero__split-inner {
    flex-direction: row;
    min-height: min(100vh, 1080px);
  }

  .hero__split-left {
    width: 50%;
    order: 1;
    padding: var(--spacing-5xl) var(--spacing-3xl);
  }

  .hero__split-right {
    width: 50%;
    order: 2;
    min-height: auto;
  }

  .hero--split .hero__title {
    font-size: var(--font-size-4xl);
  }

  .hero__split-image,
  .hero__split-image-placeholder {
    position: absolute;
    inset: 0;
    min-height: auto;
    height: 100%;
  }

  .hero__split-image {
    object-fit: cover;
  }
}

/* ── Desktop (1024px+): 55/45 Split ──────────────── */

@media (min-width: 1024px) {

  /* Default-Hero */
  .hero {
    min-height: 90vh;
  }

  .hero__title {
    font-size: var(--font-size-5xl);
  }

  .hero__content {
    padding: var(--spacing-6xl) var(--spacing-2xl);
  }

  /* Split: 55 / 45 */
  .hero__split-left {
    width: 55%;
    padding: var(--spacing-6xl) var(--spacing-4xl) var(--spacing-6xl) var(--spacing-3xl);
  }

  .hero__split-right {
    width: 45%;
  }

  .hero--split .hero__title {
    font-size: var(--font-size-5xl);
  }
}
