/* =========================================
   RESET & BASE
   ========================================= */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
}

input, textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #e2e8f0; 
    background: transparent; 
    overflow-x: hidden;
}

/* =========================================
   CANVAS RETE NEURALE
   ========================================= */
#canvas-container {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: 0; 
    background: linear-gradient(135deg, #02060d 0%, #0a192f 100%);
}

/* =========================================
   UTILITIES
   ========================================= */
.container { width: 90%; max-width: 1200px; margin: 0 auto; padding: 2rem 0; position: relative; z-index: 1; }
.text-center { text-align: center; }
.text-neon { color: #00ffcc; }

/* =========================================
   COMPONENTI UI
   ========================================= */
.glass-panel {
    background: rgba(10, 25, 47, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 255, 204, 0.15);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    padding: 2rem;
}

.glass-panel p, .service-card p {
    color: #cbd5e1; 
}

/* BLOCCO BOTTONI */
.btn-neon {
    display: inline-block;
    background: transparent;
    color: #00ffcc;
    border: 1px solid #00ffcc;
    padding: 12px 28px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    text-decoration: none !important; 
}

.btn-neon:hover {
    background: rgba(0, 255, 204, 0.1);
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.4);
    color: #fff;
    text-decoration: none !important;
}

.btn-solid {
    background: #00ffcc;
    color: #0a192f;
    border: 1px solid #00ffcc;
    text-decoration: none !important;
}

.btn-solid:hover {
    background: #64ffda;
    color: #0a192f;
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.6);
    text-decoration: none !important;
}

/* =========================================
   HEADER E NAVIGAZIONE
   ========================================= */
#header { 
    margin-top: 20px; 
    position: relative; 
    z-index: 99999; 
}
.nav-glass {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 2rem; background: rgba(10, 25, 47, 0.7);
    backdrop-filter: blur(16px); border: 1px solid rgba(0, 255, 204, 0.1);
    border-radius: 50px;
}
.logo a, .logo a:hover { text-decoration: none !important; }
.logo h1 { font-size: 1.5rem; margin: 0; color: #fff; text-decoration: none !important; }
.logo span { color: #00ffcc; }
.nav-links { display: flex; list-style: none; gap: 1.5rem; margin: 0; }
.nav-links a { color: #cbd5e1; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; text-decoration: none !important; }
.nav-links a:hover, .nav-links a.active { color: #00ffcc; text-decoration: none !important; }
.hamburger { display: none; }

/* =========================================
   STRUTTURA PAGINE E GRIGLIE
   ========================================= */
.hero { display: flex; align-items: center; justify-content: space-between; min-height: 70vh; gap: 3rem; }
.hero-content { flex: 1; }
.hero-content h1 { font-size: 3rem; line-height: 1.2; color: #fff; }
.hero-visual { flex: 1; display: flex; justify-content: center; }

.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 2rem; }

.service-card { text-align: center; transition: transform 0.3s ease; }
.service-card:hover { transform: translateY(-10px); border-color: rgba(0, 255, 204, 0.5); }
.service-card i { font-size: 2.5rem; color: #00ffcc; margin-bottom: 1rem; }
.service-card h3 { color: #e6f1ff; font-size: 1.2rem; }

/* =========================================
   FORMULARI
   ========================================= */
.form-group { margin-bottom: 1.5rem; }
.form-control {
    width: 100%; padding: 15px; background: rgba(2, 12, 27, 0.7);
    border: 1px solid rgba(136, 146, 176, 0.2); border-radius: 8px; color: #fff;
    font-family: inherit; transition: 0.3s;
}
.form-control:focus { outline: none; border-color: #00ffcc; box-shadow: 0 0 8px rgba(0,255,204,0.2); }
::placeholder { color: #495670; }
.checkbox-group { text-align: left; }
.checkbox-group label { display: block; margin-bottom: 0.5em; cursor: pointer; color: #cbd5e1; }
.checkbox-group input { accent-color: #00ffcc; margin-right: 10px; transform: scale(1.2); }

/* =========================================
   FOOTER
   ========================================= */
#footer {
    position: relative;
    z-index: 10;
    border-top: 1px solid rgba(0, 255, 204, 0.3);
    padding: 3rem 0 1rem 0;
    margin-top: 4rem;
    background: rgba(4, 11, 22, 0.85); 
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; margin-bottom: 2rem; text-align: center; }
.footer-col h4 { color: #fff; margin-bottom: 1rem; }
.footer-col p { margin-bottom: 0.5rem; text-align: center; color: #e2e8f0; }
.footer-bottom { text-align: center; font-size: 0.85rem; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.05); color: #cbd5e1; }

/* Niente sottolineatura, solo verde neon puro */
.footer-col p a, .footer-col div a, .footer-bottom a {
    color: #00ffcc !important; 
    text-decoration: none !important;
    transition: 0.3s;
}

.footer-col a i {
    color: #00ffcc !important;
    text-decoration: none !important;
}

.footer-col p a:hover, .footer-col div a:hover, .footer-bottom a:hover {
    color: #64ffda !important;
    text-shadow: 0 0 12px rgba(0, 255, 204, 0.6);
    text-decoration: none !important;
}

/* =========================================
   RESPONSIVE & HAMBURGER (MENU LATERALE)
   ========================================= */
@media (max-width: 900px) {
    div[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
    .glass-panel { padding: 1.5rem !important; }
    .hero { flex-direction: column; text-align: center; padding-top: 1rem; }
    .hero-content h1 { font-size: 2.2rem; }
    .hero-content div[style*="display: flex"] { justify-content: center !important; }

    /* TOUCH TARGET HAMBURGER ALLARGATO PER ACCESSIBILITA' */
    .hamburger {
        display: flex; 
        flex-direction: column; 
        justify-content: space-between; /* Spazia le linee in modo uniforme */
        align-items: center;
        width: 36px; 
        height: 26px; /* Proporzione per staccare le 3 linee */
        background: transparent !important; 
        border: none !important; /* Rimuove definitivamente il quadratino */
        cursor: pointer; 
        z-index: 100000; 
        padding: 0; /* Rimuove il padding che ammassava le linee */
        position: relative;
    }

    .hamburger span { 
        width: 100%; 
        height: 3px; 
        background-color: #00ffcc; 
        border-radius: 3px;
        box-shadow: 0 0 8px rgba(0, 255, 204, 0.8); 
        transition: all 0.3s; 
    }

    /* Animazione di chiusura (la X) ricalibrata sulle nuove distanze */
    .hamburger.active span:nth-child(1) { transform: translateY(11.5px) rotate(45deg); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: translateY(-11.5px) rotate(-45deg); }

    .nav-links {
        position: fixed; top: 0; right: -100%;
        width: 280px; height: 100vh; background-color: #040b16; 
        border-left: 1px solid rgba(0, 255, 204, 0.2);
        display: flex; flex-direction: column; justify-content: center; align-items: center;
        gap: 2.5rem; z-index: 99999; 
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -15px 0 40px rgba(0, 0, 0, 0.8);
    }
    .nav-links.active { right: 0; }
    .nav-links li a { font-size: 1.3rem; text-decoration: none !important; }
}

/* =========================================
   LINK NEL CORPO TESTO (NON FOOTER)
   ========================================= */
main a.inline-link {
    color: #00ffcc;
    text-decoration: underline;
    text-underline-offset: 3px;
    padding: 4px 6px;
    display: inline-block;
}
main a.inline-link:hover {
    color: #64ffda;
}

/* =========================================
   FIX ACCESSIBILITÀ DEFINITIVO
   ========================================= */

/* 1. Forza al bianco puro tutte le descrizioni dentro le card e i panel per superare il contrasto */
.glass-panel p, 
.service-card p,
.glass-panel div,
.service-card div {
    color: #ffffff !important;
}

/* 2. Fix Firma Footer (Testo e link in bianco purissimo, con sottolineatura obbligatoria per Lighthouse) */
.footer-bottom, 
.footer-bottom p {
    color: #ffffff !important;
}

/* Scavalca l'attributo inline style="color: #00ffcc; text-decoration: none;" del link Privacy */
.footer-bottom a {
    color: #ffffff !important;
    text-decoration: underline !important;
    text-underline-offset: 3px;
}

/* Effetto hover per mantenere un tocco di interattività */
.footer-bottom a:hover {
    color: #00ffcc !important;
    text-decoration: underline !important;
}