/* EPG Editor en Vivo · componentes */

/* ===== Grilla de cursos (tiles con video) ===== */
.epg-grid-bar { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; margin-bottom: 18px; }
.epg-grid-title { font-size: clamp(26px, 3.4vw, 38px); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.epg-filter { display: flex; flex-wrap: wrap; gap: 18px; font-size: 14px; }
.epg-filter button { background: none; border: 0; padding: 2px 0; font: inherit; color: var(--epg-on-dark-muted); border-bottom: 1px solid transparent; cursor: pointer; }
.epg-filter button[aria-pressed="true"] { color: #fff; border-bottom-color: var(--epg-acento); }
.epg-bg-claro .epg-filter button, .epg-bg-blanco .epg-filter button { color: var(--epg-muted); }
.epg-bg-claro .epg-filter button[aria-pressed="true"], .epg-bg-blanco .epg-filter button[aria-pressed="true"] { color: var(--epg-texto); }

.epg-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.epg-tiles.epg-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.epg-tile { position: relative; display: block; aspect-ratio: 16 / 10; max-width: 100%; border-radius: 3px; overflow: hidden; color: #fff; text-decoration: none; background: #0F1A25; }
.epg-tiles-feature .epg-tile:first-child { grid-column: 1 / -1; aspect-ratio: 21 / 9; }
.epg-tile[hidden] { display: none; }
.epg-tile-bg { position: absolute; inset: 0; background-size: 180% 180% !important; animation: epg-drift 16s ease-in-out infinite alternate; transition: transform .5s ease; }
.epg-tile-bg::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(255,255,255,.035) 0 2px, transparent 2px 16px); }
.epg-tile-bg video, .epg-bgvideo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.epg-tile:hover .epg-tile-bg { transform: scale(1.04); }
.epg-tile-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4,9,14,.25) 0%, rgba(4,9,14,0) 30%, rgba(4,9,14,.88) 100%); }
.epg-tile-kick { position: absolute; top: 16px; left: 18px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.82); }
.epg-play { position: absolute; z-index: 2; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.92); display: grid; place-items: center; opacity: .85; transition: opacity .2s ease; }
.epg-play svg { width: 16px; height: 16px; fill: var(--epg-navy); margin-left: 3px; }
.epg-tile:hover .epg-play { opacity: 1; }
.epg-play-lg { top: 50%; left: 50%; right: auto; width: 68px; height: 68px; transform: translate(-50%, -50%); }
.epg-play-lg svg { width: 22px; height: 22px; }
.epg-tile-over { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; }
.epg-tile-title { font-family: var(--epg-f-display); font-size: clamp(22px, 2.6vw, 34px); font-weight: 600; text-transform: uppercase; line-height: 1; letter-spacing: .01em; max-width: 24ch; text-wrap: balance; }
.epg-tiles-feature .epg-tile:first-child .epg-tile-title { font-size: clamp(28px, 4.4vw, 58px); }
.epg-cols-3 .epg-tile-title { font-size: clamp(20px, 2vw, 28px); }
.epg-tile-line { font-size: 13px; line-height: 1.4; color: rgba(255,255,255,.8); }
@keyframes epg-drift { from { background-position: 0% 40%; } to { background-position: 100% 60%; } }
@media (max-width: 900px) { .epg-tiles.epg-cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
	.epg-tiles, .epg-tiles.epg-cols-3 { grid-template-columns: 1fr; }
	.epg-tiles-feature .epg-tile:first-child { aspect-ratio: 16 / 10; }
}

/* ===== Portada: alturas (clase epg-h-*) ===== */
.epg-h-media { min-height: 52vh; }
.epg-h-alta { min-height: 72vh; }
.epg-h-pantalla { min-height: 100vh; }

/* ===== Ficha de curso ===== */
.epg-curso-band { background: var(--epg-navy); color: #fff; }
.epg-crumbs { margin: 0; padding-block: 18px; font-size: 13px; color: var(--epg-on-dark-muted); }
.epg-crumbs a { color: #fff; text-underline-offset: 3px; }
.epg-curso-head { display: grid; grid-template-columns: 1.45fr 1fr; gap: 32px; padding-bottom: 40px; align-items: start; }
.epg-player { position: relative; aspect-ratio: 16 / 9; max-width: 100%; border-radius: 4px; overflow: hidden; color: #fff; background: #0F1A25; display: flex; align-items: flex-end; padding: 18px; }
.epg-player iframe, .epg-player .epg-player-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.epg-player-note { position: relative; z-index: 1; font-size: 12px; background: rgba(0,0,0,.4); padding: 6px 9px; border-radius: 3px; }
.epg-curso-title { font-size: clamp(32px, 4.4vw, 50px); font-weight: 700; text-transform: uppercase; }
.epg-curso-sub { color: var(--epg-on-dark-muted); margin: 10px 0 18px; font-size: 17px; }
.epg-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.epg-tag { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; padding: 3px 8px; border-radius: 3px; background: rgba(255,255,255,.14); color: #fff; }
.epg-people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.epg-people li { display: flex; gap: 10px; align-items: baseline; }
.epg-people-r { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--epg-on-dark-muted); min-width: 96px; }
.epg-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
@media (max-width: 860px) { .epg-curso-head { grid-template-columns: 1fr; } }

.epg-curso-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; padding-block: 28px 72px; background: var(--epg-claro); }
.epg-curso { background: var(--epg-claro); color: var(--epg-texto); }
@media (max-width: 900px) { .epg-curso-body { grid-template-columns: 1fr; } }
.epg-curso-main { min-width: 0; }
.epg-tabs { display: flex; border-bottom: 1px solid var(--epg-line); overflow-x: auto; }
.epg-tab { background: none; border: 0; border-bottom: 3px solid transparent; padding: 12px 16px; font: inherit; font-weight: 600; font-size: 14px; color: var(--epg-muted); white-space: nowrap; cursor: pointer; }
.epg-tab[aria-selected="true"] { color: var(--epg-texto); border-bottom-color: var(--epg-navy); }
.epg-panel { padding-top: 24px; }
.epg-panel > h2 { font-size: 30px; font-weight: 600; margin-bottom: 6px; }
.epg-unit { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 14px; padding: 16px 0; border-top: 1px solid var(--epg-line); }
.epg-unit-num { font-size: 12px; color: var(--epg-muted); padding-top: 4px; font-variant-numeric: tabular-nums; }
.epg-unit h3 { font-size: 21px; font-weight: 600; margin-bottom: 6px; }
.epg-unit ul { margin: 0; padding-left: 18px; }
.epg-clin { margin: 8px 0 0; font-size: 14px; color: var(--epg-muted); }
.epg-ejes { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.epg-eje { background: #fff; border: 1px solid var(--epg-line); border-radius: 6px; padding: 14px 16px; }
.epg-eje h3 { font-family: var(--epg-f-body); font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.epg-eje p { margin: 0; font-size: 14px; color: var(--epg-muted); }
.epg-outcomes { list-style: none; margin: 0 0 26px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.epg-outcomes li { position: relative; padding-left: 26px; }
.epg-outcomes li::before { content: ""; position: absolute; left: 0; top: 6px; width: 12px; height: 12px; border: 2px solid var(--epg-acento); border-radius: 50%; }
.epg-subh { font-family: var(--epg-f-body) !important; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--epg-muted); font-weight: 700; margin: 26px 0 12px !important; }
.epg-method { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.epg-method li { background: var(--epg-chip); border-radius: 4px; padding: 10px 12px; font-size: 14px; }

.epg-sheet { background: #fff; border: 1px solid var(--epg-line); border-radius: 6px; align-self: start; position: sticky; top: 16px; }
@media (max-width: 900px) { .epg-sheet { position: static; } }
.epg-sheet h2 { font-size: 21px; font-weight: 600; padding: 14px 18px; border-bottom: 1px solid var(--epg-line); }
.epg-sheet dl { margin: 0; padding: 6px 18px 14px; }
.epg-row { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--epg-line); font-size: 14px; }
.epg-row:last-child { border-bottom: 0; }
.epg-row dt { color: var(--epg-muted); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; padding-top: 1px; }
.epg-row dd { margin: 0; }
.epg-flag { margin: 0 18px 16px; padding: 10px 12px; border-left: 3px solid #B3261E; background: var(--epg-chip); font-size: 13px; }
.epg-flag b { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #B3261E; margin-bottom: 3px; }

/* ===== Imagen y texto ===== */
.epg-split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.epg-split-der .epg-split-media { order: 2; }
.epg-split-media img { border-radius: 4px; width: 100%; }
.epg-media-ph { display: grid; place-items: center; aspect-ratio: 4 / 3; border: 1px dashed currentColor; border-radius: 4px; opacity: .6; font-size: 14px; }
@media (max-width: 760px) { .epg-split { grid-template-columns: 1fr; } .epg-split-der .epg-split-media { order: 0; } }

/* ===== Video ===== */
.epg-video-block .epg-player { margin-top: 8px; }
.epg-caption { font-size: 13px; color: var(--epg-muted); margin: 10px 0 0; }

/* ===== Docentes ===== */
.epg-team { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-top: 8px; }
.epg-team.epg-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.epg-person-photo { aspect-ratio: 1; border-radius: 4px; overflow: hidden; background: var(--epg-chip); margin-bottom: 12px; display: grid; place-items: center; }
.epg-person-photo img { width: 100%; height: 100%; object-fit: cover; }
.epg-initials { font-family: var(--epg-f-display); font-size: 56px; font-weight: 700; color: var(--epg-navy); }
.epg-person h3 { font-size: 21px; font-weight: 600; }
.epg-person-rol { margin: 4px 0 0; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--epg-muted); }
.epg-person-bio { margin: 8px 0 0; font-size: 14px; }
@media (max-width: 900px) { .epg-team, .epg-team.epg-cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ===== Cifras ===== */
.epg-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.14); }
.epg-stat { padding: 18px 20px; background: var(--epg-navy); display: flex; flex-direction: column; gap: 4px; }
.epg-bg-claro .epg-stat, .epg-bg-blanco .epg-stat { background: #fff; }
.epg-bg-oscuro .epg-stat { background: var(--epg-oscuro); }
.epg-stat b { font-family: var(--epg-f-display); font-size: 44px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.epg-stat span { font-size: 13px; opacity: .75; }

/* ===== Preguntas frecuentes ===== */
.epg-faq details { border-top: 1px solid var(--epg-line); padding: 14px 0; }
.epg-faq details:last-child { border-bottom: 1px solid var(--epg-line); }
.epg-faq summary { font-weight: 600; cursor: pointer; }
.epg-faq-a { margin-top: 8px; color: var(--epg-muted); }

/* ===== Llamado a la acción y espaciador ===== */
.epg-cta-block .epg-h2 { margin-bottom: 10px; }
.epg-spacer { display: flex; align-items: center; }
.epg-spacer hr { border: 0; border-top: 1px solid currentColor; opacity: .2; margin-block: 0; }

@media (prefers-reduced-motion: reduce) {
	.epg-tile-bg { animation: none; transition: none; }
	.epg-tile:hover .epg-tile-bg { transform: none; }
}
