/* =========================================
   RESET E IMPOSTAZIONI DI BASE
   ========================================= */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; 
}

body { 
    background: #ffffff; 
    color: #333; 
    line-height: 1.6; 
    overflow-x: hidden; 
}

.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 20px; 
}

/* =========================================
   HEADER (Menu a destra)
   ========================================= */
header { 
    display: flex; 
    justify-content: flex-end; 
    align-items: center; 
    padding: 20px 8%; 
    background: #fff; 
    position: sticky; 
    top: 0; 
    z-index: 2000; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); 
}

.nav-links { 
    display: flex; 
    list-style: none; 
    gap: 40px; 
}

.nav-links a { 
    text-decoration: none; 
    color: #444; 
    font-weight: 600; 
    font-size: 0.95rem;
    transition: 0.3s; 
}

.nav-links a:hover { 
    color: #0056b3; 
}

/* =========================================
   HERO SECTION (Immagine Tunnel con Overlay)
   ========================================= */
.hero-section {
    position: relative;
    width: 100%;
    height: 400px; /* Altezza bloccata: così il grigio non si allarga più */
    background-image: url('/img/tunnel.jpg') !important; 
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Impedisce al contenuto di uscire dai bordi */
}
.hero-overlay-dark { 
    position: absolute;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(0, 0, 0, 0.55); 
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.hero-home { 
    height: 65vh; 
}

.hero-overlay-dark { 
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.55); /* Scurisce l'immagine per far leggere il testo */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 1;
}

.hero-text { 
    color: white; 
    padding: 0 20px; 
    z-index: 2;
}

.hero-text h1 { 
    font-size: 3.5rem; 
    font-weight: 900; 
    text-transform: uppercase; 
    margin-bottom: 10px; 
    letter-spacing: 2px; 
}

/* =========================================
   SEZIONI DI CONTENUTO
   ========================================= */
.content-section { 
    padding: 80px 0; 
    background: #ffffff; 
}

.section-title { 
    text-align: center; 
    margin-bottom: 50px; 
}

.section-title h2 { 
    font-size: 2.2rem; 
    color: #222; 
    text-transform: uppercase;
}

.line { 
    width: 60px; 
    height: 4px; 
    background: #0056b3; 
    margin: 15px auto; 
}

/* =========================================
   GRIGLIA CONTATTI (PAGINA CONTATTI)
   ========================================= */
.contact-grid-detailed { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 30px; 
}

.contact-card { 
    background: #fff; 
    padding: 40px 25px; 
    border-radius: 12px; 
    text-align: center; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.08); 
    border-top: 5px solid #0056b3; 
    transition: all 0.3s ease;
}

.contact-card:hover { 
    transform: translateY(-10px); 
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
}

.icon-circle { 
    font-size: 2.5rem; 
    margin-bottom: 20px; 
    display: block; 
}

.contact-card h3 { 
    color: #0056b3; 
    margin-bottom: 20px; 
    text-transform: uppercase; 
    font-size: 1.2rem; 
}

.contact-card p { 
    margin-bottom: 15px; 
    color: #333; 
}

.contact-card strong { 
    display: block; 
    margin-bottom: 5px; 
    font-size: 1.1rem;
}

.contact-card a { 
    color: #0056b3; 
    text-decoration: none; 
    font-weight: 600; 
}

/* =========================================
   ORGANIGRAMMA (STRUTTURA.PHP)
   ========================================= */
.org-block { 
    background: #f8f9fa; 
    padding: 35px; 
    border-radius: 10px; 
    border: 1px solid #eee; 
    margin-bottom: 30px; 
    text-align: center; 
}

.org-card { 
    background: white; 
    padding: 20px; 
    border-radius: 8px; 
    border-left: 5px solid #0056b3; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.06); 
    margin-bottom: 15px; 
}

/* =========================================
   GRIGLIA LAVORI (LAVORI.PHP)
   ========================================= */
.portfolio-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); 
    gap: 30px; 
}

.portfolio-item { 
    background: #fff; 
    border-radius: 10px; 
    overflow: hidden; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); 
    transition: 0.3s; 
}

.portfolio-item:hover { 
    transform: scale(1.03); 
}

.portfolio-img img { 
    width: 100%; 
    height: 250px; 
    object-fit: cover; 
}

.portfolio-info { 
    padding: 25px; 
}

.portfolio-info h3 { 
    color: #0056b3; 
    margin-bottom: 10px; 
}

/* =========================================
   FOOTER
   ========================================= */
footer { 
    background: #1a1a1a; 
    color: #888; 
    padding: 40px 0; 
    text-align: center; 
    font-size: 0.85rem; 
}

footer strong { 
    color: #bbb; 
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
    .hero-text h1 { font-size: 2.2rem; }
    header { justify-content: center; padding: 15px; }
    .nav-links { gap: 20px; }
    .hero-clean { background-attachment: scroll; }
}