/* —————————————————————— */
/* 1. Reset y Variables   */
/* —————————————————————— */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #793446;       /* burdeos OPDAPAS */
    --accent:  #B22733;       /* rojo noticias */
    --light:   #fff;
    --folder:  #FFCA28;       /* Color carpeta */
    --overlay: rgba(0,0,0,0.7);
}

body {
    font-family: 'Poppins', sans-serif;
    color: #333;
    background: #fff;
    line-height: 1.6;
    overflow-x: hidden;
}

/* —————————————————————— */
/* 2. Estructura Principal */
/* —————————————————————— */
#hero {
    width: 100vw;
    height: 100vh;
    background: url("../img/hero-desktop.png") no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
    position: relative;
}

.container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    overflow-y: auto; /* Permite scroll interno si el contenido crece */
}

/* —————————————————————— */
/* 3. Navegación Desktop  */
/* —————————————————————— */
.nav-top {
    margin-top: 20px;
    display: flex;
    gap: 16px;
    z-index: 10;
}

.nav-btn {
    display: inline-block;
    padding: 8px 24px;
    background: var(--primary);
    color: var(--light);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 30px;
    transition: all .3s ease;
    cursor: pointer;
    border: none;
}

.nav-btn:hover {
    background: #5a2534;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* —————————————————————— */
/* 4. Contenido Visual    */
/* —————————————————————— */
.logo-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
}

.logo {
    max-width: 400px;
    width: 80%;
    height: auto;
}

.section-title {
    font-size: 1.8rem;
    color: var(--primary);
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

.banner-wrap {
    width: 100%;
    max-width: 900px;
    margin-bottom: 40px;
}

.banner-img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    display: block;
}

/* —————————————————————— */
/* 5. Contacto y Footer   */
/* —————————————————————— */
.contact {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--light);
    color: var(--primary);
    padding: 10px 24px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid var(--primary);
    transition: all 0.3s ease;
}

.contact-btn:hover {
    background: var(--primary);
    color: var(--light);
}

.footer {
    width: 100%;
    padding: 20px 10px;
    text-align: center;
    color: var(--light);
    font-size: 0.8rem;
    background-color: #71384b;
    margin-top: auto;
}

/* —————————————————————— */
/* 6. Menú Móvil (Correcto)*/
/* —————————————————————— */
.hamburger-btn {
    display: none; /* Oculto en desktop */
    position: fixed; /* Fixed para que no se mueva con el scroll */
    top: 20px;
    left: 20px;
    background: var(--primary);
    color: var(--light);
    border: none;
    font-size: 1.5rem;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.off-canvas-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;
    background: var(--primary);
    z-index: 99999;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 5px 0 15px rgba(0,0,0,0.3);
}

.off-canvas-menu.active {
    transform: translateX(0);
}

.close-menu-btn {
    align-self: flex-end;
    background: transparent;
    border: none;
    color: var(--light);
    font-size: 2rem;
    cursor: pointer;
    margin-bottom: 30px;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-link {
    color: var(--light);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 15px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: background 0.2s;
}

.mobile-link:hover {
    background: rgba(0,0,0,0.1);
}

/* —————————————————————— */
/* 7. Modales y Acordeón  */
/* —————————————————————— */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay);
    z-index: 100000; /* Por encima del menú móvil */
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    backdrop-filter: blur(3px);
}

.modal-overlay.show {
    display: flex;
}

.modal-content {
    background: #fff;
    width: 100%;
    max-width: 550px;
    max-height: 90vh;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    background: var(--primary);
    color: var(--light);
    padding: 18px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-body {
    padding: 25px;
    overflow-y: auto;
}

/* Acordeón */
.accordion-item {
    border: 1px solid #eee;
    border-radius: 12px;
    margin-bottom: 15px;
    overflow: hidden;
}

.accordion-header {
    width: 100%;
    padding: 15px 20px;
    background: #fdfdfd;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    color: var(--primary);
    text-align: left;
    transition: background 0.3s;
}

.accordion-header i {
    transition: transform 0.3s;
    font-size: 0.8rem;
}

.accordion-item.active .accordion-header i {
    transform: rotate(180deg);
}

.accordion-item.active .accordion-header {
    background: #f5f5f5;
}

.accordion-content {
    display: none;
    padding: 20px;
    border-top: 1px solid #eee;
    background: #fff;
}

.accordion-item.active .accordion-content {
    display: block;
}

/* Listas de Archivos */
.folder-title {
    font-weight: 700;
    color: #555;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
}

.folder-title i { color: var(--folder); font-size: 1.2rem; }

.file-list { list-style: none; }
.file-list li { margin-bottom: 10px; }
.file-list a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #444;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.file-list a:hover {
    background: #f0f0f0;
    color: var(--accent);
    transform: translateX(5px);
}

.file-list i { color: var(--accent); font-size: 1.1rem; }

/* —————————————————————— */
/* 8. Media Queries       */
/* —————————————————————— */
@media (max-width: 768px) {
    #hero {
        background: url("../img/hero-movil.png") no-repeat center center;
        background-size: cover;
    }

    .nav-top {
        display: none !important;
    }

    .hamburger-btn {
        display: block;
    }

    .container {
        padding-top: 80px;
    }

    .logo {
        max-width: 280px;
    }

    .section-title {
        font-size: 1.4rem;
    }

    .contact {
        flex-direction: column;
        width: 100%;
        max-width: 320px;
    }

    .contact-btn {
        width: 100%;
        justify-content: center;
    }
}