/* =========================================
   MOBILE OVERRIDE - VERSIONE SICURA
   Attivo SOLO su schermi < 768px (Smartphone)
   ========================================= */

@media (max-width: 767px) {

    /* 1. BASE */
    body {
        font-size: 16px; /* Previene zoom iPhone */
        -webkit-text-size-adjust: 100%;
    }

    /* 2. NAVBAR (Correzione specifica) */
    .navbar {
        position: relative !important; /* Toglie l'absolute che crea problemi */
        top: auto !important;
        left: auto !important;
        width: 100% !important;
        padding: 1rem !important;
        background: #0f4c81 !important; /* Sfondo pieno */
        flex-direction: column !important;
        gap: 1rem !important;
        display: flex !important;
        z-index: 100;
    }

    .nav-logo-container {
        height: 50px;
        width: 100%;
        justify-content: center;
    }

    .nav-links {
        width: 100%;
        justify-content: center;
        gap: 1rem;
        flex-wrap: wrap;
        padding: 0;
    }

    /* FORZATURA DIMENSIONE FONT MENU */
    .nav-links a {
        font-size: 1.1rem !important; /* Testo grande */
        padding: 10px 15px !important;
        font-weight: bold;
        color: #fff;
        text-transform: uppercase;
        display: inline-block;
    }

    .nav-links a.active {
        color: #d9383a !important;
        text-decoration: underline;
    }

    .btn-riservata {
        background-color: #d9383a !important;
        color: white !important;
        border-radius: 4px;
        padding: 10px 20px !important;
    }

    /* 3. HERO SECTION */
    .hero-container {
        height: auto !important;
        flex-direction: column !important;
        margin-top: 0 !important;
    }

    .hero-side {
        position: relative !important;
        width: 100% !important;
        height: 50vh !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        clip-path: none !important;
        animation: none !important;
    }

    .text-side {
        height: auto !important;
        min-height: 40vh !important;
        padding: 2rem 1rem !important;
        justify-content: center !important;
        background-color: #0f4c81 !important;
    }

    .slogan-content {
        opacity: 1 !important;
        transform: none !important;
        width: 100% !important;
        animation: none !important;
        padding: 0 !important;
    }

    .hero-logo {
        width: 250px !important;
        margin: 0 auto 1rem auto !important;
        display: block;
    }

    .slogan-content h1 { font-size: 1.5rem !important; }
    .slogan { font-size: 1.4rem !important; }

    /* Fix specifico per l'immagine di sfondo di Servizi */
    .image-side[style*="Servizi.png"] {
        background-position: center !important;
        background-size: cover !important;
        min-height: 200px !important;
    }

    /* 4. CONTENUTI E GRIGLIE */
    .main-content {
        padding: 2rem 1rem !important;
        max-width: 100% !important;
    }

    .section-title { font-size: 1.5rem !important; }

    /* Forza 1 colonna per News e Servizi */
    .news-grid, .griglia-servizi {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    .news-card { height: auto !important; min-height: 350px; }

    /* Card Servizi: leggibilità e niente scroll laterale */
    .card-servizio {
        padding: 1.5rem !important;
        height: auto !important;
        margin-bottom: 1rem;
        width: 100%;
        box-sizing: border-box;
    }

    .card-servizio p, .card-servizio strong, .card-servizio em, .sconto-tag {
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
    }

    .sconto-tag {
        white-space: normal !important;
        padding: 0.5rem !important;
        display: inline-block;
    }

    /* 5. BOTTONI E INPUT */
    .tab-btn, .btn-mail-verde, button, .btn-nav, .btn-add {
        width: 100% !important;
        margin-bottom: 10px !important;
        padding: 12px !important;
        font-size: 1rem !important;
        box-sizing: border-box;
        text-align: center;
        min-height: 48px;
    }

    .btn-leggi-tutto {
        width: auto !important;
        text-align: left !important;
        margin-bottom: 0;
    }

    input, textarea, select, .form-control {
        font-size: 16px !important;
        padding: 12px !important;
        min-height: 48px !important;
        width: 100% !important;
        box-sizing: border-box;
        border-radius: 6px;
    }

    /* 6. DIRETTIVO */
    .direttivo-row {
        flex-direction: column !important;
        gap: 1.5rem !important;
    }
}