@import url("./variables.css");

.bg-main {
    position: relative;
}
.nav-bar-container{
    width: 100%;
    height: 84px;

    position: fixed;
    top: 0;
    left: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    z-index: 99;
    background-color: var(--color-gobierno-azul);
}

/* Barra fija */
.nav-bar {
    width: 100%;
    /* height: 84px; */
    /* position: fixed;
    top: 0;
    left: 0; */
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* z-index: 99; */

    /* background-color: var(--color-gobierno-azul); */
}

.nav-bar-links {
    display: none;
}

/* Menú desplegable (afuera de nav-bar en el HTML) */
.nav-bar-menu {
    position: fixed;
    top: 80px;
    /* justo debajo de la barra */
    right: 0;
    width: 100%;

    display: flex;
    flex-direction: column;
    gap: 48px;

    padding: 24px 20px 48px 16px;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;

    z-index: 99;
    /* debajo de la barra, pero arriba del contenido */

    text-align: end;
    text-transform: uppercase;
    font-family: var(--font-family-base);
    font-size: var(--font-navbar-size);
    font-weight: var(--font-navbar-weight);
    line-height: var(--font-navbar-line-height);

    box-shadow: 0px 6px 8px 0px rgba(0, 0, 0, 0.2);
    background-color: var(--color-gobierno-azul);
    color: var(--color-gobierno-beige-oscuro);

    transition: all 0.2s ease, opacity 0.5s ease;
}

/* Estado cerrado */
.nav-closed {
    transform: translateY(-200%);
    opacity: 0;
    pointer-events: none;
}

/* Estado abierto */
.nav-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.burger-btn {
    position: relative;
    z-index: 99;
}

/* Botón hamburguesa oculto en desktop */
@media(min-width: 1024px) {
    .nav-bar-container {
        /* padding: 0 48px; */
        height: 84px;
        max-height: 84px;
        box-shadow: 0px 6px 8px 0px rgba(0, 0, 0, 0.2);
    }

    .burger-btn {
        display: none;
    }

    .nav-bar-menu {
        display: none;
    }

    .nav-bar-links {
        display: flex;
        justify-content: space-around;
        gap: 3rem;
        padding-bottom: 5px;

        height: 45px;

        text-align: center;
        text-transform: uppercase;
        font-family: var(--font-family-base);
        font-size: var(--font-text-size);
        font-weight: var(--font-navbar-weight);
        line-height: var(--font-navbar-line-height);

        list-style-type: none;

        color: var(--color-gobierno-beige-oscuro);
    }

    .nav-bar-link {
        padding: 0 15px;
        position: relative;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: .5rem;
        transition: all ease-in-out .3s;
    }

    .nav-rectangle {
        position: absolute;
        top: 38px;
        width: 100%;
        height: 3px;
        background-color: var(--color-gobierno-beige-oscuro);
        transition: all ease-in-out .3s;
    }

    .nav-bar-link:hover a,
    .nav-bar-link.active a {
        position: relative;
        z-index: 10;
        color: var(--color-gobierno-azul);
        transition: all ease-in-out .5s;
    }

    .nav-bar-link:hover .nav-rectangle,
    .nav-bar-link.active .nav-rectangle {
        height: 100%;
        top: 0;
        z-index: 9;
        border-radius: 3px;
        transition: all ease-in-out .3s;
    }
}

.scrolled {
    background-color: var(--color-gobierno-azul-trans);
    /* Color cuando se hace scroll */
    backdrop-filter: blur(2px);
    transition: all ease-in .3s;
}