/* ========================================
   VARIABLES (Necesarias para el menú)
   Fuente: EstructuraBase.Css / styles-panel.css
   ======================================== */
:root {
    /* Colores principales */
    --color-primary: #627770;
    --color-primario: rgba(98, 119, 112);
    --color-secundario: rgb(238 211 168);
    --color-white: #ffffff; 
    --color-text-light: #f0f0f0;
    --color-accent: #EED3A8; 
    
    /* Espaciados */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    
    /* Otros */
    --border-radius: 30px;
    --transition-speed: 0.3s;
    --menu-width-mobile: 250px;
    --menu-width-desktop: 300px;
}

/* ========================================
   CONFIGURACIÓN BASE
   Fuente: EstructuraBase.Css
   ======================================== */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 900;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-speed) ease;
}

.overlay.activo {
    opacity: 1;
    visibility: visible;
}
/* ========================================
   MENÚ LATERAL - Contenedor Principal
   Fuente: EstructuraBase.Css
   ======================================== */
.menu-lateral {
    position: fixed;
    top: 0;
    left: calc(-1 * var(--menu-width-mobile));
    width: var(--menu-width-mobile);
    height: 100vh;
    
    /* Glassmorphism */
    background-color: rgba(98, 119, 112, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.2);
    border-top-right-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
    
    z-index: 2000;
    padding: 80px 20px;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    overflow-y: auto;
}

.menu-lateral.activo {
    left: 0;
}

/* ========================================
   BOTÓN CERRAR
   Fuente: EstructuraBase.Css
   ======================================== */
.btn-cerrar {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--color-white);
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform var(--transition-speed);
}

.btn-cerrar:hover {
    transform: rotate(180deg);
}

/* ========================================
   LISTA DEL MENÚ (Items Principales)
   Fuente: EstructuraBase.Css y UI-fija.css
   ======================================== */
.menu-lista {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    overflow: hidden;
    color: white; 

    display: flex;          
    flex-direction: column;  
    flex-grow: 1;
}

.menu-lista li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    margin-bottom: var(--spacing-sm);
    padding-bottom: var(--spacing-xs);
}

.menu-lista a {
    text-decoration: none;
    color: #ffffff !important; 
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: color var(--transition-speed);
}

.menu-lista a:hover {
    color: var(--color-white);
    font-weight: bold;
}

.menu-bullet {
    width: 8px;
    height: 8px;
    background-color: var(--color-accent); 
    display: inline-block;
    flex-shrink: 0;
}

/* ========================================
   SUB-MENÚ Y DESPLEGABLES
   Fuente: UI-fija.css
   ======================================== */
.sub-menu-lista {
    list-style: none;
    padding: 0;
    margin: 0;
    margin-top: 10px;
    
    
    max-height: 0; 
    overflow: hidden;
    transition: max-height 0.4s ease-out; 
}


.sub-menu-lista li {
    padding-left: 15px; 
    border-bottom: none; 
    margin-bottom: 5px; 
    padding-bottom: 5px;
}


.sub-menu-lista a {
    font-size: 0.85rem; 
    opacity: 0.8;
}

.sub-menu-lista a:hover {
    opacity: 1;
}


.flecha-desplegable {
    margin-left: auto; 
    transition: transform 0.3s ease;
    font-size: 0.75rem; 
}


.menu-desplegable.abierto .flecha-desplegable {
    transform: rotate(180deg);
}


.menu-desplegable > a {
    border-bottom: none; 
}


.menu-desplegable:not(.abierto) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}


/* Estilo para el enlace de la página actual */
#menuLateral a.pagina-actual {
    background-color: rgba(255, 255, 255, 0.1); /* Un fondo sutil */
    color: #EED3A8; /* Color dorado o el que prefieras */
    font-weight: bold;
    border-left: 7px solid #EED3A8; /* Una barrita lateral indicadora */
    padding-left: 10px; /* Ajuste para que no se pegue el texto */
}
/* ========================================
   RESPONSIVE / MEDIA QUERIES
   Fuente: EstructuraBase.Css
   ======================================== */
@media (min-width: 768px) {
    .menu-lateral {
        width: var(--menu-width-desktop);
        left: calc(-1 * var(--menu-width-desktop));
        padding: 80px 30px;
    }
    
    .menu-lista a {
        font-size: 1.1rem;
    }
}
