/* === HEADER STYLES === */

.header__wrapper {
    display: flex;
    gap: 38px;
    justify-content: space-between;
    align-items: center;
    padding: 17px 0;
    position: relative;
}

/* === NAVIGATION === */

.header__nav {
    width: 70%;
}

.header__nav-list {
    display: flex;
    gap: 24px;
    justify-content: space-between;
}

.header__nav-list > .menu-item {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header__nav-list > .menu-item > a {
    color: var(--color-semiblack);
    transition: all 0.3s ease;
    text-decoration: none;
}

.header__nav-list > .menu-item > a:hover {
    color: #aea2a2;
}

/* === BURGER MENU BUTTON === */

.header__burgermenu-button {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 40px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    transition: all 0.3s ease;
}

.burger-line {
    width: 100%;
    height: 3px;
    background-color: var(--color-semiblack, #333);
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Burger Menu Animation */
.header__burgermenu-button.active .burger-line:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.header__burgermenu-button.active .burger-line:nth-child(2) {
    opacity: 0;
}

.header__burgermenu-button.active .burger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* === MOBILE MENU === */

.header__mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background-color: #fff;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: right 0.3s ease;
    overflow-y: auto;
    padding: 80px 20px 20px;
}

.header__mobile-menu.active {
    right: 0;
}

/* Mobile Navigation */
.header__mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.header__mobile-nav-list .menu-item {
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.header__mobile-nav-list .menu-item:last-child {
    border-bottom: none;
}

.header__mobile-nav-list .menu-item > a {
    display: block;
    padding: 15px 0;
    color: var(--color-semiblack, #333);
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.header__mobile-nav-list .menu-item > a:hover {
    color: #aea2a2;
}

/* Mobile Language Switcher */
.header__mobile-langswitcher {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}

.header__mobile-langswitcher-label {
    display: block;
    margin-bottom: 15px;
    font-weight: 600;
    color: var(--color-semiblack, #333);
}

.header__mobile-langswitcher-buttons {
    display: flex;
    gap: 10px;
}

.header__mobile-langswitcher-btn {
    padding: 8px 16px;
    background-color: #f5f5f5;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.header__mobile-langswitcher-btn:hover {
    background-color: #e0e0e0;
}

.header__mobile-langswitcher-btn--active {
    background-color: var(--color-primary, #007cba);
    color: #fff;
}

.header__mobile-langswitcher-btn--active:hover {
    background-color: var(--color-primary-dark, #005a87);
}

/* === MOBILE MENU OVERLAY === */

.header__mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.header__mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* === DESKTOP LANGUAGE SWITCHER === */

.header__langswitcher {
    position: relative;
    cursor: pointer;
}

.header__langswitcher-current {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    text-transform: uppercase;
}

.header__langswitcher-current::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 8px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid currentColor;
    transition: transform 0.3s ease;
}

.header__langswitcher-list {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    position: absolute;
    top: 110%;
    left: 0;
    min-width: 100%;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    list-style: none;
    padding: 5px 0;
    margin: 0;
    z-index: 10;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.header__langswitcher:hover .header__langswitcher-list {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header__langswitcher:hover .header__langswitcher-current {
    background-color: #f5f5f5;
}

.header__langswitcher:hover .header__langswitcher-current::after {
    transform: rotate(180deg);
}

.header__langswitcher-link {
    display: block;
    padding: 8px 12px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s ease;
    text-transform: uppercase;
}

.header__langswitcher-link:hover {
    background-color: #f0f0f0;
}

/* === MEDIA QUERIES === */

@media (max-width: 830px) {
    .header__nav--desktop {
        display: none;
    }

    .header__langswitcher--desktop {
        display: none;
    }

    .header__burgermenu-button {
        display: flex;
    }

    .header__wrapper {
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .header__mobile-menu {
        width: 100%;
        right: -100%;
    }
    
    .header__mobile-menu.active {
        right: 0;
    }
}

body.mobile-menu-open {
    overflow: hidden;
}