/* /core/footer.css */

/* --- ОСНОВНОЙ КОНТЕЙНЕР ФУТЕРА --- */
.site-footer {
    background-color: #111111; /* Самый темный оттенок серого для футера */
    color: var(--text-secondary); /* Используем переменную для текста */
    padding: 3rem 0; /* Вертикальные отступы */
    border-top: 1px solid var(--border-color); /* Используем переменную для границы */
    flex-shrink: 0;
    padding-left: var(--sidebar-width-expanded);
    transition: padding-left 0.3s ease;
}

body.sidebar-collapsed .site-footer {
    padding-left: var(--sidebar-width-collapsed);
}

.footer-container {
    width: 100%;
    max-width: 1100px; /* Ширина контейнера чуть больше для нового дизайна */
    margin: 0 auto;
    padding: 0 1.5rem;
    box-sizing: border-box;
}

/* --- СЕТКА ДЛЯ КОЛОНОК --- */
.footer-grid {
    display: grid;
    /* 5 колонок с разной шириной */
    grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
    gap: 2rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--border-color); /* Используем переменную */
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#footer-col-pf {
    align-items: flex-start;
    justify-content: flex-start;
}


/* --- ЭЛЕМЕНТЫ ВНУТРИ КОЛОНОК --- */
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary); /* Используем переменную */
    text-decoration: none;
    margin-bottom: 0.5rem;
}

.footer-legal-text {
    font-size: 0.75rem; /* 12px */
    line-height: 1.5;
    color: #6B7281; /* Более темный серый для юр. текста */
    margin: 0;
}

.footer-heading {
    font-size: 0.875rem; /* 14px */
    font-weight: 600;
    color: var(--text-secondary); /* Используем переменную */
    text-transform: uppercase;
    margin: 0 0 0.5rem 0;
}

.footer-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links-list a {
    color: #D1D5DB; /* Светлый текст для ссылок */
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-links-list a:hover {
    color: var(--accent-color);
}

.footer-socials {
    display: flex;
    gap: 1rem;
}

.footer-socials a {
    color: var(--text-secondary); /* Используем переменную */
    transition: color 0.2s;
}
.footer-socials a:hover {
    color: var(--text-primary);
}

.btn-pf {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: rgba(34, 197, 94, 0.15); /* Зеленоватый фон */
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}
.btn-pf:hover {
    background-color: rgba(34, 197, 94, 0.25);
    color: #4ade80;
    transform: translateY(-2px);
}

/* --- НИЖНИЙ РЯД --- */
.footer-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    gap: 1.5rem;
}

.footer-bottom-left, .footer-bottom-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.age-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 2px solid #6B7281;
    border-radius: 50%;
    font-weight: 700;
    color: #94A3B8;
}

#footer-lang-switcher .lang-switcher-current {
    /* Стили для переключателя языка в футере */
    background-color: var(--card-color);
}

.footer-bottom-right img {
    height: 24px;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.footer-bottom-right img:hover {
    opacity: 1;
}

.footer-home-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--card-color);
    border-radius: 50%;
    color: var(--text-secondary);
    transition: all 0.2s;
}
.footer-home-icon:hover {
    background-color: var(--border-color);
    color: var(--text-primary);
}


/* --- АДАПТИВНОСТЬ ФУТЕРА --- */
@media (max-width: 992px) {
    .site-footer, body.sidebar-collapsed .site-footer {
        padding-left: 0;
    }

    .footer-grid {
        /* На планшетах делаем 3 колонки */
        grid-template-columns: 1fr 1fr 1fr;
    }
    #footer-col-info {
        grid-column: 1 / -1; /* Первая колонка занимает всю ширину */
    }
    #footer-col-pf {
        grid-column: 1 / -1; /* Кнопка тоже занимает всю ширину */
        justify-content: center;
        align-items: center;
    }
}

@media (max-width: 768px) {
    .footer-grid {
        /* На мобильных все в одну колонку */
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-column {
        align-items: center; /* Центрируем контент колонок */
    }
    .footer-bottom-row {
        flex-direction: column;
        gap: 2rem;
    }
}

/* Скрытие в Mini App, если нужно */
body.is-mini-app .site-footer {
    display: none;
}