/* ===== СВЕТЛАЯ И ТЁМНАЯ ТЕМА ===== */

/* Светлая тема (по умолчанию) */
:root {
    --bg-color: #ffffff;
    --header-bg: #ffffff;
    --topbar-bg: #f8f9fa;
    --card-bg: #ffffff;
    --section-bg: #f8f9fa;
    --text-color: #1a1a2e;
    --meta-color: #666666;
    --border-color: #e9ecef;
    --accent-color: #f7931a;
}

/* Тёмная тема */
.dark-mode {
    --bg-color: #121212;
    --header-bg: #1a1a2e;
    --topbar-bg: #16213e;
    --card-bg: #1e1e2e;
    --section-bg: #16213e;
    --text-color: #ffffff;
    --meta-color: #aaaaaa;
    --border-color: #2c3e50;
    --accent-color: #f7931a;
}

/* Применение переменных */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.cm-header {
    background: var(--header-bg);
}

.cm-topbar {
    background: var(--topbar-bg);
}

.cm-logo span {
    color: var(--text-color);
}

.cm-menu a {
    color: var(--text-color);
}

.news-card,
.trend-card {
    background: var(--card-bg);
}

.latest-news,
.market-analysis,
.market-trends,
.crypto-academy {
    background: var(--section-bg);
}
/* ===== СТИЛИ ДЛЯ ЗАГОЛОВКА ===== */

.cm-header {
    background: var(--bg-color, #fff);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: relative;
    z-index: 100;
}

/* Top bar */
.cm-topbar {
    background: var(--topbar-bg, #f5f5f5);
    padding: 8px 0;
    font-size: 13px;
}

.cm-topbar__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.cm-trending {
    color: var(--text-color, #333);
}

/* Main header */
.cm-header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    flex-wrap: wrap;
    gap: 20px;
}

.cm-logo {
    font-size: 28px;
    font-weight: 700;
    text-decoration: none;
    color: var(--logo-color, #f7931a);
}

.cm-logo span {
    color: var(--text-color, #333);
}

/* Navigation */
.cm-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 25px;
}

.cm-menu a {
    text-decoration: none;
    color: var(--text-color, #333);
    font-weight: 500;
    transition: color 0.2s;
}

.cm-menu a:hover {
    color: #f7931a;
}

/* Burger menu (mobile) */
.cm-burger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.cm-burger span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--text-color, #333);
    margin: 5px 0;
    transition: 0.2s;
}

/* Search overlay */
.cm-search {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
}

.cm-search.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cm-search-box {
    width: 90%;
    max-width: 600px;
}

.cm-search-box input {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    border: none;
    border-radius: 8px;
}

/* Mobile styles */
@media (max-width: 768px) {
    .cm-burger {
        display: block;
    }
    
    .cm-nav {
        display: none;
        width: 100%;
    }
    
    .cm-nav.active {
        display: block;
    }
    
    .cm-menu {
        flex-direction: column;
        gap: 15px;
        padding: 20px 0;
    }
    
    .cm-topbar__inner {
        flex-direction: column;
        text-align: center;
    }
}/* Sticky header */
.cm-header {
    transition: all 0.3s ease;
}

.cm-header.header-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Компенсация для админ-панели */
body.admin-bar .cm-header.header-sticky {
    top: 32px;
}

@media (max-width: 782px) {
    body.admin-bar .cm-header.header-sticky {
        top: 46px;
    }
}
/* ===== ФУТЕР (FOOTER) ===== */

.cm-custom-footer {
    background: var(--footer-bg, #1a1a2e);
    color: var(--footer-text, #ffffff);
    margin-top: 60px;
    padding: 60px 0 0;
}

.custom-footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

/* Колонки футера */
.footer-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Логотип в футере */
.footer-logo {
    font-size: 28px;
    font-weight: 800;
    color: #f7931a;
    margin-bottom: 10px;
}

.footer-logo span {
    color: #ffffff;
}

/* Заголовки в футере */
.footer-column h4 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 15px 0;
    color: #f7931a;
    position: relative;
    display: inline-block;
}

.footer-column h4::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 2px;
    background: #f7931a;
}

/* Текст в футере */
.footer-column p {
    color: var(--footer-text-light, #bbbbbb);
    line-height: 1.6;
    font-size: 14px;
    margin: 0;
}

/* Ссылки в футере */
.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--footer-text-light, #bbbbbb);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #f7931a;
    padding-left: 5px;
}

/* Социальные иконки */
.social-icons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Нижняя часть футера (копирайт) */
.footer-bottom {
    background: rgba(0, 0, 0, 0.3);
    margin-top: 60px;
    padding: 20px 0;
    text-align: center;
}

.footer-bottom .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.copyright-text {
    color: var(--footer-text-light, #888888);
    font-size: 13px;
    margin: 0;
}

/* ===== АДАПТИВНОСТЬ ФУТЕРА ===== */
@media (max-width: 992px) {
    .custom-footer-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .custom-footer-container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .footer-column h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-links a:hover {
        padding-left: 0;
    }
    
    .cm-custom-footer {
        padding-top: 40px;
    }
    
    .footer-bottom {
        margin-top: 40px;
    }
}

/* ===== ПЕРЕМЕННЫЕ ДЛЯ ТЁМНОЙ ТЕМЫ ===== */
:root {
    --footer-bg: #1a1a2e;
    --footer-text: #ffffff;
    --footer-text-light: #bbbbbb;
}

.dark-mode {
    --footer-bg: #0d1117;
    --footer-text: #ffffff;
    --footer-text-light: #8b949e;
}