﻿/* =========================================
   1. RESET & VARIABILI
   ========================================= */
:root {
    --electric-blue: #1f95ff;
    --navy: #000080;
    --text: #333;
    --text-light: #666;
    --bg: #fff;
    --bg-alt: #f0f8ff;
    --border: #e6f2ff;
    --footer-bg: #1B7AB0;
    --footer-accent: #FFD700;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6; color: var(--text); background: var(--bg); overflow-x: hidden;
}
ul { list-style: none; }
a { text-decoration: none; color: var(--electric-blue); transition: 0.3s; font-weight: 600; }
a:hover { color: var(--navy); }

/* =========================================
   2. HEADER & NAVIGAZIONE (DESKTOP)
   ========================================= */
.header {
    position: fixed; top: 0; left: 0; right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    z-index: 1000; padding: 1rem 0;
}

.nav-container {
    max-width: 1200px; margin: 0 auto; padding: 0 20px;
    display: flex; justify-content: space-between; align-items: center; 
}

/* LOGO */
.logo { font-size: 1.5rem; font-weight: 800; color: var(--navy); z-index: 2001; }

/* MENU DESKTOP */
.nav-links { display: flex; gap: 2rem; }
.nav-links a { font-size: 1rem; color: var(--text); }
.nav-links a:hover { color: var(--electric-blue); }

/* HAMBURGER (Nascosto su Desktop) */
.hamburger { display: none; cursor: pointer; padding: 10px; z-index: 2001; background: none; border: none; }
.hamburger span {
    display: block; width: 25px; height: 3px; margin: 5px auto;
    background-color: var(--navy); transition: 0.3s;
}

/* =========================================
   3. HERO, BUTTONS & BREADCRUMBS
   ========================================= */
.hero { margin-top: 70px; padding: 3rem 1.5rem 4rem; text-align: center; background: linear-gradient(180deg, rgba(31,149,255,0.05) 0%, #fff 100%); }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); color: var(--navy); margin-bottom: 1rem; }
.hero-subtitle {
    font-size: 1.2rem;
    color: #666;
    margin: 0 auto 40px;
    max-width: 700px;
}
.hero-banner { width: 100%; max-width: 1200px; height: auto; border-radius: 12px; margin-bottom: 2.5rem; }

/* BOTTONI */
.btn { 
    display: inline-block; padding: 14px 35px; border-radius: 50px; 
    text-transform: uppercase; font-size: 0.9rem; transition: all 0.3s ease; 
}
a.btn-primary, button.btn-primary { 
    background: var(--electric-blue); color: white !important;
    box-shadow: 0 4px 15px rgba(31,149,255,0.3); border: none;
}
a.btn-primary:hover, button.btn-primary:hover { 
    background: var(--navy); color: white !important; 
    transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0, 0, 128, 0.2); 
}

.container { max-width: 1200px; margin: 0 auto; padding: 4rem 20px; }
.section-title { font-size: 2rem; color: var(--navy); text-align: center; margin-bottom: 1rem; }

/* BREADCRUMBS */
.breadcrumbs-container {
    max-width: 1200px; margin: 90px auto 1rem; padding: 0 20px;
    font-size: 0.9rem; color: #666;
}
.breadcrumbs-container a { color: #888; font-weight: 400; text-decoration: underline; }
.breadcrumbs-container span { margin: 0 5px; color: #ccc; }

/* =========================================
   4. LAYOUT & GRIGLIE (DESKTOP)
   ========================================= */

/* STRUTTURA 2 COLONNE */
.split-section { 
    display: grid; 
    grid-template-columns: 2fr 1fr;
    gap: 40px; 
    align-items: start; 
    margin-bottom: 2rem; 
}

/* Contenuto Pagina */
.page-content { padding-right: 30px; }
.page-content h1 { color: var(--navy); font-size: 2.2rem; margin-bottom: 1.5rem; }
.page-content h2 { color: var(--navy); font-size: 1.6rem; margin-top: 2rem; margin-bottom: 1rem; border-bottom: 1px solid #eee; padding-bottom: 10px;}
.page-content h3 { color: var(--navy); font-size: 1.3rem; margin-top: 1.5rem; margin-bottom: 1rem; }
.page-content p { margin-bottom: 1.5rem; color: #444; }

/* LISTE PUNTATE */
.page-content ul { list-style: disc; padding-left: 20px; margin-bottom: 1.5rem; }
.page-content ul li { margin-bottom: 0.5rem; }

/* IMMAGINI */
.content-image, .sidebar-image {
    width: 100%; height: auto; border-radius: 8px; margin-bottom: 2rem; max-width: 100%; display: block;
}

/* SIDEBAR (Colonna Destra Sticky) */
.sidebar-column { 
    display: flex; flex-direction: column; gap: 20px; 
    position: sticky; top: 100px; 
}
.sidebar-box { 
    padding: 25px; border: 1px solid var(--border); border-radius: 12px; text-align: center; background: #fff;
}

/* CARDS GRID (Home) */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; margin-bottom: 4rem; }
.card { background: white; padding: 2.5rem 2rem; border-radius: 16px; border: 1px solid var(--border); transition: 0.3s; height: 100%; }
.card:hover { transform: translateY(-5px); border-color: var(--electric-blue); }
.card h3 { color: var(--navy); margin-bottom: 1rem; font-size: 1.3rem; }
.card-icon { font-size: 2rem; display: block; margin-bottom: 1rem; }

/* ALTRE GRIGLIE (Metodo, Formazione) */
.grid-method, .grid-formation { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 2rem; }
.grid-method .benefit-item:last-child { grid-column: 1 / -1; }

.benefit-item {
    background: #fff; padding: 25px; border-radius: 12px;
    border: 1px solid var(--border); display: flex; gap: 15px; align-items: start;
}
.check-icon {
    background: var(--bg-alt); color: var(--electric-blue);
    width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; flex-shrink: 0; font-weight: bold;
}

/* SEO Section Grid */
.seo-section-wrapper { background: #fff; border-top: 1px solid #eee; padding: 3rem 0; }
.seo-content-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }

/* Bottoni Città */
.city-link {
    display: inline-flex; align-items: center; justify-content: center; width: 100%;
    background: #ffffff; color: var(--navy); border: 1px solid var(--border);
    padding: 12px 10px; border-radius: 8px; font-weight: 600; margin-bottom: 10px;
    transition: 0.3s;
}
.city-link:hover { background: var(--electric-blue); color: white; border-color: var(--electric-blue); }

/* =========================================
   5. COMPONENTI ESTRATTI DA INLINE
   ========================================= */

/* CITAZIONE CON BORDO BLU */
.quote-box {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.8;
    margin-bottom: 2rem;
    border-left: 4px solid var(--electric-blue);
    padding-left: 20px;
    font-style: italic;
}

/* BOX CTA FLESSIBILE (per consulenza-strategica) */
.cta-box-flex {
    margin-top: 4rem;
    background: #fff;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cta-box-flex > div:first-child {
    flex: 1;
    min-width: 250px;
}

.cta-box-flex h3 {
    color: var(--navy);
    margin-bottom: 10px;
}

.cta-box-flex p {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 0;
}

/* BOX CTA CENTRATO (per città) */
.cta-box-center {
    text-align: center;
    margin-top: 2rem;
    margin-bottom: 4rem;
    padding: 3rem;
    background: var(--bg-alt);
    border-radius: 16px;
}

.cta-box-center h3 {
    color: var(--navy);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.cta-box-center p {
    max-width: 700px;
    margin: 0 auto 2rem;
    color: #666;
    font-size: 1.1rem;
}

/* BOX CORSO (per blog) */
.course-box {
    margin-top: 4rem;
    padding: 2rem;
    background: var(--bg-alt);
    border-radius: 12px;
    border-left: 4px solid #5BB4E5;
}

.course-box h3 {
    margin-top: 0;
    color: var(--navy);
}

/* SEZIONE FAQ */
.faq-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.faq-section h3 {
    color: var(--navy);
    margin-bottom: 1rem;
}

/* FAQ */
details { background: #fff; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 15px; padding: 15px 20px; }
summary { font-weight: 600; color: var(--navy); cursor: pointer; display: flex; justify-content: space-between; }
.faq-answer { margin-top: 10px; color: #666; font-size: 0.95rem; }

/* =========================================
   6. LAYOUT BLOG
   ========================================= */

/* Container Blog Ristretto */
.blog-container {
    padding-top: 2rem;
    max-width: 800px;
    margin: 0 auto;
    margin-bottom: 4rem;
}

/* Titolo Blog */
.blog-title {
    color: var(--navy);
    margin-bottom: 0.5rem;
}

/* Sottotitolo Blog */
.blog-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 1rem;
}

/* Meta Info Blog */
.blog-meta {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 2rem;
}

/* Hero Image Blog */
.blog-hero-image {
    width: 100%;
    height: auto;
    max-height: 450px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 3rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Contenuto Testo Blog */
.blog-content {
    line-height: 1.8;
    color: var(--text);
    font-size: 1.1rem;
}

.blog-content h2 {
    color: var(--navy);
    margin-top: 2.5rem;
}

.blog-content h3 {
    color: #5BB4E5;
    margin-top: 2rem;
}

/* =========================================
   7. LAYOUT PAGINE CITTÀ
   ========================================= */

/* Container Pagina Città */
.city-container {
    padding-top: 2rem;
    max-width: 1200px;
}

/* Header Centrato Città */
.city-header {
    text-align: center;
    margin-bottom: 3rem;
}

.city-header h1 {
    color: var(--navy);
}

.city-header-subtitle {
    font-size: 1.2rem;
    color: #555;
    line-height: 1.6;
    margin-top: 1rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero Image Città */
.city-hero-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 4rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

/* Sezione Contenuto Città */
.city-content-section {
    max-width: 900px;
    margin: 0 auto;
    margin-bottom: 3rem;
}

.city-content-section h2 {
    color: var(--navy);
    margin-bottom: 1.5rem;
}

.city-content-section p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 1.5rem;
}

/* Card Città con Padding */
.city-card {
    padding: 25px;
}

.city-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.city-card p {
    font-size: 0.95rem;
    color: var(--text-light);
}

/* =========================================
   8. SHARE BUTTONS & FOOTER
   ========================================= */

/* SHARE BUTTONS (Tondi e Centrati) */
.share-container {
    text-align: center; margin: 3rem auto 2rem; padding-top: 2rem;
    border-top: 1px solid #eee; max-width: 600px;
}
.share-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 45px; height: 45px; border-radius: 50%; margin: 0 8px;
    color: white !important; font-size: 1.2rem; transition: transform 0.3s;
}
.share-btn:hover { transform: translateY(-3px); }
.share-wa { background-color: #25D366; }
.share-ln { background-color: #0077b5; }
.share-fb { background-color: #3b5998; }
.share-email { background-color: #555; }

/* FOOTER */
.footer {
    background-color: var(--footer-bg); 
    color: white; 
    padding: 3rem 1rem; 
    text-align: center; 
    margin-top: 4rem;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 5px; 
    background: linear-gradient(90deg, 
        var(--footer-accent) 0%, 
        var(--footer-accent) 30%, 
        rgba(255, 215, 0, 0) 100%
    );
}

.footer a { color: white; border-bottom: 1px solid transparent; transition: 0.3s; }
.footer a:hover { border-bottom: 1px solid var(--footer-accent); color: var(--footer-accent); }

/* =========================================
   9. MOBILE & HAMBURGER (Sotto i 768px)
   ========================================= */
@media (max-width: 768px) {

    /* Mostra Hamburger */
    .hamburger { display: block; }

    /* Header Layout */
    .header { padding: 10px 0; }
    .nav-container { justify-content: space-between; padding: 0 20px; width: 100%; }

    /* MENU A TENDINA */
    .nav-links {
        position: fixed; top: 60px; left: 0; width: 100%; background: white;
        display: none;
        flex-direction: column; align-items: center;
        padding: 2rem 0; box-shadow: 0 10px 10px rgba(0,0,0,0.1); border-top: 1px solid #eee;
        z-index: 999;
    }
    .nav-links.active { display: flex; }

    .nav-links li { width: 100%; text-align: center; margin: 0; }
    .nav-links a { font-size: 18px; padding: 15px; display: block; border-bottom: 1px solid #f9f9f9; color: var(--navy); }
    
    /* Bottone Info Mobile */
    .nav-links li a.btn-primary { display: inline-block; width: auto; padding: 10px 30px !important; margin-top: 15px; }

    /* Animazione Hamburger */
    .hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    /* FIX LAYOUT MOBILE */
    .hero { margin-top: 85px; padding-top: 1rem; }
    .sidebar-column { display: none; }
    
    .cards-grid, 
    .grid-method, 
    .grid-formation, 
    .split-section, 
    .seo-content-grid {
        display: grid; 
        grid-template-columns: 1fr; 
        width: 100%; 
        gap: 2rem;
    }
    
    .page-content { padding-right: 0; }
    .footer { padding: 2rem 1rem; }
    
    /* CTA BOX MOBILE */
    .cta-box-flex { flex-direction: column; }
}

/* =========================================
   10. CARD CLICCABILI (AGGIUNTA)
   ========================================= */
a.card-link { 
    text-decoration: none; 
    color: inherit; /* Mantiene il colore del testo originale (non blu) */
    display: block; 
    height: 100%; 
}

/* Forza il colore del paragrafo per essere sicuri che non diventi blu */
a.card-link p {
    color: #666; 
}

a.card-link .card { 
    height: 100%; 
    transition: transform 0.3s, border-color 0.3s; 
}

/* Effetto Hover: sposta la card e colora solo il titolo */
a.card-link:hover .card { 
    border-color: var(--electric-blue); 
    transform: translateY(-5px); 
}

a.card-link:hover .card h3 { 
    color: var(--electric-blue); 
}

/* Sovrascrive il comportamento standard dei link hover che diventano navy */
a.card-link:hover {
    color: inherit;
}

/* =========================================
   11. STILI ARTICOLI BLOG (Nuova Sezione)
   ========================================= */

/* Contenitore stretto per la lettura (come Medium o blog moderni) */
.article-container {
    max-width: 800px;
    margin: 0 auto 4rem;
    padding-top: 2rem;
}

/* Tipografia automatica per il contenuto */
.article-content {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text);
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content h2 {
    color: var(--navy);
    font-size: 1.8rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.article-content h3 {
    color: var(--electric-blue);
    font-size: 1.4rem;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
}

.article-content ul, 
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 20px;
}

.article-content li {
    margin-bottom: 0.5rem;
}

/* Meta dati (Autore, Categoria) */
.article-meta {
    font-size: 0.95rem;
    color: #777;
    margin-bottom: 2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

/* Box Call to Action (CTA) a fine articolo */
.article-cta {
    margin-top: 4rem;
    padding: 2rem;
    background: var(--bg-alt);
    border-radius: 12px;
    border-left: 4px solid var(--electric-blue);
}

.article-cta h3 {
    margin-top: 0;
    color: var(--navy);
    font-size: 1.3rem;
    margin-bottom: 10px;
}

/* --- FIX MOBILE: VISIBILITÀ SIDEBAR --- */
@media screen and (max-width: 900px) {
    
    /* Trasforma la sezione divisa in una colonna unica verticale */
    .container.split-section {
        display: flex !important;
        flex-direction: column !important;
    }

    /* Rendi la colonna laterale visibile e larga quanto lo schermo */
    .sidebar-column {
        display: block !important; /* Forza la visibilità se era nascosta */
        width: 100% !important;
        max-width: 100% !important;
        margin-top: 40px;
        padding-left: 0 !important;
        
        /* Aggiunge una linea di separazione visiva */
        border-left: none !important;
        border-top: 1px solid #eee;
        padding-top: 40px;
    }

    /* Sistema l'immagine dentro la sidebar per il mobile */
    .sidebar-image {
        max-width: 300px !important; /* Evita che diventi gigante */
        margin: 0 auto 20px auto !important; /* Centra l'immagine */
        display: block;
    }

    /* Sistema il box CTA sotto l'immagine */
    .sidebar-box {
        width: 100% !important;
        text-align: center;
    }
}



