:root { --green: #16a34a; --slate: #0f172a; }
body { font-family: 'Inter', sans-serif; overflow-x: hidden; }

/* LOGO */
/* NAVBAR GRIGIO GHIACCIO (Risalta Nero e Verde) */
#main-nav {
    background: transparent !important;
    padding-top: 15px !important;
}

#nav-container {
    /* Un grigio molto chiaro e freddo, professionale */
    background: rgba(241, 245, 249, 0.92) !important; 
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(203, 213, 225, 0.5) !important;
    height: 75px !important;
    border-radius: 50px !important;
    padding: 0 40px !important;
    display: flex;
    align-items: center;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1) !important;
    transition: all 0.4s ease;
}

/* LOGO: Nessun filtro, così vediamo i colori originali */
.logo-render {
    height: 150px !important; 
    width: auto !important;
    transform: translateY(4px);
    filter: none !important; /* Rimuove ogni inversione: vedi il nero e il verde reali */
    transition: all 0.4s ease !important;
}

/* Quando scendi, la barra diventa appena più compatta */
.scrolled #nav-container {
    height: 75px !important;
    background: rgba(248, 250, 252, 0.98) !important; /* Quasi bianco ma resta "freddo" */
}

.scrolled .logo-render {
    height: 150px !important;
    transform: translateY(4px);
}

/* TESTI: Grigio scuro/Nero per leggere bene sul fondo chiaro */
#nav-links a {
    color: #1e293b !important; /* Slate molto scuro, quasi nero */
    font-weight: 700 !important;
    font-size: 0.95rem;
}

#nav-links a:hover {
    color: var(--green) !important;
}

}

/* BOTTONI SLIM */
.btn-primary-video { background: var(--green); color: white; padding: 14px 40px; border-radius: 18px; font-weight: 700; font-size: 14px; display: inline-block; transition: 0.4s; box-shadow: 0 15px 30px -10px rgba(22, 163, 74, 0.4); }
.btn-primary-video:hover { transform: translateY(-3px); background: #15803d; }
.btn-outline-video { background: rgba(255,255,255,0.1); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.3); color: white; padding: 14px 40px; border-radius: 18px; font-weight: 700; font-size: 14px; display: inline-block; transition: 0.3s; }
.btn-outline-video:hover { background: white; color: var(--slate); transform: translateY(-3px); }

/* SCROLL ARROW */
.scroll-arrow-anim { animation: scrollFadeMove 2s infinite; }
@keyframes scrollFadeMove {
    0%, 100% { transform: translateY(0) translateX(-50%); opacity: 0.2; }
    50% { transform: translateY(15px) translateX(-50%); opacity: 1; }
}

/* CARDS & SLIDER */
.service-card { background: white; border-radius: 35px; overflow: hidden; border: 1px solid #f1f5f9; cursor: pointer; transition: 0.5s; }
.service-card:hover { transform: translateY(-10px); box-shadow: 0 30px 50px -15px rgba(0,0,0,0.08); }
.service-img-wrap { height: 200px; overflow: hidden; }
.service-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: 1s; }
.service-card:hover img { transform: scale(1.1); }

.icon-box { width: 64px; height: 64px; background: #f0fdf4; color: var(--green); border-radius: 20px; display: flex; align-items: center; justify-content: center; margin-bottom: 2rem; }

/* COMPARISON SLIDER */
.comparison-slider { position: relative; width: 100%; aspect-ratio: 4/3; border-radius: 24px; overflow: hidden; }
.bottom-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.comparison-overlay { position: absolute; top: 0; left: 0; height: 100%; width: 50%; overflow: hidden; border-right: 2px solid white; z-index: 2; }
.top-img { position: absolute; top: 0; left: 0; height: 100%; width: calc(100% * 100 / var(--w, 50)); object-fit: cover; display: block; max-width: none; }
.slider-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; z-index: 10; }
.slider-line { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: white; pointer-events: none; transform: translateX(-50%); z-index: 3; }

/* FAQ */
.faq-box { border-bottom: 1px solid #1e293b; transition: 0.3s; }
.faq-trigger { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 30px 0; font-weight: 700; font-size: 19px; }
.faq-content { max-height: 0; overflow: hidden; transition: 0.5s; color: #94a3b8; }
.faq-box.active .faq-content { max-height: 200px; padding-bottom: 30px; }

/* MODALE */
.modal-bg { position: fixed; inset: 0; z-index: 100; background: rgba(15,23,42,0.9); backdrop-filter: blur(15px); display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-content { background: white; width: 100%; max-width: 700px; padding: 50px; border-radius: 40px; position: relative; max-height: 90vh; overflow-y: auto; }
.close-btn { position: absolute; top: 30px; right: 30px; color: #cbd5e1; }
.custom-scrollbar::-webkit-scrollbar { width: 4px; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: var(--green); border-radius: 10px; }

/* REVEAL */
.reveal-up { opacity: 0; transform: translateY(40px); transition: 1s; }
.reveal-up.active { opacity: 1; transform: translateY(0); }

/* Assicura che la card occupi tutto lo spazio verticale disponibile nella colonna */
.service-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Forza il wrap del contenuto interno */
.service-card .p-8 {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
/* Container dello Scanner */
.scanner-container {
    position: relative;
    cursor: crosshair; 
    overflow: hidden;
    border-radius: 2.5rem;
    line-height: 0; /* Rimuove spazi bianchi sotto l'immagine */
}

/* La Lente Circolare con Zoom */
#lens {
    position: absolute;
    width: 200px;  /* Dimensione della lente visibile */
    height: 200px;
    border: 4px solid white;
    border-radius: 50%;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    overflow: hidden;
    pointer-events: none; 
    visibility: hidden;
    z-index: 10;
    display: block;
}

/* L'immagine NDVI all'interno: aumentiamo lo zoom */
#lens img {
    position: absolute;
    max-width: none;
    /* Il valore 'transform: scale(2)' determina quanto zoom vuoi (2x in questo caso) */
    transform-origin: top left;
}

/* Stile Righe Vantaggi a Destra */
.benefit-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: 2rem;
    border: 1px solid #f1f5f9;
    transition: all 0.3s ease;
}

.benefit-row:hover {
    transform: translateX(10px);
    border-color: var(--green);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.icon-box-small {
    width: 50px;
    height: 50px;
    background: #f0fdf4;
    color: var(--green);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
@media (max-width: 768px) {
    #lens {
        width: 150px; /* Un po' più piccola su mobile */
        height: 150px;
    }
    
    .scanner-container {
        margin-bottom: 20px;
        touch-action: none; /* Fondamentale per non far scivolare la pagina mentre si usa la lente */
    }
}
/* --- NUOVE ANIMAZIONI --- */

/* 1. Rendiamo il reveal più morbido */
.reveal-up {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
    transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-up.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* 2. Zoom sulle immagini quando ci passi sopra (solo PC) */
@media (min-width: 1024px) {
    .service-card img, #chi-sono img {
        transition: transform 0.8s ease;
    }
    .service-card:hover img, #chi-sono img:hover {
        transform: scale(1.05);
    }
}

/* 3. Barra di progresso in alto (opzionale ma consigliata) */
#progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: #16a34a; /* Il tuo verde AgroScan */
    z-index: 100;
    width: 0%;
    transition: width 0.1s ease;
}
/* Zoom fluido sulle immagini dei servizi e del chi-sono */
.service-card img, #chi-sono img {
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover img, #chi-sono img:hover {
    transform: scale(1.05);
}

/* Effetto reveal più fluido */
.reveal-up {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
    transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-up.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}