/**
 * Общие стили страниц-обзоров разделов (карточки подпунктов).
 *
 * Используют: app/views/sections/overview.php, app/views/judging/index.php,
 * app/views/references/index.php. Раньше этот блок был скопирован в judging-index.css
 * и ref-index.css — единый источник теперь здесь (backlog #36: перенос стилей из представлений),
 * файлы-копии удалены 11.10.2026 (backlog #62).
 */

.section-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.section-page__header {
    margin-bottom: 32px;
}

.section-page__header h1 {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 500;
    color: var(--md-on-surface);
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-page__header h1 i {
    font-size: 32px;
    color: var(--md-link);
}

.section-page__header p {
    margin: 0;
    font-size: 15px;
    color: var(--md-text-secondary);
    line-height: 1.5;
}

.section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Заголовок группы справочников (реестр в БД, group_name) */
.section-group__title {
    margin: 32px 0 16px 0;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--md-text-secondary);
}

.section-group__title:first-of-type {
    margin-top: 0;
}

.section-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    background: var(--md-surface);
    border: 1px solid var(--md-surface-variant);
    border-radius: 16px;
    text-decoration: none;
    color: var(--md-on-surface);
    transition: all 0.25s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.section-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--md-primary);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.section-card:hover {
    border-color: var(--md-link);
    box-shadow: 0 4px 20px rgba(98, 0, 238, 0.12);
    transform: translateY(-2px);
}

.section-card:hover::before {
    opacity: 1;
}

.section-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: rgba(98, 0, 238, 0.08);
    border-radius: 14px;
    margin-bottom: 16px;
    flex-shrink: 0;
    transition: background 0.25s ease;
}

.section-card:hover .section-card__icon {
    background: rgba(98, 0, 238, 0.15);
}

.section-card__icon i {
    font-size: 28px;
    color: var(--md-link);
}

.section-card__title {
    font-size: 16px;
    font-weight: 600;
    color: var(--md-on-surface);
    margin-bottom: 6px;
}

.section-card__desc {
    font-size: 13px;
    color: var(--md-text-secondary);
    line-height: 1.5;
    margin: 0;
}

.section-card__arrow {
    position: absolute;
    top: 20px;
    right: 20px;
    color: var(--md-text-disabled);
    transition:
        color 0.25s ease,
        transform 0.25s ease;
}

/* Бейджи-счётчики в плитке (публичные страницы соревнований): статус, число участников и т.п. */
.section-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

/* Плитка-заглушка (раздел ещё не реализован): без hover-эффекта и с приглушённым текстом. */
.section-card--muted {
    cursor: default;
    opacity: 0.72;
}

.section-card--muted:hover {
    border-color: var(--md-surface-variant);
    box-shadow: none;
    transform: none;
}

.section-card--muted:hover::before {
    opacity: 0;
}

.section-card--muted:hover .section-card__icon {
    background: rgba(98, 0, 238, 0.08);
}

.section-card--muted:hover .section-card__arrow {
    color: var(--md-text-disabled);
    transform: none;
}

.section-card:hover .section-card__arrow {
    color: var(--md-link);
    transform: translateX(4px);
}

@media (max-width: 768px) {
    .section-page {
        padding: 12px;
    }

    .section-page__header h1 {
        font-size: 22px;
    }

    .section-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .section-card {
        padding: 18px;
    }
}
