/*
 * Homepage-only treatment for the banner and the three Em destaque cards.
 * The banner ratio is published by publication.php from the first local slide;
 * 16:9 is only the safe fallback when that asset is unavailable at render time.
 * The featured assets are 640x480 (4:3). Other page modules keep their owners.
 */
.banner-section {
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: var(--home-banner-ratio, 16 / 9);
  background: #1a1a1a;
}

.banner-slider {
  height: 100%;
  min-height: 0;
}

.slide {
  background-size: contain !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-color: #1a1a1a;
}

@media (min-width: 901px) {
  .featured-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.featured-item {
  --featured-image-ratio: 4 / 3;
  height: auto !important;
  min-height: 0;
  aspect-ratio: var(--featured-image-ratio);
  align-self: start;
  background: #0b0b0b;
}

.featured-img {
  width: 100%;
  height: 100% !important;
  min-height: 0;
  aspect-ratio: var(--featured-image-ratio);
  background-color: #0b0b0b;
  background-size: contain !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  transform: none;
}

/* Never enlarge an image back into a crop on hover or touch-capable devices. */
.featured-item:hover .featured-img {
  transform: none !important;
}

@media (max-width: 767px) {
  .featured-overlay {
    min-height: 0;
    padding: 16px 18px;
  }

  .featured-label {
    font-size: clamp(18px, 5.2vw, 22px);
    line-height: 1.15;
  }

  .featured-category {
    font-size: 10px;
    line-height: 1.3;
  }
}
