/* Additional, scoped helpers for the Startseiten-Bild-CTA content block.
   The visual base uses the existing .feature-cta-* rules from reinecker.css. */

/*
 * Shared image wrapper for all three Startseiten-Bild-CTA variants.
 *
 * The wrapper gives the AI badge its own reliable positioning context without
 * changing the positioning of feature-cta-media, shop-cta-media or
 * contact-cta-media from the existing global CTA styles.
 *
 * Badge appearance itself is defined globally in ai-image-label.css.
 */
.home-image-cta-content-block .home-image-cta-media-inner {
  position: relative;
  width: 100%;
  height: 100%;

  --ai-label-top: 12px;
  --ai-label-right: auto;
  --ai-label-bottom: auto;
  --ai-label-left: 12px;

  --ai-label-top-mobile: 8px;
  --ai-label-right-mobile: auto;
  --ai-label-bottom-mobile: auto;
  --ai-label-left-mobile: 8px;
}

.home-image-cta-content-block .home-image-cta-media-inner > picture {
  display: block;
  width: 100%;
  height: 100%;
}

/*
 * Scope image sizing to the actual CTA image.
 * This prevents the AI badge SVG from inheriting the large image dimensions.
 */
.home-image-cta-content-block .home-image-cta-media-inner > picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-image-cta-content-block .feature-cta-subtitle {
  margin: 0 0 24px 0;
  font-size: clamp(1.45rem, 1.8vw, 2rem);
  line-height: 1.1;
  font-weight: 700;
}

body.theme-mono-light .home-image-cta-content-block .feature-cta-overlay {
  background: linear-gradient(
    0deg,
    rgba(255,255,255,0.96) 0%,
    rgba(255,255,255,0.88) 24%,
    rgba(255,255,255,0.54) 50%,
    rgba(255,255,255,0.16) 74%,
    rgba(255,255,255,0) 100%
  );
}

body.theme-mono-dark .home-image-cta-content-block .feature-cta-overlay {
  background: linear-gradient(
    0deg,
    rgba(0,0,0,0.96) 0%,
    rgba(0,0,0,0.90) 24%,
    rgba(0,0,0,0.64) 50%,
    rgba(0,0,0,0.26) 74%,
    rgba(0,0,0,0) 100%
  );
}

body.theme-mono-light .home-image-cta-content-block .feature-cta-title,
body.theme-mono-light .home-image-cta-content-block .feature-cta-subtitle,
body.theme-mono-light .home-image-cta-content-block .feature-cta-text {
  color: #000 !important;
}

body.theme-mono-dark .home-image-cta-content-block .feature-cta-title,
body.theme-mono-dark .home-image-cta-content-block .feature-cta-subtitle,
body.theme-mono-dark .home-image-cta-content-block .feature-cta-text {
  color: #fff !important;
}

.home-image-cta-content-block .contact-cta-subtitle {
  margin: 0 0 18px 0;
  font-size: clamp(1.2rem, 1.4vw, 1.55rem);
  line-height: 1.1;
  font-weight: 700;
}

body.theme-mono-light .home-image-cta-content-block .contact-cta-subtitle {
  color: #000 !important;
}

body.theme-mono-dark .home-image-cta-content-block .contact-cta-subtitle {
  color: #fff !important;
}

/* Keep the Service & Kontakt variant at the same outer width as the other
   Startseiten-Bild-CTA variants. The static template used an inner width
   reduction for this block; this content block intentionally does not. */
.home-image-cta-content-block--service_contact.contact-cta-section .container > .contact-cta-wrap {
  width: 100%;
}

@media (max-width: 991px) {
  .home-image-cta-content-block--online_shop .shop-cta-content,
  .home-image-cta-content-block--online_shop .shop-cta-inner,
  .home-image-cta-content-block--online_shop .shop-cta-title,
  .home-image-cta-content-block--online_shop .shop-cta-subtitle,
  .home-image-cta-content-block--online_shop .shop-cta-text,
  .home-image-cta-content-block--online_shop .shop-cta-button {
    text-align: center;
  }

  .home-image-cta-content-block--online_shop .shop-cta-inner {
    margin-left: auto;
    margin-right: auto;
  }

  .home-image-cta-content-block--online_shop .shop-cta-button {
    display: flex;
    justify-content: center;
  }
}

@media (max-width: 991px) {
  .home-image-cta-content-block--service_contact .contact-cta-content,
  .home-image-cta-content-block--service_contact .contact-cta-inner,
  .home-image-cta-content-block--service_contact .contact-cta-title,
  .home-image-cta-content-block--service_contact .contact-cta-subtitle,
  .home-image-cta-content-block--service_contact .contact-cta-text,
  .home-image-cta-content-block--service_contact .contact-cta-button {
    text-align: center;
  }

  .home-image-cta-content-block--service_contact .contact-cta-inner {
    margin-left: auto;
    margin-right: auto;
  }

  .home-image-cta-content-block--service_contact .contact-cta-button {
    display: flex;
    justify-content: center;
  }
}

/* Align the text width of Service & Kontakt with the Online-Shop variant. */
.home-image-cta-content-block--service_contact .contact-cta-copy {
  width: 100%;
  max-width: 380px;
}

/* Keep Online-Shop and Service & Kontakt centered on tablet/mobile from 991px down. */
@media (max-width: 991px) {
  .home-image-cta-content-block--online_shop .shop-cta-content,
  .home-image-cta-content-block--online_shop .shop-cta-inner,
  .home-image-cta-content-block--online_shop .shop-cta-title,
  .home-image-cta-content-block--online_shop .shop-cta-subtitle,
  .home-image-cta-content-block--online_shop .shop-cta-text,
  .home-image-cta-content-block--online_shop .shop-cta-button,
  .home-image-cta-content-block--service_contact .contact-cta-content,
  .home-image-cta-content-block--service_contact .contact-cta-copy,
  .home-image-cta-content-block--service_contact .contact-cta-title,
  .home-image-cta-content-block--service_contact .contact-cta-subtitle,
  .home-image-cta-content-block--service_contact .contact-cta-text,
  .home-image-cta-content-block--service_contact .contact-cta-button {
    text-align: center;
  }

  .home-image-cta-content-block--online_shop .shop-cta-inner,
  .home-image-cta-content-block--service_contact .contact-cta-copy {
    margin-left: auto;
    margin-right: auto;
  }

  .home-image-cta-content-block--online_shop .shop-cta-button,
  .home-image-cta-content-block--service_contact .contact-cta-button {
    display: flex;
    justify-content: center;
  }
}

/* Appearance > Layout: "Startseiten-Bild-CTA: schmal" (frame-layout-140).
   This narrows the visual CTA box while keeping the same internal variant
   behavior for Versorgung, Online-Shop and Service & Kontakt. */
@media (min-width: 992px) {
  .frame-layout-140 .home-image-cta-content-block .feature-cta-wrap,
  .frame-layout-140 .home-image-cta-content-block .shop-cta-wrap,
  .frame-layout-140 .home-image-cta-content-block .contact-cta-wrap {
    width: calc(100% - 144px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

@media (min-width: 1200px) {
  .frame-layout-140 .home-image-cta-content-block .feature-cta-wrap,
  .frame-layout-140 .home-image-cta-content-block .shop-cta-wrap,
  .frame-layout-140 .home-image-cta-content-block .contact-cta-wrap {
    width: calc(100% - 220px) !important;
  }
}

@media (max-width: 991.98px) {
  .frame-layout-140 .home-image-cta-content-block .feature-cta-wrap,
  .frame-layout-140 .home-image-cta-content-block .shop-cta-wrap,
  .frame-layout-140 .home-image-cta-content-block .contact-cta-wrap {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

/* From 991px down, Online-Shop and Service & Kontakt behave like mobile teaser
   overlays: text is centered, content is aligned to the bottom and the gradient
   comes from bottom to top. */
@media (max-width: 991.98px) {
  .home-image-cta-content-block--online_shop .shop-cta-content,
  .home-image-cta-content-block--service_contact .contact-cta-content {
    align-items: flex-end;
    justify-content: center;
  }

  .home-image-cta-content-block--online_shop .shop-cta-overlay,
  .home-image-cta-content-block--service_contact .contact-cta-overlay {
    background: linear-gradient(
      0deg,
      rgba(245,245,245,0.96) 0%,
      rgba(245,245,245,0.90) 26%,
      rgba(245,245,245,0.62) 48%,
      rgba(245,245,245,0.24) 70%,
      rgba(245,245,245,0) 86%
    );
  }

  body.theme-mono-light .home-image-cta-content-block--online_shop .shop-cta-overlay,
  body.theme-mono-light .home-image-cta-content-block--service_contact .contact-cta-overlay {
    background: linear-gradient(
      0deg,
      rgba(255,255,255,0.96) 0%,
      rgba(255,255,255,0.90) 26%,
      rgba(255,255,255,0.62) 48%,
      rgba(255,255,255,0.24) 70%,
      rgba(255,255,255,0) 86%
    );
  }

  body.theme-mono-dark .home-image-cta-content-block--online_shop .shop-cta-overlay,
  body.theme-mono-dark .home-image-cta-content-block--service_contact .contact-cta-overlay {
    background: linear-gradient(
      0deg,
      rgba(0,0,0,0.96) 0%,
      rgba(0,0,0,0.90) 26%,
      rgba(0,0,0,0.64) 48%,
      rgba(0,0,0,0.26) 70%,
      rgba(0,0,0,0) 86%
    );
  }
}