/*
Theme Name: torneobabini.it
Author: torneobabini
Description: portale informativo, analisi delle scommesse, guide, recensioni
Version: 1.0.0
*/

@import url('https://fonts.googleapis.com/css2?family=Crimson+Pro:ital,wght@0,400;0,700;1,400;1,700&family=Manrope:wght@300;400;500;700;800&display=swap');

:root {
    --primary: #4a148c;
    --secondary: #9e9e9e;
    --accent: #6a1b9a;
    --bg-main: #faf5ff;
    --text-main: #1a1a2e;
    --border: #9e9e9e;
    
    --sidebar-width: 240px;
    --container-width: 1200px;
    --content-width: 800px;
    --transition: all 0.3s ease;
    --radius: 0px;

    --section-pad: clamp(5rem, 12vw, 10rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

h1, h2, h3, .logo, .btn-arc {
    font-family: 'Crimson Pro', serif;
    font-weight: 700;
    line-height: 1.2;
    overflow-wrap: break-word;
    word-break: break-word;
}

h1 { font-size: clamp(2rem, 8vw, 4.5rem); margin-bottom: 2rem; }
h2 { font-size: clamp(1.8rem, 5vw, 3.5rem); margin-bottom: 3rem; text-align: left; }
h3 { font-size: 1.6rem; margin-bottom: 1rem; }

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

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

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

/* V-C: Thin divider lines */
.thin-divider {
    border-top: 1px solid var(--border);
    margin: 2rem 0;
    opacity: 0.5;
}

/* N-B: Fixed sidebar left 240px */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-main);
    border-right: 1px solid var(--border);
    z-index: 100;
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.site-main {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.logo {
    display: inline-flex !important;
    flex-direction: column;
    align-items: flex-start;
    font-size: 2rem !important;
    color: var(--primary) !important;
    margin-bottom: 3rem;
}
.logo span { color: var(--secondary); font-style: italic; }

.main-nav ul { display: flex; flex-direction: column; list-style: none; gap: 1.5rem; }
.main-nav a { font-size: 1rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-main); }
.main-nav a:hover { color: var(--primary); }

.nav-toggle { display: none; }

/* H-D: Breakout/Asymmetric Hero */
.hero-arc {
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 0;
    background: var(--bg-main);
    margin-bottom: var(--section-pad);
}
.hero-content {
    position: relative;
    z-index: 2;
    padding: 5rem 0;
    max-width: 600px;
    margin-left: 5%;
}
.hero-bg {
    position: absolute;
    top: 10%;
    right: 0;
    width: 60%;
    height: 90%;
    z-index: 1;
}
.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn-arc {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--primary);
    color: var(--bg-main);
    border: 1px solid var(--primary);
    margin-top: 2rem;
    font-size: 1.1rem;
}
.btn-arc:hover { background: transparent; color: var(--primary); }

/* F-F: Numeric counters */
.features-section { padding: var(--section-pad) 0; }
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3rem; border-top: 1px solid var(--border); padding-top: 4rem; }
.feature-item { position: relative; }
.feature-icon { 
    font-size: 4rem;
    font-family: 'Crimson Pro', serif;
    color: var(--secondary);
    opacity: 0.3;
    line-height: 1;
    margin-bottom: 1rem;
    font-weight: 700;
}

/* U-C: Horizontal scroll — tape of cards */
.showcase-arc { padding: var(--section-pad) 0; overflow: hidden; background: var(--bg-main); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.strip-container { display: flex; gap: 2rem; overflow-x: auto; padding-bottom: 2rem; scroll-snap-type: x mandatory; scrollbar-width: none; }
.strip-container::-webkit-scrollbar { display: none; }
.strip-item { width: 350px; height: 450px; flex-shrink: 0; scroll-snap-align: start; }
.strip-item img { width: 100%; height: 100%; object-fit: cover; }

/* C-B: Horizontal — image left 35% */
.posts-section { padding: var(--section-pad) 0; }
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4rem; }

.post-card-arc { 
    display: flex;
    flex-direction: row;
    border: 1px solid var(--border);
    transition: var(--transition);
    background: transparent;
}
.post-card-arc:hover { border-color: var(--primary); }
.post-card-arc .thumb { width: 35%; position: relative; flex-shrink: 0; border-right: 1px solid var(--border); }
.post-card-arc .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card-arc .meta-tag { 
    position: absolute; top: 10px; left: 10px; background: var(--bg-main); 
    color: var(--text-main); padding: 2px 10px; font-size: 0.75rem; border: 1px solid var(--border);
}

.post-card-content { padding: 1.5rem; display: flex; flex-direction: column; justify-content: center; width: 65%; }
.post-card-content h3 { font-size: 1.2rem; margin-bottom: 1rem; }
.post-card-content p { color: var(--text-main); font-size: 0.9rem; margin-bottom: 1.5rem; opacity: 0.8; }

.pagination { display: flex; justify-content: center; gap: 1rem; margin: 5rem 0; }
.pagination .page-numbers { 
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border); background: transparent; 
    font-weight: 700; color: var(--text-main);
}
.pagination .page-numbers.current { background: var(--primary); color: var(--bg-main); border-color: var(--primary); }

/* FT-C: Three-column Footer */
.site-footer { padding: 5rem 0; border-top: 1px solid var(--border); background: var(--bg-main); }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4rem; }

.footer-logo { 
    font-family: 'Crimson Pro', serif;
    font-size: 1.8rem; 
    margin-bottom: 1.5rem; 
    color: var(--primary); 
    display: inline-flex;
    flex-direction: column;
}
.footer-logo span { color: var(--secondary); font-style: italic; }
.footer-desc { color: var(--text-main); opacity: 0.8; }

.footer-nav ul { list-style: none; }
.footer-nav li { margin-bottom: 0.8rem; }
.footer-nav a { color: var(--text-main); font-weight: 500; }
.footer-nav a:hover { color: var(--primary); }

.footer-bottom { border-top: 1px solid var(--border); margin-top: 4rem; padding-top: 2rem; display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--text-main); opacity: 0.6; }

/* Responsive Reset for N-B */
@media (max-width: 1024px) {
    .site-header {
        position: static;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 1.5rem 2rem;
    }
    .site-main { margin-left: 0; }
    .logo { margin-bottom: 0; flex-direction: row; gap: 0.5rem; }
    
    .nav-toggle { 
        display: flex; flex-direction: column; gap: 6px; cursor: pointer; z-index: 1000;
    }
    .nav-toggle span { width: 30px; height: 1px; background: var(--text-main); transition: 0.3s; }
    
    .main-nav { display: none; }
    body.menu-open .main-nav {
        display: flex; position: fixed; inset: 0; background: var(--bg-main); 
        z-index: 999; align-items: center; justify-content: center;
    }
    body.menu-open .main-nav ul { flex-direction: column; align-items: center; gap: 2rem; }
    body.menu-open .main-nav a { font-size: 1.5rem; }
}

@media (max-width: 1200px) {
    .posts-grid { grid-template-columns: repeat(2, 1fr); }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .posts-grid { grid-template-columns: 1fr; }
    .post-card-arc { flex-direction: column; }
    .post-card-arc .thumb { width: 100%; height: 200px; border-right: none; border-bottom: 1px solid var(--border); }
    .post-card-content { width: 100%; }
    .features-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .hero-bg { position: relative; width: 100%; height: 40vh; top: 0; }
    .hero-content { margin-left: 0; padding: 3rem 2rem; }
}

/* RULE 21 FIX */
.post-card-arc {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}
.post-card-arc .thumb {
    display: block !important;
    height: clamp(180px, 25vw, 300px) !important;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}
.post-card-arc .thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}
.post-card-content {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
}
.post-card-content h3 {
    flex-grow: 1 !important;
}
.btn-read, .read-more-link {
    margin-top: auto !important;
}

.logo, .footer-logo { flex-wrap: wrap !important; }

/* FIX HERO OVERLAP RULE 16 */
.site-main > section:first-child {
    padding-top: clamp(140px, 15vh, 180px) !important;
}
.hero-split {
    padding-top: 0 !important;
}
.hero-split .hero-text {
    padding-top: clamp(140px, 15vh, 180px) !important;
}


.hero-arc {
    height: auto !important;
    min-height: max(400px, 50vh) !important;
}

