/* ==========================================================================
   transformis® · Hero Image Component (Reusable)
   --------------------------------------------------------------------------
   Full-width Bild mit Text-Overlay + optional Subline & CTA-Button.
   Fallback ohne Bild: blauer Hintergrund (.tm-hero-img--no-image).
   Kompakte Variante fuer laengeren Text: .tm-hero-img--compact.

   Usage: transformis_part('hero-image', [...])
   ========================================================================== */

/* Aspect-Ratio aus Figma: 1600×750 = 32/15.
   → 1920px Screen = 900px Hoehe
   → 1600px Screen = 750px (exakt wie Figma)
   → 1366px Screen = 640px
   → Mobil: min-height greift als Untergrenze */
.tm-hero-img {
  position: relative;
  width: 100%;
  aspect-ratio: 32 / 15;
  min-height: 500px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

/* Fallback ohne Bild: blauer Hintergrund */
.tm-hero-img--no-image {
  background: var(--tm-blue);
}

/* Bild-Container: startet unterhalb des fixed Headers,
   damit der Kopf nicht hinter dem Menue verschwindet */
.tm-hero-img__picture {
  position: absolute;
  top: 110px;      /* ≈ Header-Hoehe (Topbar + Nav) */
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
}

.tm-hero-img__picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right top;
  display: block;
}

/* padding-top kompensiert den Header (110px / 2 ≈ 55px extra),
   damit der Text in der sichtbaren Flaeche zentriert wirkt */
.tm-hero-img__overlay {
  position: relative;
  z-index: 1;
  text-align: left;
  padding-top:    calc(55px + clamp(40px, 5vw, 72px));
  padding-bottom: clamp(40px, 5vw, 72px);
  padding-left:   var(--tm-edge-padding);
  padding-right:  var(--tm-content-padding);
  width: 100%;
  max-width: none;
}

.tm-hero-img__kicker {
  margin: 0 0 2px 0;
  font-family: var(--tm-font-heading);
  font-weight: var(--tm-fw-regular);
  font-size: clamp(18px, 2.5vw, 28px);
  line-height: 1.4;
  color: var(--tm-white);
}

.tm-hero-img__headline {
  margin: 0;
  font-family: var(--tm-font-heading);
  font-weight: var(--tm-fw-extrabold);
  font-size: clamp(80px, 12vw, 160px);
  line-height: 1.1;
  color: var(--tm-green);
}

/* Kompakt-Variante: kleinere Headline fuer laengeren Text */
.tm-hero-img--compact .tm-hero-img__headline {
  font-size: clamp(40px, 6vw, 88px);
  line-height: 1.15;
  max-width: 1000px;
}

/* Subline unter der Headline */
.tm-hero-img__subline {
  margin: 24px 0 0;
  font-family: var(--tm-font-body);
  font-weight: var(--tm-fw-regular);
  font-size: clamp(16px, 1.6vw, 22px);
  line-height: 1.5;
  color: var(--tm-white);
  max-width: 860px;
  text-wrap: balance;        /* verhindert Witwen (einzelnes Wort in letzter Zeile) */
}

/* Button-Container */
.tm-hero-img__actions {
  margin-top: 32px;
}

/* Dekorativer Pfeil oben rechts – unterhalb des fixed Headers */
.tm-hero-img__arrow {
  position: absolute;
  top: clamp(120px, 14vw, 170px);
  right: clamp(16px, 3vw, 40px);
  z-index: 2;
  width: clamp(60px, 8vw, 120px);
  height: auto;
}

@media (max-width: 962px) {
  .tm-hero-img__picture {
    top: 0;
  }
}

/* Dunkles Overlay auf kleinen Viewports fuer Lesbarkeit */
@media (max-width: 814px) {
  .tm-hero-img__picture::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(5, 19, 44, 0.45);
    z-index: 1;
  }
}

@media (max-width: 700px) {
  .tm-hero-img__headline {
    font-size: 64px;
  }
  .tm-hero-img--compact .tm-hero-img__headline {
    font-size: 40px;
  }
  .tm-hero-img__subline {
    font-size: 16px;
  }
  .tm-hero-img__actions {
    margin-top: 24px;
  }
  .tm-hero-img__arrow {
    width: 50px;
  }
}
