/* Carrusel de novedades de la portada: compacto, estable y sin letterboxing. */
.news-carousel {
  position: relative;
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
}

.news-carousel__viewport {
  min-height: 0;
}

.news-card {
  display: grid;
  grid-template-columns: minmax(300px, 38%) minmax(0, 1fr);
  align-items: stretch;
  min-height: 286px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #d7e5ec;
  border-radius: 18px;
  box-shadow: 0 18px 44px rgba(15, 63, 98, .10);
}

.news-card[hidden] {
  display: none;
}

.news-card__media {
  width: 100%;
  min-height: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(145deg, #eaf4f8, #dcecf4);
}

.news-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center;
}

.news-card__media--placeholder {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  min-height: 0;
  padding: 28px;
  color: #d7edf7;
  background: linear-gradient(145deg, var(--azul-profundo), var(--azul));
}

.news-card__media--placeholder span {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.08;
  text-align: center;
}

.news-card__body {
  align-self: center;
  padding: clamp(28px, 4vw, 46px);
}

.news-card__meta {
  display: block;
  color: var(--azul);
  font-size: .73rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.news-card__body h3 {
  max-width: 680px;
  margin: 9px 0 12px;
  color: var(--azul-profundo);
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(1.65rem, 2.8vw, 2.35rem);
  line-height: 1.17;
}

.news-card__body p {
  max-width: 690px;
  margin: 0 0 18px;
  color: #566f7e;
  font-size: .98rem;
  line-height: 1.62;
}

.news-card__cta {
  display: inline-flex;
}

.news-carousel__controls {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 38px;
  margin-top: 10px;
}

.news-carousel__controls[hidden] {
  display: none;
}

.news-carousel__controls > button {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(15,63,98,.14);
  border-radius: 50%;
  background: rgba(255,255,255,.96);
  color: var(--azul-profundo);
  box-shadow: 0 8px 22px rgba(15,63,98,.16);
  font-size: 1.2rem;
  font-weight: 800;
  cursor: pointer;
  transform: translateY(-50%);
}

.news-carousel__controls > [data-news-prev] {
  left: 14px;
}

.news-carousel__controls > [data-news-next] {
  right: 14px;
}

.news-carousel__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.news-carousel__dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #b8cbd5;
  cursor: pointer;
}

.news-carousel__dot.is-active {
  width: 22px;
  border-radius: 99px;
  background: var(--azul-profundo);
}

.news-carousel__controls > button:focus-visible,
.news-carousel__dot:focus-visible {
  outline: 3px solid var(--celeste);
  outline-offset: 3px;
}

@media (max-width: 800px) {
  .news-card {
    grid-template-columns: 1fr;
    min-height: 0;
    border-radius: 16px;
  }

  .news-card__media,
  .news-card__media--placeholder {
    aspect-ratio: 16 / 9;
    max-height: 300px;
  }

  .news-card__body {
    padding: 25px 22px 28px;
  }

  .news-card__body h3 {
    font-size: clamp(1.45rem, 7vw, 2rem);
  }

  .news-carousel__controls > button {
    top: min(150px, 23vw);
    width: 40px;
    height: 40px;
  }

  .news-carousel__controls > [data-news-prev] {
    left: 9px;
  }

  .news-carousel__controls > [data-news-next] {
    right: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .news-carousel *,
  .news-carousel *::before,
  .news-carousel *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
