/*
Theme Name: PandalightShow Ciclismo Hub
Author: PandalightShow Media Group
Description: Il portale d'élite del ciclismo mondiale. Analisi tattiche, classifiche UCI e retroscena delle grandi classiche.
Version: 1.0.0
*/

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

:root {
    /* Mediterranean Cycling Palette (Sophisticated & Energetic) */
    --primary: #FFB7C5;        /* Maglia Rosa */
    --secondary: #0092D0;      /* Italian Sky Blue (Azzurro) */
    --accent: #FFD700;         /* Winner Gold */
    --black: #1A1A1A;          /* Carbon Fiber */
    --white: #FFFFFF;
    --bg-light: #FDFCFB;
    --text-main: #2D3436;
    --text-muted: #636E72;
    --border: #E8E8E8;
    
    --container-width: 1200px;
    --content-width: 850px;
    --transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);

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

/* Global Reset - Axis V-D: Colored Backgrounds */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* Fluid Typography - Rule 14 & Rule 22 */
h1, h2, h3, .logo, .footer-logo {
    overflow-wrap: break-word;
    font-family: 'Playfair Display', serif;
    font-weight: 900;
}

h1 { font-size: clamp(2.5rem, 10vw, 8rem); line-height: 1; color: var(--black); margin-bottom: 2.5rem; text-wrap: balance; }
h2 { font-size: clamp(2rem, 7vw, 5rem); line-height: 1.1; color: var(--secondary); margin-bottom: 3.5rem; }
h3 { font-size: clamp(1.5rem, 4vw, 2.8rem); line-height: 1.2; color: var(--black); }

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

img { max-width: 100%; height: auto; display: block; filter: saturate(1.1); }

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

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

/* DNA N-C: Always Hamburger Header (Italian Style) */
.site-header {
    background: var(--white);
    padding: 2rem 0;
    position: fixed;
    top: 0; width: 100%;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

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

.logo {
    font-size: clamp(1.5rem, 5vw, 3rem);
    color: var(--black);
    position: relative;
    z-index: 1001;
}
.logo span { color: var(--primary); font-style: italic; border-bottom: 3px solid var(--secondary); }

/* N-C: Hidden nav always, centered overlay */
.main-nav {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    z-index: 999;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.main-nav.is-active { display: flex; animation: fadeIn 0.3s forwards; }
.main-nav ul { list-style: none; display: flex; flex-direction: column; gap: 3rem; }
.main-nav a { font-family: 'Playfair Display'; font-size: 4.5rem; color: var(--black); font-weight: 900; }
.main-nav a:hover { color: var(--secondary); transform: scale(1.05); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.nav-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 8px; width: 45px; height: 45px;
    background: var(--secondary); border: none; cursor: pointer; position: relative; z-index: 1001;
    padding: 12px; transition: var(--transition);
}
.nav-toggle span { width: 100%; height: 2px; background: var(--white); display: block; transition: var(--transition); }
.nav-toggle.is-active { background: var(--primary); }
.nav-toggle.is-active span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

/* DNA H-B: Split-screen Hero 50/50 */
.hero-ciclismo {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    padding-top: 80px;
}
.hero-split { display: grid; grid-template-columns: 1fr 1fr; width: 100%; min-height: calc(100vh - 80px); }
.hero-text { 
    padding: 5rem; background: var(--bg-light); display: flex; flex-direction: column; justify-content: center;
}
.hero-image { position: relative; overflow: hidden; background: var(--black); min-height: 100%; }
.hero-image img { width: 100%; height: 100%; object-fit: cover; }

.btn-peloton {
    display: inline-block;
    padding: 1.5rem 4.5rem;
    background: var(--black);
    color: var(--white);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.9rem;
}
.btn-peloton:hover { background: var(--secondary); transform: translateY(-5px); }

/* DNA D-A: Diagonal Sections */
.skewed-section {
    position: relative;
    overflow: hidden;
    padding: var(--section-pad) 0;
}
.skewed-content { position: relative; z-index: 2; }
.skewed-bg { 
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; 
    background: var(--primary); transform: skewY(-3deg) translateY(-10%); z-index: 1; 
}

/* DNA F-A: Horizontal Stripes (Vantaggi) */
.ciclismo-benefits { background: var(--white); }
.benefit-row {
    display: flex; align-items: center; gap: 6rem; padding: 6rem 0; border-bottom: 1px solid var(--border);
}
.benefit-row:last-child { border-bottom: none; }
.benefit-icon { font-family: 'Playfair Display'; font-size: 6rem; line-height: 1; color: var(--secondary); opacity: 0.2; flex-shrink: 0; }
.benefit-content h3 { color: var(--secondary); margin-bottom: 1.5rem; }

/* DNA U-B: Method + Visual */
.method-block {
    padding: var(--section-pad) 0;
    background: var(--secondary);
    color: var(--white);
}
.method-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6rem; align-items: center; }
.method-image img { border: 15px solid var(--white); }
.method-text h2 { color: var(--primary); border: none; padding: 0; }

/* Posts Grid - Axis C-B: Horizontal Cards */
.posts-section { padding: var(--section-pad) 0; background: var(--white); }
.ciclismo-grid { display: grid; grid-template-columns: 1fr; gap: 4rem; margin-bottom: 8rem; }

.post-card-horiz {
    display: grid;
    grid-template-columns: 450px 1fr;
    gap: 4rem;
    align-items: center;
    background: var(--white);
    transition: var(--transition);
}
.post-card-horiz:hover { transform: translateX(20px); }
.post-card-horiz .thumb { height: 300px; overflow: hidden; }
.post-card-horiz .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card-horiz h3 { font-size: 2.2rem; margin-bottom: 2rem; color: var(--black); }

.btn-read {
    font-weight: 700;
    text-transform: uppercase;
    color: var(--secondary);
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 0.5rem;
}

/* Pagination - Mediterranean Style */
.pagination { display: flex; justify-content: center; align-items: center; gap: 2rem; margin-top: 8rem; }
.pagination .page-numbers {
    font-family: 'Playfair Display';
    font-weight: 900;
    font-size: 2.5rem;
    color: var(--text-muted);
}
.pagination a.page-numbers:hover { color: var(--secondary); }
.pagination span.current { color: var(--primary); border-bottom: 5px solid var(--secondary); }

/* DNA FT-B: Two-column Footer */
.site-footer {
    background: var(--black);
    color: var(--white);
    padding: 10rem 0 5rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: clamp(2rem, 5vw, 8rem);
    margin-bottom: 8rem;
}
.footer-logo { font-size: clamp(2rem, 6vw, 5rem); color: var(--primary); margin-bottom: 3rem; overflow-wrap: anywhere; }
.footer-logo span { color: var(--white); }
.footer-desc { color: rgba(255,255,255,0.6); line-height: 1.8; max-width: 100%; overflow-wrap: break-word; }

.footer-nav ul { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.footer-nav a { font-weight: 600; color: var(--white); text-transform: uppercase; font-size: 0.9rem; }
.footer-nav a:hover { color: var(--primary); }

.footer-bottom {
    padding-top: 4rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex; justify-content: space-between; font-size: 0.75rem; color: rgba(255,255,255,0.3);
}

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

/* Responsive */
@media (max-width: 1024px) {
    .hero-split { grid-template-columns: 1fr; }
    .hero-image { height: 450px; order: -1; }
    .method-grid { grid-template-columns: 1fr; gap: 4rem; text-align: center; }
    .post-card-horiz { grid-template-columns: 300px 1fr; }
}

@media (max-width: 768px) {
    .hero-text { padding: 4rem 2rem; }
    .benefit-row { flex-direction: column; gap: 2rem; text-align: center; }
    .post-card-horiz { grid-template-columns: 1fr; gap: 2rem; }
    .post-card-horiz .thumb { height: 250px; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 3rem; text-align: center; }
    .main-nav a { font-size: 2.5rem; }
}
