/* ==========================
   ACTION OFFER
   ========================== */

/* Container-breit, volle Bildschirmhöhe */
.action-offer {
  max-width: 100%;
  width: 100%;
  position: relative;
  min-height: 100vh; /* Fullscreen-Basis, darf höher werden */
}

/* Foto füllt die Containerbreite und volle Höhe */
.action-offer-media {
  min-height: 100vh;
  background-size: cover;
  background-position: top left;
  background-repeat: no-repeat;
  background-image: url("../img/goldener-herbst-aktion-2025.webp");
}

/* Textkachel Container */
.action-offer-container {
  max-width: 1920px;
}

/* Textkachel (Desktop) */
.action-offer-card {
  position: absolute;
  right: 7%;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(33, 33, 33, 0.4);
  padding: 40px;
  max-width: 1200px;
  border-radius: 4px;
  z-index: 2;
}

/* Typo-Vorgaben */
.action-offer-card .headline,
.action-offer-card .subheadline,
.action-offer-card .text {
  font-size: 50px;
  font-weight: 700;
  line-height: 110%;
  margin-top: 20px;
}

.action-offer-card .headline {
  color: #fff9d4;
}

.action-offer-card .subheadline {
  color: #f3945a;
}

.action-offer-card .annotation,
.action-offer-card .text {
  color: #ffffff;
}

.action-offer-card .annotation {
  font-size: 18px;
  font-weight: 400;
  line-height: 110%;
  margin-left: 120px;
}

/* Button */
.action-offer-card .btn {
  display: inline-block;
  margin-top: 45px;
  margin-bottom: 20px;
  padding: 15px 20px;
  border-radius: 4px;
  background: #f3945a;
  color: #ffffff;
  font-size: 20px;
  font-weight: 400;
  text-align: center;
  text-decoration: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.action-offer-card .btn:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

/* ========== Tablet ========== */

@media (min-width: 710px) and (max-width: 1170px) {
  .action-offer-card {
    position: absolute;
    right: 3%;
    left: 3%;
    top: 50%;
    transform: translateY(-50%);
  }

  /* Typo-Vorgaben */
  .action-offer-card .headline,
  .action-offer-card .subheadline,
  .action-offer-card .text {
    font-size: 50px;
  }

  .action-offer-card .annotation {
    font-size: 18px;
    margin: 30px 0 40px 50px;
  }
}

/* ========== Smartphone ========== */

@media (max-width: 710px) {
  /* Sektion & Bild-Wrapper: bevorzugt dvh/svh, sonst vh */
  .action-offer,
  .action-offer-media {
    display: flex;
    /* Fallback-Kaskade: Browser ignorieren unbekannte Einheiten */
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
  }

  .action-offer-media {
    flex: 1;
    background-position: center left;
    background-size: cover;
    align-items: stretch; /* Card kann volle Höhe einnehmen */
  }

  .action-offer-card {
    position: static; /* im normalen Fluss */
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    background: rgba(33, 33, 33, 0.5);
    padding: 80px 25px;
    border-radius: 0;
    transform: none;
    z-index: auto;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Inhalt vertikal zentrieren */
    align-items: flex-start; /* optional: linksbündig lassen */
    flex: 1 1 auto; /* füllt den verfügbaren Platz */
    min-height: 100%; /* zieht sich auf volle Containerhöhe */

    /* Vollhöhe innerhalb des Wrappers, große Typo bleibt */
    display: flex;
    flex-direction: column;
    justify-content: center left;
    align-self: stretch;
    min-height: 100%;
    /* KEIN max-height / overflow – die Seite darf wachsen */
    padding-bottom: calc(30px + env(safe-area-inset-bottom));
  }

  /* Typo-Vorgaben */
  .action-offer-card .headline,
  .action-offer-card .subheadline,
  .action-offer-card .text {
    font-size: 45px;
  }

  .action-offer-card .annotation {
    font-size: 14px;
    margin: 30px 0 40px 5px;
  }
}

/* iOS-Safari Fallback: füllt den sichtbaren Bereich zuverlässiger als 100vh */
@supports (-webkit-touch-callout: none) {
  @media (max-width: 710px) {
    .action-offer,
    .action-offer-media {
      /* iOS akzeptiert das oft besser als vh */
      min-height: -webkit-fill-available;
    }
  }
}

/* Sehr kleine Höhen: Flex aus, Bereich wächst mit Inhalt (kein Abschneiden) */
@media (max-width: 710px) and (max-height: 600px) {
  .action-offer,
  .action-offer-media {
    display: block; /* kein Flex-Layout -> natürliche Dokumenthöhe */
    min-height: auto; /* keine Viewport-Bindung */
    height: auto;
  }
  .action-offer-card {
    min-height: auto;
    margin-bottom: 0px; /* Abstand zum nächsten Abschnitt */
  }
}
