/**
 * Footer redesign — главная и внутренние страницы
 */
:root {
    --footer-container: 1500px;
    --footer-gutter: 16px;
    --footer-gap: 64px;
    --footer-bg: #111827;
    --footer-color: #ffffff;
    --footer-color-muted: rgba(255, 255, 255, 0.8);
    --footer-color-soft: rgba(255, 255, 255, 0.6);
    --footer-btn-bg: rgba(255, 255, 255, 0.12);
    --footer-social-bg: rgba(255, 255, 255, 0.1);
    --footer-radius: 48px;
    --footer-font: 'Vela Sans', 'Onest', system-ui, -apple-system, sans-serif;
}

.site-footer {
    position: relative;
    isolation: isolate;
    box-sizing: border-box;
    margin-top: 80px;
    padding: 64px var(--footer-gutter) 64px;
    border-radius: var(--footer-radius) var(--footer-radius) 0 0;
    background: var(--footer-bg);
    color: var(--footer-color);
    font-family: var(--footer-font);
    overflow: hidden;
}

@media (min-width: 1533px) {
    .site-footer {
        padding-left: 0;
        padding-right: 0;
    }
}

.site-footer__glow {
    position: absolute;
    width: 732px;
    height: 283px;
    border-radius: 50%;
    background: rgba(87, 96, 114, 0.56);
    filter: blur(192.5px);
    pointer-events: none;
    z-index: 0;
}

.site-footer__glow--left {
    left: -178px;
    top: -242px;
    transform: rotate(-150deg);
}

.site-footer__glow--right {
    right: -180px;
    top: -422px;
    transform: rotate(-31.85deg);
    background: rgba(87, 96, 114, 0.61);
}

.site-footer__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: var(--footer-gap);
    width: 100%;
    max-width: var(--footer-container);
    margin: 0 auto;
    padding-bottom: 0;
}

.site-footer__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0;
}

@media (min-width: 1200px) {
    .site-footer__nav {
        flex: 0 0 667px;
        width: 667px;
        max-width: 667px;
    }

    .site-footer__contacts {
        flex: 0 0 377px;
        width: 377px;
        max-width: 377px;
    }

    .site-footer__actions {
        flex: 0 0 241px;
        width: 241px;
        min-width: 241px;
    }
}

.site-footer__nav {
    display: flex;
    align-items: flex-start;
    gap: 100px;
    flex: 0 0 auto;
    min-width: 0;
}

.site-footer__nav-group--directions {
    flex: 0 0 auto;
    max-width: 239px;
}

.site-footer__nav-group--pages {
    display: flex;
    align-items: flex-start;
    gap: 64px;
    flex-shrink: 0;
}

.site-footer__nav-group--pages .site-footer__nav-list:first-child {
    flex: 0 0 116px;
    min-width: 116px;
}

.site-footer__nav-group--pages .site-footer__nav-list:last-child {
    flex: 0 0 148px;
    min-width: 148px;
}

.site-footer__nav-group--pages .site-footer__nav-link {
    white-space: nowrap;
}

.site-footer__nav-title {
    margin: 0 0 20px;
    font-size: 20px;
    font-weight: 500;
    line-height: 28px;
    color: var(--footer-color);
}

.site-footer__nav-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer__nav-list + .site-footer__nav-list {
    margin-top: 0;
}

.site-footer__nav-item {
    margin: 0;
    padding: 0;
}

.site-footer__nav-item + .site-footer__nav-item {
    margin-top: 16px;
}

.site-footer__nav-item::before {
    display: none !important;
    content: none !important;
}

.site-footer__nav-link {
    display: inline-block;
    font-size: 20px;
    font-weight: 500;
    line-height: 28px;
    color: var(--footer-color);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.site-footer__nav-link:hover {
    opacity: 0.8;
    color: var(--footer-color);
    text-decoration: none;
}

.site-footer__nav-link--muted {
    font-size: 18px;
    font-weight: 400;
    line-height: 24px;
    color: var(--footer-color-muted);
}

.site-footer__contacts {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    flex: 0 0 auto;
    max-width: 377px;
}

.site-footer__phone,
.site-footer__email {
    font-size: 32px;
    font-weight: 400;
    line-height: 40px;
    color: var(--footer-color);
    text-decoration: none;
    white-space: nowrap;
}

.site-footer__phone:hover,
.site-footer__email:hover {
    color: var(--footer-color);
    opacity: 0.85;
    text-decoration: none;
}

.site-footer__address {
    display: block;
    margin: 0;
    max-width: 267px;
    font-size: 18px;
    font-weight: 400;
    line-height: 24px;
    color: var(--footer-color-muted);
}

/* Bitrix в режиме правок оборачивает IncludeFile в div#bx_incl_area_* —
   держим текст в одну строку, но не трогаем <script> (иначе JS вылезает текстом). */
.site-footer__address [id^='bx_incl_area'] {
    display: inline !important;
}

.site-footer__actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 0 0 auto;
    width: max-content;
    min-width: 241px;
}

.site-footer__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    min-height: 48px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    background: var(--footer-btn-bg);
    font-family: var(--footer-font);
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    color: var(--footer-color);
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.site-footer__btn:hover,
.site-footer__btn:focus {
    background: rgba(255, 255, 255, 0.18);
    color: var(--footer-color);
}

.site-footer__middle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 64px;
}

.site-footer__socials {
    display: flex;
    align-items: flex-start;
    gap: 64px;
    flex: 0 0 auto;
}

.site-footer__social-block {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.site-footer__social-title {
    margin: 0;
    font-size: 18px;
    font-weight: 400;
    line-height: 24px;
    color: var(--footer-color-muted);
}

.site-footer__social-icons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-footer__social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: var(--footer-social-bg);
    color: #9299a5;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.site-footer__social-link:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    text-decoration: none;
}

.site-footer__social-link svg {
    display: block;
    width: 24px;
    height: 24px;
}

.site-footer__social-link--rutube {
    position: relative;
}

.site-footer__social-link--rutube .site-footer__social-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 24px;
    transform: translate(-50%, -50%);
    transition: opacity 0.2s ease;
}

.site-footer__social-link--rutube .site-footer__social-icon--hover {
    opacity: 0;
}

.site-footer__social-link--rutube:hover {
    color: #9299a5;
}

.site-footer__social-link--rutube:hover .site-footer__social-icon--default {
    opacity: 0;
}

.site-footer__social-link--rutube:hover .site-footer__social-icon--hover {
    opacity: 1;
}

.site-footer__social-link--rutube .site-footer__social-icon svg {
    display: block;
    width: 28px;
    height: 24px;
}

.site-footer__legal {
    margin: 0;
    max-width: 721px;
    font-size: 16px;
    font-weight: 500;
    line-height: 28px;
    color: var(--footer-color-soft);
}

.site-footer__bottom {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 32px;
    isolation: isolate;
}

.site-footer__bottom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    position: relative;
    z-index: 2;
}

.site-footer__copy,
.site-footer__policy {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    color: var(--footer-color-soft);
    text-decoration: none;
}

.site-footer__policy:hover {
    color: var(--footer-color);
    opacity: 0.85;
    text-decoration: none;
}

.site-footer__itb.itb-copyright {
    --copyright-color: 255, 255, 255;
    gap: 12px;
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    color: var(--footer-color-soft);
}

.site-footer__itb.itb-copyright:hover {
    color: rgba(255, 255, 255, 0.85);
}

.site-footer__itb .itb-copyright__logo {
    display: block;
    flex-shrink: 0;
    width: 34px;
    height: 20px;
    margin: 0;
}

.site-footer__itb.itb-copyright svg {
    margin-left: 0;
}

.site-footer__itb .itb-copyright__popup {
    left: auto;
    right: 0;
    transform: translate(0, calc(-100% - 24px));
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 8px;
}

.site-footer__itb.itb-copyright.opened .itb-copyright__popup {
    display: flex;
}

.site-footer__itb .itb-copyright__popup a + a {
    margin-left: 0;
}

.site-footer__itb .itb-copyright__popup:after {
    left: auto;
    right: 24px;
    margin: 0;
}

.site-footer__watermark-picture {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    margin: 0;
    pointer-events: none;
    user-select: none;
}

.site-footer__watermark {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0;
    pointer-events: none;
    user-select: none;
    object-fit: contain;
    object-position: center bottom;
}

/* Скрываем старый футер Aspro, если вдруг подключится */
body.as-redesign #footer.footer-v1,
body.as-redesign #footer.footer-v2,
body.as-redesign #footer.footer-v3 {
    display: none !important;
}

@media (max-width: 1199px) {
    .site-footer {
        padding-top: 48px;
    }

    .site-footer__inner {
        gap: 48px;
    }

    .site-footer__top {
        flex-wrap: wrap;
        gap: 40px 48px;
    }

    .site-footer__nav {
        gap: 48px;
        width: 100%;
    }

    .site-footer__contacts {
        max-width: none;
    }

    .site-footer__actions {
        flex: 0 0 auto;
        width: max-content;
        min-width: 241px;
        flex-direction: column;
        flex-wrap: nowrap;
    }

    .site-footer__btn {
        width: 100%;
        min-width: 0;
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .site-footer__phone,
    .site-footer__email {
        font-size: 28px;
        line-height: 36px;
    }

    .site-footer__middle {
        flex-direction: column;
        align-items: flex-start;
        gap: 32px;
    }

    .site-footer__bottom-row {
        flex-wrap: wrap;
        gap: 16px 24px;
    }
}

@media (max-width: 991px) {
    .site-footer__nav {
        flex-direction: column;
        gap: 32px;
    }

    .site-footer__nav-group--pages {
        gap: 32px;
    }

    .site-footer__socials {
        flex-direction: column;
        gap: 24px;
    }
}

@media (max-width: 575px) {
    .site-footer {
        margin-top: 40px;
        padding: 32px 20px 32px;
        border-radius: 24px 24px 0 0;
    }

    .site-footer__inner {
        gap: 48px;
    }

    .site-footer__top {
        flex-direction: column;
        align-items: stretch;
        gap: 48px;
        width: 100%;
    }

    .site-footer__nav {
        flex-direction: column;
        gap: 48px;
        width: 100%;
        max-width: none;
    }

    .site-footer__nav-group--directions {
        width: 100%;
        max-width: none;
    }

    .site-footer__nav-title {
        margin-bottom: 12px;
        font-size: 20px;
        line-height: 24px;
    }

    .site-footer__nav-list--muted .site-footer__nav-item + .site-footer__nav-item {
        margin-top: 12px;
    }

    .site-footer__nav-link--muted {
        font-size: 16px;
        font-weight: 400;
        line-height: 24px;
    }

    .site-footer__nav-group--pages {
        flex-direction: row;
        align-items: flex-start;
        gap: 24px;
        width: 100%;
    }

    .site-footer__nav-group--pages .site-footer__nav-list {
        flex: 1 1 0;
        min-width: 0;
        width: auto;
    }

    .site-footer__nav-group--pages .site-footer__nav-list:first-child,
    .site-footer__nav-group--pages .site-footer__nav-list:last-child {
        flex: 1 1 0;
        min-width: 0;
        width: auto;
    }

    .site-footer__nav-group--pages .site-footer__nav-list + .site-footer__nav-list {
        margin-top: 0;
    }

    .site-footer__nav-group--pages .site-footer__nav-item + .site-footer__nav-item {
        margin-top: 16px;
    }

    .site-footer__nav-group--pages .site-footer__nav-link {
        font-size: 20px;
        line-height: 24px;
        white-space: normal;
    }

    .site-footer__contacts {
        width: 100%;
        max-width: none;
        gap: 12px;
    }

    .site-footer__phone,
    .site-footer__email {
        font-size: 24px;
        font-weight: 500;
        line-height: 32px;
        white-space: normal;
    }

    .site-footer__address {
        max-width: none;
        width: 100%;
        font-size: 16px;
        font-weight: 500;
        line-height: 24px;
    }

    .site-footer__actions {
        flex: 1 1 100%;
        width: 100%;
        min-width: 0;
        gap: 16px;
    }

    .site-footer__btn {
        width: 100%;
        min-width: 0;
        white-space: nowrap;
    }

    .site-footer__middle {
        flex-direction: column;
        align-items: flex-start;
        gap: 48px;
        width: 100%;
    }

    .site-footer__socials {
        flex-direction: column;
        gap: 24px;
        width: 100%;
    }

    .site-footer__social-block {
        gap: 12px;
        width: 100%;
    }

    .site-footer__social-icons {
        order: 0;
        gap: 10px;
    }

    .site-footer__social-title {
        order: 1;
        font-size: 16px;
        font-weight: 500;
        line-height: 24px;
    }

    .site-footer__legal {
        width: 100%;
        max-width: none;
        font-size: 14px;
        font-weight: 400;
        line-height: 22px;
    }

    .site-footer__bottom {
        gap: 32px;
        width: 100%;
    }

    .site-footer__bottom-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .site-footer__copy,
    .site-footer__policy,
    .site-footer__itb.itb-copyright {
        font-size: 16px;
        font-weight: 400;
        line-height: 24px;
    }

    .site-footer__watermark-picture,
    .site-footer__watermark {
        width: 100%;
        max-width: 335px;
        height: auto;
        max-height: none;
    }

    .site-footer__glow {
        width: 420px;
        height: 180px;
        filter: blur(120px);
    }
}
