/* 
    1 - Navbar 
*/
.stpNav {
    position: fixed;
    top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.5rem;
    background: linear-gradient(to right, #FFFFFF, #0535A4);
    width: 100%;
    z-index: 50;
    box-shadow: 0px 6px 8px 0px #00000088;
}

.stpNavImg {
    height: 80px;
}

.stpNavImg img {
    width: auto;
    height: 100%;
}

.stpNavLink {
    display: flex;
    gap: 0.3rem;
    justify-content: end;
    width: 100%;
}

.stpNavLink a {
    transition: 0.1s ease;
    padding: 0.5rem 1.2rem;
    text-decoration: none;
    color: #fff;
    transition: 0.2s;
    border-radius: 8px;
    font-size: calc(0.8rem + 0.3vw);
    font-weight: bold;
}

.stpNavLink a:hover {
    box-shadow: 0px 2px 0px green;
    transition: 0.1s ease-in-out;
    transform: scale(1.05, 1.05);
    color: black;
    background: white;
}

.btn-close-modal {
    width: max-content;
    height: max-content;
    padding: 0px 10px;
    margin: 0px;
    font-size: 1.5rem;
    border: 0;
    border-radius: 6px;
    color: #ff00009c;
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1;
}

/* MEDIA QUERIES MODERNOS */
@media (max-width: 1368px) {
    .stpNavImg {
        height: 70px;
    }
}

/* Tablet: 768px - 1024px */
@media (max-width: 1024px) {
    .stpNav {
        padding: 1rem 1.5rem;
        background: linear-gradient(to right, #FFFFFF, #0535A4);
    }
    
    .stpNavImg {
        height: 60px;
    }
    
    .stpNavLink {
        gap: 0.8rem;
    }
    
    .stpNavLink a {
        padding: 0.4rem 1rem;
        font-size: clamp(0.6rem, 0.8vw, 1.2rem);
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(5px);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .stpNavLink a:hover {
        background: rgba(255, 255, 255, 0.9);
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }
}

/* Prevenir scroll cuando el menú está abierto */
body.menu-open {
    overflow: hidden;
}

/* Mejorar experiencia táctil */
.hamburger, .stpNavLink a {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.menu-overlay {
    cursor: pointer;
}

/* Mobile: hasta 767px */
@media (max-width: 767px) {
    .stpNav {
        padding: 0.8rem 1rem;
        background: linear-gradient(to bottom, #FFFFFF, #0535A4);
    }
    
    .stpNavImg {
        height: 60px;
    }
    
    /* Mostrar botón hamburguesa */
    .hamburger {
        display: flex;
        flex-direction: column;
        z-index: 100;

        & span {
            width: 25px;
            height: 3px;
            background: #000;
            margin: 4px 0;
            border-radius: 2px;
            transition: 0.4s;
        }
    }
    
    /* Ocultar menú por defecto en mobile */
    .stpNavLink {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 450px;
        height: 100vh;
        background: linear-gradient(135deg, #0535A4, #021b5a);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        transition: 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
        z-index: 99;
    }
    
    /* Menú activo */
    .stpNavLink.active {
        right: 0;
    }
    
    .stpNavLink a {
        width: 80%;
        text-align: center;
        padding: 1rem;
        font-size: 1.1rem;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 12px;
        transform: translateX(50px);
        opacity: 0;
        transition: all 0.4s ease;
    }
    
    .stpNavLink.active a {
        transform: translateX(0);
        opacity: 1;
    }
    
    /* Animación escalonada para los enlaces */
    .stpNavLink.active a:nth-child(1) { transition-delay: 0.1s; }
    .stpNavLink.active a:nth-child(2) { transition-delay: 0.2s; }
    .stpNavLink.active a:nth-child(3) { transition-delay: 0.3s; }
    .stpNavLink.active a:nth-child(4) { transition-delay: 0.4s; }
    
    .stpNavLink a:hover {
        background: rgba(255, 255, 255, 0.9);
        transform: scale(1.05);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    }
    
    .hamburger.active{
        background: #ffffff22;
        padding: 5px 8px; 
        border-radius: 8px;
        cursor: pointer;
    }

    /* Animación del botón hamburguesa */
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(10px, 7px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    /* Overlay para el fondo cuando el menú está abierto */
    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(3px);
        opacity: 0;
        visibility: hidden;
        transition: 0.3s;
        z-index: 98;
    }
    
    .menu-overlay.active {
        opacity: 1;
    }
}