/* Estilos específicos para el carrusel */

.carousel-item {
  position: relative;
  grid-area: 1 / 1;
  align-self: stretch;
  width: 100%;
  min-width: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 0;
  transition:
    opacity 0.9s ease-in-out,
    visibility 0.9s ease-in-out;
}


.carousel-item.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 1;
}


/* ===== HERO / CARRUSEL INSTITUCIONAL ===== */

.hero-slide {
  overflow:hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.48) 38%, rgba(0, 0, 0, 0.20) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.38) 100%);
  z-index: 1;
}

.hero-pattern {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255, 209, 0, 0.08) 0, transparent 30%),
    radial-gradient(circle at 80% 80%, rgba(140, 0, 43, 0.14) 0, transparent 28%);
}

.hero-content-block h1 {
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.hero-kicker {
  display: inline-block;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: white;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

.hero-btn-primary,
.hero-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.9rem 1.35rem;
  border-radius: 0.9rem;
  font-weight: 700;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background-color 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease;
  text-decoration: none;
}

.hero-btn-primary {
  background: var(--color-primary);
  color: white;
  box-shadow: 0 10px 22px rgba(140, 0, 43, 0.30);
  position: relative;
  overflow: hidden;
}

.hero-btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255,255,255,0.25), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hero-btn-primary:hover::after {
  opacity: 1;
}

.hero-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(140, 0, 43, 0.38);
}

.hero-btn-secondary {
  color: white;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(10px);
}

.hero-btn-secondary:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: white;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
}

.hero-floating-card {
  width: 340px;
  max-width: 100%;
  padding: 1.2rem 1.25rem;
  border-radius: 1.25rem;
  background: rgba(17, 24, 39, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(14px);
  box-sizing: border-box;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.hero-floating-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 60px rgba(0,0,0,0.25);
}

.hero-mini-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 0.75rem 0.5rem;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.10);
  text-align: center;
  box-sizing: border-box;
}

.hero-mini-label,
.hero-mini-value {
  display: block;
  width: 100%;
  text-align: center;
  overflow-wrap: break-word;
  word-break: normal;
}

.hero-mini-label {
  display: block;
  width: 100%;
  font-size: 0.68rem;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.62);
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

.hero-mini-value {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  font-size: 0.82rem;
  line-height: 1.15;
  font-weight: 700;
  color: white;
  text-align: center;
  white-space: nowrap;
}

.hero-nav-btn {
  position: absolute;
  top: 50%;
  z-index: 20;
  transform: translateY(-50%);
  width: 3.35rem;
  height: 3.35rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: rgba(17, 24, 39, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  transition:
    transform 0.25s ease,
    background-color 0.25s ease,
    box-shadow 0.25s ease;
}

.hero-nav-btn:hover {
  background: rgba(17, 24, 39, 0.5);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.20);
}

.hero-nav-btn-left {
  left: 1rem;
}

.hero-nav-btn-right {
  right: 1rem;
}

.hero-progress-bar {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--color-accent) 0%, white 100%);
  box-shadow: 0 0 18px rgba(255, 209, 0, 0.38);
  border-radius: 999px;
  transform: scaleX(0);
  transform-origin: left center;
}

#carousel-indicators button {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.28);
  transition:
    transform 0.25s ease,
    background-color 0.25s ease,
    width 0.25s ease;
}

#carousel-indicators button.active {
  width: 2rem;
  background: white;
  border-color: white;
}

.hero-content-shell {
  display: inline-block;
  max-width: 52rem;
  padding: 1.5rem 1.5rem 1.25rem;
  border-radius: 1.5rem;
  background: linear-gradient(
    135deg,
    rgba(17, 24, 39, 0.28) 0%,
    rgba(17, 24, 39, 0.18) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.16);
}

.hero-title-balance {
  text-wrap: balance;
}

.hero-subtext {
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.22);
}

.hero-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: white;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
}

.carousel-item.active .hero-content-block {
  animation: heroFadeUp 0.9s ease both;
}

@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 767px) {
  .hero-content-shell {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
  }
}



/* Ajustes responsivos */
@media (max-width: 1023px) {
  .hero-nav-btn {
    width: 2.85rem;
    height: 2.85rem;
  }

  .hero-nav-btn-left {
    left: 0.75rem;
  }

  .hero-nav-btn-right {
    right: 0.75rem;
  }
}

@media (max-width: 767px) {
  .hero-kicker {
    font-size: 0.68rem;
    letter-spacing: 0.16em;
  }

  .hero-btn-primary,
  .hero-btn-secondary {
    width: 100%;
  }

  .hero-chip {
    font-size: 0.75rem;
  }
}

@media (max-width: 767px) {
  .hero-floating-card {
    width: 100%;
    padding: 1rem;
  }

  .hero-mini-stat {
    padding: 0.7rem 0.5rem;
  }

  .hero-mini-value {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .hero-floating-card {
    width: 100%;
    padding: 1rem;
  }

  .hero-mini-label {
    font-size: 0.62rem;
    letter-spacing: 0.05em;
  }

  .hero-mini-value {
    font-size: 0.78rem;
  }
}


/* =====================================================
   CARRUSEL INSTITUCIONAL
   DISTRIBUCIÓN ADAPTATIVA DEL CONTENIDO
===================================================== */

/* Contenedor principal */

.hero-carousel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: clamp(580px, 75vh, 820px);
  isolation: isolate;
  background-color: #17251e;
}

/* Distribución de las diapositivas */

.hero-carousel .hero-slide {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Contenedor general del contenido */

.hero-content-container {
  display: flex;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;

  padding:
    clamp(2.5rem, 5vw, 4.5rem)
    clamp(4.5rem, 7vw, 6rem)
    5rem;
}

/* Centrado vertical sin recortes */

.hero-content-layout {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
}

/* Panel principal de contenido */

.hero-carousel .hero-content-shell {
  width: 100%;
  max-width: 52rem;
  min-width: 0;
  box-sizing: border-box;
  padding: clamp(1.5rem, 2.5vw, 2rem);
}

/* Etiqueta superior */

.hero-carousel .hero-kicker {
  max-width: 100%;
  line-height: 1.5;
  white-space: normal;
}

/* Títulos de las tres diapositivas */

.hero-carousel .hero-content-block h1,
.hero-carousel .hero-content-block h2 {
  margin-top: 1.15rem;
  font-size: clamp(2.5rem, 4.2vw, 3.75rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  text-wrap: balance;
  overflow-wrap: break-word;
}

/* Descripción */

.hero-carousel .hero-subtext {
  margin-top: 1.25rem;
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  line-height: 1.65;
}

/* Botones de acción */

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  margin-top: 1.75rem;
}

.hero-actions a {
  max-width: 100%;
  min-height: 46px;
  box-sizing: border-box;
  text-align: center;
}

/* Etiquetas inferiores */

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.5rem;
}

.hero-carousel .hero-chip {
  max-width: 100%;
  line-height: 1.4;
  white-space: normal;
}

/* Panel flotante de información */

.hero-floating-panel {
  display: none;
  right: 2rem;
  bottom: 5rem;
}

/* =====================================================
   ESCRITORIOS AMPLIOS
===================================================== */

@media (min-width: 1440px) {

  .hero-floating-panel {
    display: block;
  }

  /* Reservar espacio para el panel informativo */

  .hero-carousel .hero-content-shell {
    max-width: min(52rem, calc(100vw - 560px));
  }
}

/* =====================================================
   TABLETAS Y ESCRITORIOS PEQUEÑOS
===================================================== */

@media (min-width: 768px) and (max-width: 1023px) {

  .hero-carousel {
    min-height: 560px;
  }

  .hero-content-container {
    padding: 2.5rem 4rem 5rem;
  }

  .hero-carousel .hero-content-shell {
    padding: 1.5rem;
  }

  .hero-carousel .hero-content-block h1,
  .hero-carousel .hero-content-block h2 {
    font-size: clamp(2.25rem, 4.5vw, 3rem);
  }
}

/* =====================================================
   DISPOSITIVOS MÓVILES
===================================================== */

@media (max-width: 767px) {

  .hero-carousel {
    min-height: 0;
  }

  .hero-content-container {
    padding: 2rem 1.25rem 5.5rem;
  }

  .hero-content-layout {
    align-items: center;
  }

  /* Eliminar el panel de cristal en móvil */

  .hero-carousel .hero-content-shell {
    max-width: 100%;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
  }

  /* Mejorar contraste sobre las fotografías */

  .hero-carousel .hero-overlay {
    background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.65) 0%,
      rgba(0, 0, 0, 0.55) 45%,
      rgba(0, 0, 0, 0.75) 100%
    );
  }

  /* Insignias institucionales */

  .hero-carousel .hero-badge-row {
    gap: 0.4rem;
    margin-bottom: 0.85rem;
  }

  .hero-carousel .hero-badge {
    padding: 0.35rem 0.65rem;
    font-size: 0.65rem;
    letter-spacing: 0.04em;
  }

  /* Texto superior */

  .hero-carousel .hero-kicker {
    padding: 0.45rem 0.75rem;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
  }

  /* Títulos */

  .hero-carousel .hero-content-block h1,
  .hero-carousel .hero-content-block h2 {
    margin-top: 0.9rem;
    font-size: clamp(1.85rem, 6.5vw, 2.6rem);
    line-height: 1.15;
  }

  /* Descripciones */

  .hero-carousel .hero-subtext {
    margin-top: 1rem;
    font-size: 1rem;
    line-height: 1.6;
  }

  /* Botones */

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    margin-top: 1.35rem;
  }

  .hero-carousel .hero-btn-primary,
  .hero-carousel .hero-btn-secondary {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  /* Etiquetas inferiores */

  .hero-chips {
    gap: 0.45rem;
    margin-top: 1.15rem;
  }

  .hero-carousel .hero-chip {
    padding: 0.4rem 0.65rem;
    font-size: 0.72rem;
  }

  /* Flechas junto a los indicadores */

  .hero-carousel .hero-nav-btn {
    top: auto;
    bottom: 1.1rem;
    transform: none;
    width: 2.5rem;
    height: 2.5rem;
  }

  .hero-carousel .hero-nav-btn-left {
    left: 1.25rem;
  }

  .hero-carousel .hero-nav-btn-right {
    right: 1.25rem;
  }

  .hero-carousel .hero-nav-btn svg {
    width: 1.25rem;
    height: 1.25rem;
  }

  /* Indicadores centrados entre las flechas */

  .hero-carousel #carousel-indicators {
    bottom: 1.1rem;
    height: 2.5rem;
    align-items: center;
    gap: 0.6rem;
  }
}

/* =====================================================
   CELULARES DE PANTALLA PEQUEÑA
===================================================== */

@media (max-width: 374px) {

  .hero-content-container {
    padding: 1.5rem 1rem 5rem;
  }

  .hero-carousel .hero-content-block h1,
  .hero-carousel .hero-content-block h2 {
    font-size: 1.75rem;
  }

  .hero-carousel .hero-subtext {
    font-size: 0.95rem;
    line-height: 1.55;
  }

  .hero-carousel .hero-kicker {
    font-size: 0.6rem;
    letter-spacing: 0.07em;
  }

  .hero-carousel .hero-chip {
    font-size: 0.68rem;
  }
}

/* =====================================================
   ACCESIBILIDAD: MOVIMIENTO REDUCIDO
===================================================== */

@media (prefers-reduced-motion: reduce) {

  .hero-carousel .carousel-item {
    transition: none;
  }

  .hero-carousel .carousel-item.active .hero-content-block {
    animation: none;
  }
}
