/**
 * Footer Styles - Дополнительные колонки со ссылками
 * Стилизация в соответствии с дизайном темы ruscomp
 */

/* Контейнер сетки футера */
.footer-grid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 20px 30px;
    background: #fff;
}

/* Сетка из 4 колонок */
.footer-table {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

/* Заголовки колонок - фиксированная высота */
.footer-col h3 {
    /* color: inherit; */
    color: #a62d26;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    /* border-bottom: 2px solid #a10a00; */
    display: block; 
    position: relative;
    min-height: 50px; /* Фиксированная минимальная высота */
    line-height: 1.3; /* Стабильный межстрочный интервал */
}

.footer-col h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100px; /* Ширина линии как у текста */
    height: 2px;
    background: #a10a00;
}

/* Чтобы заголовки не разъезжались, оборачиваем в блок */
.footer-col {
    display: flex;
    flex-direction: column;
}

.footer-col .h3-wrapper {
    display: block;
    width: 100%;
}

/* Альтернативный вариант с точной фиксированной высотой */
.footer-col h3.fixed-height {
    height: 50px; /* Точная высота */
    overflow: hidden; /* Скрываем переполнение, если текст длинный */
}

/* Для длинных заголовков - перенос слов */
.footer-col h3 {
    word-wrap: break-word;
    word-break: break-word;
}

/* Списки ссылок */
.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

/* Ссылки */
.footer-links a {
    color: inherit;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: #a10a00;
    padding-left: 3px;
    text-decoration: none;
}

/* Адаптивность для планшетов */
@media (max-width: 992px) {
    .footer-table {
        gap: 20px;
    }
    
    .footer-col h3 {
        font-size: 16px;
        min-height: 45px; /* Уменьшаем высоту для планшетов */
    }
    
    .footer-links a {
        font-size: 13px;
    }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .footer-table {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .footer-grid {
        padding: 20px 15px 20px;
    }
    
    .footer-col h3 {
        font-size: 16px;
        min-height: 40px; /* Еще меньше для мобильных */
        margin-bottom: 12px;
    }
}

@media (max-width: 480px) {
    .footer-table {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .footer-col h3 {
        min-height: auto; /* На мобильных убираем фиксированную высоту */
        margin-bottom: 10px;
    }
    
    .footer-links li {
        margin-bottom: 6px;
    }
}

/* Дополнительно: выравнивание содержимого колонок по верхнему краю */
.footer-col {
    display: flex;
    flex-direction: column;
    vertical-align: top;
}

.footer-links {
    flex: 1;
}

/* Если нужно, чтобы все колонки были одинаковой высоты */
.footer-table {
    align-items: start; /* Выравнивание по верхнему краю */
}