/* =========================
   MENU PRINCIPAL MEJORADO
========================= */

.navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 10px; /* espacio entre items */
}

.header .navigation ul li {
    position: relative; /* CLAVE para submenús */
    transition: transform .2s ease, color .2s ease;
}

.header .navigation ul li a {
    font-size: 15px;
    color: #ffffff;
    text-decoration: none;
    padding: 15px 18px;
    display: block;
    border-radius: 8px; /* esquinas suaves */
    transition: 
        background-color .3s ease,
        transform .2s ease,
        color .2s ease,
        box-shadow .3s ease;
}

/* Hover principal */
.header .navigation ul li a:hover {
    background-color: #0b2b4a;
    color: #ffffff;
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* =========================
   SUBMENU MEJORADO
========================= */

.header .navigation ul li ul {
    position: absolute;
    top: 100%;
    left: 0;
    width: 260px;
    padding: 10px 0;
    background: rgba(7,27,46,0.95); /* efecto glass sutil */
    backdrop-filter: blur(10px);
    border-top: 3px solid #1e90ff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    display: none;
    z-index: 999;
    border-radius: 0 0 12px 12px;
    transform: translateY(15px);
    opacity: 0;
    transition: all 0.3s ease;
}

/* Mostrar submenú con animación */
.header .navigation ul li:hover > ul {
    display: block;
    transform: translateY(0);
    opacity: 1;
}

/* Items del submenú */
.header .navigation ul li ul li {
    width: 100%;
}

.header .navigation ul li ul li a {
    font-size: 14px;
    padding: 12px 20px;
    color: #ffffff;
    white-space: nowrap;
    transition: background-color .25s ease, padding-left .25s ease, transform .25s ease;
    border-radius: 6px;
}

/* Hover submenú */
.header .navigation ul li ul li a:hover {
    background-color: #0d3b66;
    padding-left: 28px;
    transform: translateX(3px);
}

/* =========================
   SUB-SUBMENU (tercer nivel)
========================= */

.header .navigation ul li ul li ul {
    top: 0;
    left: 100%;
    border-top: none;
    border-radius: 0 8px 8px 0;
}

/* =========================
   MENU RESPONSIVE
========================= */

#toggle,
.header label {
    display: none;
    cursor: pointer;
}

.menu {
    width: 45px;
    height: 35px;
}

@media(max-width:950px) {

    .header label {
        display: initial;
    }

    .header {
        padding: 20px 10%;
    }

    .header .navigation {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(180deg, #071b2e, #020c16);
        display: none;
        border-radius: 0 0 12px 12px;
        overflow: hidden;
    }

    .header .navigation ul li {
        width: 100%;
        float: none;
    }

    .header .navigation ul li a {
        padding: 12px 30px;
        border-radius: 0;
    }

    .header .navigation ul li ul {
        position: relative;
        width: 100%;
        border-top: none;
        box-shadow: none;
        transform: none;
        opacity: 1;
        background: #0b2b4a;
        backdrop-filter: none;
    }

    .header .navigation ul li ul li a {
        background-color: #0b2b4a;
        padding-left: 30px;
    }

    #toggle:checked ~ .navigation {
        display: block;
    }
}

/* =========================
   FIXED NAV & ANIMATION
========================= */

.navigation {
    --padding-container: 0;
    height: 40px;
    display: flex;
    align-items: center;
    position: fixed;
    width: 100%;
    padding: 30px;
    z-index: 1000;
    animation: change cubic-bezier(0.91, 0.18, 0.7, 0.95) both;
    animation-timeline: scroll(root);
    animation-range: 0 750px;
    background: rgba(7,27,46,0.85);
    backdrop-filter: blur(8px);
    transition: background 0.3s ease, padding 0.3s ease;
}
/* =========================
   MENU PRINCIPAL CON EFECTO DE CARGA
========================= */

/* Elementos base (ya existentes, no se cambian) */
.header .navigation ul li a {
    font-size: 15px;
    color: #ffffff;
    text-decoration: none;
    padding: 15px 18px;
    display: block;
    border-radius: 8px; /* esquinas suaves */
    position: relative;  /* clave para pseudo-elementos */
    overflow: hidden;    /* para el efecto */
    transition: 
        background-color .3s ease,
        transform .2s ease,
        color .2s ease,
        box-shadow .3s ease;
}

/* Barra animada tipo carga */
.header .navigation ul li a::before {
    content: "";
    position: absolute;
    left: 50%;          /* empieza desde el centro */
    bottom: 0;
    width: 0%;
    height: 3px;
    background: #1e90ff; /* color azul animado */
    border-radius: 2px;
    transition: all 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    transform: translateX(-50%);
}

/* Hover: la barra se expande */
.header .navigation ul li a:hover::before {
    width: 100%;
}

/* Efecto de resplandor */
.header .navigation ul li a:hover {
    background-color: #0b2b4a;
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 0 20px rgba(30,144,255,0.6);
}

/* Opcional: efecto de subrayado “retroceso” suave al quitar el hover */
.header .navigation ul li a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 100%;
    height: 3px;
    background: rgba(30,144,255,0.3);
    border-radius: 2px;
    transform: translateX(-50%) scaleX(0);
    transform-origin: center;
    transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
}

.header .navigation ul li a:hover::after {
    transform: translateX(-50%) scaleX(1);
}
/* Reducir espacio interno del texto dentro del slider */
.hero_container {
    padding-top: 80px;  /* antes 120px -> ajustado para reducir espacio */
    margin-top: 50px;   /* antes 70px -> opcional para ajustar altura */
}

/* Ajustar altura del slider */
.hero-header {
    height: 55vh;        /* antes 60vh -> más compacto */
    min-height: 480px;   /* mantiene mínimo */
}

/* Opcional: reducir el clip-path para que baje menos el slider */
.hero-slider{
    clip-path: polygon(
        0 0,
        100% 0,
        100% 75%,   /* antes 78% -> baja menos */
        80% 90%,    /* antes 93% -> más compacto */
        20% 90%,    
        0 75%
    );
}

/* Para responsive también reducimos */
@media(max-width:768px){
    .hero-header{
        height: 65vh;  /* antes 75vh -> menos espacio */
    }

    .hero-container{
        padding-top: 60px; /* menos espacio arriba del texto */
    }

    .hero-slider{
        clip-path: polygon(
            0 0,
            100% 0,
            100% 80%,  
            70% 90%,    
            30% 90%,    
            0 80%
        );
    }
}
