/*
Theme Name: MoneyLab Lab
Author: Senior Designer & Dev
Description: Концепция "Чистая Лаборатория": минимум воды, максимум точности.
Version: 1.2.0
Text Domain: moneylab
*/

:root {
    /* Colors - Pure & Sharp */
    --bg: #ffffff;
    --surface: #f9fafb;
    --text: #0a0a0a;
    --text-muted: #666666;
    --accent: #2e5bff; /* Precision Blue */
    --border: #e5e7eb;
    --danger: #ff4d4d;
    
    /* Spacing */
    --gap: 1.5rem;
    --header-height: 70px;
    --container-width: 1280px;
    
    /* Fonts */
    --font-display: 'Syne', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { 
    background-color: var(--bg); 
    color: var(--text); 
    font-family: var(--font-body); 
    line-height: 1.5; 
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; transition: 0.2s; }

/* Grid System */
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 var(--gap); }

/* Typography */
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; line-height: 1; }
.text-mono { font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }

/* Header - Floating Lab Bar */
.site-header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    width: 100%;
    gap: 2rem;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-dot { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; }

.main-nav ul { display: flex; gap: 2rem; justify-content: center; }
.main-nav a { font-size: 0.85rem; font-weight: 500; color: var(--text-muted); }
.main-nav a:hover, .main-nav .current-menu-item a { color: var(--accent); }

/* Hero - Scientific Impact */
.hero {
    padding: 6rem 0;
    border-bottom: 1px solid var(--border);
    background-image: radial-gradient(var(--border) 1px, transparent 1px);
    background-size: 40px 40px;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: var(--text);
    color: var(--bg);
    margin-bottom: 2rem;
}

.hero h1 { font-size: clamp(2.5rem, 7vw, 6rem); letter-spacing: -0.04em; margin-bottom: 2rem; }
.hero-desc { max-width: 600px; font-size: 1.25rem; color: var(--text-muted); }

/* Lab Stats */
.lab-stats {
    background: var(--text);
    color: var(--bg);
    padding: 3rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    text-align: center;
    gap: 2rem;
}

.stat-value {
    display: block;
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    opacity: 0.6;
    font-size: 0.7rem;
}

/* Topic Section */
.topic-section {
    padding: 6rem 0 0;
}

.section-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.topic-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
}

.topic-card {
    background: var(--bg);
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
}

.topic-card:hover {
    background: var(--surface);
}

.topic-icon {
    font-size: 2rem;
}

.topic-name {
    font-family: var(--font-display);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: -0.02em;
}

/* Post Grid - Fixed 3-Column Lab Grid */
.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 4rem 0;
}

.post-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    padding: 1.5rem;
    transition: transform 0.3s ease, border-color 0.3s;
}

.post-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
}

.card-image-wrap {
    aspect-ratio: 16/10;
    margin: -1.5rem -1.5rem 1.5rem -1.5rem;
    overflow: hidden;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.card-img { width: 100%; height: 100%; object-fit: cover; }

.card-category { color: var(--accent); margin-bottom: 0.75rem; display: block; }
.card-title { font-size: 1.4rem; margin-bottom: 1rem; line-height: 1.2; text-transform: none; }
.card-excerpt { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 1.5rem; flex-grow: 1; }

.card-footer {
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-lab {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Pagination */
.pagination-container { padding: 4rem 0; text-align: center; border-top: 1px solid var(--border); }
.pagination-list { display: flex; justify-content: center; gap: 0.5rem; }
.pagination-item a, .pagination-item span {
    padding: 0.8rem 1.2rem;
    border: 1px solid var(--border);
    font-family: var(--font-mono);
}
.pagination-item.is-active span { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Footer */
.site-footer { padding: 4rem 0; background: var(--surface); border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }

.footer-col h4 { margin-bottom: 1.5rem; font-size: 0.8rem; color: var(--text-muted); }
.footer-contact-item { margin-bottom: 1rem; }
.footer-contact-label { display: block; color: var(--accent); margin-bottom: 0.2rem; }

/* Mobile */
.menu-toggle { display: none; background: none; border: 1px solid var(--border); padding: 0.5rem; cursor: pointer; }

/* Single & Page */
.page-content { max-width: 800px; margin: 0 auto; padding: 4rem 0; }
.post-meta-single { margin-bottom: 2rem; color: var(--accent); border-bottom: 1px solid var(--border); padding-bottom: 1rem; }
.content { font-size: 1.1rem; line-height: 1.7; color: #333; }
.content h1, .content h2, .content h3 { text-transform: none; margin: 2.5rem 0 1rem; font-family: var(--font-body); font-weight: 700; }
.content p { margin-bottom: 1.5rem; }
.post-featured-image { margin-bottom: 3rem; border: 1px solid var(--border); }
.post-featured-image img { width: 100%; height: auto; display: block; }
.breadcrumbs { padding: 2rem 0; border-bottom: 1px solid var(--border); margin-bottom: 2rem; font-size: 0.8rem; color: var(--text-muted); }

@media (max-width: 1024px) {
    .post-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .topic-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .header-inner { grid-template-columns: 1fr auto; }
    .main-nav { display: none; }
    .menu-toggle { display: block; }
    .post-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 3rem; }
    .footer-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; gap: 3rem; }
    .topic-grid { grid-template-columns: 1fr; }
}
