/* Voor wie — lagen: foto → cream 50% → tekst
   Werkt met .voor-wie-panel (live) én .voor-wie-textband (nieuwe view)
*/

.voor-wie-page {
  background: var(--cream);
}

.voor-wie-main {
  overflow: visible;
}

.voor-wie-content {
  position: relative;
  isolation: isolate;
  margin: 0;
  padding: 36px max(4vw, 28px) 110px calc(var(--sidebar-width) + 36px);
  --voor-wie-cream-w: 65vw;
  --voor-wie-cream-edge: var(--voor-wie-cream-w);
  --voor-wie-photo-w: clamp(680px, 56vw, 1100px);
  --voor-wie-photo-top: -52px;
}

@media (min-width: 1200px) {
  .voor-wie-content {
    --voor-wie-photo-w: max(
      calc(100vw - var(--voor-wie-cream-w) - max(4vw, 28px) + min(10vw, 260px)),
      760px
    );
  }
}

@media (min-width: 1600px) {
  .voor-wie-content {
    --voor-wie-photo-w: max(
      calc(100vw - var(--voor-wie-cream-w) - max(4vw, 28px) + min(14vw, 380px)),
      920px
    );
  }
}

@media (min-width: 2000px) {
  .voor-wie-content {
    --voor-wie-photo-w: max(
      calc(100vw - var(--voor-wie-cream-w) - max(4vw, 28px) + min(18vw, 520px)),
      1080px
    );
  }
}

/* 1. Foto onderaan — iets kleiner en hoger */
.voor-wie-media {
  position: absolute;
  top: var(--voor-wie-photo-top);
  right: 0;
  z-index: 0;
  width: var(--voor-wie-photo-w);
  aspect-ratio: 2009 / 1346;
  margin: 0;
  line-height: 0;
  pointer-events: none;
  overflow: hidden;
}

.voor-wie-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

/* Zigzag-vorm via alpha van afbeelding.png (bij Umbraco-foto) */
.voor-wie-media--masked {
  -webkit-mask-image: url("/assets/images/afbeelding.png");
  mask-image: url("/assets/images/afbeelding.png");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-mode: alpha;
  mask-mode: alpha;
}

/* Kicker boven alles, zonder cream-box */
.voor-wie-kicker {
  position: relative;
  z-index: 2;
  max-width: 18ch;
  margin: 112px 0 14px;
  color: var(--coral);
  font-family: var(--heading-font);
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: .95;
  text-transform: uppercase;
}

/* Subtitel zonder cream (binnen of buiten panel) */
.voor-wie-subheading {
  position: relative;
  z-index: 2;
  margin: 0 0 16px;
  max-width: 11em;
  color: var(--charcoal);
  font-size: clamp(1.55rem, 2.6vw, 2.35rem);
  font-weight: 700;
  line-height: 1.15;
  text-transform: uppercase;
}

/* Live panel: wrapper zonder cream — subtitel blijft zichtbaar over de foto */
.voor-wie-panel {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 0;
  background: transparent;
}

/* 2. Cream-vlak pas vanaf de intro, 50% van het scherm */
.voor-wie-panel .voor-wie-intro,
.voor-wie-textband {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  width: var(--voor-wie-cream-w);
  max-width: none;
  margin: 0 0 0 calc(-1 * (var(--sidebar-width) + 36px));
  padding: 20px 40px 28px calc(var(--sidebar-width) + 36px);
  background: var(--cream);
}

.voor-wie-textband .voor-wie-intro {
  width: auto;
  max-width: 42rem;
  margin: 0 0 12px;
  padding: 0;
  background: transparent;
}

.voor-wie-textband .voor-wie-intro:last-of-type {
  margin-bottom: 0;
}

/* 3. Tekst boven het cream-vlak */
.voor-wie-panel .voor-wie-intro,
.voor-wie-textband .voor-wie-intro,
.voor-wie-textband .voor-wie-audiences {
  position: relative;
  z-index: 2;
}

.voor-wie-intro {
  color: var(--charcoal);
  font-size: 15px;
  line-height: 1.5;
  white-space: pre-line;
}

.voor-wie-panel .voor-wie-intro {
  max-width: none;
}

.voor-wie-panel .voor-wie-intro > *,
.voor-wie-audiences {
  position: relative;
  z-index: 2;
}

.voor-wie-audiences {
  margin: 36px 0 0;
  width: min(42rem, 100%);
}

/* Audiences buiten panel: cream doorlopend vanaf intro */
.voor-wie-content > .voor-wie-audiences {
  box-sizing: border-box;
  width: var(--voor-wie-cream-w);
  max-width: none;
  margin: 0 0 0 calc(-1 * (var(--sidebar-width) + 36px));
  padding: 24px 40px 48px calc(var(--sidebar-width) + 36px);
  background: var(--cream);
}

.voor-wie-textband .voor-wie-audiences {
  width: 100%;
  max-width: 42rem;
  margin-top: 36px;
  padding: 0;
  background: transparent;
}

.voor-wie-content > .voor-wie-audiences .voor-wie-audience {
  max-width: 42rem;
}

.voor-wie-audience + .voor-wie-audience {
  margin-top: 32px;
}

.voor-wie-audience h2 {
  margin: 0 0 12px;
  color: var(--coral);
  font-family: var(--heading-font);
  font-size: clamp(1.1rem, 1.65vw, 1.35rem);
  font-weight: 700;
  line-height: 1.15;
  text-transform: uppercase;
}

.voor-wie-copy {
  margin: 0 0 10px;
  color: var(--charcoal);
  font-size: 15px;
  line-height: 1.5;
}

.voor-wie-copy:last-child {
  margin-bottom: 0;
}

.voor-wie-cta {
  position: absolute;
  left: var(--voor-wie-cream-edge);
  top: calc(
    var(--voor-wie-photo-top)
    + (var(--voor-wie-photo-w) * 1346 / 2009)
    + 12px
  );
  right: auto;
  bottom: auto;
  z-index: 3;
  display: flex !important;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  box-sizing: border-box;
  width: 170px;
  min-height: 220px;
  padding: 18px 16px 14px;
  color: var(--sand) !important;
  background: var(--coral);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none !important;
  text-transform: uppercase;
}

.voor-wie-cta__label {
  max-width: 10.5em;
}

.voor-wie-cta__arrow {
  align-self: flex-end;
  font-size: 22px;
  line-height: 1;
}

.voor-wie-cta:hover,
.voor-wie-cta:focus-visible {
  color: var(--sand) !important;
  filter: brightness(1.05);
  text-decoration: none !important;
}

@media (max-width: 1100px) {
  .voor-wie-content {
    --voor-wie-photo-w: min(52vw, 660px);
    --voor-wie-photo-top: -40px;
  }
}

@media (max-width: 900px) {
  .voor-wie-content {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 96px 24px 72px;
  }

  .voor-wie-media {
    position: relative;
    top: auto;
    right: auto;
    order: 1;
    z-index: 0;
    width: min(100%, 620px);
    margin-right: -24px;
    margin-left: auto;
  }

  .voor-wie-kicker {
    order: 2;
    max-width: none;
    margin-top: 0;
  }

  .voor-wie-panel,
  .voor-wie-textband,
  .voor-wie-content > .voor-wie-subheading {
    order: 3;
  }

  .voor-wie-panel .voor-wie-intro,
  .voor-wie-textband,
  .voor-wie-content > .voor-wie-audiences {
    width: 100%;
    margin-left: 0;
    padding: 18px 18px 28px;
  }

  .voor-wie-content > .voor-wie-audiences {
    order: 4;
  }

  .voor-wie-cta {
    position: relative;
    left: auto;
    top: auto;
    right: auto;
    bottom: auto;
    order: 5;
    align-self: flex-end;
  }
}

@media (max-width: 620px) {
  .voor-wie-content {
    padding: 96px 16px 64px;
  }

  .voor-wie-media {
    margin-right: -16px;
  }

  .voor-wie-panel .voor-wie-intro,
  .voor-wie-textband,
  .voor-wie-content > .voor-wie-audiences {
    padding: 14px 14px 22px;
  }

  .voor-wie-cta {
    width: 100%;
  }
}
