:root {
    --aq-blue: #0056b3;
    --anthracite-black: #1a1d23;
    --soft-grey: #f8f9fa;
    --text-main: #333333;
    --text-light: #ffffff;
    --blue-glow: 0 0 20px rgba(0, 86, 179, 0.5);
    --shadow: 0 10px 30px rgba(0,0,0,0.15);
}

html { scroll-behavior: smooth; }
body { background-color: var(--soft-grey); color: var(--text-main); font-family: 'Roboto', sans-serif; margin: 0; padding-top: 70px; overflow-x: hidden; }

/* --- HEADER --- */
header { 
    background: var(--anthracite-black); padding: 10px 20px; position: fixed; top: 0; width: 100%; z-index: 1000; 
    display: flex; justify-content: space-between; align-items: center; box-sizing: border-box;
    border-bottom: 4px solid var(--aq-blue); box-shadow: var(--shadow);
}
.logo-box { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-text { font-family: 'Montserrat', sans-serif; font-weight: 900; color: var(--text-light); font-size: 1rem; text-transform: uppercase; }

nav { display: none; }
@media (min-width: 768px) {
    nav { display: flex; gap: 25px; }
    nav a { color: var(--text-light); text-decoration: none; font-weight: 700; font-size: 0.85rem; font-family: 'Montserrat'; transition: 0.3s; }
    nav a:hover { color: var(--aq-blue); text-shadow: 0 0 8px var(--aq-blue); }
}

/* Navigazione per le vecchie pagine d'area */
.nav-links { display: flex; gap: 15px; }
.nav-btn { color: var(--text-light); text-decoration: none; font-weight: 700; font-size: 0.8rem; background: #333; padding: 8px 15px; border-radius: 50px; transition: 0.3s; border: 1px solid #444; }
.nav-btn:hover { background: var(--aq-blue); border-color: var(--aq-blue); box-shadow: var(--blue-glow); }

/* --- SEZIONI GENERALI --- */
section { padding: 50px 20px; max-width: 1200px; margin: auto; }

/* --- HERO STRUTTURA GENERALE --- */
.hero { 
    text-align: center; 
    background-size: cover; 
    background-position: center; 
    padding: 80px 20px; 
    border-radius: 0 0 30px 30px; 
    color: var(--text-light); 
    border-bottom: 2px solid var(--aq-blue);
}
h1 { font-family: 'Montserrat', sans-serif; font-size: 2.2rem; font-weight: 900; margin-bottom: 10px; text-transform: uppercase; }
.hero p { font-size: 1.1rem; color: #ccc; }

/* --- SFONDI HERO DIFFERENZIATI (RISOLUZIONE ERRORE 404) --- */
/* Se la pagina è la Home nella root principale */
body:not(.pagina-interna) .hero {
    background: linear-gradient(rgba(26, 29, 35, 0.7), rgba(26, 29, 35, 0.7)), url("img/Idraulico-l'aquila.webp");
    background-size: cover; background-position: center;
}
/* Se la pagina è una sotto-pagina di quartiere (es. /quartiere/bellavista/) */
.hero {
    background: linear-gradient(rgba(26, 29, 35, 0.7), rgba(26, 29, 35, 0.7)), url("../../img/Idraulico-l'aquila.webp");
    background-size: cover; background-position: center;
}

/* --- PULSANTI E CONTENITORI --- */
.btn-container { display: flex; gap: 15px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }

/* Uniforma la struttura grafica di tutti i pulsanti azione delle zone e della home */
.btn-call, .btn-action { 
    font-family: 'Montserrat', sans-serif; font-weight: 700; background: var(--aq-blue); color: white;
    padding: 12px 35px; border-radius: 50px; text-decoration: none; text-transform: uppercase; 
    transition: all 0.3s ease; font-size: 0.9rem; letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 86, 179, 0.2); border: 2px solid transparent; cursor: pointer;
    display: inline-block;
}
.btn-call:hover, .btn-action:hover { background: transparent; border-color: var(--aq-blue); color: var(--aq-blue); transform: scale(1.05); }

/* Verde scuro WhatsApp - Intercetta sia la classe della Home (.btn-wa) sia la classe tripla delle zone (.btn-action.btn-wa) */
.btn-container .btn-wa, .btn-action.btn-wa { 
    background: #128c7e !important; 
    border-color: #128c7e !important; 
    color: white !important; 
    box-shadow: 0 4px 15px rgba(18, 140, 126, 0.2) !important; 
}
.btn-container .btn-wa:hover, .btn-action.btn-wa:hover { 
    background: transparent !important; 
    border-color: #128c7e !important; 
    color: #128c7e !important; 
    transform: scale(1.05) !important; 
}

/* --- ELEMENTI TIPOGRAFICI --- */
h2 { font-family: 'Montserrat', sans-serif; font-weight: 900; text-align:center; color: var(--anthracite-black); margin-bottom: 30px; text-transform: uppercase; }
h2::after { content: ''; display: block; width: 60px; height: 4px; background: var(--aq-blue); margin: 15px auto; }

/* --- GRIGLIA E SCHEDE (CARDS) --- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }

.card { background: var(--text-light); padding: 30px 20px; border-radius: 8px; border: 1px solid #ddd; transition: 0.4s ease; cursor: pointer; text-align: center; text-decoration: none; color: inherit; display: block; }
.card:hover { border-color: var(--aq-blue); transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0, 86, 179, 0.15); }

/* --- BOX DINAMICO INFO SERVIZI --- */
.info-seo-box { display:none; margin-top:30px; background: var(--text-light); border: 2px solid var(--anthracite-black); border-left: 8px solid var(--aq-blue); padding: 30px; border-radius: 4px; box-shadow: var(--shadow); }

/* --- COMPONENTI SEZIONI INTERNE DELLE ZONE (GEO & TESTO LUNGO) --- */
.geo-box { 
    background: white; 
    padding: 40px; 
    border-radius: 12px; 
    border-left: 10px solid var(--aq-blue); 
    box-shadow: var(--shadow); 
    margin-bottom: 40px; 
}
.geo-item { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    margin-bottom: 10px; 
    font-weight: 700; 
    color: #333; 
}

.seo-content-long { 
    line-height: 1.9; 
    color: #444; 
    font-size: 1.05rem; 
    background: #fff; 
    padding: 60px; 
    border-radius: 15px; 
    border: 1px solid #ddd; 
    box-shadow: var(--shadow); 
    margin-bottom: 60px; 
    text-align: left;
}
.seo-content-long h3 { 
    color: var(--aq-blue); 
    font-family: 'Montserrat', sans-serif; 
    font-weight: 900; 
    margin-top: 40px; 
    border-bottom: 2px solid #eee; 
    padding-bottom: 10px; 
    text-transform: uppercase; 
    font-size: 1.4rem; 
}
.seo-content-long p { 
    margin-bottom: 25px; 
}
.seo-content-long strong { color: var(--anthracite-black); }

/* --- STRUTTURA BOTTONI E LISTE TECNICI --- */
.tech-btn { 
    background: #2c313a; color: var(--text-light); border: 1px solid #444; 
    padding: 12px; cursor: pointer; transition: 0.3s; width: 100%; margin-bottom: 10px; 
    font-family: 'Montserrat', sans-serif; font-weight: 700; text-align: left; border-radius: 4px;
}
.tech-btn:hover { background: var(--aq-blue); border-color: var(--aq-blue); box-shadow: var(--blue-glow); }

.badge-20 { background: var(--aq-blue); color: var(--text-light); padding: 20px; font-family: 'Montserrat'; font-weight: 900; width: 140px; height: 140px; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 0.8rem; border-radius: 50%; margin: 20px auto; }

.list-container { display: none; text-align: left; margin-top: 20px; background: #1a1d23; padding: 20px; border-radius: 8px; border: 1px solid #3d444d; max-height: 300px; overflow-y: auto; }
.list-container a { display: block; color: #ccc; text-decoration: none; padding: 8px 0; border-bottom: 1px solid #333; font-family: 'Roboto'; font-size: 0.9rem; }
.list-container a:hover { color: var(--aq-blue); padding-left: 5px; transition: 0.3s; }

/* --- FOOTER --- */
footer { text-align: center; padding: 40px 20px; background: var(--anthracite-black); color: #888; font-size: 0.75rem; border-top: 2px solid var(--aq-blue); }