/**
 * Footer Styles
 * Стили футера сайта (desktop 1920px)
 */

/* Футер */
#footer {
    background-color: var(--header-bg);
    padding: 35px 0 25px;
}

/* Сетка футера */
.footer-grid {
    display: grid;
    grid-template-columns: 250px 0.7fr 1fr 1fr;
    gap: 78px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

/* Колонки */
.footer-col {
    color: var(--header-text);
}

/* Логотип в футере */
.footer-logo {
    margin-bottom: 90px;
}

.footer-logo svg {
    height: 46px;
    width: auto;
    display: block;
}

/* Кнопки действий в футере */
.footer-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-actions .btn {
    width: 100%;
}

/* Стили кнопок для футера - специфичные переопределения */
.footer-actions .btn-outline {
    border-color: var(--button-border);
    color: var(--header-text);
    padding: 18px 64px;
    font-weight: normal;
}

.footer-actions .btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.footer-actions .btn-primary {
    background-color: var(--button-red);
    border: 1px solid transparent;
    color: var(--header-text);
    padding: 18px 24px;
}

/* Навигация в футере */
.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-nav li {
    margin: 0;
}

.footer-nav li a,
.footer-nav a {
    color: var(--header-text);
    font-size: 18px;
    line-height: 1.5;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.footer-nav li a:hover,
.footer-nav a:hover {
    opacity: 0.7;
}

/* Контакты в футере */
.footer-contacts {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-contact-item .icon-phone,
.footer-contact-item .icon-email {
    width: 19px;
    height: 19px;
    flex-shrink: 0;
}

.footer-contact-item a {
    color: var(--header-text);
    font-size: 21px;
    line-height: 1.5;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.footer-contact-item a:hover {
    opacity: 0.7;
}

/* Кнопка результатов в футере */
.btn-results-footer {
    background-color: var(--button-red);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--border-radius);
    color: var(--header-text);
    font-size: 17px;
    font-weight: 500;
    padding: 15px 25px;
    text-decoration: none;
    display: inline-block;
    margin-top: 50px;
    transition: opacity 0.3s ease;
}

.btn-results-footer:hover {
    opacity: 0.9;
}

/* Кнопка результатов в copyright секции (скрыта по умолчанию) */
.btn-results-copyright {
    display: none;
}

/* Нижняя часть футера */
.footer-bottom {
    padding: 35px 0 0;
}

.footer-bottom .container {
    display: grid;
    grid-template-columns: 3fr 1fr auto;
    gap: 40px;
    align-items: start;
}

/* Блок информации (legal + первые ссылки) */
.footer-info {
    display: flex;
    gap: 20px;
}

/* Юридическая информация */
.footer-legal {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-legal p {
    color: #D8DCE5;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.footer-warning {
    font-weight: 400;
}

.footer-company {
    font-weight: 400;
}

/* Ссылки в футере */
.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links-secondary {
    margin-top: 0;
}

.footer-links a {
    color: #D8DCE5;
    font-size: 14px;
    line-height: 1.5;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 0.7;
}

/* Социальные сети */
.footer-social {
    display: flex;
    gap: 12px;
    align-items: end;
    height: 100%;
}

.social-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.social-link:hover {
    opacity: 0.8;
}

.social-link svg {
    width: 36px;
    height: 36px;
    color: white;
}
.footer-brand {
    display: flex;
    flex-direction: column;
}
.footer-logo {
    flex-grow: 1;
}
.footer-actions {
    margin-bottom: 10px;
}

@media (max-width: 1300px) {
    .footer-actions {
        margin-bottom: clamp(0px, calc(3.344vw - 33.478px), 10px);
    }
    .footer-grid {
        gap: clamp(50px, calc(9.333vw - 43.333px), 78px);
    }
    .footer-actions .btn-outline {
        padding: clamp(16px, calc(0.667vw + 9.333px), 18px) 64px;
        font-size: clamp(16px, calc(0.333vw + 12.667px), 17px);
    }
    .callback-btn, .btn-results-footer {
        font-size: clamp(16px, calc(0.333vw + 12.667px), 17px);
    }
    .footer-actions .btn-primary {
        padding: clamp(16px, calc(0.667vw + 9.333px), 18px) clamp(21px, calc(1vw + 11px), 24px);
    }

    /* Скрыть кнопку результатов в колонке 4 */
    .btn-results-footer {
        display: none;
    }

    /* Уменьшить первую колонку footer-grid */
    .footer-grid {
        grid-template-columns: clamp(200px, 16.667vw, 250px) 0.7fr 1fr 1fr;
    }

    /* === Footer-bottom: реструктуризация === */

    /* Развернуть footer-info для доступа к дочерним элементам в гриде */
    .footer-info {
        display: contents;
    }

    /* Сетка: 3 колонки, 3 строки (контент / разделитель / ссылки) */
    .footer-bottom .container {
        grid-template-columns: 1fr 1fr auto;
        grid-template-rows: auto 1px auto;
        gap: 0;
        column-gap: 30px;
    }

    /* Строка 1: Юридический текст (колонки 1-2) */
    .footer-legal {
        grid-column: 1 / 3;
        grid-row: 1;
        padding-bottom: 25px;
    }

    /* Строка 1: Соцсети (колонка 3) */
    .footer-social {
        grid-column: 3;
        grid-row: 1;
        align-self: end;
        height: auto;
        padding-bottom: 25px;
        justify-content: end;
    }

    /* Разделительная линия */
    .footer-bottom .container::after {
        content: '';
        grid-column: 1 / -1;
        grid-row: 2;
        background-color: rgba(255, 255, 255, 0.2);
        height: 1px;
    }

    /* Строка 3: Ссылки группа 1 (колонка 1) */
    .footer-links {
        grid-column: 1;
        grid-row: 3;
        padding-top: 25px;
    }

    /* Строка 3: Ссылки группа 2 (колонка 2) */
    .footer-links-secondary {
        grid-column: 2;
        grid-row: 3;
        padding-top: 25px;
    }

    /* Строка 3: Кнопка результатов (колонка 3) */
    .btn-results-copyright {
        display: inline-block;
        grid-column: 3;
        grid-row: 3;
        align-self: center;
        background-color: var(--button-red);
        border: 1px solid rgba(255, 255, 255, 0.6);
        border-radius: var(--border-radius);
        color: var(--header-text);
        font-size: clamp(15px, calc(0.333vw + 12.667px), 17px);
        font-weight: 500;
        padding: 12px 20px;
        text-decoration: none;
        white-space: nowrap;
        transition: opacity 0.3s ease;
        margin-top: 25px;
    }

    .btn-results-copyright:hover {
        opacity: 0.9;
    }
}


/* Мобильные стили */
@media (max-width: 1000px) {
    #footer {
        padding: 30px 0 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-logo {
        margin-bottom: 30px;
    }

    .footer-logo svg {
        height: 36px;
    }

    .footer-actions .btn-outline {
        padding: 14px 20px;
    }

    .footer-actions .btn-primary {
        padding: 14px 20px;
    }

    .footer-nav {
        gap: 15px;
    }

    .footer-nav li a,
    .footer-nav a {
        font-size: 15px;
    }

    .footer-contact-item a {
        font-size: 17px;
    }

    .btn-results-footer {
        display: inline-block;
        font-size: 15px;
        padding: 12px 20px;
        margin-top: 25px;
    }

    .footer-bottom .container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Вернуть footer-info в нормальный режим (сброс display: contents) */
    .footer-info {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .footer-social {
        align-items: center;
        height: auto;
    }

    /* Скрыть кнопку результатов из copyright секции */
    .btn-results-copyright {
        display: none;
    }

    /* Сбросить grid-позиции */
    .footer-legal,
    .footer-links,
    .footer-links-secondary,
    .footer-social {
        grid-column: auto;
        grid-row: auto;
        padding-top: 0;
        padding-bottom: 0;
    }

    /* Убрать разделительную линию */
    .footer-bottom .container::after {
        display: none;
    }
}