/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    --primary: #178596;   
    --secondary: #0f4c75; 
    --accent: #d64510;    
    --text: #333333;      
    --bg-gray: #f4f8f9;   
    --white: #ffffff;
    --footer-bg: #111111;
    --spacing: 20px;
}

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

body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; 
    line-height: 1.6; 
    color: var(--text); 
    padding-bottom: 0; 
}

a { text-decoration: none; color: inherit; transition: color 0.3s; }
ul { list-style: none; }
img { max-width: 100%; height: auto; }

/* =========================================
   2. LAYOUT UTILITIES
   ========================================= */
.container { max-width: 1100px; margin: 0 auto; padding: 0 var(--spacing); }
.section { padding: 60px 0; }
.bg-gray { background-color: var(--bg-gray); }
.text-center { text-align: center; }

.grid-3 { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Aumentato leggermente min-width */
    gap: 30px; 
    margin-top: 30px; 
}

/* =========================================
   3. TYPOGRAPHY
   ========================================= */
h1, h2, h3 { line-height: 1.2; margin-bottom: 15px; }

h1 { 
    font-size: 2.5rem; 
    color: var(--white); 
    text-shadow: 1px 1px 4px rgba(0,0,0,0.7); 
}

.section-title { 
    font-size: 2rem; 
    color: var(--primary); 
    text-align: center; 
    margin-bottom: 40px; 
    position: relative; 
}

.section-title::after { 
    content: ''; 
    display: block; 
    width: 60px; 
    height: 3px; 
    background: var(--primary); 
    margin: 10px auto 0; 
}

/* =========================================
   4. HEADER & LOGO
   ========================================= */
.header { 
    background: var(--white); 
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
}

.nav-container { display: flex; justify-content: space-between; align-items: center; height: 70px; }

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    display: flex;       
    align-items: center; 
}

.logo img { margin-right: 12px; width: 45px; height: auto; }
.logo span { color: var(--secondary); }

.nav-menu ul { display: flex; gap: 20px; align-items: center; }
.nav-menu a { font-weight: 500; font-size: 1rem; }
.nav-menu a:hover { color: var(--primary); }

/* Stile per il link attivo nel menu */
.nav-menu a.active {
    color: #0056b3 !important; /* Forza il colore blu */
    font-weight: bold;         /* Lo rende grassetto */
    position: relative;
}

.cta-nav { 
    background: var(--accent); 
    color: var(--white) !important; 
    padding: 8px 15px; 
    border-radius: 5px; 
    font-weight: bold; 
}

.mobile-menu-btn { display: none; background: none; border: none; font-size: 1.8rem; cursor: pointer; color: var(--primary); }

/* =========================================
   5. BARRA PROVINCE
   ========================================= */
.province-nav {
    display: flex;
    background-color: var(--secondary); 
    border-bottom: 1px solid #0a3d60;
}

.province-nav a {
    flex: 1;
    text-align: center;
    padding: 12px 5px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--white);
    border-right: 1px solid rgba(255,255,255,0.1);
}

.province-nav a:last-child { border-right: none; }
.province-nav a:hover { background-color: rgba(255,255,255,0.1); }

/* =========================================
   6. HERO SECTION
   ========================================= */
.hero { 
    background: linear-gradient(rgba(23, 133, 150, 1), rgba(15, 76, 117, 1)); 
    background-size: cover; background-position: center; 
    height: 480px; display: flex; align-items: center; text-align: center; justify-content: center; 
}

.hero-content { max-width: 800px; color: var(--white); }
.hero-buttons { margin-top: 30px; display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; }

.btn { padding: 12px 25px; border-radius: 5px; font-weight: bold; text-transform: uppercase; transition: transform 0.2s; cursor: pointer; display: inline-block;}
.btn:hover { transform: scale(1.05); }
.btn-primary { background: var(--accent); color: var(--white); border: none; }
.btn-secondary { background: transparent; border: 2px solid var(--white); color: var(--white); }

/* =========================================
   7. SEZIONE CHI SIAMO (Novità)
   ========================================= */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.about-text p { font-size: 1.05rem; color: #555; }
.about-image img { 
    border-radius: 8px; 
    box-shadow: 0 10px 20px rgba(0,0,0,0.1); 
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* =========================================
   8. CARDS SERVIZI & ZONE TESTO
   ========================================= */
.card { 
    background: var(--white); 
    padding: 30px; 
    border-radius: 8px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
    text-align: center; 
    border-top: 4px solid var(--primary); 
    transition: transform 0.2s;
}

.card:hover { transform: translateY(-5px); }
.card h3 { color: var(--primary); margin-bottom: 15px; }

/* Blocco testo Zone Operative */
.zones-text-block {
    max-width: 900px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
}
.zones-text-block strong { color: var(--secondary); }

/* =========================================
   9. FAQ & FOOTER
   ========================================= */
.faq-container { max-width: 800px; margin: 0 auto; }
.faq-item { margin-bottom: 10px; border-bottom: 1px solid #ddd; }

.faq-question { width: 100%; text-align: left; background: none; border: none; padding: 15px 0; font-size: 1.1rem; font-weight: bold; cursor: pointer; display: flex; justify-content: space-between; align-items: center; color: var(--secondary); }
.faq-question::after { content: '+'; font-size: 1.5rem; color: var(--primary); }
.faq-question.active::after { content: '-'; }

.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; padding-right: 20px; }
.faq-answer.open { max-height: 200px; padding-bottom: 15px; }

.footer { background: var(--footer-bg); color: #888; padding: 50px 0 30px; text-align: center; font-size: 0.95rem; }
.footer-contact-block { margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px solid #333; }
.footer-title { color: #fff; font-size: 1.5rem; margin-bottom: 15px; }
.footer-phone { display: inline-block; font-size: 1.8rem; font-weight: bold; color: var(--accent); margin-bottom: 10px; }
.footer-email a { color: #ccc; transition: color 0.3s; }
.footer-email a:hover { color: var(--white); }
.footer-links { margin-bottom: 20px; }
.footer-links a { color: #ccc; margin: 0 8px; font-weight: 600; white-space: nowrap; }
.footer-links a:hover { color: var(--white); text-decoration: underline; }
.copyright { font-size: 0.8rem; color: #555; }

/* =========================================
   10. MOBILE STICKY BAR & RESPONSIVE
   ========================================= */
.mobile-sticky { display: none; }

@media (max-width: 768px) {
    .mobile-sticky { 
        display: block; position: fixed; bottom: 0; left: 0; width: 100%; 
        background: var(--accent); text-align: center; padding: 15px; z-index: 2000; box-shadow: 0 -2px 10px rgba(0,0,0,0.2); 
    }
    .mobile-sticky a { color: var(--white); font-weight: bold; font-size: 1.2rem; display: block; width: 100%; height: 100%; }
    
    body { padding-bottom: 60px; }

    .nav-menu { display: none; position: absolute; top: 70px; left: 0; width: 100%; background: var(--white); border-top: 1px solid #eee; padding: 20px 0; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
    .nav-menu.active { display: block; }
    .nav-menu ul { flex-direction: column; gap: 0; }
    .nav-menu li { width: 100%; text-align: center; }
    .nav-menu a { display: block; padding: 15px; border-bottom: 1px solid #f5f5f5; }
    
    .mobile-menu-btn { display: block; }

    h1 { font-size: 2rem; }
    
    /* Responsive Chi Siamo: Colonna singola */
    .about-grid { grid-template-columns: 1fr; }
    .section-title::after { margin: 10px auto 0; } /* Ricentra la linea titolo su mobile */
    .about-text h2 { text-align: center !important; }

    .grid-3 { grid-template-columns: 1fr; }
    .footer-links { display: flex; flex-direction: column; gap: 10px; }
}

/* =========================================
   11. STILI PAGINA CONTATTI (AGGIUNTA)
   ========================================= */

.contact-buttons-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 25px;
}

/* Bottoni Contatto: Ereditano lo stile base, aggiungiamo colori specifici */
.contact-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
    color: var(--white);
    font-size: 1.1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.contact-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    color: var(--white); /* Mantiene il testo bianco */
}

/* Colori specifici per i bottoni */

.btn-wa {
    background-color: #25D366; /* Verde Ufficiale WhatsApp */
}

/* Stili del Form */

.contact-form-section {
    /* Il padding a 100px crea il vero distacco visivo sopra e sotto */
    padding: 80px 0 !important; 
    background-color: #ffffff;
}

.form-box {
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 40px
    border: 1px solid #eee;
    
    /* Margine esterno per sicurezza */
    margin-top: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text);
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
    background-color: #fafafa;
    transition: border-color 0.3s, background-color 0.3s;
}

.form-input:focus {
    border-color: var(--primary);
    background-color: var(--white);
    outline: none;
    box-shadow: 0 0 0 3px rgba(23, 133, 150, 0.1); /* Usa colore primary con opacità */
}

/* Checkbox Privacy */
.privacy-check {
    font-size: 0.9rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Bottone Invio (Full Width) */
.submit-btn {
    width: 100%;
    background-color: var(--secondary); /* Usa il blu scuro */
    color: var(--white);
    padding: 16px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    margin-top: 15px;
    text-transform: uppercase;
    transition: background 0.3s, transform 0.2s;
}

.submit-btn:hover {
    background-color: #0a3552; /* Un po' più scuro del secondary */
    transform: scale(1.02);
}

/* Messaggio di Successo (Nascosto di default) */
.success-box {
    display: none;
    background-color: #d4edda;
    color: #155724;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #c3e6cb;
    text-align: center;
    margin-top: 20px;
}

.reload-btn {
    background: transparent;
    border: 2px solid #155724;
    color: #155724;
    padding: 8px 20px;
    margin-top: 15px;
    cursor: pointer;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s;
}

.reload-btn:hover {
    background-color: #155724;
    color: var(--white);
}