/**
 * IDS Basic Layout – Inhaltsboxen
 * Rahmen-Optionen: TCEFORM frame_class → Klasse .frame-{key}
 */

/* -------------------------------------------------------------------------
   Hero-Box (nur Rahmen „Hero-Box“ → .frame-hero-box)
--------------------------------------------------------------------------- */
.frame-hero-box {
  position: relative;
  width: 100%;
  height: 450px;
  overflow: hidden;
}

/* Zwischenwrapper kollabieren nicht die Box – Bild füllt per absolute */
.frame-hero-box .ce-textpic,
.frame-hero-box .ce-image,
.frame-hero-box .ce-gallery,
.frame-hero-box .ce-outer,
.frame-hero-box .ce-inner,
.frame-hero-box .ce-row,
.frame-hero-box .ce-column,
.frame-hero-box figure,
.frame-hero-box picture {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
}

.frame-hero-box .ce-row {
  display: block;
  flex-wrap: nowrap;
  gap: 0;
}

.frame-hero-box .ce-column {
  flex: none;
  width: 100%;
  max-width: none;
}

/* Spezifität über content.css (.ce-gallery img { height: auto }) */
.frame-hero-box .ce-gallery img,
.frame-hero-box .ce-gallery .image-embed-item {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center center;
}

/* Überschrift + Teaser über dem Bild */
.frame-hero-box > header,
.frame-hero-box .ce-bodytext {
  position: absolute;
  left: 50%;
  z-index: 2;
  width: min(92%, 52rem);
  margin: 0;
  padding: 0 1rem;
  text-align: center;
  color: #fff;
  text-shadow:
    0 0 12px rgba(0, 0, 0, 0.35),
    0 2px 8px rgba(0, 0, 0, 0.45),
    0 8px 28px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translate(-50%, calc(-50% + 1.75rem));
  animation: ibl-hero-fade-up 1.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Oberes Viertel */
.frame-hero-box > header {
  top: 18%;
  animation-delay: 0.25s;
}

.frame-hero-box .ce-bodytext {
  top: 38%;
  font-size: clamp(1.2rem, 2.6vw, 2rem);
  line-height: 1.4;
  font-weight: 500;
  animation-delay: 0.85s;
}

.frame-hero-box > header :is(h1, h2, h3, h4, h5, h6) {
  margin: 0;
  color: inherit;
  font-size: clamp(2.25rem, 6.5vw, 5rem);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.frame-hero-box .ce-bodytext > *:first-child {
  margin-top: 0;
}

.frame-hero-box .ce-bodytext > *:last-child {
  margin-bottom: 0;
}

@keyframes ibl-hero-fade-up {
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .frame-hero-box > header,
  .frame-hero-box .ce-bodytext {
    opacity: 1;
    transform: translate(-50%, -50%);
    animation: none;
  }
}

/* -------------------------------------------------------------------------
   Weiße Box (Rahmen „weiße Box“ → .frame-whitebox)
--------------------------------------------------------------------------- */
.frame-whitebox {
  box-sizing: border-box;
  background-color: var(--ibl-color-surface, #fff);
  border: 1px solid var(--ibl-color-border, #d1d1d1);
  border-radius: 12px;
  padding: clamp(1rem, 2.5vw, 1.75rem) clamp(1.1rem, 3vw, 2rem);
  box-shadow:
    0 1px 2px rgba(26, 26, 26, 0.04),
    0 8px 24px rgba(26, 26, 26, 0.06);
}

.frame-whitebox > header :is(h1, h2, h3, h4, h5, h6) {
  margin-top: 0;
}

.frame-whitebox .ce-bodytext > *:last-child {
  margin-bottom: 0;
}

.frame-whitebox .image-embed-item {
  max-width: 100%;
  height: auto;
}

/* Slider und Karussell haben eigene Karten – alte whitebox-Klassen dort nicht doppelt rahmen */
.idsss .frame-whitebox,
.idsls .idsls__slide--content .frame-whitebox {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}
