:root {
    --header-sticky-height: 72px;
}

.site-header {
    background: linear-gradient(90deg, var(--color-dark), var(--color-dark-2));
    color: #ffffff;
    position: sticky;
    top: 0;
    z-index: 50;
}

.screen-reader-text {
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    position: absolute;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.site-header__inner {
    max-width: var(--container-wide);
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-5);
}

.site-logo {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    color: #ffffff;
    text-decoration: none;
    flex-shrink: 0;
}

.site-logo__icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.site-logo__icon::before {
    width: var(--space-7);
    height: var(--space-7);
    background-color: var(--color-primary);
    content: '';
    mask: url('../../svg/washing-machine-2.svg') center / contain no-repeat;
    -webkit-mask: url('../../svg/washing-machine-2.svg') center / contain no-repeat;
}

.site-logo__text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.site-logo__text strong {
    font-size: var(--text-md);
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.site-logo__text small {
    color: rgba(255, 255, 255, 0.76);
    font-size: 12px;
    white-space: nowrap;
}

.site-logo__tagline {
    color: rgba(255, 255, 255, 0.76);
}

.site-nav__list {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav a {
    color: rgba(255, 255, 255, 0.88);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: color 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
    color: #ffffff;
}

.site-nav .current-menu-item > a,
.site-nav .current_page_item > a,
.site-nav a.is-active {
    color: #ffffff;
}

.site-nav--desktop a {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    position: relative;
}

.site-nav--desktop a::after {
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: var(--color-primary);
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 180ms ease;
}

.site-nav--desktop a:hover::after,
.site-nav--desktop a:focus-visible::after,
.site-nav--desktop .current-menu-item > a::after,
.site-nav--desktop .current_page_item > a::after,
.site-nav--desktop a.is-active::after {
    transform: scaleX(1);
    transform-origin: left;
}

.site-nav--desktop.has-section-active .current-menu-item > a:not(.is-active)::after,
.site-nav--desktop.has-section-active .current_page_item > a:not(.is-active)::after {
    transform: scaleX(0);
}

.site-header__phone {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    color: #ffffff;
    text-decoration: none;
    flex-shrink: 0;
}

.site-header__location {
    border: 1px solid rgba(47, 111, 203, 0.5);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.92);
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 6px var(--space-3);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.site-header__location::before {
    width: 12px;
    height: 12px;
    background: var(--color-primary);
    content: "";
    flex: 0 0 12px;
    mask: url('../../svg/hero/location.svg') center / contain no-repeat;
    -webkit-mask: url('../../svg/hero/location.svg') center / contain no-repeat;
}

.site-header__phone-icon {
    width: var(--space-6);
    height: var(--space-6);
    background-color: var(--color-primary);
    flex-shrink: 0;
    mask: url('../../svg/phone-call.svg') center / contain no-repeat;
    -webkit-mask: url('../../svg/phone-call.svg') center / contain no-repeat;
}

.site-header__phone > span:last-child,
.mobile-menu__phone > span:last-child {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.site-header__phone strong {
    font-size: 20px;
    font-weight: 800;
    white-space: nowrap;
}

.site-header__phone small {
    color: rgba(255, 255, 255, 0.76);
    font-size: 12px;
}

.menu-toggle {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    padding: 0;
    cursor: pointer;
}

.menu-toggle__line {
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: #ffffff;
}

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

@media (min-width: 981px) and (max-width: 1200px) {
    .site-header__inner {
        gap: var(--space-3);
    }

    .site-logo {
        gap: var(--space-2);
    }

    .site-logo__icon {
        width: 40px;
        height: 40px;
    }

    .site-logo__icon::before {
        width: 40px;
        height: 40px;
    }

    .site-logo__text strong {
        font-size: var(--text-sm);
    }

    .site-logo__text small {
        font-size: 10px;
    }

    .site-nav__list {
        gap: var(--space-3);
    }

    .site-nav a {
        font-size: 12px;
    }

    .site-header__phone {
        gap: var(--space-2);
    }

    .site-header__phone-icon {
        width: 26px;
        height: 26px;
    }

    .site-header__phone strong {
        font-size: var(--text-sm);
    }

    .site-header__phone small {
        display: none;
    }

    .site-header__location {
        padding: 5px var(--space-2);
        font-size: 11px;
    }
}

@media (max-width: 980px) {
    .site-header__inner {
        max-width: var(--container);
        display: grid;
        grid-template-columns: 44px minmax(0, auto) minmax(0, 1fr) auto;
        justify-content: initial;
        gap: var(--space-4);
    }

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

    .site-nav--desktop {
        display: none;
    }

    .menu-toggle {
        display: flex;
        grid-column: 1;
        grid-row: 1;
    }

    .site-logo {
        grid-column: 2;
        grid-row: 1;
        justify-self: start;
    }

    .site-header__phone {
        grid-column: 4;
        grid-row: 1;
        justify-self: end;
    }

    .site-header__location {
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
    }

    .mobile-menu {
        width: 100%;
        max-height: min(720px, calc(100dvh - var(--space-5)));
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
        background: linear-gradient(145deg, var(--color-dark), var(--color-dark-2));
        box-shadow: 0 24px 70px rgba(3, 15, 29, 0.35);
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 70;
        overflow-y: auto;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-100%);
        transition: transform 320ms ease, opacity 240ms ease;
    }

    .mobile-menu.is-open {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .mobile-menu__inner {
        padding-top: var(--space-4);
        padding-bottom: var(--space-5);
    }

    .mobile-menu__header {
        min-height: 48px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-bottom: var(--space-3);
    }

    .mobile-menu__title {
        font-size: var(--text-lg);
    }

    .mobile-menu__close {
        width: 44px;
        height: 44px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.06);
        position: relative;
        padding: 0;
        cursor: pointer;
    }

    .mobile-menu__close span {
        width: 20px;
        height: 2px;
        border-radius: 2px;
        background: #ffffff;
        position: absolute;
        top: 50%;
        left: 50%;
    }

    .mobile-menu__close span:first-child {
        transform: translate(-50%, -50%) rotate(45deg);
    }

    .mobile-menu__close span:last-child {
        transform: translate(-50%, -50%) rotate(-45deg);
    }

    .site-nav__list--mobile {
        display: grid;
        gap: 0;
        padding: 0;
    }

    .site-nav__list--mobile li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .site-nav__list--mobile a {
        min-height: 56px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 2px;
        font-size: var(--text-md);
    }

    .site-nav__list--mobile a::after {
        width: 10px;
        height: 18px;
        background-color: var(--color-primary);
        content: '';
        flex-shrink: 0;
        mask: url('../../svg/arrow-right.svg') center / contain no-repeat;
        -webkit-mask: url('../../svg/arrow-right.svg') center / contain no-repeat;
    }

    .site-nav__list--mobile .current-menu-item > a,
    .site-nav__list--mobile .current_page_item > a,
    .site-nav__list--mobile a.is-active {
        color: #ffffff;
        font-weight: 800;
    }

    .site-nav__list--mobile .current-menu-item > a::after,
    .site-nav__list--mobile .current_page_item > a::after,
    .site-nav__list--mobile a.is-active::after {
        background-color: #ffffff;
    }

    .site-nav--mobile.has-section-active .current-menu-item > a:not(.is-active),
    .site-nav--mobile.has-section-active .current_page_item > a:not(.is-active) {
        color: rgba(255, 255, 255, 0.82);
        font-weight: 600;
    }

    .site-nav--mobile.has-section-active .current-menu-item > a:not(.is-active)::after,
    .site-nav--mobile.has-section-active .current_page_item > a:not(.is-active)::after {
        background-color: var(--color-primary);
    }

    .mobile-menu__contact {
        padding-top: var(--space-4);
    }

    .mobile-menu__phone {
        border: 1px solid rgba(47, 111, 203, 0.45);
        border-radius: var(--radius-md);
        background: rgba(47, 111, 203, 0.12);
        color: #ffffff;
        display: flex;
        align-items: center;
        gap: var(--space-3);
        padding: var(--space-4);
        text-decoration: none;
    }

    .mobile-menu__phone strong {
        font-size: 18px;
    }

    .mobile-menu__phone small {
        margin-top: var(--space-1);
        color: rgba(255, 255, 255, 0.7);
        font-size: 12px;
    }

    .mobile-menu-overlay {
        background: rgba(3, 15, 29, 0.58);
        backdrop-filter: blur(3px);
        display: block;
        position: fixed;
        inset: 0;
        z-index: 60;
        opacity: 0;
        pointer-events: none;
        transition: opacity 240ms ease;
    }

    .mobile-menu-overlay.is-open {
        opacity: 1;
        pointer-events: auto;
    }
}

@media (min-width: 681px) and (max-width: 900px) {
    .site-header__inner {
        grid-template-columns: 44px minmax(0, 1fr) auto auto;
        gap: var(--space-2);
    }

    .site-logo {
        gap: var(--space-2);
    }

    .site-logo__icon,
    .site-logo__icon::before {
        width: 40px;
        height: 40px;
    }

    .site-logo__text strong {
        font-size: var(--text-sm);
    }

    .site-logo__text small {
        font-size: 10px;
    }

    .site-header__location {
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
        padding: 5px var(--space-2);
        font-size: 11px;
    }

    .site-header__phone {
        grid-column: 4;
        grid-row: 1;
        gap: var(--space-2);
    }

    .site-header__phone-icon {
        width: 28px;
        height: 28px;
    }

    .site-header__phone strong {
        font-size: var(--text-md);
    }

    .site-header__phone small {
        display: block;
        font-size: 11px;
    }
}

@media (max-width: 680px) {
    :root {
        --header-sticky-height: 64px;
    }

    .site-header__inner {
        min-height: 64px;
        grid-template-columns: 44px minmax(0, 1fr) 44px;
        gap: var(--space-3);
    }

    .site-header__phone {
        grid-column: 3;
        margin-left: auto;
    }

    .site-header__location {
        display: none;
    }

    .site-header__phone > span:last-child {
        display: none;
    }
}

@media (max-width: 480px) {
    .site-header .container {
        padding-right: var(--space-4);
        padding-left: var(--space-4);
    }

    .site-logo {
        flex: 1 1 auto;
        gap: var(--space-2);
    }

    .site-logo__text {
        flex: 1 1 auto;
    }

    .site-logo__icon {
        width: 40px;
        height: 40px;
    }

    .site-logo__icon::before {
        width: 40px;
        height: 40px;
    }

    .site-logo__text strong {
        font-size: 14px;
    }

    .site-logo__text small {
        display: block;
        font-size: 9px;
        line-height: 1.25;
        white-space: normal;
    }

    .site-header__phone-icon {
        width: 27px;
        height: 27px;
    }

    .menu-toggle {
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 360px) {
    .site-header__phone {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mobile-menu,
    .mobile-menu-overlay,
    .site-nav--desktop a::after {
        transition-duration: 0.01ms;
    }
}
