/* ======= COLORES CORPORATIVOS ======= */
:root {
    --azul-oscuro: #003bbf;
    --azul-claro: #0b3fb3;
    --azul-medio: #044bd9;
    --blanco: #ffffff;
    --gris-claro: #f4f6f9;
    --texto-oscuro: #000c66;
    --texto-gris: #444;
}

/* ======= ESTILOS GENERALES ======= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--blanco);
    color: var(--azul-oscuro);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ======= HEADER CON MENÚ HAMBURGUESA ======= */
.header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 60px;
    background: var(--blanco);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo img {
    max-width: 180px;
    height: auto;
    display: block;
}

.logo-placeholder {
    font-size: 24px;
    font-weight: 700;
    color: var(--azul-oscuro);
    text-transform: uppercase;
    letter-spacing: -1px;
}

/* Navegación Desktop */
.nav {
    display: flex;
    gap: 30px;
}

/* Logo del menú - oculto por defecto en escritorio */
.nav .menu-logo {
    display: none;
}

.nav a {
    text-decoration: none;
    font-size: 16px;
    color: var(--azul-claro);
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.nav a:hover {
    color: var(--azul-oscuro);
}

.nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--azul-oscuro);
    transition: width 0.3s ease;
}

.nav a:hover::after {
    width: 100%;
}

.nav a.active {
    color: var(--azul-oscuro);
}

.nav a.active::after {
    width: 100%;
}

/* Botón Hamburguesa */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    width: 30px;
    height: 24px;
    z-index: 1003;
    position: relative;
}

.hamburger span {
    width: 100%;
    height: 3px;
    background: var(--azul-oscuro);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ======= RESPONSIVE MÓVIL ======= */
@media (max-width: 768px) {
    .header {
        padding: 15px 20px;
    }

    .logo {
        position: relative;
        z-index: 1002;
        transition: opacity 0.3s ease;
    }

    /* Ocultar logo del header cuando el menú está activo */
    .nav.active ~ .logo,
    body:has(.nav.active) .header .logo {
        opacity: 0;
        pointer-events: none;
    }

    .hamburger {
        display: flex;
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--blanco);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 40px 30px 30px;
        gap: 40px;
        box-shadow: -5px 0 25px rgba(0,0,0,0.15);
        transition: right 0.4s ease;
        overflow-y: auto;
    }

    .nav.active {
        right: 0;
    }

    .nav a {
        font-size: 24px;
        padding: 12px 0;
        text-align: center;
        border: none;
        position: relative;
    }

    .nav a::after {
        content: '';
        position: absolute;
        width: 0;
        height: 3px;
        bottom: -8px;
        left: 50%;
        transform: translateX(-50%);
        background-color: var(--azul-oscuro);
        transition: width 0.3s ease;
    }

    .nav a:hover::after,
    .nav a.active::after {
        width: 100%;
    }

    .nav a.active {
        color: var(--azul-oscuro);
        background: transparent;
        padding-left: 0;
        border-left: none;
        border-radius: 0;
    }

    /* Logo dentro del menú móvil - solo visible en móvil activo */
    .nav .menu-logo {
        display: none !important;
    }

    .nav.active .menu-logo {
        display: block !important;
        position: absolute;
        top: 40px;
        left: 50%;
        transform: translateX(-50%);
        max-width: 180px;
        height: auto;
    }

    /* Overlay para cerrar menú al hacer clic fuera */
    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }

    .nav-overlay.active {
        display: block;
    }
}
