/*
 * Sistema visual de páginas públicas
 * Portada, Quiénes Somos, registro e inicio de sesión
 */
:root {
    --primary: #4586b5;
    --primary-dark: #346b93;
    --primary-soft: #eaf3f9;
    --secondary: #5d2973;
    --secondary-soft: #f2ebf5;
    --accent: #10b981;
    --dark: #0f172a;
    --navy: #121d34;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-400: #94a3b8;
    --gray-600: #475569;
    --gray-800: #1e293b;
    --surface: #ffffff;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 18px 50px rgba(15, 23, 42, 0.10);
    --radius-md: 16px;
    --radius-lg: 24px;
}

html { scroll-behavior: smooth; }
body {
    background: #f7f9fc;
    color: var(--gray-800);
    font-family: 'Plus Jakarta Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
body::selection { background: rgba(69, 134, 181, 0.22); color: var(--dark); }
a, button, input, select { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
    outline: 3px solid rgba(69, 134, 181, 0.3);
    outline-offset: 3px;
}
.container { max-width: 1200px; }

/* Portada: hero (banners de imagen) */
.hero-carousel {
    position: relative;
    overflow: hidden;
    background: var(--navy);
    padding-top: 70px;
}
.hero-slide {
    display: none;
}
.hero-slide.active {
    display: block;
}
.hero-slide img {
    width: 100%;
    height: auto;
    display: block;
}
.hero-controls {
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 99px;
    background: rgba(15,23,42,0.28);
    backdrop-filter: blur(12px);
    z-index: 3;
}
.hero-dot {
    width: 7px;
    height: 7px;
    border-radius: 99px;
    border: none;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    padding: 0;
    transition: width 0.3s, background 0.3s;
}
.hero-dot.active {
    width: 24px;
    background: #fff;
}
.hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(15,23,42,0.24);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    transition: background 0.2s;
}
.hero-nav:hover { background: rgba(15,23,42,0.5); }
.hero-nav--prev { left: 1rem; }
.hero-nav--next { right: 1rem; }

/* Portada: catálogo */
.courses-section { padding: 3.5rem 0; background: #fff; }
.section-header { margin-bottom: 2rem; }
.section-badge {
    padding: 0.45rem 0.8rem;
    border: 1px solid rgba(69,134,181,0.16);
    border-radius: 8px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.section-title {
    margin-bottom: 0.75rem;
    color: var(--dark);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.04em;
}
.section-subtitle { color: var(--gray-600); font-size: 1rem; line-height: 1.75; }
.course-card {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.course-card:hover {
    transform: translateY(-6px);
    border-color: rgba(69,134,181,0.34);
    box-shadow: var(--shadow-md);
}
.course-image { aspect-ratio: 1 / 1; }
.course-card:hover .course-image img { transform: scale(1.035); }
.course-badge {
    top: 0.8rem;
    left: 0.8rem;
    padding: 0.35rem 0.65rem;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 7px;
    background: rgba(15,23,42,0.78);
    font-size: 0.66rem;
    backdrop-filter: blur(10px);
}
.course-price-tag {
    top: 0.8rem;
    right: 0.8rem;
    padding: 0.4rem 0.7rem;
    border-radius: 7px;
    box-shadow: none;
    font-size: 0.82rem;
}
.course-body { padding: 1.35rem; }
.course-category { margin-bottom: 0.55rem; font-size: 0.67rem; letter-spacing: 0.08em; }
.course-title { color: var(--dark); font-size: 1.05rem; letter-spacing: -0.015em; }
.course-description { color: var(--gray-600); font-size: 0.84rem; }
.course-meta { gap: 0.65rem; }
.course-meta-item { padding: 0.3rem 0.5rem; border-radius: 6px; background: var(--gray-50); color: var(--gray-600); font-size: 0.71rem; }
.course-footer { border-color: var(--gray-200); }
.course-price { color: var(--dark); font-size: 1.18rem; }
.btn-curso {
    padding: 0.65rem 0.9rem;
    border-radius: 8px;
    background: var(--primary);
    font-size: 0.78rem;
    box-shadow: none;
}
.btn-curso:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: none; }
.empty-state { border: 1px solid var(--gray-200); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }

/* Acceso y registro */
.page-hero {
    min-height: 390px;
    padding: 9rem 0 8rem;
    background:
        radial-gradient(circle at 20% 10%, rgba(69,134,181,0.28), transparent 32%),
        radial-gradient(circle at 82% 28%, rgba(93,41,115,0.28), transparent 28%),
        linear-gradient(120deg, #111c32 0%, #192e47 54%, #44204f 100%);
}
.page-hero::before { opacity: 0.26; }
.page-hero h1 {
    margin-bottom: 0.8rem;
    font-size: clamp(2.15rem, 5vw, 3.4rem);
    line-height: 1.08;
    letter-spacing: -0.045em;
}
.page-hero h1 i {
    display: inline-flex;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 12px;
    background: rgba(255,255,255,0.08);
    font-size: 1.35rem;
    vertical-align: 0.35rem;
}
.page-hero p { color: rgba(255,255,255,0.7); font-size: 1rem; }
.login-section, .register-section {
    position: relative;
    z-index: 5;
    margin-top: -6rem;
    padding: 0 0 6rem;
}
.login-card, .register-card {
    border: 1px solid rgba(226,232,240,0.9);
    border-radius: 20px;
    box-shadow: 0 28px 80px rgba(15,23,42,0.14);
}
.login-card::before, .register-card::before { height: 3px; }
.login-body, .register-form { padding: 2.5rem; }
.login-logo { margin-bottom: 1.75rem; }
.login-logo img { max-width: 180px; height: 52px; object-fit: contain; }
.form-section-title {
    color: var(--primary-dark);
    font-size: 0.72rem;
    letter-spacing: 0.09em;
}
.form-label { color: var(--gray-800); font-size: 0.82rem; }
.form-control, .form-select {
    min-height: 50px;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    background: var(--gray-50);
    color: var(--dark);
    font-size: 0.9rem;
}
.form-control::placeholder { color: var(--gray-400); }
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(69,134,181,0.1);
}
.input-group-text {
    border: 1px solid var(--gray-200);
    border-right: 0;
    border-radius: 10px 0 0 10px;
    background: var(--gray-50);
}
.input-group .form-control { border-left: 0; border-radius: 0 10px 10px 0; }
.input-group:focus-within .input-group-text { border-color: var(--primary); background: #fff; }
.btn-login, .btn-register {
    min-height: 52px;
    border-radius: 10px;
    background: linear-gradient(110deg, var(--primary), var(--secondary));
    font-size: 0.9rem;
    box-shadow: none;
}
.btn-login:hover, .btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(69,134,181,0.24);
}
.btn-google {
    min-height: 50px;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    font-size: 0.87rem;
}
.btn-google:hover { border-color: #cbd5e1; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.divider, .divider-google { margin: 1.6rem 0; }
.divider span, .divider-google span { color: var(--gray-400); font-size: 0.75rem; }
.forgot-link a, .login-link a, .register-link a { color: var(--primary-dark); }
.alert { border: 1px solid #fecaca; border-radius: 10px; font-size: 0.86rem; }
.features-box {
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    background: var(--gray-50);
}
.feature-mini span { font-size: 0.82rem; }
.benefits-sidebar {
    position: sticky;
    top: 96px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    background:
        radial-gradient(circle at 90% 10%, rgba(93,41,115,0.5), transparent 40%),
        linear-gradient(145deg, #121d34, #1b3550);
    box-shadow: var(--shadow-md);
}
.benefits-sidebar > h5 { color: #fff !important; }
.benefit-item { margin-bottom: 1.7rem; }
.benefit-item:last-child { margin-bottom: 0; }
.benefit-icon {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    background: rgba(255,255,255,0.09);
}
.benefit-text h5 { color: #fff; font-size: 0.88rem; }
.benefit-text p { color: rgba(255,255,255,0.62); font-size: 0.78rem; }

/* Quiénes somos */
.hero:not(.hero-carousel) {
    min-height: 580px;
    padding: 120px 0 90px;
    background:
        radial-gradient(circle at 15% 25%, rgba(69,134,181,0.30), transparent 30%),
        radial-gradient(circle at 85% 35%, rgba(93,41,115,0.35), transparent 30%),
        linear-gradient(120deg, #111c32, #19334d 55%, #44204f);
}
.hero:not(.hero-carousel)::before { opacity: 0.28; }
.hero-badge {
    padding: 0.5rem 0.85rem;
    border-radius: 8px;
    background: rgba(255,255,255,0.07);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
}
.hero:not(.hero-carousel) h1 {
    margin-bottom: 1.25rem;
    font-size: clamp(2.7rem, 7vw, 5rem);
    line-height: 1;
    letter-spacing: -0.055em;
}
.hero:not(.hero-carousel) h1 span {
    background: linear-gradient(100deg, #7cb6dc, #b88bcc);
    -webkit-background-clip: text;
    background-clip: text;
}
.hero:not(.hero-carousel) p { max-width: 760px; color: rgba(255,255,255,0.72); font-size: 1.12rem; line-height: 1.75; }
.hero-company { padding-top: 0.8rem; font-size: 0.78rem !important; letter-spacing: 0.04em; }
.stats-section { margin-top: -52px; }
.stat-card {
    padding: 1.9rem 1.5rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}
.stat-card:hover { transform: translateY(-3px); }
.stat-number { font-size: clamp(2rem, 5vw, 2.65rem); letter-spacing: -0.045em; }
.stat-label { font-size: 0.84rem; }
.section { padding: 6rem 0; }
.section-light { border-top: 1px solid var(--gray-100); border-bottom: 1px solid var(--gray-100); background: #fff; }
.section-text { color: var(--gray-600); font-size: 1rem; line-height: 1.85; }
.stats-section + .section .section-text { max-width: 920px; margin-inline: auto; color: var(--gray-800); line-height: 1.9; }
.mv-card {
    padding: 2.4rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    background: #fff;
}
.mv-card:hover { transform: translateY(-4px); border-color: rgba(69,134,181,0.25); box-shadow: var(--shadow-md); }
.mv-card .icon { width: 52px; height: 52px; border-radius: 12px; }
.mv-card h3 { font-size: 1.3rem; letter-spacing: -0.02em; }
.mv-card p { font-size: 0.92rem; line-height: 1.8; }
.training-card {
    padding: 2rem 1.5rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}
.training-card:hover { transform: translateY(-5px); border-color: rgba(69,134,181,0.28); box-shadow: var(--shadow-md); }
.training-icon {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    margin: 0 auto 1.25rem;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--primary-soft), var(--secondary-soft));
    font-size: 1.65rem;
}
.training-card h4 { font-size: 1rem; }
.training-card p { font-size: 0.82rem; line-height: 1.7; }
.method-card {
    padding: 1.4rem;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    box-shadow: none;
}
.method-card:hover { transform: translateY(-3px); border-color: rgba(69,134,181,0.28); box-shadow: var(--shadow-sm); }
.method-card .icon { width: 46px; height: 46px; border-radius: 10px; }
.method-card h5 { font-size: 0.94rem; }
.method-card p { font-size: 0.8rem; }
.hero ~ .stats-section ~ .section .col-lg-6 > div[style*="background: linear-gradient"] {
    border: 1px solid rgba(255,255,255,0.1) !important;
    border-radius: var(--radius-lg) !important;
    background:
        radial-gradient(circle at 80% 15%, rgba(93,41,115,0.42), transparent 38%),
        linear-gradient(145deg, #121d34, #1d405b) !important;
    box-shadow: var(--shadow-md);
}
body > .section[style*="background: linear-gradient"] {
    margin: 0;
    background:
        radial-gradient(circle at 18% 50%, rgba(69,134,181,0.22), transparent 28%),
        linear-gradient(115deg, #121d34, #361d43) !important;
}
body > .section[style*="background: linear-gradient"] h2 { font-size: clamp(2rem, 5vw, 3.25rem) !important; letter-spacing: -0.045em; }
body > .section[style*="background: linear-gradient"] .btn-light { border-radius: 10px !important; font-size: 0.9rem; }

/* Adaptación */
@media (max-width: 991px) {
    .hero-carousel, .hero-slide { min-height: 570px; }
    .hero-slide-content { padding: 4.5rem 0 5.5rem; }
    .hero-slide h1 { max-width: 680px; }
    .courses-section, .section { padding: 3rem 0; }
    .benefits-sidebar { position: static; }
}
@media (max-width: 767px) {
    .hero-carousel, .hero-slide { min-height: 540px; }
    .hero-slide-content { padding: 3.5rem 0 5.5rem; }
    .hero-slide h1 { font-size: clamp(2rem, 10vw, 2.75rem); }
    .hero-slide-desc { font-size: 0.95rem; }
    .hero-slide-meta-item { padding: 0.38rem 0.55rem; font-size: 0.7rem; }
    .hero-slide-price { font-size: 1.5rem; }
    .courses-section { padding: 2.5rem 0; }
    .section-header { margin-bottom: 2.5rem; }
    .course-image { aspect-ratio: 1 / 1; }
    .page-hero { min-height: 330px; padding: 7.75rem 0 7rem; }
    .page-hero h1 i { width: 40px; height: 40px; font-size: 1.1rem; vertical-align: 0.25rem; }
    .login-section, .register-section { margin-top: -4.5rem; padding-bottom: 4.5rem; }
    .login-body, .register-form { padding: 1.5rem; }
    .login-card, .register-card { border-radius: 16px; }
    .benefits-sidebar { padding: 1.5rem; }
    .hero:not(.hero-carousel) { min-height: 500px; padding: 105px 0 80px; }
    .stats-section { margin-top: -34px; }
    .stat-card { padding: 1.4rem 1rem; }
    .section { padding: 4rem 0; }
    .mv-card { padding: 1.75rem; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* Portada: agenda de cursos en vivo */
.home-live-section {
    position: relative;
    overflow: hidden;
    padding: 3.5rem 0;
    border-bottom: 1px solid var(--gray-200);
    background:
        radial-gradient(circle at 8% 4%, rgba(69,134,181,0.10), transparent 26%),
        radial-gradient(circle at 94% 18%, rgba(93,41,115,0.08), transparent 24%),
        #f7f9fc;
}
.home-live-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: min(1200px, 92%);
    height: 1px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, rgba(69,134,181,0.28), rgba(93,41,115,0.22), transparent);
}
.home-section-heading {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    margin-bottom: 2rem;
}
.home-section-heading .section-title { margin-top: 0.95rem; }
.home-section-heading .section-subtitle { max-width: 680px; margin: 0; }
.home-section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.46rem 0.72rem;
    border: 1px solid rgba(69,134,181,0.16);
    border-radius: 8px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: 0.7rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
}
.home-section-kicker--live {
    border-color: rgba(239,68,68,0.16);
    background: #fff1f2;
    color: #be123c;
}
.live-pulse {
    display: inline-block;
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 0 4px rgba(239,68,68,0.10);
    animation: homeLivePulse 1.8s ease-in-out infinite;
}
@keyframes homeLivePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}
.home-section-link {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    border: 1.5px solid var(--primary);
    border-radius: 50px;
    background: transparent;
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: 0.01em;
    box-shadow: none;
    transition: background 0.2s, color 0.2s, transform 0.2s;
    margin-top: 0.75rem;
    margin-bottom: 0.25rem;
}
.home-section-link:hover { background: var(--primary); color: #fff; transform: translateY(-1px); }
.home-section-link i { font-size: 0.82rem; transition: transform 0.2s; }
.home-section-link:hover i { transform: translate(2px, -2px); }
.home-live-card {
    display: flex;
    height: 100%;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--gray-200);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.home-live-card:hover {
    transform: translateY(-6px);
    border-color: rgba(69,134,181,0.3);
    box-shadow: var(--shadow-md);
}
.home-live-media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: url('/assets/bg.webp') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.home-live-media .home-live-img-title {
    margin: 0;
    font-family: 'Bebas Neue', 'Plus Jakarta Sans', sans-serif;
    font-weight: 400;
    color: #fff;
    line-height: 1.05;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
    word-break: break-word;
    position: relative;
    z-index: 1;
}
.home-live-img-title.title-short { font-size: 2.2rem; }
.home-live-img-title.title-medium { font-size: 1.6rem; }
.home-live-img-title.title-long { font-size: 1.2rem; }
.home-live-label {
    position: absolute;
    z-index: 2;
    top: 0.85rem;
    left: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.42rem 0.62rem;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 8px;
    background: rgba(15,23,42,0.72);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 750;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
}
.home-live-label .live-pulse { width: 6px; height: 6px; box-shadow: none; }
.home-live-date {
    position: absolute;
    z-index: 2;
    right: 0.85rem;
    bottom: 0.85rem;
    display: flex;
    width: 58px;
    height: 62px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 11px;
    background: rgba(255,255,255,0.94);
    color: var(--dark);
    line-height: 1;
    box-shadow: 0 10px 24px rgba(15,23,42,0.18);
    backdrop-filter: blur(10px);
}
.home-live-date strong { margin-bottom: 0.28rem; font-size: 1.35rem; letter-spacing: -0.05em; }
.home-live-date span { color: var(--gray-600); font-size: 0.61rem; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; }
.home-live-body { display: flex; flex: 1; flex-direction: column; padding: 1.4rem 1.4rem 1.15rem; }
.home-live-card-name {
    margin: 0 0 0.5rem;
    font-size: 0.82rem;
    font-weight: 750;
    color: var(--dark);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.35;
}
.home-live-topic {
    margin-bottom: 0.55rem;
    color: var(--primary-dark);
    font-size: 0.67rem;
    font-weight: 750;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}
.home-live-body h3 {
    display: -webkit-box;
    overflow: hidden;
    margin-bottom: 0.65rem;
    color: var(--dark);
    font-size: 1.08rem;
    font-weight: 750;
    line-height: 1.4;
    letter-spacing: -0.018em;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.home-live-body > p {
    display: -webkit-box;
    overflow: hidden;
    margin-bottom: 1.15rem;
    color: var(--gray-600);
    font-size: 0.79rem;
    line-height: 1.7;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.home-live-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    margin-top: auto;
}
.home-live-details span {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 0.42rem;
    overflow: hidden;
    padding: 0.48rem 0.55rem;
    border-radius: 7px;
    background: var(--gray-50);
    color: var(--gray-600);
    font-size: 0.67rem;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.home-live-details i { flex: 0 0 auto; color: var(--primary); font-size: 0.75rem; }
.home-live-details .is-sold-out { background: #fff1f2; color: #be123c; }
.home-live-details .is-sold-out i { color: #e11d48; }
.home-live-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.4rem 1.25rem;
    border-top: 1px solid var(--gray-100);
}
.home-live-price { display: flex; min-width: 0; flex-direction: column; }
.home-live-price small { margin-bottom: 0.18rem; color: var(--gray-400); font-size: 0.59rem; font-weight: 650; letter-spacing: 0.07em; text-transform: uppercase; }
.home-live-price strong { color: var(--dark); font-size: 1rem; font-weight: 800; letter-spacing: -0.025em; white-space: nowrap; }
.home-live-price strong span { color: var(--gray-400); font-size: 0.59rem; font-weight: 600; letter-spacing: 0; }
.home-live-price strong.is-free { color: #059669; }
.btn-home-live, .btn-home-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border-radius: 9px;
    font-size: 0.72rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-home-live { padding: 0.68rem 0.8rem; background: var(--dark); color: #fff; }
.btn-home-live:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(69,134,181,0.2); }
.home-live-empty {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 2rem;
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.home-live-empty-icon { display: grid; width: 54px; height: 54px; flex: 0 0 auto; place-items: center; border-radius: 13px; background: var(--primary-soft); color: var(--primary); font-size: 1.35rem; }
.home-live-empty h3 { margin-bottom: 0.3rem; color: var(--dark); font-size: 1rem; font-weight: 750; }
.home-live-empty p { margin: 0; color: var(--gray-600); font-size: 0.82rem; }
.btn-home-outline { margin-left: auto; padding: 0.72rem 0.9rem; border: 1px solid var(--gray-200); color: var(--primary-dark); }
.btn-home-outline:hover { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); }
.courses-section--async { background: #fff; }
.home-section-heading--async { margin-bottom: 2rem; }

@media (max-width: 991px) {
    .home-live-section { padding: 3rem 0; }
    .home-section-heading { align-items: flex-start; }
}
@media (max-width: 767px) {
    .home-live-section { padding: 2.5rem 0; }
    .home-section-heading { flex-direction: column; gap: 1.25rem; margin-bottom: 2.35rem; }
    .home-section-heading .section-title { margin-top: 0.75rem; }
    .home-section-link { width: auto; }
    .home-live-details { grid-template-columns: 1fr; }
    .home-live-empty { align-items: flex-start; flex-wrap: wrap; padding: 1.4rem; }
    .home-live-empty > div:nth-child(2) { flex: 1; }
    .btn-home-outline { width: 100%; margin-left: 0; }
    .home-live-footer { padding-inline: 1.2rem; }
}

/* Sistema compartido: catálogo, soporte y páginas legales */
body { overflow-x: hidden; }
button, textarea { -webkit-tap-highlight-color: transparent; }
textarea:focus-visible { outline: 3px solid rgba(69,134,181,0.3); outline-offset: 3px; }

/* Cabeceras interiores coherentes con la marca */
.hero-vivo, .master-hero, body > .page-hero {
    position: relative;
    isolation: isolate;
    min-height: 390px;
    padding: 9rem 0 5rem;
    overflow: hidden;
    background:
        radial-gradient(circle at 16% 8%, rgba(69,134,181,0.34), transparent 32%),
        radial-gradient(circle at 86% 28%, rgba(93,41,115,0.3), transparent 29%),
        linear-gradient(120deg,#111c32 0%,#19334d 54%,#44204f 100%);
    color: #fff;
}
.hero-vivo::before, .master-hero::before, body > .page-hero::before { z-index: -1; opacity: 0.22; }
.hero-vivo h1, .master-hero h1, body > .page-hero h1 { margin-bottom: 0.85rem; font-size: clamp(2.1rem,5vw,3.45rem); line-height: 1.08; letter-spacing: -0.045em; }
.hero-vivo p, .master-hero p, body > .page-hero p { color: rgba(255,255,255,0.73); font-size: 1rem; line-height: 1.75; }
.hero-vivo .live-badge, .master-hero-badge { padding: 0.48rem 0.8rem; border-radius: 8px; font-size: 0.7rem; letter-spacing: 0.08em; }
.master-hero .hero-features { gap: 0.65rem; flex-wrap: wrap; }
.master-hero .hero-feature { padding: 0.5rem 0.72rem; border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; background: rgba(255,255,255,0.055); font-size: 0.76rem; }
.master-hero .hero-feature i { color: #9ec8e3; }

/* Cursos en vivo */
.hero-vivo + section { padding: 5.5rem 0 !important; background: #f7f9fc; }
.hero-vivo + section .section-title { color: var(--dark); font-size: clamp(1.55rem,3vw,2rem); letter-spacing: -0.025em; }
.hero-vivo + section .section-subtitle { color: var(--gray-600); }
.vivo-card { overflow: hidden; border: 1px solid var(--gray-200); border-radius: 17px; box-shadow: var(--shadow-sm); }
.vivo-card:hover { transform: translateY(-5px); border-color: rgba(69,134,181,0.3); box-shadow: var(--shadow-md); }
.vivo-card-img { height: auto; aspect-ratio: 1 / 1; background: linear-gradient(135deg,#14233d,#254f6c 58%,#512b61); }
.vivo-card-img::after { content: ''; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent,rgba(15,23,42,0.42)); pointer-events: none; }
.vivo-card-img .date-chip { z-index: 1; border: 1px solid rgba(255,255,255,0.16); border-radius: 9px; background: rgba(15,23,42,0.76); font-size: 0.68rem; }
.vivo-card-body { padding: 1.35rem; }
.vivo-card-body h5 { color: var(--dark); font-size: 1.05rem; line-height: 1.45; }
.vivo-card-body .tema { color: var(--primary-dark); font-size: 0.7rem; letter-spacing: 0.04em; text-transform: uppercase; }
.vivo-card-body .meta { color: var(--gray-600); line-height: 1.65; }
.vivo-card-body .meta i { color: var(--primary); }
.vivo-card-footer { gap: 1rem; padding: 1rem 1.35rem 1.2rem; border-color: var(--gray-200); }
.vivo-price { color: var(--dark); font-size: 1.1rem; }
.btn-vivo { min-height: 42px; justify-content: center; padding: 0.6rem 0.9rem; border-radius: 9px; background: var(--primary); font-size: 0.76rem; box-shadow: none; }
.btn-vivo:hover { background: var(--primary-dark); box-shadow: none; }

/* Programas Master */
.masters-grid { grid-template-columns: repeat(auto-fill,minmax(340px,1fr)); gap: 1.5rem; padding: 5rem 0; }
.master-card { border: 1px solid var(--gray-200); border-radius: 18px; box-shadow: var(--shadow-sm); }
.master-card:hover { transform: translateY(-5px); border-color: rgba(93,41,115,0.24); box-shadow: var(--shadow-md); }
.master-card-img { height: auto; aspect-ratio: 1 / 1; background: linear-gradient(135deg,#14233d,#254f6c 55%,#512b61); }
.master-card-img::after { content: ''; position: absolute; inset: 50% 0 0; background: linear-gradient(transparent,rgba(15,23,42,0.4)); pointer-events: none; }
.master-card-img > span { z-index: 1; }
.master-card-badge { border-radius: 8px; font-size: 0.64rem; letter-spacing: 0.07em; }
.master-card-body { padding: 1.5rem; }
.master-card-title { color: var(--dark); font-size: 1.17rem; line-height: 1.4; letter-spacing: -0.018em; }
.master-card-desc { color: var(--gray-600); font-size: 0.84rem; line-height: 1.7; }
.master-card-meta { border-color: var(--gray-200); }
.master-card-sesion-next, .countdown-box { border-radius: 10px; }
.master-card-footer { gap: 1rem; }
.master-price { color: var(--dark); font-size: 1.25rem; }
.btn-master { min-height: 44px; justify-content: center; padding: 0.65rem 0.9rem; border-radius: 9px; background: var(--primary); font-size: 0.76rem; box-shadow: none; }
.btn-master:hover { background: var(--primary-dark); box-shadow: none; }

/* Centro de ayuda */
.help-section { padding: 5rem 0 6rem; background: #f7f9fc; }
.search-box { max-width: 580px; }
.search-box input { min-height: 56px; padding: 0.9rem 1.2rem 0.9rem 3.2rem; border: 1px solid rgba(255,255,255,0.2); border-radius: 12px; box-shadow: 0 18px 45px rgba(0,0,0,0.18); }
.search-box input:focus { box-shadow: 0 0 0 4px rgba(255,255,255,0.15),0 18px 45px rgba(0,0,0,0.18); }
.help-card { padding: 1.75rem; border: 1px solid var(--gray-200); border-radius: 16px; box-shadow: var(--shadow-sm); transition: transform 0.25s ease,box-shadow 0.25s ease,border-color 0.25s ease; }
.help-card::before { height: 3px; }
.help-card:hover { transform: translateY(-4px); border-color: rgba(69,134,181,0.25); box-shadow: var(--shadow-md); }
.help-icon { width: 52px; height: 52px; margin-bottom: 1.25rem; border-radius: 12px; }
.help-card h4 { color: var(--dark); font-size: 1.05rem; }
.help-card p { color: var(--gray-600); font-size: 0.86rem; }
.help-card a { color: var(--primary-dark); font-size: 0.8rem; }
.contact-box { height: 100%; padding: 3rem 2rem; border: 1px solid rgba(255,255,255,0.08); border-radius: 18px; background: radial-gradient(circle at 88% 10%,rgba(93,41,115,0.45),transparent 35%),linear-gradient(145deg,#121d34,#1b405a); box-shadow: var(--shadow-md); }
.contact-box h3 { font-size: 1.55rem; }
.contact-box p { color: rgba(255,255,255,0.7); font-size: 0.95rem; }
.contact-btn { min-height: 48px; padding: 0.75rem 1.15rem; border-radius: 10px; font-size: 0.8rem; }
.contact-btn.email { border-width: 1px; }
.quick-links { height: 100%; margin-top: 0; padding: 1.5rem; border: 1px solid var(--gray-200); border-radius: 16px; box-shadow: var(--shadow-sm); }
.quick-link-item { min-height: 48px; padding: 0.7rem 0.8rem; border-radius: 9px; font-size: 0.82rem; }

/* Preguntas frecuentes */
.faq-section, .content-section { padding: 5rem 0 6rem; background: #f7f9fc; }
.faq-container, .content-card { border: 1px solid var(--gray-200); border-radius: 18px; box-shadow: var(--shadow-md); }
.faq-container { padding: 2.25rem; }
.faq-nav { gap: 0.55rem; margin-bottom: 2rem; padding-bottom: 1.5rem; }
.faq-nav-btn { min-height: 42px; padding: 0.65rem 0.85rem; border: 1px solid var(--gray-200); border-radius: 9px; background: var(--gray-50); font-size: 0.76rem; }
.faq-nav-btn:hover, .faq-nav-btn.active { border-color: transparent; background: var(--primary); }
.faq-category-title { color: var(--dark); font-size: 1.18rem; }
.faq-category-title i { width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(135deg,var(--primary),var(--secondary)); }
.accordion-item { border-radius: 12px !important; box-shadow: none; }
.accordion-button { min-height: 58px; padding: 1rem 1.15rem; font-size: 0.88rem; line-height: 1.5; }
.accordion-button:not(.collapsed) { background: var(--primary-soft); color: var(--primary-dark); }
.accordion-body { padding: 1.15rem; background: #fbfdff; color: var(--gray-600); font-size: 0.84rem; }
.help-cta { padding: 2.25rem 1.5rem; border: 1px solid var(--gray-200); border-radius: 14px; background: var(--gray-50); }
.help-cta-btn { min-height: 48px; padding: 0.75rem 1.15rem; border-radius: 10px; background: linear-gradient(110deg,var(--primary),var(--secondary)); font-size: 0.82rem; }

/* Textos legales */
.content-card { padding: clamp(1.5rem,4vw,3rem); }
.last-update { border: 1px solid var(--gray-200); border-radius: 9px; background: var(--gray-50); font-size: 0.78rem; }
.section-block { padding-bottom: 2rem; border-bottom: 1px solid var(--gray-100); }
.section-block:last-child { padding-bottom: 0; border-bottom: 0; }
.section-block h2 { color: var(--dark); font-size: 1.15rem; letter-spacing: -0.015em; }
.section-block h2 i { width: 34px; height: 34px; border-radius: 9px; background: var(--primary); font-size: 0.88rem; }
.section-block p, .section-block li { color: var(--gray-600); font-size: 0.88rem; line-height: 1.85; }

/* Uso correcto del isotipo cuadrado en acceso */
.login-logo img { width: 76px; max-width: 76px; height: 76px; border-radius: 18px; object-fit: cover; box-shadow: 0 12px 28px rgba(15,23,42,0.12); }

@media (max-width: 991px) {
    .hero-vivo, .master-hero, body > .page-hero { min-height: 350px; padding: 7.5rem 0 4.5rem; }
    .hero-vivo + section, .help-section, .faq-section, .content-section { padding: 4.5rem 0 5rem !important; }
    .masters-grid { padding: 4.5rem 0; }
    .quick-links { margin-top: 1.25rem; }
}
@media (max-width: 767px) {
    .hero-vivo, .master-hero, body > .page-hero { min-height: 320px; padding: 7rem 0 4rem; text-align: left; }
    .hero-vivo h1, .master-hero h1, body > .page-hero h1 { font-size: clamp(1.85rem,9vw,2.5rem); }
    .hero-vivo p, .master-hero p, body > .page-hero p { font-size: 0.9rem; }
    .master-hero { text-align: center; }
    .master-hero .hero-features { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0.5rem; }
    .master-hero .hero-feature { justify-content: center; min-width: 0; font-size: 0.68rem; }
    .hero-vivo + section, .help-section, .faq-section, .content-section { padding: 3.75rem 0 4.5rem !important; margin-top: 0; }
    .masters-grid { grid-template-columns: minmax(0,1fr); gap: 1rem; padding: 3.75rem 0; }
    .vivo-card-footer, .master-card-footer { align-items: stretch; flex-direction: column; }
    .btn-vivo, .btn-master { width: 100%; }
    .faq-container { padding: 1rem; border-radius: 15px; }
    .faq-nav { flex-wrap: nowrap; overflow-x: auto; margin-inline: -1rem; padding: 0 1rem 1rem; scrollbar-width: thin; }
    .faq-nav-btn { flex: 0 0 auto; }
    .faq-category-title { align-items: flex-start; font-size: 1.03rem; }
    .accordion-button { padding: 0.9rem 1rem; font-size: 0.82rem; }
    .contact-box { padding: 2.25rem 1.25rem; }
    .contact-buttons, .contact-btn { width: 100%; }
    .contact-btn { justify-content: center; }
    .content-card { border-radius: 15px; }
    .section-block h2 { align-items: flex-start; font-size: 1.02rem; }
}
@media (max-width: 420px) {
    .hero-vivo .container, .master-hero .container, body > .page-hero .container { padding-inline: 1.15rem; }
    .master-hero .hero-features { grid-template-columns: 1fr; }
}


/* Portada: acabado editorial y jerarquía visual */
body:has(.hero-carousel) .hero-carousel { box-shadow: inset 0 -1px 0 rgba(255,255,255,.12); }
body:has(.hero-carousel) .hero-slide img { filter: saturate(1.03) contrast(1.02); }
body:has(.hero-carousel) .clientes-carousel { mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
body:has(.hero-carousel) .clientes-carousel-item { width: clamp(115px, 13vw, 155px); }
body:has(.hero-carousel) .section-header,
body:has(.hero-carousel) .home-section-heading { position: relative; }
body:has(.hero-carousel) .section-header::before,
body:has(.hero-carousel) .home-section-heading::before { content:''; display:block; width:44px; height:3px; margin-bottom:1rem; border-radius:99px; background:linear-gradient(90deg,var(--primary),var(--secondary)); }
body:has(.hero-carousel) .home-grupal-section,
body:has(.hero-carousel) .home-custom-section { position:relative; overflow:hidden; }
body:has(.hero-carousel) .home-grupal-section::before { content:''; position:absolute; width:420px; height:420px; top:-260px; right:-110px; border-radius:50%; background:rgba(124,58,237,.08); filter:blur(2px); }
body:has(.hero-carousel) .home-custom-banner { border:1px solid rgba(255,255,255,.13); box-shadow:0 22px 55px rgba(15,23,42,.16); }
body:has(.hero-carousel) .course-card,
body:has(.hero-carousel) .home-grupal-card,
body:has(.hero-carousel) .master-home-card,
body:has(.hero-carousel) .home-live-card { overflow:hidden; }
@media (max-width:767px) {
  body:has(.hero-carousel) .section-header::before,
  body:has(.hero-carousel) .home-section-heading::before { margin-bottom:.75rem; }
}


/* Portada: encabezados de catálogo integrados */
body:has(.hero-carousel) .section-intro,
body:has(.hero-carousel) .section-header,
body:has(.hero-carousel) .home-section-heading {
    max-width: 790px;
    margin-bottom: 2.35rem;
}
body:has(.hero-carousel) .section-intro--center,
body:has(.hero-carousel) .section-header.text-center {
    margin-right: auto;
    margin-left: auto;
    text-align: center;
}
body:has(.hero-carousel) .section-intro--center .section-badge,
body:has(.hero-carousel) .section-header.text-center .home-section-kicker {
    justify-content: center;
}
body:has(.hero-carousel) .section-intro .section-title,
body:has(.hero-carousel) .section-header .section-title,
body:has(.hero-carousel) .home-section-heading .section-title {
    margin-top: .9rem;
    margin-bottom: .55rem;
}
body:has(.hero-carousel) .section-intro .section-subtitle,
body:has(.hero-carousel) .section-header .section-subtitle,
body:has(.hero-carousel) .home-section-heading .section-subtitle {
    max-width: 660px;
    margin: 0;
}
body:has(.hero-carousel) .section-intro--center .section-subtitle,
body:has(.hero-carousel) .section-header.text-center .section-subtitle { margin-right: auto; margin-left: auto; }
body:has(.hero-carousel) .section-intro .home-section-link,
body:has(.hero-carousel) .section-header .home-section-link,
body:has(.hero-carousel) .home-section-heading .home-section-link {
    margin-top: 1.15rem !important;
    margin-bottom: 0;
}
body:has(.hero-carousel) .section-intro--center::before,
body:has(.hero-carousel) .section-header.text-center::before {
    margin-right: auto;
    margin-left: auto;
}
body:has(.hero-carousel) #cursos-destacados .course-badge .bi-star-fill { color: var(--primary) !important; }
@media (max-width: 767px) {
    body:has(.hero-carousel) .section-intro,
    body:has(.hero-carousel) .section-header,
    body:has(.hero-carousel) .home-section-heading { margin-bottom: 1.8rem; }
}


/* Portada: claridad de modalidades y lectura móvil */
body:has(.hero-carousel) #cursos-247,
body:has(.hero-carousel) #cursos-en-vivo-heading { position: relative; overflow: hidden; }
body:has(.hero-carousel) #cursos-247::after,
body:has(.hero-carousel) #cursos-en-vivo-heading::after { position:absolute; inset:auto 8% 0; height:1px; background:linear-gradient(90deg,transparent,rgba(69,134,181,.26),transparent); content:''; }
body:has(.hero-carousel) #cursos-en-vivo-heading::after { background:linear-gradient(90deg,transparent,rgba(220,38,38,.22),transparent); }
body:has(.hero-carousel) .section-intro .section-badge { display:inline-flex; align-items:center; justify-content:center; max-width:100%; line-height:1.35; }
body:has(.hero-carousel) .course-card-name,
body:has(.hero-carousel) .home-live-card-name,
body:has(.hero-carousel) .home-grupal-card-name,
body:has(.hero-carousel) .hcp-card-title { font-size:.92rem; text-transform:none; letter-spacing:-.01em; }
body:has(.hero-carousel) .course-description { -webkit-line-clamp:2; }
@media (max-width:767px) {
    body:has(.hero-carousel) .course-image,
    body:has(.hero-carousel) .home-live-media,
    body:has(.hero-carousel) .home-grupal-card-img,
    body:has(.hero-carousel) .master-home-card-img,
    body:has(.hero-carousel) .hcp-card-img,
    body:has(.hero-carousel) .hcp-card-img-ph { aspect-ratio:4/3; }
    body:has(.hero-carousel) .section-intro .section-badge { font-size:.65rem; }
    body:has(.hero-carousel) .section-intro .home-section-link { width:100%; min-height:46px; justify-content:center; white-space:normal; text-align:center; }
    body:has(.hero-carousel) .home-live-details { grid-template-columns:repeat(2,minmax(0,1fr)); }
    body:has(.hero-carousel) .home-live-details span { min-width:0; }
    body:has(.hero-carousel) .home-live-footer { gap:.75rem; padding:1rem; }
    body:has(.hero-carousel) .home-live-body { padding:1.1rem 1rem .9rem; }
    body:has(.hero-carousel) .home-custom-btn { width:100%; min-height:46px; justify-content:center; }
}
@media (max-width:420px) {
    body:has(.hero-carousel) .home-live-details { grid-template-columns:1fr; }
}
