/* =========================================================
   TOP HEADER
========================================================= */

.site-topbar {
    position: relative;
    z-index: 1100;
    background: var(--color-background);
    margin-top: 8px;
}

.site-topbar__bar {
    height: 38px;
    border-radius: var(--border-radius);
    color: #ffffff;
    background: var(--color-text);
}

.site-topbar__inner {
    display: flex;
    height: 38px;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    font-family: var(--font-main);
    font-size: 14px;
    line-height: 1.08;
    font-weight: 500;
}

.site-topbar__left {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 28px;
}

.site-topbar__phones,
.site-topbar__location {
    position: relative;
    display: flex;
    align-items: center;
}

.site-topbar__phones {
    gap: 8px;
}

.site-topbar__location {
    gap: 8px;
}

.site-topbar__icon {
    display: block;
    flex: 0 0 auto;
    object-fit: contain;
    opacity: 0.65;
}

.site-topbar__icon--phone {
    width: 19px;
    height: 19px;
}

.site-topbar__icon--location {
    width: 20px;
    height: 20px;
}

.site-topbar a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.site-topbar a:hover {
    opacity: 0.7;
}

.site-topbar__phone-current {
    white-space: nowrap;
}

.site-topbar__phone-toggle {
    display: inline-flex;
    width: 20px;
    height: 24px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    color: inherit;
    background: transparent;
    cursor: pointer;
}

.site-topbar__phone-toggle img {
    display: block;
    width: 10px;
    height: auto;
    transition: transform 0.2s ease;
}

.site-topbar__phones.is-open .site-topbar__phone-toggle img {
    transform: rotate(180deg);
}

.site-topbar__phone-dropdown {
    display: flex;
    flex-direction: column;
    position: absolute;
    z-index: 30;
    top: calc(100% + 9px);
    min-width: 170px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: var(--color-text);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition:
        opacity 0.2s ease,
        visibility 0.2s ease,
        transform 0.2s ease;
}

.site-topbar__phone-dropdown .site-topbar__contact {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    box-sizing: border-box;
    border-radius: 7px;
}

.site-topbar__phone-dropdown .site-topbar__contact:hover {
    background: rgba(255, 255, 255, 0.08);
    opacity: 1;
}

.site-topbar__contact-icon {
    display: block;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    object-fit: contain;
}

.site-topbar__contact-number {
    display: block;
    white-space: nowrap;
}

.site-topbar__phones.is-open .site-topbar__phone-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.site-topbar__phone-dropdown a {
    display: block;
    white-space: nowrap;
}

.site-topbar__location a,
.site-topbar__location span,
.site-topbar__hours {
    white-space: nowrap;
}

.site-topbar__hours {
    flex: 0 0 auto;
    text-align: right;
}

.site-topbar__languages .site-topbar__phone-dropdown {
    left: 50%;
    min-width: 78px;
    padding: 8px;
    transform: translate(-50%, -6px);
}

.site-topbar__phones.site-topbar__languages.is-open .site-topbar__phone-dropdown {
    transform: translate(-50%, 0);
}

.site-topbar__languages .site-topbar__contact {
    justify-content: center;
    min-height: 36px;
    padding: 8px 12px;
}

.site-topbar__languages .site-topbar__contact-number {
    text-align: center;
}



/* =========================================================
   STICKY HEADER
========================================================= */

.site-header {
    position: sticky;
    z-index: 1000;
    top: 0;
    height: 65px;
    background: transparent;
}

.site-header__frame {
    position: relative;
    height: 65px;
    background: var(--color-background);
}

.site-header__frame::after {
    position: absolute;
    z-index: 2;
    right: 0;
    bottom: 0;
    left: 0;
    height: 1px;
    background: rgba(44, 44, 44, 0.05);
    content: "";
    pointer-events: none;
}

.admin-bar .site-header {
    top: 32px;
}

.site-header__inner {
    display: grid;
    height: 65px;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 34px;
}


/* =========================================================
   HEADER LOGO
========================================================= */

.site-header__brand {
    display: flex;
    height: 65px;
    min-width: 0;
    align-items: center;
    justify-self: start;
}

.site-header__logo {
    display: flex;
    height: 65px;
    max-width: 220px;
    align-items: center;
    color: var(--color-text);
    line-height: 0;
    text-decoration: none;
}

.site-header__logo-image {
    display: block;
    width: auto;
    height: 39px;
    max-width: 100%;
    max-height: none;
    object-fit: contain;
}

.site-header__logo-text {
    color: var(--color-text);
    font-size: 20px;
    line-height: 1.1;
    font-weight: 600;
}


/* =========================================================
   HEADER NAVIGATION
========================================================= */

.site-header__nav {
    display: flex;
    height: 65px;
    min-width: 0;
    align-items: center;
    justify-content: center;
    justify-self: center;
}

.header-menu {
    display: flex;
    height: 65px;
    align-items: center;
    justify-content: center;
    gap: 28px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.header-menu > li {
    display: flex;
    height: 65px;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.header-menu > li > a {
    position: relative;
    display: flex;
    height: 65px;
    align-items: center;
    padding: 0;
    color: var(--color-text);
    font-size: 14px;
    line-height: 1.08;
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;
    transition: color 0.2s ease;
}

.header-menu > li > a::after {
    position: absolute;
    right: 0;
    bottom: 12px;
    left: 0;
    height: 1px;
    background: var(--color-accent);
    content: "";
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform 0.25s ease;
}

.header-menu > li > a:hover,
.header-menu > .current-menu-item > a,
.header-menu > .current-menu-parent > a,
.header-menu > .current-menu-ancestor > a {
    color: var(--color-accent);
}

.header-menu > li > a:hover::after,
.header-menu > .current-menu-item > a::after,
.header-menu > .current-menu-parent > a::after,
.header-menu > .current-menu-ancestor > a::after {
    transform: scaleX(1);
    transform-origin: left center;
}


/* =========================================================
   HEADER RIGHT SIDE
========================================================= */

.site-header__right {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: flex-end;
    justify-self: end;
    gap: 22px;
}

.site-header__phones {
    display: flex;
    align-items: center;
    gap: 18px;
}

.site-header__phone {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--color-text);
    font-size: 15px;
    line-height: 1.08;
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.site-header__phone:hover {
    opacity: 0.65;
}

.site-header__phone img {
    display: block;
    width: 13px;
    height: 13px;
    flex: 0 0 auto;
    object-fit: contain;
}


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

.site-header__burger {
    display: none;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    padding: 8px;
    border: 0;
    color: var(--color-text);
    background: transparent;
    cursor: pointer;
}

.site-header__burger span {
    display: block;
    width: 100%;
    height: 1px;
    margin: 6px 0;
    background: currentColor;
    transition:
        transform 0.25s ease,
        opacity 0.25s ease;
}

.site-header__mobile-menu-meta {
    display: none;
}

.site-header__mobile-languages {
    display: none;
}


/* =========================================================
   RESPONSIVE — TABLET
========================================================= */

@media (max-width: 1240px) {
    .site-header__inner {
        gap: 22px;
    }

    .header-menu {
        gap: 20px;
    }

    .site-header__phones {
        gap: 12px;
    }

    .site-header__phone {
        font-size: 12px;
    }
}

@media (max-width: 1100px) {
    .header-menu {
        gap: 16px;
    }

    .site-header__phone span {
        display: none;
    }

    .site-header__phone img {
        width: 17px;
        height: 17px;
    }
}


/* =========================================================
   RESPONSIVE — MOBILE HEADER
========================================================= */

@media (max-width: 991px) {
    html.menu-open,
    body.menu-open {
        overflow: hidden;
        overscroll-behavior: none;
    }

    /* =====================================================
       MOBILE TOPBAR
    ===================================================== */

    .site-topbar {
        position: relative;
        z-index: 1300;
        width: 100%;
        height: 56px;
        margin-top: 0;
        padding: 8px 16px;
        background: var(--color-background);
        box-sizing: border-box;
    }

    .site-topbar .header-frame {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    .site-topbar .container {
        width: 100%;
        max-width: none;
        margin: 0;
        box-sizing: border-box;
    }

    .site-topbar__bar {
        width: 100%;
        height: 40px;
        border-radius: 13px;
        color: #ffffff;
        background: var(--color-text);
        box-sizing: border-box;
    }

    .site-topbar .site-topbar__inner {
        display: flex;
        width: 100%;
        max-width: 100%;
        height: 40px;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 0 16px;
        box-sizing: border-box;
        font-family: var(--font-main);
        font-size: 12px;
        line-height: 1.1;
        font-weight: 500;
    }

    .site-topbar__left {
        display: flex;
        min-width: 0;
        flex: 1 1 auto;
        align-items: center;
        gap: 0;
    }

    .site-topbar__phones {
        display: flex;
        min-width: 0;
        align-items: center;
        gap: 7px;
    }

    .site-topbar__icon--phone {
        width: 24px;
        height: 24px;
        flex: 0 0 24px;
    }

    .site-topbar__phone-current {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .site-topbar__phone-toggle {
        display: inline-flex;
        width: 18px;
        height: 24px;
        flex: 0 0 18px;
        align-items: center;
        justify-content: center;
        margin-left: 2px;
        padding: 0;
        border: 0;
        background: transparent;
    }

    .site-topbar__phone-toggle img {
        display: block;
        width: 12px;
        height: auto;
    }

    .site-topbar__location {
        display: none;
    }

    .site-topbar__hours {
        flex: 0 0 auto;
        color: #ffffff;
        font-size: 12px;
        line-height: 1.1;
        font-weight: 500;
        text-align: right;
        white-space: nowrap;
    }

    .site-topbar__phone-dropdown {
        top: calc(100% + 10px);
        left: 0;
        min-width: 190px;
        padding: 8px;
        border-radius: 13px;
        margin-left: -16px;
    }
    
.site-topbar__phones.site-topbar__language,
.site-topbar__phones.site-topbar__languages {
    display: none !important;
}

.site-header__mobile-languages {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 28px;
}

.site-header__mobile-language {
    display: inline-flex;
    align-items: center;
    color: var(--color-text);
    font-size: 14px;
    line-height: 1.25;
    font-weight: 400;
    letter-spacing: -0.025em;
    text-decoration: none;
}

.site-header__mobile-language.is-active {
    color: var(--color-accent);
}


    /* =====================================================
       MOBILE HEADER ROW
    ===================================================== */

    .site-header {
        position: sticky;
        z-index: 1250;
        top: 0;
        width: 100%;
        height: 68px;
        background: var(--color-background);
    }

    .site-header__frame {
        width: 100%;
        max-width: none;
        height: 68px;
        margin: 0;
        overflow: visible;
        border-radius: 0;
        background: var(--color-background);
    }

    .site-header__frame::after {
        display: none;
    }

    .site-header__frame > .container {
        width: 100%;
        max-width: none;
        height: 68px;
        margin: 0;
        padding-right: 32px;
        padding-left: 32px;
    }

    .site-header__inner {
        display: grid;
        width: 100%;
        height: 68px;
        grid-template-columns: 30px minmax(0, 1fr);
        align-items: center;
        gap: 20px;
    }

    .site-header__brand {
        grid-column: 2;
        grid-row: 1;
        display: flex;
        height: 68px;
        align-items: center;
        justify-self: end;
    }

    .site-header__logo {
        display: flex;
        width: 155px;
        height: 37px;
        max-width: 155px;
        align-items: center;
        justify-content: flex-end;
    }

    .site-header__logo-image {
        display: block;
        width: 155px;
        height: 37px;
        max-width: 155px;
        max-height: 37px;
        object-fit: contain;
    }

    .site-header__right {
        grid-column: 1;
        grid-row: 1;
        display: flex;
        align-items: center;
        justify-self: start;
        gap: 0;
    }

    .site-header__phones {
        display: none;
    }


    /* =====================================================
       MOBILE BURGER
    ===================================================== */

    .site-header__burger {
        position: relative;
        z-index: 1600;
        display: flex;
        width: 30px;
        height: 13px;
        flex: 0 0 30px;
        flex-direction: column;
        align-items: stretch;
        justify-content: space-between;
        margin: 0;
        padding: 0;
        border: 0;
        color: var(--color-text);
        background: transparent;
        cursor: pointer;
    }

    .site-header__burger span {
        display: block;
        width: 30px;
        height: 1px;
        margin: 0;
        background: currentColor;
        opacity: 1;
        transform: none;
        transition: opacity 0.18s ease;
    }

    body.menu-open .site-header__burger span:nth-child(2),
    body.menu-open .site-header__burger span:nth-child(3) {
        opacity: 0;
    }


    /* =====================================================
       MENU OPEN: TOP OF PAGE
       topbar + header visible
    ===================================================== */

    body.menu-open:not(.is-mobile-header-scrolled) .site-topbar {
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
    }

    body.menu-open:not(.is-mobile-header-scrolled) .site-header {
        position: fixed;
        top: 56px;
        right: 0;
        left: 0;
    }

    body.menu-open:not(.is-mobile-header-scrolled) .site-header__nav {
        top: 124px;
        height: calc(100dvh - 124px);
    }


    /* =====================================================
       MENU OPEN: PAGE SCROLLED
       only lower header visible
    ===================================================== */

    body.menu-open.is-mobile-header-scrolled .site-topbar {
        display: none;
    }

    body.menu-open.is-mobile-header-scrolled .site-header {
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
    }

    body.menu-open.is-mobile-header-scrolled .site-header__nav {
        top: 68px;
        height: calc(100dvh - 68px);
    }


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

    .site-header__nav {
        position: fixed;
        z-index: 1200;
        right: 0;
        bottom: 0;
        left: 0;
        display: flex;
        width: 100%;
        min-height: 0;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        padding: 18px 48px 36px;
        overflow-x: hidden;
        overflow-y: auto;
        border-radius: 0;
        background: var(--color-background);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: none;
        transition:
            opacity 0.22s ease,
            visibility 0.22s ease;
    }

    body.menu-open .site-header__nav {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }


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

    .header-menu {
		display: flex;
        width: 100%;
        height: auto;
        flex: 0 0 auto;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 24px;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .header-menu > li {
        display: block;
        width: 100%;
        height: auto;
        margin: 0;
        padding: 0;
    }

    .header-menu > li > a {
        display: inline-flex;
        width: auto;
        height: auto;
        align-items: center;
        padding: 0;
        color: var(--color-text);
        font-size: 14px;
        line-height: 1.25;
        font-weight: 400;
        letter-spacing: -0.025em;
        white-space: normal;
        text-decoration: none;
    }

    .header-menu > li > a::after {
        display: none;
    }

    .header-menu > li > a:hover,
    .header-menu > .current-menu-item > a,
    .header-menu > .current-menu-parent > a,
    .header-menu > .current-menu-ancestor > a {
        color: var(--color-text);
    }


    /* =====================================================
       MOBILE CONTACTS AND SOCIALS
    ===================================================== */

    .site-header__mobile-menu-meta {
        display: flex;
        width: 100%;
        flex: 1 0 auto;
        flex-direction: column;
        justify-content: flex-end;
        margin-top: 70px;
    }

    .site-header__mobile-contacts {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }

    .site-header__mobile-contact {
        color: var(--color-text);
        font-size: 14px;
        line-height: 1.2;
        font-weight: 400;
        letter-spacing: -0.02em;
        text-decoration: none;
    }

    .site-header__mobile-socials {
        display: flex;
        width: 100%;
        align-items: center;
        justify-content: space-between;
        gap: 18px;
        margin-top: clamp(64px, 12vh, 135px);
    }

    .site-header__mobile-social {
        display: inline-flex;
        width: clamp(84px, 20vw, 118px);
        height: clamp(84px, 20vw, 118px);
        flex: 0 0 clamp(84px, 20vw, 118px);
        align-items: center;
        justify-content: center;
        border: 1px solid rgba(44, 44, 44, 0.08);
        border-radius: 50%;
        color: var(--color-text);
        background: transparent;
        text-decoration: none;
    }

    .site-header__mobile-social svg {
        display: block;
        width: 31px;
        height: 31px;
        overflow: visible;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .site-header__mobile-social-dot {
        fill: currentColor;
        stroke: none;
    }
}


/* =========================================================
   MOBILE — HOME FIRST SECTION OFFSET
========================================================= */

@media (max-width: 991px) {
    .home-hero {
        padding-top: 16px;
    }
}


/* =========================================================
   WORDPRESS ADMIN BAR
========================================================= */

@media (max-width: 991px) {
    .admin-bar .site-header {
        top: 32px;
    }

    body.menu-open:not(.is-mobile-header-scrolled).admin-bar .site-topbar {
        top: 32px;
    }

    body.menu-open:not(.is-mobile-header-scrolled).admin-bar .site-header {
        top: 88px;
    }

    body.menu-open:not(.is-mobile-header-scrolled).admin-bar .site-header__nav {
        top: 156px;
        height: calc(100dvh - 156px);
    }

    body.menu-open.is-mobile-header-scrolled.admin-bar .site-header {
        top: 32px;
    }

    body.menu-open.is-mobile-header-scrolled.admin-bar .site-header__nav {
        top: 100px;
        height: calc(100dvh - 100px);
    }
}

@media (max-width: 782px) {
    .admin-bar .site-header {
        top: 46px;
    }

    body.menu-open:not(.is-mobile-header-scrolled).admin-bar .site-topbar {
        top: 46px;
    }

    body.menu-open:not(.is-mobile-header-scrolled).admin-bar .site-header {
        top: 102px;
    }

    body.menu-open:not(.is-mobile-header-scrolled).admin-bar .site-header__nav {
        top: 170px;
        height: calc(100dvh - 170px);
    }

    body.menu-open.is-mobile-header-scrolled.admin-bar .site-header {
        top: 46px;
    }

    body.menu-open.is-mobile-header-scrolled.admin-bar .site-header__nav {
        top: 114px;
        height: calc(100dvh - 114px);
    }
}


/* =========================================================
   MOBILE WIDTH ADAPTATION
========================================================= */

@media (max-width: 390px) {
    .site-topbar__phone-current,
    .site-topbar__hours {
        font-size: 11px;
    }

    .site-header__frame > .container {
        padding-right: 32px;
        padding-left: 32px;
    }

    .site-header__logo,
    .site-header__logo-image {
        width: 155px;
        max-width: 155px;
    }

    .site-header__nav {
        padding-right: 32px;
        padding-left: 32px;
    }

    .site-header__mobile-social {
        width: 88px;
        height: 88px;
        flex-basis: 88px;
    }
}


/* =========================================================
   SHORT MOBILE SCREENS
========================================================= */

@media (max-width: 991px) and (max-height: 850px) {
    .site-header__nav {
        padding-top: 18px;
        padding-bottom: 22px;
    }

    .header-menu {
        gap: 24px;
    }

    .header-menu > li > a {
        font-size: 14px;
    }

    .site-header__mobile-menu-meta {
        margin-top: 44px;
    }

    .site-header__mobile-contacts {
        gap: 16px;
    }

    .site-header__mobile-socials {
        margin-top: 44px;
    }

    .site-header__mobile-social {
        width: 76px;
        height: 76px;
        flex-basis: 76px;
    }

    .site-header__mobile-social svg {
        width: 25px;
        height: 25px;
    }
}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {
    .site-header__nav,
    .site-header__burger span {
        transition: none;
    }
}