/* ÐžÑÐ½Ð¾Ð²Ð½Ñ‹Ðµ ÑÑ‚Ð¸Ð»Ð¸ Ð´Ð»Ñ Ð´ÐµÑÐºÑ‚Ð¾Ð¿Ð° */
.site-header-first {
    width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin: auto;
}

.logo-first {
    display: block;
}

.logo-images-first {
    position: relative;
    width: 120px;
    height: 30px;
}

.logo-images-first img {
    position: absolute;
}

.logo-union-first {
    top: 0;
    left: 0;
    width: 27.81px;
    height: 28px;
}

.header-block {
    width: 100%;
    position: fixed;
    left: 0;
    height: 70px;
    top: 0;
    padding-top: 20px;
    background-color: var(--color-background);
    z-index: 1006;
    border-bottom: 1px solid #29373c;
}

.logo-text-first {
    top: 7.2px;
    left: 32.32px;
    width: 87.03px;
    height: 14.6px;
}

.main-nav-ul-first {
    display: flex;
    gap: 40px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.main-nav-first a {
    font-family: var(--font-primary);
    font-weight: 300;
    font-size: 15px;
    line-height: 22.5px;
    letter-spacing: 0.6px;
    text-decoration: none;
    color: var(--color-text-light);
    transition: color 0.3s ease;
}

.main-nav-first a:hover {
    color: var(--color-accent-gold);
}

.header-contacts-first {
    display: flex;
    gap: 15px;
    align-items: center;
}

.contact-link {
    display: flex;
    align-items: center;
    transition: opacity 0.3s ease;
}

.contact-link:hover {
    opacity: 0.8;
}

.login-link-first {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-primary);
    font-weight: 400;
    font-size: 12px;
    line-height: 18px;
    letter-spacing: 0.48px;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--color-text-light);
}

.login-icon-wrapper-first {
    position: relative;
    width: 26px;
    height: 26px;
}

.login-icon-wrapper-first img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.login-icon-bg-first {
    width: 26px;
    height: 26px;
}

.login-icon-user-first {
    width: 16.25px;
    height: 15.78px;
}

/* Ð¡Ñ‚Ð¸Ð»Ð¸ Ð´Ð»Ñ Ð²Ñ‹Ð¿Ð°Ð´Ð°ÑŽÑ‰ÐµÐ³Ð¾ Ð¼ÐµÐ½ÑŽ Ð¿Ñ€Ð¾Ð´ÑƒÐºÑ‚Ð¾Ð² */
.header_menu-page {
    position: relative;
}

.header_submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--color-background);
    min-width: 295px;
    border: 1px solid #3a4a50;
    border-radius: 4px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    margin: 0;
    list-style: none;
}

.header_menu-page:hover .header_submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header_submenu li {
    margin: 0;
    padding: 0;
}

.header_submenu a {
    display: block;
    padding: 8px 20px;
    font-family: var(--font-primary);
    font-weight: 400;
    font-size: 14px;
    line-height: 1.4;
    text-decoration: none;
    color: var(--color-text-light);
    transition: all 0.2s ease;
}

.header_submenu a:hover {
    background-color: rgba(224, 189, 72, 0.1);
    color: var(--color-accent-gold);
}

/* Ð¡Ñ‚Ð¸Ð»ÑŒ Ð´Ð»Ñ Ð¿Ñ€Ð¾Ð´ÑƒÐºÑ‚Ð¾Ð² Ð°Ð´Ð¼Ð¸Ð½Ð¸ÑÑ‚Ñ€Ð°Ñ‚Ð¾Ñ€Ð° */
.header_submenu li[th\\:if] a {
    border-top: 1px solid #3a4a50;
    margin-top: 5px;
    padding-top: 10px;
    color: var(--color-accent-gold-lighter);
}

/* ÐœÐ¾Ð±Ð¸Ð»ÑŒÐ½Ð°Ñ Ð²ÐµÑ€ÑÐ¸Ñ */
@media screen and (max-width: 1199px) {
    .site-header-first {
        width: 100%;
        padding: 0 20px;
        justify-content: space-between;
        height: 70px;
        align-items: center;
    }

    .main-nav-first {
        display: none;
    }

    .header-contacts-first {
        display: none;
    }

    .header-auth-first {
        display: flex;
        align-items: center;
        margin-right: 15px;
    }

    .header-auth-first .login-text {
        display: none !important; /* Ð¡ÐºÑ€Ñ‹Ð²Ð°ÐµÐ¼ Ñ‚ÐµÐºÑÑ‚ Ð½Ð° Ð¼Ð¾Ð±Ð¸Ð»ÑŒÐ½Ñ‹Ñ… */
    }

    .login-link-first {
        padding: 0;
    }

    .mobile-first {
        display: flex;
        align-items: center;
        order: 3; /* ÐŸÐ¾Ð¼ÐµÑ‰Ð°ÐµÐ¼ Ð² ÐºÐ¾Ð½ÐµÑ† ÑÑ‚Ñ€Ð¾ÐºÐ¸ */
    }

    .mobile-menu-first {
        width: 30px;
        height: 30px;
        cursor: pointer;
        position: relative;
        background-image: url(/img/header/menu.svg);
        background-repeat: no-repeat;
        background-position: center;
        background-size: contain;
        filter: brightness(0) invert(1);
        margin-left: 10px; /* ÐžÑ‚ÑÑ‚ÑƒÐ¿ Ð¾Ñ‚ Ð¸ÐºÐ¾Ð½ÐºÐ¸ Ð²Ñ…Ð¾Ð´Ð° */
    }

    /* ÐŸÐµÑ€ÐµÑƒÐ¿Ð¾Ñ€ÑÐ´Ð¾Ñ‡Ð¸Ð²Ð°ÐµÐ¼ ÑÐ»ÐµÐ¼ÐµÐ½Ñ‚Ñ‹ Ð² Ñ…ÐµÐ´ÐµÑ€Ðµ */
    .site-header-first {
        display: flex;
        justify-content: space-between;
    }

    .logo-first {
        order: 1;
        margin-right: auto;
    }

    .header-block{
        padding-top: 0;
    }

    .header-auth-first {
        order: 2;
        margin-left: auto;
        margin-right: 0;
    }

    .mobile-first {
        order: 3;
    }

    .mobile-menu-block-first {
        position: fixed;
        top: 0;
        left: -400px; /* Ð˜Ð·Ð¼ÐµÐ½ÐµÐ½Ð¾ Ñ right Ð½Ð° left */
        width: 300px;
        height: 100vh;
        background-color: var(--color-background);
        z-index: 1001;
        transition: left 0.3s ease; /* Ð˜Ð·Ð¼ÐµÐ½ÐµÐ½Ð¾ Ñ right Ð½Ð° left */
        overflow-y: auto;
        padding: 20px;
        border-right: 1px solid #3a4a50; /* Ð˜Ð·Ð¼ÐµÐ½ÐµÐ½Ð¾ Ñ border-left Ð½Ð° border-right */
    }

    .mobile-menu-block-first.active {
        left: 0; /* Ð˜Ð·Ð¼ÐµÐ½ÐµÐ½Ð¾ Ñ right Ð½Ð° left */
    }

    .mobile-menu-overlay-first {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.6);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        pointer-events: none; /* ÐŸÐ¾ ÑƒÐ¼Ð¾Ð»Ñ‡Ð°Ð½Ð¸ÑŽ Ð½Ðµ ÐºÐ»Ð¸ÐºÐ°Ð±ÐµÐ»ÑŒÐ½Ð¾ */
    }

    .mobile-menu-overlay-first.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto; /* Ð¡Ñ‚Ð°Ð½Ð¾Ð²Ð¸Ñ‚ÑÑ ÐºÐ»Ð¸ÐºÐ°Ð±ÐµÐ»ÑŒÐ½Ñ‹Ð¼ Ð¿Ñ€Ð¸ Ð°ÐºÑ‚Ð¸Ð²Ð°Ñ†Ð¸Ð¸ */
    }

    .mobile-menu-list-first {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .mobile-menu-list-first li {
        padding: 12px 0;
        border-bottom: 1px solid #3a4a50;
    }

    .mobile-menu-list-first li a {
        text-decoration: none;
        color: var(--color-text-light);
        display: block;
        font-family: var(--font-primary);
        font-size: 16px;
        transition: color 0.2s ease;
    }

    .mobile-menu-list-first li a:hover {
        color: var(--color-accent-gold);
    }

    .close-menu-first {
        cursor: pointer;
        font-weight: bold;
        color: var(--color-text-light);
        text-align: right;
        border-bottom: 1px solid #3a4a50;
        padding-bottom: 15px;
        margin-bottom: 10px;
        transition: color 0.2s ease;
    }

    .close-menu-first:hover {
        color: var(--color-accent-gold);
    }

    .has-submenu-first {
        position: relative;
    }

    .submenu-first {
        display: none;
        list-style: none;
        padding-left: 20px;
        margin-top: 10px;
    }

    .submenu-first.active {
        display: block;
    }

    .submenu-first li {
        border-bottom: none;
        padding: 8px 0;
    }

    .submenu-first a {
        font-size: 14px;
        color: var(--color-text-lighter);
    }

    .submenu-first a:hover {
        color: var(--color-accent-gold);
    }

    .arrow-first {
        cursor: pointer;
        display: inline-block;
        margin-left: 5px;
        font-size: 12px;
        color: var(--color-accent-gold);
        transition: transform 0.3s ease;
    }

    .has-submenu-first.active .arrow-first {
        transform: rotate(180deg);
    }
}

/* Ð”ÐµÑÐºÑ‚Ð¾Ð¿Ð½Ð°Ñ Ð²ÐµÑ€ÑÐ¸Ñ */
@media screen and (min-width: 1200px) {
    .mobile-first {
        display: none;
    }

    .mobile-menu-overlay-first {
        display: none;
    }

    .header-contacts-first {
        display: flex;
    }

    .header-auth-first .login-text {
        display: inline !important;
    }

    .logo-first {
        order: 1;
    }

    .main-nav-first {
        order: 2;
        margin: 0 auto;
    }

    .header-contacts-first {
        order: 3;
        margin-left: auto;
        margin-right: 20px;
    }

    .header-auth-first {
        order: 4;
    }
}