/*
Theme Name: Dark Crypto Premium
Theme URI: https://cryptotradingbots.ru/
Author: CryptoTradingBots
Author URI: https://cryptotradingbots.ru/
Description: Современная темная тема WordPress для криптовалютного сайта с подписочной моделью. Поддержка бирж BingX и Bitunix.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dark-crypto-premium
Tags: crypto, dark, modern, trading, subscription, responsive, two-columns, custom-header, custom-menu, featured-images
*/

/* ============================================
   БАЗОВЫЕ ПЕРЕМЕННЫЕ И СБРОС
   ============================================ */

:root {
    /* === Telegram Button === */
    .telegram-btn {
        display: flex;
        align-items: center;
        background: linear-gradient(90deg, #0088cc 0%, #1c1c1c 100%);
        color: #fff;
        padding: 8px 18px;
        border-radius: 30px;
        text-decoration: none;
        font-weight: 500;
        font-size: 16px;
        transition: background 0.2s;
        box-shadow: 0 2px 8px rgba(0,136,204,0.15);
    }
    .telegram-btn:hover {
        background: linear-gradient(90deg, #1c1c1c 0%, #0088cc 100%);
    }
    .telegram-icon {
        width: 24px;
        height: 24px;
        margin-right: 10px;
    }
    /* Темная палитра */
    --bg-primary: #0a0e27;
    --bg-secondary: #121829;
    --bg-card: rgba(18, 24, 41, 0.8);
    --bg-hover: rgba(30, 40, 60, 0.9);
    
    /* Неоновые акценты */
    --accent-cyan: #00d4ff;
    --accent-green: #00ff88;
    --accent-blue: #2962ff;
    --accent-purple: #7c4dff;
    --accent-red: #ff3366;
    
    /* Текст */
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --text-muted: #718096;
    
    /* Границы */
    --border-color: rgba(255, 255, 255, 0.1);
    --border-glow: rgba(0, 212, 255, 0.3);
    
    /* Градиенты */
    --gradient-primary: linear-gradient(135deg, #00d4ff 0%, #2962ff 100%);
    --gradient-card: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(41, 98, 255, 0.1) 100%);
    
    /* Тени */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(0, 212, 255, 0.4);
    
    /* Радиусы */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    
    /* Шрифты */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Space Grotesk', 'Inter', sans-serif;
    --font-mono: 'Fira Code', 'Courier New', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--bg-primary);
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(0, 212, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(41, 98, 255, 0.05) 0%, transparent 50%);
    background-attachment: fixed;
    overflow-x: hidden;
}

/* ============================================
   ТИПОГРАФИКА
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

h1 {
    font-size: 3rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 2rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--accent-blue);
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
}

/* ============================================
   ОСНОВНАЯ СТРУКТУРА
   ============================================ */

.site-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    margin-top: 40px;
}

.main-content {
    min-width: 0;
}

/* ============================================
   КНОПКИ
   ============================================ */

.btn {
    display: inline-block;
    padding: 14px 32px;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--accent-cyan);
    border: 2px solid var(--accent-cyan);
}

.btn-secondary:hover {
    background: var(--accent-cyan);
    color: var(--bg-primary);
}

/* ============================================
   КАРТОЧКИ
   ============================================ */

.card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-card);
    transition: left 0.6s ease;
    z-index: 0;
}

.card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-cyan);
    box-shadow: var(--shadow-glow);
}

.card:hover::before {
    left: 0;
}

.card > * {
    position: relative;
    z-index: 1;
}

/* ============================================
   ПОСТЫ
   ============================================ */

/* Сетка постов на главной */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.post-item {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.post-thumbnail {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 20px;
    height: 280px;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.post-thumbnail:hover img {
    transform: scale(1.08);
}

.post-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.post-category {
    display: inline-block;
    padding: 6px 16px;
    background: var(--gradient-primary);
    color: var(--text-primary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    align-self: flex-start;
}

.post-title {
    margin-bottom: 12px;
    font-size: 1.25rem;
}

.post-title a {
    color: var(--text-primary);
    transition: color 0.3s;
}

.post-title a:hover {
    color: var(--accent-cyan);
}

.post-meta {
    display: flex;
    gap: 20px;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.post-meta .meta-icon {
    margin-right: 4px;
}

.post-excerpt {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
    flex: 1;
}

.post-item .btn {
    align-self: flex-start;
    margin-top: auto;
}

/* ============================================
   SIDEBAR СТИЛИ
   ============================================ */

.widget-area {
    position: sticky;
    top: 120px;
}

.widget {
    margin-bottom: 30px;
}

.widget-title {
    font-size: 1.25rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-glow);
}

.subscription-widget {
    text-align: center;
}

.subscription-features {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    text-align: left;
}

.subscription-features li {
    padding: 8px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.popular-posts-list {
    list-style: none;
    padding: 0;
}

.popular-post-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.popular-post-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.popular-post-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.popular-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popular-post-content {
    flex: 1;
}

.popular-post-title {
    font-size: 0.95rem;
    margin-bottom: 8px;
    line-height: 1.4;
}

.popular-post-title a {
    color: var(--text-primary);
}

.popular-post-title a:hover {
    color: var(--accent-cyan);
}

.popular-post-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.categories-list {
    list-style: none;
    padding: 0;
}

.categories-list li {
    margin-bottom: 10px;
}

.categories-list li a {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: all 0.3s;
}

.categories-list li a:hover {
    background: var(--bg-hover);
    color: var(--accent-cyan);
    padding-left: 16px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* --- Desktop < 1200px --- */
@media (max-width: 1200px) {
    .site-container {
        max-width: 1000px;
        padding: 0 16px;
    }
    .content-wrapper {
        grid-template-columns: 1fr 300px;
        gap: 24px;
    }
}

/* --- Tablet --- */
@media (max-width: 1024px) {
    .site-container {
        max-width: 100vw;
        padding: 0 10px;
    }
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .sidebar {
        margin-top: 32px;
    }
    .header-top-inner, .site-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .posts-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
}

/* --- Mobile --- */
@media (max-width: 768px) {
    html {
        font-size: 13px;
    }
    .site-container {
        max-width: 100vw;
        padding: 0 4px;
    }
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 16px;
    }
    .header-top-inner, .site-header {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .post-thumbnail {
        height: 140px;
    }
    h1 {
        font-size: 1.5rem;
    }
    h2 {
        font-size: 1.2rem;
    }
    .telegram-btn {
        width: 100%;
        justify-content: center;
        font-size: 15px;
        padding: 10px 0;
    }
}

/* --- Small Mobile --- */
@media (max-width: 480px) {
    .site-header, .header-top-inner {
        padding: 8px 0;
    }
    .telegram-btn {
        font-size: 14px;
        padding: 8px 0;
    }
}

@media (max-width: 1200px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    .site-container {
        padding: 0 16px;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .post-thumbnail {
        height: 220px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
}

/* ============================================
   УТИЛИТЫ
   ============================================ */

/* Пагинация */
.pagination {
    margin-top: 60px;
    text-align: center;
}

.pagination .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    padding: 0 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.3s;
}

.pagination a:hover {
    border-color: var(--accent-cyan);
    background: var(--bg-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.pagination .current {
    background: var(--gradient-primary);
    border-color: var(--accent-cyan);
    box-shadow: var(--shadow-glow);
}

.pagination .prev,
.pagination .next {
    font-weight: 600;
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gap-1 { gap: 1rem; }
.gap-2 { gap: 2rem; }

.btn-block {
    display: block;
    width: 100%;
}
