/* =========================================
   EMINFLEX.CSS - STILI UNIFICATI
   OTTIMIZZATO PER RENDERING PROGRESSIVO
   ========================================= */

/* =========================================
   1. VARIABLES & SETUP
   ========================================= */
:root {
    /* Brand Colors - Eminflex Style */
    --brand-yellow: #FFD200;      /* Giallo Iconico */
    --brand-yellow-dark: #e6bd00;
    --brand-black: #1a1a1a;       /* Nero Profondo */
    --brand-dark-grey: #333333;   /* Grigio Tecnico */
    --brand-light-grey: #f4f4f4;  /* Sfondo Tecnico */
    --brand-white: #ffffff;
    --brand-blue: #0056b3;        /* Blu Trust/Link */
    
    /* Functional Colors */
    --text-main: #1a1a1a;
    --text-muted: #555555;
    --success: #28a745;
    --error: #dc3545;
    
    /* Layout & Spacing */
    --container-width: 1200px;
    --header-height: 70px;
    
    /* Borders & Radius */
    --border-width: 2px;
    --border-color-strong: #e0e0e0;
    --radius-sm: 4px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-pill: 50px;
    
    /* Shadows */
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 10px 20px -3px rgba(0, 0, 0, 0.12);
    --shadow-tech: 0 0 0 1px rgba(0,0,0,0.05), 0 2px 8px rgba(0,0,0,0.08);
    
    /* Transitions */
    --trans-fast: 0.2s ease;
    --trans-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset Ultraleggero */
*, *::before, *::after { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

html { 
    font-size: 100%; 
    scroll-behavior: smooth; 
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    background-color: var(--brand-white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { 
    max-width: 100%; 
    height: auto; 
    display: block; 
}

a { 
    text-decoration: none; 
    color: inherit; 
    transition: var(--trans-fast); 
}

ul { 
    list-style: none; 
}




/* =========================================
   2. LAYOUT & UTILITIES
   ========================================= */
.container { 
    width: 100%; 
    max-width: var(--container-width); 
    margin: 0 auto; 
    padding: 0 1.25rem; 
}

/* Spaziature uniformi per tutte le section */
section, .section, .quiz-sezione, .pagina-sezione {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* Distacco Hero - Prima Sezione */
.hero + section, 
.quiz-hero + section, 
.servizi-hero + section, 
.superquiz-hero + section,
.hero + div > section {
    margin-top: 1.5rem;
}

/* Distacco ultima section dal footer */
main > section:last-of-type,
main > div > section:last-of-type {
    margin-bottom: 2rem;
}

/* Utility di spacing */
.options-grid {
    margin-top: 1.5rem;
}

.section-header, .sezione-header { 
    text-align: center; 
    margin-bottom: 3rem; 
}

.section-header h2, .sezione-header h2 { 
    font-size: 2rem; 
    font-weight: 800; 
    color: var(--brand-black); 
    margin-bottom: 0.5rem; 
}

/* Base Grid System */
.grid, .trust-grid, .mappa-grid, .quiz-grid, .servizi-grid, 
.tech-specs-grid, .position-grid, .material-grid, .firmness-grid, 
.accessory-grid, .change-grid, .practical-choice-grid, .sezione-servizi-grid,
.intro-grid, .product-grid, .container-bottom-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

/* Grid Responsive */
@media (min-width: 600px) {
    .trust-grid, .mappa-grid, .quiz-grid, .tech-specs-grid, .position-grid { 
        grid-template-columns: repeat(2, 1fr); 
    }
    .grid { 
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    }
    .options-grid { 
        grid-template-columns: repeat(2, 1fr); 
    }
}

@media (min-width: 768px) {
    .container-bottom-a, .container-bottom-b { 
        display: grid; 
        grid-template-columns: repeat(2, 1fr); 
        gap: 1.5rem; 
    }
}

@media (min-width: 992px) {
    .trust-grid, .mappa-grid, .practical-choice-grid { 
        grid-template-columns: repeat(4, 1fr); 
    }
    .quiz-grid, .sezione-servizi-grid { 
        grid-template-columns: repeat(3, 1fr); 
    }
    .intro-grid { 
        grid-template-columns: repeat(4, 1fr); 
    }
}

/* Griglie specifiche */
.intro-grid {
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 3rem;
}

.doors-wrapper { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); 
    gap: 1rem; 
    margin-top: 2rem; 
}

.container-bottom-grid {
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    margin-bottom: 3rem;
}

.product-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* =========================================
   3. HEADER & NAVIGATION
   ========================================= */
.site-header {
    background: var(--brand-white);
    border-bottom: 3px solid var(--brand-yellow);
    position: sticky; 
    top: 0; 
    z-index: 1000;
    height: var(--header-height);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header-wrapper { 
    height: 100%; 
}

.navbar, .nav-container {
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    height: 100%;
}

.nav-logo img { 
    max-height: 45px; 
    width: auto; 
}

/* Mobile Menu */
.hamburger { 
    display: block; 
    cursor: pointer; 
    padding: 10px; 
}

.bar {
    display: block; 
    width: 25px; 
    height: 3px; 
    margin: 5px auto;
    background-color: #888888; /* Grigio medio */
    transition: 0.3s;
}

.hamburger.active .bar:nth-child(2) { 
    opacity: 0; 
}

.hamburger.active .bar:nth-child(1) { 
    transform: translateY(8px) rotate(45deg); 
}

.hamburger.active .bar:nth-child(3) { 
    transform: translateY(-8px) rotate(-45deg); 
}

.nav-menu {
    position: fixed; 
    top: var(--header-height); 
    left: -100%; 
    width: 100%;
    height: calc(100vh - var(--header-height));
    background: var(--brand-white);
    flex-direction: column; 
    align-items: center; 
    padding-top: 2rem;
    transition: 0.3s ease; 
    display: flex; 
    border-top: 1px solid #eee; 
    overflow-y: auto;
}

.nav-menu.active { 
    left: 0; 
}

.nav-link {
    font-size: 1.2rem; 
    font-weight: 700; 
    color: var(--brand-black);
    padding: 1rem; 
    text-transform: uppercase; 
    width: 100%; 
    text-align: center;
    border-bottom: 1px solid var(--brand-light-grey);
}

@media (min-width: 992px) {
    .hamburger { 
        display: none; 
    }
    .nav-menu {
        position: static; 
        flex-direction: row; 
        height: auto; 
        width: auto;
        background: none; 
        border: none; 
        padding: 0; 
        gap: 1.5rem; 
        overflow-y: visible;
    }
    .nav-link { 
        font-size: 0.9rem; 
        padding: 0; 
        text-transform: none; 
        border: none; 
        width: auto; 
    }
    .nav-link:hover { 
        color: var(--brand-blue); 
        border-bottom: 2px solid var(--brand-yellow); 
    }
}


/* =========================================
   4. HERO SECTIONS
   ========================================= */
.hero, .servizi-hero, .superquiz-hero {
    background: radial-gradient(circle at top right, #f8f8f8 0%, #e0e0e0 100%);
    padding: 4rem 0; 
    position: relative; 
    overflow: hidden;
}

/* Quiz Hero - variante scura */
.quiz-hero {
    background: radial-gradient(circle at top right, #f8f8f8 0%, #e0e0e0 100%);
    padding: 4rem 0; 
    position: relative; 
    overflow: hidden;
}

.superquiz-hero { 
    background: var(--brand-black); 
    color: white; 
}

.servizi-hero {
    text-align: center;
    padding: 40px 20px;
}

/* Hero Centrata per Quiz */
.quiz-hero .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.quiz-hero .hero-text {
    text-align: center;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.hero-content { 
    display: grid; 
    gap: 2rem; 
    align-items: center; 
}

.hero-text { 
    text-align: center; 
}

.hero-title {
    font-size: 2.2rem; 
    font-weight: 900; 
    line-height: 1.1; 
    margin-bottom: 1rem;
    color: var(--brand-black); 
    text-transform: uppercase;
}

.quiz-hero h1,
.servizi-hero h1 {
    font-size: 2.2rem; 
    font-weight: 900; 
    line-height: 1.1; 
    margin-bottom: 1rem;
    color: var(--brand-black); 
    text-transform: uppercase;
}

.superquiz-hero h1 { 
    font-size: 2.2rem; 
    font-weight: 900; 
    line-height: 1.1; 
    margin-bottom: 1rem;
    color: var(--brand-yellow); 
    text-transform: uppercase;
}

.servizi-hero h1 {
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.1rem; 
    color: var(--text-muted); 
    margin-bottom: 2rem;
    max-width: 700px; 
    margin-left: auto; 
    margin-right: auto;
}

.sezione-sottotitolo {
    font-size: 1.1rem; 
    color: var(--text-muted); 
    margin-bottom: 2rem;
    max-width: 700px; 
    margin-left: auto; 
    margin-right: auto;
}

.servizi-hero .hero-subtitle {
    max-width: 800px;
    margin: 0 auto;
}

.superquiz-hero .hero-subtitle { 
    color: #cccccc; 
}

.hero-buttons { 
    display: flex; 
    flex-direction: column; 
    gap: 1rem; 
    align-items: center; 
}

.hero-badge { 
    display: flex; 
    justify-content: center; 
    gap: 0.5rem; 
    flex-wrap: wrap; 
    margin-top: 1rem; 
}

@media (min-width: 768px) {
    .hero-content { 
        grid-template-columns: 1fr 1fr; 
        text-align: left; 
    }
    .hero-text { 
        text-align: left; 
    }
    .hero-buttons { 
        flex-direction: row; 
    }
    
    .hero-title,
    .quiz-hero h1,
    .servizi-hero h1,
    .superquiz-hero h1 { 
        font-size: 3rem; 
    }
    
    .hero-subtitle,
    .sezione-sottotitolo { 
        margin-left: 0; 
    }
}

/* =========================================
   5. BUTTONS & BADGES
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    font-weight: 700;
    font-size: 1rem;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--trans-fast);
    border: 2px solid transparent;
    text-align: center;
}

.btn-primary, .btn.primary {
    background-color: var(--brand-yellow);
    color: var(--brand-black);
    box-shadow: 0 4px 0 var(--brand-yellow-dark);
}

.btn-primary:active, .btn.primary:active {
    transform: translateY(4px);
    box-shadow: none;
}

.btn-primary:hover, .btn.primary:hover {
    background-color: #ffdb33;
}

.btn-secondary, .btn.secondary {
    background-color: var(--brand-black);
    color: var(--brand-white);
    box-shadow: 0 4px 0 #000;
}

.btn-secondary:active, .btn.secondary:active { 
    transform: translateY(4px); 
    box-shadow: none; 
}

.btn-large { 
    padding: 1rem 2.5rem; 
    font-size: 1.125rem; 
}

.btn-outline-light {
    background: transparent;
    border: 2px solid var(--brand-white);
    color: var(--brand-white);
}

.btn-outline-light:hover { 
    background: var(--brand-white); 
    color: var(--brand-black); 
}

/* Card Buttons - Versione unificata */
.btn-card {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 60px;
    background: #ffffff !important;
    border: 2px solid #e0e0e0 !important;
    color: #333333 !important;
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 12px !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    padding: 0.5rem 1rem;
}

.btn-card:hover {
    border-color: #FFD200 !important;
    background-color: #fffdf5 !important;
    color: #000000 !important;
    transform: translateY(-4px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.btn-card::after {
    content: ' ›';
    font-size: 1.2rem;
    color: #FFD200;
    margin-left: 5px;
    transition: transform 0.3s;
}

.btn-card:hover::after {
    transform: translateX(3px);
}

/* Quiz Next Button */
.btn-next {
    background-color: var(--brand-black);
    color: var(--brand-white);
    padding: 12px 40px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    cursor: pointer;
    display: none;
    transition: transform 0.2s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.btn-next:hover {
    transform: translateY(-2px);
    background-color: #333;
}

.btn-next.visible {
    display: inline-block;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* Social Share Buttons - Versione unificata */
/* =========================================
   5. BUTTONS & BADGES (sezione aggiornata)
   ========================================= */

/* ... (tutto il resto rimane uguale) ... */

/* Social Share - DOPPIO STILE */
.share-buttons, .social-share-container { 
    display: flex; 
    gap: 10px; 
    flex-wrap: wrap; 
    margin-top: 1rem; 
    justify-content: center; 
}

.social-share-container {
    align-items: center;
    gap: 12px;
    margin: 2rem 0;
    padding: 1rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.social-share-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 8px;
}

/* Stile 1: Pulsanti rettangolari con testo (esistenti) */
.btn-share {
    padding: 0.5rem 1.2rem;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    border: none;
}

.facebook { background-color: #1877f2; }
.whatsapp { background-color: #25d366; }
.twitter { background-color: #1da1f2; }

/* Stile 2: Pulsanti rotondi con solo icona - COLORATI SUBITO */
.social-share-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    text-decoration: none;
    color: white; /* Testo/icona bianco */
    border: none; /* Rimuoviamo il bordo */
}

/* Colori specifici per ogni social - APPLICATI SUBITO, non solo hover */
.social-share-btn.social-facebook {
    background: #1877f2;
}

.social-share-btn.social-whatsapp {
    background: #25d366;
}

.social-share-btn.social-linkedin {
    background: #0077b5;
}

.social-share-btn.social-twitter {
    background: #1da1f2;
}

.social-share-btn.social-pinterest {
    background: #bd081c;
}

.social-share-btn.social-telegram {
    background: #0088cc;
}

.social-share-btn.social-email {
    background: #6c757d;
}

/* Effetto hover uniforme per tutti */
.social-share-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    filter: brightness(1.1); /* Leggermente più brillante all'hover */
}

/* Icone nei pulsanti rotondi */
.social-icon {
    width: 24px;
    height: 24px;
    display: block;
    fill: currentColor; /* Per SVG */
}

/* Badges */
.badge, .stat-badge, .quiz-tag, .profile-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge { 
    background: white; 
    border: 1px solid var(--border-color-strong); 
}

.badge-neon, .profile-badge {
    background: var(--brand-black); 
    color: var(--brand-yellow);
    padding: 5px 15px; 
    border-radius: 4px; 
    letter-spacing: 1px;
}

.profile-badge {
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 1rem;
}

.highlight { 
    background: linear-gradient(120deg, rgba(255,210,0,0.5) 0%, rgba(255,210,0,0.1) 100%); 
    padding: 0 5px; 
}

/* =========================================
   6. CARDS - TUTTI I TIPI
   ========================================= */
/* Common Card Style */
.trust-card, .mappa-card, .quiz-card, .intro-card, .servizio-card, 
.sezione-servizio-card, .door, .product-card, .bottom-a.card, .option-card,
.result-box {
    background: white;
    border: var(--border-width) solid var(--border-color-strong);
    border-radius: var(--radius-md);
    transition: var(--trans-smooth);
}

.trust-card:hover, .mappa-card:hover, .quiz-card:hover, 
.servizio-card:hover, .sezione-servizio-card:hover, .door:hover,
.product-card:hover, .bottom-a.card:hover, .option-card:hover {
    border-color: var(--brand-yellow);
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

/* Trust Card */
.trust-card { 
    padding: 2rem 1.5rem; 
    text-align: center; 
    border-bottom: 4px solid var(--brand-yellow); 
}

.trust-icon {
    font-size: 2.5rem; 
    margin-bottom: 1rem; 
    display: inline-flex;
    width: 60px; 
    height: 60px; 
    align-items: center; 
    justify-content: center;
    background: var(--brand-light-grey); 
    border-radius: 50%;
}

/* Mappa Card (A, B, C, D) */
.mappa-card { 
    position: relative; 
    overflow: hidden; 
    display: flex; 
    flex-direction: column; 
    height: 100%; 
}

.mappa-lettera {
    position: absolute; 
    top: 0; 
    left: 0; 
    background: var(--brand-yellow);
    color: var(--brand-black); 
    width: 40px; 
    height: 40px;
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-weight: 900; 
    font-size: 1.2rem; 
    border-bottom-right-radius: var(--radius-md);
}

.mappa-contenuto { 
    padding: 3rem 1.5rem 1.5rem; 
    flex-grow: 1; 
    display: flex; 
    flex-direction: column; 
}

.mappa-link { 
    margin-top: auto; 
    color: var(--brand-blue); 
    font-weight: 700; 
    font-size: 0.9rem; 
    text-transform: uppercase; 
}

/* Intro Card */
.intro-card {
    padding: 1.5rem; 
    text-align: center; 
    display: block;
    color: var(--text-main);
}

.intro-icon { 
    font-size: 2rem; 
    display: block; 
    margin-bottom: 0.5rem; 
}

.intro-card h3 { 
    font-size: 1rem; 
    font-weight: 700; 
    margin-bottom: 0.5rem; 
}

.intro-card p { 
    font-size: 0.85rem; 
    color: var(--text-muted); 
    margin-bottom: 1rem; 
    line-height: 1.3; 
}

.quiz-link, .quiz-link-small { 
    color: var(--brand-blue); 
    font-weight: 700; 
    font-size: 0.9rem; 
}

/* Doors (Portale Sonno) */
.door { 
    padding: 1.5rem 1rem; 
    text-align: center; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
}

.door-icon { 
    font-size: 2rem; 
    margin-bottom: 0.5rem; 
}

/* Quiz Card */
.quiz-card { 
    text-align: center; 
    height: 100%; 
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
}

.quiz-card-content {
    padding: 2.5rem 1.5rem 1.5rem;
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    flex-grow: 1;
    position: relative;
}

.quiz-tag {
    position: absolute; 
    top: 1rem; 
    right: 1rem;
    background: #eef; 
    color: var(--brand-blue);
}

.quiz-icon {
    font-size: 3rem; 
    margin-bottom: 1rem; 
    display: inline-flex;
    width: 80px; 
    height: 80px; 
    align-items: center; 
    justify-content: center;
    background: var(--brand-light-grey); 
    border-radius: 50%;
}

.quiz-card h3 { 
    font-size: 1.25rem; 
    font-weight: 800; 
    margin-bottom: 0.75rem; 
}

.quiz-footer {
    width: 100%; 
    padding: 1rem; 
    background: #fafafa;
    border-top: 1px solid var(--border-color-strong);
    font-weight: 700; 
    color: var(--brand-blue); 
    text-transform: uppercase; 
    font-size: 0.9rem;
}

.quiz-card:hover .quiz-footer { 
    background: var(--brand-yellow); 
    color: var(--brand-black); 
}

/* Sezione Servizio Card */
.sezione-servizio-card {
    background: white; 
    padding: 2.5rem 2rem 2rem;
    border-radius: var(--radius-md); 
    position: relative; 
    text-align: center;
    border-top: 4px solid var(--brand-yellow);
}

.sezione-servizio-card .card-badge {
    position: absolute; 
    top: -15px; 
    left: 50%; 
    transform: translateX(-50%);
    background: var(--brand-black); 
    color: var(--brand-yellow);
    padding: 0.5rem 1rem; 
    border-radius: 50px; 
    font-weight: 800; 
    font-size: 1rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.sezione-servizio-card h3 { 
    margin: 1rem 0; 
    font-size: 1.3rem; 
    color: var(--brand-black); 
}

.sezione-servizio-card p { 
    color: var(--text-muted); 
    margin-bottom: 1.5rem; 
}

/* Product Card */
.product-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.product-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.product-card .card-content {
    padding: 1.5rem;
}

/* Bottom Card */
.bottom-a.card {
    height: 100%;
    overflow: hidden;
}

.bottom-a .card-header {
    background: var(--brand-black);
    color: var(--brand-yellow);
    padding: 1rem;
    font-size: 1.1rem;
    text-align: center;
    margin: 0;
}

.bottom-a .card-body {
    padding: 1.5rem;
}

/* Option Card (Quiz) */
.option-card {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.option-card:hover {
    border-color: #ddd;
    background-color: #f9f9f9;
}

.option-card.selected {
    border-color: var(--brand-black);
    background-color: var(--brand-yellow);
    box-shadow: 0 4px 12px rgba(255, 210, 0, 0.3);
    transform: scale(1.02);
    font-weight: 700;
}

.option-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.option-icon { 
    font-size: 1.8rem; 
}

.option-text { 
    font-size: 1rem; 
    line-height: 1.3; 
}

/* Result Box */
.result-box {
    border: 2px solid var(--brand-black);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

/* =========================================
   7. QUIZ SECTION & SUPERQUIZ
   ========================================= */
.quiz-sezione { 
    background: white; 
    padding: 4rem 0; 
}

.quiz-sezione.alt { 
    background: var(--brand-light-grey); 
}

/* Quiz Container e Steps */
.quiz-wrapper {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    min-height: 400px;
}

.quiz-step {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.quiz-step.active {
    display: block;
    opacity: 1;
    animation: fadeIn 0.4s ease-out forwards;
}

/* Progress Bar */
.progress-container {
    background-color: var(--brand-light-grey);
    border-radius: var(--radius-pill);
    height: 12px;
    margin-bottom: 2rem;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.progress-bar {
    background-color: var(--brand-yellow);
    height: 100%;
    width: 20%;
    transition: width 0.4s ease;
}

/* Next Button Container */
.next-btn-container {
    margin-top: 2rem;
    text-align: center;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Header Sezione Centrato */
.quiz-sezione .sezione-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    margin-bottom: 3rem;
}

.quiz-sezione .sezione-lettera {
    width: 50px; 
    height: 50px; 
    font-size: 1.5rem; 
    margin-bottom: 0.5rem;
    background: var(--brand-black); 
    color: var(--brand-yellow);
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-weight: 900; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.quiz-sezione h2 { 
    font-size: 2rem; 
    margin: 0; 
    color: var(--brand-black); 
}

.quiz-sezione p { 
    font-size: 1.1rem; 
    color: var(--text-muted); 
}

/* SUPERQUIZ */
.superquiz { 
    background: var(--brand-light-grey); 
}

.superquiz-form fieldset {
    border: none; 
    margin-bottom: 2.5rem; 
    background: white; 
    padding: 1.5rem;
    border-radius: var(--radius-md); 
    box-shadow: var(--shadow-card);
}

.superquiz-form legend {
    font-size: 1.25rem; 
    font-weight: 800; 
    margin-bottom: 1rem;
    width: 100%; 
    border-bottom: 2px solid var(--brand-yellow); 
    padding-bottom: 0.5rem;
}

.superquiz-form label {
    display: flex; 
    align-items: center; 
    padding: 12px; 
    margin-bottom: 8px;
    border: 1px solid #ddd; 
    border-radius: var(--radius-sm); 
    cursor: pointer; 
    transition: 0.2s;
}

.superquiz-form label:hover { 
    background: #fdfdfd; 
    border-color: #ccc; 
}

.superquiz-form input[type="radio"] {
    appearance: none; 
    width: 22px; 
    height: 22px; 
    border: 2px solid #999;
    border-radius: 50%; 
    margin-right: 15px; 
    flex-shrink: 0; 
    position: relative;
}

.superquiz-form input[type="radio"]:checked {
    border-color: var(--brand-black); 
    background: var(--brand-yellow);
}

.superquiz-form input[type="radio"]:checked + label, 
.superquiz-form label:has(input:checked) {
    background: #fffce6; 
    border-color: var(--brand-yellow); 
    font-weight: bold;
}

/* Results */
.superquiz-result { 
    padding: 2rem 0; 
    display: none; 
}

.result-card {
    background: white; 
    padding: 2.5rem; 
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1); 
    border-top: 10px solid var(--brand-yellow); 
    text-align: center;
}

.result-diagnosi {
    background: var(--brand-black); 
    color: white; 
    padding: 1.5rem;
    border-radius: var(--radius-md); 
    margin: 2rem 0;
}

.result-diagnosi h3 { 
    color: var(--brand-yellow); 
    margin-bottom: 0.5rem; 
}

/* CTA Box */
.cta-box {
    background: var(--brand-black); 
    color: white; 
    padding: 3rem;
    border-radius: var(--radius-md); 
    text-align: center; 
    margin-top: 2rem;
    background-image: linear-gradient(45deg, #1a1a1a 25%, #2a2a2a 25%, #2a2a2a 50%, #1a1a1a 50%, #1a1a1a 75%, #2a2a2a 75%, #2a2a2a 100%);
    background-size: 20px 20px;
}

.cta-box h2 { 
    color: var(--brand-yellow); 
}

/* Fix per sezioni con gradienti inline */
section[style*="linear-gradient"] {
    background: linear-gradient(135deg, #FFD200 0%, #FFB700 100%) !important;
    position: relative;
    overflow: hidden;
}

section[style*="linear-gradient"]::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(rgba(0,0,0,0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
}

section[style*="linear-gradient"] h2,
section[style*="linear-gradient"] p {
    color: #1a1a1a !important; 
    text-shadow: none !important;
}

section[style*="linear-gradient"] .btn {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
    border: 2px solid #1a1a1a !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2) !important;
}

section[style*="linear-gradient"] .btn:hover {
    background-color: white !important;
    color: #1a1a1a !important;
    transform: translateY(-3px);
}

/* =========================================
   8. SERVICES & DETAIL PAGES
   ========================================= */
.pagina-sezione .sezione-header {
    text-align: center; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    margin-bottom: 3rem;
}

.pagina-sezione .sezione-lettera {
    font-size: 2rem; 
    width: 60px; 
    height: 60px; 
    margin-bottom: 1rem;
    background: var(--brand-yellow); 
    color: var(--brand-black);
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-weight: 900;
}

.intro-box {
    background: var(--brand-light-grey); 
    padding: 2rem;
    border-radius: var(--radius-md); 
    border-left: 5px solid var(--brand-black);
    margin-bottom: 3rem; 
    text-align: center;
}

/* Tech Specs & Details */
.tech-specs { 
    background: var(--brand-light-grey); 
    padding: 2rem; 
    border-radius: var(--radius-md); 
}

.spec-item { 
    background: white; 
    padding: 1rem; 
    border-radius: var(--radius-sm); 
    text-align: center; 
    border: 1px solid #ddd; 
}

.spec-item strong { 
    display: block; 
    color: var(--brand-black); 
    font-size: 1.1rem; 
}

.spec-item span { 
    color: var(--text-muted); 
    font-size: 0.9rem; 
}

.bonus-box {
    background: #fffbe6; 
    border: 1px solid var(--brand-yellow);
    padding: 1.5rem; 
    border-radius: var(--radius-md); 
    margin-top: 2rem;
    display: flex; 
    flex-wrap: wrap; 
    align-items: center; 
    justify-content: space-between; 
    gap: 1rem;
}

/* Fix per griglia bottoni servizi */
section[style*="background: white"] .grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
    gap: 1rem !important;
}

/* =========================================
   9. PURE CSS ACCORDION (FAQ & POPUPS)
   ========================================= */
/* FAQ Style */
details.faq-accordion {
    background: white; 
    border: var(--border-width) solid var(--border-color-strong);
    border-radius: var(--radius-md); 
    margin-bottom: 1rem; 
    overflow: hidden;
    transition: all 0.3s ease;
}

details.faq-accordion summary {
    padding: 1.2rem; 
    font-weight: 700; 
    cursor: pointer; 
    list-style: none;
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    background: white; 
    color: var(--brand-black);
}

details.faq-accordion summary::-webkit-details-marker { 
    display: none; 
}

details.faq-accordion summary::after {
    content: '+'; 
    font-size: 1.5rem; 
    color: var(--brand-yellow); 
    font-weight: 900; 
    transition: transform 0.3s ease;
}

details.faq-accordion[open] summary { 
    background: var(--brand-light-grey); 
    border-bottom: 1px solid var(--border-color-strong); 
}

details.faq-accordion[open] summary::after { 
    content: '−'; 
    color: var(--brand-black); 
    transform: rotate(180deg); 
}

details.faq-accordion .faq-content, .faq-answer {
    padding: 1.5rem; 
    color: var(--text-muted); 
    line-height: 1.6; 
    background: white;
    animation: slideDown 0.3s ease-out;
}

/* Inline Popups (Definitions) */
details.inline-popup { 
    display: inline-block; 
    position: relative; 
    vertical-align: middle; 
}

details.inline-popup summary {
    list-style: none; 
    cursor: help; 
    border-bottom: 2px dashed var(--brand-yellow);
    color: var(--brand-black); 
    font-weight: 600; 
    display: inline;
}

details.inline-popup summary::-webkit-details-marker { 
    display: none; 
}

details.inline-popup[open] summary { 
    background-color: var(--brand-yellow); 
    color: black; 
    border-bottom: none; 
}

details.inline-popup .popup-content {
    position: absolute; 
    bottom: 120%; 
    left: 50%; 
    transform: translateX(-50%);
    width: 250px; 
    background: var(--brand-black); 
    color: white; 
    padding: 1rem;
    border-radius: var(--radius-md); 
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    font-size: 0.9rem; 
    z-index: 100; 
    text-align: center;
}

details.inline-popup .popup-content::after {
    content: ''; 
    position: absolute; 
    top: 100%; 
    left: 50%; 
    margin-left: -8px;
    border-width: 8px; 
    border-style: solid; 
    border-color: var(--brand-black) transparent transparent transparent;
}
/* =========================================
   10. COOKIE BANNER
   ========================================= */
.cookie-banner-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    background: var(--brand-black);
    color: white;
    border-top: 3px solid var(--brand-yellow);
    box-shadow: 0 -5px 20px rgba(0,0,0,0.2);
    padding: 1.5rem 0; /* ECCO LA MAGIA: 24px sopra e 24px sotto (~1.5cm) */
}

.banner-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.banner-flex p {
    font-size: 1rem; /* Reso un pelo più grande e leggibile */
    line-height: 1.5;
    margin: 0;
}

.banner-link {
    color: var(--brand-yellow);
    text-decoration: underline;
    font-weight: 600;
}

/* Stile per il bottone (prima mancava) */
.btn-privacy-close {
    background-color: var(--brand-yellow);
    color: var(--brand-black);
    border: none;
    padding: 0.8rem 1.5rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-transform: uppercase;
    transition: var(--trans-fast);
    white-space: nowrap; /* Evita che il testo del bottone vada a capo */
}

.btn-privacy-close:hover {
    background-color: white;
    transform: translateY(-2px);
}

/* =========================================
   11. FOOTER
   ========================================= */
.footer { 
    background: var(--brand-black); 
    color: #ccc; 
    padding: 4rem 0 1rem; 
    margin-top: auto; 
}

.footer-content { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); 
    gap: 2.5rem; 
    margin-bottom: 3rem; 
}

.footer-section h3 {
    color: white; 
    border-left: 3px solid var(--brand-yellow); 
    padding-left: 10px;
    margin-bottom: 1.5rem; 
    text-transform: uppercase; 
    font-size: 1rem; 
    letter-spacing: 1px;
}

.footer-links li { 
    margin-bottom: 0.8rem; 
}

.footer-links a:hover { 
    color: var(--brand-yellow); 
    padding-left: 5px; 
}

.footer-contact-item { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    color: white; 
    margin-bottom: 1rem; 
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-links a {
    width: 40px; 
    height: 40px; 
    background: #333; 
    display: flex;
    align-items: center; 
    justify-content: center; 
    border-radius: 50%; 
    color: white;
}

.social-links a:hover { 
    background: var(--brand-yellow); 
    color: var(--brand-black); 
}

.copyright { 
    border-top: 1px solid #333; 
    padding-top: 1.5rem; 
    text-align: center; 
    font-size: 0.85rem; 
}

/* =========================================
   12. CMS EXTRAS (Tables, Legacy classes)
   ========================================= */
.responsive-table { 
    overflow-x: auto; 
    margin: 2rem 0; 
}

.comparison-table { 
    width: 100%; 
    border-collapse: collapse; 
    min-width: 600px; 
}

.comparison-table th, .comparison-table td { 
    padding: 1rem; 
    text-align: left; 
    border-bottom: 1px solid #eee; 
}

.comparison-table th { 
    background: var(--brand-black); 
    color: var(--brand-yellow); 
}

.comparison-table tr:nth-child(even) { 
    background: #f9f9f9; 
}

.star-rating { 
    color: var(--brand-yellow); 
    font-size: 1.2rem; 
    letter-spacing: 2px; 
}

/* Mod Custom Legacy */
.mod-custom { 
    padding: 1rem; 
}

.bottom-a, .bottom-b { 
    background: white; 
    border-radius: var(--radius-md); 
    margin-bottom: 1.5rem; 
    border: 1px solid #eee; 
}

.card-header { 
    background: var(--brand-light-grey); 
    padding: 1rem; 
    font-weight: 700; 
    border-bottom: 1px solid #ddd; 
}

/* =========================================
   13. MEDIA QUERY GENERALI
   ========================================= */
@media (max-width: 600px) {
    .banner-flex {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .social-share-container {
        flex-wrap: wrap;
    }
    .social-share-label {
        width: 100%;
        text-align: center;
        margin-bottom: 0.5rem;
        margin-right: 0;
    }
}

  .cta-box {
    padding: 2rem 1.5rem; /* Riduci il padding. Sopra/sotto 2rem, destra/sinistra 1.5rem */
  }

/* =========================================
   14. ANIMAZIONI
   ========================================= */
@keyframes slideDown { 
    from { 
        opacity: 0; 
        transform: translateY(-10px); 
    } 
    to { 
        opacity: 1; 
        transform: translateY(0); 
    } 
}

@keyframes slideUp {
    from { 
        transform: translateY(100%); 
    }
    to { 
        transform: translateY(0); 
    } 
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes popIn {
    from { 
        transform: scale(0.5); 
        opacity: 0; 
    }
    to { 
        transform: scale(1); 
        opacity: 1; 
    }
}

/* =========================================
   15. OFFERTA TV EMINFLEX - STILI DEDICATI
   ========================================= */

/* Contenitore principale offerta */
.offer-section {
    background: linear-gradient(135deg, #f8f8f8 0%, #e0e0e0 100%);
    padding: 4rem 0;
}

/* Box bianco per il testo */
.offer-content-box {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    height: 100%;
}

/* Titoli specifici offerta */
.offer-title-large {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--brand-black);
}

.offer-title-medium {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--brand-black);
}

/* Testo descrittivo */
.offer-text-lead {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Tag/statistiche */
.offer-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 0.9rem;
}

.offer-tag-yellow {
    background: var(--brand-yellow);
    color: var(--brand-black);
}

.offer-tag-grey {
    background: var(--brand-light-grey);
    color: var(--text-main);
}

/* Griglia 2 colonne specifica per offerta */
.offer-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
    margin: 2rem 0;
}

@media (min-width: 768px) {
    .offer-grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Card immagine (estende mappa-card senza modificarla) */
.offer-image-card {
    display: block;
    overflow: hidden;
    height: 100%;
}

.offer-image-card img {
    width: 100%;
    height: auto;
    display: block;
}

.offer-image-card .offer-card-footer {
    padding: 1.5rem;
    text-align: center;
    background: white;
}

/* Statistiche in griglia (margine controllato) */
.offer-stats-grid {
    margin: 3rem 0;
}

/* Titolo CTA giallo */
.offer-cta-title {
    color: var(--brand-yellow);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* Utility rapide per questa sezione */
.offer-mt-2 {
    margin-top: 2rem;
}

.offer-text-center {
    text-align: center;
}

.offer-text-muted {
    color: var(--text-muted);
}

.offer-flex {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.offer-flex-center {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}