/* --- БАЗОВЫЕ НАСТРОЙКИ --- */
:root {
    --primary-color: #1a1a1a;
    --accent-color: #e63946;
    --text-color: #333;
    --light-bg: #f4f4f9;
    --white: #ffffff;
    --gray: #666;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
    padding-bottom: 50px;
}

.container {
    max-width: 1200px; /* Сделали пошире для красивой сетки */
    margin: 0 auto;
    padding: 0 20px;
}

/* --- ШАПКА --- */
header {
    background: var(--primary-color);
    color: var(--white);
    padding: 20px 0;
    margin-bottom: 40px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    text-transform: uppercase;
    letter-spacing: 2px;
}

header nav a {
    color: var(--white);
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9em;
}

/* --- ГЛАВНАЯ СТРАНИЦА: СЕТКА MASONRY --- */
.masonry-container {
    column-count: 3; /* 3 колонки на компьютере */
    column-gap: 20px;
    width: 100%;
    margin: 0 auto;
}

.masonry-item {
    display: inline-block; /* Важно для Masonry */
    width: 100%;
    margin-bottom: 20px;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.masonry-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.masonry-img {
    width: 100%;
    height: auto;
    display: block;
    border-bottom: 1px solid #eee;
}

.card-content {
    padding: 20px;
}

.category {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--accent-color);
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 8px;
    display: block;
}

.card-content h3 {
    font-size: 1.3em;
    line-height: 1.3;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.card-content p {
    font-size: 0.95em;
    color: var(--gray);
    margin-bottom: 15px;
}

.card-footer {
    border-top: 1px solid #f0f0f0;
    padding-top: 10px;
    font-size: 0.85em;
    color: #999;
}

/* --- СТРАНИЦА СТАТЬИ --- */
.post {
    max-width: 900px;
    margin: 0 auto;
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.article-title {
    font-size: 2.2em;
    line-height: 1.2;
    margin-bottom: 20px;
}

.meta {
    color: var(--gray);
    font-size: 0.9em;
    margin-bottom: 20px;
}

/* Умные картинки внутри статьи */
img, .main-article-img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 10px;
}

.article-content p {
    margin-bottom: 20px;
    font-size: 1.1em;
}

.article-content h3 {
    margin: 30px 0 15px;
    color: var(--primary-color);
}

.source-link a {
    color: var(--accent-color);
    font-weight: bold;
    text-decoration: none;
}

/* --- АДАПТИВНОСТЬ (ДЛЯ МОБИЛОК) --- */
@media (max-width: 1024px) {
    .masonry-container {
        column-count: 2; /* На планшете 2 колонки */
    }
}

@media (max-width: 600px) {
    .masonry-container {
        column-count: 1; /* На телефоне 1 колонка */
    }
    .post {
        padding: 20px;
    }
    .article-title {
        font-size: 1.6em;
    }
}
/* --- СТИЛИ СТРАНИЦЫ РЕЗУЛЬТАТОВ (ESPN STYLE) --- */
.espn-bg {
    background-color: #f3f4f7; /* Характерный светло-серый фон для контраста белых карточек */
}

.espn-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #111;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.espn-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.espn-score-card {
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #dedede;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    transition: box-shadow 0.2s ease;
}

.espn-score-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.espn-card-header {
    padding: 8px 16px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.75rem;
    font-weight: 600;
    color: #48494a;
    text-transform: uppercase;
}

.espn-card-body {
    padding: 12px 16px;
    flex-grow: 1;
}

.espn-team-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.espn-team-row:last-child {
    margin-bottom: 0;
}

.espn-team-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Кружок-заглушка вместо логотипа (пока мы не парсим картинки команд) */
.espn-logo-placeholder {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #1a1a1a;
    opacity: 0.1; 
}

.espn-team-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #000;
}

.espn-team-score {
    font-size: 1.25rem;
    font-weight: 700;
    color: #000;
}

.espn-card-footer {
    padding: 10px 16px;
    background: #f9f9f9;
    border-top: 1px solid #f0f0f0;
}

.espn-card-footer a {
    font-size: 0.8rem;
    font-weight: 600;
    color: #06c;
    text-decoration: none;
}

.espn-card-footer a:hover {
    text-decoration: underline;
}
