/* Powest Academy Home — mobile first, tema claro con la marca Powest (Manual de marca 2026).
   Las fuentes vienen de fonts.css (dependencia 'pah-fuentes'). */

:root {
	/* Marca */
	--pah-negro: #1d1d1b;
	--pah-rojo: #e11f1d;
	--pah-rojo-oscuro: #c01a18; /* rojo para texto pequeño: contraste AA sobre blanco */
	--pah-rojo-claro: #ff4a3d;
	--pah-gris: #5a5a5a;
	--pah-blanco: #f9f9fa;
	/* Funciones */
	--pah-bg: var(--pah-blanco);
	--pah-surface: #ffffff;
	--pah-surface-2: #f0f0ee;
	--pah-border: #e3e3df;
	--pah-text: var(--pah-negro);
	--pah-muted: var(--pah-gris);
	--pah-ok: #1e7d45;
	--pah-warn: #f5b83d;
	--pah-warn-text: #8a5a00;
	--pah-shadow: 0 1px 2px rgba(29, 29, 27, .06), 0 8px 24px -12px rgba(29, 29, 27, .18);
	--pah-shadow-hover: 0 2px 4px rgba(29, 29, 27, .06), 0 20px 40px -18px rgba(29, 29, 27, .3);
	/* Escala */
	--pah-r-sm: 8px;
	--pah-r: 16px;
	--pah-r-lg: 24px;
	--pah-wrap: 1240px;
	--pah-gutter: clamp(16px, 4vw, 32px);
	--pah-section: clamp(40px, 2rem + 3vw, 80px);
	--pah-font: "Barlow", Helvetica, Arial, sans-serif;
	--pah-ease: cubic-bezier(.2, .7, .2, 1);
	--pah-tabbar: 64px;
}

body.pah-body { background: var(--pah-bg); margin: 0; }

.pah, .pah *, .pah *::before, .pah *::after { box-sizing: border-box; }
.pah {
	font-family: var(--pah-font);
	font-size: 1rem;
	line-height: 1.6;
	color: var(--pah-text);
	background: var(--pah-bg);
	-webkit-font-smoothing: antialiased;
	padding-bottom: calc(var(--pah-tabbar) + env(safe-area-inset-bottom));
	overflow-x: clip;
}
/* Reinicio con :where() (especificidad 0,1,0): neutraliza a Eduma sin pisar las clases de cada componente. */
.pah :where(h1, h2, h3, p, ul, ol) { margin: 0; padding: 0; }
.pah :where(h1, h2, h3) { font-family: var(--pah-font); color: var(--pah-text); text-transform: none; letter-spacing: -.01em; }
.pah :where(ul, ol) { list-style: none; }
.pah :where(a) { color: inherit; text-decoration: none; }
.pah :where(img) { max-width: 100%; display: block; height: auto; }
.pah :where(button) { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-transform: none; letter-spacing: normal; }
.pah :focus-visible { outline: 3px solid var(--pah-rojo); outline-offset: 3px; border-radius: 6px; }
.pah-i { width: 1.25em; height: 1.25em; flex: none; }

/* Botón de WhatsApp (Click to Chat): por encima de la barra inferior en móvil */
@media (max-width: 1023px) {
	body.pah-body #ht-ctc-chat { bottom: calc(var(--pah-tabbar) + 16px + env(safe-area-inset-bottom)) !important; }
}

/* Sección insertada en páginas de Eduma (categorías de curso, Videos): sin fondo ni hueco de barra inferior */
.pah.pah--embed { background: transparent; padding-bottom: 0; line-height: 1.6; }
.pah--embed .pah-section { padding-block: clamp(32px, 1.5rem + 2vw, 56px); }
/* Mismo ancho de contenido que el contenedor de Eduma (1140 px) para que quede alineado con el listado */
.pah--embed .pah-wrap { max-width: calc(1140px + 2 * var(--pah-gutter)); }

.pah-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pah-skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--pah-rojo); color: #fff; padding: 10px 16px; border-radius: var(--pah-r-sm); }
.pah-skip:focus { top: 12px; }
.pah-only-desktop { display: none !important; }

.pah-wrap { width: 100%; max-width: var(--pah-wrap); margin-inline: auto; padding-inline: var(--pah-gutter); }
.pah-wrap--narrow { max-width: 820px; }

/* Tipografía */
.pah-eyebrow { font-size: .8125rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--pah-rojo-oscuro); margin-bottom: 10px; }
.pah-h1 { font-size: clamp(2.1rem, 1.3rem + 3.6vw, 4rem); font-weight: 800; line-height: 1.05; letter-spacing: -.025em; }
.pah-h2 { font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.5rem); font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.pah-lead { font-size: clamp(1.05rem, 1rem + .3vw, 1.25rem); color: var(--pah-muted); max-width: 56ch; margin-top: 18px; }
.pah-accent { color: var(--pah-rojo); }
.pah-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--pah-text); }
.pah-link:hover { color: var(--pah-rojo-oscuro); }

/* Botones */
.pah-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 48px; padding: 0 22px; border-radius: 999px;
	background: var(--pah-rojo); color: #fff !important; font-weight: 700; font-size: 1rem; line-height: 1;
	transition: transform .2s var(--pah-ease), background .2s, box-shadow .2s;
	box-shadow: 0 8px 20px -10px rgba(225, 31, 29, .7);
	white-space: nowrap;
}
.pah-btn:hover { background: var(--pah-rojo-oscuro); transform: translateY(-1px); }
.pah-btn:active { transform: translateY(1px) scale(.98); }
.pah-btn--sm { min-height: 40px; padding: 0 16px; font-size: .9375rem; }
.pah-btn--lg { min-height: 56px; padding: 0 28px; font-size: 1.0625rem; }
.pah-btn--ghost { background: transparent; color: var(--pah-text) !important; box-shadow: inset 0 0 0 2px var(--pah-border); }
.pah-btn--ghost:hover { background: var(--pah-surface-2); }
.pah-btn--light { background: #fff; color: var(--pah-negro) !important; box-shadow: none; }
.pah-btn--light:hover { background: var(--pah-blanco); }
.pah .pah-iconbtn { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 999px; color: var(--pah-text); background: transparent !important; box-shadow: none; transition: background .2s; }
.pah .pah-iconbtn:hover { background: var(--pah-surface-2) !important; }

/* Cabecera */
.pah-header { position: sticky; top: 0; z-index: 50; background: rgba(249, 249, 250, .85); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid transparent; transition: border-color .3s, background .3s, box-shadow .3s; }
@media (min-width: 783px) { body.admin-bar .pah-header { top: 32px; } }
.pah-header.is-scrolled { border-color: var(--pah-border); background: rgba(255, 255, 255, .95); box-shadow: 0 6px 20px -16px rgba(29, 29, 27, .4); }
.pah-header__in { display: flex; align-items: center; gap: 16px; height: 64px; }
.pah-logo img { height: 36px; width: auto; }
.pah-nav { display: none; gap: 4px; }
.pah-nav a { padding: 8px 14px; border-radius: 999px; font-weight: 600; color: var(--pah-muted); transition: color .2s, background .2s; }
.pah-nav a:hover { color: var(--pah-text); background: var(--pah-surface-2); }
.pah-header__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.pah-user { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; padding: 4px; border-radius: 999px; }
.pah-user img { width: 36px; height: 36px; border-radius: 50%; box-shadow: 0 0 0 2px var(--pah-rojo); }
.pah-user:hover { background: var(--pah-surface-2); }

/* Buscador */
.pah-search { position: relative; display: flex; align-items: center; gap: 10px; background: var(--pah-surface); border: 1px solid var(--pah-border); border-radius: 999px; padding: 0 6px 0 18px; transition: border-color .2s, box-shadow .2s; }
.pah-search:focus-within { border-color: var(--pah-rojo); box-shadow: 0 0 0 4px rgba(225, 31, 29, .14); }
.pah-search > .pah-i { color: var(--pah-muted); }
.pah-search input { flex: 1; min-width: 0; height: 44px; background: transparent !important; border: 0 !important; outline: 0; box-shadow: none !important; color: var(--pah-text) !important; font: inherit; font-size: 1rem; padding: 0 !important; margin: 0; }
.pah-search input::placeholder { color: #85857f; opacity: 1; }
.pah-search--header { display: none; flex: 1; max-width: 420px; background: var(--pah-surface-2); border-color: transparent; }
.pah-search--big { margin-top: 28px; max-width: 560px; padding-block: 6px; box-shadow: var(--pah-shadow); }
.pah-search--big input { height: 48px; font-size: 1.0625rem; }

.pah-overlay { position: fixed; inset: 0; z-index: 80; background: rgba(249, 249, 250, .97); backdrop-filter: blur(8px); padding: 16px; animation: pah-fade .2s var(--pah-ease); }
.pah-overlay[hidden] { display: none; }
.pah-overlay__box { max-width: 640px; margin: 8vh auto 0; }
.pah-overlay .pah-search--big { margin-top: 0; max-width: none; }
.pah-overlay__results { margin-top: 12px; display: grid; gap: 6px; max-height: 65vh; overflow: auto; }
.pah-overlay__results a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--pah-r); background: var(--pah-surface); border: 1px solid var(--pah-border); font-weight: 600; }
.pah-overlay__results a:hover, .pah-overlay__results a:focus-visible { border-color: var(--pah-rojo); }
.pah-overlay__results small { display: block; color: var(--pah-muted); font-weight: 500; }

/* Banner de video: mantiene la proporción del video (1240×356) para verse completo en cualquier ancho */
.pah-banner { padding-top: clamp(12px, 2vw, 24px); }
.pah-banner__media { position: relative; aspect-ratio: 1240 / 356; border-radius: clamp(10px, 1.6vw, var(--pah-r-lg)); overflow: hidden; background: var(--pah-negro); box-shadow: var(--pah-shadow); }
.pah-banner__video { display: block; width: 100%; height: 100%; object-fit: cover; }
.pah .pah-banner__toggle { position: absolute; right: clamp(8px, 1.4vw, 16px); bottom: clamp(8px, 1.4vw, 16px); width: 44px; height: 44px; padding: 0; display: grid; place-items: center; border-radius: 50%; background: rgba(29, 29, 27, .6); color: #fff; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: background .2s, transform .2s; }
.pah .pah-banner__toggle:hover { background: var(--pah-rojo); transform: scale(1.06); }
.pah-banner__toggle .pah-i { width: 20px; height: 20px; fill: currentColor; stroke: none; }
.pah-banner__ico-play { display: none; }
.pah-banner__toggle.is-paused .pah-banner__ico-play { display: grid; }
.pah-banner__toggle.is-paused .pah-banner__ico-pausa { display: none; }
@media (max-width: 599px) { .pah .pah-banner__toggle { width: 36px; height: 36px; } .pah-banner__toggle .pah-i { width: 16px; height: 16px; } }
.pah-banner + .pah-hero { padding-top: clamp(24px, 4vw, 56px); }

/* Hero */
.pah-hero { position: relative; padding: clamp(32px, 6vw, 88px) 0 clamp(40px, 6vw, 80px); isolation: isolate; background: radial-gradient(70% 60% at 85% 10%, rgba(225, 31, 29, .09), transparent 70%), linear-gradient(180deg, #fff, var(--pah-bg)); }
.pah-hero__glow { display: none; }
.pah-hero__grid { display: grid; gap: 40px; align-items: center; }
.pah-hero__grid > * { min-width: 0; }
.pah-hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.pah-hero__ctas .pah-btn { flex: 1 1 200px; }

/* Collage del hero: cuadrícula sin solapes, todo dentro de su columna */
.pah-hero__visual { position: relative; display: grid; grid-template-columns: 1.15fr 1fr; gap: 12px; width: 100%; max-width: 560px; margin-inline: auto; }
.pah-float { background: var(--pah-surface); border: 1px solid var(--pah-border); border-radius: var(--pah-r); overflow: hidden; box-shadow: var(--pah-shadow); display: flex; flex-direction: column; min-width: 0; animation: pah-float 7s ease-in-out infinite; }
.pah-float img { aspect-ratio: 16 / 10; width: 100%; object-fit: contain; background: #fff; }
.pah-float__body { padding: 10px 12px 12px; display: grid; gap: 8px; font-size: .8125rem; font-weight: 700; line-height: 1.25; border-top: 1px solid var(--pah-border); }
.pah-float__body span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pah-float--0 { grid-row: span 2; align-self: center; }
.pah-float--1 { animation-delay: -2.5s; }
.pah-float--2 { animation-delay: -4.5s; }
.pah-float--cert { grid-column: 1 / -1; justify-self: start; display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 999px; background: var(--pah-negro); color: #fff; font-size: .875rem; font-weight: 500; box-shadow: var(--pah-shadow); }
.pah-float--cert b { color: #fff; }
.pah-float--cert .pah-i { width: 22px; height: 22px; color: var(--pah-rojo-claro); }

/* Hero del alumno */
.pah-hero--user { padding-top: clamp(24px, 4vw, 64px); }
.pah-hero--user .pah-h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.25rem); line-height: 1.1; }
.pah-mystats { display: flex; gap: 10px; margin-top: 28px; }
.pah-mystats li { flex: 1; background: var(--pah-surface); border: 1px solid var(--pah-border); border-radius: var(--pah-r); padding: 14px 12px; display: grid; gap: 2px; box-shadow: var(--pah-shadow); }
.pah-mystats strong { font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.25rem); font-weight: 800; line-height: 1; }
.pah-mystats span { font-size: .8125rem; color: var(--pah-muted); font-weight: 600; }

.pah-continue { display: grid; background: var(--pah-surface); border: 1px solid var(--pah-border); border-radius: var(--pah-r-lg); overflow: hidden; box-shadow: var(--pah-shadow); transition: transform .3s var(--pah-ease), box-shadow .3s, border-color .3s; }
.pah-continue:hover { transform: translateY(-3px); box-shadow: var(--pah-shadow-hover); border-color: var(--pah-rojo); }
.pah-continue__media { position: relative; background: #fff; aspect-ratio: 16 / 10; border-bottom: 1px solid var(--pah-border); }
.pah-continue__media img { width: 100%; height: 100%; object-fit: contain; }
.pah-continue__play { position: absolute; right: 16px; bottom: 16px; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--pah-rojo); box-shadow: 0 0 0 8px rgba(225, 31, 29, .15); transition: transform .3s var(--pah-ease); }
.pah-continue__play .pah-i { width: 24px; height: 24px; fill: #fff; stroke: none; margin-left: 3px; }
.pah-continue:hover .pah-continue__play { transform: scale(1.08); }
.pah-continue__body { padding: 20px; display: grid; gap: 12px; justify-items: start; }
.pah-continue__body .pah-eyebrow { margin: 0; }
.pah-continue__title { font-size: clamp(1.25rem, 1.1rem + .7vw, 1.6rem); font-weight: 700; line-height: 1.2; }
.pah-continue__pct { font-size: .9375rem; color: var(--pah-muted); }
.pah-continue .pah-progress { width: 100%; }
.pah-continue--empty { min-height: 220px; align-content: center; background: radial-gradient(120% 120% at 100% 0, rgba(225, 31, 29, .1), transparent 60%), var(--pah-surface); }

.pah-alert { margin-top: 24px; display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; padding: 18px; border-radius: var(--pah-r); background: #fff8e8; border: 1px solid #f1d28f; }
.pah-alert > .pah-i { width: 30px; height: 30px; color: var(--pah-warn-text); }
.pah-alert p { color: #4a4a46; margin-top: 4px; font-size: .9375rem; }
.pah-alert b { color: var(--pah-text); }
.pah-alert .pah-btn { grid-column: 1 / -1; justify-self: start; background: var(--pah-warn); color: var(--pah-negro) !important; box-shadow: none; }
.pah-alert .pah-btn:hover { background: #e8a823; }

/* Barra de progreso */
.pah-progress { height: 8px; border-radius: 999px; background: var(--pah-surface-2); overflow: hidden; }
.pah-progress > span { display: block; height: 100%; width: var(--p); border-radius: inherit; background: linear-gradient(90deg, var(--pah-rojo), var(--pah-rojo-claro)); transform-origin: left; animation: pah-grow 1.2s var(--pah-ease) both; }

/* Cifras (franja oscura para dar ritmo) */
.pah-stats { background: var(--pah-negro); color: #fff; }
.pah-stats__grid { display: grid; grid-template-columns: repeat(2, 1fr); }
.pah-stat { padding: 24px 8px; display: grid; gap: 4px; text-align: center; }
.pah-stat strong { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.25rem); font-weight: 800; line-height: 1; letter-spacing: -.02em; color: #fff; }
.pah-stat strong::after { content: "+"; color: var(--pah-rojo-claro); }
.pah-stat:nth-child(2) strong::after { content: ""; }
.pah-stat span { color: #c9c9c4; font-size: .9375rem; font-weight: 500; }

/* Secciones */
.pah-section { padding-block: var(--pah-section); }
.pah-section--alt { background: #fff; border-block: 1px solid var(--pah-border); }

/* Sección oscura (Videos): contraste con las secciones claras de alrededor */
.pah-section--dark { background: var(--pah-negro); color: #fff; }
.pah-section--dark .pah-h2 { color: #fff; }
.pah-section--dark .pah-eyebrow { color: #ff6b5e; }
.pah-section--dark .pah-link { color: #fff; }
.pah-section--dark .pah-link:hover { color: #ff6b5e; }

/* Videos: miniatura de YouTube y el reproductor solo se carga al pulsar (no pesa al abrir la portada) */
.pah-videos { display: grid; grid-template-columns: 1fr; gap: 20px; }
.pah-video__media { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: var(--pah-r-lg); overflow: hidden; background: #000 !important; cursor: pointer; box-shadow: 0 14px 30px -18px rgba(0, 0, 0, .8); }
.pah-video__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--pah-ease), opacity .3s; opacity: .88; }
.pah-video__media:hover img, .pah-video__media:focus-visible img { transform: scale(1.05); opacity: 1; }
.pah-video__play { position: absolute; inset: 0; margin: auto; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: var(--pah-rojo); color: #fff; box-shadow: 0 8px 24px -6px rgba(225, 31, 29, .7); transition: transform .3s var(--pah-ease); }
.pah-video__play .pah-i { width: 26px; height: 26px; margin-left: 3px; }
.pah-video__media:hover .pah-video__play { transform: scale(1.12); }
.pah-video__media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pah-video__title { margin-top: 12px; font-size: 1rem; font-weight: 700; line-height: 1.35; color: #fff; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pah-videos__more { margin-top: 28px; width: 100%; }
@media (max-width: 599px) { .pah-video:nth-child(n+4) { display: none; } }
@media (min-width: 600px) { .pah-videos { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) {
	.pah-videos { grid-template-columns: repeat(3, 1fr); gap: 28px; }
	.pah-videos__more { display: none; }
}
.pah-section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: clamp(20px, 3vw, 36px); }
.pah-section__head--center { justify-content: center; text-align: center; }

/* Escuelas */
.pah-schools { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.pah-school { --c: var(--pah-rojo); position: relative; z-index: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 200px; min-width: 0; padding: 18px; border-radius: var(--pah-r); background: var(--pah-surface); border: 1px solid var(--pah-border); box-shadow: var(--pah-shadow); overflow: hidden; transform-origin: center bottom; transition: transform .35s var(--pah-ease), border-color .3s, box-shadow .35s; }
.pah-school::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--c); opacity: .85; }
/* Halo de color que crece al pasar el ratón */
.pah-school::after { content: ""; position: absolute; z-index: -1; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: var(--c); opacity: .07; transition: transform .45s var(--pah-ease), opacity .3s; }
.pah-school:hover, .pah-school:focus-visible { z-index: 2; transform: translateY(-6px) scale(1.06); border-color: var(--c); box-shadow: 0 28px 50px -24px color-mix(in srgb, var(--c) 55%, transparent), var(--pah-shadow-hover); }
.pah-school:hover::after { transform: scale(1.6); opacity: .12; }
.pah-school__icon { width: 72px; height: 72px; margin: -4px 0 8px -4px; filter: drop-shadow(0 10px 12px rgba(29, 29, 27, .18)); transition: transform .45s var(--pah-ease); }
.pah-school__icon img { width: 100%; height: 100%; object-fit: contain; }
.pah-school:hover .pah-school__icon { transform: translateY(-4px) rotate(-6deg) scale(1.12); }
.pah-school__kicker { font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--pah-muted); }
.pah-school__name { font-size: 1.125rem; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.pah-school__cta { margin-top: auto; padding-top: 14px; display: inline-flex; align-items: center; gap: 6px; font-size: .9375rem; font-weight: 700; color: var(--c); }
.pah-school__cta .pah-i { width: 18px; height: 18px; transition: transform .3s var(--pah-ease); }
.pah-school:hover .pah-school__cta .pah-i { transform: translateX(5px); }

/* Filtros */
.pah-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--pah-gutter) * -1) 24px; padding: 2px var(--pah-gutter); scroll-snap-type: x proximity; }
.pah-chips::-webkit-scrollbar { display: none; }
.pah-chip { flex: none; min-height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--pah-border) !important; background: var(--pah-surface) !important; color: var(--pah-muted) !important; font-weight: 600; scroll-snap-align: start; transition: all .2s; }
.pah-chip:hover { color: var(--pah-text) !important; border-color: var(--pah-gris) !important; }
.pah-chip.is-on { background: var(--pah-negro) !important; color: #fff !important; border-color: var(--pah-negro) !important; }

/* Tarjetas de curso */
.pah-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.pah-card { min-width: 0; border-radius: var(--pah-r); background: var(--pah-surface); border: 1px solid var(--pah-border); box-shadow: var(--pah-shadow); overflow: hidden; transition: transform .3s var(--pah-ease), border-color .3s, box-shadow .3s; }
.pah-card:hover { transform: translateY(-4px); box-shadow: var(--pah-shadow-hover); }
.pah-card[hidden] { display: none; }
.pah-card__link { display: flex; flex-direction: column; height: 100%; }
/* object-fit: contain muestra la portada completa, sin recortar los lados; el fondo blanco
   coincide con el de las portadas de los cursos. */
.pah-card__media { position: relative; aspect-ratio: 16 / 10; background: #fff; overflow: hidden; border-bottom: 1px solid var(--pah-border); }
.pah-card__media img { width: 100%; height: 100%; object-fit: contain; object-position: center; transition: transform .6s var(--pah-ease); }
.pah-card:hover .pah-card__media img { transform: scale(1.03); }
.pah-card__ph { display: grid; place-items: center; height: 100%; color: var(--pah-gris); background: radial-gradient(circle at 30% 30%, rgba(225, 31, 29, .1), transparent 60%); }
.pah-card__ph .pah-i { width: 48px; height: 48px; }
.pah-badge { position: absolute; left: 10px; top: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--pah-negro); color: #fff; font-size: .8125rem; font-weight: 700; box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .35); }
.pah-badge .pah-i { width: 16px; height: 16px; }
.pah-badge--ok { background: var(--pah-ok); }
.pah-badge--warn { background: var(--pah-warn); color: var(--pah-negro); }
.pah-card__body { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 18px; flex: 1; }
.pah-card__cat { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--pah-rojo-oscuro); }
.pah-card__title { font-size: 1.1875rem; font-weight: 700; line-height: 1.25; }
.pah-card__meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--pah-muted); font-size: .875rem; }
.pah-card__meta li { display: inline-flex; align-items: center; gap: 6px; }
.pah-card__meta .pah-i { width: 16px; height: 16px; }
.pah-card__pct { font-size: .8125rem; color: var(--pah-muted); margin-top: -4px; }
.pah-card__cta { margin-top: auto; padding-top: 6px; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--pah-text); }
.pah-card__cta .pah-i { transition: transform .3s var(--pah-ease); }
.pah-card:hover .pah-card__cta { color: var(--pah-rojo-oscuro); }
.pah-card:hover .pah-card__cta .pah-i { transform: translateX(4px); }
.pah-empty { text-align: center; color: var(--pah-muted); padding: 32px 0; }

/* Carrusel (Mi aprendizaje) */
/* --edge alinea la primera tarjeta con el contenido de .pah-wrap (también al encajar el scroll). */
.pah-carousel { --edge: max(var(--pah-gutter), calc((100% - var(--pah-wrap)) / 2 + var(--pah-gutter))); display: grid; grid-auto-flow: column; grid-auto-columns: min(82%, 340px); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--edge); padding: 4px var(--edge) 20px; scrollbar-width: none; }
.pah-carousel::-webkit-scrollbar { display: none; }
.pah-carousel .pah-card { scroll-snap-align: start; }
.pah-carousel__nav { display: flex; gap: 6px; }
.pah-carousel__nav .pah-iconbtn { border: 1px solid var(--pah-border); background: #fff !important; }

/* Pasos */
.pah-steps { display: grid; gap: 12px; }
.pah-step { position: relative; padding: 22px; border-radius: var(--pah-r); background: var(--pah-bg); border: 1px solid var(--pah-border); display: grid; gap: 6px; }
.pah-step h3 { font-size: 1.125rem; font-weight: 700; line-height: 1.25; }
.pah-step p { color: var(--pah-muted); font-size: .9375rem; }
.pah-step__n { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 1.25rem; background: var(--pah-negro); color: #fff; margin-bottom: 8px; }
.pah-step__n .pah-i { width: 24px; height: 24px; }
.pah-step--key { border-color: var(--pah-rojo); background: #fff3f2; }
.pah-step--key .pah-step__n { background: var(--pah-rojo); }
.pah-step:last-child .pah-step__n { background: var(--pah-ok); }

/* FAQ */
.pah-faq { display: grid; gap: 10px; }
.pah-faq details { border-radius: var(--pah-r); background: var(--pah-surface); border: 1px solid var(--pah-border); box-shadow: var(--pah-shadow); transition: border-color .2s; }
.pah-faq details[open] { border-color: var(--pah-gris); }
.pah-faq summary { list-style: none; cursor: pointer; padding: 18px 56px 18px 20px; position: relative; font-weight: 700; font-size: 1.0625rem; line-height: 1.35; }
.pah-faq summary::-webkit-details-marker { display: none; }
.pah-faq summary::after { content: ""; position: absolute; right: 22px; top: 50%; width: 12px; height: 12px; border-right: 2px solid var(--pah-rojo); border-bottom: 2px solid var(--pah-rojo); transform: translateY(-70%) rotate(45deg); transition: transform .3s var(--pah-ease); }
.pah-faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.pah-faq details p { padding: 0 20px 20px; color: var(--pah-muted); }
.pah-faq details b { color: var(--pah-text); }

/* CTA final */
.pah-cta { padding: 0 0 var(--pah-section); }
.pah-cta__in { display: grid; gap: 20px; justify-items: start; padding: clamp(28px, 5vw, 64px); border-radius: var(--pah-r-lg); background: radial-gradient(120% 140% at 100% 0, var(--pah-rojo-claro), transparent 55%), linear-gradient(135deg, var(--pah-rojo), #9e1210); position: relative; overflow: hidden; }
/* El anillo decorativo queda debajo del contenido y no captura clics (antes tapaba el botón). */
.pah-cta__in::after { content: ""; position: absolute; z-index: 0; right: -60px; bottom: -60px; width: 240px; height: 240px; border: 40px solid rgba(255, 255, 255, .08); border-radius: 50%; pointer-events: none; }
.pah-cta__in > * { position: relative; z-index: 1; }
.pah-cta .pah-h2 { max-width: 18ch; color: #fff; }

/* Pie (oscuro) */
.pah-footer { background: var(--pah-negro); color: #fff; padding: 36px 0; }
.pah-footer__in { display: grid; gap: 18px; justify-items: start; }
.pah-footer img { height: 40px; width: auto; }
.pah-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.pah-footer nav a { color: #c9c9c4; font-weight: 600; min-height: 32px; display: inline-flex; align-items: center; }
.pah-footer nav a:hover { color: #fff; }
.pah-footer p { color: #a8a8a3; font-size: .875rem; }
.pah-footer__legal { display: grid; gap: 4px; }
.pah-footer__legal strong { color: #fff; font-weight: 700; }
/* En móvil, hueco al final del pie para que el botón de WhatsApp no tape la firma */
@media (max-width: 1023px) { .pah-footer { padding-bottom: 96px; } }

/* Barra inferior (móvil) */
.pah-tabbar { position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); height: calc(var(--pah-tabbar) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: rgba(255, 255, 255, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--pah-border); box-shadow: 0 -6px 20px -14px rgba(29, 29, 27, .35); }
.pah-tabbar a { display: grid; place-items: center; align-content: center; gap: 3px; font-size: .6875rem; font-weight: 600; color: var(--pah-muted); position: relative; }
.pah-tabbar a .pah-i { width: 24px; height: 24px; transition: transform .2s var(--pah-ease); }
.pah-tabbar a.is-on { color: var(--pah-rojo-oscuro); }
.pah-tabbar a.is-on::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--pah-rojo); }
.pah-tabbar a:active .pah-i { transform: scale(.88); }

/* Aparición al hacer scroll (solo si el JS está activo) */
.pah.js .pah-reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--pah-ease), transform .6s var(--pah-ease); transition-delay: var(--d, 0s); }
.pah.js .pah-reveal.is-in { opacity: 1; transform: none; }

@keyframes pah-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes pah-grow { from { transform: scaleX(0); } }
@keyframes pah-fade { from { opacity: 0; } }

/* ≥ 600 px */
@media (min-width: 600px) {
	.pah-grid { grid-template-columns: repeat(2, 1fr); }
	.pah-schools { grid-template-columns: repeat(3, 1fr); }
	.pah-stats__grid { grid-template-columns: repeat(4, 1fr); }
	.pah-stat { padding-block: 32px; }
	.pah-steps { grid-template-columns: repeat(2, 1fr); }
	.pah-alert { grid-template-columns: auto 1fr auto; align-items: center; }
	.pah-alert .pah-btn { grid-column: auto; }
	.pah-hero__ctas .pah-btn { flex: 0 0 auto; }
	.pah-hero__visual { gap: 16px; }
}

/* ≥ 1024 px: escritorio, sin barra inferior */
@media (min-width: 1024px) {
	.pah { padding-bottom: 0; }
	.pah-tabbar, .pah-only-mobile { display: none !important; }
	.pah-only-desktop { display: revert !important; }
	.pah-carousel__nav.pah-only-desktop, .pah-link.pah-only-desktop { display: flex !important; }
	.pah-nav { display: flex; }
	.pah-search--header { display: flex; }
	.pah-header__in { height: 76px; gap: 24px; }
	.pah-logo img { height: 42px; }
	.pah-hero__grid { grid-template-columns: 1.1fr .9fr; gap: 56px; }
	.pah-hero--user .pah-hero__grid { grid-template-columns: .9fr 1.1fr; }
	.pah-continue { grid-template-columns: 1.1fr 1fr; }
	.pah-continue__media { aspect-ratio: auto; min-height: 100%; border-bottom: 0; border-right: 1px solid var(--pah-border); }
	.pah-continue__media img { position: absolute; inset: 0; padding: 12px; }
	.pah-continue__body { padding: 32px; align-content: center; }
	.pah-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
	.pah-schools { grid-template-columns: repeat(6, 1fr); gap: 16px; }
	.pah-school { min-height: 236px; }
	.pah-school__icon { width: 84px; height: 84px; }
	.pah-steps { grid-template-columns: repeat(4, 1fr); gap: 16px; }
	.pah-carousel { grid-auto-columns: 340px; gap: 20px; }
	.pah-cta__in { grid-template-columns: 1fr auto; align-items: center; }
	.pah-footer__in { grid-template-columns: auto 1fr auto; align-items: center; gap: 32px; }
	.pah-footer nav { justify-content: center; }
	.pah-footer__legal { text-align: right; max-width: 340px; }
}

@media (min-width: 1280px) {
	.pah-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
	.pah *, .pah *::before, .pah *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
	.pah.js .pah-reveal { opacity: 1; transform: none; }
}
