/* Stili Generali e Variabili CSS */
:root {
    --primary-color: #6A4C9C; /* Viola IntellyHub */
    --secondary-color: #2A2F45; /* Blu Scuro IntellyHub */
    --accent-color: #8E7CC3; /* Viola più chiaro per accenti */
    --light-gray: #f8f9fa; /* Grigio molto chiaro per sfondi alternati */
    --medium-gray: #e9ecef; /* Grigio per bordi o elementi UI */
    --dark-gray: #343a40; /* Grigio scuro per testo principale */
    --text-light: #f8f9fa; /* Testo chiaro su sfondi scuri */
    --white: #ffffff;
    --success-color: #28a745;
    --error-color: #dc3545;

    --font-family: 'Poppins', sans-serif;
    --container-width: 1140px;
    --section-padding: 80px 0;
    --border-radius: 8px;
    --box-shadow: 0 6px 12px rgba(0,0,0,0.1);
    --box-shadow-hover: 0 10px 20px rgba(0,0,0,0.15); /* Ombra più pronunciata per hover */
}

/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px; 
}

body {
    font-family: var(--font-family);
    line-height: 1.7;
    color: var(--dark-gray);
    background-color: var(--white);
    overflow-x: hidden; 
}

.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 15px;
}

/* Header e Navigazione */
header {
    background-color: var(--white);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

header nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px; 
}

.logo-img {
    height: 35px; 
    width: auto;
    transition: transform 0.3s ease;
}
.logo-link:hover .logo-img {
    transform: scale(1.05);
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease;
}

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

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}
.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.burger-menu {
    display: none; 
    cursor: pointer;
    background: none;
    border: none;
    padding: 10px;
    z-index: 1001; 
}
.burger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--secondary-color);
    margin: 5px 0;
    border-radius: 3px;
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.burger-menu.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}
.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}


/* Sezione Hero */
.hero-section {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: var(--text-light);
    min-height: 100vh; 
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 70px; 
    position: relative; 
}
.hero-section .container {
    max-width: 800px;
}
.hero-section h1 {
    font-size: clamp(2.5rem, 5vw, 4rem); 
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
}
.hero-section .highlight {
    color: var(--accent-color); 
}
.hero-section .subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    margin-bottom: 40px;
    font-weight: 300;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    background-color: var(--accent-color); 
    color: var(--white);
    padding: 14px 35px;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1rem;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.cta-button:hover {
    background-color: var(--primary-color); 
    transform: translateY(-3px);
    box-shadow: var(--box-shadow-hover);
}

/* Stili Generali per le Sezioni */
section {
    padding: var(--section-padding);
}
section:nth-child(even) { 
    background-color: var(--light-gray);
}

section h2 {
    text-align: center;
    font-size: clamp(2rem, 4vw, 2.8rem);
    margin-bottom: 20px;
    color: var(--secondary-color);
    font-weight: 700;
}
.section-intro {
    text-align: center;
    max-width: 750px;
    margin: 0 auto 50px auto;
    font-size: 1.1rem;
    color: #555;
    line-height: 1.8;
}

/* Icon Styling */
.icon-large {
    width: 48px;
    height: 48px;
    color: var(--primary-color);
    margin-bottom: 20px;
    stroke-width: 1.5; /* Spessore linea icone Lucide */
}
.feature-icon { 
    width: 55px; 
    height: 55px;
    color: var(--primary-color);
    margin-bottom: 20px;
    stroke-width: 1.5;
}
.icon-small {
    width: 36px;
    height: 36px;
    color: var(--accent-color);
    margin-bottom: 15px;
    stroke-width: 1.5;
    display: block; 
    margin-left: auto;
    margin-right: auto;
}
.icon-medium {
    width: 40px;
    height: 40px;
    color: var(--primary-color);
    /* margin-bottom: 15px; Rimossa per controllo da .why-us-item */
    stroke-width: 1.5;
    /* display: block; Controllato da flex in .why-us-item */
}


/* Sezione Problema */
.problem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}
.problem-card {
    background-color: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.problem-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}
.problem-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

/* Sezione Soluzione */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}
.feature-card {
    text-align: center;
    padding: 25px;
    background-color: var(--white); 
    border-radius: var(--border-radius);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow); 
}
.feature-card h3 {
    color: var(--secondary-color);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

/* Sezione Casi d'Uso */
.use-case-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 40px;
    overflow: hidden;
    display: flex;
    flex-direction: column; 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.use-case-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}

.use-case-card.highlight-case {
    flex-direction: row; 
    align-items: center;
}

.use-case-card .use-case-image {
    flex: 1 1 40%; 
}
.use-case-card .use-case-image img {
    width: 100%;
    height: 100%; 
    display: block;
    object-fit: cover; 
}
.use-case-card .use-case-content {
    padding: 30px;
    flex: 1 1 60%; 
}
.use-case-card.highlight-case .use-case-content {
     padding-left: 40px;
}

.use-case-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.6rem;
}
.use-case-card p strong {
    color: var(--secondary-color);
    font-weight: 600;
}
.use-case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}
.use-case-card-small {
    background-color: var(--white);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center; 
}
.use-case-card-small:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}
.use-case-card-small h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.25rem;
}

/* Sezione Perché Noi - MODIFICATA */
.why-us-grid {
    display: grid;
    /* Inizialmente una colonna, poi 2x2 su schermi più grandi */
    grid-template-columns: 1fr; 
    gap: 30px;
    margin-top: 50px;
}

.why-us-item {
    padding: 25px;
    background-color: var(--white); 
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;   /* Icona sopra, testo sotto */
    align-items: center;      /* Centra icona e testo orizzontalmente */
    text-align: center;       /* Centra il testo */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.why-us-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover); 
}
.why-us-item .icon-medium {
    margin-bottom: 15px; /* Spazio tra icona e titolo */
}
.why-us-item h3 {
    color: var(--secondary-color);
    margin-bottom: 10px;
    font-size: 1.3rem;
}
.why-us-item p { /* Rimosso il text-align: left; inline dall'HTML */
    font-size: 0.95rem;
}


/* Sezione Chi Siamo / Filosofia */
.about-section .container {
    text-align: center;
}
.about-section .section-intro {
    font-size: 1.15rem;
    line-height: 1.9;
}

/* Sezione Contatti */
.contact-section form {
    max-width: 700px;
    margin: 50px auto 0 auto;
    display: grid;
    gap: 25px;
}
.form-group {
    width: 100%;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 0.9rem;
}
.contact-section input[type="text"],
.contact-section input[type="email"],
.contact-section textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.contact-section input[type="text"]:focus,
.contact-section input[type="email"]:focus,
.contact-section textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(106, 76, 156, 0.2); 
}
.contact-section textarea {
    resize: vertical;
    min-height: 120px;
}
.contact-section .cta-button {
    width: auto; 
    padding-left: 40px;
    padding-right: 40px;
    margin: 10px auto 0 auto; 
    font-size: 1.05rem;
}
.form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: var(--border-radius);
    text-align: center;
    font-weight: 600;
}
.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}


/* Footer - MODIFICATO */
footer {
    background-color: var(--secondary-color);
    color: var(--text-light);
    padding: 50px 0; /* Aumentato padding */
    margin-top: auto; 
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Colonne responsive */
    gap: 30px; /* Spazio tra le colonne */
    align-items: flex-start; /* Allinea gli elementi in alto nelle colonne */
}

.footer-column {
    /* padding: 0 15px; */ /* Rimosso, il container gestisce il padding laterale */
}

.footer-column-logo {
    text-align: left; /* Allinea logo e copyright a sinistra su schermi grandi */
}

.footer-logo {
    height: 45px; 
    width: auto;
    margin-bottom: 15px; 
    opacity: 0.9;
}

.copyright {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-top: 10px;
}

.footer-column h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--white);
    font-weight: 600;
    border-bottom: 1px solid var(--accent-color);
    padding-bottom: 8px;
    display: inline-block; /* Per far sì che il bordo sia solo sotto il testo */
}

.footer-column-info p {
    font-size: 0.9rem;
    line-height: 1.8;
    opacity: 0.8;
}
.footer-column-info p a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}
.footer-column-info p a:hover {
    color: var(--white);
}

.social-link {
    display: inline-flex; /* Allinea icona e testo */
    align-items: center;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.95rem;
    margin-bottom: 10px; /* Spazio se ci sono più link social */
    transition: color 0.3s ease, transform 0.2s ease;
    opacity: 0.8;
}
.social-link:hover {
    color: var(--white);
    opacity: 1;
    transform: translateX(3px);
}
.social-icon {
    width: 20px; /* Dimensione icona social */
    height: 20px;
    margin-right: 8px;
    stroke-width: 2; /* Spessore linea icone Lucide */
}

/* Media Query per il footer su schermi piccoli */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr; /* Una colonna su mobile */
        text-align: center; /* Centra tutto su mobile */
    }
    .footer-column-logo,
    .footer-column-info,
    .footer-column-social {
        text-align: center; /* Assicura che il testo sia centrato */
        margin-bottom: 20px;
    }
    .footer-column h4 {
        display: block; /* Per far sì che il bordo sia sotto il testo centrato */
        margin-left: auto;
        margin-right: auto;
    }
    .footer-logo {
        margin-left: auto;
        margin-right: auto;
    }
    .social-link {
        justify-content: center; /* Centra icona e testo del link social */
    }
}
/* Animazioni base on scroll */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* Media Queries per Responsività */
@media (min-width: 768px) { /* Da tablet in su */
    .why-us-grid {
        grid-template-columns: repeat(2, 1fr); /* Griglia 2x2 */
    }
}

@media (max-width: 992px) {
    .use-case-card.highlight-case {
        flex-direction: column; 
    }
     .use-case-card.highlight-case .use-case-content {
         padding-left: 30px; 
    }
    .use-case-card .use-case-image img {
        max-height: 350px; 
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px; 
    }
    .nav-links {
        display: none; 
        flex-direction: column;
        align-items: center;
        width: 100%;
        position: absolute;
        top: 70px; 
        left: 0;
        background-color: var(--white);
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        padding: 20px 0;
        border-top: 1px solid var(--medium-gray);
    }
    .nav-links.active {
        display: flex; 
    }
    .nav-links li {
        margin: 15px 0;
        width: 100%;
        text-align: center;
    }
    .nav-links a {
        font-size: 1.1rem;
        padding: 10px 20px;
        display: block; 
    }
    .nav-links a::after { 
        display: none;
    }
    .nav-links a:hover, .nav-links a.active {
        background-color: var(--light-gray);
        color: var(--primary-color);
    }

    .burger-menu {
        display: block;
    }

    .hero-section {
        min-height: auto; 
        padding-top: 100px; 
        padding-bottom: 60px;
    }
    .hero-section h1 {
        font-size: 2.2rem; 
    }
    .hero-section .subtitle {
        font-size: 1rem;
    }
    section h2 {
        font-size: 1.8rem;
    }
    .section-intro {
        font-size: 1rem;
        margin-bottom: 40px;
    }

    .features-grid, .problem-grid, .use-case-grid { /* .why-us-grid già gestito */
        grid-template-columns: 1fr; 
        gap: 25px;
    }
    .use-case-card .use-case-image img {
        max-height: 250px; 
    }
    /* .why-us-item già gestito per mobile dal suo stile base (flex-direction: column) */
}
