body {
    padding-top: 88px;
}

html {
    scroll-padding-top: 108px;
}

#catalog,
#advantages,
#benefits,
#subscription,
#doc,
#faq,
#contacts {
    scroll-margin-top: 108px;
}

body.menu-open {
    overflow: hidden;
}

.header {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    width: auto;
    max-width: 100%;
    overflow-x: clip;
    z-index: 1000;
    box-sizing: border-box;
}

.header-panel {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(84, 0, 176, 0.08);
}

.header-panel__burger {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    margin-left: 0;
    border: 1px solid rgba(84, 0, 176, 0.14);
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.header-panel__burger span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: #5400b0;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.header-panel__burger.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.header-panel__burger.is-active span:nth-child(2) {
    opacity: 0;
}

.header-panel__burger.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.header-bar {
    display: none;
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    background: transparent !important;
    z-index: 120;
}

.header-bar.active {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
}

.header-bar__container {
    width: min(100% - 24px, 1200px);
    margin: 0 auto 16px;
    padding: 22px 18px;
    border-radius: 28px;
    background: linear-gradient(180deg, #ffffff 0%, #faf5ff 100%);
    box-shadow: 0 20px 55px rgba(52, 23, 80, 0.12);
    border: 1px solid rgba(106, 22, 223, 0.08);
}

.header-bar__menu {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.header-bar__menu a {
    text-decoration: none;
    color: #40245a;
    font-weight: 700;
}

.header-bar__meta {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 20px;
}

.header-bar__phone a {
    text-decoration: none;
    color: #40245a;
    font-weight: 800;
}

.header-bar__whatsapp a {
    display: block;
    width: 26px;
    height: 26px;
}

.header-bar__actions {
    display: grid;
    gap: 12px;
    margin-top: 20px;
}

.header-bar__request,
.header-bar__action-link,
.header-bar__logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 12px 18px;
    border-radius: 16px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.25;
    text-align: center;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease, opacity 0.22s ease;
}

.header-bar__request {
    color: #fff !important;
    background: linear-gradient(180deg, #6c10db 0%, #4f00ab 100%) !important;
}

.header-bar__action-link {
    color: #5f18cb !important;
    background: rgba(109, 29, 219, 0.08) !important;
    border: 1px solid rgba(109, 29, 219, 0.16);
}

.header-bar__action-link_admin {
    background: rgba(109, 29, 219, 0.12) !important;
}

.header-bar__logout-form {
    display: flex;
    margin: 0;
}

.header-bar__logout {
    width: 100%;
    border: none;
    cursor: pointer;
    font: inherit;
    color: #fff !important;
    background: linear-gradient(180deg, #d86a7b 0%, #bf4a5d 100%) !important;
}

.header-bar__request::after,
.header-bar__action-link::after,
.header-bar__logout::after,
.header-panel__request::after,
.header-panel__auth .header-panel__profile::after,
.header-panel__auth .header-panel__admin::after,
.header-panel__auth .header-panel__login::after,
.header-panel__auth .header-panel__register::after,
.header-panel__auth .header-panel__logout::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.42) 45%, transparent 72%);
    transform: translateX(-120%);
    transition: transform 0.45s ease;
    pointer-events: none;
}

.header-bar__request:hover,
.header-bar__request:focus-visible,
.header-bar__action-link:hover,
.header-bar__action-link:focus-visible,
.header-bar__logout:hover,
.header-bar__logout:focus-visible,
.header-panel__request:hover,
.header-panel__request:focus-visible,
.header-panel__auth .header-panel__profile:hover,
.header-panel__auth .header-panel__profile:focus-visible,
.header-panel__auth .header-panel__admin:hover,
.header-panel__auth .header-panel__admin:focus-visible,
.header-panel__auth .header-panel__login:hover,
.header-panel__auth .header-panel__login:focus-visible,
.header-panel__auth .header-panel__register:hover,
.header-panel__auth .header-panel__register:focus-visible,
.header-panel__auth .header-panel__logout:hover,
.header-panel__auth .header-panel__logout:focus-visible {
    transform: translateY(-2px);
}

.header-bar__request:hover::after,
.header-bar__request:focus-visible::after,
.header-bar__action-link:hover::after,
.header-bar__action-link:focus-visible::after,
.header-bar__logout:hover::after,
.header-bar__logout:focus-visible::after,
.header-panel__request:hover::after,
.header-panel__request:focus-visible::after,
.header-panel__auth .header-panel__profile:hover::after,
.header-panel__auth .header-panel__profile:focus-visible::after,
.header-panel__auth .header-panel__admin:hover::after,
.header-panel__auth .header-panel__admin:focus-visible::after,
.header-panel__auth .header-panel__login:hover::after,
.header-panel__auth .header-panel__login:focus-visible::after,
.header-panel__auth .header-panel__register:hover::after,
.header-panel__auth .header-panel__register:focus-visible::after,
.header-panel__auth .header-panel__logout:hover::after,
.header-panel__auth .header-panel__logout:focus-visible::after {
    transform: translateX(120%);
}

.header-bar__request:active,
.header-bar__action-link:active,
.header-bar__logout:active,
.header-panel__request:active,
.header-panel__auth .header-panel__profile:active,
.header-panel__auth .header-panel__admin:active,
.header-panel__auth .header-panel__login:active,
.header-panel__auth .header-panel__register:active,
.header-panel__auth .header-panel__logout:active {
    transform: translateY(0) scale(0.98);
}

.header-panel__auth {
    display: none;
}

.header-panel__phone,
.header-panel__whatsapp,
.header-panel__request,
.header-panel__menu {
    display: none;
}

@media screen and (max-width: 1199px) {
    .wrapper {
        min-width: 0 !important;
    }

    .header,
    .header-panel,
    .header-bar {
        max-width: 100vw;
        overflow-x: clip;
    }

    body {
        padding-top: 74px;
    }

    html {
        scroll-padding-top: 90px;
    }

    #catalog,
    #advantages,
    #benefits,
    #subscription,
    #doc,
    #faq,
    #contacts {
        scroll-margin-top: 90px;
    }

    .header-panel__container {
        width: 100%;
        max-width: none !important;
        box-sizing: border-box;
        display: grid !important;
        grid-template-columns: 44px 1fr 44px;
        align-items: center;
        gap: 12px;
    }

    .header-bar__container {
        width: calc(100% - 24px);
        max-width: calc(100vw - 24px);
        box-sizing: border-box;
        overflow-x: clip;
    }

    .header-panel__catalog {
        grid-column: 2;
        justify-self: center;
        margin: 0 !important;
    }

    .header-panel__burger {
        grid-column: 3;
        justify-self: end;
    }
}

@media screen and (min-width: 1200px) {
    body {
        padding-top: 94px;
    }

    html {
        scroll-padding-top: 112px;
    }

    #catalog,
    #advantages,
    #benefits,
    #subscription,
    #doc,
    #faq,
    #contacts {
        scroll-margin-top: 112px;
    }

    .header-panel__container {
        display: flex;
        align-items: center;
        gap: 16px;
        padding-left: 24px;
        padding-right: 24px;
    }

    .header-panel__catalog {
        flex: 0 0 auto;
        margin-left: 0 !important;
    }

    .header-panel__menu {
        display: flex;
        flex: 1 1 auto;
        min-width: 0;
        margin: 0 0 0 24px !important;
        gap: 28px !important;
        padding: 0;
        list-style: none;
    }

    .header-panel__phone {
        display: block;
        flex: 0 0 auto;
        margin-left: auto;
        font-size: 0.8125rem;
    }

    .header-panel__phone a {
        text-decoration: none;
        white-space: nowrap;
    }

    .header-panel__whatsapp {
        display: block;
        flex: 0 0 auto;
        margin-left: 0 !important;
    }

    .header-panel__request {
        display: inline-flex !important;
        flex: 0 0 auto;
        align-items: center;
        justify-content: center;
        width: auto !important;
        min-width: 0 !important;
        height: 46px;
        min-height: 46px;
        margin-left: 0 !important;
        padding: 0 18px !important;
        border-radius: 12px;
        white-space: nowrap !important;
        text-align: center;
        max-width: none !important;
        font-size: 0.8125rem !important;
        line-height: 1 !important;
        box-sizing: border-box;
        text-decoration: none;
        color: #fff !important;
        background: linear-gradient(180deg, #6c10db 0%, #4f00ab 100%) !important;
        position: relative;
        overflow: hidden;
        transition: transform 0.22s ease, background 0.22s ease;
    }

    .header-panel__auth {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 12px;
        margin-left: 24px;
        flex-shrink: 0;
        flex-wrap: nowrap;
    }

    .header-panel__auth .header-panel__profile,
    .header-panel__auth .header-panel__logout,
    .header-panel__auth .header-panel__admin,
    .header-panel__auth .header-panel__login,
    .header-panel__auth .header-panel__register {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 46px;
        margin-left: 0 !important;
        padding: 12px 18px !important;
        border-radius: 12px;
        font-size: 0.8125rem;
        line-height: 1.3;
        box-sizing: border-box;
        white-space: nowrap;
        text-decoration: none;
        position: relative;
        overflow: hidden;
        transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease, opacity 0.22s ease;
    }

    .header-panel__profile,
    .header-panel__login,
    .header-panel__register {
        color: #fff !important;
        background: linear-gradient(180deg, #6c10db 0%, #4f00ab 100%) !important;
    }

    .header-panel__admin {
        color: #5f18cb !important;
        background: rgba(109, 29, 219, 0.08) !important;
        border: 1px solid rgba(109, 29, 219, 0.16);
    }

    .header-panel__logout-form {
        display: flex;
        align-items: center;
        margin: 0;
    }

    .header-panel__logout {
        border: none;
        cursor: pointer;
        font: inherit;
        color: #fff !important;
        background: linear-gradient(180deg, #d86a7b 0%, #bf4a5d 100%) !important;
        opacity: 0.88;
    }

    .header-panel__burger,
    .header-bar {
        display: none !important;
    }
}

@media screen and (min-width: 1200px) and (max-width: 1365px) {
    .header-panel__container {
        gap: 12px;
    }

    .header-panel__menu {
        gap: 18px !important;
        margin-left: 14px !important;
    }

    .header-panel__phone {
        font-size: 0.75rem;
    }

    .header-panel__request {
        height: 42px;
        min-height: 42px;
        padding: 0 14px !important;
        font-size: 0.75rem !important;
    }

    .header-panel__auth {
        gap: 8px;
        margin-left: 16px;
    }

    .header-panel__auth .header-panel__admin,
    .header-panel__auth .header-panel__profile,
    .header-panel__auth .header-panel__login,
    .header-panel__auth .header-panel__register {
        padding: 12px 14px !important;
        font-size: 0.75rem;
    }

    .header-panel__auth .header-panel__logout {
        padding: 10px 14px !important;
        font-size: 0.75rem;
    }
}
