:root {
    --bg-dark: #121214;
    --bg-panel: #1a1a1d;
    --primary: #e55c1e;   /* Naranja del logo */
    --secondary: #8c2131; /* Guinda del logo */
    --white: #ffffff;
    --gray: #9ca3af;
    
    --font-head: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --sidebar-width: 280px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--white);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ---------------- Loader ---------------- */
#loader {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-dark);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}
#loader.hidden {
    opacity: 0;
    visibility: hidden;
}
.loader-logo {
    width: 150px;
    z-index: 2;
}
.glow-ring {
    position: absolute;
    width: 220px; height: 220px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: var(--primary);
    border-bottom-color: var(--secondary);
    animation: spin 2s linear infinite;
}
@keyframes spin {
    100% { transform: rotate(360deg); }
}

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

/* ---------------- Sidebar ---------------- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-panel);
    height: 100vh;
    position: fixed;
    left: 0; top: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px 0;
    border-right: 1px solid rgba(255,255,255,0.05);
    z-index: 100;
}
.sidebar-top {
    padding: 0 40px;
}
.sidebar .logo img {
    width: 100%;
    max-width: 180px;
    display: block;
}
.mobile-toggle {
    display: none;
    cursor: pointer;
}
.nav-links {
    padding: 0 40px;
}
.nav-links ul {
    list-style: none;
}
.nav-links li {
    margin: 20px 0;
}
.nav-links a {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1px;
    color: var(--gray);
    position: relative;
    transition: 0.3s;
    display: inline-block;
}
.nav-links a::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 3px;
    background: var(--primary);
    transition: 0.3s;
}
.nav-links a:hover, .nav-links a.active {
    color: var(--white);
}
.nav-links a:hover::before, .nav-links a.active::before {
    width: 12px;
}
.sidebar-bottom {
    padding: 0 40px;
    font-size: 0.8rem;
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 15px;
}
.sidebar-line {
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.1);
}

/* ---------------- Main Content ---------------- */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
}

/* ---------------- Hero ---------------- */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 80px;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    z-index: -2;
    transform: scale(1.05);
}
.hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(90deg, var(--bg-dark) 0%, rgba(18,18,20,0.4) 100%);
    z-index: -1;
}
.hero-content {
    max-width: 800px;
}
.badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(229, 92, 30, 0.1);
    border: 1px solid var(--primary);
    color: var(--primary);
    font-size: 0.75rem;
    letter-spacing: 2px;
    font-family: var(--font-head);
    font-weight: 700;
    border-radius: 30px;
    margin-bottom: 30px;
}
.hero h1 {
    font-size: 4rem;
    font-family: var(--font-head);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    text-transform: uppercase;
}
.text-cyan {
    color: var(--primary);
}
.hero p {
    font-size: 1.2rem;
    color: var(--gray);
    max-width: 600px;
    margin-bottom: 40px;
}
.btn-glow {
    display: inline-block;
    padding: 18px 40px;
    background: transparent;
    color: var(--white);
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 1px;
    border: 2px solid var(--primary);
    position: relative;
    overflow: hidden;
    transition: 0.3s;
}
.btn-glow::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--primary);
    z-index: -1;
    transform: scaleX(0);
    transform-origin: left;
    transition: 0.3s;
}
.btn-glow:hover::before {
    transform: scaleX(1);
}
.btn-glow:hover {
    box-shadow: 0 0 20px rgba(229, 92, 30, 0.4);
    color: var(--white);
}
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 80px;
    width: 2px;
    height: 60px;
    background: rgba(255,255,255,0.1);
}
.scroll-indicator .dot {
    width: 2px;
    height: 15px;
    background: var(--primary);
    animation: scrollDrop 2s infinite;
}
@keyframes scrollDrop {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(45px); opacity: 0; }
}

/* ---------------- Sections Common ---------------- */
section {
    padding: 120px 80px;
}
.section-title {
    font-size: 2.5rem;
    font-family: var(--font-head);
    font-weight: 800;
    margin-bottom: 20px;
    text-transform: uppercase;
}
.section-title span {
    color: var(--primary);
}
.text-center {
    text-align: center;
}

/* ---------------- Nosotros ---------------- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}
.about-text .lead {
    font-size: 1.3rem;
    color: var(--white);
    margin-bottom: 20px;
}
.about-text p {
    color: var(--gray);
    margin-bottom: 30px;
}
.stats-row {
    display: flex;
    gap: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.stat-box h3 {
    font-size: 3rem;
    font-family: var(--font-head);
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}
.stat-box p {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
    font-weight: 600;
}
.about-visual {
    position: relative;
}
.visual-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
}
.visual-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.visual-wrapper::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    box-shadow: inset 0 0 50px var(--bg-dark);
}
.glass-card {
    position: absolute;
    bottom: -30px;
    left: -30px;
    background: rgba(26, 26, 29, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    border-left: 4px solid var(--primary);
    padding: 30px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 20px;
}
.glass-card svg {
    color: var(--primary);
}
.glass-card h4 {
    font-family: var(--font-head);
    font-size: 1rem;
    font-weight: 700;
}

/* ---------------- Bento Grid (Divisiones) ---------------- */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 250px;
    gap: 20px;
    margin-top: 60px;
}
.bento-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
    transition: 0.3s;
}
.bento-item.large {
    grid-row: span 2;
}
.bento-item.wide {
    grid-column: span 2;
}
.bento-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    transition: 0.5s;
    filter: grayscale(80%) opacity(0.4);
}
.bento-item:hover .bento-bg {
    filter: grayscale(0%) opacity(0.7);
    transform: scale(1.05);
}
.bento-item:hover {
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(229, 92, 30, 0.15);
}
.bento-content {
    position: relative;
    z-index: 2;
    padding: 40px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(to top, var(--bg-panel) 0%, transparent 100%);
}
.bento-item.large .bento-content {
    background: linear-gradient(to top, var(--bg-panel) 20%, transparent 100%);
}
.b-icon {
    margin-bottom: auto;
    color: var(--primary);
}
.bento-content h3 {
    font-family: var(--font-head);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
}
.bento-content p {
    color: var(--gray);
    font-size: 0.95rem;
}
.share {
    position: absolute;
    top: 20px; right: 20px;
    background: var(--primary);
    color: var(--white);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-family: var(--font-head);
    font-weight: 700;
}

/* ---------------- Capacity Banner ---------------- */
.capacity {
    background-image: url('../img/esl_hero.jpg');
    background-size: cover;
    background-attachment: fixed;
    position: relative;
    text-align: center;
    padding: 150px 80px;
}
.capacity-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(140, 33, 49, 0.85); /* Guinda multiply */
    mix-blend-mode: multiply;
}
.capacity .relative {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}
.capacity h2 {
    font-family: var(--font-head);
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 20px;
}
.capacity p {
    font-size: 1.2rem;
}

/* ---------------- Footer ---------------- */
.footer {
    background: var(--bg-panel);
    padding: 80px 80px 40px;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}
.f-logo {
    width: 180px;
    margin-bottom: 20px;
}
.f-desc {
    color: var(--gray);
}
.f-contact h4 {
    font-family: var(--font-head);
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--primary);
}
.f-contact ul {
    list-style: none;
}
.f-contact li {
    display: flex;
    gap: 15px;
    color: var(--gray);
    margin-bottom: 15px;
    align-items: flex-start;
}
.f-contact svg {
    color: var(--primary);
    flex-shrink: 0;
}
.f-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: var(--gray);
    font-size: 0.9rem;
}

/* ---------------- Animations (Custom Reveal) ---------------- */
[data-reveal] {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-reveal="bottom"] { transform: translateY(40px); }
[data-reveal="left"] { transform: translateX(-40px); }
[data-reveal="right"] { transform: translateX(40px); }
[data-reveal="scale"] { transform: scale(0.95); }

[data-reveal].is-revealed {
    opacity: 1;
    transform: translate(0) scale(1);
}

/* ---------------- Responsive ---------------- */
@media (max-width: 1200px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 992px) {
    :root {
        --sidebar-width: 0px;
    }
    .sidebar {
        width: 100%;
        height: 80px;
        flex-direction: row;
        align-items: center;
        padding: 0 30px;
        z-index: 1000;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        border-right: none;
    }
    .sidebar-top {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0;
    }
    .sidebar .logo img {
        height: 50px;
        width: auto;
        padding: 5px;
    }
    .mobile-toggle {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
    .mobile-toggle .bar {
        width: 25px; height: 2px;
        background: var(--white);
        transition: 0.3s;
    }
    .nav-links {
        position: fixed;
        top: 80px; left: -100%;
        width: 100%; height: calc(100vh - 80px);
        background: var(--bg-panel);
        padding: 40px;
        transition: 0.4s;
    }
    .nav-links.active {
        left: 0;
    }
    .sidebar-bottom {
        display: none;
    }
    .hero {
        padding: 0 40px;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    section, .footer {
        padding: 80px 40px;
    }
    .about-grid, .footer-grid {
        grid-template-columns: 1fr;
    }
    .glass-card {
        bottom: 10px; left: 10px; right: 10px;
    }
}
@media (max-width: 768px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }
    .bento-item.large, .bento-item.wide {
        grid-row: auto;
        grid-column: auto;
    }
}
