/* ===== CONTENEDOR GENERAL ===== */
#noticias {
  text-align: center;
  height: auto;
  position: relative;
  padding-inline: 1rem;
  color: #1a1a1a;
}

/* ===== CARRUSEL PRINCIPAL ===== */
.contenedor__carrusel {
  overflow: hidden;
  max-width: 1000px;
  margin: auto;
  height: auto;
  margin-bottom: clamp(4rem, 7dvh, 7rem);
}

/* ===== TRACK DE SLIDES ===== */
.carrusel-track {
  display: flex;
  flex-wrap: nowrap;
  transition: transform 0.5s ease-in-out;
  justify-content: space-around;
  gap: 1rem;
  margin: 1rem;
  height: fit-content;
}

/* ===== CADA SLIDE ===== */
.carrusel-slide {
  min-width: 100%;
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 2rem;
  height: fit-content;
}

/* ===== TARJETAS ===== */
.carta {
  background: linear-gradient(145deg, #ffffff, #f0f3f9);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  border-radius: 1em;
  overflow: hidden;
  flex: 1 1 clamp(220px, 40vw, 400px);
  max-width: clamp(220px, 45%, 400px);
  height: clamp(360px, 45vh, 420px);
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  padding: 1.2rem;
  box-sizing: border-box;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
  border: 1px solid #dde5f2;
}

.carta:hover {
  transform: scale(1.04);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
  background: linear-gradient(145deg, #f8fbff, #e4ecf8);
}

/* ===== IMAGEN DE LA TARJETA ===== */
.contenedor__img--carta {
  width: 80%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.carta img {
  width: 100%;
  max-width: 240px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(17, 59, 138, 0.25);
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.carta:hover img {
  transform: scale(1.03);
}

/* ===== TÍTULO DE LA TARJETA ===== */
.contenedor__txt--carta {
  box-sizing: border-box;
  height: fit-content;
}

.carta-titulo {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: #113b8a;
  font-weight: 700;
  text-wrap: balance;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* ===== BOTONES DE NAVEGACIÓN ===== */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  background-color: rgba(17, 59, 138, 0.4);
  color: #ffffff;
  border: none;
  padding: 0.4em 0.7em;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  user-select: none;
  transition: background-color 0.3s ease;
}

.carousel-btn:hover {
  background-color: rgba(17, 59, 138, 0.65);
}

.carousel-btn:focus-visible {
  outline: 3px solid #0b3b8c;
}

.carousel-btn.prev {
  left: clamp(0.5rem, 2vw, 2rem);
}

.carousel-btn.next {
  right: clamp(0.5rem, 2vw, 2rem);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .carrusel-slide {
    flex-direction: column;
    align-items: center;
  }

  .carousel-btn {
    font-size: clamp(1.2rem, 5vw, 2rem);
    top: auto;
    bottom: 50%;
  }

  .carta {
    width: 90%;
    padding: 1rem;
  }

  .carta img {
    width: 80%;
    object-fit: contain;
  }

  .carta-titulo {
    font-size: clamp(1rem, 4vw, 1.4rem);
    padding-top: 0.5rem;
    text-align: center;
  }
}
