
/* Основные стили страницы новостей */
:root {
    --primary-color: #1a365d;
    --secondary-color: #2d3748;
    --accent-color: #3182ce;
    --accent-hover: #2c5282;
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --bg-tertiary: #edf2f7;
    --border-color: #e2e8f0;
    --success-color: #38a169;
    --danger-color: #e53e3e;
    --warning-color: #d69e2e;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --transition: all 0.2s ease-in-out;
    --anim-speed-fast: 0.55s;
    --anim-speed-base: 0.7s;

    /* фирменная кривая — быстрая, но плавная */
    --anim-ease-smooth: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.blok-1 {
    height: 90px;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== ХЛЕБНЫЕ КРОШКИ ===== */
.breadcrumbs {
    padding: 16px 0;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumbs-list {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 8px;
    font-size: 14px;
}

.breadcrumbs-item {
    display: flex;
    align-items: center;
}

.breadcrumbs-item:not(:last-child)::after {
    content: '›';
    margin-left: 8px;
    color: var(--text-muted);
}

.breadcrumbs-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumbs-link:hover {
    color: var(--accent-color);
}

.breadcrumbs-current {
    color: var(--text-primary);
    font-weight: 500;
}

/* ===== ОСНОВНОЙ КОНТЕНТ ===== */
.main-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    margin-bottom: 48px;
}


.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    margin-bottom: 20px;
    padding-bottom: 12px;

    border-bottom: 1px solid var(--border-color);
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);

    margin: 0;
}

.news-sort {
    display: inline-flex;
    gap: 4px;

    padding: 4px;
    background: var(--bg-secondary);
    border-radius: 999px;
}

.sort-btn {
    border: none;
    background: transparent;

    padding: 8px 16px;
    border-radius: 999px;

    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);

    cursor: pointer;
    transition: 
        background 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease;
}

.sort-btn:hover {
    color: var(--accent-color);
}

.sort-btn.active {
    background: var(--accent-color);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

/* ===== УЛУЧШЕННАЯ БОКОВАЯ ПАНЕЛЬ С КАТЕГОРИЯМИ ===== */
.sidebar {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 20px;
    height: calc(100vh - 40px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.sidebar-sticky {
    padding: 10px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Заголовок и поиск */
.categories-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0; /* Для правильной работы overflow */
}

.categories-header {
    padding: 20px 20px 15px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-primary);
    z-index: 2;
    position: relative;
}

.categories-search {
    position: relative;
    margin-top: 12px;
}

.search-input {
    width: 100%;
    padding: 10px 40px 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    background: var(--bg-secondary);
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
}

.search-clear:hover {
    opacity: 1;
    color: var(--danger-color);
}

/* Контейнер для списка категорий с прокруткой */
.categories-wrapper {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px 20px;
    scroll-behavior: smooth;
}

/* Стили для алфавитной группировки */
.category-group {
    margin-bottom: 15px;
}

.category-letter {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    position: sticky;
    top: 0;
    z-index: 1;
}

.category-sublist {
    list-style: none;
    margin-left: 5px;
}

.category-item {
    margin-bottom: 6px;
}

.category-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    text-decoration: none;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border-left: 3px solid transparent;
    transition: var(--transition);
    font-weight: 500;
    font-size: 14px;
}

.category-link:hover {
    background: var(--bg-tertiary);
    color: var(--accent-color);
    border-left-color: var(--accent-color);
    transform: translateX(4px);
}

.category-link.active {
    background: var(--accent-color);
    color: white;
    border-left-color: var(--accent-hover);
}

.category-count {
    font-size: 12px;
    background: rgba(255, 255, 255, 0.2);
    color: inherit;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
    font-weight: 500;
}

.category-link.active .category-count {
    background: rgba(255, 255, 255, 0.3);
}

/* Алфавитная навигация */
.alphabet-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-primary);
    justify-content: center;
}

.alphabet-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    cursor: pointer;
}

.alphabet-letter.has-categories:hover {
    background: var(--accent-color);
    color: white;
}

.alphabet-letter.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Стили для пустого состояния поиска */
.no-results {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.no-results-icon {
    font-size: 32px;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* Индикатор прокрутки */
.categories-wrapper::-webkit-scrollbar {
    width: 6px;
}

.categories-wrapper::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 3px;
}

.categories-wrapper::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.categories-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}


/* ===== КАРТОЧКА НОВОСТИ ===== */

.news-hero {
    position: relative;
    width: 100%;
    min-height: 520px;
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 48px;

    animation: heroFadeIn var(--anim-speed-base)
               var(--anim-ease-smooth) both;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.965);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* media */
.news-hero-media {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.news-hero-image,
.news-hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition:
        transform 6s var(--anim-ease-smooth),
        filter 0.4s var(--anim-ease-smooth);
}

.news-hero:hover .news-hero-image,
.news-hero:hover .news-hero-video {
    transform: scale(1.06);
}

.news-hero-video {
    filter: brightness(0.9) saturate(1.05);
}

/* fallback */
.news-hero-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1f1f1f, #2b2b2b);
}

/* overlay */
.news-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
        linear-gradient(
            180deg,
            rgba(0,0,0,0.15) 0%,
            rgba(0,0,0,0.55) 60%,
            rgba(0,0,0,0.85) 100%
        );
}

/* content */
.news-hero-content {
    min-height: 520px;
    position: relative;
    z-index: 3;
    height: 100%;
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 20px;
    color: #fff;
    animation: heroContentUp 0.8s ease-out 0.2s both;
}

@keyframes heroContentUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.news-hero-top {
    display: flex;
    gap: 12px;
    align-items: center;
}

.news-hero-badge {
    background: linear-gradient(135deg, #ff4d4d, #ff7a18);
    color: #fff;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 999px;
    letter-spacing: 0.3px;
}

.news-hero-category {
    font-size: 14px;
    opacity: 0.85;
}

/* title */
.news-hero-title {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    line-height: 1.15;
    max-width: 900px;
}

.news-hero-title a {
    color: #fff;
    text-decoration: none;
}

/* excerpt */
.news-hero-excerpt {
    max-width: 720px;
    font-size: 16px;
    line-height: 1.6;
    opacity: 0.9;
}

/* actions */
.news-hero-actions {
    display: flex;
    align-items: center;
    margin-top: 8px;
    justify-content: space-between;
}

.news-hero-read {
    background: #fff;
    color: #000;
    padding: 12px 22px;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    transition: transform .25s ease, box-shadow .25s ease;
}

.news-hero-read:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.news-hero-date {
    font-size: 14px;
    opacity: 0.75;
}


/* ==============================
   NEWS CARDS (Обычные новости)
================================ */

.news-card {
    z-index: 1;
    position: relative;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    background: var(--bg-primary, #fff);
    border-radius: 18px;
    overflow: hidden;
    margin-bottom: 28px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
    transition: transform .25s ease, box-shadow .25s ease;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 55px rgba(0,0,0,0.12);
}

/* cover */
.news-cover {
    position: relative;
    overflow: hidden;
}

.news-image,
.news-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-height: 300px;
}

.news-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e5e5e5, #f2f2f2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #777;
    font-size: 14px;
}

/* content */
.news-content {
    padding: 22px 22px 22px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.news-meta {
    font-size: 13px;
    color: #888;
    display: flex;
    gap: 12px;
}

.news-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}

.news-title a {
    color: #111;
    text-decoration: none;
}


.news-excerpt {
    font-size: 15px;
    color: #444;
    line-height: 1.55;
}

.read-more-btn {
    margin-top: auto;
    align-self: flex-start;
    font-size: 14px;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
}

.read-more-btn:hover {
    text-decoration: underline;
}


/* ===== РЕАКЦИИ ===== */
.news-reactions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.reaction-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    color: var(--text-secondary);
    border: none;
    font-family: inherit;
}

.reaction-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.reaction-count {
    font-weight: 600;
}

.no-reactions {
    color: var(--text-muted);
    font-size: 14px;
}

.read-more-btn {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border: 1px solid var(--accent-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.read-more-btn:hover {
    background: var(--accent-color);
    color: white;
}

/* ===== ВАЛЮТЫ ===== */
.currency-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.currency-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.currency-rates {
    list-style: none;
}

.currency-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}

.currency-value {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

/* стрелка */
.currency-arrow {
    font-size: 12px;
    line-height: 1;
    transition: transform 0.2s ease;
}

/* рост */
.currency-item.positive .currency-arrow {
    color: #16a34a; /* зелёный */
}

/* падение */
.currency-item.negative .currency-arrow {
    color: #dc2626; /* красный */
}

/* можно слегка «оживить» */
.currency-item.positive .currency-arrow {
    transform: translateY(-1px);
}

.currency-item.negative .currency-arrow {
    transform: translateY(1px);
}


.currency-item:last-child {
    border-bottom: none;
}

.currency-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.currency-code {
    font-weight: bold;
}

.currency-value {
    font-weight: 600;
}



.currency-rates--all {
    max-height: 420px;
    overflow-y: auto;
    padding-right: 4px;
}

.currency-rates--all .currency-item {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px dashed rgba(255,255,255,.08);
}

.currency-rates--all .currency-code {
    min-width: 42px;
    font-weight: 700;
    opacity: .85;
}

.currency-arrow {
    margin-left: 6px;
    font-size: 11px;
}

.currency-item.positive .currency-arrow {
    color: #16a34a;
}

.currency-item.negative .currency-arrow {
    color: #dc2626;
}

.currency-item.neutral .currency-arrow {
    opacity: .4;
}

.currency-loading {
    opacity: .6;
    font-size: 13px;
}


/*МОС БИРЖА АНАЛИТИКА*/

/* market-analytics.css */
#analytics-block {
    margin-top: 48px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Заголовок */
.analytics-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eaeaea;
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.block-title {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.market-status {
    font-size: 14px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.market-status.status-open {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.market-status.status-closed {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.block-description {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

/* Сводная статистика */
.analytics-summary {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 24px;
    border: 1px solid #e9ecef;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.summary-item {
    text-align: center;
}

.summary-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.summary-value {
    font-size: 18px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.summary-value.positive {
    color: #2e7d32;
}

.summary-value.negative {
    color: #c62828;
}

/* Таблица индексов */
.indices-table-container {
    overflow-x: auto;
    margin-bottom: 20px;
}

.indices-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.indices-table thead {
    background: #f5f5f5;
    border-bottom: 2px solid #e0e0e0;
}

.indices-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.indices-table th.col-name {
    width: 25%;
}

.indices-table th.col-value {
    width: 20%;
}

.indices-table th.col-change {
    width: 15%;
}

.indices-table th.col-status {
    width: 15%;
}

.indices-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.indices-table tbody tr:hover {
    background-color: #fafafa;
}

.indices-table td {
    padding: 14px 16px;
    vertical-align: middle;
}

.index-name {
    display: flex;
    flex-direction: column;
}

.index-symbol {
    font-weight: 600;
    color: #1a1a1a;
    font-size: 15px;
    margin-bottom: 2px;
}

.index-fullname {
    font-size: 12px;
    color: #666;
}

.col-value {
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    font-size: 15px;
}

.col-change {
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.col-change.positive {
    color: #2e7d32;
}

.col-change.negative {
    color: #c62828;
}

.status-indicator {
    font-size: 12px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-indicator.positive {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-indicator.negative {
    background: #ffebee;
    color: #c62828;
}


/* ===== Строки роста / падения ===== */
.indices-table tr.row-up {
    background: linear-gradient(
        to right,
        rgba(26, 127, 55, 0.08),
        rgba(255, 255, 255, 0) 60%
    );
}

.indices-table tr.row-down {
    background: linear-gradient(
        to right,
        rgba(198, 54, 54, 0.08),
        rgba(255, 255, 255, 0) 60%
    );
}

/* ===== Значения изменения ===== */
.indices-table .value-up {
    color: #1a7f37;
    font-weight: 600;
}

.indices-table .value-down {
    color: #c63636;
    font-weight: 600;
}

/* ===== Направление ===== */
.indices-table .col-direction {
    white-space: nowrap;
    font-weight: 500;
}

.indices-table .col-direction .dir-arrow {
    font-size: 0.8em;
    margin-right: 4px;
    opacity: 0.85;
}

/* ===== Ячейки ===== */
.indices-table .col-name strong {
    font-size: 14px;
}

.indices-table .col-name small {
    color: #777;
    font-size: 12px;
}

.indices-table .col-type,
.indices-table .col-count,
.indices-table .col-concentration {
    color: #444;
}

/* ===== Hover ===== */
.indices-table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.03);
}


/* Футер */
.analytics-footer {
    padding-top: 16px;
    border-top: 1px solid #eaeaea;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.update-info {
    font-size: 13px;
    color: #666;
}

.update-label {
    color: #999;
    margin-right: 6px;
}

.update-time {
    font-weight: 500;
    color: #333;
}

.refresh-btn {
    background: #2196f3;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.refresh-btn:hover:not(:disabled) {
    background: #1976d2;
}

.refresh-btn:disabled {
    background: #bdbdbd;
    cursor: not-allowed;
}

/* Уведомления */
.update-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

.update-notification.success {
    background: #4caf50;
    color: white;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.update-notification.error {
    background: #f44336;
    color: white;
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}


/* ===== ДОПОЛНИТЕЛЬНЫЕ БЛОКИ ===== */
.additional-blocks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 5%;
    margin: 2rem 0;
}

.block-card .currency-all {
    background: #ffffff;
    padding: 15px;
    border-radius: 10px;
}

/* ===== ПОПУЛЯРНЫЕ НОВОСТИ ===== */
.popular-list {
    list-style: none;
}

.popular-item {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.popular-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.popular-link {
    text-decoration: none;
    color: var(--text-primary);
    display: block;
    transition: var(--transition);
}

.popular-link:hover {
    color: var(--accent-color);
}

.popular-title {
    font-weight: 500;
    margin-bottom: 4px;
    line-height: 1.4;
}

.popular-date {
    font-size: 12px;
    color: var(--text-muted);
}

/* ===== АНАЛИТИКА ===== */
.analytics-btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: var(--transition);
}

.analytics-btn:hover {
    background: var(--accent-hover);
}

/* ===== ПОДПИСКА ===== */
.subscribe-form {
    display: flex;
    gap: 8px;
}

.subscribe-input {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 14px;
}

.subscribe-btn {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    font-family: inherit;
    transition: var(--transition);
}

.subscribe-btn:hover {
    background: var(--secondary-color);
}

/* ===== ПАГИНАЦИЯ ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 48px 0;
}

.pagination-link,
.pagination-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.pagination-link {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.pagination-link:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.pagination-current {
    background: var(--accent-color);
    color: white;
}

.pagination-ellipsis {
    padding: 0 8px;
    color: var(--text-muted);
}

/* ===== НЕТ НОВОСТЕЙ ===== */
.no-news {
    text-align: center;
    padding: 48px;
    background: white;
    border-radius: var(--radius-lg);
}

.no-news-title {
    color: var(--text-muted);
    margin-bottom: 16px;
}

.no-news-text {
    color: var(--text-secondary);
}

/* ===== SEO ТЕКСТ ===== */
.seo-text {
    display: none;
}



/* ===== Hover контейнер ===== */
.media-hover {
    position: fixed;
    max-width: 400px;
    height: 300px;
    border-radius: 14px;
    overflow: hidden;
    z-index: 9999;
    pointer-events: none;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

/* Скрытие */
.media-hover.hidden {
    display: none;
}

/* ===== Размытый фон ===== */
.media-hover-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(18px) brightness(0.55);
    transform: scale(1.2);
}

/* ===== Сетка медиа ===== */
.media-hover-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 2px;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #0000000e;
}

/* ===== Фото и видео ===== */
.media-hover-grid img,
.media-hover-grid video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #0000000e;
}

/* ===== Первое видео — большое (Telegram-style) ===== */
.media-hover-grid video:first-child {
    grid-column: span 2;
    grid-row: span 2;
}

/* ===== Если первое — фото (нет видео) ===== */
.media-hover-grid img:first-child {
    grid-column: span 2;
    grid-row: span 2;
}

/* ===== Заглушка если медиа нет ===== */
.media-hover-empty {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.274);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* ===== Плавное появление ===== */
.media-hover {
    animation: mediaFadeIn 0.15s ease-out;
}

@keyframes mediaFadeIn {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}


/* НОВОСТИ МОС БИРЖА */

/* ====== ОБЩИЙ БЛОК ====== */
.moex-news {
    font-family: "Times New Roman", Georgia, serif;
    color: #111;
    margin: 2rem 0;
}

.moex-news-header {
    border-bottom: 2px solid #111;
    margin-bottom: 24px;
}

.moex-news-header h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
}

/* ====== ЛЕНТА ====== */
.moex-news-feed {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* ====== НОВОСТЬ ====== */
.moex-news-item {
    position: relative;
    padding: 0px 0px 8px 20px;
    border-bottom: 1px solid #e2e2e2;
}

/* ====== ПОЛОСКА ВАЖНОСТИ ====== */
.moex-news-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 20px;
    width: 3px;
    background: #ccc; /* default = low */
}

/* ====== УРОВНИ ====== */
.moex-news-item[data-importance="low"]::before {
    background: #cfcfcf;
}

.moex-news-item[data-importance="medium"]::before {
    background: #d9ad29; /* muted yellow */
}

.moex-news-item[data-importance="high"]::before {
    background: #bd1e1e; /* dark red */
}

/* ====== ДАТА ====== */
.moex-news-date {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
}

/* ====== ТЕКСТ ====== */
.moex-news-text {
    font-size: 14px;
    line-height: 1.55;
    color: #222;
    margin-bottom: 10px;
    
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;

    /* Типографика */
    hyphens: auto;
    text-align: left;
}

/* ====== ТИКЕРЫ ====== */
.moex-ticker {
    font-weight: 600;
    font-family: Arial, sans-serif;
    border-bottom: 1px dotted #999;
    cursor: help;
}

/* ====== ССЫЛКА ====== */
.moex-news-link {
    font-size: 13px;
    color: #000;
    text-decoration: none;
    border-bottom: 1px solid #aaa;
}

.moex-news-link:hover {
    border-color: #000;
}

/* ====== ЗАГРУЗКА ====== */
.moex-news-loading {
    font-size: 14px;
    color: #666;
}


/* ====== MOEX HTML ====== */

/* ====== ОСНОВНОЙ ТЕКСТ ====== */
.moex-news .moex-news-text {
    font-size: 14px;
    line-height: 1.65;
    color: #222;

    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
}

/* ====== ПАРАГРАФЫ ====== */
.moex-news .moex-news-text p {
    margin: 0 0 12px;
}

/* ====== ЖИРНЫЕ БЛОКИ / ПОДЗАГОЛОВКИ ====== */
.moex-news .moex-news-text strong {
    font-weight: 600;
}

/* ====== ССЫЛКИ ====== */
.moex-news .moex-news-text a {
    color: #000;
    text-decoration: none;
    border-bottom: 1px solid #aaa;
}

.moex-news .moex-news-text a:hover {
    border-color: #000;
}

/* ====== ТИКЕРЫ ====== */
.moex-news .moex-ticker {
    font-family: Arial, sans-serif;
    font-weight: 600;
    letter-spacing: 0.03em;
    border-bottom: 1px dotted #999;
}

/* =========================================================
   MOEX ТАБЛИЦЫ — EXCEL STYLE
   ========================================================= */


.maex-stock {
    display: flex;
    justify-content: flex-start;
    margin-top: 1rem;
    gap: 10%;
}

.moex-stock-content {
    width: 50%;
    white-space: normal;
    overflow-wrap: break-word;
    text-align: justify;
    line-height: 1.8;
    hyphens: auto;
}

.moex-stock-container {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 2rem;
}

.moex-news table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 13px;
    background: #fff;
    border: 1px solid #cfcfcf;
}

/* Ячейки */
.moex-news table td,
.moex-news table th {
    border: 1px solid #cfcfcf;
    padding: 6px 8px;
    vertical-align: top;
    line-height: 1.35;
}

/* Первая колонка — параметры */
.moex-news table td:first-child {
    width: 65%;
    background: #f7f7f7;
    color: #222;
}

/* Вторая колонка — значения */
.moex-news table td:last-child {
    width: 35%;
    font-weight: 500;
    color: #000;
    background: #fff;
}

/* ПУСТЫЕ ЗНАЧЕНИЯ */
.moex-news table td:empty::before {
    content: "—";
    color: #999;
}

/* Заголовки секций */
.moex-news table th[colspan] {
    background: #e9ecef;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.04em;
    color: #333;
}

/* Зебра как в Excel */
.moex-news table tr:nth-child(even) td {
    background: #fcfcfc;
}

.moex-news table tr:nth-child(even) td:first-child {
    background: #f2f2f2;
}

/* Hover (очень полезно для глаз) */
.moex-news table tr:hover td {
    background: #eef4ff;
}

/* Тикеры */
.moex-news .moex-ticker {
    font-family: monospace;
    font-weight: 600;
}

/* =========================================================
   СКРОЛЛЕР ДЛЯ ШИРОКИХ ТАБЛИЦ
   ========================================================= */

.moex-news .table-scroller {
    overflow-x: auto;
    border: 1px solid #cfcfcf;
    background: #fff;
}

/* =========================================================
   СПИСКИ
   ========================================================= */

.moex-news ul,
.moex-news ol {
    margin: 10px 0 14px 20px;
    padding: 0;
}

.moex-news li {
    margin-bottom: 6px;
}

/* =========================================================
   КОНТАКТНЫЕ БЛОКИ (НИЗ НОВОСТИ)
   ========================================================= */

.moex-news .row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 13px;
    margin-top: 20px;
    padding-top: 12px;
    border-top: 1px solid #e2e2e2;
}

.moex-news .row > div {
    min-width: 260px;
    line-height: 1.5;
}

/* =========================================================
   МЕЛКИЕ УЛУЧШЕНИЯ
   ========================================================= */

/* Даты, номера, проценты */
.moex-news td,
.moex-news th {
    font-variant-numeric: tabular-nums;
}


.moex-news-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0px 0px 10px 0px;
}

/* Триггер заголовка */
.moex-news-title.is-collapsible {
    cursor: pointer;
    position: relative;
    padding-right: 25px;
}

/* Две палочки стрелки */
.moex-news-title.is-collapsible::before,
.moex-news-title.is-collapsible::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    width: 12px;
    height: 2px;
    background: #666;
    transform-origin: center;
    transition: all 0.35s ease;
}

/* По умолчанию — стрелка вниз */
.moex-news-title.is-collapsible::before {
    transform: translate3d(6px, -6px, 0px) rotate(45deg); /* верхняя палочка стрелки */
}

.moex-news-title.is-collapsible::after {
    transform: translate3d(6px, 2px, 0px) rotate(135deg); /* нижняя палочка стрелки */
}

/* При открытой новости — превращаем в крестик */
.moex-news-item.is-open .moex-news-title.is-collapsible::before {
    transform: translateY(-50%) rotate(45deg); /* крестик верхняя палочка */
    background: #d93025;
    width: 18px;
}

.moex-news-item.is-open .moex-news-title.is-collapsible::after {
    transform: translateY(-50%) rotate(135deg); /* крестик нижняя палочка */
    background: #d93025;
    width: 18px;
}



@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}






/* =========================
   MOEX STOCK MARKET - STYLISH
   ========================= */
.moex-stock-market {
    font-family: 'Georgia', serif;
    font-size: 16px;
    color: #1a1a1a;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 45px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* =========================
   Flex блоки внутри
   ========================= */
.moex-stock-market-blok {
    display: flex;
    flex-wrap: wrap;
    gap: 5rem;
    margin-top: 3rem;
    align-items: flex-start;
    justify-content: space-between;
}

/* =========================
   Каждый внутренний блок
   ========================= */
.moex-stock-market-header-blok-3,
.moex-stock-market-header-blok-4 {
    flex: 1 1 280px;
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* =========================
   Заголовки блоков
   ========================= */
.moex-stock-market h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 14px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 6px;
    color: #111;
}

/* =========================
   Подписи и пояснения
   ========================= */
.moex-stock-market .muted {
    color: #555;
    font-style: italic;
    margin-top: 4px;
}

/* =========================
   Списки показателей
   ========================= */
.moex-stock-market ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.moex-stock-market ul li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
}

.moex-stock-market ul li strong {
    font-weight: 600;
}

/* =========================
   Таблицы
   ========================= */
.moex-stock-market table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    font-size: 0.95rem;
}

.moex-stock-market table th,
.moex-stock-market table td {
    text-align: left;
    padding: 10px 12px;
    border: 1px solid #ddd;
}

.moex-stock-market table th {
    background-color: #f5f5f5;
    font-weight: 700;
    color: #222;
}

/* Чередование строк для удобства чтения */
.moex-stock-market table tbody tr:nth-child(even) {
    background-color: #fafafa;
}

/* =========================
   Акценты для роста/падения
   ========================= */
.moex-stock-market #grow {
    color: #008000;
    font-weight: 700;
}

.moex-stock-market #fall {
    color: #c00;
    font-weight: 700;
}

.moex-stock-market #flat {
    color: #666666;
    font-weight: 700;
}

/* =========================
   Абзацы и сильный текст
   ========================= */
.moex-stock-market p {
    margin: 4px 0 10px 0;
}

.moex-stock-market strong {
    font-weight: 600;
}


.cbr-dashboard > :first-child {
    grid-column: 1 / -1; /* занимает все колонки */
}

.popular-meta {
    display: flex;
    justify-content: space-between;
}
.vievs-top {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.news-hero-actions-blok {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 5%;
    width: 90%;
}

.read-more-container {
    display: flex;
    justify-content: space-between;
}

.container-hight {
    height: 100%;
}


/* ===============================
   BOTTOM CTR SECTION
================================ */

.bottom-ctr {
    background: #ffffff;
    padding: 40px 0;
    border-top: 1px solid #e5e5e5;
}

.bottom-ctr-container {
    padding: 0 20px;

    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
}

/* ===============================
   CARD STYLE
================================ */

.block-card-b {
    background: #fff;
    padding: 30px;
    border: 1px solid #ececec;
    transition: all 0.3s ease;
    position: relative;
}

/* Газетная линия сверху */
.block-card-b::before {
    content: "";
    position: absolute;
    top: 0;
    left: 40px;
    right: 40px;
    height: 3px;
    background: #111;
}

/* Лёгкий бизнес-hover */
.block-card-b:hover {
    box-shadow: 0 15px 40px rgba(0,0,0,0.04);
    transform: translateY(-2px);
}

/* ===============================
   TITLES
================================ */

.block-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 25px;
    color: #111;
}

.contacts-title {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    margin: 30px 0 15px;
    color: #444;
    letter-spacing: 0.5px;
}

/* ===============================
   TEXT
================================ */

.about-text {
    font-size: 15px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 18px;
}

/* ===============================
   CONTACTS
================================ */

.contacts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-item {
    font-size: 14px;
    margin-bottom: 12px;
    color: #555;
}

.contact-item a {
    color: #111;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

.contact-item a:hover {
    border-bottom: 1px solid #111;
}

/* ===============================
   CATEGORIES – TAG STYLE
================================ */

.categories-list-b {
    list-style: none;
    padding: 0;
    margin: 0;

    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-item-b {
    margin: 0;
}

.category-link-b {
    display: inline-block;
    padding: 8px 14px;
    font-size: 13px;
    letter-spacing: 0.4px;
    text-decoration: none;

    color: #222;
    background: #f5f5f5;

    border: 1px solid #e2e2e2;
    border-radius: 4px;

    transition: all 0.25s ease;
}

/* Строгий business-hover */
.category-link-b:hover {
    background: #111;
    color: #fff;
    border-color: #111;
}

/* Лёгкий эффект нажатия */
.category-link-b:active {
    transform: translateY(1px);
}

.contact-item-strong {
    font-size: 0.9rem;
    color: #000000;
    font-weight: 1000;
}


/* SVG иконка */
.views-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: #6d6d6d;
}

.views-icon-dop {
    color: #ffffff;
}

.vievs-main {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

.vievs-list {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.3rem;
}


@media (max-width: 768px) {

    .container {
        padding: 0 4px;
    }

    .main-content {
        display: flex;
        flex-direction: column;
        width: 100%;
        margin-bottom: 0px;
    }
    .cbr-container {
        flex-direction: column;
    }

    .moex-stock-market table th, .moex-stock-market table td {
        padding: 8px 6px;
        font-size: 10px;
    }

    .moex-stock-market ul li {
        padding: 8px 16px;
        font-size: 0.8rem;
    }

    .moex-news-title.is-collapsible::before, .moex-news-title.is-collapsible::after {
        right: 10px;
    }

    .blok-1 {
        height: 0px;
    }

    .section-title {
        font-size: 18px;
    }

    .sort-btn {
        padding: 6px 8px;
        font-size: 10px;
    }

    .news-hero {
        border-radius: 8px;
        margin-bottom: 2rem;
    }

    .news-hero-badge {
        padding: 4px 12px;
        font-size: 10px;
    }

    .news-hero-title a {
        font-size: 1rem;
    }

    .news-hero-content {
        min-height: auto;
        padding: 20px;
        gap: 12px;
    }

    .news-hero-excerpt {
        font-size: 8px;  
    }

    .news-hero {
        min-height: 320px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .news-hero-read {
        padding: 6px 12px;
        font-size: 10px;
        text-align: center;
    }

    .news-hero-date {
        font-size: 8px;
    }

    .news-hero-actions-blok {
        justify-content: space-between;
    }

    .vievs-main {
        font-size: 8px;
        gap: 0.2rem;
    }

    .views-icon {
        width: 12px;
        height: 12px;
    }
    
    .news-card {
        display: flex;
        flex-direction: column;
        gap: 0;
        margin-bottom: 1.5rem;
        border-radius: 8px;
    }

    .news-content {
        padding: 10px;
        gap: 5px;
        border-top: 1px solid #e2e2e2;
    }

    .news-meta {
        font-size: 10px;
    }

    .news-title a {
        font-size: 0.9rem;
    }

    .news-excerpt {
        font-size: 0.8rem;
    }

    .read-more-btn {
        font-size: 12px;
        padding: 5px 10px;
        font-weight: 600;
    }

    .vievs-list {
        font-size: 10px;
    }

    .popular-title {
       font-size: 12px; 
    }

    .additional-blocks {
        gap: 2rem;
        margin: 0rem 0;
        padding: 1rem;
    }

    .moex-stock-market {
        font-size: 10px;
        padding: 12px;
        font-size: 12px;
    }

    .maex-stock {
        gap: 1rem;
        flex-direction: column;
    }

    .moex-stock-market-description h1 {
        font-size: 1.3rem;
    }

    .moex-stock-market h2 {
        font-size: 1rem;
        margin-bottom: 0px;
        padding-bottom: 0px;
    }

    .moex-news-header h3 {
        text-align: center; 
    }

    .moex-stock-market p {
        margin: 2px 0 2px 0;
    }

    .moex-stock-container {
        display: flex;
        gap: 1rem;
        justify-content: flex-start;
        flex-direction: column;
    }
    .moex-stock-content {
        width: 100%;
    }
    .moex-stock-market .muted {
        font-size: 0.8rem;
    }

    .moex-stock-market-blok {
        flex-direction: column;
        gap: 1rem;
        margin-top: 1rem;
    }

    .moex-stock-market-header-blok-3, .moex-stock-market-header-blok-4 {
        flex: auto;
        width: 100%;
        padding: 0px;
    }

    .moex-news .moex-news-text {
        font-size: 12px;
    }
    .moex-news table td:first-child {
        width: 30%;
    }
    .moex-news table td:last-child {
        width: 70%;
    }

    .sidebar {
       display: none; 
    }

    .bottom-ctr {
        padding: 20px;
    }

    .bottom-ctr-container {
        display: flex;
        flex-direction: column;
        padding: 0px;
        gap: 2rem;
    }

    .block-card-b {
        padding: 1.5rem; 
    }

    .about-text {
        font-size: 0.8rem;
    }

    .block-title {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }

    .contact-item a {
        font-size: 0.8rem;
    }

    .category-link-b {
        padding: 4px 8px;
        font-size: 12px;
    }
    
    .block-title-b {
        margin-bottom: 1rem;
    }

    .breadcrumbs {
        margin-bottom: 0rem;
    }
    .breadcrumbs-list {
        margin: 0 0.5rem;
    }
    .section-header {
        margin: 1rem 0.5rem;
        padding: 10px 0;
    }


    .moex-news table td, .moex-news table th {
        padding: 2px 2px;
        font-size: 0.6rem;
    }
    .moex-news table th[colspan] {
        font-size: 8px;
    }
}