/* ============================================================
   CLASE-DETALLE.CSS
   Estilos específicos para la página individual de una clase.
   Requiere GLOBAL.CSS antes de este archivo.
   ============================================================ */


/* ============================================================
   HERO
   ============================================================ */

.clase-hero {
  position: relative;
  display: flex;
  align-items: flex-end;

  min-height: 560px;
  height: 90vh;

  overflow: hidden;

  background: var(--dark);
  isolation: isolate;
}


/* ===== Fondo (con soporte para carrusel) ===== */

.clase-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;

  width: 100%;
  height: 100%;
  overflow: hidden;
}

.clase-hero-bg img {
  width: 100%;
  height: 100%;
  display: block;

  object-fit: cover;
  object-position: center;
}


/* ===== Carrusel del hero ===== */

#claseCarousel {
  width: 100%;
  height: 100%;
}

#claseCarousel .carousel-inner {
  width: 100%;
  height: 100%;
}

#claseCarousel .carousel-item {
  height: 100%;
  position: relative;
}

#claseCarousel .carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Caption del carrusel */

#claseCarousel .carousel-caption {
  z-index: 5;

  left: 8%;
  right: auto;
  bottom: 12%;

  width: auto;
  max-width: 450px;

  text-align: left;

  background: rgba(0, 0, 0, 0.45);

  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  border-radius: 14px;

  padding: 14px 20px;

  border: 1px solid rgba(255, 255, 255, 0.15);
}

#claseCarousel .carousel-caption h5 {
  margin: 0 0 4px;
  font-weight: 700;
  font-size: 1.1rem;
}

#claseCarousel .carousel-caption p {
  margin: 0;
  font-size: 0.9rem;
}

/* Indicadores */

#claseCarousel .carousel-indicators {
  z-index: 10;
  margin-bottom: 30px;
}

#claseCarousel .carousel-indicators button {
  width: 35px;
  height: 4px;

  border: 0;
  border-radius: 10px;

  margin: 0 4px;

  opacity: 0.6;
}

#claseCarousel .carousel-indicators button.active {
  opacity: 1;
}

/* Controles */

#claseCarousel .carousel-control-prev,
#claseCarousel .carousel-control-next {
  z-index: 10;

  width: 8%;

  opacity: 0.8;
}

#claseCarousel .carousel-control-prev:hover,
#claseCarousel .carousel-control-next:hover {
  opacity: 1;
}


/* ===== Overlay ===== */

.clase-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;

  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.72) 0%,
    rgba(0, 0, 0, 0.40) 45%,
    rgba(0, 0, 0, 0.15) 100%
  );

  pointer-events: none;
}


/* ===== Contenido ===== */

.clase-hero-content {
  position: relative;
  z-index: 20;

  width: 100%;
  max-width: 760px;

  padding: 0 8% 5rem;
}


/* ===== Link volver ===== */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  margin-bottom: 1.5rem;

  color: rgba(255, 255, 255, 0.6);

  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;

  text-decoration: none;

  transition:
    color 0.2s ease,
    transform 0.2s ease;
}

.back-link:hover {
  color: white;
  transform: translateX(-3px);
}


/* ===== Número ===== */

.clase-number-badge {
  display: inline-flex;
  align-items: center;

  margin-bottom: 1rem;
  padding: 6px 14px;

  border-radius: 100px;

  background: var(--green);
  color: white;

  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  line-height: 1;
  text-transform: uppercase;
}


/* ===== Título ===== */

.clase-hero-title {
  max-width: 900px;

  margin-bottom: 1.2rem;

  color: white;

  font-size: clamp(3.5rem, 8vw, 7rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.04em;

  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}


/* ===== Subtítulo ===== */

.clase-hero-subtitle {
  max-width: 520px;

  margin-bottom: 1.5rem;

  color: rgba(255, 255, 255, 0.72);

  font-size: 1.05rem;
  line-height: 1.65;

  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}


/* ============================================================
   TAGS
   ============================================================ */

.clase-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.clase-tag {
  display: inline-flex;
  align-items: center;

  padding: 5px 14px;

  border-radius: 100px;

  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}


/* ===== Variantes ===== */

.tag-danza {
  background: rgba(204, 102, 153, 0.25);
  border: 1px solid rgba(204, 102, 153, 0.4);
  color: #f0a0c8;
}

.tag-artes {
  background: rgba(215, 130, 44, 0.25);
  border: 1px solid rgba(215, 130, 44, 0.4);
  color: #f5b870;
}

.tag-musica {
  background: rgba(85, 176, 210, 0.25);
  border: 1px solid rgba(85, 176, 210, 0.4);
  color: #a0d8ef;
}


/* ============================================================
   SCROLL HINT
   ============================================================ */

.scroll-hint {
  position: absolute;
  right: 8%;
  bottom: 1.5rem;
  z-index: 2;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;

  color: rgba(255, 255, 255, 0.4);

  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;

  animation: scrollBob 2s ease-in-out infinite;
}

@keyframes scrollBob {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(6px);
  }
}


/* ============================================================
   SECCIONES BASE
   ============================================================ */

.clase-section-inner {
  width: min(1100px, 100%);
  margin: 0 auto;
}

.clase-section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  margin-bottom: 0.75rem;

  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.clase-section-label::before {
  content: '';

  width: 22px;
  height: 3px;

  flex-shrink: 0;

  border-radius: 2px;

  background: currentColor;
}

.clase-section-title {
  margin-bottom: 1.5rem;

  color: var(--dark);

  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.clase-section-title span {
  color: var(--green);
}


/* ============================================================
   ABOUT
   ============================================================ */

.clase-about {
  padding: 6rem 8%;
  background: var(--white);
}

.clase-about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));

  align-items: center;

  gap: clamp(2rem, 5vw, 4rem);
}

.clase-about-text p {
  max-width: 680px;

  margin-bottom: 1rem;

  color: #555;

  font-size: 1rem;
  line-height: 1.8;
}


/* ===== Stats ===== */

.clase-about-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 1rem;
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: 4px;

  padding: 1.25rem 1rem;

  background: var(--cream);
  border-left: 4px solid var(--green);
  border-radius: 16px;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-4px);

  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.stat-icon {
  margin-bottom: 4px;

  font-size: 1.6rem;
  line-height: 1;
}

.stat-card strong {
  color: var(--dark);

  font-size: 0.95rem;
  font-weight: 900;
}

.stat-card span {
  color: #888;

  font-size: 0.8rem;
  line-height: 1.4;
}


/* ============================================================
   VIDEO
   ============================================================ */

.clase-video {
  padding: 6rem 8%;
  background: var(--dark);
}

.clase-video .clase-section-label {
  color: var(--pink);
}

.clase-video .clase-section-title {
  color: white;
}

.video-wrapper {
  margin-top: 2.5rem;
}

.video-frame {
  position: relative;

  width: 100%;

  aspect-ratio: 16 / 9;

  overflow: hidden;

  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;

  background: #000;

  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.video-frame iframe {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  display: block;

  border: 0;
}


/* ============================================================
   OBJETIVOS
   ============================================================ */

.clase-objetivos {
  padding: 6rem 8%;
  background: var(--cream);
}

.clase-objetivos .clase-section-label {
  color: var(--purple);
}

.clase-objetivos .clase-section-title span {
  color: var(--purple);
}

.objetivos-grid {
  display: grid;

  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 1rem;

  margin-top: 2.5rem;
}

.objetivo-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;

  padding: 1.25rem 1.5rem;

  background: white;
  border-radius: 16px;

  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.objetivo-num {
  display: flex;
  align-items: center;
  justify-content: center;

  flex-shrink: 0;

  width: 34px;
  height: 34px;

  border-radius: 50%;

  background: var(--purple);
  color: white;

  font-size: 0.85rem;
  font-weight: 900;
}

.objetivo-item p {
  color: #444;

  font-size: 0.95rem;
  line-height: 1.6;
}


/* ============================================================
   FICHA TÉCNICA
   ============================================================ */

.clase-ficha {
  padding: 6rem 8%;
  background: white;
}

.clase-ficha .clase-section-label {
  color: var(--blue);
}

.clase-ficha .clase-section-title span {
  color: var(--blue);
}

.ficha-grid {
  display: grid;

  grid-template-columns: repeat(4, minmax(0, 1fr));

  gap: 1rem;

  margin-top: 2.5rem;
}

.ficha-item {
  display: flex;
  flex-direction: column;
  gap: 6px;

  padding: 1.5rem 1.25rem;

  background: var(--cream);

  border-top: 4px solid var(--blue);
  border-radius: 16px;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.ficha-item:hover {
  transform: translateY(-4px);

  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.ficha-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.ficha-label {
  color: #888;

  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ficha-value {
  color: var(--dark);

  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.3;
}


/* ============================================================
   MATERIAL
   ============================================================ */

.clase-material {
  padding: 6rem 8%;
  background: var(--cream);
}

.material-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;

  margin-top: 2.5rem;
}

.material-card {
  display: flex;
  align-items: center;
  gap: 1.2rem;

  padding: 1.2rem 1.5rem;

  background: white;

  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;

  color: var(--dark);
  text-decoration: none;

  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.material-card:hover {
  transform: translateX(6px);

  border-color: rgba(163, 192, 55, 0.25);

  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);

  color: var(--dark);
}


/* ===== Icono ===== */

.material-icon {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 48px;
  height: 48px;

  flex-shrink: 0;

  border-radius: 12px;

  font-size: 1.4rem;
}


/* ===== Información ===== */

.material-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;

  min-width: 0;
}

.material-info strong {
  overflow: hidden;

  color: var(--dark);

  font-size: 0.95rem;
  font-weight: 800;

  white-space: nowrap;
  text-overflow: ellipsis;
}

.material-info span {
  color: #999;

  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}


/* ===== Flecha ===== */

.material-arrow {
  flex-shrink: 0;

  color: #ccc;

  font-size: 1.2rem;
  font-weight: 900;

  transition:
    color 0.2s ease,
    transform 0.2s ease;
}

.material-card:hover .material-arrow {
  color: var(--orange);
  transform: translateY(3px);
}


/* ============================================================
   GALERÍA
   ============================================================ */

.clase-galeria {
  padding: 6rem 8%;
  background: white;
}

.galeria-grid {
  display: grid;

  grid-template-columns: repeat(3, minmax(0, 1fr));

  gap: 1rem;

  margin-top: 2.5rem;
}

.galeria-item {
  position: relative;

  aspect-ratio: 1;

  overflow: hidden;

  border-radius: 16px;

  cursor: pointer;

  background: var(--cream);
}

.galeria-item--tall {
  grid-row: span 2;
  aspect-ratio: auto;
}

.galeria-item--wide {
  grid-column: span 2;
  aspect-ratio: 2 / 1;
}

.galeria-item img {
  width: 100%;
  height: 100%;

  display: block;

  object-fit: cover;

  transition: transform 0.5s ease;
}

.galeria-item:hover img {
  transform: scale(1.08);
}


/* ===== Overlay ===== */

.galeria-overlay {
  position: absolute;
  inset: 0;

  display: flex;
  align-items: flex-end;

  padding: 1rem 1.2rem;

  background:
    linear-gradient(
      to top,
      rgba(13, 13, 26, 0.75) 0%,
      rgba(13, 13, 26, 0) 55%
    );

  opacity: 0;

  transition: opacity 0.3s ease;
}

.galeria-item:hover .galeria-overlay,
.galeria-item:focus-within .galeria-overlay {
  opacity: 1;
}

.galeria-overlay span {
  color: white;

  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}


/* ============================================================
   NAVEGACIÓN ENTRE CLASES
   ============================================================ */

.clase-nav-section {
  padding: 3rem 8%;

  background: var(--cream);

  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.clase-nav-links {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 1rem;

  flex-wrap: wrap;
}

.clase-nav-prev,
.clase-nav-next {
  display: flex;
  flex-direction: column;
  gap: 4px;

  min-width: 180px;

  padding: 1rem 1.5rem;

  background: white;

  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;

  text-decoration: none;

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.clase-nav-prev:hover,
.clase-nav-next:hover {
  transform: translateY(-2px);

  background: var(--dark);
  border-color: var(--dark);
}

.clase-nav-prev:hover .clase-nav-dir,
.clase-nav-prev:hover .clase-nav-name,
.clase-nav-next:hover .clase-nav-dir,
.clase-nav-next:hover .clase-nav-name {
  color: white;
}

.clase-nav-next {
  text-align: right;
}


/* ===== Dirección ===== */

.clase-nav-dir {
  color: #aaa;

  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;

  transition: color 0.2s ease;
}


/* ===== Nombre ===== */

.clase-nav-name {
  color: var(--dark);

  font-size: 0.9rem;
  font-weight: 700;

  transition: color 0.2s ease;
}


/* ===== Ver todas ===== */

.clase-nav-all {
  padding: 10px 24px;

  border: 2px solid var(--green);
  border-radius: 100px;

  color: var(--green);

  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;

  text-decoration: none;

  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.clase-nav-all:hover {
  transform: translateY(-2px);

  background: var(--green);
  color: white;
}


/* ============================================================
   FOCUS / ACCESIBILIDAD
   ============================================================ */

.back-link:focus-visible,
.material-card:focus-visible,
.galeria-item:focus-visible,
.clase-nav-prev:focus-visible,
.clase-nav-next:focus-visible,
.clase-nav-all:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 4px;
}


/* ============================================================
   TABLET
   ============================================================ */

@media (max-width: 900px) {

  /* ===== Hero ===== */

  .clase-hero {
    height: auto;
    min-height: 620px;
  }

  .clase-hero-content {
    padding: 0 6% 4rem;
  }

  .scroll-hint {
    right: 6%;
  }


  /* ===== Secciones ===== */

  .clase-about,
  .clase-objetivos,
  .clase-ficha,
  .clase-video,
  .clase-material,
  .clase-galeria,
  .clase-nav-section {
    padding-right: 6%;
    padding-left: 6%;
  }


  /* ===== About ===== */

  .clase-about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }


  /* ===== Objetivos / Ficha ===== */

  .objetivos-grid,
  .ficha-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }


  /* ===== Gallery ===== */

  .galeria-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .galeria-item--wide {
    grid-column: span 2;
  }

  .galeria-item--tall {
    grid-row: span 1;
    aspect-ratio: 1;
  }


  /* ===== Navigation ===== */

  .clase-nav-links {
    flex-direction: column;
    align-items: stretch;
  }

  .clase-nav-prev,
  .clase-nav-next {
    width: 100%;
  }

  .clase-nav-next {
    text-align: left;
  }

  .clase-nav-all {
    width: 100%;
  }


  /* ===== Carrusel ===== */

  #claseCarousel .carousel-caption {
    left: 5%;
    right: 5%;
    bottom: 15%;

    max-width: none;

    padding: 10px 14px;
  }

  #claseCarousel .carousel-caption h5 {
    font-size: 0.95rem;
  }

  #claseCarousel .carousel-caption p {
    font-size: 0.8rem;
  }

  #claseCarousel .carousel-control-prev,
  #claseCarousel .carousel-control-next {
    width: 12%;
  }
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 600px) {

  /* ===== Hero ===== */

  .clase-hero {
    min-height: 580px;
  }

  .clase-hero-content {
    padding-bottom: 3.5rem;
  }

  .clase-hero-title {
    font-size: clamp(2.8rem, 14vw, 4rem);
  }

  .clase-hero-subtitle {
    font-size: 0.95rem;
  }


  /* ===== Scroll ===== */

  .scroll-hint {
    display: none;
  }


  /* ===== Stats ===== */

  .clase-about-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }


  /* ===== Objetivos / Ficha ===== */

  .objetivos-grid,
  .ficha-grid {
    grid-template-columns: 1fr;
  }


  /* ===== Video ===== */

  .video-frame {
    border-radius: 14px;
  }


  /* ===== Material ===== */

  .material-card {
    padding: 1rem;
  }

  .material-icon {
    width: 42px;
    height: 42px;

    border-radius: 10px;

    font-size: 1.2rem;
  }

  .material-info strong {
    font-size: 0.85rem;
  }

  .material-info span {
    font-size: 0.68rem;
  }


  /* ===== Gallery ===== */

  .galeria-grid {
    grid-template-columns: 1fr;
  }

  .galeria-item,
  .galeria-item--wide,
  .galeria-item--tall {
    grid-column: span 1;
    grid-row: auto;

    aspect-ratio: 1;
  }

  .galeria-overlay {
    opacity: 1;
  }


  /* ===== Navigation ===== */

  .clase-nav-prev,
  .clase-nav-next {
    padding: 1rem 1.2rem;
  }
}


/* ============================================================
   REDUCIR MOVIMIENTO
   ============================================================ */

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

  .scroll-hint {
    animation: none;
  }

  .back-link,
  .stat-card,
  .material-card,
  .material-arrow,
  .galeria-item img,
  .galeria-overlay,
  .clase-nav-prev,
  .clase-nav-next,
  .clase-nav-all {
    transition: none;
  }

  .back-link:hover,
  .stat-card:hover,
  .material-card:hover,
  .clase-nav-prev:hover,
  .clase-nav-next:hover,
  .clase-nav-all:hover {
    transform: none;
  }

  .galeria-item:hover img {
    transform: none;
  }
}