/* Estilos Header Hamburguesa */

.header-hamburguesa {
    width: 100%;
    height: 150px;
    position: relative;
}

@media (min-width: 970px) {
    .header-hamburguesa {
        display: none;
    }
}

.navbar-hamburguesa {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 3rem;
}

.imagen-header-hamburguesa {
    width: 140px;
}

.menu-hamburguesa {
    display: none;
}

.label-hamburguesa {
    width: 45px;
    height: 35px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    z-index: 2000;
    position: relative;
}

.label-hamburguesa span {
    display: block;
    height: 3px;
    width: 100%;
    border-radius: 2px;
    transition: all .35s ease;
    position: relative;
}

/* colores */
.header-hamburguesa:not(.header-blanco) .label-hamburguesa span {
    background: var(--color-azul-rey);
}

.header-blanco .label-hamburguesa span {
    background: #fff;
}

.menu-hamburguesa:checked + .label-hamburguesa span:nth-child(1) {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.menu-hamburguesa:checked + .label-hamburguesa span:nth-child(2) {
    opacity: 0;
}

.menu-hamburguesa:checked + .label-hamburguesa span:nth-child(3) {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) rotate(-45deg);
}

.overlay-menu {
    position: fixed;
    top: 0;
    left: 0;

    width: 60vw;
    height: 100dvh;

    background: #2C239F;
    background: linear-gradient(90deg, rgba(44, 35, 159, 1) 0%, rgba(90, 87, 210, 1) 60%, rgba(118, 119, 242, 1) 100%);
    backdrop-filter: blur(18px);

    transform: translateX(-100%);
    transition: transform .5s cubic-bezier(.77,0,.18,1);

    display: flex;
    align-items: center;
    justify-content: center;

    z-index: 1500;
}

/* abrir */
.menu-hamburguesa:checked ~ .overlay-menu {
    transform: translateX(0);
}

.ul-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 3rem;
    text-align: center;
    padding: 0;
}

.link {
    font-size: 2.6rem;
    font-family: var(--fuente-principal);
    color: #fff;
    text-decoration: none;
    position: relative;
    opacity: 0;
    transform: translateX(-20px);
    animation: fadeIn 0.5s forwards;
}

/* animación escalonada */
.menu-hamburguesa:checked ~ .overlay-menu .link {
    animation-delay: 0.15s;
}

/* underline elegante */
.link::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: #fff;
    transition: width .3s ease;
}

.link:hover::after {
    width: 100%;
}

/* =========================
   ANIMACIÓN LINKS
========================= */

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Estilos Header Principal */
.header-principal{
    display: none;
}

@media(min-width:970px){
    .header-principal{
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-top: 2%;
        padding-bottom: 2%;
    }
}

.imagen-header-hamburguesa{
    display: block;
    width: 100%;
    max-width: 180px;
}

.ul-links-header-principal{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.li-links-header-principal{

    display: flex;

}

.link-header-principal{
    position: relative;
    display: inline-block;
    text-decoration: none;
    font-size: clamp(1.8rem, 5vw, 2rem);
    font-family: var(--fuente-principal-bold);
    color: var(--color-azul-rey);
    transition: color .3s ease;
}

.link-header-principal::after{
    content: '';
    position: absolute;
    left: 50%;
    bottom: -8px;
    width: 0;
    height: 2px;
    background-color: var(--color-azul-rey);
    transform: translateX(-50%);
    transition: width .35s ease;
}

.link-header-principal:hover{
    color: var(--color-azul-rey);
}

.link-header-principal:hover::after{
    width: 100%;
}

.link-header-principal.activo::after{
    width: 100%;
}

.link-header-principal:focus{
    outline: none;
}

.link-header-principal:focus-visible::after{
    width: 100%;
}

.header-blanco .link-header-principal{
    color: var(--color-blanco);
}

.header-blanco .link-header-principal {
    color: #ffffff;
}

.header-blanco .link-header-principal::after {
    background-color: #ffffff;
}

.header-blanco .link-header-principal:hover {
    color: #ffffff;
}