@import './vars.css';

/* ===== LAYOUT ===== */
.header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: var(--z-fixed);
    background-color: var(--transparent);
}

/* ===== NAV ===== */
.nav {
    display: flex;
    align-items: center;
    position: relative;
    height: var(--header-height);
    justify-content: space-between;
    z-index: auto;
}

.nav__logo {
    display: flex;
    align-items: center;
    column-gap: .25rem;
}

.nav__logo img {
    height: 2.5rem;
    width: 2.5rem;
}

.nav__toggle {
    font-size: 1.5rem;
    color: var(--color-white);
    cursor: pointer;
    transition: color .4s;
}

.nav__list {
    display: flex;
    flex-direction: column;
    row-gap: 2rem
}

.nav__link {
    color: var(--color-white);
    font-weight: var(--font-medium);
    transition: color .3s;
}

.nav__link:hover {
    color: var(--color-primary);
}

.menu__socialmedia {
    display: none;
}

/* ===== OVERLAY MENU ===== */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.overlay.active {
    opacity: 1;
    cursor: pointer;
    visibility: visible;
}

/* ===== ACTIVE MENU ===== */
.active-link {
    color: var(--color-primary);
    font-weight: var(--font-bold);
}

/* Navigation for mobile devices */
@media screen and (max-width: 768px) {
    .nav__menu {
        display: flex;
        justify-content: space-between;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: -100%;
        background-color: var(--color-black-secondary);
        width: 75%;
        height: 100%;
        padding: 2rem;
        transition: right .5s ease-in-out;
        text-transform: uppercase;
        z-index: 9999;
    }

    .container__close {
        display: flex;
        justify-content: flex-end;
    }

    .nav__close {
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        background-color: var(--color-black);
        color: var(--color-white);
        border-radius: 100%;
        height: 2.5rem;
        width: 2.5rem;
        transition: .3s ease-in-out;
    }

    .nav__close:hover {
        background-color: var(--color-primary);
    }

    .nav__logo img {
        height: 2rem;
        width: 2rem;
    }

    .menu__socialmedia {
        display: flex;
        flex-direction: column;
    }

    .contact__row {
        flex-direction: column;
    }

    .footer__container {
        flex-direction: column;
        text-align: center;
        gap: 2rem
    }
}

/* ===== SHOW MENU ===== */
.show-menu {
    right: 0;
}

/* ===== CHANGE BACKGROUND HEADER ===== */
.bg-header {
    background-color: var(--color-black-secondary);
}

.bg-header .nav__toggle,
.bg-header .nav__link {
    color: var(--color-white);
}

.bg-header .active-link,
.bg-header .nav__link:hover {
    color: var(--color-primary);
}