/* ═══════════════════════════════════════════════════════════════════
   Zula Спорт — светлый редизайн страницы «Новости»
   Дизайн-система hightech.plus

   Подключается ТОЛЬКО на /news.html (см. /opt/site_news.py).
   Остальные страницы сайта продолжают использовать тёмный style.css.
   Все правила скоупаются на body.news-page.
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Токены темы (перебивают тёмные :root из style.css) ─────────── */
body.news-page {
    --bg-body: #e4e4e7;
    --bg-card: #ffffff;
    --bg-card-hover: #ffffff;
    --bg-elevated: #ffffff;
    --border-subtle: #d9d9de;
    --border-card: #ffffff;
    --text-primary: #000000;
    --text-secondary: #666666;
    --text-muted: #666666;
    --text-heading: #000000;
    --accent: #ff644b;
    --accent-10: rgba(255, 100, 75, 0.10);
    --accent-20: rgba(255, 100, 75, 0.20);
    --accent-30: rgba(255, 100, 75, 0.30);
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #e4e4e7;
    color: #000000;
}

html { background: #e4e4e7; }

/* ─── Контейнер (шаг сетки 15px) ─────────────────────────────────── */
.news-page .container { max-width: 1440px; padding: 30px 30px 45px; }

/* ─── Шапка ──────────────────────────────────────────────────────── */
.news-page .header {
    padding: 30px 0 15px; margin-bottom: 30px;
    border-bottom: 1px solid var(--border-subtle);
}
.news-page .header h1 { color: #ff644b; font-family: var(--font-heading); }
.news-page .header h1 span { color: #000000; font-weight: 400; }
.news-page .header .update { color: #666666; }

/* ─── Навигация ──────────────────────────────────────────────────── */
.news-page .nav { gap: 30px; padding: 15px 0; background: #e4e4e7; }
.news-page .nav a { color: #666666; }
.news-page .nav a:hover,
.news-page .nav a.active { color: #ff644b; border-color: #ff644b; }

/* ─── Заголовок секции ───────────────────────────────────────────── */
.news-page .section-title {
    font-family: var(--font-heading);
    font-size: 20px; font-weight: 700; color: #000000;
    margin: 0 0 30px; padding-bottom: 15px;
    border-bottom: 1px solid var(--border-subtle);
    letter-spacing: -0.2px;
}

/* ─── Сетка карточек: 2 колонки (десктоп) ────────────────────────── */
.news-page .news-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: start;
}

.news-page .news-main {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
    align-items: stretch;
}

.news-page .news-side {
    display: flex;
    flex-direction: column;
}
.news-page .news-side-item {
    padding: 15px 0;
    border-top: 1px solid #e0e0e4;
    cursor: pointer;
}
.news-page .news-side-item:first-child { border-top: none; padding-top: 0; }
.news-page .news-side-item .news-meta {
    display: flex; align-items: center; flex-wrap: wrap;
    gap: 8px; margin-bottom: 8px;
}
.news-page .news-side-item .news-title {
    font-size: 16px; font-weight: 600; line-height: 1.35;
    color: #000; margin-bottom: 6px; transition: color 0.2s ease;
}
.news-page .news-side-item:hover .news-title { color: #ff644b; }
.news-page .news-side-item .news-desc {
    font-size: 14px; color: #666;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-page .news-flag {
    display: inline-block;
    background: #ff644b; color: #ffffff;
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.5px;
    line-height: 1.2; padding: 3px 8px; border-radius: 3px;
    vertical-align: middle;
}
.news-page .news-img .news-flag {
    position: absolute; top: 15px; left: 15px; z-index: 2;
}

/* ─── Карточка ───────────────────────────────────────────────────── */
.news-page .news-card {
    display: flex;
    flex-direction: column;
    margin: 0;
    background: #ffffff;
    border: none;
    border-radius: 50px;
    overflow: hidden;
    transition: transform 0.2s ease, background 0.2s ease;
    animation: cardIn 0.35s ease-out both;
}
.news-page .news-card:hover {
    background: #ffffff;
    border-color: transparent;
    transform: translateY(-3px);
}
.news-page .news-card:hover .news-title { color: #ff644b; }

/* Вертикальная раскладка: картинка сверху, текст под ней */
.news-page .news-row {
    display: flex; flex-direction: column;
    gap: 0; padding: 0;
    flex: 1;
}

/* Слот картинки 16:9 (только новости с картинкой) */
.news-page .news-img {
    position: relative;
    width: 100%; height: auto;
    aspect-ratio: 16 / 9;
    flex-shrink: 0;
    border-radius: 50px 50px 0 0;
    overflow: hidden;
    background: #e4e4e7;
}
.news-page .news-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Заглушка: нет картинки ИЛИ битая картинка (onerror → .img-error) */
.news-page .news-body { flex: 1; min-width: 0; padding: 30px; }

/* Метаданные: бейдж источника + время */
.news-page .news-meta {
    display: flex; flex-direction: row; align-items: center;
    justify-content: flex-start; gap: 15px;
    margin-bottom: 15px; font-size: 13px;
}
.news-page .news-source {
    display: inline-block;
    background: #ff644b; color: #ffffff;
    font-size: 13px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.5px;
    line-height: 1.2;
    padding: 4px 10px;
    border-radius: 3px;
}
.news-page .news-time { color: #666666; font-size: 13px; }

/* Заголовок и описание */
.news-page .news-title {
    font-family: var(--font-heading);
    font-size: 16px; font-weight: 600; line-height: 1.35;
    color: #000000;
    margin-bottom: 15px;
    transition: color 0.2s ease;
}
.news-page .news-desc {
    font-size: 14px; line-height: 1.6; color: #666666;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ─── Кнопка «Показать ещё» (пилл) ───────────────────────────────── */
.news-page .more-btn {
    display: block; width: 100%;
    margin: 45px 0 30px; padding: 15px 30px;
    background: #ff644b; border: none; border-radius: 50px;
    color: #ffffff; font-family: var(--font-heading);
    font-size: 16px; font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}
.news-page .more-btn:hover { background: #e5553d; transform: translateY(-1px); }
.news-page .more-btn:active { transform: translateY(0); }

/* ─── Футер ──────────────────────────────────────────────────────── */
.news-page .footer {
    margin-top: 30px; padding: 30px 0 15px;
    border-top: 1px solid var(--border-subtle);
    color: #666666;
}
.news-page .footer a { color: #ff644b; }
.news-page .footer .bot-link {
    background: #ff644b; color: #ffffff;
    border-radius: 50px;
}
.news-page .footer .bot-link:hover { background: #e5553d; }

/* ─── Модалка статьи (светлая) ───────────────────────────────────── */
.news-page .modal-overlay { background: rgba(0, 0, 0, 0.40); }
.news-page .modal-card {
    background: #ffffff; border: none;
    border-radius: 30px;
}
.news-page .modal-header {
    background: #ffffff;
    border-bottom: 1px solid #e4e4e7;
}
.news-page .modal-close { background: #f1f1f3; color: #000000; }
.news-page .modal-close:hover { background: #e4e4e7; color: #000000; }

.news-page .modal-body { color: #000000; }
.news-page .modal-body p { color: #000000; }
.news-page .modal-body h2,
.news-page .modal-body h3,
.news-page .modal-body h4 { color: #000000; }
.news-page .modal-body a { color: #ff644b; }
.news-page .modal-body img { border-radius: 15px; }
.news-page .modal-body blockquote {
    border-left: 3px solid #ff644b;
    background: rgba(255, 100, 75, 0.06);
    color: #333333;
}
.news-page .modal-body .news-desc {
    color: #666666;
    display: block;
    -webkit-line-clamp: unset;
    border-bottom: 1px solid #e4e4e7;
}

.news-page .modal-footer { border-top: 1px solid #e4e4e7; }
.news-page .modal-footer a { color: #ff644b; }
.news-page .modal-footer a:hover { background: rgba(255, 100, 75, 0.10); }

/* Prediction / Stats модалки (в DOM, но на news не открываются) */
.news-page .stats-header { border-bottom-color: #e4e4e7; }
.news-page .stats-team,
.news-page .stats-score { color: #000000; }
.news-page .stats-table td { color: #333333; }
.news-page .stats-table .stat-name { color: #666666; }
.news-page .stats-table tr:nth-child(even) { background: rgba(0, 0, 0, 0.03); }
.news-page .percent-track { background: #e4e4e7; }
.news-page .percent-label { color: #666666; }
.news-page .stats-live { color: #ff644b; }

.news-page .p-txt {
    background: #ffffff; border: 1px solid #e4e4e7; color: #666666;
}

/* ─── Скроллбар (светлый) ────────────────────────────────────────── */
.news-page ::-webkit-scrollbar-track { background: #e4e4e7; }
.news-page ::-webkit-scrollbar-thumb { background: #c4c4c8; }

/* ─── Схлопывание зон в одну колонку (текстовая лента — под гридом) ────────── */
@media (max-width: 900px) {
    .news-page .news-layout { grid-template-columns: 1fr; }
}

/* ─── Мобильная версия: 1 колонка ────────────────────────────────── */
@media (max-width: 640px) {
    .news-page .container { padding: 15px; }

    .news-page .header { margin-bottom: 15px; padding: 15px 0; }
    .news-page .nav { gap: 15px; padding: 15px 0; }

    .news-page .section-title { font-size: 18px; margin-bottom: 15px; padding-bottom: 15px; }

    .news-page .news-layout { grid-template-columns: 1fr; gap: 30px; }
    .news-page .news-main { grid-template-columns: 1fr; gap: 15px; }
    .news-page .news-side-item { padding: 15px 0; }

    .news-page .news-body { padding: 15px; }
    .news-page .news-meta { margin-bottom: 15px; }
    .news-page .news-title { font-size: 16px; margin-bottom: 15px; }
    .news-page .news-desc { font-size: 14px; }

    .news-page .more-btn { margin: 15px 0; }

    .news-page .modal-overlay { padding: 15px; align-items: flex-end; }
    .news-page .modal-card { border-radius: 30px 30px 0 0; }
}
