/*
Theme Name: F1 Paddock
Theme URI: https://f1paddock.it
Author: Gemini
Description: Tema F1 ultra-veloce per la stagione 2026. Sfondo bianco, testi bianchi in header/box news. Classifiche e Calendario gestite da IA Gemini con Grounding su Google Calendar.
Version: 2.9
License: GNU General Public License v2 or later
Text Domain: f1-paddock
*/

:root {
    --f1-red: #e10600;
    --f1-black: #0f0f0f;
    --f1-carbon: #1a1a1a;
    --f1-gold: #fbbf24;
    --f1-white: #ffffff;
    --f1-gray-100: #f3f4f6;
    --f1-gray-200: #e5e7eb;
}

body {
    background-color: var(--f1-white);
    color: var(--f1-black);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

header, footer {
    color: var(--f1-white) !important;
}

/* --- LAYOUT & MARGINI --- */
.container {
    width: 100%;
    padding-right: 20px;
    padding-left: 20px;
    margin-right: auto;
    margin-left: auto;
    max-width: 1200px;
}

@media (min-width: 768px) {
    .container {
        padding-right: 40px;
        padding-left: 40px;
    }
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

h1.entry-title {
    font-size: clamp(2rem, 5vw, 3.5rem); /* Dimensione fluida */
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    color: var(--f1-black);
}

h2 { font-size: 2rem !important; margin: 2rem 0 1rem !important; }
h3 { font-size: 1.5rem !important; color: #333; }

a {
    color: var(--f1-red);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--f1-black);
    text-decoration: underline;
}

/* --- SINGLE POST LAYOUT --- */
.entry-content {
    font-size: 1.15rem;
    color: #1f2937;
    max-width: 800px; /* Ottimale per la lettura */
    margin: 0 auto;
}

.entry-content p {
    margin-bottom: 1.8rem;
}

.entry-meta {
    font-size: 0.875rem;
    border-left: 4px solid var(--f1-red);
    padding-left: 1.25rem;
    margin-bottom: 2rem;
}

/* --- TAGS & BADGES --- */
.badge.bg-light {
    background-color: var(--f1-gray-100) !important;
    border: 1px solid var(--f1-gray-200) !important;
    padding: 0.6em 1em;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    border-radius: 4px;
}

/* --- POST NAVIGATION --- */
.post-navigation {
    border-top: 1px solid var(--f1-gray-200);
    padding-top: 3rem;
    margin: 4rem auto 0;
    max-width: 800px;
}

.nav-subtitle {
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    color: #9ca3af;
    font-weight: 800;
}

.nav-title {
    display: block;
    font-size: 1.25rem;
    color: var(--f1-black);
    margin-top: 0.25rem;
}

/* --- RELATED POSTS CON FEATURED IMG --- */
.related-posts {
    background-color: #f9fafb;
    padding: 5rem 0;
    margin-top: 5rem;
    border-top: 1px solid var(--f1-gray-200);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.related-card {
    background: var(--f1-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.related-card:hover {
    transform: translateY(-8px);
}

.related-thumb {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    border-bottom: 3px solid transparent;
    transition: border-color 0.3s;
}

.related-card:hover .related-thumb {
    border-bottom-color: var(--f1-red);
}

.related-info {
    padding: 20px;
}

.related-info h4 {
    font-size: 1.1rem;
    margin: 0;
    line-height: 1.4;
}

/* --- F1 GRID STYLES (ORIGINAL) --- */
.carbon-bg {
    background-color: var(--f1-carbon);
    background-image: linear-gradient(45deg, #111 25%, transparent 25%), 
                      linear-gradient(-45deg, #111 25%, transparent 25%), 
                      linear-gradient(45deg, transparent 75%, #111 75%), 
                      linear-gradient(-45deg, transparent 75%, #111 75%);
    background-size: 4px 4px;
}

.slanted { clip-path: polygon(0 0, 100% 0, 95% 100%, 0% 100%); }

/* MOBILE RESPONSIVENESS */
@media (max-width: 768px) {
    .container { padding-right: 15px; padding-left: 15px; }
    h1.entry-title { font-size: 2.25rem; }
    .entry-content { font-size: 1.05rem; }
}
a:link {
  color: blue;           /* unvisited link */
}

a:visited {
  color: purple;         /* visited link */
}

a:hover {
  color: red;            /* mouse over */
  text-decoration: underline;
}

a:active {
  color: green;          /* while clicking */
}