/* Gradient Continuo - Eliminazione TOTALE degli stacchi */

/* Reset completo per tutte le sezioni del gradient */
.services-modern,
.about-enterprise,
.values-section-modern,
.team-section,
.projects-enterprise,
.testimonials,
.contact {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    position: relative;
    width: 100%;
    min-height: auto;
}

/* Container con padding uniforme per il contenuto */
.services-modern .services-container,
.about-enterprise .about-enterprise-container,
.values-section-modern .container,
.team-section .team-container,
.projects-enterprise .container,
.testimonials .container,
.contact .container {
    padding: 8rem 2rem !important;
    margin: 0 auto;
    max-width: 1200px;
    width: 100%;
    position: relative;
    z-index: 2;
}

/* Forza l'adiacenza delle sezioni */
.services-modern + .about-enterprise,
.about-enterprise + .values-section-modern,
.values-section-modern + .team-section,
.team-section + .projects-enterprise,
.projects-enterprise + .testimonials,
.testimonials + .contact {
    margin-top: 0 !important;
}

/* Override specifici per eliminare qualsiasi spazio */
.services-modern::before,
.services-modern::after,
.about-enterprise::before,
.about-enterprise::after,
.values-section-modern::before,
.values-section-modern::after,
.team-section::before,
.team-section::after,
.projects-enterprise::before,
.projects-enterprise::after,
.testimonials::before,
.testimonials::after,
.contact::before,
.contact::after {
    margin: 0 !important;
    padding: 0 !important;
}

/* Gradient Continuo - Reset TOTALE margini e padding */

/* Reset brutale per eliminare TUTTI i margini e padding dalle sezioni */
section, .section {
    margin: 0 !important;
}

/* Override specifico per le sezioni del gradient */
#services,
#about,
#about-values,
#team,
#projects,
.testimonials,
#contact {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    display: block !important;
}

/* Eliminazione di eventuali margini dai wrapper */
#main-content-wrapper {
    margin: 0 !important;
    padding: 0 !important;
}

/* Override aggressivo per elementi pseudo che potrebbero creare spazi */
.team-floating-decoration,
.about-floating-decoration,
.contact-floating-decoration,
.projects-bg-gradient,
.testimonials-bg,
.particles-background {
    margin: 0 !important;
    padding: 0 !important;
    top: 0;
    bottom: 0;
}

/* Fix specifico per backdrop-filter che potrebbe causare problemi */
.values-section-modern {
    backdrop-filter: none !important;
}

/* Fix specifico per Team -> Projects */
.team-section + .projects-enterprise,
#team + #projects {
    margin-top: 0 !important;
    border-top: none !important;
    padding-top: 0 !important;
}

/* Override specifico per elementi che potrebbero creare distacco */
.team-section::after,
.projects-enterprise::before {
    display: none !important;
}

/* Allineamento dei gradient per fusione perfetta */
.team-section {
    background: linear-gradient(180deg, 
        #334155 0%, 
        #475569 20%, 
        #1e293b 40%, 
        #0a0a0a 60%, 
        #1a1a2e 80%, 
        #1e293b 100%) !important;
}

.projects-enterprise {
    background: linear-gradient(180deg, 
        #1e293b 0%, 
        #334155 20%, 
        #475569 40%, 
        #334155 60%, 
        #1e293b 80%, 
        #0f172a 100%) !important;
}

/* Fix specifico per Projects -> Testimonials (Stessa logica di Team -> Projects) */
.projects-enterprise + .testimonials,
#projects + .testimonials {
    margin-top: 0 !important;
    border-top: none !important;
    padding-top: 0 !important;
}

/* Override specifico per elementi che potrebbero creare distacco */
.projects-enterprise::after,
.testimonials::before {
    display: none !important;
}

/* FIX TRANSIZIONE PROGETTI -> TESTIMONIALS */
/* Eliminazione distacco tra sezione Progetti e Testimonials */
html body .projects-enterprise,
html body #projects.projects-enterprise {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    border-bottom: none !important;
    /* Assicura che il gradient termini con il colore giusto */
    background: linear-gradient(180deg, 
        #1e293b 0%, 
        #334155 20%, 
        #475569 40%, 
        #334155 60%, 
        #1e293b 80%, 
        #0f172a 100%) !important;
}

html body .testimonials {
    margin-top: 0 !important;
    padding-top: 0 !important;
    border-top: none !important;
    /* Assicura che il gradient inizi con il colore giusto */
    background: linear-gradient(180deg, 
        #0f172a 0%, 
        #1e293b 25%, 
        #334155 50%, 
        #475569 75%, 
        #1e293b 100%) !important;
}

/* Rimozione elementi decorativi che possono causare distacchi */
html body .projects-bg-gradient,
html body .testimonials-bg,
html body .testimonials-floating-decoration {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Override aggressivo per pseudo-elementi delle due sezioni */
html body .projects-enterprise::before,
html body .projects-enterprise::after,
html body .testimonials::before,
html body .testimonials::after {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    outline: none !important;
}

/* Assicura che i container interni non abbiano margini problematici */
html body .projects-enterprise .container,
html body .testimonials .container {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    border: none !important;
}

/* Fix specifico per l'ultimo elemento della sezione progetti */
html body .projects-enterprise .projects-enterprise-grid,
html body .projects-enterprise .project-enterprise-card:last-child {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Fix specifico per il primo elemento della sezione testimonials */
html body .testimonials .section-header,
html body .testimonials .testimonials-slider-container {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* FIX TRANSIZIONE VALORI -> TEAM */
/* Eliminazione totale di ogni distacco tra Valori e Team */

/* Reset completo delle sezioni adiacenti */
html body .values-section-modern + .team-section,
html body #about-values + #team {
    margin-top: 0 !important;
    border-top: none !important;
    padding-top: 0 !important;
    outline: none !important;
}

/* Sezione Valori - fine perfetta */
html body .values-section-modern {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    border-bottom: none !important;
    outline: none !important;
    /* Gradient che termini con colore che si fonde con l'inizio del Team */
    background: linear-gradient(180deg, 
        rgba(31, 41, 55, 0.9) 0%, 
        rgba(55, 65, 81, 0.85) 40%, 
        rgba(51, 65, 85, 0.95) 70%, 
        #334155 100%) !important;
}

/* Sezione Team - inizio perfetto */
html body .team-section {
    margin-top: 0 !important;
    padding-top: 0 !important;
    border-top: none !important;
    outline: none !important;
    /* Gradient che inizia con lo stesso colore con cui termina Valori */
    background: linear-gradient(180deg, 
        #334155 0%, 
        #475569 20%, 
        #1e293b 40%, 
        #0a0a0a 60%, 
        #1a1a2e 80%, 
        #1e293b 100%) !important;
}

/* Eliminazione elementi decorativi problematici */
html body .values-floating-decoration,
html body .team-floating-decoration {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Override pseudo-elementi */
html body .values-section-modern::before,
html body .values-section-modern::after,
html body .team-section::before,
html body .team-section::after {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    outline: none !important;
}

/* Container interni perfetti */
html body .values-section-modern .container {
    margin-bottom: 0 !important;
    padding-bottom: 2rem !important;
}

html body .team-section .team-container {
    margin-top: 0 !important;
    padding-top: 2rem !important;
}

/* Ultimo elemento Valori */
html body .values-section-modern .values-grid {
    margin-bottom: 0 !important;
}

/* Primo elemento Team */
html body .team-section .team-header {
    margin-top: 0 !important;
}

/* Ultra-specificity per garantire che non ci siano gap */
html body main .values-section-modern,
html body main .team-section {
    display: block !important;
    float: none !important;
    clear: none !important;
}

/* FIX TRANSIZIONE CHI SIAMO -> VALORI */
/* Eliminazione totale di ogni distacco tra Chi Siamo e I nostri valori */

/* Reset completo delle sezioni adiacenti */
html body .about-enterprise + .values-section-modern,
html body #about + #about-values {
    margin-top: -60px !important; /* Sovrapposizione maggiore per garantire continuità */
    border-top: none !important;
    padding-top: 0 !important;
    outline: none !important;
}

/* Sezione Chi Siamo - fine perfetta */
html body .about-enterprise {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    border-bottom: none !important;
    outline: none !important;
    /* Gradient che termini con colore che si fonde perfettamente con l'inizio dei Valori */
    background: linear-gradient(135deg, 
        #1e293b 0%, 
        #334155 25%, 
        #475569 50%, 
        #334155 75%, 
        #1f2937 100%) !important;
    position: relative !important;
    z-index: 10 !important;
}

/* Sezione Valori - inizio perfetto */
html body .values-section-modern {
    margin-top: -60px !important; /* Sovrapposizione maggiore per eliminare il distacco */
    padding-top: 60px !important; /* Compensa la sovrapposizione */
    border-top: none !important;
    outline: none !important;
    /* Gradient che inizia con lo stesso colore con cui termina Chi Siamo (#1f2937) */
    background: linear-gradient(180deg, 
        #1f2937 0%, /* Colore esatto finale dall'about-enterprise */
        rgba(31, 41, 55, 0.95) 10%,
        rgba(55, 65, 81, 0.9) 30%, 
        rgba(51, 65, 85, 0.95) 60%, 
        #334155 100%) !important;
    position: relative !important;
    z-index: 9 !important;
}

/* Eliminazione elementi decorativi problematici */
html body .about-floating-decoration,
html body .values-floating-decoration {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Override pseudo-elementi */
html body .about-enterprise::before,
html body .about-enterprise::after,
html body .values-section-modern::before,
html body .values-section-modern::after {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    outline: none !important;
}

/* Container interni perfetti */
html body .about-enterprise .about-enterprise-container,
html body .about-enterprise .container {
    margin-bottom: 0 !important;
    padding-bottom: 2rem !important;
}

html body .values-section-modern .container {
    margin-top: 0 !important;
    padding-top: 2rem !important;
}

/* Ultimo elemento Chi Siamo */
html body .about-enterprise .about-enterprise-content,
html body .about-enterprise .about-enterprise-image {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Primo elemento Valori */
html body .values-section-modern .values-header {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Ultra-specificity per garantire che non ci siano gap */
html body main .about-enterprise,
html body main .values-section-modern {
    display: block !important;
    float: none !important;
    clear: none !important;
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
    .services-modern .services-container,
    .about-enterprise .about-enterprise-container,
    .values-section-modern .container,
    .team-section .team-container,
    .projects-enterprise .container,
    .testimonials .container,
    .contact .container {
        padding: 6rem 1.5rem !important;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .services-modern .services-container,
    .about-enterprise .about-enterprise-container,
    .values-section-modern .container,
    .team-section .team-container,
    .projects-enterprise .container,
    .testimonials .container,
    .contact .container {
        padding: 4rem 1rem !important;
    }
}

@media (max-width: 480px) {
    .services-modern .services-container,
    .about-enterprise .about-enterprise-container,
    .values-section-modern .container,
    .team-section .team-container,
    .projects-enterprise .container,
    .testimonials .container,
    .contact .container {
        padding: 3rem 1rem !important;
    }
}

/* FIX SPECIFICO PER IL DISTACCO VISIBILE TRA STATISTICHE E VALORI */
/* Eliminazione completa della separazione tra statistiche e la sezione I nostri valori */

/* Modifica al margine della griglia statistiche */
html body .about-enterprise .about-stats-main {
    margin-bottom: 0 !important;
    padding-bottom: 30px !important; /* Aggiungo padding per dare spazio al gradient */
    position: relative !important;
    z-index: 10 !important;
}

/* Assicura che le card statistiche non creino spazio sotto */
html body .about-enterprise .about-stat-main-card {
    margin-bottom: 0 !important;
    position: relative !important;
    z-index: 15 !important; /* Z-index alto per mantenere visibilità */
    transform: translateZ(0); /* Forza hardware acceleration */
}

/* Forza un colore di sfondo uguale per entrambe le sezioni nell'area di congiunzione */
html body .about-enterprise::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 150px !important; /* Altezza maggiore per coprire meglio l'area di transizione */
    background: linear-gradient(to bottom, 
        transparent 0%, 
        #1f2937 100%) !important; /* Uso lo stesso colore finale di about-enterprise */
    z-index: 5 !important;
    pointer-events: none !important;
    opacity: 0.9 !important; /* Leggera trasparenza per blend migliore */
}

/* Modifica all'inizio della sezione Valori per allinearsi con About */
html body .values-section-modern {
    margin-top: -80px !important; /* Valore negativo maggiore per una sovrapposizione più ampia */
    padding-top: 80px !important; /* Compensa la sovrapposizione */
    position: relative !important;
    z-index: 9 !important; /* Valore inferiore a quello delle card statistiche */
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%) !important; /* Evita problemi di overflow */
}

/* Container dei valori senza padding superiore eccessivo ma con spazio sufficiente */
html body .values-section-modern .container {
    padding-top: 7rem !important; /* Più spazio per garantire che i contenuti siano visibili dopo la sovrapposizione */
    position: relative !important;
    z-index: 2 !important;
}

/* Assicura che non ci siano decorazioni o elementi che potrebbero creare spazi */
html body .about-enterprise .about-enterprise-container {
    padding-bottom: 30px !important; /* Un po' di padding per dare spazio al gradient */
    margin-bottom: 0 !important;
}

/* Elementi header nella sezione valori - visibilità garantita */
html body .values-section-modern .values-header {
    position: relative !important;
    z-index: 5 !important;
    margin-top: 20px !important; /* Spazio aggiuntivo dopo la sovrapposizione */
}

/* Assicura che le sezioni sono adiacenti nel DOM con sovrapposizione maggiore */
html body #about + #about-values {
    margin-top: -80px !important;
}

/* Card valori - assicura la corretta visualizzazione */
html body .values-section-modern .value-card {
    position: relative !important;
    z-index: 6 !important;
    transform: translateZ(0); /* Forza hardware acceleration */
}

/* FIX TRANSIZIONE SERVIZI -> CHI SIAMO */
/* Eliminazione totale di ogni distacco tra Soluzioni IT e La nostra storia */

/* Reset completo delle sezioni adiacenti */
html body .services-modern + .about-enterprise,
html body #services + #about {
    margin-top: -40px !important; /* Sovrapposizione per eliminare il distacco */
    padding-top: 40px !important; /* Compensa la sovrapposizione */
    border-top: none !important;
    outline: none !important;
}

/* Sezione Servizi - fine perfetta */
html body .services-modern {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    border-bottom: none !important;
    outline: none !important;
    /* Gradient che termini con colore che si fonde con l'inizio di Chi Siamo */
    background: linear-gradient(135deg, 
        #0f172a 0%, 
        #1e293b 25%, 
        #334155 50%, 
        #1e293b 75%, 
        #1e293b 100%) !important;
    position: relative !important;
    z-index: 9 !important;
}

/* Sezione Chi Siamo - inizio perfetto */
html body .about-enterprise {
    margin-top: -40px !important;
    padding-top: 40px !important;
    border-top: none !important;
    outline: none !important;
    /* Gradient che inizia con lo stesso colore con cui termina Servizi */
    background: linear-gradient(135deg, 
        #1e293b 0%, 
        #334155 25%, 
        #475569 50%, 
        #334155 75%, 
        #1f2937 100%) !important;
    position: relative !important;
    z-index: 8 !important;
}

/* Eliminazione elementi decorativi problematici */
html body .services-floating-decoration,
html body .about-floating-decoration {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Override pseudo-elementi */
html body .services-modern::before,
html body .services-modern::after,
html body .about-enterprise::before,
html body .about-enterprise::after {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    outline: none !important;
}

/* Container interni perfetti */
html body .services-modern .services-container {
    margin-bottom: 0 !important;
    padding-bottom: 6rem !important;
}

html body .about-enterprise .about-enterprise-container,
html body .about-enterprise .container {
    margin-top: 0 !important;
    padding-top: 6rem !important;
}

/* Ultimo elemento Servizi */
html body .services-modern .services-grid,
html body .services-modern .service-card:last-child {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Primo elemento Chi Siamo */
html body .about-enterprise .about-enterprise-header,
html body .about-enterprise .about-header {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Ultra-specificity per garantire che non ci siano gap */
html body main .services-modern,
html body main .about-enterprise {
    display: block !important;
    float: none !important;
    clear: none !important;
}

/* ELIMINAZIONE OVERLAY TRANSIZIONI TRA SERVICES E ABOUT */
/* Disabilita tutti gli overlay pseudo-elementi tra Services e About per rendere omogenea la transizione */
html body .services-modern::after {
    display: none !important;
    content: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

html body .about-enterprise::before {
    display: none !important;
    content: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* INVERTED BACKGROUND FOR SERVICES (mirror of About) */
/* Applica lo stesso gradient di .about-enterprise ma capovolto (destra-sinistra) alla sezione Servizi */
html body #services.services-modern {
    /* Gradient invertito orizzontalmente: 135deg - 90deg = 45deg, stessi colori dell'About */
    background: linear-gradient(45deg,
        #1e293b 0%,
        #334155 25%,
        #475569 50%,
        #334155 75%,
        #1f2937 100%) !important;
}
