:root {
            --primary: #356549;
            --primary-light: #4a8a63;
            --primary-dark: #264a35;
            --accent: #1abc9c;
            --bg-light: #f4f9f6;
            --white: #ffffff;
            --text-main: #2c3e50;
        }

        * {
            box-sizing: border-box;
        }

        body {
            font-family: 'Poppins', sans-serif;
            margin: 0;
            color: var(--text-main);
            scroll-behavior: smooth;
            line-height: 1.6;
            overflow-x: hidden;
        }

        /* .top-bar {
            background: var(--primary-dark);
            color: white;
            padding: 10px 10%;
            display: flex;
            justify-content: space-between;
            font-size: 13px;
        }

        .top-bar a {
            color: white;
            text-decoration: none;
        } */

        .main-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px 10%;
            background: white;
        }

        .contact-info {
            display: flex;
            gap: 30px;
        }

        .info-item {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .info-item i {
            color: var(--accent);
            font-size: 20px;
        }

        .info-item div {
            font-size: 13px;
        }

        .menu {
            background: var(--primary);
            padding: 0 10%;
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: sticky;
            top: 0;
            z-index: 999;
            transition: transform 0.3s ease, opacity 0.3s ease;
        }

        .menu.hidden {
            transform: translateY(-100%);
            opacity: 0;
            pointer-events: none;
        }

        
        .menu ul {
            display: flex;
            list-style: none;
            margin: 0;
        }

        .menu ul li a {
            color: white;
            padding: 20px 20px;
            display: block;
            text-decoration: none;
            font-weight: 500;
            transition: 0.3s;
        }

        .menu ul li a:hover {
            background: var(--primary-dark);
        }

        .menu ul ul {
            display: none;
            position: absolute;
            background: #fff;
            min-width: 220px;
            box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
            list-style: none;
            padding: 0;
            z-index: 999;
        }

        .menu li.dropdown {
            position: relative;
        }

        .menu li.dropdown:hover>.dropdown-menu {
            display: block;
        }

        .menu ul ul li a {
            color: #333 !important;
            padding: 12px 20px !important;
            font-size: 14px;
            border-bottom: 1px solid #f0f0f0;
            display: flex !important;
            justify-content: space-between;
            align-items: center;
            white-space: nowrap;
        }

        .menu ul ul li a:hover {
            background-color: #f8f8f8;
            color: var(--primary) !important;
        }

        .menu li.flyout {
            position: relative;
        }

        .menu li.flyout:hover>.flyout-menu {
            display: block;
            top: 0;
            left: 100%;
            columns: 2;
            column-gap: 20px;
            min-width: 600px;
            padding: 10px;
        }

        .menu ul ul li {
            break-inside: avoid;
            width: 100%;
        }

        .flyout-menu {
            max-height: 80vh;
            overflow-y: auto;
        }

        .menu .fas {
            font-size: 10px;
            margin-left: 8px;
        }

        .btn-book {
            background: white;
            color: var(--primary);
            padding: 10px 20px;
            border-radius: 5px;
            text-decoration: none;
            font-weight: 600;
            transition: 0.3s;
        }

        .btn-book:hover {
            background: var(--primary-light);
            color: white;
        }
        .service-nav ul a {
  padding: 0; /* Azzera lo spessore extra della nav */

}

        .service-nav {
            background: var(--white);
            box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
            position: sticky;
            top: 0;
            z-index: 1000;
            padding: 0;
            display: block!important;
        }

        .service-nav a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    transition: 0.3s;
}


      

        .hero-header h1 {
            font-size: clamp(1.6rem, 4vw, 2.6rem);
            margin: 0;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: -1px;
        }

        .hero-header p {
            font-size: clamp(0.85rem, 1.6vw, 1.1rem);
            max-width: 700px;
            margin: 16px auto 0;
            opacity: 0.95;
        }

        @media (max-width: 480px) {
            .hero-header h1 {
                font-size: clamp(1.2rem, 5.5vw, 1.7rem);
                letter-spacing: 0;
            }
            .hero-header p {
                font-size: 0.85rem;
                margin-top: 10px;
            }
        }

        .service-nav ul {
            display: flex;
            justify-content: center;
            gap: 20px;
            list-style: none;
            padding: 15px 5%;
            margin: 0;
            overflow-x: auto;
            white-space: nowrap;
        }

        .service-nav a {
            text-decoration: none;
            color: var(--text-main);
            font-weight: 600;
            font-size: 0.85rem;
            text-transform: uppercase;
            transition: 0.3s;
        }

        /* .service-nav a:hover {
            color: var(--primary);
        } */

        .containers {
            max-width: 1200px;
            margin: 0 auto;
            padding: 60px 5%;
        }

        .main-grid {
            display: grid;
            grid-template-columns: 1fr 350px;
            gap: 40px;
        }

        h2 {
            color: var(--primary-dark);
            font-size: clamp(1.5rem, 4vw, 2rem);
            margin-bottom: 25px;
            position: relative;
        }

        h2::after {
            content: '';
            display: block;
            width: 50px;
            height: 4px;
            background: var(--accent);
            margin-top: 10px;
        }

        .prep-card {
            background: #ffffff;
            padding: 30px;
            border-radius: 20px;
            border-top: 6px solid var(--primary);
            position: sticky;
            top: 100px;
        }

        .prep-card h3 {
            color: var(--primary-dark);
            display: flex;
            align-items: center;
            gap: 10px;
            margin-top: 0;
        }

        .prep-list {
            padding-left: 20px;
            font-size: 0.95rem;
            color: #555;
        }

        .prep-list li {
            margin-bottom: 12px;
            position: relative;
        }

        .prep-item-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
        }

        .prestazioni-list {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 20px;
            margin-top: 30px;
        }

        .prestazione-item {
            background: white;
            padding: 20px;
            border-radius: 12px;
            border: 1px solid #eee;
            display: flex;
            flex-direction: column;
            gap: 12px;
            transition: 0.3s;
            position: relative;
        }

        .prestazione-item:hover {
            border-color: var(--primary);
            transform: translateY(-3px);
        }

        .prestazione-header-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
        }

        .prestazione-content {
            display: flex;
            align-items: center;
            gap: 15px;
            flex-grow: 1;
        }

        .prestazione-item i.prestazione-icon {
            color: var(--primary);
            font-size: 1.3rem;
            min-width: 24px;
            text-align: center;
        }

        .admin-icon-selector {
            font-size: 12px;
            background: #f4f9f6;
            border: 1px solid #ddd;
            padding: 4px 8px;
            border-radius: 6px;
            color: var(--primary-dark);
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .bg-gray {
            background: #f9f9f9;
        }

        .location-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 30px;
            margin-top: 40px;
        }

        .loc-card {
            background: white;
            padding: 30px;
            border-radius: 15px;
            text-align: center;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
            position: relative;
            border: 2px solid transparent;
            transition: 0.3s;
        }

        .loc-card.active-branch {
            border-color: var(--accent);
        }

        .faq-wrapper {
            max-width: 900px;
            margin: 0 auto;
        }

        .faq-item {
            background: white;
            margin-bottom: 15px;
            border-radius: 10px;
            overflow: hidden;
            border: 1px solid #eee;
            position: relative;
        }

        .faq-header {
            padding: 20px;
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-weight: 600;
            color: var(--primary-dark);
        }

        .faq-body {
            padding: 0 20px;
            max-height: 0;
            overflow: hidden;
            transition: 0.4s ease-out;
            color: #666;
            font-size: 0.95rem;
        }

        .app-banner {
            background: linear-gradient(45deg, var(--primary-dark), var(--primary));
            color: white;
            padding: 60px 5%;
            border-radius: 30px;
            margin: 40px 5%;
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: space-around;
            gap: 30px;
        }

        .app-content {
            max-width: 500px;
            flex: 1;
            min-width: 280px;
        }

        .booking-section {
            padding: 80px 5%;
            background-color: var(--bg-light);
        }

        .booking-card-wrapper {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 40px;
            background: var(--white);
            padding: clamp(20px, 5vw, 60px);
            border-radius: 30px;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
            align-items: center;
        }

        .booking-actions-box {
            background: var(--primary);
            padding: 30px;
            border-radius: 20px;
            color: white;
            text-align: center;
        }

        .branch-selector {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 15px;
            margin-bottom: 20px;
        }

        .btn-call {
            display: block;
            background: rgba(255, 255, 255, 0.1);
            color: white;
            text-decoration: none;
            padding: 12px;
            border-radius: 10px;
            font-weight: 700;
            border: 1px solid rgba(255, 255, 255, 0.2);
            transition: 0.3s;
        }

        .btn-main-booking {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 10px;
            background: var(--accent);
            color: white;
            text-decoration: none;
            padding: 18px;
            border-radius: 12px;
            font-weight: 700;
            transition: 0.3s;
        }

        .main-footer {
            background: var(--primary-dark);
            color: #e0e0e0;
            padding: 60px 5% 40px;
        }

        .footer-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 40px;
        }

        .footer-col h4 {
            color: white;
            margin-bottom: 20px;
        }

        .footer-col ul {
            list-style: none;
            padding: 0;
        }

        .footer-col ul li {
            margin-bottom: 10px;
        }

        .footer-col ul li a {
            color: #e0e0e0;
            text-decoration: none;
        }

        .hours-table {
            width: 100%;
        }

        .hours-table td {
            padding: 5px 0;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        .app-content h2 {
            color: #68cf93;
        }

        /* Stili Amministrazione CMS */
        [contenteditable="true"] {
            outline: 2px dashed rgba(26, 188, 156, 0.6);
            outline-offset: 4px;
            cursor: text;
        }
        .cms-editable-bg {
            cursor: pointer;
            position: relative;
        }
        .cms-editable-bg:hover::after {
            content: '✏️ Clicca per cambiare immagine Hero';
            position: absolute;
            bottom: 20px;
            right: 20px;
            background: rgba(0,0,0,0.8);
            color: #fff;
            padding: 6px 12px;
            font-size: 12px;
            border-radius: 4px;
            z-index: 10;
        }
        .cms-add-btn {
            background: var(--accent);
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 8px;
            font-weight: bold;
            cursor: pointer;
            margin-top: 20px;
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }
        .cms-del-btn {
            background: #e74c3c;
            color: white;
            border: none;
            padding: 5px 10px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 12px;
        }
        .admin-branch-toggle {
            margin-top: 15px;
            padding-top: 10px;
            border-top: 1px dashed #ddd;
            font-size: 13px;
            font-weight: 600;
        }

        @media (max-width: 992px) {
            .main-grid {
                grid-template-columns: 1fr;
            }
            .prep-card {
                position: static;
                margin-top: 30px;
            }
            .booking-card-wrapper {
                grid-template-columns: 1fr;
            }
            /* Nota: dimensioni/padding di .hero-header sono ora gestite
               in modo responsive direttamente nello <style> di index.html
               (background-size:contain + clamp), per mostrare la foto
               sempre intera su ogni dispositivo. */
        }


        .service-nav a:hover{
            background: none;
             color: var(--primary) !important;
        }








/* ==========================================
   ESAMI E PREPARAZIONI
   ========================================== */

.esami-section {
    margin-top: 60px;
}

.esami-heading {
    margin-bottom: 30px;
}

.esami-heading > span {
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.esami-heading h2 {
    margin-top: 5px;
    margin-bottom: 10px;
}

.esami-heading p {
    color: #6b756f;
    max-width: 650px;
    margin: 0;
}


/* LISTA */

.prestazioni-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 30px;
}


/* CARD */

.prestazione-item {
    background: #fff;
    border: 1px solid #e5ebe7;
    border-radius: 16px;
    overflow: hidden;
    padding: 0;
    transition: 
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.25s ease;
}

.prestazione-item:hover {
    border-color: rgba(53, 101, 73, 0.35);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}


/* HEADER CLICCABILE */

.prestazione-header {
    width: 100%;
    border: 0;
    background: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}


/* CONTENUTO */

.prestazione-content {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    min-width: 0;
}


/* ICONA */

.prestazione-icon-box {
    width: 48px;
    height: 48px;
    min-width: 48px;

    border-radius: 13px;

    background: rgba(53, 101, 73, 0.08);
    color: var(--primary);

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 1.15rem;

    transition: 
        background 0.25s ease,
        color 0.25s ease;
}


/* TESTO */

.prestazione-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.prestazione-info strong {
    color: var(--primary-dark);
    font-size: 0.95rem;
    line-height: 1.35;
}

.prestazione-info span {
    color: #78827d;
    font-size: 0.78rem;
    line-height: 1.4;
}


/* FRECCIA */

.prestazione-arrow {
    width: 34px;
    height: 34px;
    min-width: 34px;

    border-radius: 50%;

    background: #f3f7f4;
    color: var(--primary);

    display: flex;
    align-items: center;
    justify-content: center;

    transition: 
        transform 0.3s ease,
        background 0.3s ease,
        color 0.3s ease;
}

.prestazione-arrow i {
    font-size: 0.75rem;
}


/* PREPARAZIONE NASCOSTA */

.prestazione-preparazione {
    max-height: 0;
    overflow: hidden;

    transition: max-height 0.35s ease;
}


/* BOX PREPARAZIONE */

.preparazione-box {
    margin: 0 20px 20px;
    padding: 18px 20px;

    background: var(--bg-light);

    border-radius: 12px;

    border-left: 4px solid var(--primary);
}


/* TITOLO */

.preparazione-title {
    display: flex;
    align-items: center;
    gap: 8px;

    color: var(--primary);

    font-size: 0.78rem;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 0.5px;

    margin-bottom: 7px;
}

.preparazione-title i {
    font-size: 0.9rem;
}


/* TESTO */

.preparazione-box p {
    margin: 0;

    color: #56635c;

    font-size: 0.85rem;

    line-height: 1.6;
}


/* CARD APERTA */

.prestazione-item.open {
    border-color: rgba(53, 101, 73, 0.35);
}

.prestazione-item.open .prestazione-icon-box {
    background: var(--primary);
    color: white;
}

.prestazione-item.open .prestazione-arrow {
    background: var(--primary);
    color: white;
    transform: rotate(180deg);
}







/* ==========================================
   CORREZIONI RESPONSIVE COMPLETE
   ========================================== */

/* Tablet & Schermi Medi (< 1100px) */
@media (max-width: 1100px) {
    .prestazioni-list {
        grid-template-columns: 1fr; /* Le card esami passano a colonna singola */
    }
}

/* Tablet Verticali (< 992px) */
@media (max-width: 992px) {
    .main-grid {
        grid-template-columns: 1fr; /* Sidebar va sotto il contenuto */
    }
    
    .prep-card {
        position: static;
        margin-top: 30px;
    }

    .booking-card-wrapper {
        grid-template-columns: 1fr;
    }

    /* Gestione Flyout Menu per schermi non-desktop */
    .menu li.flyout:hover>.flyout-menu {
        position: static;
        min-width: 100%;
        columns: 1;
    }
}

/* Smartphone (< 768px) */
@media (max-width: 768px) {
    .top-bar, 
    .main-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding: 10px 5%;
    }

    .contact-info {
        flex-direction: column;
        gap: 10px;
    }

    .menu {
        flex-direction: column;
        padding: 10px 5%;
    }

    .menu ul {
        flex-direction: column;
        width: 100%;
    }

    .menu ul li a {
        padding: 10px;
    }

    .branch-selector {
        grid-template-columns: 1fr; /* Pulsanti filiali impilati */
    }

    .prestazione-header {
        padding: 15px; /* Riduci il padding su schermi piccoli */
    }
}