.header {
    position: absolute;
    inset: 0 0 auto;
    z-index: 10;
    color: #fff;
    background: #35363866
}

.header__inner {
    display: flex;
    align-items: center;
    min-height: 109px;
    gap: 56px
}

.header__brand {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    flex-shrink: 0
}

.header__brand > img {
    width: 114px;
    height: 45px
}

.header__brand span {
    font: 500 12px/1.1 Gotham, Arial, sans-serif
}

.header__nav {
    display: flex;
    gap: 26px
}

.header__nav a {
    text-decoration: none;
    white-space: nowrap;
    font-size: 20px
}

.header__nav a:hover {
    text-decoration: underline;
    text-underline-offset: 5px
}

.header__contacts {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-left: auto;
    text-align: right
}

.header__contacts a {
    text-decoration: none;
    font-size: 20px;
    white-space: nowrap
}

.header__contacts small {
    display: block;
    font-size: 8px;
    margin-top: 2px
}

.header__contact-icon {
    border: 1px solid #ffffff80;
    padding: 5px;
    border-radius: 10px;
}

.header__contact-icon img {
    width: 26px;
    height: 26px;
    object-fit: contain
}

.header__mobile {
    display: none
}

@media (max-width: 1250px) {
    .header__inner {
        gap: 25px
    }

    .header__contacts {
        gap: 16px
    }

    .header__contacts a, .header__nav a {
        font-size: 16px
    }

    .header__nav {
        gap: 18px
    }

    .header__brand > img {
        width: 96px
    }

    .header__brand span {
        font-size: 10px
    }
}

@media (max-width: 1000px) {
    .header__contacts {
        display: none
    }

    .header__nav {
        margin-left: auto
    }

    .header__inner {
        min-height: 112px
    }
}

@media (max-width: 600px) {
    .header {
        background: transparent
    }

    .header__inner {
        min-height: 144px;
        gap: 12px;
        position: relative
    }

    .header__brand {
        gap: 20px
    }

    .header__brand > img {
        width: 78px;
        height: 33px
    }

    .header__brand span {
        font-size: 8px
    }

    .header__mobile {
        margin-left: auto;
        display: flex;
        gap: 12px
    }

    .header__mobile > a, .header__toggle {
        width: 36px;
        height: 36px;
        border: 0;
        border-radius: 50%;
        background: var(--orange);
        padding: 9px;
        display: grid;
        place-items: center
    }

    .header__toggle {
        padding-top: 11px;
    }

    .header__mobile img {
        width: 18px;
        height: 18px;
        object-fit: contain
    }

    .header__nav {
        display: none;
        position: absolute;
        top: 132px;
        left: 0;
        right: 0;
        background: var(--green-dark);
        border-radius: 12px;
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        padding: 28px 20px;
        gap: 24px;
        box-shadow: 0 12px 24px #0002;
    }

    .header__nav.is-open {
        display: flex
    }

    .header__nav a {
        font-size: 16px
    }
}

@media (max-width: 360px) {
    .header__brand {
        gap: 8px
    }

    .header__mobile {
        gap: 7px
    }

    .header__mobile > a, .header__toggle {
        width: 32px;
        height: 32px
    }

    .header__toggle {
        padding-top: 9px;
    }
}

/* Правки по комментариям Figma, 28.09.2026. */
.header__backdrop {
    display: none
}

@media (max-width: 600px) {
    .header__backdrop:not([hidden]) {
        display: block;
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100dvh;
        border: 0;
        background: rgba(3, 20, 15, .8)
    }

    .header__toggle {
        position: relative
    }

    .header__toggle[aria-expanded="true"] img {
        visibility: hidden
    }

    .header__toggle[aria-expanded="true"]::before, .header__toggle[aria-expanded="true"]::after {
        content: '';
        position: absolute;
        width: 17px;
        height: 2px;
        background: white;
        transform: rotate(45deg)
    }

    .header__toggle[aria-expanded="true"]::after {
        transform: rotate(-45deg)
    }
}

.header__services {
    position: relative
}

.header__services summary {
    cursor: pointer;
    list-style: none;
    white-space: nowrap;
    font-size: 20px
}

.header__services summary::-webkit-details-marker {
    display: none
}

.header__services summary::after {
    content: '⌄';
    margin-left: 6px;
    display: inline-block;
    transform: translateY(-4px);
}

.header__service-list {
    position: absolute;
    top: calc(100% + 20px);
    left: 0;
    width: min(650px, 80vw);
    max-height: 70dvh;
    overflow-y: auto;
    padding: 24px;
    background: var(--green-dark);
    border-radius: 14px;
    box-shadow: 0 15px 35px #0004;
    display: grid;
    grid-template-columns:1fr 1fr;
    gap: 16px
}

.header__nav .header__service-list a {
    white-space: normal;
    font-size: 15px;
    line-height: 1.35
}

.header__service-list a:first-child {
    grid-column: 1/-1;
    font-weight: 700
}

@media (max-width: 1250px) {
    .header__services summary {
        font-size: 16px
    }
}

@media (max-width: 600px) {
    .header__nav {
        max-height: calc(100dvh - 150px);
        overflow-y: auto;
        text-align: center;
    }

    .header__service-list {
        position: static;
        max-height: none;
        box-shadow: none;
        width: 100%;
        padding: 20px 0 0;
        grid-template-columns:1fr;
        background: transparent;
        text-align: left;
        border-radius: 0;
    }

    .header__services summary {
        font-size: 16px
    }
}
