/* --- IMPOSTAZIONI GLOBALI --- */
:root {
    --primary-color: #ffc107; /* Giallo industriale */
    --primary-color-dark: #e0a800;
    --dark-color: #212529;      /* Grigio scuro */
    --medium-gray: #495057;
    --light-gray: #f8f9fa;     /* Grigio chiarissimo */
    --white-color: #ffffff;
    --font-primary: 'Roboto', sans-serif;
    --font-headings: 'Roboto Condensed', sans-serif;
    
    --navbar-height: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--navbar-height) + 20px); /* Per anchor link */
}

body {
    font-family: var(--font-primary);
    line-height: 1.7;
    color: var(--dark-color);
    background-color: var(--white-color);
    padding-top: var(--navbar-height); /* Aggiunto per evitare che il contenuto finisca sotto la navbar fissa */
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 30px;
    width: 100%;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headings);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}
h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
}
ul {
    list-style-position: inside;
    margin-bottom: 1rem;
}
a {
    color: var(--primary-color-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}
a:hover {
    color: var(--dark-color);
}
img {
    max-width: 100%;
    height: auto;
    display: block;
}
.rounded-image {
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* --- CLASSI UTILITY --- */
.text-center { text-align: center; }
.lead-paragraph {
    font-size: 1.2rem;
    color: var(--medium-gray);
    font-weight: 400;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}
.bg-light {
    background-color: var(--light-gray);
}
.bg-dark {
    background-color: var(--dark-color);
    color: var(--white-color);
}
.bg-dark h2, .bg-dark p {
    color: var(--white-color);
}

/* --- BOTTONI --- */
.btn {
    display: inline-block;
    padding: 12px 28px;
    font-family: var(--font-headings);
    font-weight: 700;
    text-decoration: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    border: none;
}
.btn-primary {
    background-color: var(--primary-color);
    color: var(--dark-color);
}
.btn-primary:hover {
    background-color: var(--primary-color-dark);
    color: var(--dark-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.btn-secondary {
    background-color: var(--dark-color);
    color: var(--white-color);
}
.btn-secondary:hover {
    background-color: var(--medium-gray);
    color: var(--white-color);
}
.btn-nav {
    background-color: var(--primary-color);
    color: var(--dark-color) !important;
    padding: 8px 24px; 
    margin-left: 15px;
    display: inline-flex; 
    align-items: center; 
}
.btn-nav:hover {
    background-color: var(--primary-color-dark);
    color: var(--dark-color) !important;
}

/* --- HEADER / NAVBAR --- */
.main-header {
    background-color: var(--white-color);
    height: var(--navbar-height);
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: box-shadow 0.3s ease;
    border-bottom: 1px solid #eee; /* Aggiunto per separazione */
}
.main-header.scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    width: 100%; /* Occupa tutta la larghezza */
    padding: 0 30px; /* Spaziatura dai bordi */
}
.logo-img {
    height: 50px; 
    width: auto;
    vertical-align: middle;
}

/* Stile per il gruppo logo + bollino */
.navbar-left-group {
    display: flex;
    align-items: center;
    gap: 25px; /* Spazio tra logo e bollino */
}

/* Stile per il bollino in navbar */
.navbar-bollino {
    display: block; /* Assicura che sia visibile */
}
.navbar-bollino img {
    height: 90px; /* Altezza di default (mobile), allineata al logo-img mobile */
    width: auto;
}

/* MODIFICA: Rimossa la regola .nav-links duplicata e interrotta */
.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
}
.nav-links li {
    position: relative;
    margin-left: 30px;
}
.nav-links a {
    font-family: var(--font-headings);
    font-weight: 700;
    color: var(--dark-color);
    text-decoration: none;
    font-size: 0.95rem;
    padding: 8px 0; /* Allineato al padding verticale del bottone */
    display: inline-flex; 
    align-items: center; 
}
.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color-dark);
}
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--dark-color);
    cursor: pointer;
}

/* Dropdown */
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: -15px;
    background-color: var(--white-color);
    min-width: 240px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    z-index: 1001;
    border-top: 3px solid var(--primary-color);
    border-radius: 0 0 5px 5px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    
    list-style-type: none; 
    margin: 0;             
    padding: 5px 0;        
}
.dropdown-content li {
    padding: 0;
    margin: 0;
}
.dropdown-content a {
    padding: 10px 16px; 
    display: block;
    font-weight: 500;
    font-family: var(--font-primary);
}
.dropdown-content a:hover {
    background-color: var(--light-gray);
    color: var(--primary-color-dark);
}
.dropdown:hover .dropdown-content {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* --- SEZIONI CONTENUTO --- */
.content-section {
    padding: 80px 0;
}
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('images/hero-index.jpg') center center/cover no-repeat;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white-color);
    padding: 0 20px;
    margin-top: -80px; /* Compensa il padding-top del body */
}
.hero-content {
    max-width: 900px;
}
.hero-title {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    color: var(--white-color);
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}
.hero-section p {
    font-size: 1.3rem;
    max-width: 700px;
    margin: 0 auto 2.5rem auto;
    font-weight: 400;
    color: var(--white-color);
}
.hero-internal-page {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://images.unsplash.com/photo-1548484352-ea579e59146a?q=80&w=1974&auto=format&fit=crop') center center/cover no-repeat;
    height: 100vh; 
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white-color);
    padding: 0 20px;
    margin-top: -80px; /* Compensa il padding-top del body */
}
.hero-internal-page .hero-title {
    font-size: 3rem;
}
.hero-internal-page p {
    font-size: 1.2rem;
    color: var(--white-color);
    margin-bottom: 0;
}
/* Immagini diverse per eroi interni */       
#hero-azienda { 
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('images/hero-azienda.jpg'); 
}
#hero-servizi { 
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('images/hero-pavimentazioni.jpg'); 
}
#hero-progetti { 
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('images/hero-case-history.jpg'); 
}
#hero-contatti { 
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('images/hero-contatti.jpg'); 
}
/* --- GRIGLIA ICONE (index) --- */
.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 4rem;
}
a.icon-item-link { 
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}
.icon-item {
    background-color: var(--white-color);
    border-radius: 8px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.08); 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    text-align: left;
    overflow: hidden; /* Per contenere l'immagine */
}
.icon-item-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    margin-bottom: 1.5rem;
}
.icon-item h4 {
    margin-bottom: 0.5rem;
    padding: 0 25px;
}
.icon-item p {
    padding: 0 25px 25px 25px;
}
.icon-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.12);
}

/* --- GRIGLIA CARDS (index "why-us") --- */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.card {
    background-color: var(--white-color);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.12);
}
.card-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* --- PAGINA AZIENDA --- */
.about-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}
.about-image img {
    width: 100%;
    height: auto;
}

.icon-grid-values {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 4rem;
    text-align: center;
}
.icon-item-value {
    background-color: var(--white-color);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
.icon-item-value i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* --- PAGINA PAVIMENTAZIONI --- */
.internal-nav {
    background-color: var(--light-gray);
    padding: 15px 0;
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: var(--navbar-height);
    z-index: 900;
}
.internal-nav .container {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}
.internal-nav a {
    font-family: var(--font-headings);
    font-weight: 700;
    color: var(--medium-gray);
    padding: 5px 10px;
    border-radius: 5px;
}
.internal-nav a:hover {
    color: var(--dark-color);
    background-color: #e0e0e0;
}

.service-detail-block {
    display: grid;
    grid-template-columns: 1fr; /* Modificato: layout a colonna singola */
    gap: 30px;
    padding-bottom: 4rem;
    margin-bottom: 4rem;
    border-bottom: 1px solid #eee;
}
.service-detail-block:last-child {
    border-bottom: none;
    margin-bottom: 0;
}
.service-detail-block ul {
    list-style-type: '✔';
    padding-left: 20px;
}
.service-detail-block ul li {
    padding-left: 10px;
    margin-bottom: 0.5rem;
}

/* Nuova Galleria Immagini */
.service-gallery-wrapper {
    overflow-x: auto;
    padding: 10px 0;
    margin-top: 1.5rem;
    background: #f1f1f1;
    border-radius: 8px;
    /* Stile per la scrollbar (opzionale) */
    scrollbar-width: thin;
    scrollbar-color: var(--medium-gray) #f1f1f1;
}
.service-gallery-wrapper::-webkit-scrollbar {
    height: 8px;
}
.service-gallery-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}
.service-gallery-wrapper::-webkit-scrollbar-thumb {
    background-color: var(--medium-gray);
    border-radius: 4px;
}

.service-gallery {
    display: flex;
    gap: 15px;
    padding: 0 15px; /* Spaziatura interna per le foto */
}
.service-gallery img {
    width: 320px;
    height: 240px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    flex-shrink: 0; /* Impedisce alle immagini di restringersi */
}

/* --- PAGINA CASE HISTORY (MODIFICATA) --- */
.client-list {
    list-style-type: none;
    padding: 0;
    margin: 3rem 0 0 0;
    columns: 3;
    column-gap: 40px;
}

.client-list li {
    font-size: 1.1rem;
    color: var(--dark-color);
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 10px;
    /* Per evitare che un item si spezzi tra le colonne */
    break-inside: avoid-column;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
}

/* Aggiungo un'icona per stile */
.client-list li::before {
    content: '■'; /* Un quadratino solido */
    color: var(--primary-color);
    margin-right: 15px;
    font-size: 0.8rem;
    vertical-align: middle;
}


/* --- PAGINA CONTATTI --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px;
    background-color: var(--light-gray);
    padding: 40px;
    border-radius: 8px;
    align-items: start; 
}
.contact-info h3 {
    margin-bottom: 1.5rem;
}
.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 1.5rem;
}
.contact-item i {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-top: 5px;
    width: 20px;
    text-align: center;
}
.contact-item p {
    margin-bottom: 0;
}
.contact-item a {
    color: var(--dark-color);
    font-weight: 500;
}
.contact-item a:hover {
    color: var(--primary-color-dark);
}

.contact-form h3 {
    margin-bottom: 1.5rem;
}
.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 5px;
    font-family: var(--font-primary);
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: var(--font-primary);
    font-size: 1rem;
    background-color: var(--white-color);
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.3);
}
.contact-form button {
    width: 100%;
}
.gmap-placeholder {
    background-color: #e0e0e0;
    width: 100%;
    height: 450px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #888;
    text-align: center;
}
.gmap-placeholder i { font-size: 3rem; margin-bottom: 1rem; }
.gmap-placeholder p { font-size: 1.2rem; margin-bottom: 0.5rem; }
/* Rimuove il padding dalla sezione che contiene la mappa */
section#map {
    padding: 0;
    line-height: 0; 
}
/* Rende l'iframe al 100% della larghezza e imposta un'altezza fissa */
section#map iframe {
    width: 100%;
    height: 450px;
    border: 0;
    display: block; 
}
/* --- FOOTER --- */
.main-footer {
    background-color: var(--dark-color);
    color: #ccc;
    padding: 30px 0;
    font-size: 0.9rem;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}
.footer-info p {
    margin: 0;
    color: #ccc;
}
.footer-social a {
    color: #ccc;
    font-size: 1.4rem;
    margin-left: 15px;
}
.footer-social a:hover {
    color: var(--primary-color);
}
/* MODIFICA: Rimossa la regola .footer-left-group (obsoleta) */

/* --- RESPONSIVE --- */

/* Regola dimensione bollino per tablet e desktop */
@media (min-width: 769px) {
    .navbar-bollino img {
        height: 90px; /* Allinea all'altezza del logo (50px) */
    }
}

@media (max-width: 992px) {
    h1 { font-size: 2.8rem; }
    .hero-title { font-size: 3rem; }
    .hero-internal-page .hero-title { font-size: 2.5rem; }
    .lead-paragraph { font-size: 1.1rem; }
    
    .about-content-grid { grid-template-columns: 1fr; }
    .about-image { order: -1; }
    
    .contact-grid { grid-template-columns: 1fr; }

    /* Case History Responsive */
    .client-list {
        columns: 2;
    }
}

@media (max-width: 768px) {
    :root { --navbar-height: 70px; }
    body { padding-top: var(--navbar-height); }
    h1 { font-size: 2.2rem; }
    h2 { font-size: 2rem; }
    .hero-title { font-size: 2.5rem; }
    .hero-section, .hero-internal-page { 
        height: 100vh; 
        margin-top: -70px;
    } 
    .content-section { padding: 60px 0; }

    .navbar { padding: 0 20px; } /* Meno padding su mobile */
    .logo-img { height: 40px; }

    .menu-toggle {
        display: block;
        z-index: 1002;
    }
    .nav-links {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: var(--white-color);
        padding-top: var(--navbar-height);
        align-items: flex-start;
        padding: 80px 30px 30px 30px;
        overflow-y: auto;
    }
    .nav-links.active {
        display: flex;
    }
    .nav-links li {
        margin: 0;
        width: 100%;
    }
    .nav-links a {
        padding: 15px 0;
        display: block;
        width: 100%;
        font-size: 1.2rem;
        border-bottom: 1px solid var(--light-gray);
    }
    .btn-nav {
        margin: 15px 0 0 0;
        padding: 12px 28px;
        text-align: center;
        width: 100%;
    }
    
    /* Dropdown mobile */
    .dropdown .fa-caret-down { display: none; }
    .dropdown-content {
        position: static;
        display: none;
        box-shadow: none;
        border: none;
        background-color: var(--light-gray);
        min-width: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        border-radius: 0;
        margin: 0; /* Resetta margine mobile */
        padding: 0; /* Resetta padding mobile */
    }
    .dropdown.active .dropdown-content {
        display: block;
    }
    .dropdown-content li {
        margin: 0;
    }
    .dropdown-content a {
        padding-left: 20px;
        font-size: 1rem;
        font-weight: 700;
        color: var(--medium-gray);
    }

    .internal-nav { top: 70px; }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    .footer-social { margin-top: 15px; }
    .footer-social a { margin: 0 10px; }

    /* Case History Responsive */
    .client-list {
        columns: 1;
    }
}
/* --- Stili Lightbox --- */
/* Stile per l'immagine nella galleria per far capire che è cliccabile */
.service-gallery img {
    width: 320px;
    height: 240px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    flex-shrink: 0; 
    cursor: pointer; /* Aggiunto */
    transition: transform 0.2s ease; /* Aggiunto */
}
.service-gallery img:hover {
    transform: scale(1.03); /* Aggiunto: leggero zoom on hover */
}
/* L'overlay a tutto schermo (nascosto di default) */
#lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    display: none; /* Nascosto di default */
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}
/* L'immagine all'interno dell'overlay */
#lightbox-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 5px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s ease;
}
/* Il bottone di chiusura (la 'X') */
#lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 3rem;
    color: var(--white-color);
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}
#lightbox-close:hover {
    color: var(--primary-color);
}
/* Stili per i bottoni di navigazione Lightbox */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    color: var(--white-color);
    cursor: pointer;
    padding: 10px 20px;
    user-select: none; /* Impedisce di selezionare il testo della freccia */
    transition: color 0.2s ease;
    z-index: 2001; /* Assicura che siano sopra l'immagine */
}
.lightbox-nav:hover {
    color: var(--primary-color);
}
#lightbox-prev {
    left: 20px;
}
#lightbox-next {
    right: 20px;
}
/* Classe utility per nascondere le frecce */
.lightbox-nav.hidden {
    display: none;
}
/* Animazioni per l'effetto */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
/* --- Stili per CTA Box in Pagina Contatti --- */
/* Rimuove lo stile del form (non più necessario) */
.contact-form {
    display: none;
}
/* Stile per il box CTA che sostituisce il form */
.contact-cta {
    background-color: var(--white-color); /* Sfondo bianco per staccare dal grigio */
    padding: 40px;
    border-radius: 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%; 
    border: 2px dashed var(--primary-color); /* Bordo per evidenziare */
}
.contact-cta-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}
.contact-cta h3 {
    font-family: var(--font-headings);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}
.contact-cta p {
    font-size: 1rem;
    color: var(--medium-gray);
    margin-bottom: 2rem;
    max-width: 400px; /* Limita la larghezza del testo */
}
.contact-cta .btn {
    width: auto; /* Bottone a larghezza automatica */
    padding-left: 30px;
    padding-right: 30px;
}