/*======================= HEADER =============================*/
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 8.4vh;
    background-color: var(--primary);
    -webkit-box-shadow: 0px 6px 13px -6px rgba(66, 68, 90, 1);
    -moz-box-shadow: 0px 6px 13px -6px rgba(66, 68, 90, 1);
    box-shadow: 0px 6px 13px -6px rgba(66, 68, 90, 1);
    z-index: 10;
}

/*======================= NAV =============================*/
.nav {
    height: 100%;
}

.nav__list {
    background-color: var(--primary);
}

.logo__screen {
    display: none;
}

.nav__logo {
    height: 100%;
    pointer-events: none;
    user-select: none;
}

.nav__burger,
.nav__close {
    color: var(--accent);
}

.nav__data {
    height: 100%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav__toggle {
    position: relative;
    width: 32px;
    height: 32px;
}

.nav__burger,
.nav__close {
    position: absolute;
    width: max-content;
    height: max-content;
    inset: 0;
    margin: auto;
    font-size: 2rem;
    cursor: pointer;
    transition: opacity 0.1s, transform 0.4s;
}

.nav__close {
    opacity: 0;
}

.nav__menu > ul {
    list-style: none;
}

.nav__link {
    text-decoration: none;
    font-size: var(--small);
    display: flex;
    padding: 12px 24px;
    justify-content: space-between;
    align-items: center;
    transition: color 0.2s;
}

.nav__link:hover {
    color: var(--accent);
}

.nav__button {
    text-decoration: none;
    background-color: var(--accent);
    color: var(--primary);
    text-transform: uppercase;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50px;
    margin-top: auto;
    border: 1px solid var(--accent);
    transition: background-color 0.2s, color 0.2s;
}

.nav__button:hover {
    background-color: transparent;
    color: var(--accent);
}

/* Navigation for mobile devices */
@media screen and (max-width: 1360px) {
    .nav__menu {
        position: absolute;
        right: -100%;
        top: 8.4vh;
        width: 100%;
        background-color: var(--primary);
        height: 91.6vh;
        overflow: auto;
        pointer-events: none;
        opacity: 0;
        transition: right 0.4s, opacity 0.3s;
    }
    .nav__menu::-webkit-scrollbar {
        width: 0;
    }
    .nav__list {
        padding-top: 50px;
        width: 83%;
        height: 100%;
        margin: 0 auto;
    }
    .nav__link {
        padding: 24px 24px;
    }
    .nav__button {
        margin: 0 24px;
        padding: 16px 0px;
    }
    li:has(.nav__button) {
        margin-top: 50px;
    }
}

/* Show menu */
.show-menu {
    opacity: 1;
    right: 0;
    pointer-events: initial;
}

/* Show icon */
.show-icon .nav__burger {
    opacity: 0;
    transform: rotate(90deg);
}

.show-icon .nav__close {
    opacity: 1;
    transform: rotate(90deg);
}

/*======================= DROPDOWN =============================*/
.dropdown__item {
    cursor: pointer;
}

.dropdown__arrow {
    font-size: var(--small);
    transition: transform 0.4s, color 0.2s;
}

.dropdown__link {
    text-decoration: none;
    padding: 12px 12px 12px 36px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.dropdown__link:hover {
    color: var(--accent);
}

.dropdown__menu {
    max-height: 0;
    overflow: hidden;
    list-style: none;
    transition: max-height 0.4s ease-out;
}

/* Show dropdown menu */
.dropdown__item:hover .dropdown__menu {
    max-height: 1000px;
    overflow: hidden;
    transition: max-height 0.4s ease-in;
}

/* Show dropdown on mobile devices */
@media (hover: none) {
    .show-dropdown {
        max-height: 1000px;
        overflow: hidden;
        transition: max-height 0.4s ease-in;
    }
    .rotate-arrow {
        color: var(--accent);
        transform: rotate(180deg);
    }
}

/* Rotate dropdown icon */
.dropdown__item:hover .dropdown__arrow {
    color: var(--accent);
    transform: rotate(180deg);
}

/* For large devices */
@media screen and (min-width: 1360px) {
    .header {
        height: 13vh;
    }
    .logo__screen {
        display: inline-block;
    }
    .logo__mobile {
        display: none;
    }
    .nav__data {
        width: fit-content;
    }
    .nav {
        display: flex;
        justify-content: space-between;
    }
    .nav__toggle {
        display: none;
    }
    .nav__list {
        height: 100%;
        display: flex;
        align-items: center;
    }
    .nav__link {
        height: 100%;
        justify-content: initial;
        padding: 12px 24px;
    }
    .nav__button {
        margin-left: 10px;
        padding: 12px 36px;
        font-size: 13px !important;
    }
    .nav__underline {
        position: relative;
    }
    .nav__underline::after {
        content: '';
        position: absolute;
        width: 0;
        height: 2px;
        background-color: var(--accent);
        bottom: 0;
        left: 50%;
        transition-duration: 0.15s;
        transition-timing-function: ease-out;
    }
    .nav__underline:hover::after {
        width: 100%;
        left: 0;
    }

    .dropdown__item {
        position: relative;
    }
    .dropdown__menu {
        max-height: initial;
        overflow: initial;
        background-color: var(--primary);
        border-radius: 0 0 4px 4px;
        position: absolute;
        width: 200px;
        left: 0;
        top: 5rem;
        opacity: 0;
        pointer-events: none;
        transition: opacity .3s, top .3s;
        -webkit-box-shadow: 0px 13px 24px -16px rgba(66, 68, 90, 1);
        -moz-box-shadow: 0px 13px 24px -16px rgba(66, 68, 90, 1);
        box-shadow: 0px 13px 24px -16px rgba(66, 68, 90, 1);
    }
    .dropdown__link {
        padding: 12px 12px 12px 24px;
    }

    /* Show dropdown menu */
    .dropdown__item:hover .dropdown__menu {
        opacity: 1;
        top: 2.5rem;
        pointer-events: initial;
        transition: top .3s;
    }
}