/* =====================================================================
   Portada: «Por qué Promad» (3 tarjetas) y «Síguenos en Instagram».
   11/11/2026. Solo CSS (transform y opacity: nada que recalcule la página
   al hacer scroll); en el móvil, carruseles con scroll-snap nativo.
   Clases propias (hs-*) para no heredar las reglas viejas de .bento-* / .insta-*.
   ===================================================================== */

.hs-section { position: relative; padding: 64px 0; background: transparent; overflow: hidden; } /* 11/11: transparente para que se vea la rejilla y la luz del fondo, como en el curso de DJ */
.hs-section + .hs-section { padding-top: 16px; }
.hs-wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* Cabecera de sección */
.hs-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.hs-eyebrow { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: #d1b6f2; margin-bottom: 8px; }
.hs-title { margin: 0; text-align: left; font-size: clamp(1.6rem, 3.2vw, 2.4rem); line-height: 1.15; font-weight: 900; color: #fff; }
.hs-title em { font-style: normal; background: linear-gradient(90deg, #d1b6f2, #ac8eeb); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Por qué Promad ---------- */
.hs-grid { display: grid; grid-template-columns: 1.25fr 1fr; grid-template-rows: 1fr 1fr; gap: 18px; height: 640px; }
.hs-card { position: relative; border-radius: 24px; overflow: hidden; background: #111; border: 1px solid rgba(255,255,255,.08); isolation: isolate; }
.hs-card--grande { grid-row: 1 / 3; }
.hs-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transform: scale(1.01); transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.hs-card::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(5,5,5,.15) 0%, rgba(5,5,5,.35) 40%, rgba(5,5,5,.92) 100%); }
.hs-card__body { position: absolute; inset: auto 0 0 0; padding: 26px 26px 24px; }
.hs-num { position: absolute; top: 18px; right: 22px; font-size: 3.4rem; line-height: 1; font-weight: 900; color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.35); letter-spacing: -.02em; }
.hs-icon { position: absolute; top: 20px; left: 22px; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); color: #fff; font-size: 1.15rem; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.hs-card h3 { margin: 0 0 8px; text-align: left; font-size: 1.55rem; line-height: 1.15; font-weight: 900; color: #fff; }
.hs-card--grande h3 { font-size: 2rem; }
.hs-card p { margin: 0; font-size: .9rem; line-height: 1.55; color: rgba(255,255,255,.78); max-width: 46ch; }
.hs-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; }
.hs-tags li { font-size: .72rem; font-weight: 700; letter-spacing: .04em; padding: 5px 10px; border-radius: 999px; color: #e9ddff; background: rgba(153,94,206,.22); border: 1px solid rgba(209,182,242,.35); }
.hs-card::before { content: ''; position: absolute; left: 26px; right: 26px; bottom: 0; height: 2px; z-index: 1; background: linear-gradient(90deg, #995ece, #7326d8); transform: scaleX(0); transform-origin: left; transition: transform .6s cubic-bezier(.2,.7,.2,1); }

@media (hover: hover) and (pointer: fine) {
  .hs-card:hover img { transform: scale(1.06); }
  .hs-card:hover::before { transform: scaleX(1); }
  .hs-card:hover { border-color: rgba(209,182,242,.45); }
}

/* Puntos de posición (solo en el móvil) */
.hs-dots { display: none; justify-content: center; gap: 8px; margin-top: 16px; }
.hs-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: rgba(255,255,255,.25); cursor: pointer; transition: width .3s, background .3s; }
.hs-dots button[aria-current='true'] { width: 24px; background: #d1b6f2; }

/* ---------- Instagram ---------- */
.hs-follow { display: inline-flex; align-items: center; gap: 10px; flex: none; padding: 11px 20px; border-radius: 999px; font-weight: 700; font-size: .9rem; color: #fff; text-decoration: none; background: linear-gradient(135deg, #f58529, #dd2a7b 45%, #8851b1 80%); box-shadow: 0 8px 24px rgba(221,42,123,.25); transition: transform .3s; }
.hs-follow:hover { transform: translateY(-2px); }
.hs-reels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: start; }
.hs-reel { position: relative; display: block; border-radius: 22px; padding: 1.5px; text-decoration: none; background: linear-gradient(160deg, rgba(245,133,41,.7), rgba(221,42,123,.6) 45%, rgba(136,81,177,.7)); transition: transform .4s cubic-bezier(.2,.7,.2,1); }
.hs-reel__in { position: relative; border-radius: 21px; overflow: hidden; aspect-ratio: 1 / 0.92; background: #111; isolation: isolate; }
.hs-reel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hs-reel__in::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,0) 26%, rgba(0,0,0,0) 55%, rgba(0,0,0,.85) 100%); }
.hs-reel__top { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700; color: #fff; }
.hs-reel__avatar { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; background: linear-gradient(135deg, #f58529, #dd2a7b 50%, #8851b1); }
.hs-reel__play { position: absolute; top: 50%; left: 50%; width: 62px; height: 62px; margin: -31px 0 0 -31px; display: grid; place-items: center; border-radius: 50%; color: #fff; font-size: 1.1rem; padding-left: 4px; box-sizing: border-box; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: transform .3s; }
.hs-reel__foot { position: absolute; left: 16px; right: 16px; bottom: 14px; }
.hs-reel__foot strong { display: block; font-size: 1.05rem; line-height: 1.25; color: #fff; }
.hs-reel__foot span { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.75); }

@media (hover: hover) and (pointer: fine) {
  .hs-reel:hover { transform: translateY(-6px); }
  .hs-reel:hover .hs-reel__play { transform: scale(1.1); }
}

/* ---------- Móvil: carruseles deslizables ---------- */
/* Revisión 13/11: carrusel hasta 900 px (antes 760): entre 761 y ~900 la rejilla de alto fijo
   montaba el texto sobre el icono y el número (iPad vertical). */
@media (max-width: 900px) {
  .hs-section { padding: 48px 0; }
  .hs-head { flex-direction: column; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
  .hs-wrap { padding: 0 16px; }
  .hs-grid, .hs-reels {
    display: flex; height: auto; gap: 14px; margin: 0 -16px; padding: 4px 16px 8px;
    overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 16px;
    -webkit-overflow-scrolling: touch; scrollbar-width: none; overscroll-behavior-x: contain;
  }
  .hs-grid::-webkit-scrollbar, .hs-reels::-webkit-scrollbar { display: none; }
  /* En el móvil, foto arriba y texto debajo (como un cartel): encima de la foto el texto la tapaba entera */
  .hs-card { flex: 0 0 84%; display: flex; flex-direction: column; scroll-snap-align: start; background: linear-gradient(180deg, #121022, #0c0b16); }
  .hs-card img { position: relative; inset: auto; flex: none; height: 200px; z-index: 0; transform: none; }
  .hs-card::after { inset: 0 0 auto 0; height: 200px; z-index: 0; background: linear-gradient(180deg, rgba(5,5,5,.1) 40%, rgba(12,11,22,.95) 100%); }
  .hs-icon, .hs-num { z-index: 1; }
  .hs-card__body { position: relative; inset: auto; padding: 6px 20px 20px; }
  .hs-card::before { display: none; }
  .hs-card h3, .hs-card--grande h3 { font-size: 1.4rem; }
  .hs-num { font-size: 2.8rem; }
  /* 12/11 (Jorge): en el móvil, una ficha de Instagram CENTRADA y las vecinas asomando a los
     dos lados; se desliza y siempre encaja en el centro (también la primera y la última). */
  .hs-reels { padding-left: 11vw; padding-right: 11vw; scroll-padding: 0; }
  .hs-reel { flex: 0 0 78vw; scroll-snap-align: center; }
  .hs-dots { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
  .hs-card img, .hs-card::before, .hs-reel, .hs-reel__play, .hs-dots button { transition: none; }
}

/* ---------- Tarjetas de los cursos (arriba de la portada): cristal como el menú ----------
   El fondo de detrás es una imagen quieta (sin vídeo ni animación): el desenfoque se calcula
   una vez, no a cada fotograma. Solo en modo oscuro; en el móvil, desenfoque más ligero. */
body:not(.light-mode) .hero .curso-card {
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.02)), rgba(20,18,44,.48);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 18px 40px rgba(0,0,0,.35);
}
@media (max-width: 768px) {
  body:not(.light-mode) .hero .curso-card { -webkit-backdrop-filter: saturate(150%) blur(8px); backdrop-filter: saturate(150%) blur(8px); background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02)), rgba(20,18,44,.6); }
}
/* Sin soporte de desenfoque, o si el sistema pide menos transparencia: como antes, casi opaca */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  body:not(.light-mode) .hero .curso-card { background: rgba(26,25,50,.9); }
}
@media (prefers-reduced-transparency: reduce) {
  body:not(.light-mode) .hero .curso-card { background: rgba(26,25,50,.95); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* Tras Instagram, el formulario de contacto pegado con el mismo hueco que entre las secciones
   de arriba (64 + 16 = 80px); general.css le da 80–100px arriba con !important en el móvil. */
section.hs-section + section.contact-section { padding-top: 16px !important; }

/* Botón de reproducir en la esquina (11/11): en el centro tapaba la cara de quien sale en el reel */
.hs-reel__play { top: 12px; right: 12px; left: auto; width: 34px; height: 34px; margin: 0; font-size: .72rem; padding-left: 2px; }

/* ---------- Botones «Más información» de las fichas de cursos (12/11/2026, Jorge) ----------
   Mismo gesto al pasar el ratón (sube 5 px con sombra, de general.css), estilo más fino: cristal
   oscuro con borde en degradado de la marca, flecha que avanza y los tres alineados abajo. */
.hero .curso-card-content { flex: 1; display: flex; flex-direction: column; }
.hero .curso-card-content .btn {
  margin-top: auto;                      /* los tres a la misma altura, midan lo que midan los textos */
  align-self: center;
  display: inline-flex; align-items: center; gap: 12px;
  padding: 13px 18px 13px 26px;
  font-size: .95rem; font-weight: 700; letter-spacing: .02em;
  color: #fff;
  border: 1.5px solid transparent;
  background:
    linear-gradient(rgba(16, 14, 36, .72), rgba(16, 14, 36, .72)) padding-box,
    linear-gradient(135deg, var(--color-primary-start), var(--color-primary-end)) border-box;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  transition: transform .3s, box-shadow .3s, background .35s;
}
.hero .curso-card-content .btn::after {
  content: ''; flex: none; width: 30px; height: 30px; border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / 15px no-repeat,
    linear-gradient(135deg, var(--color-primary-start), var(--color-primary-end));
  transition: transform .3s cubic-bezier(.22,1,.36,1);
}
.hero .curso-card-content .btn:hover {
  background:
    linear-gradient(135deg, var(--color-primary-start), var(--color-primary-end)) padding-box,
    linear-gradient(135deg, var(--color-primary-start), var(--color-primary-end)) border-box;
  box-shadow: 0 10px 20px rgba(115,38,216, .4);
}
.hero .curso-card-content .btn:hover::after { transform: translateX(4px); background-color: transparent;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / 15px no-repeat, rgba(255,255,255,.18); }
.hero .curso-card-content .btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
@media (max-width: 768px) {
  .hero .curso-card-content .btn { padding: 12px 16px 12px 22px; font-size: .92rem; }
}
.hero .curso-card-content p { margin-bottom: 22px; }   /* aire entre el texto y el botón (Producción tiene el texto más largo) */

/* Foto de fondo del hero de la portada (12/11/2026): el hero de la portada es más alto que el de
   los cursos (lleva las fichas dentro) y la foto, estirada a todo ese alto, salía muy ampliada.
   Ahora cubre la primera pantalla y un poco más, con el mismo encuadre que en DJ, y se funde con el
   fondo oscuro por abajo, donde están las fichas. */
.hero .video-background.fondo-portada {
  height: calc(100vh + 30vh) !important; height: calc(100svh + 30svh) !important;
  max-height: 100% !important;
  object-position: center 40% !important;
  -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 62%, transparent 100%);
}

/* Fichas de cursos de la portada (12/11/2026, Jorge: «se mueven demasiado, ponlas a la mitad»):
   la ficha sube 5 px en vez de 10, la foto se amplía un 2,5 % en vez de un 5 % y el botón sube
   2,5 px en vez de 5. Mismas animaciones, a la mitad. */
@media (hover: hover) and (min-width: 769px) {
  .hero .curso-card:hover { transform: translateY(-5px); box-shadow: 0 12px 28px rgba(0,0,0,.38); }
}
.hero .curso-card:hover .curso-card-image img { transform: scale(1.025); }
.hero .curso-card-content .btn:hover { transform: translateY(-2.5px); box-shadow: 0 6px 14px rgba(115,38,216, .35); }

/* Rejilla del fondo más arriba en la portada (12/11/2026, Jorge: «desde la imagen del hero hasta que
   empieza la cuadrícula se queda un espacio oscuro»). La rejilla con su columna de luz vivía solo en
   .sections-wrapper, que empieza DEBAJO de las fichas; entre la foto (que se funde) y la rejilla
   quedaba negro. Ahora hero-scroll.js la estira hacia arriba hasta 40 px por encima de las fichas (no
   entra en el hero) y pasa por detrás de ellas (que tienen z-index 3). Para que se vea encima del fondo del hero:
   el hero deja de ser una capa propia (z-index auto) y el envoltorio deja de recortar en vertical. */
.hero:has(.fondo-portada) { z-index: auto; }
/* ...y al dejar de ser capa propia hay que recolocar sus dos velos: la capa oscura sobre la foto
   (::after, que tenía z-index -1 DENTRO del hero) pasa a 0 para seguir encima de la foto, y la
   rejilla sube a 1 para quedar por encima del degradado inferior del hero (::before) sin tapar
   las fichas (3) ni el título (5). */
.hero:has(.fondo-portada)::after { z-index: 0; }
.hero:has(.fondo-portada) ~ .sections-wrapper > .online-musical-pattern { z-index: 1; }
.sections-wrapper { overflow: visible !important; overflow-x: clip !important; }
.hero:has(.fondo-portada) ~ .sections-wrapper::before { display: none; }

/* ---------- Portada online (13/11/2026): cuatro tarjetas en «Por qué» y colores en azul ----------
   La grande a la izquierda, dos a la derecha y la cuarta a lo ancho debajo. En el móvil, el mismo
   carrusel que la presencial (las reglas de arriba ya lo hacen). */
.hs-grid--4 { grid-template-rows: 1fr 1fr .78fr; height: 1020px; }
.hs-grid--4 .hs-card--ancha { grid-column: 1 / 3; }
/* La ancha lleva una captura del aula (mucho detalle): velo de izquierda a derecha para que el texto se lea */
.hs-grid--4 .hs-card--ancha::after { background: linear-gradient(90deg, rgba(5,5,5,.94) 0%, rgba(5,5,5,.82) 42%, rgba(5,5,5,.3) 100%); }
.hs-grid--4 .hs-card--ancha .hs-card__body { max-width: 60%; }
@media (max-width: 900px) {
  .hs-grid--4 { height: auto; }
  .hs-grid--4 .hs-card--ancha::after { background: linear-gradient(180deg, rgba(5,5,5,.1) 40%, rgba(12,11,22,.95) 100%); }
  .hs-grid--4 .hs-card--ancha .hs-card__body { max-width: none; }
}
body.version-online .hs-eyebrow { color: #97c9e7; }
body.version-online .hs-title em { background: linear-gradient(90deg, #97c9e7, #5495d8); -webkit-background-clip: text; background-clip: text; }
body.version-online .hs-tags li { color: #dff3ff; background: rgba(76,162,214,.2); border-color: rgba(151,201,231,.35); }
body.version-online .hs-card::before { background: linear-gradient(90deg, #4ca2d6, #2c77c3); }
body.version-online .hs-dots button[aria-current='true'] { background: #97c9e7; }
@media (hover: hover) and (pointer: fine) { body.version-online .hs-card:hover { border-color: rgba(151,201,231,.45); } }
body.version-online .hero .curso-card-content .btn:hover { box-shadow: 0 6px 14px rgba(44,119,195, .35); }

/* Revisión 13/11: los puntos son botones enfocables; el contenedor ya no lleva aria-hidden */
@media (min-width: 901px) { .hs-dots { display: none; } }

/* 13/11/2026 (Jorge): sin la línea de color que aparecía abajo al pasar el ratón por las tarjetas
   de «Por qué Promad» (no aportaba nada). En las dos portadas. */
.hs-card::before { display: none; }

/* ---------- Novedades (17/11/2026): fecha, categoría y enlace en las tarjetas ---------- */
.hs-meta { display: flex; align-items: center; gap: 10px; margin: 0 0 10px !important; font-size: .72rem !important; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.7) !important; }
.hs-meta span { padding: 4px 10px; border-radius: 999px; color: #fff; background: linear-gradient(135deg, #995ece, #7326d8); letter-spacing: .1em; }
.hs-novedades .hs-card h3 { font-size: 1.25rem; }
.hs-novedades .hs-card--grande h3 { font-size: 1.75rem; }
.hs-leer { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; font-size: .85rem; font-weight: 700; color: #d1b6f2; text-decoration: none; }
.hs-leer i { font-size: .75rem; transition: transform .3s; }
.hs-leer:hover { color: #fff; }
.hs-leer:hover i { transform: translateX(4px); }
@media (max-width: 900px) {
  .hs-novedades .hs-card h3, .hs-novedades .hs-card--grande h3 { font-size: 1.2rem; }
}
.hs-card h3 .nw { white-space: nowrap; }
