/* ========================================
   SITE HEADER — DESKTOP
======================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;

    width: 100%;
    height: 68px;

    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 24px;

    padding: 0 32px;

    background: rgba(5, 5, 5, 0.92);

    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);

    border-bottom: 1px solid rgba(201, 164, 90, 0.25);

    overflow: visible;
}


/* ========================================
   MAIN NAVIGATION
======================================== */

.main-nav {
    flex: 1 1 auto;
    min-width: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: clamp(22px, 2.8vw, 48px);

    margin: 0;
    padding: 0;
}


.main-nav a {
    flex-shrink: 0;

    color: #F3EEE4;

    text-decoration: none;

    font-family: var(--font-main);
    font-size: clamp(14px, 1.05vw, 16px);
    font-weight: 400;
    line-height: 1.3;

    white-space: nowrap;

    transition:
        color 0.3s ease,
        text-shadow 0.3s ease;
}


.main-nav a:hover {
    color: #D7B56B;
}


.main-nav a.active {
    position: relative;

    color: #D7B56B;
}


.main-nav a.active::after {
    content: "";

    position: absolute;
    right: 0;
    bottom: -22px;

    width: 100%;
    height: 2px;

    background: #C9A45A;
}


/* ========================================
   HEADER ACTIONS
======================================== */

.header-actions {
    flex: 0 0 auto;
    flex-shrink: 0;

    display: flex;
    align-items: center;

    gap: 18px;

    min-width: max-content;

    direction: ltr;
}


.search-button {
    flex-shrink: 0;

    border: none;
    background: none;

    color: #C9A45A;

    cursor: pointer;

    font-size: 21px;

    padding: 4px;

    transition:
        transform 0.3s ease,
        color 0.3s ease;
}


.search-button:hover {
    transform: scale(1.15);

    color: #E5C87D;
}


/* ========================================
   LANGUAGE SWITCH
======================================== */

.language-switch {
    flex-shrink: 0;

    display: flex;
    align-items: center;

    gap: 9px;

    min-width: max-content;

    direction: ltr;
}


.lang-btn {
    flex-shrink: 0;

    border: none;
    background: none;

    padding: 0;

    font-family: var(--font-main);
    font-size: 18px;

    color: #D7B56B;

    cursor: pointer;

    white-space: nowrap;

    transition:
        color 0.3s ease,
        text-shadow 0.3s ease;
}


.lang-btn:hover {
    color: #F3D58A;
}


.lang-btn.active {
    color: #F6E2A8;

    text-shadow: 0 0 10px rgba(201, 164, 90, 0.35);
}


.language-switch span {
    flex-shrink: 0;

    font-family: var(--font-main);

    color: #A98A46;
}


/* ========================================
   LOGO
======================================== */

.logo-link,
.contact-logo-link {
    flex: 0 1 auto;
    flex-shrink: 1;

    min-width: 0 !important;
    width: auto !important;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: visible;
}


.logo-link img {
    display: block;

    width: auto;
    max-width: 210px;
    max-height: 58px;

    object-fit: contain;
}


.contact-header .contact-logo-link {
    width: clamp(190px, 18vw, 280px) !important;
    min-width: 0 !important;
    height: 68px !important;

    flex-shrink: 1 !important;
}


.contact-header .contact-header-logo {
    display: block;

    width: 100% !important;
    max-width: 270px !important;
    height: 64px !important;
    max-height: 64px !important;

    margin-top: 0 !important;

    object-fit: contain;
    object-position: center;
}


.no-logo-header .logo-link,
.no-logo-header .contact-logo-link {
    display: none;
}


/* ========================================
   LARGE / MEDIUM DESKTOP
======================================== */

@media (max-width: 1300px) {

    .site-header {
        gap: 18px;

        padding-right: 24px;
        padding-left: 24px;
    }


    .main-nav {
        gap: clamp(17px, 2vw, 30px);
    }


    .main-nav a {
        font-size: 14px;
    }


    .header-actions {
        gap: 14px;
    }


    .lang-btn {
        font-size: 16px;
    }


    .contact-header .contact-logo-link {
        width: clamp(170px, 16vw, 230px) !important;
    }

}


/* ========================================
   TABLET
======================================== */

@media (max-width: 1050px) {

    .site-header {
        height: 96px;
        min-height: 96px;

        padding-right: 20px;
        padding-left: 20px;

        gap: 14px;
    }


    .main-nav {
        gap: 18px;
    }


    .main-nav a {
        font-size: 13px;
    }


    .header-actions {
        gap: 12px;
    }


    .language-switch {
        gap: 6px;
    }


    .lang-btn {
        font-size: 15px;
    }


    .search-button {
        font-size: 19px;
    }


    .logo-link img {
        max-width: 170px;
        max-height: 54px;
    }


    .contact-header .contact-logo-link {
        width: 175px !important;
        height: 90px !important;
    }


    .contact-header .contact-header-logo {
        max-width: 170px !important;
        height: 82px !important;
        max-height: 82px !important;
    }

}


/* ========================================
   MOBILE
======================================== */

@media (max-width: 768px) {

    .site-header,
    .contact-header {
        position: sticky;
        top: 0;

        width: 100%;

        height: auto !important;
        min-height: 118px !important;

        padding: 10px 14px 9px !important;

        display: grid;

        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);

        grid-template-areas:
            "actions logo"
            "nav nav";

        align-items: center;

        column-gap: 12px;
        row-gap: 9px;

        background: rgba(5, 5, 5, 0.97);

        overflow: visible;
    }


    .logo-link,
    .contact-logo-link,
    .contact-header .contact-logo-link {
        grid-area: logo;

        justify-self: end;

        width: auto !important;
        min-width: 0 !important;
        height: auto !important;

        flex-shrink: 1;
    }


    .logo-link img,
    .contact-header .contact-header-logo {
        display: block;

        width: auto !important;
        max-width: 125px !important;

        height: auto !important;
        max-height: 44px !important;

        margin: 0 !important;

        object-fit: contain;
    }


    .header-actions {
        grid-area: actions;

        justify-self: start;

        min-width: max-content;

        gap: 13px;

        direction: ltr;
    }


    .language-switch {
        gap: 7px;
    }


    .lang-btn {
        font-size: 15px;
    }


    .language-switch span {
        font-size: 13px;
    }


    .search-button {
        font-size: 19px;

        padding: 3px;
    }


    .main-nav {
        grid-area: nav;

        width: 100%;

        display: grid;

        grid-template-columns: repeat(3, minmax(0, 1fr));

        align-items: center;

        gap: 5px 8px;

        margin: 0;
        padding: 0;
    }


    .main-nav a {
        display: flex;
        align-items: center;
        justify-content: center;

        min-width: 0;
        min-height: 30px;

        padding: 4px 2px;

        color: #F3EEE4;

        font-size: 13px;
        line-height: 1.25;

        text-align: center;

        white-space: normal;

        overflow-wrap: break-word;
    }


    .main-nav a.active::after {
        right: 15%;
        bottom: -2px;

        width: 70%;
        height: 1px;
    }


    .no-logo-header {
        grid-template-areas:
            "actions actions"
            "nav nav";
    }


    .no-logo-header .header-actions {
        justify-self: start;
    }

}


/* ========================================
   SMALL MOBILE
======================================== */

@media (max-width: 480px) {

    .site-header,
    .contact-header {
        min-height: 116px !important;

        padding: 9px 10px 8px !important;

        column-gap: 8px;
        row-gap: 7px;
    }


    .logo-link img,
    .contact-header .contact-header-logo {
        max-width: 110px !important;
        max-height: 40px !important;
    }


    .header-actions {
        gap: 10px;
    }


    .language-switch {
        gap: 5px;
    }


    .lang-btn {
        font-size: 14px;
    }


    .search-button {
        font-size: 18px;
    }


    .main-nav {
        gap: 4px 5px;
    }


    .main-nav a {
        min-height: 29px;

        padding: 3px 1px;

        font-size: 12px;
        line-height: 1.2;
    }

}