/* ----------------------------- */
/* Footer базовая структура */
/* ----------------------------- */
.footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    background-color: var(--color-bg);
    color: var(--color-text, #ccc);
}

/* Верхняя часть футера */
.footer__top {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    /* расстояние между колонками */
    max-width: var(--container-width);
    width: 100%;
    padding: 80px 20px 40px 20px;
}

/* ----------------------------- */
/* Колонки футера */
/* ----------------------------- */
.footer__column {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 200px;
    /* минимальная ширина колонки для адаптива */
}

/* Логотип и адрес */
.footer__column--logo {
    max-width: 350px;
    gap: 40px;
}

.footer__logo-img {
    width: 160px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.footer__logo:hover .footer__logo-img {
    transform: scale(1.05);
}

/* Адрес */
.footer__address {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.footer__icon {
    width: 40px;
    height: 40px;
    background-color: var(--color-accent);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.footer__icon:hover {
    transform: scale(1.1);
    background-color: var(--color-primary);
}

.footer__icon-img {
    width: 20px;
    height: 20px;
}

.footer__address-text {
    color: var(--color-text);
    font-style: normal;
    line-height: 1.5;
}

/* ----------------------------- */
/* Навигация и юридические ссылки */
/* ----------------------------- */
.footer__nav-menu,
.footer__nav-legal ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer__nav-menu a {
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.2s ease;
}

.footer__nav-menu a:hover {
    color: var(--color-accent, #019344);
    transform: translateX(4px);
}

/* ----------------------------- */
/* Контакты */
/* ----------------------------- */
.footer__column--contacts {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.footer__phones {
    display: flex;
    align-items: center;
    gap: 16px;
}

.footer__numbers {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer__numbers a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.3s ease, transform 0.2s ease;
}

.footer__numbers a:hover {
    color: var(--color-accent, #019344);
    transform: translateX(2px);
}

.footer__email-list {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.footer__email-link {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.3s ease, transform 0.2s ease;
}

.footer__email-link:hover {
    color: var(--color-accent, #019344);
    transform: translateX(2px);
}

/* Мессенджеры */
.footer__messengers {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer__messenger {
    display: flex;
}

.footer__messenger:hover .footer__icon {
    background-color: var(--color-primary);
}

/* ----------------------------- */
/* Нижняя часть футера */
/* ----------------------------- */
.footer__bottom {
    display: flex;
    gap: 16px;
    width: 100%;
    border-top: 1px solid var(--color-text-extramuted);
    padding: 20px 0 80px 0;
    text-align: center;
    flex-direction: column;
}

.footer__developer {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer__developer img {
    width: 110px;
    height: 30px;
}

.footer__developer,
.footer__copy {
    color: var(--color-text-muted, #777);
    font-size: 13px;
}

.footer__messenger.footer__messenger--whatsapp {
    display: none;
}

/* ----------------------------- */
/* Модальное окно */
/* ----------------------------- */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    /* полупрозрачный фон */
    display: none;
    /* по умолчанию скрыто */
    justify-content: center;
    align-items: center;
    padding: 20px;
    z-index: 9999;
    overflow-y: auto;
}

.modal.active {
    display: flex;
    animation: modalFadeIn 0.3s ease forwards;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal__content {
    background: #fff;
    padding: 40px 30px;
    max-width: 600px;
    width: 100%;
    border-radius: 16px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

/* Кнопка закрытия */
.modal__close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    background: none;
    border: none;
    cursor: pointer;
    color: #333;
    transition: color 0.3s ease;
}

.modal__close:hover {
    color: #000;
}

/* ----------------------------- */
/* Стили формы CF7 */
/* ----------------------------- */
.modal__content form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal__content label {
    display: flex !important;
    flex-direction: row !important;
    font-weight: 500;
    color: #333;
    font-size: 14px;
    gap: 6px;
}

/* Поля формы */
.modal__content input[type="text"],
.modal__content input[type="email"],
.modal__content textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Поле телефона без стиля */
.modal__content input[type="tel"] {
    border: 1px solid #ccc;
    border-radius: 8px;
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Фокус для текстовых полей и textarea */
.modal__content input[type="text"]:focus,
.modal__content input[type="email"]:focus,
.modal__content textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2);
}

.modal__content textarea {
    min-height: 120px;
    resize: vertical;
}

/* Кнопка отправки с акцентом и блеском */
.modal__content input[type="submit"] {
    align-self: flex-start;
    padding: 12px 24px;
    background-color: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease, transform 0.2s ease;
}

.modal__content input[type="submit"]::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.5) 50%, rgba(255, 255, 255, 0.2) 100%);
    transform: rotate(45deg) translateX(-100%);
    transition: all 0.5s ease;
}

.modal__content input[type="submit"]:hover::after {
    transform: rotate(45deg) translateX(100%);
}

.modal__content input[type="submit"]:hover {
    transform: translateY(-2px);
}

/* ----------------------------- */
/* Адаптив для мобильных */
/* ----------------------------- */
@media (max-width: 768px) {
    .modal__content {
        padding: 30px 20px;
    }

    .modal__content input[type="submit"] {
        width: 100%;
    }
}


/* Стили для согласия только в модалке */
.join-horizontal__agreement {

    margin-bottom: 15px;
}

#modal-join-content .join-horizontal__agreement input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

#modal-join-content .join-horizontal__agreement a {
    color: var(--color-accent);
    text-decoration: underline;
}