header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: var(--container-width);
    max-width: 1280px;
    height: 70px;
    padding: 0 20px;
    color: white;
    background-color: rgba(101, 101, 101, 0.65);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 30px;
    z-index: 3;
    box-sizing: border-box;
}

.menu {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    margin-left: auto;
}

.cta-button {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #E769E4, #400D69);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: 0.3s;
    white-space: nowrap;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 105, 228, 0.4);
}

#logo-link {
    display: block;
    height: 100%;
    width: 15vw;
    max-width: 150px;
}

.logo {
    width: 100%;
    height: 100%;
    background-image: url(../images/logo.webp);
    background-size: contain;
    background-position: left;
    background-repeat: no-repeat;
}

.logo-scrolled {
    background-image: url(../images/logo_scrolled.webp);
}

.header-scrolled {
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 10px gray;
}

.menu-item {
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: 0.3s;
}

.menu-button-scrolled {
    color: #333;
}

.menu-button-scrolled:hover {
    color: #400D69;
}

.menu-button-no-scrolled {
    color: #fff;
}

.menu-button-no-scrolled:hover {
    color: #e3e3e3;
}

#mobile-menu {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: -75%;
    width: 75%;
    height: 100vh;
    background: #fff;
    z-index: 5;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px;
    box-sizing: border-box;
}

#mobile-menu.show {
    right: 0;
}

#mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 4;
    opacity: 0;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu-overlay.show {
    opacity: 1;
}

#close-menu-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 35px;
    height: 35px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    font-size: 18px;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-logo {
    width: 60%;
    height: 40px;
    background-image: url(../images/logo_scrolled.webp);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: left;
    margin: 20px 0 30px;
}

#nav-mobile-menu {
    display: flex;
    flex-direction: column;
    gap: 0;
}

#nav-mobile-menu a {
    color: #333;
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: 0.2s;
}

#nav-mobile-menu a:hover {
    color: #E769E4;
    padding-left: 5px;
}

.mobile-menu-bottom {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-bottom: 20px;
}

.mobile-phone {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
}

.mobile-socials {
    display: flex;
    gap: 10px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #3a3d45;
    border-radius: 50%;
    color: #ecf0f1;
    text-decoration: none;
    transition: 0.3s;
    font-size: 16px;
}

.social-link.telegram:hover {
    background: #0088cc;
}

.social-link.vk:hover {
    background: #4a76a8;
}

.mobile-cta-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #E769E4, #400D69);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

@media (min-width: 769px) {
    #mobile-menu,
    #mobile-menu-overlay {
        display: none !important;
    }
}

@media (max-width: 768px) {
    header {
        height: 60px;
        padding: 0 16px;
        top: 10px;
        width: calc(100% - 16px);
        max-width: none;
        justify-content: space-between;
    }

    #logo-link {
        width: 35vw;
        max-width: none;
    }

    .menu {
        display: none;
    }

    .cta-button {
        display: none;
    }

    #open-menu-btn {
        width: 40px;
        height: 40px;
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 10px;
        padding: 0;
        cursor: pointer;
        outline: none;
        background-color: transparent;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
    }

    #open-menu-btn::before {
        content: '';
        width: 20px;
        height: 2px;
        background: #fff;
        box-shadow: 0 -6px 0 #fff, 0 6px 0 #fff;
        border-radius: 2px;
    }

    .header-scrolled #open-menu-btn {
        border-color: #ddd;
        background-color: #fff;
    }

    .header-scrolled #open-menu-btn::before {
        background: #333;
        box-shadow: 0 -6px 0 #333, 0 6px 0 #333;
    }
}