/* ===== FOOTER STYLES ===== */

/* Верхняя часть с картинкой */
.footer-top {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    padding: var(--space-12) 0;
    color: var(--color-white);
    position: relative;
}

.footer-container {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: var(--space-8);
    align-items: center;
    min-height: 200px;
}

/* Секция логотипа с описанием */
.footer-logo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
}

/* Логотип футера */
.footer-logo {
    text-align: center;
    background: var(--color-white);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
    min-width: 200px;
}

.footer-logo img {
    height: 100%;
    width: auto;
    max-width: 100%;
    max-height: 80px;
    object-fit: contain;
}

/* Описание под логотипом */
.footer-description {
    color: var(--color-white);
    font-size: var(--text-sm);
    line-height: 1.4;
    text-align: center;
    max-width: 300px;
    opacity: 0.9;
    font-weight: var(--font-medium);
}

/* Меню футера в колонку */
.footer-menu {
    display: flex;
    justify-content: center;
    height: 100%;
}

.footer-menu-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: center;
    height: 100%;
}

.footer-menu-list li a {
    color: var(--color-white);
    text-decoration: none;
    font-weight: var(--font-medium);
    transition: color var(--transition-fast);
    position: relative;
    white-space: nowrap;
    padding: var(--space-1) 0;
    font-size: var(--text-base);
}

.footer-menu-list li a:hover {
    color: var(--color-accent);
}

.footer-menu-list li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-accent);
    transition: width var(--transition-fast);
}

.footer-menu-list li a:hover::after {
    width: 100%;
}

/* Контакты футера */
.footer-contacts {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    justify-content: center;
    height: 100%;
}

/* Телефоны в футере */
.footer-phones {
    margin-bottom: var(--space-4);
}

.footer-phones .phones-row {
    display: flex;
    align-items: center;
    gap: 0;
    color: var(--color-white);
    font-weight: var(--font-semibold);
    font-size: var(--text-base);
    white-space: nowrap;
}

.footer-phones .phone-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-right: var(--space-2);
    fill: var(--color-accent);
}

.footer-phones .phone-link {
    color: var(--color-white);
    text-decoration: none;
    font-weight: var(--font-semibold);
    transition: color var(--transition-fast);
    font-size: var(--text-base);
}

.footer-phones .phone-link:hover {
    color: var(--color-accent);
}

.footer-phones .phone-separator {
    color: var(--color-white);
    margin: 0 var(--space-1);
    font-weight: var(--font-semibold);
}

/* Контактные элементы */
.footer-contact-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-base);
}

.contact-icon {
    width: 18px;
    height: 18px;
    fill: var(--color-accent);
    flex-shrink: 0;
}

.footer-contact-item a,
.footer-contact-item span {
    color: var(--color-white);
    text-decoration: none;
    transition: color var(--transition-fast);
    font-size: var(--text-base);
}

.footer-contact-item a:hover {
    color: var(--color-accent);
}

/* Соцсети в футере */
.footer-social {
    display: flex;
    justify-content: center;
    gap: var(--space-3);
    margin-top: var(--space-4);
}

.footer-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
}

/* Фирменные цвета для мессенджеров */
.footer-social-link.vk-link {
    background: var(--color-vk);
}

.footer-social-link.tg-link {
    background: var(--color-telegram);
}

.footer-social-link.wa-link {
    background: var(--color-whatsapp);
}

.footer-social-link.max-link {
    background: var(--color-max);
}

/* Эффекты при наведении */
.footer-social-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.footer-social-link.vk-link:hover {
    background: #0066DD;
}

.footer-social-link.tg-link:hover {
    background: #0077BB;
}

.footer-social-link.wa-link:hover {
    background: #20C155;
}

.footer-social-link.max-link:hover {
    background: #0066DD;
}

.footer-social-icon {
    width: 20px;
    height: 20px;
    fill: var(--color-white);
}

/* Блок менеджера */
.footer-manager {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
    text-align: center;
    min-width: 200px;
    justify-content: center;
    height: 100%;
}

/* Фотка менеджера */
.manager-photo {
    width: 320px;
    height: 320px;
    border-radius: var(--radius-lg);
    object-fit: cover;
    border: 3px solid var(--color-accent);
    box-shadow: var(--shadow-md);
}

.manager-photo.placeholder {
    background: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: var(--text-2xl);
}

.manager-name {
    font-weight: var(--font-bold);
    color: var(--color-white);
    font-size: var(--text-base);
}

.manager-phone {
    font-weight: var(--font-semibold);
    color: var(--color-white);
    text-decoration: none;
    transition: color var(--transition-fast);
    font-size: var(--text-base);
}

.manager-phone:hover {
    color: var(--color-accent);
}

/* Кнопка заказа звонка в футере */
.footer-call-btn {
    background: var(--color-accent);
    color: #000000;
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-full);
    text-decoration: none;
    font-weight: var(--font-semibold);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    transition: all var(--transition-fast);
    white-space: nowrap;
    font-size: var(--text-base);
    border: 2px solid transparent;
    justify-content: center;
}

.footer-call-btn:hover {
    background: var(--color-accent-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-accent-dark);
}

.footer-call-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Нижняя часть футера */
.footer-bottom {
    background: #ffffe5;
    padding: var(--space-6) 0;
    color: #000000;
}

.footer-rekv {
    font-size: var(--text-sm);
    color: #000000;
    line-height: 1.4;
    margin-bottom: var(--space-4);
    font-weight: var(--font-bold);
    text-align: center;
}

.footer-rekv p {
    margin: 0 0 var(--space-2);
    font-weight: var(--font-bold);
}

.wrapper_pd {
    display: flex;
    justify-content: center;
    gap: var(--space-6);
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
}

.personal_data {
    color: #000000;
    text-decoration: none;
    font-size: var(--text-base);
    transition: color var(--transition-fast);
    font-weight: var(--font-bold);
}

.personal_data:hover {
    color: var(--color-accent);
}

.wrapper_esa_copyright {
    font-size: 0.7rem;
    color: #000000;
    line-height: 1.4;
    text-align: center;
}

.wrapper_esa_copyright p {
    margin: 0 0 var(--space-2);
    font-weight: var(--font-bold);
}

/* ===== ПРОСТОЙ ПЛАВАЮЩИЙ БЛОК ИКОНОК ===== */
.messenger-widget {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    z-index: var(--z-fixed);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.messenger-item {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-xl);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.messenger-item:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-2xl);
}

/* Фирменные цвета мессенджеров */
.messenger-item.tg-item {
    background: var(--color-telegram);
}

.messenger-item.wa-item {
    background: var(--color-whatsapp);
}

.messenger-item.vk-item {
    background: var(--color-vk);
}

.messenger-item.max-item {
    background: #6a3ae6;
}

/* ===== АДАПТИВНОСТЬ ===== */

@media (max-width: 1024px) {
    .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-8);
        align-items: start;
        min-height: auto;
    }

    .footer-logo-section {
        grid-column: 1 / -1;
        margin-bottom: var(--space-4);
    }

    .footer-logo {
        height: 100px;
        min-width: 180px;
    }

    .footer-logo img {
        max-height: 70px;
    }

    .footer-description {
        max-width: 400px;
    }

    .footer-menu {
        grid-column: 1;
        justify-content: flex-start;
        height: auto;
    }

    .footer-contacts {
        grid-column: 2;
        height: auto;
    }

    .footer-manager {
        grid-column: 1 / -1;
        margin-top: var(--space-4);
        height: auto;
    }

    .manager-photo {
        width: 150px;
        height: 150px;
    }

    .manager-photo.placeholder {
        font-size: var(--text-xl);
    }
}

@media (max-width: 768px) {
    .footer-top {
        padding: var(--space-8) 0;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: var(--space-6);
        align-items: center;
    }

    .footer-logo {
        margin-bottom: 0;
        height: 90px;
        min-width: 160px;
    }

    .footer-logo img {
        max-height: 60px;
    }

    .footer-description {
        font-size: var(--text-xs);
        max-width: 350px;
    }

    .footer-menu {
        grid-column: 1;
        justify-content: center;
        margin-bottom: var(--space-4);
        height: auto;
    }

    .footer-menu-list {
        align-items: center;
        text-align: center;
    }

    .footer-contacts {
        grid-column: 1;
        align-items: center;
        text-align: center;
        margin-bottom: var(--space-4);
        height: auto;
    }

    .footer-contact-item {
        justify-content: center;
    }

    .footer-manager {
        grid-column: 1;
        margin-top: 0;
        height: auto;
    }

    .footer-call-btn {
        padding: var(--space-2) var(--space-4);
        font-size: var(--text-sm);
    }

    .wrapper_pd {
        flex-direction: column;
        gap: var(--space-3);
        align-items: center;
        text-align: center;
    }

    .personal_data {
        font-size: var(--text-sm);
    }

    /* Адаптивность для плавающего виджета */
    .messenger-widget {
        bottom: var(--space-4);
        right: var(--space-4);
    }

    .messenger-item {
        width: 45px;
        height: 45px;
    }

    .messenger-item svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .footer-social {
        justify-content: center;
    }

    .footer-social-link {
        width: 36px;
        height: 36px;
    }

    .footer-social-icon {
        width: 18px;
        height: 18px;
    }

    .manager-photo {
        width: 120px;
        height: 120px;
    }

    .manager-photo.placeholder {
        font-size: var(--text-lg);
    }

    .manager-name {
        font-size: var(--text-sm);
    }

    .manager-phone {
        font-size: var(--text-sm);
    }

    .footer-menu-list li a {
        font-size: var(--text-sm);
    }

    .footer-contact-item {
        font-size: var(--text-sm);
    }

    .footer-contact-item a,
    .footer-contact-item span {
        font-size: var(--text-sm);
    }

    .footer-logo {
        height: 80px;
        min-width: 140px;
        padding: var(--space-3);
    }

    .footer-logo img {
        max-height: 50px;
    }

    .footer-description {
        max-width: 280px;
        font-size: 0.7rem;
    }

    .messenger-item {
        width: 40px;
        height: 40px;
    }

    .messenger-item svg {
        width: 18px;
        height: 18px;
    }
}

.wrapper_esa_logo {
    max-width: 150px;
    margin-top: 30px;
}

.wrapper_esa_logo span {
    display: block;
    text-align: center;
    font-size: 12px;
}

.wrapper_esa_logo a {
    color: #fff;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wrapper_esa_logo img {
    max-width: 80px;
}