/*
Theme Name: MesooperationsF1 Formula 1 Hub
Author: MesooperationsF1 Media Group
Description: Il portale tecnico della Formula 1. Analisi telemetrica, classifiche piloti e approfondimenti sui Gran Premi.
Version: 1.0.0
*/

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Chivo:wght@300;400;700&family=JetBrains+Mono:wght@400;700&display=swap');

:root {
    /* High-Tech Racing Palette (Carbon & Speed) */
    --primary: #FF1801;        /* F1 Racing Red */
    --secondary: #15151E;      /* Carbon Deep Navy */
    --accent: #00D2BE;         /* Technical Cyan (Mercedes/Tech) */
    --black: #000000;
    --white: #FFFFFF;
    --bg-main: #F3F3F3;        /* Track Concrete */
    --text-main: #15151E;
    --text-muted: #53535F;
    --border: #15151E;
    
    --container-width: 1200px;
    --content-width: 850px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);

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

/* Global Reset - Axis V-B: Neobrutalism (Technical Precision) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border-radius: 0 !important; /* Zero radius for mechanical feel */
}

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

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

/* Rule 14: Safe h1 threshold 1.8rem */
h1 { font-size: clamp(1.8rem, 10vw, 7rem); line-height: 0.95; color: var(--secondary); margin-bottom: 2rem; }
h2 { font-size: clamp(1.6rem, 6vw, 4rem); line-height: 1; color: var(--secondary); margin-bottom: 3rem; position: relative; }
h3 { font-size: clamp(1.3rem, 4vw, 2.2rem); line-height: 1.1; color: var(--secondary); }

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

img { max-width: 100%; height: auto; display: block; border: 4px 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-E: Minimal Top-bar Header */
.site-header {
    background: var(--secondary);
    color: var(--white);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 4px solid var(--primary);
}

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

.logo {
    font-size: 1.5rem;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.logo span { color: var(--primary); }

.main-nav ul { display: flex; gap: 2.5rem; list-style: none; }
.main-nav a { 
    font-weight: 700; font-size: 0.8rem; color: var(--white); 
    text-transform: uppercase; opacity: 0.8;
}
.main-nav a:hover { opacity: 1; color: var(--accent); }

.nav-toggle { display: none; }

/* DNA H-D: Breakout / Asymmetric Hero */
.hero-f1 {
    padding: var(--hero-pad) 0;
    background: var(--white);
    border-bottom: 8px solid var(--secondary);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.hero-image-breakout {
    position: relative;
}
.hero-image-breakout img {
    width: 130%;
    margin-left: -15%;
    border: 10px solid var(--secondary);
    filter: grayscale(100%) contrast(120%);
    transition: var(--transition);
}
.hero-image-breakout:hover img { filter: grayscale(0%); transform: scale(1.02); }

.btn-f1 {
    display: inline-block;
    padding: 1.2rem 3.5rem;
    background: var(--primary);
    color: var(--white);
    font-family: 'Orbitron';
    font-weight: 900;
    font-size: 1rem;
    border: 4px solid var(--secondary);
    box-shadow: 10px 10px 0 var(--secondary);
}
.btn-f1:hover { transform: translate(-2px, -2px); box-shadow: 12px 12px 0 var(--secondary); }

/* DNA D-E: Accent Strips of Color */
.strip-red { border-top: 10px solid var(--primary); }
.strip-cyan { border-left: 15px solid var(--accent); padding-left: 2rem; }

/* DNA F-F: Numerical Counters (Race Stats) */
.race-stats {
    padding: var(--section-pad) 0;
    background: var(--secondary);
    color: var(--white);
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
    text-align: center;
}
.stat-item strong { display: block; font-size: 4.5rem; color: var(--accent); line-height: 1; margin-bottom: 1rem; }
.stat-item span { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.2em; color: var(--white); opacity: 0.6; }

/* DNA U-E: Numerical Infographic (Live Tracking) */
.info-section {
    padding: var(--section-pad) 0;
    background: var(--white);
    border-bottom: 4px solid var(--border);
}
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
}
.info-data { border: 4px solid var(--border); padding: 4rem; display: flex; flex-direction: column; gap: 3rem; }
.data-row { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--border); padding-bottom: 1rem; }
.data-row .val { font-family: 'Orbitron'; font-size: 2.5rem; color: var(--primary); }
.data-row .label { font-weight: 700; text-transform: uppercase; font-size: 0.9rem; }

/* Posts Grid - DNA C-F: Timeline Cards */
.posts-section { padding: var(--section-pad) 0; }
.f1-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    position: relative;
}
.f1-grid::before {
    content: ''; position: absolute; top: 0; left: 50px; width: 4px; height: 100%;
    background: var(--secondary); z-index: 1;
}

.post-card-timeline {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 4rem;
    position: relative;
    padding: 4rem 0;
    border-bottom: 1px solid var(--border);
}
.post-card-timeline:last-child { border-bottom: none; }
.time-marker {
    width: 100px; height: 100px;
    background: var(--primary);
    color: var(--white);
    display: flex; align-items: center; justify-content: center;
    font-family: 'Orbitron'; font-weight: 900; font-size: 1.5rem;
    z-index: 2; border: 4px solid var(--secondary);
}
.timeline-content { display: grid; grid-template-columns: 350px 1fr; gap: 4rem; align-items: center; }
.timeline-content .thumb { height: 250px; overflow: hidden; }
.timeline-content .thumb img { width: 100%; height: 100%; object-fit: cover; border: 4px solid var(--secondary); }
.timeline-text h3 { margin-bottom: 1.5rem; font-size: 2.2rem; }

.btn-telemetry {
    font-weight: 700; color: var(--primary); text-transform: uppercase;
    display: inline-flex; align-items: center; gap: 1rem;
    border: 2px solid var(--primary); padding: 0.5rem 1.5rem;
}
.btn-telemetry: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;
    border-top: 10px solid var(--primary);
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(2rem, 5vw, 4rem);
    margin-bottom: 6rem;
}
.footer-logo { font-size: clamp(2rem, 6vw, 4rem); color: var(--white); margin-bottom: 2rem; overflow-wrap: anywhere; }
.footer-logo span { color: var(--primary); }
.footer-desc { color: rgba(255,255,255,0.5); font-size: 0.9rem; max-width: 100%; overflow-wrap: break-word; }

.footer-title { font-family: 'Orbitron'; font-size: 1.5rem; color: var(--accent); margin-bottom: 2.5rem; }
.footer-nav ul { list-style: none; }
.footer-nav li { margin-bottom: 1rem; }
.footer-nav a { font-weight: 700; color: var(--white); opacity: 0.7; }
.footer-nav a:hover { opacity: 1; 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.7rem; font-family: 'JetBrains Mono'; color: rgba(255,255,255,0.3);
}

/* Rule 22: Content Protocol */
.post-main { max-width: var(--content-width); margin: 6rem auto; padding: 0 2rem; }
.post-header { margin-bottom: 5rem; }
.post-meta { color: var(--primary); font-weight: 700; margin-bottom: 1.5rem; display: block; font-family: 'Orbitron'; }
.post-content h2, .post-content h3 { margin: 4rem 0 2rem; color: var(--secondary); border-left: 10px solid var(--accent); padding-left: 2rem; }
.post-content table { width: 100%; border-collapse: collapse; margin: 4rem 0; border: 4px solid var(--secondary); }
.post-content th { background: var(--secondary); color: var(--white); padding: 1.5rem; font-family: 'Orbitron'; }
.post-content td { padding: 1.5rem; border: 1px solid var(--border); }

/* Responsive */
@media (max-width: 1024px) {
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero-image-breakout img { width: 100%; margin-left: 0; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .info-grid { grid-template-columns: 1fr; }
    .timeline-content { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .header-inner { flex-direction: column; gap: 1.5rem; }
    .main-nav ul { gap: 1.5rem; font-size: 0.7rem; }
    .f1-grid::before { left: 20px; }
    .post-card-timeline { grid-template-columns: 50px 1fr; gap: 2rem; }
    .time-marker { width: 50px; height: 50px; font-size: 1rem; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-bottom { flex-direction: column; gap: 2rem; text-align: center; }
}
