/* ============================================================
   HEADERIMAGE – SHORTCODE + TEMPLATE
   ============================================================ */

/* Desktop: fester Header */
.headerimage {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  overflow: hidden;
  height: 400px; /* Originalwert */
}
/* Fix: Hochgestellte Zeichen sichtbar machen */
.headerimage-inner,
.headerimage-content {
    overflow: visible !important;
}
/* Variante mit Promos */
.headerimage.has-promos {
  height: 480px;
}

/* Unter 995px: dynamisch, nicht abschneiden */
@media (max-width: 995px) {
  .headerimage,
  .headerimage.has-promos {
    height: auto;        /* passt sich dem Inhalt an */
    min-height: 300px;    /* aber mindestens 300px */
    padding: 2em 0;       /* optional: Abstand für Text */
  }
}
@media (max-width: 995px) {

  /* Höhe fix */
  body:not(.home) .headerimage {
    height: 100px !important;
    min-height: 100px !important;
    max-height: 100px !important;
    overflow: hidden !important;
    position: relative;
  }

  /* H1 styling */
  body:not(.home) .headerimage h1.headerheadline {
    font-weight: 700 !important;
    color: #fff !important;
    display: block !important;
    left: var(--global-gutter, 20px) !important;
    bottom: 10px !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 20 !important;
  }

  /* Inhalt ausblenden – aber NICHT pauschal ! */
  body:not(.home) .headerimage h2,
  body:not(.home) .headerimage p,
  body:not(.home) .headerimage .tagline,
  body:not(.home) .headerimage .header-promotions,
  body:not(.home) .headerimage .button,
  body:not(.home) .headerimage .headerimage-content > *:not(.headerheadline) {
    display: none !important;
  }

  /* Wrapper sichtbar lassen */
  body:not(.home) .headerimage-content,
  body:not(.home) .headerimage-inner {
    display: block !important;
  }
}
/* Mobile Archiv-H1 */
.headerheadline-mobile-archive {
  display: none;
}

/* Mobil < 995 */
@media (max-width: 995px) {
  .headerheadline-mobile-archive {
    display: block;
    font-weight: 700;
    color: #fff;
    position: relative;
    z-index: 5;
  }

  /* normaler H1 mobil ausblenden */
  .headerimage .headerheadline {
    display: none !important;
  }
}
/* ===========================================
   Inhalt & Struktur
   =========================================== */
.headerimage-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max-width, 1200px);        /* Fallback */
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--global-gutter, 24px);   /* Fallback */
  padding-right: var(--global-gutter, 24px);  /* Fallback */
  box-sizing: border-box;
  text-align: left;
  overflow: hidden; /* verhindert überlaufenden Text */
}

.headerimage-content {
  width: 100%;
  max-width: 100%;
  text-align: left;
  box-sizing: border-box;
  white-space: normal;
  overflow-wrap: normal;  /* nur bei Leerzeichen */
  word-break: normal;     /* keine Trennung mitten im Wort */
}

.headerheadline {
  font-size: clamp(28px, 6vw, 65px)!important; /* passt sich dynamisch an Viewport an */
  color: #fff!important;
  margin: 0!important;
  font-weight: 700!important;
  letter-spacing: -0.5px!important;
  line-height: 1!important;
}


.headerheadline-sub {
  font-size: 1.8em;
  color: #fff;
  margin-top: 0.4em;
  font-weight: 400;
}


/* ===========================================
   Hintergrund + Overlay
   =========================================== */
.headerimage::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--headerimage-bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(8px);
  transform: scale(1.05);
  z-index: 0;
}

.headerimage::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

/* ===========================================
   Vordergrund-Element (z. B. Badge)
   =========================================== */
.vordergrund-featured {
  max-width: 350px;
  max-height: 350px;
  margin-top: 1em;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 3;
}

/* ===========================================
   Header-Promoboxen
   =========================================== */
.header-promo-boxes {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.header-promo-tile {
  background: rgba(255, 255, 255, 0.95);
  border-left: 6px solid #0073aa;
  padding: 1.2rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  max-width: 280px;
  min-width: 240px;
  margin-top: 30px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-promo-tile::after {
  content: "";
  position: absolute;
  right: 0.6rem;
  bottom: 0.6rem;
  width: 40px;
  height: 40px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24' fill='none' stroke='%23777' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12 6 12 12 16 14'/%3E%3C/svg%3E") no-repeat center center;
  background-size: contain;
  opacity: 0.08;
  pointer-events: none;
}

.header-promo-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.header-promo-tile h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #222;
}

.header-promo-tile p {
  margin: 0.3rem 0;
  font-size: 0.9rem;
  color: #444;
}

.header-promo-tile p strong {
  display: inline-block;
  background: #fbe9e9;
  color: #c00;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
}

.header-promo-tile .promo-date {
  font-size: 0.95rem;
  font-weight: 600;
  color: #222;
  margin-top: 0.5rem;
}

.header-promo-tile .button {
  display: inline-block;
  margin-top: 0.8rem;
  background: #0073aa;
  color: #fff;
  padding: 0.5rem 1.1rem;
  font-size: 0.85rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s ease;
}

.header-promo-tile .button:hover {
  background: #005e8a;
}
/* ============================================================
   STARTSEITE – C³ VIDEO-HERO
   ============================================================ */

.start-hero-video {
  position: relative;
  height: 480px;
  width: 100%;
  overflow: hidden;
  background: #000;
  margin: 0;
}

/* Hintergrund-Overlay (Abdunklung) */
.start-hero-video::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55); /* Abdunklung */
  z-index: 1;
  pointer-events: none;
}

.start-hero-video-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

/* YOUTUBE & VIDEO COVER FIX */
.start-hero-video-bg iframe,
.start-hero-video-bg video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  /* Der wichtigste Teil: echtes Cover */
  width: 177.78vh;   /* 16:9 Ratio */
  height: 100vh;

  min-width: 100%;
  min-height: 100%;

  object-fit: cover;
}

/* Inhaltsschicht */
.start-hero-inner {
  position: relative;
  z-index: 2; /* Über Overlay & Video */
  height: 100%;
  max-width: var(--max-width, 1200px);
  margin: 0 auto;
  padding: 1.5rem var(--global-gutter, 24px);
  box-sizing: border-box;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;

  color: #fff !important; /* Schriftfarbe global weiß */
}

.start-hero-left h1,
.start-hero-left h2,
.start-hero-left p {
  color: #fff !important;
}


.start-hero-left p {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.4;
  max-width: 36rem;
  padding-bottom: 20px;
}

/* Formular */
.start-hero-right {
  flex: 1 1 45%;
  max-width: 420px;
}

.hero-form {
  background: rgba(0, 0, 0, 0.55);
  padding: 1.2rem 1.4rem;
  border-radius: 12px;
  backdrop-filter: blur(4px);
}

/* Inputs */
.hero-form input[type="text"],
.hero-form input[type="email"],
.hero-form select {
  width: 100%;
  padding: 0.55rem 0.6rem;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(0,0,0,0.35);
  color: #fff;
}

.hero-form input::placeholder {
  color: rgba(255,255,255,0.7);
}


/* Mobile */
@media (max-width: 900px) {
  .start-hero-video {
    height: auto;

  }

  .start-hero-inner {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }

  .start-hero-right {
    display:none;
  }
}

/* ============================================================
   FIX: Formularfelder im Startseiten-Hero (hell & lesbar)
   ============================================================ */

.start-hero-video .hero-form input[type="text"],
.start-hero-video .hero-form input[type="email"],
.start-hero-video .hero-form select {
  background: rgba(255, 255, 255, 0.9); /* Helle Felder */
  border: 1px solid rgba(0,0,0,0.3);
  color: #000 !important; /* Schwarze Schrift */
}

.start-hero-video .hero-form input::placeholder {
  color: rgba(0,0,0,0.55) !important;
}

.start-hero-video .hero-form .checkbox label,
.start-hero-video .hero-form .radios label {
  color: #fff !important;
}

.start-hero-video .hero-form input[type="radio"],
.start-hero-video .hero-form input[type="checkbox"] {
  accent-color: var(--ctls-blue, #004f9e);
}
/* ===========================================
   Video-Header
   =========================================== */
.headerimage-video {
  position: relative;
  overflow: hidden;
  height: 480px;
}

.video-bg-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.video-bg-wrapper iframe,
.video-bg-wrapper video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  object-fit: cover;
}

.video-bg-wrapper iframe {
  width: 177.77vh;
  height: 100vh;
  z-index: 0;
}

.video-bg-wrapper video {
  min-width: 100%;
  min-height: 100%;
}
/* ===========================================
   Headerimage Button (globaler Stil)
   =========================================== */
/* ===========================================
   Headerimage Button (verwendet globale Base-Styles)
   =========================================== */
.headerimage-button {
  margin-top: 1.2em;
  position: relative;
  z-index: 3; /* über Overlay sichtbar */
}

.headerimage-button .button {
  /* nutzt komplett den Standard aus base.css */
  display: inline-block;
  position: relative;
  z-index: 3;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25); /* optional für bessere Sichtbarkeit */
}

/* ============================================================
   HEADERIMAGE – MOBILE ANPASSUNGEN
   ============================================================ */
@media (max-width: 995px) {
  .headerimage,
  .headerimage.has-promos,
  .headerimage-video {
    height: 170px !important;
    padding-top: 2em;
    padding-bottom: 2em;
  }

  .headerimage-inner {
    max-width: 100vw;
    overflow-x: hidden;
  }

  .headerimage-content {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: keep-all;
  }

  .headerheadline {
    font-size: 28px;
    line-height: 1.2;
  }

  .headerimage.has-promos .headerimage-content h1 {
    font-size: 30px;
  }

  .headerheadline-sub {
    font-size: 1.1em;
  }

  .vordergrund-featured {
    max-width: 140px;
    max-height: 140px;
  }
}

/* ============================================================
   HERO FORM – FIXES (Abstand + Weißer Text + weiße Checkboxen)
   ============================================================ */

/* Abstand der Felder kompakt */
.hero-form input[type="text"],
.hero-form input[type="email"],
.hero-form select {
  margin-bottom: 0.55em !important;
}

/* Radio- und Checkbox-Labels weiß */
.hero-form label,
.hero-form .checkbox label,
.hero-form .radios label {
  color: #fff !important;
}

/* Checkbox + Radio Farbe weiß */
.hero-form input[type="checkbox"],
.hero-form input[type="radio"] {
  accent-color: #fff !important;
}

/* Select + Optionen weiß auf dunklem Hintergrund */
.hero-form select,
.hero-form select option {
  color: #fff !important;
  background-color: rgba(0,0,0,0.5);
}

/* Placeholder heller sichtbar */
.hero-form input::placeholder {
  color: rgba(255,255,255,0.7) !important;
}

/* Abstand der Radios leicht verringern */
.hero-form .radios label {
  margin-right: 1em;
}

/* Abstand bei Checkbox reduzieren */
.hero-form .checkbox {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}