/* ==================================================
   BLOCKS (mediamix + about media)
   image slider · gallery · video · text
   ================================================== */

.mediamix-page {
  position: relative;
  width: 100%;
  padding: 110px 0 140px;
}

.mediamix-intro {
  width: min(800px, calc(100% - 40px));
  margin: 0 auto 90px;
  font-family: var(--font-text);
  line-height: 1.25;
}

.mediamix-intro p,
.media-text p {
  margin: 0 0 1em;
}

.mediamix-intro p:last-child,
.media-text > :last-child {
  margin-bottom: 0;
}


/* --------------------------------------------------
   SIZES + POSITIONS (image, video, text)
   -------------------------------------------------- */

.media-size-full   { width: 100%; }
.media-size-large  { width: 80%; }
.media-size-medium { width: 55%; }
.media-size-small  { width: 35%; }

.media-position-left   { margin-left: 0;    margin-right: auto; }
.media-position-center { margin-left: auto; margin-right: auto; }
.media-position-right  { margin-left: auto; margin-right: 0; }

.media-image,
.media-gallery,
.media-video,
.media-text {
  margin-top: 0;
  margin-bottom: 80px;
}

figcaption {
  margin-top: 8px;
  font-family: var(--font-text);
  font-size: clamp(13px, 1vw, 16px);
  line-height: 1.25;
  color: var(--blue);
}

figcaption p {
  margin: 0;
}

.lightbox-link {
  display: block;
  cursor: zoom-in;
}


/* --------------------------------------------------
   IMAGE SLIDER
   -------------------------------------------------- */

.image-slider {
  position: relative;
}

.image-slider-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

.image-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.image-slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.image-slide .lightbox-link,
.image-slide picture {
  display: block;
  width: 100%;
  height: 100%;
}

.image-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.image-slider-prev,
.image-slider-next {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 20;
  width: 20%;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
}

.image-slider-prev { left: 0;  cursor: w-resize; }
.image-slider-next { right: 0; cursor: e-resize; }


/* --------------------------------------------------
   GALLERY
   -------------------------------------------------- */

.media-gallery {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.gallery-images {
  display: grid;
  gap: var(--gallery-gap, 16px);
}

.gallery-gap-none   { --gallery-gap: 0; }
.gallery-gap-small  { --gallery-gap: 6px; }
.gallery-gap-normal { --gallery-gap: 16px; }
.gallery-gap-large  { --gallery-gap: 40px; }

.gallery-layout-diptych  .gallery-images,
.gallery-layout-grid     .gallery-images { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery-layout-triptych .gallery-images { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.gallery-layout-row .gallery-images {
  display: flex;
  align-items: flex-start;
}

.gallery-layout-row .gallery-item {
  flex: 1 1 0;
  min-width: 0;
}

.gallery-item img {
  width: 100%;
  height: auto;
}


/* HORIZONTAL SCROLL */

.gallery-layout-horizontal {
  overflow: hidden;
}

.gallery-layout-horizontal .gallery-images {
  display: flex;
  align-items: flex-start;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.gallery-layout-horizontal .gallery-images::-webkit-scrollbar {
  display: none;
}

.gallery-layout-horizontal .gallery-item {
  flex: 0 0 calc((100% - 2 * var(--gallery-gap, 16px)) / 3);
  min-width: 0;
  scroll-snap-align: start;
}

.gallery-layout-horizontal .gallery-item img {
  user-select: none;
  -webkit-user-drag: none;
}


/* --------------------------------------------------
   VIDEO
   -------------------------------------------------- */

.video-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--black);
}

.video-container iframe,
.video-embed {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-poster {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--black);
}

.video-poster picture,
.video-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-play {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 4px 7px;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-text);
  font-size: 0.75rem;
}


/* --------------------------------------------------
   TEXT
   -------------------------------------------------- */

.media-text {
  padding-left: 7mm;
  padding-right: 7mm;
  font-family: var(--font-text);
  line-height: 1.3;
  color: var(--blue);
}

.media-text > :first-child {
  margin-top: 0;
}

.media-text a {
  color: inherit;
}


/* --------------------------------------------------
   MOBILE
   -------------------------------------------------- */

@media (max-width: 700px) {
  .mediamix-page {
    padding-top: 90px;
  }

  .mediamix-intro {
    width: calc(100% - 24px);
    margin-bottom: 48px;
    font-size: 15px;
  }

  .media-image,
  .media-gallery,
  .media-video,
  .media-text {
    margin-bottom: 48px;
  }

  .media-size-full,
  .media-size-large,
  .media-size-medium {
    width: 100%;
  }

  .media-size-small {
    width: 70%;
  }

  .image-slider-stage {
    aspect-ratio: 4 / 3;
  }

  .gallery-layout-triptych .gallery-images {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-layout-row .gallery-images {
    overflow-x: auto;
  }

  .gallery-layout-row .gallery-item,
  .gallery-layout-horizontal .gallery-item {
    flex: 0 0 75vw;
  }

  .media-text {
    font-size: 15px;
  }
}


/* --------------------------------------------------
   BLOCK TITLE (Titelschrift) + RUNDE ECKEN
   -------------------------------------------------- */

.media-title {
  margin: 0 0 0.35em;
  font-family: var(--font-display);
  line-height: 0.95;
  color: var(--blue);
}

.media-title-large  { font-size: clamp(22px, 2.4vw, 40px); }
.media-title-medium { font-size: clamp(16px, 1.4vw, 22px); }  /* = Hauptmenü */
.media-title-small  { font-size: clamp(14px, 1.1vw, 18px); }

/* Titel-Position (unabhängig vom Medium wählbar) */
.media-title-left   { text-align: left; }
.media-title-center { text-align: center; }
.media-title-right  { text-align: right; }

/* runde Ecken (Option) */
.media-rounded img {
  border-radius: var(--radius);
}

.media-rounded .video-container {
  border-radius: var(--radius);
  overflow: hidden;
}
