/* ===========================
    VARIABLES Y RESET (Se mantienen aquí por ser fundamentales)
=========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colores y Fondos */
    --primary-color: #FFD700; /* Dorado brillante */
    --secondary-color: #FFC107; /* Ámbar/Dorado más cálido */
    --text-color: #fff;
    --background-base: rgba(0, 0, 0, 0.88); /* Fondo principal de la web */
    --background-card: rgba(31, 31, 31, 0.95); /* Fondo para tarjetas/bloques */
    
    /* 💥 VARIABLES CRÍTICAS PARA MENÚ Y SCROLL 💥 */
    --header-height: 80px; 
    --scroll-padding: 100px; /* Altura del header + margen para que el texto no se oculte */
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    background: var(--background-base);
    line-height: 1.6;
    overflow-x: clip;
    /* 💥 SOLUCIÓN MENÚ 1: Ajusta el desplazamiento del scroll */
    scroll-padding-top: var(--scroll-padding); 
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ===========================
    HEADER (Menu) 
=========================== */
.st-site-header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 999;
    background: rgba(15, 15, 15, 0.95);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    height: var(--header-height); 
}

.st-site-header.st-sticky-header { background: #111; }

.st-main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    height: 100%;
}

.st-main-header-in {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.st-site-branding {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    white-space: nowrap;
    display: flex;
    align-items: center;
    margin-right: 20px;
}

/* Contenedor del menú y teléfono (Escritorio) */
.st-nav {
    display: flex;
    align-items: center;
    flex-grow: 1;
    justify-content: center;
}

.st-nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.st-nav-list li a {
    color: var(--text-color);
    text-decoration: none;
    margin: 0 0.8rem;
    position: relative;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.st-nav-list li a.active,
.st-nav-list li a:hover {
    color: var(--primary-color);
}

.st-header-phone {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 2rem;
    white-space: nowrap;
}

.st-header-phone i {
    color: var(--primary-color);
}

/* ESTILOS DE HAMBURGUESA (MÓVIL) */
.st-munu-toggle {
    display: none; /* Oculto por defecto */
    position: relative;
    width: 30px;
    height: 30px;
    cursor: pointer;
    z-index: 1000; /* Alto z-index para que esté sobre el menú desplegado */
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.st-munu-toggle span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: var(--primary-color);
    border-radius: 3px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
}
.st-munu-toggle span:nth-child(1) { top: 5px; }
.st-munu-toggle span:nth-child(2) { top: 13px; }
.st-munu-toggle span:nth-child(3) { top: 21px; }
.st-munu-toggle.st-active span:nth-child(1) { top: 13px; transform: rotate(135deg); }
.st-munu-toggle.st-active span:nth-child(2) { opacity: 0; left: -60px; }
.st-munu-toggle.st-active span:nth-child(3) { top: 13px; transform: rotate(-135deg); }


/* ------------------------------------------------ */
/* 💻 PORTÁTILES PEQUEÑOS Y TABLETAS (MAX 991px) */
/* ------------------------------------------------ */
@media (max-width: 991px) {
    :root {
        --header-height: 70px;
        --scroll-padding: 80px;
    }
    .st-site-header { height: var(--header-height); }
    
    /* 1. MOSTRAR BOTÓN DE HAMBURGUESA */
    .st-munu-toggle { 
        display: flex; 
        order: 2; /* Asegura que el botón esté a la derecha del todo */
    }

    /* 2. OCULTAR EL MENÚ DE NAVEGACIÓN POR DEFECTO (OFF-CANVAS) */
    .st-nav {
        /* Posiciona el menú debajo del encabezado */
        position: absolute;
        top: var(--header-height); 
        left: 0;
        width: 100%;
        
        /* Oculta la altura y el contenido, listo para desplegar */
        max-height: 0; 
        overflow: hidden;
        
        /* Estilos del contenedor del menú */
        background-color: rgba(15, 15, 15, 0.98);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
        border-top: 1px solid var(--primary-color);
        transition: max-height 0.5s ease-in-out;

        /* Reorganizar elementos en columna */
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        flex-grow: 0; /* No crece más allá de su contenido */
    }

    /* 3. CLASE PARA ABRIR EL MENÚ (AÑADIDA POR JS) */
    .st-nav.st-mobile-open {
        max-height: 400px; /* Valor arbitrario suficiente para todos los enlaces */
        padding-bottom: 20px;
    }

    /* 4. AJUSTAR LA LISTA DE ENLACES PARA VISTA MÓVIL */
    .st-nav-list {
        flex-direction: column;
        width: 100%;
        text-align: center;
        padding: 20px 0;
    }

    .st-nav-list li {
        margin: 5px 0;
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .st-nav-list li:last-child {
        border-bottom: none;
    }

    .st-nav-list li a {
        display: block;
        padding: 10px 0;
        margin: 0;
    }

    /* 5. MOVER EL BOTÓN DE TELÉFONO DENTRO DEL MENÚ DESPLEGABLE */
    .st-nav .st-header-phone {
        margin-left: 0;
        margin-bottom: 15px;
    }
    
    /* Ocultar el botón de teléfono si está fuera del st-nav, pero como está dentro no hace falta */
}

/* ------------------------------------------------ */
/* 📱 TELÉFONOS MÓVILES (MAX 576px) 📱 */
/* ------------------------------------------------ */
@media (max-width: 576px) {
    :root {
        --header-height: 60px;
        --scroll-padding: 70px;
    }
    .st-site-header { height: var(--header-height); }
    .st-nav { top: var(--header-height); } /* Ajustar la posición superior del menú */

    /* Ocultar el teléfono en el header principal y mostrar la hamburguesa */
    .st-header-phone { display: none; }
    .st-munu-toggle { display: flex; order: 2; }
    .st-icon-name { display: none; } /* Si tienes alguna clase para ocultar texto pequeño */
}