/* ============================================
   JOGALART - Sistema de Cursos
   Estilos unificados - Compatible con hosting
   ============================================ */

/* Reset y base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Variables del sistema de cursos */
    --color-primary: #7c3aed;
    --color-primary-dark: #6d28d9;
    --color-primary-light: #a78bfa;
    --color-secondary: #fbbf24;
    --color-secondary-dark: #f59e0b;
    --color-bg: #faf8f5;
    --color-bg-alt: #f5f3f0;
    --color-dark: #1e1b2e;
    --color-dark-light: #2d2a3e;
    --color-text: #374151;
    --color-text-light: #6b7280;
    --color-white: #ffffff;
    --color-border: #e5e7eb;
    --color-success: #10b981;
    --color-error: #ef4444;
    --color-warning: #f59e0b;
    --color-locked: #6b7280;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --transition: all 0.3s ease;

    /* ===== ALIAS: nombres que usa el PHP de curso-videos ===== */
    --purple-primary: #7B1FA2;
    --purple-dark: #6A1B9A;
    --purple-light: #CE93D8;
    --bg-light: #faf8f5;
    --border-light: #e5e7eb;
    --text-primary: #1e1b2e;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --success: #10b981;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   BOTONES
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border: none;
    border-radius: var(--radius-xl);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background: var(--purple-primary);
    color: var(--color-white);
}

.btn-primary:hover {
    background: var(--purple-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--color-secondary);
    color: #1f2937;
}

.btn-secondary:hover {
    background: var(--color-secondary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--purple-primary);
    border: 2px solid var(--purple-primary);
}

.btn-outline:hover {
    background: var(--purple-primary);
    color: var(--color-white);
}

.btn-ghost {
    background: transparent;
    color: var(--color-text);
}

.btn-ghost:hover {
    background: var(--color-bg-alt);
}

.btn-danger {
    background: var(--color-error);
    color: var(--color-white);
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-success {
    background: var(--color-success);
    color: var(--color-white);
}

.btn-success:hover {
    background: #059669;
}

.btn-sm {
    padding: 8px 18px;
    font-size: 0.85rem;
    border-radius: var(--radius-md);
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.05rem;
}

/* ============================================
   NAVBAR - Clases que usa curso-videos.php
   (.navbar .container .logo .nav-links etc.)
   ============================================ */
.navbar {
    background: var(--color-white);
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 72px;
}

.navbar .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.navbar .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--purple-primary);
    text-decoration: none;
    flex-shrink: 0;
}

.navbar .logo svg {
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.nav-links li a {
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--color-text);
    text-decoration: none;
    transition: var(--transition);
}

.nav-links li a:hover {
    background: var(--color-bg-alt);
    color: var(--purple-primary);
}

.nav-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.btn-premium-nav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: var(--radius-xl);
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-premium-nav:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-register-nav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: var(--radius-xl);
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: var(--transition);
    border: 2px solid var(--purple-primary);
    color: var(--purple-primary);
    background: transparent;
    cursor: pointer;
}

.btn-register-nav:hover {
    background: var(--purple-primary);
    color: white;
}

/* Dropdown del usuario */
.nav-buttons .dropdown-menu {
    position: relative;
}

.nav-buttons .dropdown-menu .user-avatar-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--purple-primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.nav-buttons .dropdown-menu .user-avatar-btn:hover {
    background: var(--purple-dark);
    transform: scale(1.05);
}

.nav-buttons .dropdown-menu .user-avatar-text {
    color: white;
    font-weight: 700;
    font-size: 0.95rem;
}

.nav-buttons .dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    padding: 8px 0;
    z-index: 100;
}

.nav-buttons .dropdown-menu:hover .dropdown-content {
    display: block;
}

.nav-buttons .dropdown-content .dropdown-user-name {
    display: block;
    padding: 10px 16px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-text);
}

.nav-buttons .dropdown-content .divider {
    height: 1px;
    background: var(--color-border);
    margin: 4px 0;
}

.nav-buttons .dropdown-content a {
    display: block;
    padding: 10px 16px;
    font-size: 0.9rem;
    color: var(--color-text);
    text-decoration: none;
}

.nav-buttons .dropdown-content a:hover {
    background: var(--color-bg-alt);
    color: var(--purple-primary);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1100;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--color-text);
    border-radius: 2px;
    transition: var(--transition);
}

/* Menu Overlay */
.menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1050;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    background: white;
    z-index: 1100;
    padding: 24px;
    display: flex;
    flex-direction: column;
    transition: right 0.35s ease;
    box-shadow: var(--shadow-xl);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu .menu-close-btn {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
}

.mobile-menu .menu-close-btn button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition);
}

.mobile-menu .menu-close-btn button:hover {
    background: var(--color-bg-alt);
}

.mobile-menu a {
    display: block;
    padding: 12px 16px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.mobile-menu a:hover {
    background: var(--color-bg-alt);
    color: var(--purple-primary);
}

.mobile-menu .mobile-actions {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
}

/* ============================================
   NAVBAR alternativa (clases del sistema de cursos)
   ============================================ */
.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--purple-primary);
}

.navbar-brand .logo-icon {
    width: 38px;
    height: 38px;
    background: var(--purple-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
}

.navbar-nav a {
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--color-text);
}

.navbar-nav a:hover {
    background: var(--color-bg-alt);
    color: var(--purple-primary);
}

.navbar-nav a.active {
    color: var(--purple-primary);
    background: rgba(123,31,162,0.08);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-premium {
    background: var(--color-secondary);
    color: #1f2937;
    padding: 10px 20px;
    border-radius: var(--radius-xl);
    font-weight: 600;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.btn-premium:hover {
    background: var(--color-secondary-dark);
    transform: translateY(-1px);
}

.btn-register {
    background: transparent;
    color: var(--purple-primary);
    padding: 10px 20px;
    border-radius: var(--radius-xl);
    font-weight: 600;
    font-size: 0.88rem;
    border: 2px solid var(--purple-primary);
    text-decoration: none;
    cursor: pointer;
}

.btn-register:hover {
    background: var(--purple-primary);
    color: white;
}

/* User menu alternativo */
.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--color-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-text);
}

/* Dropdown genérico */
.dropdown-menu:not(.nav-buttons .dropdown-menu) {
    position: relative;
}

.dropdown-menu:not(.nav-buttons .dropdown-menu) .dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 8px;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    padding: 8px 0;
    z-index: 100;
}

.dropdown-menu:not(.nav-buttons .dropdown-menu):hover .dropdown-content {
    display: block;
}

.dropdown-menu:not(.nav-buttons .dropdown-menu) .dropdown-content a {
    display: block;
    padding: 10px 16px;
    font-size: 0.9rem;
    color: var(--color-text);
}

.dropdown-menu:not(.nav-buttons .dropdown-menu) .dropdown-content a:hover {
    background: var(--color-bg-alt);
    color: var(--purple-primary);
}

.dropdown-menu:not(.nav-buttons .dropdown-menu) .dropdown-content .divider {
    height: 1px;
    background: var(--color-border);
    margin: 6px 0;
}

/* Menu toggle alternativo */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-text);
    cursor: pointer;
}

/* ============================================
   ALERTAS / MENSAJES
   ============================================ */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 0.92rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* ============================================
   FORMULARIOS (Login / Signup)
   ============================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-bg) 0%, #f3e8ff 100%);
    padding: 24px;
}

.auth-container {
    width: 100%;
    max-width: 440px;
}

.auth-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-xl);
}

.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--purple-primary);
    margin-bottom: 8px;
}

.auth-logo p {
    color: var(--color-text-light);
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.88rem;
    color: var(--color-text);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    transition: var(--transition);
    font-family: inherit;
    background: var(--color-white);
}

.form-input:focus {
    outline: none;
    border-color: var(--purple-primary);
    box-shadow: 0 0 0 3px rgba(123, 31, 162, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

.form-input.error {
    border-color: var(--color-error);
}

.form-hint {
    font-size: 0.82rem;
    color: var(--color-text-light);
    margin-top: 4px;
}

.form-error {
    font-size: 0.82rem;
    color: var(--color-error);
    margin-top: 4px;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    margin-top: 8px;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.auth-footer a {
    color: var(--purple-primary);
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: var(--color-text-light);
    font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-border);
}

.auth-divider span {
    padding: 0 16px;
}

/* ============================================
   PAGINA DE CURSOS - HERO
   ============================================ */
.page-hero {
    background: linear-gradient(135deg, #f5f0ff 0%, var(--color-bg) 50%, #fef9e7 100%);
    padding: 60px 24px 50px;
    overflow: hidden;
}

.page-hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
}

.page-hero-text .hero-label {
    display: inline-block;
    color: var(--purple-primary);
    font-size: 0.88rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.page-hero-text h1 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--color-dark);
    margin-bottom: 8px;
    line-height: 1.15;
}

.page-hero-text h1 span {
    color: var(--purple-primary);
}

.page-hero-text p {
    font-size: 1.05rem;
    color: var(--color-text-light);
    line-height: 1.7;
    max-width: 480px;
    margin-bottom: 28px;
}

.page-hero-image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-hero-image img {
    width: 100%;
    max-width: 420px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    transform: rotate(2deg);
    transition: var(--transition);
}

.page-hero-image img:hover {
    transform: rotate(0deg) scale(1.02);
}

.page-hero-badge {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: var(--color-white);
    padding: 14px 22px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-hero-badge .badge-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #fce7f3 0%, #f3e8ff 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.page-hero-badge .badge-text strong {
    display: block;
    font-size: 0.95rem;
    color: var(--color-dark);
}

.page-hero-badge .badge-text span {
    font-size: 0.78rem;
    color: var(--color-text-light);
}

/* Stats bar */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 64px;
    margin: -30px auto 40px;
    max-width: 900px;
    padding: 0 24px;
    position: relative;
    z-index: 10;
}

.stats-bar-inner {
    display: flex;
    justify-content: center;
    gap: 64px;
    background: var(--color-white);
    padding: 28px 56px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    flex-wrap: wrap;
    width: 100%;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--purple-primary);
    line-height: 1;
    margin-bottom: 6px;
}

.stat-label {
    font-size: 0.82rem;
    color: var(--color-text-light);
    font-weight: 500;
}

.page-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 24px 40px;
}

/* ============================================
   GRID DE CURSOS
   ============================================ */
.cursos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
}

.curso-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
}

.curso-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.curso-card.locked {
    opacity: 0.95;
}

.curso-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: var(--purple-primary);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
}

.curso-image {
    position: relative;
    height: 190px;
    overflow: hidden;
}

.curso-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.curso-card:hover .curso-image img {
    transform: scale(1.05);
}

.locked-overlay {
    position: absolute;
    inset: 0;
    background: rgba(30, 27, 46, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 3;
}

.locked-overlay .lock-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
    opacity: 0.9;
}

.locked-overlay p {
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0.85;
}

.curso-content {
    padding: 20px;
}

.curso-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--color-dark);
    line-height: 1.3;
}

.curso-desc {
    font-size: 0.85rem;
    color: var(--color-text-light);
    line-height: 1.5;
    margin-bottom: 14px;
}

.curso-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.curso-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--color-text-light);
}

.curso-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--color-border);
}

.curso-price {
    display: flex;
    flex-direction: column;
}

.price-current {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--purple-primary);
}

.price-original {
    font-size: 0.82rem;
    color: var(--color-text-light);
    text-decoration: line-through;
}

.price-free {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-success);
}

/* ============================================
   DETALLE DE CURSO
   ============================================ */
.curso-detail {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 24px;
}

.curso-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
    align-items: start;
}

.curso-hero-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.curso-hero-image img {
    width: 100%;
    height: auto;
}

.curso-hero-info h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-dark);
    margin-bottom: 12px;
    line-height: 1.2;
}

.curso-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.curso-meta-tag {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    background: var(--color-bg-alt);
    border-radius: 20px;
    font-size: 0.82rem;
    color: var(--color-text);
}

.curso-hero-desc {
    color: var(--color-text);
    line-height: 1.7;
    margin-bottom: 24px;
}

.curso-hero-desc h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 16px 0 10px;
    color: var(--color-dark);
}

.curso-hero-desc ul {
    margin-left: 20px;
    margin-bottom: 16px;
}

.curso-hero-desc li {
    margin-bottom: 6px;
}

.curso-purchase-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-lg);
    margin-top: 20px;
}

.purchase-price {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 20px;
}

.purchase-price .current {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--purple-primary);
}

.purchase-price .original {
    font-size: 1.1rem;
    color: var(--color-text-light);
    text-decoration: line-through;
}

.purchase-features {
    list-style: none;
    margin-bottom: 24px;
}

.purchase-features li {
    padding: 8px 0;
    font-size: 0.9rem;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--color-border);
}

.purchase-features li:last-child {
    border-bottom: none;
}

.feature-check {
    color: var(--color-success);
    font-weight: 700;
}

/* Lista de lecciones */
.lecciones-section {
    margin-top: 40px;
}

.lecciones-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--color-dark);
}

.lecciones-list {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.leccion-item {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--color-border);
    transition: var(--transition);
}

.leccion-item:last-child {
    border-bottom: none;
}

.leccion-item:hover {
    background: var(--color-bg-alt);
}

.leccion-item.locked {
    opacity: 0.6;
}

.leccion-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--purple-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    margin-right: 16px;
    flex-shrink: 0;
}

.leccion-item.locked .leccion-number {
    background: var(--color-locked);
}

.leccion-info {
    flex: 1;
}

.leccion-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-dark);
}

.leccion-desc {
    font-size: 0.82rem;
    color: var(--color-text-light);
    margin-top: 2px;
}

.leccion-duration {
    font-size: 0.82rem;
    color: var(--color-text-light);
    display: flex;
    align-items: center;
    gap: 4px;
}

.leccion-lock {
    margin-left: 12px;
    color: var(--color-locked);
    font-size: 1.1rem;
}

/* ============================================
   DASHBOARD
   ============================================ */
.dashboard {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 24px;
}

.dashboard-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
}

.dashboard-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--color-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
}

.dashboard-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-dark);
}

.dashboard-header p {
    color: var(--color-text-light);
    font-size: 0.92rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.dashboard-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
}

.dashboard-card h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.dashboard-card .value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--purple-primary);
}

.dashboard-section {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
}

.dashboard-section h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--color-dark);
}

.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    font-size: 0.9rem;
}

.data-table th {
    font-weight: 600;
    color: var(--color-text-light);
    border-bottom: 2px solid var(--color-border);
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.5px;
}

.data-table td {
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
}

.data-table tr:hover td {
    background: var(--color-bg-alt);
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
}

.status-completed {
    background: #d1fae5;
    color: #065f46;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--color-text-light);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-text);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--color-dark);
    color: white;
    padding: 48px 24px 24px;
    margin-top: 60px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-brand h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--color-primary-light);
}

.footer-brand p {
    font-size: 0.9rem;
    color: #a5a5b8;
    line-height: 1.6;
}

.footer-links h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: white;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #a5a5b8;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--color-primary-light);
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.social-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--color-dark-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a5a5b8;
    font-size: 1rem;
    transition: var(--transition);
}

.social-icon:hover {
    background: var(--purple-primary);
    color: white;
    transform: translateY(-2px);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 24px;
    margin-top: 32px;
    border-top: 1px solid var(--color-dark-light);
    text-align: center;
    font-size: 0.85rem;
    color: #a5a5b8;
}

/* ============================================
   INSTALACION
   ============================================ */
.install-page {
    background: linear-gradient(135deg, var(--color-bg) 0%, #f3e8ff 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.install-container {
    width: 100%;
    max-width: 600px;
}

.install-logo {
    text-align: center;
    margin-bottom: 32px;
}

.install-logo h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--purple-primary);
    margin-bottom: 8px;
}

.install-logo p {
    color: var(--color-text-light);
}

.install-status {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-xl);
}

.install-status h2 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--color-dark);
}

.install-status ul {
    list-style: none;
    margin-top: 12px;
}

.install-status li {
    padding: 6px 0;
    font-size: 0.9rem;
    padding-left: 24px;
    position: relative;
}

.alert-success li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-success);
    font-weight: 700;
}

.alert-error li::before {
    content: '✗';
    position: absolute;
    left: 0;
    color: var(--color-error);
    font-weight: 700;
}

.install-complete,
.install-failed {
    text-align: center;
    padding: 24px 0;
}

.icon-check,
.icon-error {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.8rem;
}

.icon-check {
    background: #d1fae5;
    color: var(--color-success);
}

.icon-error {
    background: #fee2e2;
    color: var(--color-error);
}

.install-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.install-warning {
    margin-top: 24px;
    padding: 16px;
    background: #fef3c7;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    color: #92400e;
}

.install-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.85rem;
    color: var(--color-text-light);
}

/* ============================================
   CENSURA / BLOQUEO
   ============================================ */
/* ============================================
   CENSURA / BLOQUEO - VERSIÓN CORREGIDA
   ============================================ */

.censored-overlay {
    position: absolute;
    inset: 0;
    /* Fondo semitransparente morado pero permite ver la imagen */
    background: rgba(123, 31, 162, 0.25); 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    z-index: 10;
    /* Sin desenfoque para que la imagen se vea nítida */
    backdrop-filter: none;
    /* Espaciado interior suficiente */
    padding: 24px 16px;
    gap: 12px;
}

/* Icono de candado */
.censored-icon svg {
    width: 44px;
    height: 44px;
    display: block;
    margin: 0 auto;
}

/* Título */
.censored-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
}

/* Texto descriptivo */
.censored-text {
    font-size: 0.9rem;
    opacity: 0.9;
    max-width: 260px;
    margin: 0 auto;
    line-height: 1.4;
}

/* Precio (con oferta) */
.censored-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fbbf24;
    margin: 8px 0 4px;
}

.censored-price span {
    font-size: 0.9rem;
    font-weight: normal;
    text-decoration: line-through;
    opacity: 0.7;
    margin-right: 8px;
}

/* Botón dentro de la capa */
.censored-overlay button.btn-secondary,
.censored-overlay a.btn-secondary {
    background: #fbbf24;
    color: #1f2937;
    border: none;
    padding: 10px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    margin-top: 4px;
}

.censored-overlay button.btn-secondary:hover,
.censored-overlay a.btn-secondary:hover {
    background: #f59e0b;
    transform: translateY(-2px);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .navbar .container {
        flex-wrap: wrap;
        height: auto;
        padding: 12px 16px;
    }

    .nav-links,
    .nav-buttons {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .navbar-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 4px;
        padding: 12px 0;
    }

    .navbar-nav.active {
        display: flex;
    }

    .navbar-nav a {
        width: 100%;
        padding: 10px 14px;
    }

    .navbar-actions {
        display: none;
        width: 100%;
        justify-content: center;
        padding: 12px 0;
    }

    .navbar-actions.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .page-hero-container {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }

    .page-hero-text h1 {
        font-size: 2.2rem;
    }

    .page-hero-text p {
        margin-left: auto;
        margin-right: auto;
    }

    .page-hero-image {
        order: -1;
    }

    .page-hero-image img {
        max-width: 300px;
    }

    .page-hero-badge {
        left: 50%;
        transform: translateX(-50%);
    }

    .stats-bar {
        gap: 0;
        margin-top: -20px;
    }

    .stats-bar-inner {
        gap: 32px;
        padding: 20px 32px;
    }

    .curso-hero {
        grid-template-columns: 1fr;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .cursos-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .auth-card {
        padding: 28px 20px;
    }
}

@media (max-width: 480px) {
    .btn {
        padding: 10px 20px;
        font-size: 0.88rem;
    }

    .curso-action {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .purchase-price .current {
        font-size: 1.6rem;
    }
}

/* ============================================
   UTILIDADES
   ============================================ */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}