/*
 * Block: image_carousel
 * Source: prototypes/kitchen-sink-dncg.html  .car / .gal image tiles.
 * Depends on: components/slider.css (the .dncg-carousel engine + controls).
 *
 * The block reuses .carousel-slider as its container namespace but is a plain
 * image gallery (.carousel-images), not a content hero - it opts out of the
 * hero's dark slide background and white mobile text (handled in slider.css via
 * :not(.carousel-images)). These are the tile + gradient-caption deltas per
 * display_style .carousel-images--{2-image|3-image}. Tokens only.
 * (Full-image mode retired — too large; legacy values fall back to 3-image.)
 */

/* Leave room below the images for the dots capsule (engine positions it at the
   container's bottom edge). */
.carousel-images .carousel-slider-container {
  padding-bottom: 3rem;
}

.carousel-images .images-slide {
  position: relative;
  margin: 0;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--navy);
}

.carousel-images .images-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Multi-image tiles: uniform 4:3 crop so a mixed row reads as a set. */
.carousel-images--2-image .images-slide,
.carousel-images--3-image .images-slide {
  aspect-ratio: 4 / 3;
}
@media print, screen and (max-width: 47.9375em) {
  /* Engine drops to 1-up below 768px; let the single tile size naturally. */
  .carousel-images--2-image .images-slide,
  .carousel-images--3-image .images-slide {
    aspect-ratio: auto;
  }
  .carousel-images--2-image .images-slide img,
  .carousel-images--3-image .images-slide img {
    height: auto;
  }
}

/* Caption: gradient overlay on the image (prototype .car__item figcaption). */
.carousel-images .carousel-images-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 1.6rem 1.1rem 0.9rem;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--white);
  background: linear-gradient(
    180deg,
    rgba(var(--surface-dark-alt-rgb), 0),
    rgba(var(--surface-dark-alt-rgb), 0.9)
  );
}
