/* Root Variables */
:root {
    --primary-color: #0055a4;
    --secondary-color: #003366;
    --accent-color: #00a0e3;
    --text-color: #333;
    --light-bg: #f5f5f5;
    --white: #ffffff;
}

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

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}

/* --- NAVIGATION (AGGIORNATO) --- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 5%;
    background: var(--white);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    position: fixed;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease-in-out;
}

nav .logo {
    max-height: 48px;
    display: flex;
    align-items: center;
}

nav .logo img {
    max-height: 48px;
    height: auto;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 1rem;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    display: block;
    width: 0%;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s;
    position: absolute;
    bottom: -6px;
    left: 0;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .nav-links {
        display: none; /* eventualmente attivabile con toggle js */
    }
}

/* --- HERO SECTION --- */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(135deg, rgba(0,85,164,0.95), rgba(0,160,227,0.9), rgba(0,200,255,0.85));
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: var(--white);
    padding: 4rem 1rem;
    position: relative;
    overflow: hidden;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 2px, transparent 3px);
    background-size: 50px 50px;
    animation: moveBackground 20s linear infinite;
    opacity: 0.3;
}

@keyframes moveBackground {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.2rem;
    max-width: 800px;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 4rem;
    width: 100%;
    max-width: 1200px;
}

.stat-box {
    background: rgba(255,255,255,0.1);
    padding: 2rem;
    border-radius: 8px;
    backdrop-filter: blur(5px);
    transition: transform 0.3s;
}

.stat-box:hover {
    transform: translateY(-5px);
}

.stat-box h3 {
    font-size: 2.5rem;
    color: transparent; /* Necessario per mostrare il gradiente */
    background: linear-gradient(to right, #000000, #808080); /* Nero → Grigio */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.stat-box p {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.stat-box small {
    font-size: 0.8rem;
    opacity: 0.7;
}

@media (max-width: 1024px) {
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
}

/* --- SECTIONS --- */
section {
    padding: 5rem 5%;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
}

section.reveal {
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
    font-size: 2.5rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
}

/* --- CHI SIAMO SECTION --- */
.mission-vision {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.info-card {
    background: rgba(255,255,255,0.95);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

.info-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.achievements {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.achievement-card {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.1);
}

.achievement-card .number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    display: block;
}

.legal-info {
    margin-top: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, #f5f7fa, #e4e8ec); /* sfondo chiaro e moderno */
    border-radius: 15px;
    text-align: center;
}

.legal-info p {
    margin: 0.5rem 0;
    color: #333333; /* testo più leggibile su sfondo chiaro */
    font-weight: 500;
}

.legal-info i {
    margin-right: 0.5rem;
    color: #0078d4; /* tonalità blu moderna per l'accent color */
}

/* --- SERVICES --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.service-card {
    background: rgba(255,255,255,0.98);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    display: block;
    transition: transform 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1);
}

.service-description {
    color: #666;
    margin: 1rem 0;
    line-height: 1.6;
    font-size: 0.95rem;
}

.service-card h3 {
    color: var(--primary-color);
    margin: 1rem 0;
    font-size: 1.5rem;
    position: relative;
}

.service-card ul {
    list-style: none;
    margin: 1.5rem 0;
}

.service-card ul li {
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: #555;
}

.service-card ul li i {
    color: var(--accent-color);
    font-size: 1.1rem;
}

.service-cta {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    color: white;
    text-decoration: none;
    border-radius: 25px;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.service-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    background: linear-gradient(45deg, var(--accent-color), var(--primary-color));
}

.service-cta:active {
    transform: translateY(0);
}

.service-cta:hover {
    background: var(--secondary-color);
}

/* --- CLIENTS --- */
.section-description {
    text-align: center;
    color: #666;
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.client-card {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    text-align: center;
    transition: all 0.3s ease;
}

.client-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

.client-logo {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.client-testimonial {
    color: #555;
    font-style: italic;
    margin: 1.5rem 0;
    line-height: 1.6;
    position: relative;
    padding: 0 1rem;
}

.client-testimonial::before,
.client-testimonial::after {
    content: '"';
    color: var(--accent-color);
    font-size: 2rem;
    position: absolute;
}

.client-testimonial::before {
    left: -10px;
    top: -10px;
}

.client-testimonial::after {
    right: -10px;
    bottom: -10px;
}

.client-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.client-stats span {
    font-weight: 600;
    color: var(--accent-color);
}

/* --- CONTACT FORM --- */
#contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: grid;
    gap: 1rem;
}

#contact-form input,
#contact-form textarea {
    padding: 1.2rem 1.5rem;
    border: 2px solid rgba(0,0,0,0.1);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(5px);
}

#contact-form input:hover,
#contact-form textarea:hover {
    background: rgba(255,255,255,1);
    border-color: var(--accent-color);
}

#contact-form input:focus,
#contact-form textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0,85,164,0.1);
    outline: none;
    background: white;
}

#contact-form input:focus,
#contact-form textarea:focus {
    border-color: var(--accent-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,160,227,0.1);
    background: white;
}

#contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.privacy-check {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* --- BUTTONS --- */
.cta-button {
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    color: var(--white);
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    background: linear-gradient(45deg, var(--accent-color), var(--primary-color));
}

.cta-button:active {
    transform: translateY(0);
}

.cta-button:hover {
    background: var(--secondary-color);
}

/* --- FOOTER (AGGIORNATO) --- */
footer {
    background: var(--secondary-color);
    color: var(--white);
    padding: 4rem 5% 2rem;
    font-size: 0.95rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    align-items: start;
}

.footer-column h4 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: var(--accent-color);
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    display: block;
    padding: 0.4rem 0;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    margin-top: 3rem;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 1rem;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
}

/* Responsive Footer */
@media (max-width: 768px) {
    footer {
        padding: 3rem 5% 1.5rem;
    }
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    section {
        padding: 3rem 5%;
    }
}
