/* ==========================================================================
   ВЕСТНИК ЕВРАЗИИ - СОВРЕМЕННЫЙ ДИЗАЙН НОВОСТНОГО ПОРТАЛА
   ========================================================================== */

:root {
    --primary: #1e3a8a;
    --primary-dark: #0f172a;
    --primary-light: #3b82f6;
    --accent: #dc2626;
    --accent-hover: #b91c1c;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-serif: "Georgia", Cambria, "Times New Roman", Times, serif;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
    color: var(--primary-light);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   ТОПБАР (КУРСЫ ВАЛЮТ, ДАТА, ПОГОДА)
   ========================================================================== */
.topbar {
    background: #090d16;
    color: #94a3b8;
    font-size: 0.8125rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    flex-wrap: wrap;
    gap: 12px;
}

.topbar-left, .topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.market-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.market-rate {
    color: #f8fafc;
    font-weight: 600;
}

.market-change.up {
    color: #22c55e;
}

.market-change.down {
    color: #ef4444;
}

.topbar-date {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ==========================================================================
   ШАПКА (HEADER)
   ========================================================================== */
.site-header {
    background: #0f172a;
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
}

.logo-block {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-emblem {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.4);
}

.logo-text h1 {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.1;
    color: #ffffff;
}

.logo-text p {
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 2px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-form {
    position: relative;
    display: flex;
    align-items: center;
}

.search-form input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 8px 36px 8px 14px;
    border-radius: 20px;
    color: #fff;
    font-size: 0.875rem;
    width: 220px;
    transition: all 0.3s ease;
}

.search-form input:focus {
    width: 280px;
    outline: none;
    background: rgba(255, 255, 255, 0.18);
    border-color: #38bdf8;
}

.search-form input::placeholder {
    color: #94a3b8;
}

.search-form button {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1rem;
}

/* ==========================================================================
   НАВИГАЦИОННАЯ ПАНЕЛЬ
   ========================================================================== */
.main-nav {
    background: #1e293b;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-list {
    display: flex;
    list-style: none;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
}

.nav-list::-webkit-scrollbar {
    display: none;
}

.nav-item a {
    display: block;
    padding: 12px 18px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #cbd5e1;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
}

.nav-item a:hover, .nav-item.active a {
    color: #ffffff;
    border-bottom-color: var(--accent);
    background: rgba(255, 255, 255, 0.04);
}

/* ==========================================================================
   БЕГУЩАЯ СТРОКА (BREAKING NEWS / TICKER)
   ========================================================================== */
.ticker-bar {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
}

.ticker-label {
    background: var(--accent);
    color: #ffffff;
    padding: 8px 16px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.ticker-content {
    overflow: hidden;
    white-space: nowrap;
    padding: 8px 0;
    position: relative;
    width: 100%;
}

.ticker-track {
    display: inline-block;
    animation: marquee 40s linear infinite;
}

.ticker-track:hover {
    animation-play-state: paused;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    margin-right: 32px;
    font-size: 0.875rem;
    color: var(--text-main);
}

.ticker-item:hover {
    color: var(--accent);
}

.ticker-item .ticker-dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    margin-right: 8px;
    display: inline-block;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ==========================================================================
   СЕТКА ГЛАВНОЙ СТРАНИЦЫ
   ========================================================================== */
.main-content {
    padding: 28px 0 60px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 24px;
    margin-bottom: 36px;
}

.hero-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.hero-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.hero-media {
    position: relative;
    height: 420px;
    overflow: hidden;
    background: #1e293b;
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-card:hover .hero-media img {
    transform: scale(1.03);
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 24px 20px;
    background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.95) 100%);
    color: #ffffff;
}

.hero-title {
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.25;
    margin: 10px 0;
    color: #ffffff;
}

.hero-summary {
    font-size: 0.95rem;
    color: #cbd5e1;
    line-height: 1.5;
    margin-bottom: 12px;
}

/* ==========================================================================
   САЙДБАР: ГЛАВНЫЕ ТЕМЫ ЧАСА
   ========================================================================== */
.sidebar-panel {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.panel-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--accent);
}

.top-news-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.top-news-item {
    display: flex;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-light);
}

.top-news-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.top-news-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    min-width: 24px;
}

.top-news-info h4 {
    font-size: 0.925rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-main);
    margin-bottom: 6px;
}

.top-news-info h4:hover {
    color: var(--primary-light);
}

/* ==========================================================================
   ФИЛЬТРЫ ИСТОЧНИКОВ
   ========================================================================== */
.sources-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    background: var(--bg-card);
    padding: 12px 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.sources-bar-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 6px;
}

.source-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 600;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    transition: all 0.2s ease;
}

.source-pill:hover, .source-pill.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.source-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

/* ==========================================================================
   СЕТКА КАРТОЧЕК НОВОСТЕЙ
   ========================================================================== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--accent);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 24px;
    margin-bottom: 36px;
}

.news-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.news-card-media {
    position: relative;
    height: 200px;
    background: #e2e8f0;
    overflow: hidden;
}

.news-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.news-card:hover .news-card-media img {
    transform: scale(1.05);
}

.news-card-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.775rem;
}

.badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.725rem;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.source-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.725rem;
    color: #ffffff;
}

.news-card-time {
    color: var(--text-muted);
}

.news-card-title {
    font-size: 1.075rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 8px;
    color: var(--text-main);
}

.news-card-title:hover {
    color: var(--primary-light);
}

.news-card-summary {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 16px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
    font-size: 0.775rem;
    color: var(--text-light);
}

.source-link-out {
    color: var(--primary-light);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.source-link-out:hover {
    text-decoration: underline;
}

/* ==========================================================================
   ПАГИНАЦИЯ
   ========================================================================= */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 36px;
}

.page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.page-btn:hover, .page-btn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* ==========================================================================
   СТРАНИЦА СТАТЬИ (ARTICLE)
   ========================================================================== */
.article-container {
    max-width: 860px;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    padding: 36px;
}

.article-header {
    margin-bottom: 24px;
}

.article-meta-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.article-headline {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.25;
    color: var(--text-main);
    margin-bottom: 18px;
    font-family: var(--font-sans);
}

.article-lead {
    font-size: 1.15rem;
    font-weight: 500;
    line-height: 1.6;
    color: var(--text-muted);
    border-left: 4px solid var(--accent);
    padding-left: 16px;
    margin-bottom: 24px;
    background: #f8fafc;
    padding: 14px 18px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.article-meta-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 28px;
}

.article-media {
    margin-bottom: 30px;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.article-media img {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
}

.article-body {
    font-size: 1.075rem;
    line-height: 1.8;
    color: #27272a;
    font-family: var(--font-serif);
    margin-bottom: 36px;
}

.article-body p {
    margin-bottom: 20px;
}

.article-body blockquote {
    border-left: 4px solid var(--primary-light);
    padding: 14px 20px;
    margin: 24px 0;
    background: #f1f5f9;
    font-style: italic;
    color: #334155;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Блок официального источника */
.source-attribution-card {
    background: #f1f5f9;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-sm);
    padding: 18px 22px;
    margin: 32px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
}

.source-attribution-info h5 {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.source-attribution-info p {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}

.source-btn-out {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--primary);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
    transition: background 0.2s ease;
}

.source-btn-out:hover {
    background: var(--primary-light);
    color: #ffffff;
}

/* Шеринг */
.share-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin: 30px 0;
}

.share-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.825rem;
    font-weight: 600;
    color: #ffffff;
}

.share-tg { background: #229ed9; }
.share-vk { background: #0077ff; }
.share-wa { background: #25d366; }

/* ==========================================================================
   ПОДВАЛ (FOOTER)
   ========================================================================== */
.site-footer {
    background: #090d16;
    color: #94a3b8;
    padding: 48px 0 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 36px;
    margin-bottom: 36px;
}

.footer-col h4 {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    position: relative;
    padding-bottom: 8px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--accent);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 0.875rem;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    flex-wrap: wrap;
    gap: 12px;
}

/* ==========================================================================
   АДАПТИВНОСТЬ
   ========================================================================== */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .topbar {
        display: none;
    }
    .header-main {
        flex-direction: column;
        gap: 14px;
        align-items: stretch;
    }
    .search-form input {
        width: 100%;
    }
    .news-grid {
        grid-template-columns: 1fr;
    }
    .article-headline {
        font-size: 1.6rem;
    }
    .article-container {
        padding: 20px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
}
