/* ==========================================================================
   Страница новостей
   ========================================================================== */

.news-page {
    background: #f1f5f9;
    padding-bottom: 4rem;
}

.news-page__hero {
    background: linear-gradient(135deg, #003366 0%, #046bd2 100%);
    color: #fff;
    text-align: center;
    padding: 2.5rem 1.25rem 2rem;
}

.news-page__hero h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: #fff;
}

.news-page__hero p {
    opacity: 0.9;
    font-size: 1rem;
}

/* Фильтры-теги */
.news-filters {
    max-width: 1280px;
    margin: -1.25rem auto 0;
    padding: 0 1.25rem;
    position: relative;
    z-index: 2;
}

.news-filters__inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    background: #fff;
    padding: 0.75rem 1rem;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0, 51, 102, 0.1);
}

.news-filter-btn {
    padding: 0.5rem 1.1rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
}

.news-filter-btn:hover {
    border-color: #003366;
    color: #003366;
}

.news-filter-btn.is-active {
    background: #003366;
    border-color: #003366;
    color: #fff;
}

/* Основная сетка: лента + сайдбар */
.news-layout {
    max-width: 1280px;
    margin: 2rem auto 0;
    padding: 0 1.25rem;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 1.75rem;
    align-items: start;
}

.news-main {
    min-width: 0;
}

/* Главная новость — баннер 2/3 визуально на всю колонку */
.news-featured {
    display: block;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(0, 51, 102, 0.1);
    margin-bottom: 1.75rem;
    color: inherit;
    transition: transform 0.3s, box-shadow 0.3s;
}

.news-featured:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(0, 51, 102, 0.15);
}

.news-featured__image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #e2e8f0;
    min-height: 220px;
    max-height: 520px;
}

.news-featured__image img {
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: contain;
    object-position: center;
    transition: opacity 0.3s ease;
}

.news-featured:hover .news-featured__image img {
    opacity: 0.95;
}

.news-featured__body {
    padding: 1.35rem 1.5rem 1.5rem;
}

.news-featured__badge {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #dbeafe;
    color: #1d4ed8;
    border-radius: 6px;
    margin-bottom: 0.65rem;
}

.news-featured__title {
    font-size: clamp(1.25rem, 2.5vw, 1.65rem);
    font-weight: 700;
    color: #003366;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.news-featured__meta {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 0.75rem;
}

.news-featured__excerpt {
    color: #475569;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    mask-image: linear-gradient(180deg, #000 70%, transparent);
    -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent);
}

/* Сетка карточек */
.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.news-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 51, 102, 0.08);
    color: inherit;
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
}

.news-card.is-hidden,
.news-featured.is-hidden {
    display: none;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(0, 51, 102, 0.14);
}

.news-card__image {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #e2e8f0;
    min-height: 180px;
    max-height: 300px;
}

.news-card__image img {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    object-position: center;
    transition: opacity 0.3s ease;
}

.news-card:hover .news-card__image img {
    opacity: 0.95;
}

.news-card__body {
    padding: 1.1rem 1.2rem 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.news-card__badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #046bd2;
    margin-bottom: 0.4rem;
}

.news-card__badge--match { color: #b45309; }
.news-card__badge--announce { color: #7c3aed; }
.news-card__badge--club { color: #0369a1; }

.news-card__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.35;
    margin-bottom: 0.35rem;
}

.news-card__date {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 0.6rem;
}

.news-card__excerpt {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.5;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.85rem;
    padding: 0.45rem 0.9rem;
    border: 1px solid #003366;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #003366;
    width: fit-content;
    transition: background 0.2s, color 0.2s;
}

.news-card:hover .news-card__cta,
.news-featured:hover .news-featured__cta {
    background: #003366;
    color: #fff;
}

.news-featured__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    border: 1px solid #003366;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #003366;
    transition: background 0.2s, color 0.2s;
}

/* Сайдбар */
.news-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: sticky;
    top: 1rem;
}

.news-widget {
    background: #fff;
    border-radius: 14px;
    padding: 1.25rem;
    box-shadow: 0 4px 16px rgba(0, 51, 102, 0.08);
}

.news-widget__title {
    font-size: 1rem;
    font-weight: 700;
    color: #003366;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.news-widget__game {
    text-align: center;
}

.news-widget__game-date {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.news-widget__game-teams {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.95rem;
    line-height: 1.4;
}

.news-widget__game-tournament {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 0.35rem;
}

.news-widget__link {
    display: block;
    margin-top: 0.75rem;
    text-align: center;
    font-size: 0.85rem;
    color: #046bd2;
    font-weight: 500;
}

.news-widget__result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.85rem;
}

.news-widget__result:last-child {
    border-bottom: none;
}

.news-widget__result-score {
    font-weight: 700;
    color: #003366;
}

.news-standings-note {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.news-standings-btn {
    display: block;
    text-align: center;
    padding: 0.6rem 1rem;
    background: #003366;
    color: #fff !important;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
}

.news-standings-btn:hover {
    background: #004488;
}

.news-empty {
    text-align: center;
    padding: 3rem;
    color: #64748b;
    background: #fff;
    border-radius: 14px;
}

.news-empty--filter {
    grid-column: 1 / -1;
    display: none;
}

.news-empty--filter.is-visible {
    display: block;
}

/* Детальная страница */
.news-detail-page {
    background: #f1f5f9;
    padding-bottom: 4rem;
}

.news-detail-hero {
    background: linear-gradient(135deg, #003366 0%, #046bd2 100%);
    padding: 2rem 1.25rem;
    color: #fff;
}

.news-detail-hero__inner {
    max-width: 800px;
    margin: 0 auto;
}

.news-detail-back {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    display: inline-block;
    margin-bottom: 1rem;
}

.news-detail-back:hover {
    color: #ffd700;
}

.news-detail-hero h1 {
    font-size: clamp(1.4rem, 3vw, 2rem);
    color: #fff;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.news-detail-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
}

.news-detail-hero__badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.news-detail-body-wrap {
    max-width: 800px;
    margin: -1.5rem auto 0;
    padding: 0 1.25rem;
    position: relative;
    z-index: 2;
}

.news-detail-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 12px 40px rgba(0, 51, 102, 0.1);
}

.news-detail-cover {
    margin: -1.75rem -1.75rem 1.5rem;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
}

.news-detail-cover img {
    width: 100%;
    height: auto;
    max-height: min(720px, 85vh);
    object-fit: contain;
    object-position: center;
    display: block;
}

.news-detail-content {
    color: #334155;
    line-height: 1.75;
    font-size: 1.05rem;
}

.news-detail-content p {
    margin-bottom: 1rem;
}

.news-detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.25rem 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.news-detail-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 51, 102, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 24px rgba(0, 51, 102, 0.2);
}

.news-detail-content th,
.news-detail-content td {
    padding: 0.75rem 1rem;
    text-align: center;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.news-detail-content th {
    background: rgba(0, 0, 0, 0.2);
    font-weight: 600;
}

.news-detail-content tr:last-child td {
    border-bottom: none;
}

@media (max-width: 1024px) {
    .news-layout {
        grid-template-columns: 1fr;
    }

    .news-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }
}

@media (max-width: 640px) {
    .news-grid {
        grid-template-columns: 1fr;
    }

    .news-featured__image {
        min-height: 180px;
        max-height: 360px;
    }

    .news-featured__image img {
        max-height: 360px;
    }
}
