@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Inter:wght@300;400;600&display=swap');

:root {
    --primary-dark: #1a052e;
    --primary-main: #4a154b;
    --primary-light: #8e44ad;
    --gold: #d4af37;
    --gold-light: #f3e5ab;
    --text-main: #f4ecf7;
    --text-muted: #cbb3d8;
    --glass-bg: rgba(74, 21, 75, 0.2);
    --glass-border: rgba(212, 175, 55, 0.3);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--primary-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: radial-gradient(circle at 50% 0%, #2e0854 0%, var(--primary-dark) 60%);
    background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6, .brand-font {
    font-family: 'Cinzel', serif;
    font-weight: 600;
    color: var(--gold);
}

a {
    color: var(--gold-light);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--gold);
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

/* Glassmorphism Classes */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    width: 100%;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.4s ease;
    border: none;
}

.btn-gold {
    background: linear-gradient(135deg, #d4af37 0%, #aa8c2c 100%);
    color: #111;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
    color: #000;
}

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

.btn-outline:hover {
    background: var(--glass-bg);
    box-shadow: inset 0 0 10px rgba(212,175,55,0.2);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: all 0.4s ease;
}

.navbar.scrolled {
    padding: 12px 5%;
    background: rgba(26, 5, 46, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(212,175,55,0.2);
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-brand {
    font-size: 1.8rem;
    letter-spacing: 2px;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    padding: 120px 20px 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

/* Using general placeholder pattern for images until generation succeeds */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.4;
    background-size: cover;
    background-position: center;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
    animation: fadeInDown 1s ease forwards;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
    animation: fadeInUp 1s ease forwards;
    animation-delay: 0.3s;
    opacity: 0;
}

.hero-actions {
    animation: fadeIn 1s ease forwards;
    animation-delay: 0.6s;
    opacity: 0;
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Cards (Services & Courses) */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 60px 5%;
}

.card {
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    border-color: rgba(212, 175, 55, 0.6);
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.card-price {
    font-size: 2rem;
    color: var(--gold-light);
    margin: 20px 0;
    font-weight: 600;
}

/* Utils */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

.section-title {
    text-align: center;
    margin: 80px 0 40px;
    font-size: 2.5rem;
}

/* Animations Core */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- RESPONSIVE / MOBILE OPTIMIZATION --- */

/* Mobile Menu Toggle Button */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1100;
}

.menu-toggle span {
    display: block;
    width: 30px;
    height: 3px;
    background: var(--gold);
    border-radius: 3px;
    transition: all 0.3s ease;
}

@media (max-width: 992px) {
    .hero-content h1 { font-size: 3rem; }
    .nav-links { gap: 15px; }
}

@media (max-width: 768px) {
    .navbar { padding: 15px 5%; }
    .menu-toggle { display: flex; }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: rgba(26, 5, 46, 0.95);
        backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.5s cubic-bezier(0.77,0.2,0.05,1.0);
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    }

    .nav-links.active { right: 0; }

    .hero-content h1 { font-size: 2.2rem; }
    .hero-content p { font-size: 1rem; margin-bottom: 30px; }
    .hero-actions { flex-direction: column; width: 100%; max-width: 250px; margin: 0 auto; }
    .hero-actions .btn { width: 100%; text-align: center; }

    .container { padding: 0 6%; }
    .grid-container { grid-template-columns: 1fr; padding: 20px 0%; gap: 15px; }
    .section-title { font-size: 1.6rem; margin: 40px 0 20px; }
    
    .glass-panel { padding: 35px 25px !important; }
    .card { padding: 30px 20px !important; }

    /* Hero Character Responsive */
    .hero-character {
        max-height: 50%;
        right: 0;
        opacity: 0.3;
        -webkit-mask-image: linear-gradient(to top, transparent 0%, black 20%);
        mask-image: linear-gradient(to top, transparent 0%, black 20%);
    }

    .hero-content {
        z-index: 2;
        padding-bottom: 50px;
    }

    /* Estilos Hamburguesa Activa */
    .menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
    .menu-toggle.active span:nth-child(2) { opacity: 0; }
    .menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -7px); }
}

/* Landscape Optimization for Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero { padding: 80px 20px 40px; }
    .hero-content h1 { font-size: 1.8rem; margin-bottom: 10px; }
    .hero-content p { font-size: 0.9rem; margin-bottom: 20px; }
    .hero-character { max-height: 70%; opacity: 0.2; }
    .navbar { padding: 10px 5%; }
    .navbar.scrolled { padding: 8px 5%; }
}

/* Aula Responsive Final */
@media (max-width: 768px) {
    .aula-layout { flex-direction: column; height: auto; display: block; }
    
    .lecciones-sidebar { 
        position: fixed; 
        top: 0; 
        left: -100%; 
        width: 85%; 
        height: 100vh; 
        z-index: 2000; 
        transition: left 0.4s ease;
        background: rgba(17, 17, 17, 0.98);
        backdrop-filter: blur(10px);
        box-shadow: 10px 0 30px rgba(0,0,0,0.8);
        padding-top: 80px;
    }
    
    .lecciones-sidebar.active { left: 0; }
    
    .aula-content { 
        padding: 80px 20px 40px; 
    }

    .aula-toggle-btn {
        display: block !important;
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: 2100;
        background: var(--gold);
        color: #000;
        padding: 15px 25px;
        border-radius: 50px;
        font-weight: bold;
        box-shadow: 0 5px 20px rgba(0,0,0,0.5);
        border: none;
        font-family: 'Cinzel', serif;
        font-size: 0.9rem;
    }
}

