/* ==========================================================================
   Подвал сайта — Котломаш Rebranding (Pixel-Perfect по Figma Frame 8488)
   ========================================================================== */

html body .km-footer {
    position: relative !important;
    width: 100% !important;
    background-color: #1A1A1A !important;
    color: #FFFFFF;
    font-family: 'Geologica', sans-serif;
    overflow: hidden;
    left: 0 !important;
    transform: none !important;
    box-sizing: border-box !important;
}

.km-footer-inner {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative;
    box-sizing: border-box;
}

/* 1. Верхний блок подвала (Full-Width, min-height: 380px) */
.km-footer-top {
    position: relative;
    width: 100%;
    min-height: 380px;
    height: auto;
    background-color: #1A1A1A;
    box-sizing: border-box;
    padding-bottom: 32px;
}

/* Колонка 1: Контакты (Выровнена строго по общему контенту: left 64px / --km-container-padding) */
.km-footer-col--contacts {
    position: absolute;
    left: var(--km-container-padding, 64px);
    top: 48px;
    width: 540px;
    display: flex;
    flex-direction: column;
    z-index: 2;
}

.km-footer-phone-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-bottom: 32px;
}

.km-footer-phone {
    font-family: 'Geologica', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 32px;
    line-height: 38.4px;
    color: #FFFFFF;
    text-decoration: none;
    transition: color 0.3s ease;
}

.km-footer-phone:hover {
    color: #CD1719;
}

.km-footer-label {
    font-family: 'Geologica', sans-serif;
    font-style: normal;
    font-weight: 300;
    font-size: 14px;
    line-height: 22.4px;
    color: #A0A0A0;
    margin: 0;
}

/* Кнопка "Рассчитать стоимость" (249x56px) */
.km-footer-calc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    padding: 16px 20px 16px 24px;
    gap: 8px;
    width: 249px;
    height: 56px;
    background-color: #CD1719;
    color: #FFFFFF;
    font-family: 'Geologica', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 22px;
    text-decoration: none;
    box-sizing: border-box;
    margin-bottom: 44px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.km-footer-calc-btn:hover {
    background-color: #B51315;
    transform: translateY(-2px);
}

.km-footer-calc-btn svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* Нижняя часть контактов: почты и адрес */
.km-footer-contacts-bottom {
    display: flex;
    flex-direction: column;
    gap: 32px;
    width: 100%;
}

.km-footer-mails {
    display: flex;
    align-items: center;
    gap: 60px;
    width: 100%;
}

.km-footer-mail-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.km-footer-email {
    font-family: 'Geologica', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 18px;
    line-height: 21.6px;
    color: #FFFFFF;
    text-decoration: none;
    transition: color 0.3s ease;
}

.km-footer-email:hover {
    color: #CD1719;
}

.km-footer-sublabel {
    font-family: 'Geologica', sans-serif;
    font-style: normal;
    font-weight: 300;
    font-size: 14px;
    line-height: 22.4px;
    color: #A0A0A0;
    margin: 0;
}

.km-footer-address {
    font-family: 'Geologica', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 18px;
    line-height: 21.6px;
    color: #FFFFFF;
    margin: 0;
    width: 100%;
}

/* Колонка 2: Меню 1 + Соцсети + Политики (От центра: left calc(50% + 16px), width 288px) */
.km-footer-col--nav1 {
    position: absolute;
    left: calc(50% + 16px);
    top: 48px;
    width: 288px;
    display: flex;
    flex-direction: column;
    z-index: 2;
}

.km-footer-col--nav1 .km-footer-nav-block {
    margin-bottom: 28px;
}

.km-footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.km-footer-menu__item {
    padding: 0;
    margin: 0;
}

.km-footer-menu__link {
    font-family: 'Geologica', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 18px;
    line-height: 21.6px;
    color: #FFFFFF;
    text-decoration: none;
    transition: color 0.3s ease;
}

.km-footer-menu__link:hover {
    color: #CD1719;
}

/* Соцсети */
.km-footer-social-icons {
    display: flex;
    align-items: center;
    gap: 16px;
    width: auto;
    height: 40px;
    margin-bottom: 20px;
}

.km-footer-social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    transition: transform 0.25s ease, filter 0.25s ease;
    flex-shrink: 0;
}

.km-footer-social-link:hover {
    transform: scale(1.1);
}

.km-footer-social-link img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    display: block;
}

/* Политики */
.km-footer-policies {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.km-footer-policy-link {
    font-family: 'Geologica', sans-serif;
    font-style: normal;
    font-weight: 300;
    font-size: 14px;
    line-height: 22.4px;
    color: #A0A0A0;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.km-footer-policy-link:hover {
    color: #FFFFFF;
}

/* Колонка 3: Меню 2 + Скачать реквизиты (От центра: left calc(50% + 336px), width 288px) */
.km-footer-col--nav2 {
    position: absolute;
    left: calc(50% + 336px);
    top: 48px;
    width: 288px;
    display: flex;
    flex-direction: column;
    z-index: 2;
}

.km-footer-col--nav2 .km-footer-nav-block {
    margin-bottom: 24px;
}

/* Кнопка реквизитов */
.km-footer-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: 275px;
    height: 33px;
    color: #FFFFFF;
    text-decoration: none;
    font-family: 'Geologica', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 18px;
    line-height: 28.8px;
    transition: color 0.3s ease;
}

.km-footer-download-btn span {
    border-bottom: 1px solid #E4E4E4;
    transition: border-color 0.3s ease;
}

.km-footer-download-btn:hover {
    color: #CD1719;
}

.km-footer-download-btn:hover span {
    border-color: #CD1719;
}

.km-footer-download-btn svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* 4. Фоновый декор полос подвала (Прижат строго к правому краю экрана) */
.km-footer-bg-lines {
    position: absolute;
    right: 0;
    top: 0;
    width: 1345px;
    height: 380px;
    background-image: url('/local/assets/images/footer-bg-lines.svg');
    background-size: 1345px 380px;
    background-repeat: no-repeat;
    background-position: right top;
    pointer-events: none;
    z-index: 1;
}

/* 5. Нижняя полоса копирайта (Выровнена по краям контента) */
.km-footer-bottom {
    position: relative;
    width: 100%;
    height: 80px;
    background-color: #1A1A1A;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--km-container-padding, 64px);
    z-index: 2;
}

.km-footer-copy {
    font-family: 'Geologica', sans-serif;
    font-style: normal;
    font-weight: 300;
    font-size: 14px;
    line-height: 22.4px;
    color: #A0A0A0;
    margin: 0;
}

.km-footer-developer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Geologica', sans-serif;
    font-style: normal;
    font-weight: 300;
    font-size: 14px;
    line-height: 22.4px;
    color: #A0A0A0;
    text-decoration: none;
}

.km-footer-developer img {
    height: 32px;
    width: auto;
}

/* ─── Адаптив подвала ─── */
@media (max-width: 1440px) {
    .km-footer-col--contacts {
        width: 440px;
    }
    .km-footer-col--nav1 {
        left: calc(50% + 10px);
        width: 270px;
    }
    .km-footer-col--nav2 {
        left: calc(50% + 280px);
        width: 250px;
    }
}

@media (max-width: 1200px) {
    .km-footer-top {
        height: auto;
        padding: 48px var(--km-container-padding, 32px);
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

    .km-footer-col--contacts,
    .km-footer-col--nav1,
    .km-footer-col--nav2 {
        position: static;
        width: 100%;
        left: auto;
        top: auto;
    }

    .km-footer-col--nav1 .km-footer-nav-block {
        margin-bottom: 24px;
    }

    .km-footer-col--nav2 .km-footer-nav-block {
        margin-bottom: 24px;
    }

    .km-footer-phone-block {
        width: 100%;
        margin-bottom: 24px;
    }

    .km-footer-calc-btn {
        margin-bottom: 32px;
    }

    .km-footer-address {
        width: 100%;
    }

    .km-footer-bg-lines {
        opacity: 0.3;
    }
}

@media (max-width: 768px) {
    .km-footer-top {
        grid-template-columns: 1fr;
        padding: 40px var(--km-container-padding, 20px);
        gap: 32px;
    }

    .km-footer-phone {
        font-size: 26px;
        line-height: 32px;
    }

    .km-footer-calc-btn {
        width: 100%;
        justify-content: center;
    }

    .km-footer-mails {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        width: 100%;
    }

    .km-footer-bottom {
        flex-direction: column;
        height: auto;
        padding: 24px var(--km-container-padding, 20px);
        gap: 16px;
        text-align: center;
    }

    .km-footer-bg-lines {
        display: none;
    }
}

@media (max-width: 480px) {
    .km-footer-top {
        padding: 32px var(--km-container-padding, 16px);
        gap: 28px;
    }

    .km-footer-phone {
        font-size: 22px;
        line-height: 28px;
    }

    .km-footer-email,
    .km-footer-address,
    .km-footer-menu__link,
    .km-footer-download-btn {
        font-size: 16px;
    }

    .km-footer-bottom {
        padding: 20px var(--km-container-padding, 16px);
    }
}

/* Плавающий виджет Max в правом нижнем углу */
.btn-contacts {
    position: fixed;
    right: 48px;
    bottom: 48px;
    z-index: 1000;
}

.btn-contacts__floating-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #FFFFFF;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.14);
    border: 1px solid #EDEDED;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-contacts__floating-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 30px rgba(91, 59, 250, 0.25);
}

.btn-contacts__floating-btn img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

@media (max-width: 576px) {
    .btn-contacts {
        right: 20px;
        bottom: 20px;
    }
    .btn-contacts__floating-btn {
        width: 48px;
        height: 48px;
    }
    .btn-contacts__floating-btn img {
        width: 28px;
        height: 28px;
    }
}
