/* ==================== FOOTER STYLES ==================== */
/* Адаптированные стили для WordPress темы */

/* Определяем CSS переменные, если они еще не определены */
:root {
    --primary: #2C3DF5;
    --bg-light: #F5F9FF;
    --bg-white: #FFFFFF;
    --text-dark: #213777;
    --text-gray: #6B7280;
    --border: #E6E6FF;
}

.footer-container {
    /* Используем Montserrat как основной шрифт футера */
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    background: var(--bg-white, #FFFFFF);
    width: 100%;
    margin-top: 0; /* Убираем margin-top, так как это WordPress */
    position: relative;
    z-index: 1; /* Ниже sticky bar */
}

/* Применяем Montserrat ко всем элементам футера */
.footer-container *,
.footer-subscribe *,
.footer-main *,
.footer-bottom * {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* ==================== БЛОК ПОДПИСКИ НА TELEGRAM ==================== */
.footer-subscribe {
    background: linear-gradient(135deg, #E0F2FE 0%, #BAE6FD 50%, #93C5FD 100%);
    padding: 32px 0;
    width: 100%;
}

.footer-subscribe-content {
    max-width: 1520px;
    margin: 0 auto;
    padding: 0 204px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.subscribe-icon {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(44, 61, 245, 0.15);
}

.subscribe-icon svg {
    width: 24px;
    height: 24px;
    color: var(--primary, #2C3DF5);
}

.subscribe-text {
    flex: 1;
    color: var(--text-dark, #213777);
}

.subscribe-text h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 4px 0;
    letter-spacing: 0.2px;
    line-height: 1.3;
    color: var(--text-dark, #213777);
}

.subscribe-text p {
    font-size: 13px;
    font-weight: 500;
    margin: 0;
    line-height: 1.5;
    color: var(--primary, #2C3DF5);
    opacity: 0.9;
}

.btn-subscribe {
    height: 44px;
    padding: 0 28px;
    background: white;
    color: var(--primary, #2C3DF5);
    border: 2px solid rgba(44, 61, 245, 0.2);
    border-radius: 8px;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(44, 61, 245, 0.1);
}

.btn-subscribe:hover {
    background: white;
    border-color: var(--primary, #2C3DF5);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 61, 245, 0.2);
    color: var(--primary, #2C3DF5);
}

.btn-subscribe:active {
    transform: translateY(0);
}

/* ==================== ОСНОВНОЙ КОНТЕНТ ФУТЕРА ==================== */
.footer-main {
    background: var(--bg-light, #F5F9FF);
    padding: 32px 0;
    width: 100%;
    margin-top: 0;
}

.footer-content {
    max-width: 1520px;
    margin: 0 auto;
    padding: 0 204px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 48px;
}

.footer-column {
    display: flex;
    flex-direction: column;
}

.footer-column h3.footer-heading {
    color: var(--text-dark, #213777);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 0 0 16px 0;
    line-height: 1.2;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links li:last-child {
    margin-bottom: 0;
}

.footer-links a {
    color: var(--text-gray, #6B7280);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline-block;
    line-height: 1.5;
}

.footer-links a:hover {
    color: var(--primary, #2C3DF5);
}

/* ==================== КОНТАКТНЫЕ ЭЛЕМЕНТЫ ==================== */
.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    color: var(--text-gray, #6B7280);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
}

.contact-item:last-of-type {
    margin-bottom: 0;
}

.contact-item svg {
    width: 16px;
    height: 16px;
    color: var(--primary, #2C3DF5);
    margin-top: 2px;
    flex-shrink: 0;
}

.contact-item a {
    color: var(--primary, #2C3DF5);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s ease;
}

.contact-item a:hover {
    opacity: 0.8;
}

.contact-item span {
    line-height: 1.5;
}

/* ==================== СОЦИАЛЬНЫЕ ИКОНКИ ==================== */
.social-icons {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.social-icons a {
    width: 36px;
    height: 36px;
    background: white;
    border: 2px solid var(--border, #E6E6FF);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
}

/* Telegram - оригинальный цвет #0088cc */
.social-icons a:nth-child(1) svg {
    color: var(--text-gray, #6B7280);
    transition: color 0.2s ease;
}

.social-icons a:nth-child(1):hover {
    border-color: #0088cc;
    background: #0088cc;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.3);
}

.social-icons a:nth-child(1):hover svg {
    color: white;
}

/* WhatsApp - оригинальный цвет #25D366 */
.social-icons a:nth-child(2) svg {
    color: var(--text-gray, #6B7280);
    transition: color 0.2s ease;
}

.social-icons a:nth-child(2):hover {
    border-color: #25D366;
    background: #25D366;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.social-icons a:nth-child(2):hover svg {
    color: white;
}

.social-icons svg {
    width: 18px;
    height: 18px;
}

/* ==================== НИЖНЯЯ СТРОКА (COPYRIGHT) ==================== */
/* Footer-bottom показываем ТОЛЬКО на страницах товаров для отступа под sticky bar */
.footer-bottom {
    background: transparent !important;
    border-top: none !important;
    padding: 0 !important;
    padding-bottom: 120px !important; /* Отступ для sticky bar на страницах товаров */
    width: 100% !important;
    position: relative !important;
    z-index: 1 !important;
    min-height: auto !important;
    margin-bottom: 0 !important;
    display: none; /* По умолчанию скрыт */
}

/* Показываем footer-bottom только на страницах товаров */
.footer-container.product-page-footer .footer-bottom {
    display: block !important;
}

@media (max-width: 768px) {
    .footer-bottom {
        padding-bottom: 140px !important; /* Увеличенный отступ для sticky bar в мобильной версии */
    }
}

.footer-bottom-content {
    max-width: 1520px !important;
    margin: 0 auto !important;
    padding: 0 204px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    font-size: 13px !important;
    color: var(--text-gray, #6B7280) !important;
    line-height: 1.6 !important; /* Увеличенный line-height для лучшей читаемости */
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* Стили для информации о компании в меню Ресурсы */
.footer-links .footer-company-info {
    color: var(--text-gray, #6B7280) !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.6 !important;
    margin-top: 8px !important;
    padding-top: 8px !important;
    border-top: 1px solid var(--border, #E6E6FF) !important;
}

.footer-links .footer-company-info:first-of-type {
    margin-top: 12px !important;
    padding-top: 12px !important;
}

.footer-links .footer-company-info a {
    color: var(--text-gray, #6B7280) !important;
    text-decoration: none !important;
    pointer-events: none !important;
    cursor: default !important;
}

.footer-bottom-content span {
    display: block !important;
    white-space: nowrap !important; /* Предотвращаем перенос ИНН на новую строку */
    font-weight: 500 !important;
    margin: 0 !important;
    padding: 0 !important;
}

@media (max-width: 768px) {
    .footer-bottom-content {
        flex-direction: column !important;
        text-align: center !important;
        padding: 0 20px !important;
        gap: 8px !important;
    }
}

.footer-bottom-content a {
    color: var(--primary, #2C3DF5);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s ease;
}

.footer-bottom-content a:hover {
    opacity: 0.8;
}

/* ==================== RESPONSIVE ==================== */

/* Планшеты и небольшие десктопы */
@media (max-width: 1400px) {
    .footer-subscribe-content,
    .footer-content,
    .footer-bottom-content {
        padding: 0 80px;
    }
}

/* Планшеты */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
    
    .footer-subscribe-content {
        flex-direction: column;
        text-align: center;
        padding: 0 40px;
    }
    
    .subscribe-text h3 {
        font-size: 18px;
    }
    
    .subscribe-text p {
        font-size: 13px;
    }
    
    .btn-subscribe {
        width: 100%;
    }
}

/* Мобильные устройства */
@media (max-width: 640px) {
    .footer-subscribe {
        padding: 24px 0;
    }
    
    .footer-subscribe-content {
        padding: 0 20px;
        gap: 12px;
    }
    
    .subscribe-icon {
        width: 40px;
        height: 40px;
    }
    
    .subscribe-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .subscribe-text h3 {
        font-size: 15px;
    }
    
    .subscribe-text p {
        font-size: 11px;
    }
    
    .footer-main {
        padding: 24px 0;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 0 20px;
    }
    
    .footer-column h3.footer-heading {
        font-size: 12px;
        margin-bottom: 12px;
    }
    
    .footer-links a,
    .contact-item {
        font-size: 13px;
    }
    
    .footer-links li {
        margin-bottom: 8px;
    }
    
    .contact-item {
        margin-bottom: 10px;
    }
    
    .contact-item svg {
        width: 14px;
        height: 14px;
    }
    
    .social-icons {
        gap: 8px;
        margin-top: 10px;
    }
    
    .social-icons a {
        width: 32px;
        height: 32px;
    }
    
    .social-icons svg {
        width: 16px;
        height: 16px;
    }
    
    .footer-bottom {
        padding: 16px 0 !important;
        padding-bottom: 140px !important; /* Увеличенный отступ для sticky bar в мобильной версии */
    }
    
    .footer-bottom-content {
        padding: 0 20px !important;
        flex-direction: column !important;
        text-align: center !important;
        font-size: 12px !important;
        gap: 8px !important;
    }
    
    .footer-bottom-content span {
        display: block !important;
        white-space: nowrap !important;
    }
}

/* Очень маленькие экраны */
@media (max-width: 360px) {
    .footer-subscribe-content {
        padding: 0 16px;
    }
    
    .footer-content {
        padding: 0 16px;
    }
    
    .footer-bottom-content {
        padding: 0 16px;
        font-size: 12px;
    }
}

/* ==================== ИНТЕГРАЦИЯ СО STICKY BAR ==================== */
/* Убеждаемся, что sticky bar не перекрывает футер */
body {
    padding-bottom: 0; /* Убираем padding-bottom, если он был */
}

/* Добавляем минимальный отступ снизу для контента, чтобы sticky bar не перекрывал футер */
.nt-product-card,
main,
#main {
    padding-bottom: 0; /* Убираем отступ, так как футер сам имеет padding-bottom */
}

@media (max-width: 768px) {
    .nt-product-card,
    main,
    #main {
        padding-bottom: 0; /* Убираем отступ, так как футер сам имеет padding-bottom */
    }
}

/* Убеждаемся, что футер всегда виден */
.footer-container {
    position: relative;
    z-index: 1; /* Ниже sticky bar (z-index: 999) */
    clear: both;
    overflow: visible;
}

/* Исправление отображения футера на странице калькулятора */
.calculator-section ~ .footer-container,
#calculator ~ .footer-container,
.nt-calculator-section ~ .footer-container,
.calculator-page-footer {
    position: relative !important;
    z-index: 1 !important;
    clear: both !important;
    overflow: visible !important;
    margin-top: 60px !important;
    width: 100% !important;
    min-height: auto !important;
}

/* Убеждаемся, что футер не обрезается на странице калькулятора */
body.calculator-page .footer-container,
.page-template-calculator .footer-container {
    position: relative !important;
    z-index: 1 !important;
    clear: both !important;
    overflow: visible !important;
    margin-top: 60px !important;
}

/* Исправление для страницы калькулятора - убеждаемся что контент не перекрывает футер */
body:has(.calculator-section) .footer-container,
body:has(#calculator) .footer-container {
    margin-top: 60px !important;
    clear: both !important;
}

/* Дополнительные стили для страницы калькулятора */
.page-id-calculator .footer-container,
[class*="calculator"] .footer-container {
    margin-top: 60px !important;
    clear: both !important;
}

