/*
Theme Name: RollingMotocross Hub
Author: RollingMotocross Media Group
Description: Тактический инфо-хаб мирового мотокросса. Аналитика техники, обзоры трасс и рейтинги пилотов.
Version: 1.0.0
*/

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@400;700&family=JetBrains+Mono:wght@400;700&display=swap');

:root {
    /* Industrial Racing Palette (Aggressive & High-Vis) */
    --primary: #EA580C;        /* Racing Orange */
    --secondary: #262626;      /* Dirt Grey */
    --accent: #FACC15;         /* Warning Yellow */
    --black: #0A0A0A;
    --white: #FFFFFF;
    --bg-main: #F5F5F5;
    --text-main: #171717;
    --text-muted: #525252;
    --border: #000000;
    
    --container-width: 1200px;
    --content-width: 850px;
    --transition: all 0.2s cubic-bezier(0.33, 1, 0.68, 1);

    /* Adaptive Design Variables */
    --section-pad: clamp(4rem, 10vw, 8rem);
    --hero-pad: clamp(6rem, 15vw, 12rem);
}

/* Global Reset - Axis V-B: Neobrutalism */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border-radius: 0 !important; /* Sharp edges for machinery */
}

html, body {
    overflow-x: hidden;
    position: relative;
    width: 100%;
    max-width: 100%;
    background: var(--bg-main);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
}

/* Fluid Typography - Rule 14 & Rule 22 */
h1, h2, h3, .logo, .footer-logo {
    overflow-wrap: break-word;
    font-family: 'Bebas Neue', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Rule 14: Safe h1 threshold 1.8rem */
h1 { font-size: clamp(1.8rem, 10vw, 8rem); line-height: 0.9; color: var(--white); margin-bottom: 2rem; }
h2 { font-size: clamp(1.6rem, 6vw, 4.5rem); line-height: 0.9; color: var(--secondary); margin-bottom: 3rem; }
h3 { font-size: clamp(1.4rem, 4vw, 2.5rem); line-height: 1; color: var(--black); }

.mono { font-family: 'JetBrains Mono', monospace; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.85rem; }

img { max-width: 100%; height: auto; display: block; border: 3px solid var(--border); }

a { text-decoration: none; color: inherit; transition: var(--transition); }

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* DNA N-A: Classic Horizontal Header */
.site-header {
    background: var(--white);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 4px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}

.logo {
    font-size: clamp(1.5rem, 4vw, 3rem);
    color: var(--black);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}
.logo span { background: var(--primary); color: var(--white); padding: 0 0.5rem; }

.main-nav ul { display: flex; gap: 3rem; list-style: none; }
.main-nav a { font-weight: 700; font-size: 1rem; color: var(--black); }
.main-nav a:hover { color: var(--primary); }

.nav-toggle { display: none; }

/* DNA H-A: Full Bleed Hero */
.hero-rolling {
    min-height: 85vh;
    display: flex;
    align-items: center;
    position: relative;
    background: var(--secondary);
    overflow: hidden;
    color: var(--white);
}

.hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1;
}
.hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.5; border: none; }
.hero-bg::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(45deg, var(--black) 20%, transparent 80%); }

.hero-content { position: relative; z-index: 2; padding: var(--hero-pad) 0; max-width: 800px; }

.btn-race {
    display: inline-block;
    padding: 1.5rem 4rem;
    background: var(--primary);
    color: var(--white);
    font-family: 'Bebas Neue';
    font-size: 1.8rem;
    border: 3px solid var(--border);
    box-shadow: 8px 8px 0 var(--border);
}
.btn-race:hover { transform: translate(-2px, -2px); box-shadow: 10px 10px 0 var(--border); }

/* DNA D-E: Accent Color Strips */
.accent-strip-top { border-top: 12px solid var(--primary); }
.accent-strip-left { border-left: 12px solid var(--primary); padding-left: 3rem; }

/* DNA F-F: Numerical Counters */
.racing-stats {
    padding: var(--section-pad) 0;
    background: var(--white);
    border-bottom: 4px solid var(--border);
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}
.stat-item strong { display: block; font-size: 5rem; font-family: 'Bebas Neue'; color: var(--primary); line-height: 1; }
.stat-item span { font-weight: 700; color: var(--secondary); text-transform: uppercase; font-size: 0.9rem; }

/* DNA U-C: Horizontal Scroll Strip */
.scroll-facts {
    background: var(--accent);
    padding: 2rem 0;
    overflow: hidden;
    white-space: nowrap;
    border-bottom: 4px solid var(--border);
}
.scroll-track {
    display: inline-flex;
    animation: scroll 30s linear infinite;
}
.scroll-item {
    padding: 0 4rem;
    font-family: 'Bebas Neue';
    font-size: 2rem;
    color: var(--black);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.scroll-item::after { content: '///'; color: var(--primary); }

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

/* Posts Grid - Axis C-E: Numbered Cards */
.posts-section { padding: var(--section-pad) 0; background: var(--bg-main); }
.rolling-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem;
}

.post-card-num {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 3px solid var(--border);
    position: relative;
    padding-top: 4rem;
}
.post-card-num::before {
    content: attr(data-rank);
    position: absolute;
    top: -1.5rem; left: 2rem;
    background: var(--primary);
    color: var(--white);
    font-family: 'Bebas Neue';
    font-size: 3rem;
    padding: 0 1rem;
    border: 3px solid var(--border);
}
.post-card-num .thumb { height: 220px; overflow: hidden; border-bottom: 3px solid var(--border); border-top: none; border-left: none; border-right: none; }
.post-card-num .thumb img { width: 100%; height: 100%; object-fit: cover; border: none; }
.post-card-num .content { padding: 2.5rem; flex-grow: 1; display: flex; flex-direction: column; }
.post-card-num h3 { flex-grow: 1; margin-bottom: 2rem; }

.btn-read {
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Pagination - Industrial Style (Axis 7: V-B) */
.pagination { display: flex; justify-content: center; gap: 0.5rem; margin-top: 8rem; }
.pagination .page-numbers {
    padding: 1rem 1.5rem;
    border: 3px solid var(--border);
    background: var(--white);
    font-family: 'Bebas Neue';
    font-size: 1.5rem;
    color: var(--black);
}
.pagination span.current, .pagination a:hover { background: var(--primary); color: var(--white); }

/* DNA FT-C: Three-column Footer */
.site-footer {
    background: var(--secondary);
    color: var(--white);
    padding: 8rem 0 4rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(2rem, 5vw, 4rem); /* Rule 6: safe gap */
    margin-bottom: 6rem;
}
.footer-logo { font-size: clamp(2rem, 6vw, 4rem); color: var(--primary); margin-bottom: 2rem; overflow-wrap: anywhere; }
.footer-logo span { color: var(--white); border: 2px solid var(--primary); padding: 0 0.5rem; }
.footer-desc { color: var(--bg-main); opacity: 0.8; overflow-wrap: break-word; max-width: 100%; }

.footer-title { font-family: 'Bebas Neue'; font-size: 2rem; color: var(--accent); margin-bottom: 2.5rem; }
.footer-nav ul { list-style: none; }
.footer-nav li { margin-bottom: 1rem; border-left: 4px solid var(--primary); padding-left: 1rem; }
.footer-nav a:hover { color: var(--primary); }

.footer-bottom {
    padding-top: 3rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex; justify-content: space-between; font-size: 0.8rem; font-family: 'JetBrains Mono';
}

/* Rule 22: Content Protocol */
.post-main { max-width: var(--content-width); margin: 6rem auto; padding: 0 2rem; }
.post-content h2, .post-content h3 { margin: 4rem 0 2rem; color: var(--secondary); border-left: 8px solid var(--primary); padding-left: 1.5rem; }
.post-content table { width: 100%; border-collapse: collapse; margin: 4rem 0; border: 3px solid var(--border); }
.post-content th { background: var(--secondary); color: var(--white); padding: 1.5rem; text-align: left; }
.post-content td { padding: 1.5rem; border: 1px solid var(--border); }
.post-content ul li::before { content: '>>'; color: var(--primary); margin-right: 1rem; font-weight: 700; }

/* Responsive */
@media (max-width: 1024px) {
    .rolling-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .header-inner { gap: 1rem; }
    .main-nav { display: none; }
    .main-nav.is-active {
        display: block; position: absolute; top: 100%; left: 0; width: 100%; background: var(--white); padding: 3rem 2rem; border-bottom: 4px solid var(--primary);
    }
    .main-nav ul { flex-direction: column; gap: 2rem; }
    .nav-toggle { display: flex; flex-direction: column; gap: 6px; width: 30px; background: none; border: none; }
    .nav-toggle span { width: 100%; height: 3px; background: var(--black); }
    
    .rolling-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 2rem; text-align: center; }
}
