@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;700&family=Inter:wght@300;400;600&display=swap');

/* --- Variabili Colori (Light Mode) --- */
:root {
    --primary: #00b4db;   /* Ciano */
    --secondary: #7bc62d; /* Verde */
    --tertiary: #004e92;  /* Blu Scuro */
    --bg: #ffffff;        /* Sfondo Bianco Dominante */
    --text-main: #1a1a1a; /* Testo Grigio Scuro */
    --text-muted: #666666; /* Testo Secondario */
    --section-bg: #f9fafb; /* Grigio chiarissimo per sezioni alternate */
}

/* --- Stili Base --- */
body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

h1, h2, h3, .font-display {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--text-main);
}

p {
    color: var(--text-muted);
}

/* --- Cursore Personalizzato --- */
.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--secondary);
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(0, 180, 219, 0.5);
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9998;
    pointer-events: none;
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

/* --- Sfondo a Griglia (Adattato per Light Mode) --- */
.bg-grid {
    background-size: 50px 50px;
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0.05) 1px, transparent 1px),
                      linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
    mask-image: radial-gradient(circle at center, black 60%, transparent 100%);
}

/* --- Pannelli Effetto Vetro (Adattato per Light Mode) --- */
.glass-panel {
    background: rgba(255, 255, 255, 0.8); /* Bianco semitrasparente */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 180, 219, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05); /* Ombra leggera */
}

/* --- Card Tilt (Light Mode) --- */
.tilt-card-light {
    background: white;
    border: 1px solid #e5e7eb; /* Grigio chiaro */
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.tilt-card-light:hover {
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.1);
}

/* --- Effetto Glitch (Testo) --- */
.glitch { position: relative; }

.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg); /* Usa lo sfondo bianco */
}

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 var(--secondary);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 var(--primary);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(34px, 9999px, 11px, 0); }
    100% { clip: rect(4px, 9999px, 87px, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(2px, 9999px, 67px, 0); }
    100% { clip: rect(12px, 9999px, 7px, 0); }
}

/* --- Effetto Tilt 3D --- */
.tilt-container {
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* --- Nodo Diagramma --- */
.diagram-node {
    box-shadow: 0 5px 15px rgba(0, 180, 219, 0.15);
    background: white;
    border: 1px solid rgba(0, 180, 219, 0.3);
}

/* --- Wrapper Immagine Team --- */
.team-img-wrapper-light {
    position: relative;
    overflow: hidden;
    border-bottom-width: 4px;
    /* Rimosso il background scuro, l'immagine è pulita */
}
.team-img-wrapper-light img {
    filter: grayscale(100%);
    transition: all 0.5s ease;
}
.group:hover .team-img-wrapper-light img {
    filter: grayscale(0%);
    transform: scale(1.05);
}
/* Overlay sfumato bianco per il testo */
.team-overlay-light {
    background: linear-gradient(to top, rgba(255,255,255,0.95) 20%, transparent);
}

/* =========================================
   STILE PAGINA PRODOTTO (ZIG-ZAG)
   ========================================= */

/* Header specifico per la pagina prodotto */
.product-header {
    padding: 120px 5% 60px; /* Spazio per la navbar fissa */
    text-align: center;
    background-color: #f9fbfb;
    border-bottom: 1px solid #eee;
}

.product-header h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 3rem;
    color: var(--bio-blue);
}

.product-header p {
    color: #666;
    font-size: 1.2rem;
    margin-top: 10px;
}

/* Contenitore principale */
.product-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

/* La riga che contiene Immagine e Testo */
.feature-row {
    display: flex;
    align-items: center; /* Centra verticalmente */
    justify-content: space-between;
    gap: 4rem; /* Spazio tra immagine e testo */
    padding: 6rem 0;
    border-bottom: 1px solid #eee; /* Linea separatrice opzionale */
}

.feature-row:last-child {
    border-bottom: none; /* Toglie la linea all'ultima sezione */
}

/* Classe magica per invertire l'ordine */
.feature-row.reverse {
    flex-direction: row-reverse;
}

/* Stile delle colonne */
.feature-image, .feature-text {
    flex: 1; /* Entrambi occupano il 50% dello spazio */
}

/* Stile Immagine */
.feature-image img {
    width: 100%;
    border-radius: 20px; /* Bordi arrotondati moderni */
    box-shadow: 0 15px 30px rgba(0, 78, 146, 0.15); /* Ombra bluastra elegante */
    transition: transform 0.3s ease;
}

.feature-image img:hover {
    transform: scale(1.02); /* Leggero zoom all'hover */
}

/* Stile Testo */
.feature-text h2 {
    font-family: 'Montserrat', sans-serif;
    color: var(--bio-blue);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    position: relative;
}

/* Lineetta verde decorativa sotto i titoli */
.feature-text h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 4px;
    background: var(--bio-green);
    margin-top: 10px;
    border-radius: 2px;
}

.feature-text p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 1.5rem;
}

.feature-list {
    list-style: none;
    margin-bottom: 2rem;
}

.feature-list li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
    font-weight: 500;
}

/* Pallino verde personalizzato per la lista */
.feature-list li::before {
    content: '•';
    color: var(--bio-green);
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: -5px;
}

.text-link {
    color: var(--bio-cyan);
    font-weight: bold;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s;
}

.text-link:hover {
    border-bottom: 2px solid var(--bio-cyan);
}

/* --- RESPONSIVE PER CELLULARE --- */
@media (max-width: 768px) {
    .feature-row {
        flex-direction: column; /* Impila verticalmente */
        gap: 2rem;
        padding: 4rem 0;
        text-align: center;
    }

    /* Anche se c'è la classe .reverse, su mobile vogliamo 
       sempre l'immagine sopra e il testo sotto */
    .feature-row.reverse {
        flex-direction: column;
    }
    
    .feature-text h2::after {
        margin: 10px auto 0; /* Centra la lineetta verde */
    }
    
    .feature-list {
        text-align: left; /* Mantiene la lista allineata a sinistra */
        display: inline-block;
    }
}