/*
 * Estilos de app.leandrovaldes.com
 * Basado en el diseno de leandrovaldes.com
 * Fondo oscuro, minimalista, sin distracciones
 * Actualizado: 12 abril 2026
 */

@font-face {
    font-family: 'Anton';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/anton.ttf') format('truetype');
}

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    /* Paleta — sin cambios respecto a versión anterior */
    --bg: #312E2B;
    --bg-dark: #1a1815;
    --bg-card: #3d3935;
    --text: #ffffff;
    --text-muted: #a0998f;
    --accent: rgba(255, 141, 0, 0.91);
    --accent-hover: #FF8D00;
    --success: #4CAF50;
    --border: #4a4540;

    /* 2026-05-06: spacings fluidos. Escalan con el viewport.
       Reemplazan los px fijos en padding/margin/gap. Pensados para que
       el sitio sea consistente desde mobile vertical (320px) hasta 4K. */
    --space-xs:  clamp(0.25rem, 0.4vw, 0.4rem);    /* ~4-6px */
    --space-sm:  clamp(0.5rem,  0.6vw, 0.75rem);   /* ~8-12px */
    --space-md:  clamp(0.75rem, 0.9vw, 1.1rem);    /* ~12-18px */
    --space-lg:  clamp(1rem,    1.4vw, 1.6rem);    /* ~16-26px */
    --space-xl:  clamp(1.5rem,  2.2vw, 2.5rem);    /* ~24-40px */
    --space-2xl: clamp(2rem,    3vw,   3.5rem);    /* ~32-56px */
    --space-3xl: clamp(3rem,    4.5vw, 5rem);      /* ~48-80px */

    /* Border radius escalado */
    --radius-sm: 0.2rem;
    --radius-md: 0.4rem;
    --radius-lg: 0.6rem;
    --radius-pill: 999px;

    /* Constraints */
    --max-content: 1600px;          /* ancho máximo de container principal */
    --max-text:    70ch;            /* línea de texto legible */
    --min-touch:   2.75rem;         /* altura mínima de botones/inputs (~44px en root 16px) */
}

/* Tipografía base fluida — el font-size del root escala con viewport.
   15px en pantallas chicas (mobile) hasta 19px en 4K. Todo el sitio
   hereda via rem. Un solo ajuste para consistencia entre resoluciones. */
html {
    font-size: clamp(15px, 0.85vw + 8px, 19px);
}

body {
    font-family: Verdana, sans-serif;
    /* 1rem hereda del :root (clamp 15-19px según viewport). */
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

/* Headings con escala fluida. Anton para los grandes, hereda font-family
   donde se aplique. Los tamaños se ajustan al viewport. */
h1 { font-size: clamp(1.6rem, 3vw,   2.4rem); line-height: 1.15; }
h2 { font-size: clamp(1.3rem, 2.2vw, 1.8rem); line-height: 1.2; }
h3 { font-size: clamp(1.1rem, 1.6vw, 1.4rem); line-height: 1.25; }
h4 { font-size: clamp(1rem,   1.2vw, 1.2rem); line-height: 1.3; }

small, .meta {
    font-size: clamp(0.78rem, 0.85vw, 0.9rem);
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* Layout */
.app {
    display: flex;
    min-height: 100vh;
}

/* Sidebar — colapsable tipo Facebook */
.sidebar {
    width: clamp(50px, 4vw + 30px, 70px);
    background: var(--bg-dark);
    padding: var(--space-md) 0;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow: hidden;
    border-right: 1px solid var(--border);
    transition: width 0.2s ease;
    z-index: 100;
}

.sidebar:hover {
    width: clamp(180px, 16vw, 240px);
}

.sidebar-nav {
    list-style: none;
    padding: var(--space-sm) 0;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    color: var(--text-muted);
    transition: all 0.2s;
    white-space: nowrap;
}

.sidebar-nav li a .icon {
    min-width: 1.5rem;
    text-align: center;
    font-size: 1.4em;
    font-weight: bold;
}

.sidebar-nav li a .label {
    margin-left: var(--space-sm);
    opacity: 0;
    transition: opacity 0.2s;
}

.sidebar:hover .sidebar-nav li a .label {
    opacity: 1;
}

.sidebar-nav li a:hover,
.sidebar-nav li a.active {
    color: var(--text);
    background: var(--bg-card);
    border-left: 3px solid var(--accent);
}

.sidebar-nav .nav-separator {
    border-top: 1px solid var(--border);
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
}

.sidebar-user {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-sm) var(--space-md);
    border-top: 1px solid var(--border);
    font-size: 0.85em;
    color: var(--text-muted);
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.sidebar-user .icon {
    min-width: 1.5rem;
    text-align: center;
}

.sidebar-user .label {
    margin-left: var(--space-sm);
    opacity: 0;
    transition: opacity 0.2s;
}

.sidebar:hover .sidebar-user .label {
    opacity: 1;
}

.sidebar-user a { color: var(--text-muted); }
.sidebar-user a:hover { color: var(--text); }

/* Main content — centrado, proporcional, estilo marketing directo */
.main {
    flex: 1;
    margin-left: clamp(50px, 4vw + 30px, 70px);
    padding: var(--space-xl) 5%;
    max-width: 100%;
    transition: margin-left 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.main-inner {
    width: 100%;
    max-width: 80%;
}

.main h1 {
    font-family: 'Anton', sans-serif;
    font-size: 4em;
    font-weight: 400;
    margin-bottom: var(--space-md);
    line-height: 1.1;
    text-transform: uppercase;
    text-align: center;
}

.main h2 {
    font-size: 1.2em;
    font-weight: normal;
    color: var(--text-muted);
    margin-bottom: var(--space-xl);
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
    border: 1px solid var(--border);
    transition: border-color 0.2s;
}

.card:hover { border-color: var(--accent); }

.card-title {
    font-size: 1.1em;
    margin-bottom: var(--space-sm);
}

.card-meta {
    font-size: 0.85em;
    color: var(--text-muted);
}

/* Botones */
.btn {
    display: inline-block;
    padding: var(--space-sm) var(--space-lg);
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1em;
    transition: background 0.2s;
}

.btn:hover { background: var(--accent-hover); color: white; }

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--text);
}

/* Login */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: var(--space-lg);
}

.login-box {
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    font-family: 'Anton', sans-serif;
    font-size: 2em;
    margin-bottom: var(--space-xl);
    text-align: center;
}

.form-group {
    margin-bottom: var(--space-lg);
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-muted);
    font-size: 0.9em;
}

.form-group input {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 1em;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
}

.error-msg {
    background: rgba(255,0,0,0.1);
    border: 1px solid rgba(255,0,0,0.3);
    color: #ff6b6b;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-lg);
    font-size: 0.9em;
}

/* Progress */
.progress-bar {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin-top: var(--space-sm);
}

.progress-bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.3s;
}

/* Video container */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    margin-bottom: var(--space-lg);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Badge tier */
.badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-lg);
    font-size: 0.75em;
    font-weight: bold;
    text-transform: uppercase;
}

.badge-tier1 { background: var(--accent); }
.badge-tier2 { background: #9b59b6; }
.badge-tier3 { background: #f39c12; }

/* Admin — estilo tipo WordPress dashboard */
.admin-view {
    background: #f0f0f1;
}

.admin-view .sidebar {
    background: #1d2327;
    border-right: none;
}

.admin-view .sidebar-logo {
    color: #fff;
    border-bottom-color: #2c3338;
}

.admin-view .sidebar-nav li a {
    color: #a7aaad;
}

.admin-view .sidebar-nav li a:hover,
.admin-view .sidebar-nav li a.active {
    color: #fff;
    background: #2271b1;
    border-left-color: #72aee6;
}

.admin-view .sidebar-user {
    border-top-color: #2c3338;
    color: #a7aaad;
}

.admin-view .main {
    color: #1d2327;
    align-items: flex-start;
}

.admin-view .main-inner {
    max-width: 100%;
}

.admin-view .main h1 {
    color: #1d2327;
    text-align: left;
    font-size: 2em;
}

.admin-view .main h2 {
    color: #646970;
}

.admin-view .card {
    background: #ffffff;
    border-color: #c3c4c7;
    color: #1d2327;
}

.admin-view .card:hover {
    border-color: #2271b1;
}

.admin-view .card-meta {
    color: #646970;
}

.admin-view .btn {
    background: #2271b1;
}

.admin-view .btn:hover {
    background: #135e96;
}

.admin-view .btn-outline {
    background: #fff;
    border-color: #c3c4c7;
    color: #1d2327;
}

.admin-view .btn-outline:hover {
    border-color: #2271b1;
    color: #2271b1;
}

.admin-view .form-group input,
.admin-view .form-group select,
.admin-view .form-group textarea {
    background: #fff;
    border-color: #8c8f94;
    color: #1d2327;
}

.admin-view .form-group input:focus,
.admin-view .form-group select:focus,
.admin-view .form-group textarea:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.admin-view .form-group label {
    color: #1d2327;
}

.admin-view table tr {
    border-bottom-color: #c3c4c7 !important;
}

.admin-view table th {
    color: #1d2327 !important;
}

.admin-view table td {
    color: #1d2327;
}

.admin-view .error-msg {
    background: #fcf0f1;
    border-color: #d63638;
    color: #d63638;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    .main {
        margin-left: 0;
        padding: var(--space-3xl) var(--space-md) var(--space-lg); /* 66 = 12 top + 44 btn + 10 gap */
    }
    .mobile-menu-btn {
        display: inline-flex !important;
    }
    .sidebar.mobile-open {
        display: block;
        width: clamp(200px, 18vw, 260px);
    }
    /* En mobile las labels deben ser visibles siempre que la sidebar esté abierta
       (no hay hover en touch). */
    .sidebar.mobile-open .sidebar-nav li a .label,
    .sidebar.mobile-open .sidebar-user .label {
        opacity: 1;
    }
    /* Backdrop cuando la sidebar está abierta */
    .sidebar.mobile-open::after {
        content: '';
        position: fixed;
        top: 0; left: 240px; right: 0; bottom: 0;
        background: rgba(0,0,0,.6);
        z-index: -1;
    }
    /* Course sidebar — mismo tratamiento que la principal */
    .course-main { padding-top: var(--space-3xl); }
    .course-mobile-menu { display: inline-flex !important; }
}
.mobile-menu-btn,
.course-mobile-menu {
    display: none;
    position: fixed;
    top: var(--space-sm);
    left: var(--space-sm);
    z-index: 999;
    background: rgba(255,141,0,.91);
    border: 0;
    color: #000;
    padding: 0;
    width: var(--min-touch);
    height: 44px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background .12s;
}
.mobile-menu-btn:hover,
.mobile-menu-btn:active,
.course-mobile-menu:hover,
.course-mobile-menu:active {
    background: #ff9b1c;
}
.mobile-menu-btn svg,
.course-mobile-menu svg { width: 1.375rem; height: 1.375rem; fill: currentColor; }
/* El botón tiene 2 SVGs; según aria-expanded mostramos hamburger o X.
   !important para vencer cualquier override del display:inline-flex del parent. */
.course-mobile-menu .icon-burger { display: block !important; }
.course-mobile-menu .icon-close { display: none !important; }
.course-mobile-menu[aria-expanded="true"] .icon-burger { display: none !important; }
.course-mobile-menu[aria-expanded="true"] .icon-close { display: block !important; }

/* ============================================
   CURSO VIEW — Sidebar + Main
   ============================================ */

.course-sidebar {
    width: 20rem;
    background: var(--bg-dark);
    position: fixed;
    top: 0; left: 0; bottom: 0;
    overflow-y: auto;
    border-right: 1px solid var(--border);
    z-index: 100;
    scrollbar-width: thin;
    scrollbar-color: #333 var(--bg-dark);
}
.course-sidebar::-webkit-scrollbar { width: 5px; }
.course-sidebar::-webkit-scrollbar-track { background: var(--bg-dark); }
.course-sidebar::-webkit-scrollbar-thumb { background: #333; border-radius: 2px; }
.course-sidebar::-webkit-scrollbar-thumb:hover { background: var(--border); }

.course-sidebar-header {
    padding: var(--space-lg) var(--space-lg) var(--space-md);
    border-bottom: 1px solid var(--border);
    text-align: center;
}
.course-sidebar-header a {
    color: var(--text-muted);
    font-size: 0.78em;
    letter-spacing: 0.3px;
}
.course-sidebar-header a:hover { color: var(--text); }
.course-sidebar-header h3 {
    font-family: 'Anton', sans-serif;
    font-size: 1.3em;
    font-weight: 400;
    text-transform: uppercase;
    margin-top: var(--space-sm);
    color: var(--text);
    line-height: 1.2;
}

/* Lessons */
.course-lessons {
    list-style: none;
    padding: 0;
    margin: 0;
}
.course-lessons > li > a,
.module-lessons li a {
    display: block;
    padding: var(--space-sm) var(--space-lg);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9em;
    background: var(--bg);
    border-bottom: none;
    transition: color 0.15s, background 0.15s;
    line-height: 1.45;
}
.course-lessons > li > a:hover,
.module-lessons li a:hover {
    color: var(--text);
    background: var(--bg-card);
}
.course-lessons > li > a.active,
.module-lessons li a.active {
    color: var(--text);
    border-left: 3px solid var(--text-muted);
    padding-left: 21px;
}
.course-lessons > li > a .lesson-num,
.module-lessons li a .lesson-num {
    display: inline-block;
    width: 1.5rem;
    color: var(--accent);
    font-size: 0.9em;
    font-weight: bold;
}
.course-lessons > li > a.active .lesson-num,
.module-lessons li a.active .lesson-num {
    color: var(--accent);
}
.course-lessons > li > a .lesson-duration,
.module-lessons li a .lesson-duration {
    float: right;
    font-size: 0.8em;
    color: var(--border);
}

.lesson-done { float: right; color: #fff; font-size: 0.65em; background: #4CAF50; width: 18px; height: 1.125rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; margin-top: 1px; }
.module-done { float: right; color: #fff; font-size: 0.6em; background: #4CAF50; width: 18px; height: 1.125rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; margin-top: 1px; }

/* Modules */
.module-title {
    padding: var(--space-sm) var(--space-lg);
    font-size: 0.9em;
    color: var(--text);
    font-weight: bold;
    border-top: 1px solid var(--border);
    background: var(--bg-dark);
    cursor: pointer;
    user-select: none;
    font-family: Verdana, sans-serif;
    line-height: 1.35;
}
.module-title:first-child { border-top: none; }
.module-title:hover { background: #222; }
.module-title .arrow {
    float: right;
    color: var(--border);
    transition: transform 0.2s;
    font-size: 1em;
    margin-top: 1px;
}
.module-title.open .arrow { transform: rotate(90deg); color: var(--text-muted); }
.module-lessons { display: none; }
.module-lessons.open { display: block; }

/* Main content */
.course-main {
    margin-left: 320px;
    padding: var(--space-2xl) 5%;
    min-height: 100vh;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
}
.course-main-inner {
    width: 100%;
    max-width: 80%;
}
.course-main h1 {
    font-family: 'Anton', sans-serif;
    font-size: 3em;
    font-weight: 400;
    text-transform: uppercase;
    text-align: center;
    color: var(--text);
    margin-bottom: var(--space-lg);
    line-height: 1.1;
}
.course-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 32px;
    gap: var(--space-md);
}
.course-nav .btn {
    font-size: 1em;
    padding: var(--space-sm) var(--space-xl);
    border-radius: var(--radius-pill);
}
.course-nav .btn-outline {
    border: 1px #fff dashed;
    color: var(--text);
    border-radius: var(--radius-pill);
    background: #222;
}
.course-nav .btn-outline:hover {
    background: var(--bg-card);
    color: var(--text);
}

/* Module unlock animations */
.module-new-unlock { opacity: 0; transform: scaleY(0); transform-origin: top; }
.module-unlock-onepiece.module-unlocking {
    animation: mu-op 0.9s cubic-bezier(0.22,0.61,0.36,1) forwards;
}
@keyframes mu-op {
    0% { opacity:0; transform:scaleY(0) rotate(-3deg); }
    40% { opacity:1; transform:scaleY(1.05) rotate(1deg); }
    60% { transform:scaleY(0.97) rotate(-0.5deg); }
    100% { opacity:1; transform:scaleY(1) rotate(0deg); }
}
.module-unlock-gantz.module-unlocking {
    animation: mu-gz 1.2s ease-out forwards;
}
@keyframes mu-gz {
    0% { opacity:0; clip-path:inset(0 100% 0 0); filter:brightness(3) hue-rotate(90deg); }
    20% { opacity:1; clip-path:inset(0 60% 0 0); filter:brightness(2); }
    40% { clip-path:inset(0 30% 0 0); filter:brightness(1.5); }
    70% { clip-path:inset(0 0 0 0); filter:brightness(1); }
    100% { opacity:1; clip-path:inset(0); filter:none; }
}
.module-unlock-hxh.module-unlocking {
    animation: mu-hxh 1s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
@keyframes mu-hxh {
    0% { opacity:0; transform:scaleY(0); filter:brightness(3) drop-shadow(0 0 20px rgba(255,215,0,0.8)); }
    40% { opacity:1; transform:scaleY(1.1); filter:brightness(1.5) drop-shadow(0 0 10px rgba(255,215,0,0.5)); }
    70% { transform:scaleY(0.97); }
    100% { opacity:1; transform:scaleY(1); filter:none; }
}

/* Course view responsive */
@media (max-width: 768px) {
    .course-sidebar {
        display: none !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 100vh !important;
        z-index: 500;
        border-right: 0;
        overflow-y: auto;
        padding-top: var(--space-3xl); /* espacio para el hamburger/X flotante */
    }
    .course-sidebar.mobile-open { display: block !important; }
    .course-main { margin-left: 0; padding: var(--space-3xl) var(--space-md) var(--space-lg); min-height: auto; }
    .course-main-inner { max-width: 100%; }
    .course-main h1 { font-size: 1.5em; }
    .course-nav { flex-direction: column; gap: var(--space-sm); }
    .course-nav .btn, .course-nav .btn-outline { text-align: center; }
    .course-lessons > li > a,
    .module-lessons li a { padding: 10px 16px; }
}

/* ============================================
   COURSE LIST — Anime unlock animations
   ============================================ */
.anime-badge {
    position:absolute;top:10px;right:10px;z-index:2;
    display:flex;align-items:center;gap:4px;
    padding:4px 8px;border-radius:4px;
    font-size:0.7em;font-weight:bold;letter-spacing:1px;
    box-shadow:0 2px 8px rgba(0,0,0,0.3);
}
.anime-badge-icon { font-size:1.1em; }
.anime-badge-label { text-transform:uppercase; }
.course-hidden { opacity:0; transform:scale(0.5); pointer-events:none; }

.course-reveal-onepiece {
    animation: cr-op 0.9s cubic-bezier(0.22,0.61,0.36,1) forwards;
}
@keyframes cr-op {
    0% { opacity:0; transform:scale(2.5) rotate(-15deg); filter:brightness(1.5); }
    30% { opacity:1; transform:scale(1.1) rotate(3deg); }
    45% { transform:scale(0.95) rotate(-2deg); }
    55% { transform:scale(1.03) rotate(1deg); }
    70% { transform:scale(0.99) rotate(-0.5deg); }
    100% { opacity:1; transform:scale(1) rotate(0deg); pointer-events:auto; filter:none; }
}
.course-reveal-onepiece .card { animation: cr-op-shadow 1.5s ease-out forwards; }
@keyframes cr-op-shadow { 0% { box-shadow:0 0 40px rgba(139,69,19,0.6); } 100% { box-shadow:none; } }

.course-reveal-gantz {
    animation: cr-gz 1.2s ease-out forwards;
}
@keyframes cr-gz {
    0% { opacity:0; clip-path:inset(0 100% 0 0); filter:brightness(4) hue-rotate(90deg) saturate(3); }
    10% { opacity:1; clip-path:inset(0 80% 0 0); }
    15% { clip-path:inset(40% 70% 20% 0); filter:brightness(2.5) hue-rotate(45deg); }
    25% { clip-path:inset(0 50% 0 0); }
    30% { clip-path:inset(20% 40% 50% 0); filter:brightness(2); }
    40% { clip-path:inset(0 25% 0 0); filter:brightness(1.5) hue-rotate(20deg); }
    50% { clip-path:inset(30% 10% 10% 0); }
    60% { clip-path:inset(0 5% 0 0); filter:brightness(1.2) hue-rotate(0deg); }
    75% { clip-path:inset(0 0 0 0); filter:brightness(1); }
    100% { opacity:1; clip-path:inset(0); filter:none; pointer-events:auto; }
}
.course-reveal-gantz .card { animation: cr-gz-glow 2s ease-out forwards; }
@keyframes cr-gz-glow { 0% { box-shadow:0 0 30px rgba(0,255,0,0.4), inset 0 0 20px rgba(0,255,0,0.1); } 100% { box-shadow:none; } }

.course-reveal-hxh {
    animation: cr-hxh 1s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
@keyframes cr-hxh {
    0% { opacity:0; transform:scale(0) rotateY(180deg); filter:brightness(3) drop-shadow(0 0 50px rgba(255,215,0,0.9)); }
    30% { opacity:1; transform:scale(1.2) rotateY(30deg); filter:brightness(1.8) drop-shadow(0 0 30px rgba(255,215,0,0.6)); }
    50% { transform:scale(0.95) rotateY(-10deg); filter:brightness(1.3) drop-shadow(0 0 20px rgba(255,215,0,0.4)); }
    70% { transform:scale(1.02) rotateY(3deg); }
    100% { opacity:1; transform:scale(1) rotateY(0deg); filter:none; pointer-events:auto; }
}
.course-reveal-hxh .card { animation: cr-hxh-aura 2s ease-out forwards; }
@keyframes cr-hxh-aura { 0% { box-shadow:0 0 40px rgba(255,215,0,0.5), 0 0 80px rgba(255,215,0,0.2); } 100% { box-shadow:none; } }

/* CTA Plug button */
.cta-plug-btn {
    display:inline-block;
    padding:14px 32px;
    background:rgba(255,141,0,0.91);
    color:#000;
    font-family:'Anton',sans-serif;
    font-size:1.15em;
    letter-spacing:0.5px;
    text-transform:uppercase;
    text-decoration:none;
    border-radius:6px;
    transition:transform 0.15s, box-shadow 0.15s;
    box-shadow:0 3px 12px rgba(255,141,0,0.3);
}
.cta-plug-btn:hover {
    transform:translateY(-2px);
    box-shadow:0 6px 20px rgba(255,141,0,0.45);
}

/* ============================================================================
   2026-05-06 — RESPONSIVE BREAKPOINTS + INTRINSIC + CONSTRAINTS
   ============================================================================
   Estructura mobile-first. Los defaults son para mobile vertical (<600px).
   Los breakpoints AUMENTAN funcionalidad/layout en pantallas más grandes.
   Donde aplique, preferir patterns intrinsics (auto-fit grid, min(), fit-content).
   ============================================================================ */

/* ---------- INTRINSIC GRIDS (auto-fit, sin breakpoints fijos) ---------- */

/* Cards grids: se ajustan al ancho disponible automáticamente.
   En mobile = 1 col, va creciendo a 2/3/4 cols según espacio. */
.cards-grid,
.dc-cards,
.lessons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: var(--space-md);
}

/* Forms inline: inputs lado a lado en desktop, apilados en mobile, sin breakpoint */
.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
}
.form-row > * {
    flex: 1 1 min(100%, 280px);
}

/* ---------- CONSTRAINTS (D4 del plan) ---------- */

/* Container principal con cap superior. En 4K no estira a 4000px de ancho. */
.main-inner,
.container-main,
.dc-wrap {
    max-width: min(var(--max-content), 95vw);
    margin-inline: auto;
}

/* Texto legible: línea no más de 70ch. Aplica a párrafos y bloques de body. */
p,
.dc-intro,
.dc-current-why,
.body-text {
    max-width: var(--max-text);
}

/* Touch targets: botones e inputs con altura mínima cómoda (~44px). */
.btn,
button[type="submit"],
button[type="button"]:not(.icon-only),
.dc-pdf-btn,
.dc-delete-btn,
.cta-plug-btn,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="url"],
select,
textarea {
    min-height: var(--min-touch);
}

/* iOS auto-zoom prevention: inputs deben tener font-size >= 16px (en root font 16) */
input,
select,
textarea {
    font-size: max(1rem, 16px);
}

/* ---------- RESPONSIVE BREAKPOINTS (D3 del plan) ---------- */

/* DEFAULTS = mobile vertical (<600px). Lo de arriba ya cubre eso.
   Pero algunos ajustes específicos: */
@media (max-width: 599px) {
    /* Sidebar va a slide-out con backdrop (ya existe la mobile-menu-btn) */
    /* Reducir paddings de body para aprovechar espacio */
    .main { padding: var(--space-3xl) var(--space-sm) var(--space-md); }
    /* Headers más chicos en mobile vertical para que entren */
    .main h1 { font-size: clamp(1.5rem, 5vw, 2rem); }
    /* Cards en 1 columna forzada (intrinsic ya hace esto, pero por las dudas) */
    .cards-grid, .dc-cards, .lessons-grid { grid-template-columns: 1fr; }
    /* Botones full-width en mobile vertical para ergonomía */
    .btn-block-mobile { width: 100%; }
}

/* Mobile horizontal / phablet (600-899px) */
@media (min-width: 600px) and (max-width: 899px) {
    .main { padding: var(--space-3xl) var(--space-md) var(--space-lg); }
}

/* Tablet (900-1199px) */
@media (min-width: 900px) and (max-width: 1199px) {
    .main { padding: var(--space-2xl) var(--space-lg); }
}

/* Desktop standard (1200-1599px) — rango común de Lean. Sin cambios. */
/* @media (min-width: 1200px) and (max-width: 1599px) — defaults vienen bien */

/* Ultra-wide / 4K (>=1600px) — agregar paddings laterales generosos */
@media (min-width: 1600px) {
    .main { padding: var(--space-2xl) var(--space-3xl); }
    /* Asegurar que el container interno no se estira eterno */
    .main-inner { max-width: var(--max-content); }
}
