.footer {
    background: #1f1d1f;
    color: #b4afb3;
    font-family: Montserrat, Arial, sans-serif;
    font-size: 14px;
    padding: 0;
}

.footer-v2 {
    background: #1f1d1f;
    color: #b4afb3;
    padding: 36px 0;
}

.footer-v2,
.footer-v2 * {
    box-sizing: border-box;
}

.footer-v2 a {
    color: inherit;
    text-decoration: none;
}

.footer-v2-wrap {
    max-width: 1400px;
}

.footer-v2-cols {
    display: grid;
    grid-template-columns: 1.3fr 1.2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 36px;
}

.footer-v2-brand {
    min-width: 0;
}

.footer-v2-logo {
    display: inline-block;
    color: #fff !important;
    font-family: Montserrat, Arial, sans-serif;
    font-size: 26px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -.02em;
}

.footer-v2-logo span {
    color: var(--site-accent, #9C1C4F);
}

.footer-v2-about {
    max-width: 300px;
    margin: 14px 0 20px;
    color: #b4afb3;
    font-family: Montserrat, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    font-weight: 400;
}

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

.footer-v2-socials a {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #2e2b2f;
    display: grid;
    place-items: center;
    color: #fff;
    transition: background-color .2s ease, transform .2s ease;
}

.footer-v2-socials a:hover {
    background: var(--site-accent, #9C1C4F);
    transform: translateY(-1px);
}

.footer-v2-socials svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

.footer-v2-socials .footer-v2-social-dot {
    fill: currentColor;
    stroke: none;
}

.footer-v2-vk,
.footer-v2-social-letter {
    font-family: Montserrat, Arial, sans-serif;
    font-size: 12px;
    line-height: 1;
    font-weight: 800;
}

.footer-v2-column {
    min-width: 0;
}

.footer-v2-title {
    margin-bottom: 16px;
    color: #fff;
    font-family: Montserrat, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.2;
    font-weight: 600;
}

.footer-v2-main-btn {
    min-height: 44px;
    padding: 0 22px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--site-accent, #9C1C4F);
    color: #fff !important;
    font-family: Montserrat, Arial, sans-serif;
    font-size: 14px;
    line-height: 1;
    font-weight: 600;
    white-space: nowrap;
    transition: filter .2s ease, transform .2s ease;
}

.footer-v2-main-btn:hover {
    filter: brightness(1.12);
    transform: translateY(-1px);
}

.footer-v2-link {
    display: block;
    width: fit-content;
    margin-bottom: 11px;
    color: #b4afb3 !important;
    font-family: Montserrat, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 400;
    transition: color .2s ease;
}

.footer-v2-link:last-child {
    margin-bottom: 0;
}

.footer-v2-link:hover {
    color: #fff !important;
    text-decoration: underline;
    text-decoration-color: var(--site-accent, #9C1C4F);
    text-underline-offset: 4px;
}

.footer-v2-symbols {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.footer-v2-contacts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding: 36px 0;
    border-top: 1px solid #3a373b;
    border-bottom: 1px solid #3a373b;
}

.footer-v2-contact {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    min-width: 0;
    color: #b4afb3;
    font-family: Montserrat, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 400;
}

.footer-v2-contact svg {
    flex: none;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    fill: none;
    stroke: var(--site-accent, #9C1C4F);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.footer-v2-contact b {
    display: block;
    margin-bottom: 2px;
    color: #fff;
    font-weight: 600;
}

.footer-v2-contact a:hover {
    color: #fff;
}

.footer-v2-bottom {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(420px, auto) minmax(180px, auto);
    gap: 20px 40px;
    align-items: center;
    padding-top: 36px;
    color: #b4afb3;
    font-family: Montserrat, Arial, sans-serif;
    font-size: 13px;
    line-height: 1.6;
    font-weight: 400;
}

.footer-v2-company-text span {
    display: block;
}

.footer-v2-legal {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 24px;
}

.footer-v2-legal a:hover {
    color: #fff;
}

.footer-v2-ayacom {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    white-space: nowrap;
    font-size: 12px;
}

.footer-v2-ayacom img {
    display: block;
    width: 92px;
    height: auto;
    margin: 0;
}

.footer-v2 a:focus-visible {
    outline: 2px solid var(--site-accent, #9C1C4F);
    outline-offset: 3px;
    border-radius: 4px;
}

@media (max-width: 1180px) {
    .footer-v2-cols {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .footer-v2-brand {
        grid-column: 1 / -1;
    }

    .footer-v2-bottom {
        grid-template-columns: 1fr 1fr;
    }

    .footer-v2-ayacom {
        justify-content: flex-start;
    }
}

@media (max-width: 960px) {
    .footer-v2-contacts {
        grid-template-columns: 1fr 1fr;
    }

    .footer-v2-bottom {
        grid-template-columns: 1fr;
    }

    .footer-v2-legal {
        order: 2;
    }

    .footer-v2-ayacom {
        order: 3;
    }
}

@media (max-width: 640px) {
    .footer-v2 {
        padding: 30px 0;
    }

    .footer-v2-cols {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-bottom: 30px;
    }

    .footer-v2-brand {
        grid-column: auto;
    }

    .footer-v2-about {
        max-width: none;
    }

    .footer-v2-contacts {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 30px 0;
    }

    .footer-v2-bottom {
        gap: 18px;
        padding-top: 30px;
    }

    .footer-v2-legal {
        flex-direction: column;
        gap: 8px;
    }

    .footer-v2-ayacom {
        flex-wrap: wrap;
    }
}

/* Footer uses the normal site scale and the same centered desktop width as main content. */
.footer {
    zoom: 100% !important;
}

.footer-v2-wrap {
    width: 100%;
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

@media (max-width: 1240px) {
    .footer-v2-wrap {
        width: calc(100% - 40px);
    }
}

@media (max-width: 640px) {
    .footer-v2-wrap {
        width: 100%;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}


/* Footer final alignment to the approved mockup. */
.footer-v2-cols {
    grid-template-columns: 1.35fr 1.2fr 1fr 1fr 1fr;
    gap: 34px;
}

.footer-v2-about {
    max-width: 285px;
    line-height: 1.55;
}

.footer-v2-bottom {
    grid-template-columns: minmax(275px, 1.15fr) minmax(0, 2fr) auto;
    gap: 20px 28px;
}

.footer-v2-company-text {
    min-width: 0;
    white-space: nowrap;
}

.footer-v2-company-text span {
    display: inline;
}

.footer-v2-legal {
    justify-self: start;
    gap: 6px 22px;
}

.footer-v2-ayacom {
    justify-self: end;
}

@media (max-width: 1180px) {
    .footer-v2-company-text {
        white-space: normal;
    }

    .footer-v2-legal,
    .footer-v2-ayacom {
        justify-self: start;
    }
}


/* Keep the legal document links together as one compact group on desktop. */
.footer-v2-legal {
    justify-self: center;
    justify-content: center;
    flex-wrap: nowrap;
    white-space: nowrap;
}

@media (max-width: 960px) {
    .footer-v2-legal {
        justify-self: start;
        justify-content: flex-start;
        flex-wrap: wrap;
        white-space: normal;
    }
}


/* Final mobile footer override. */
@media (max-width: 640px) {
    .footer,
    .footer-v2 {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .footer-v2-wrap {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
        box-sizing: border-box;
    }

    .footer-v2-cols {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 26px !important;
        padding-bottom: 28px;
    }

    .footer-v2-brand,
    .footer-v2-column {
        width: 100%;
        min-width: 0;
        grid-column: auto !important;
    }

    .footer-v2-about {
        max-width: 100%;
    }

    .footer-v2-main-btn {
        max-width: 100%;
        white-space: normal;
        text-align: center;
    }

    .footer-v2-link {
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .footer-v2-contacts {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 20px;
    }

    .footer-v2-contact,
    .footer-v2-contact > div {
        min-width: 0;
    }

    .footer-v2-contact a,
    .footer-v2-contact span {
        overflow-wrap: anywhere;
    }

    .footer-v2-bottom {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 18px !important;
    }

    .footer-v2-company-text {
        min-width: 0;
        white-space: normal !important;
    }

    .footer-v2-legal {
        justify-self: start !important;
        justify-content: flex-start !important;
        flex-direction: column;
        flex-wrap: nowrap !important;
        gap: 8px !important;
        min-width: 0;
        white-space: normal !important;
    }

    .footer-v2-legal a {
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .footer-v2-ayacom {
        justify-self: start !important;
        justify-content: flex-start;
        max-width: 100%;
    }
}


/* Final desktop bottom-row alignment to the approved footer mockup. */
@media (min-width: 961px) {
    .footer-v2-bottom {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0;
        position: static;
    }

    .footer-v2-company-text,
    .footer-v2-legal,
    .footer-v2-ayacom {
        position: static;
        transform: none;
        margin: 0;
    }

    .footer-v2-company-text {
        flex: 0 0 auto;
    }

    .footer-v2-legal {
        flex: 0 0 auto;
        justify-self: auto !important;
        justify-content: flex-start !important;
        flex-wrap: nowrap;
        white-space: nowrap;
    }

    .footer-v2-ayacom {
        flex: 0 0 auto;
        justify-self: auto !important;
        justify-content: flex-end;
    }
}

/* Below the 1240 desktop breakpoint the wrapper has 20px side insets.
   Let only the bottom row use that space so its left/right groups reach
   the same visual edges as in the mockup. */
@media (min-width: 961px) and (max-width: 1240px) {
    .footer-v2-bottom {
        width: calc(100% + 40px);
        margin-left: -20px;
        margin-right: -20px;
    }
}
