/* === СТАРАЯ ВЕРСТКА НЕ ТРОГАЙ === */
header {
    background-color: #1E1E1E;
    padding: 20px;
    position: relative;
    z-index: 10;
}

.logo img,
.auth-icon img {
    max-width: 89px !important;
}

.header-top {
    background-color: rgba(66, 66, 66, 0.16);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 1599px;
    box-sizing: border-box;
    margin: 0 auto;
    position: relative;
}

.mobile-menu {
    display: none;
}

.mobile-trigger-link {
    display: none;
}

.menu-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 8px;
    height: 88px;
    width: 264px;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 600;
    line-height: 120%;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.menu-link:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.menu-callback {
    display: grid;
    grid-template-columns: 1fr 88px;
    align-items: center;
    height: 88px;
    width: 264px;
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 600;
    text-transform: uppercase;
    color: #fff;
    text-decoration: none;
    border-radius: 20px;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.menu-callback span {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    line-height: 120%;
    text-align: center;
}

.callback-icon {
    width: 88px;
    height: 88px;
}

.callback-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media(max-width: 1450px) {
    .menu-callback {
        grid-template-columns: 1fr;
        width: 88px;
        overflow: unset;
    }
    .menu-callback span {
        display: none;
    }
}

@media(max-width: 1250px) {
    .menu-link {
        font-size: 18px;
    }
}

@media(max-width: 1152px) {
    .menu-link {
        font-size: 16px;
    }
}

@media(max-width: 1100px) {
    .menu-link {
        height: 64px;
        font-size: 14px;
        border-radius: 10px;
    }
    .menu-callback {
        height: 64px;
        border-radius: 10px;
    }
    .callback-icon {
        width: 64px;
        height: 64px;
    }
    .auth-icon img,
    .logo img {
        width: 64px !important;
        height: 64px;
    }
}

@media(max-width: 888px) {
    .auth-icon {
        display: none;
    }
}

.menu-button {
    display: none;
}

/* === МОБИЛЬНАЯ ВЕРСИЯ === */
@media(max-width: 700px) {
    .logo img {
        width: 56px !important;
        height: 56px;
    }

    .menu-link,
    .menu-callback,
    .auth-icon {
        display: none;
    }

    .mobile-menu-trigger {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 12px;
    }

    .mobile-trigger-link {
        display: none;
        height: 56px;
        padding: 0 20px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 14px;
        color: #fff;
        font-size: 14px;
        font-weight: 600;
        text-transform: uppercase;
        text-decoration: none;
        align-items: center;
        justify-content: center;
        font-family: 'Montserrat', sans-serif;
        align-self: flex-end; /* прижать к правому краю */
    }

    .menu-button {
        width: 56px;
        height: 56px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 14px;
        backdrop-filter: blur(8px);
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }

    .menu-icon {
        position: relative;
        width: 19px;
        height: 19px;
    }

    .menu-icon span {
        position: absolute;
        left: 0;
        width: 100%;
        height: 3px;
        background: #fff;
        border-radius: 100px;
        transition: all 0.3s ease;
    }

    .menu-icon span:nth-child(1) {
        top: 0;
    }

    .menu-icon span:nth-child(2) {
        top: 8px;
    }

    .menu-icon span:nth-child(3) {
        bottom: 0;
    }

    .menu-icon.active span:nth-child(1) {
        transform: rotate(45deg);
        top: 8px;
    }

    .menu-icon.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-icon.active span:nth-child(3) {
        transform: rotate(-45deg);
        bottom: auto;
        top: 8px;
    }

    .mobile-menu {
        display: none;
        flex-direction: column;
        gap: 12px;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 0 20px 20px 20px;
        background: #1E1E1E;
        z-index: 1000;
        box-sizing: border-box;
        margin-top: -20px;
    }

    .mobile-menu.show {
        display: flex;
    }

    .mobile-trigger-link.show {
        display: inline-flex;
    }

    .mobile-link {
        height: 56px;
        padding: 0 32px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 14px;
        color: #fff;
        font-size: 14px;
        font-weight: 600;
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-transform: uppercase;
        font-family: 'Montserrat', sans-serif;
        align-self: flex-end; /* чтобы прижать к правому краю */
    }

    .mobile-callback {
        display: grid;
        grid-template-columns: 1fr 56px;
        align-items: center;
        height: 56px;
        width: 264px;
        font-family: 'Montserrat', sans-serif;
        font-size: 14px;
        font-weight: 600;
        text-transform: uppercase;
        color: #fff;
        text-decoration: none;
        border-radius: 14px;
        overflow: hidden;
        background-color: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        align-self: flex-end;
    }

    .mobile-callback span {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 1rem;
        line-height: 120%;
        text-align: center;
    }

    .mobile-callback-icon {
        width: 56px;
        height: 56px;
    }

    .mobile-callback-icon img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
}

.footer {
    margin-top: 30px;
    background-color: #1E1E1E;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    padding: 40px 20px 20px;
    position: relative;
    background-image: url('/img/footer-building.png');
    background-position: bottom right;
    background-repeat: no-repeat;
    background-size: auto 100%;
}
.footer-wrapper {
    max-width: 1599px;
    margin: 0 300px 0 auto;
}
.footer-container {
    display: grid;
    grid-template-columns: 280px 280px 280px 1fr;
    grid-template-areas:
    "social catalog contacts form"
    "bottom-left bottom-left bottom-center bottom-right";
    gap: 20px;
    align-items: flex-start;
    position: relative;
    z-index: 2;
}

.footer-column.social        { grid-area: social; }
.footer-column.menu:nth-of-type(2) { grid-area: catalog; }  /* КАТАЛОГ */
.footer-column.menu:nth-of-type(3) { grid-area: contacts; } /* КОНТАКТЫ */
.footer-column.form          { grid-area: form; }

.footer-bottom-left          { grid-area: bottom-left; }
.footer-bottom-center        { grid-area: bottom-center; }
.footer-bottom-right         { grid-area: bottom-right; }

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-column ul li {
    margin-bottom: 8px;
}
.footer-column a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
}
.footer-column h4 {
    font-size: 16px;
    margin-bottom: 12px;
}
.social-icon {
    width: 124px;
    height: 124px;
    margin-right: 8px;
    margin-bottom: 8px;
}
form input {
    display: block;
    width: 100%;
    margin-bottom: 12px;
    padding: 10px;
    border-radius: 8px;
    border: none;
    background-color: #2E2E2E;
    color: #fff;
}
form button {
    padding: 10px;
    width: 100%;
    background-color: #aaa;
    border: none;
    border-radius: 8px;
    color: #000;
    font-weight: bold;
    cursor: pointer;
}

.footer-bottom-left {
    grid-column: 1 / 3;
}
.footer-bottom-center {
    grid-column: 3;
    text-align: left;
    align-self: center;
}
.footer-bottom-right {
    grid-column: 4;
    text-align: left;
    align-self: center;
}
.footer-bottom a {
    color: #aaa;
    text-decoration: none;
}

.footer-bottom-center a, .footer-bottom-right a, .footer-bottom-left a {
    color: inherit;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
}

@media(max-width: 1474px) {
    .footer {
        background-image: url('/img/footer-building-mobile.png');
        background-repeat: no-repeat;
        background-position: right bottom;
        background-size: 115px 458px;
    }
    .footer-wrapper {
        max-width: 1599px;
        margin: 0 50px 0 0;
    }
}

@media(max-width: 1264px) {
    .footer-container {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
      "catalog       contacts"
      "bottom-center bottom-right"
      "social        social"
      "bottom-left   bottom-left"
    }
    .footer-column.social        { grid-area: social; }
    .footer-column.menu:nth-of-type(2) { grid-area: catalog; }  /* КАТАЛОГ */
    .footer-column.menu:nth-of-type(3) { grid-area: contacts; } /* КОНТАКТЫ */
    .footer-column.form          { display: none; }

    .footer-bottom-left          { grid-area: bottom-left; }
    .footer-bottom-center        { grid-area: bottom-center; }
    .footer-bottom-right         { grid-area: bottom-right; }
}

@media(max-width: 647px) {
    .social-icon {
        width: 57px;
        height: 57px;
        margin-right: 8px;
        margin-bottom: 8px;
    }
}
