/* Reset e Stili Base */
:root {
    --primary-color: #5E72E4; /* Un blu indaco più moderno */
    --secondary-color: #2DCE89; /* Un verde acqua brillante */
    --dark-color: #202945; /* Un blu/grigio scuro profondo */
    --light-color: #f7fafc; /* Un grigio molto chiaro, quasi bianco */
    --text-color: #030b20; /* Blu scuro per il testo principale */
    --text-light: #e9ecef; /* Testo chiaro su sfondi scuri */
    --font-family: 'Poppins', sans-serif;
    --box-shadow-light: 0 4px 6px rgba(50,50,93,.11), 0 1px 3px rgba(0,0,0,.08);
    --box-shadow-medium: 0 7px 14px rgba(50,50,93,.1), 0 3px 6px rgba(0,0,0,.08);
    --border-radius: 8px; /* Un po' più arrotondato */
}

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

html {
    scroll-behavior: smooth; /* Abilita lo scroll morbido per i link # */
}

body {
    font-family: var(--font-family);
    line-height: 1.7;
    color: var(--text-color);
    background-color: #fff;
    font-weight: 400; /* Peso di base */
}

.container {
    max-width: 1140px; /* larghezza */
    margin: 0 auto;
    padding: 0 15px; /* Padding laterale uniforme */
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}
a:hover {
    color: var(--secondary-color);
}

ul { list-style: none; }

h1, h2, h3, h4 {
    margin-bottom: 1.2rem;
    line-height: 1.3;
    font-weight: 600; /* Peso per i titoli */
    color: var(--dark-color);
}
h1 { font-size: clamp(2.5em, 5vw, 3.8em); /* Dimensione fluida */ }
h2 { font-size: clamp(2em, 4vw, 2.8em); text-align: center; margin-bottom: 3rem; }
h3 { font-size: 1.6em; }
h4 { font-size: 1.2em; }

section {
    padding: 80px 0;
}


/* Utility Classes */
.btn {
    display: inline-block;
    padding: 12px 30px; /* Padding aumentato */
    border-radius: var(--border-radius);
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    text-transform: uppercase; /* Testo in maiuscolo per i bottoni */
    letter-spacing: 0.5px;
    font-size: 0.9em;
}
.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 6px rgba(50,50,93,.11), 0 1px 3px rgba(0,0,0,.08);
}
.btn-primary:hover {
    background-color: #485ac0; /* Scurisci leggermente */
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(50,50,93,.1), 0 3px 6px rgba(0,0,0,.08);
}
.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
    box-shadow: 0 4px 6px rgba(50,50,93,.11), 0 1px 3px rgba(0,0,0,.08);
}
.btn-secondary:hover {
    background-color: #22b875; /* Scurisci leggermente */
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(50,50,93,.1), 0 3px 6px rgba(0,0,0,.08);
}
.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}
.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}
.btn-lg {
    padding: 16px 40px;
    font-size: 1em;
}


/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.95); /* Sfondo leggermente trasparente */
    backdrop-filter: blur(10px); /* Effetto blur per browser che lo supportano */
    color: var(--dark-color);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); /* Ombra più sottile */
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.navbar.scrolled {
    background: white;
    box-shadow: var(--box-shadow-light);
}
.navbar .container { display: flex; justify-content: space-between; align-items: center; }
.navbar .logo {
    font-size: 1.9em;
    font-weight: 700;
    color: var(--dark-color); /* Colore del testo */
    display: inline-flex; /* Allinea icona (sfondo) e testo */
    align-items: center; /* Allinea verticalmente */
    background-image: url('images/Contabile365_logo_trasparente.png'); /* Percorso della tua icona */
    background-repeat: no-repeat;
    background-position: left center; /* Immagine a sinistra, centrata verticalmente */
    background-size: cover; 
    padding-left: 40px; 
    min-height: 35px; 
    text-decoration: none;
	height:60px;
	width:300px
}

.navbar .logo:hover {
    opacity: 0.8; 
}
.navbar nav ul { display: flex; align-items: center; }
.navbar nav ul li { margin-left: 25px; }
.navbar nav ul li a {
    color: var(--text-color);
    font-weight: 500; 
    padding: 8px 0; 
    position: relative; 
}
.navbar nav ul li a::after { /* Sottolineatura animata */
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}
.navbar nav ul li a:hover::after,
.navbar nav ul li a.active::after {
    width: 100%;
}
.navbar nav ul li a.active { color: var(--primary-color); }
.navbar nav ul li .btn {
    margin-left: 20px;
    padding: 8px 18px;
    font-size: 0.85em;
}
.menu-toggle { display: none; background: none; border: none; font-size: 2em; color: var(--dark-color); cursor: pointer; }

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-color) 100%);
    color: var(--text-light);
    padding: 180px 0 120px;
    text-align: center;
    position: relative; 
    overflow: hidden; 
}
/* Elementi decorativi per la Hero section */
.hero-section::before, .hero-section::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    pointer-events: none;
}
.hero-section::before { /* Cerchio grande */
    width: 400px; height: 400px; background: rgba(255,255,255,0.1); top: -100px; left: -150px;
}
.hero-section::after { /* Cerchio più piccolo */
    width: 250px; height: 250px; background: rgba(255,255,255,0.15); bottom: -80px; right: -100px;
}
.hero-section .container { position: relative; z-index: 1; } 
.hero-section h1 {
    color: #fff;
    font-weight: 700; 
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.hero-section .subtitle {
    font-size: 1.25em; 
    margin-bottom: 3rem;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
    font-weight: 300; 
}
.hero-image-placeholder {
    margin-top: 3rem;
    animation: float 6s ease-in-out infinite;
}
.hero-image-placeholder .fas {
    font-size: 6em;
    color: rgba(255,255,255,0.7);
    text-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
@keyframes float {
	0% { transform: translatey(0px); }
	50% { transform: translatey(-10px); }
	100% { transform: translatey(0px); }
}


/* Features Section */
.features-section {
    padding: 100px 0;
    background-color: #fff; /* Sfondo bianco per stacco */
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 35px; /* Aumentato il gap per esigenze grafiche nella landing*/
}
.feature-item {
    background: var(--light-color); /* Sfondo card*/
    padding: 35px;
    border-radius: var(--border-radius);
    text-align: center;
    border: 1px solid #e3e8ee; /* Bordo sottile */
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.feature-item:hover {
    transform: translateY(-8px); /* Sollevo di più qui*/
    box-shadow: var(--box-shadow-medium);
    border-color: var(--primary-color);
}
.feature-icon {
    font-size: 2.8em;
    color: var(--primary-color);
    margin-bottom: 1.2rem;
    /* background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; */
}
.feature-item h3 {
    margin-bottom: 0.8rem;
    font-weight: 600;
}
.feature-item p {
    font-size: 0.95em;
    color: var(--text-color);
}

/* CTA Section */
.cta-section {
    background: var(--dark-color);
    color: var(--text-light);
    padding: 80px 0;
    text-align: center;
}
.cta-section h2 { color: #fff; margin-bottom: 1rem; }
.cta-section p { font-size: 1.15em; margin-bottom: 2.5rem; opacity: 0.85; }
.cta-section .btn-primary {
    background-color: var(--secondary-color); /* Verde per la CTA principale */
    color: white;
    border: none;
}
.cta-section .btn-primary:hover { background-color: #22b875; }


/* Pricing Section (se attiva) */
.pricing-section { padding: 100px 0; background-color: var(--light-color); }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 35px; }
.pricing-plan {
    background: #fff;
    padding: 35px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--box-shadow-light);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.pricing-plan:hover { transform: translateY(-5px); box-shadow: var(--box-shadow-medium); }
.pricing-plan.popular { border: 3px solid var(--primary-color); transform: scale(1.03) translateY(-5px); }
.popular-badge { /* Stesso di prima, stavolta è ok */ }
.pricing-plan h3 { color: var(--dark-color); text-transform: uppercase; font-size: 1.2em; letter-spacing: 1px;}
.pricing-plan .price { font-size: 3em; font-weight: 700; color: var(--primary-color); margin: 1rem 0; }
.pricing-plan .price span { font-size: 0.4em; font-weight: 500; color: #777; }
.pricing-plan > p:first-of-type { 
    font-style: italic; color: #888; margin-bottom: 1.5rem;
}
.pricing-plan ul { margin: 1.5rem 0; text-align: left; padding-left: 0; }
.pricing-plan ul li { margin-bottom: 0.8rem; color: var(--text-color); display: flex; align-items: center; }
.pricing-plan ul li i { margin-right: 12px; color: var(--secondary-color); font-size: 1.1em; }
.pricing-plan ul li i.fa-times { color: #ef5350; }
.pricing-plan .btn { margin-top: 1.5rem; }


/* Contact Section */
.contact-section { padding: 100px 0; background-color: #fff; }
.contact-section p { text-align:center; max-width:600px; margin: 0 auto 2.5rem auto; }
.contact-form {
    max-width: 650px;
    margin: 2rem auto 0;
    background: var(--light-color); /* Imposto lo Sfondo del form */
    padding: 40px; 
    border-radius: var(--border-radius);
    /* box-shadow: none;  */
    border: 1px solid #e3e8ee;
}
.contact-form .form-group { display: flex; gap: 20px; margin-bottom: 1.5rem; }
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%; padding: 14px; border: 1px solid #d1d9e6;
    border-radius: var(--border-radius); font-family: var(--font-family);
    font-size: 1em; background-color: #fff; transition: border-color 0.3s ease;
}
.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.2); 
}
.contact-form textarea { margin-bottom: 1.5rem; resize: vertical; min-height: 120px;}
.contact-form button { width: 100%; }

/* Footer */
.footer-section {
    background-color: var(--dark-color);
    color: rgba(255,255,255,0.7); 
    text-align: center;
    padding: 40px 0;
}
.footer-section p { margin-bottom: 0.5rem; font-size: 0.9em; }
.footer-section a { color: var(--primary-color); margin: 0 8px; }
.footer-section a:hover { color: var(--secondary-color); }

/* Responsive Navbar (generalmente ok, forse piccoli aggiustamenti in futuro da fare) */
@media (max-width: 920px) {
    .navbar nav {
        display: none; position: absolute; top: 100%; left: 0;
        width: 100%; background-color: rgba(255, 255, 255, 0.98);
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        backdrop-filter: blur(5px);
    }
    .navbar nav.active { display: block; }
    .navbar nav ul { flex-direction: column; padding: 15px 0; }
    .navbar nav ul li { margin: 12px 0; text-align: center; width: 100%; }
    .navbar nav ul li a { display: block; padding: 12px; width:90%; margin:0 auto; border-radius:var(--border-radius);}
    .navbar nav ul li a:hover, .navbar nav ul li a.active {
        background-color: var(--primary-color);
        color:white;
    }
    .navbar nav ul li a::after { display:none; } /* Rimuovi underline per menu mobile */
    .navbar nav ul li .btn { margin: 10px auto; display:inline-block; width: auto;}
    .menu-toggle { display: block; }
    .hero-section h1 { font-size: clamp(2em, 6vw, 3em); }
    .hero-section .subtitle { font-size: clamp(1em, 3vw, 1.15em); }
    h2 { font-size: clamp(1.6em, 5vw, 2.2em); }
    section { padding: 60px 0; }
}

/* Stili per lo Slider di Icone nella Hero Section */
.icon-slider-container {
    margin-top: 3.5rem; /* Spazio sopra lo slider */
    width: 100%;
    max-width: 800px; /* Larghezza massima dello slider visibile */
    margin-left: auto;
    margin-right: auto;
    overflow: hidden; 
    position: relative; 
    padding: 20px 0; 
    -webkit-mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent 100%);
    mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent 100%);
}

.icon-slider-track {
    display: flex; /* Allinea le icone in orizzontale */
    width: calc(200px * 20);    
    animation: scroll-icons 60s linear infinite; /* Durata animazione e tipo */
}

.icon-slide {
    flex-shrink: 0; /* Impedisce alle icone di restringersi */
    width: 180px;   /* Larghezza di ogni "slide" icona */
    margin-right: 20px; /* Spazio tra le icone */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.1); /* Sfondo leggermente trasparente per le card icone */
    border-radius: var(--border-radius);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.icon-slide:hover {
    transform: scale(1.05); /* Leggero ingrandimento al hover */
    background-color: rgba(255, 255, 255, 0.2);
}

.icon-slide i {
    font-size: 3em; /* Dimensione dell'icona Font Awesome */
    color: #fff;     /* Colore dell'icona */
    margin-bottom: 10px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.icon-slide span {
    font-size: 0.85em;
    color: var(--text-light);
    font-weight: 400;
    opacity: 0.85;
}

/* Animazione per lo scorrimento */
@keyframes scroll-icons {
    0% {
        transform: translateX(0);
    }
    100% {
       
       transform: translateX(calc(-200px * 10));
    }
}

/* Pausa l'animazione al hover sullo slider */
.icon-slider-container:hover .icon-slider-track {
    animation-play-state: paused;
}

/* Stili per il messaggio di feedback del form */
#contact-form-message {
    padding: 12px;
    border-radius: 5px;
    font-size: 0.95em;
    font-weight: 500;
}
#contact-form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
#contact-form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Stile per lo spinner nel bottone */
.btn .fa-spinner {
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}



@media (max-width: 768px) {
    .icon-slider-container {
        max-width: 90%; 
         -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent 100%);
         mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent 100%);
    }
    .icon-slide {
        width: 150px;
        margin-right: 15px;
    }
    .icon-slide i {
        font-size: 2.5em;
    }
    .icon-slide span {
        font-size: 0.8em;
    }
    
}