.featured {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 5rem 6rem;
  margin-bottom: 4rem;
  /* Full-bleed: escape the 1200px page container so groups wrap by viewport width */
  margin-inline: calc(50% - 50vw);
  padding-inline: 24px;
}

/* A "group of friends": an intrinsic-width cluster that wraps as a unit */
.featured__group {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}

/* A dropped friend hangs lower than its neighbors */
.featured__image--drop {
  margin-top: 3rem;
}

.featured__image {
  position: relative;
  overflow: hidden;
}

/* Fluid: images scale with the viewport between a floor and a ceiling,
   widths follow each image's natural aspect ratio */
.featured__image img {
  display: block;
  height: clamp(16rem, 26vw, 28rem);
  width: auto;
}

/* Gradient overlay disabled for now
.featured__image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(32, 46, 33, 0.6),
    rgba(186, 156, 93, 0.3) 50%,
    rgba(32, 46, 33, 0.8)
  );
  pointer-events: none;
}
*/

/* Tablet: each grouping spans the full page width; images share it equally
   at natural aspect ratios */
@media (min-width: 641px) and (max-width: 940px) {
  .featured__group {
    width: 100%;
  }

  .featured__image {
    flex: 1 1 0;
    min-width: 0;
  }

  .featured__image img {
    width: 100%;
    height: auto;
  }

  /* A lone image shouldn't balloon to full width — cap and center it */
  .featured__image:only-child {
    flex: 0 1 auto;
    max-width: 34rem;
    margin-inline: auto;
  }
}

@media (max-width: 640px) {
  .featured__group {
    flex-wrap: wrap;
    justify-content: center;
  }

  .featured__image img {
    height: 48vw;
  }

  .featured__image--drop {
    margin-top: 1.5rem;
  }
}

/* Mobile portrait: no clusters — a single full-width column */
@media (max-width: 640px) and (orientation: portrait) {
  .featured {
    gap: 2.5rem;
  }

  .featured__group {
    flex-direction: column;
    gap: 2.5rem;
  }

  .featured__image--drop {
    margin-top: 0;
  }

  .featured__image img {
    height: auto;
    width: 100%;
  }
}
