/* --- 1. BASE & VARIABILI: Colori e Font (VALIDATO) --- */
:root { --bg-center: #1a2c42; --bg-outer: #040810; --blue-bright: #00d4ff; --antracite: #1a202c; --card-bg: rgba(10, 20, 37, 0.7); --gradient-text: linear-gradient(135deg, #fff 30%, var(--blue-bright) 100%); }
* { box-sizing: border-box; }
body { margin: 0; padding: 0; background: radial-gradient(circle at 50% 40%, var(--bg-center) 0%, #0a1425 45%, var(--bg-outer) 100%), url('https://www.transparenttextures.com/patterns/carbon-fibre.png'); background-attachment: fixed; color: white; font-family: 'Inter', sans-serif; overflow-x: hidden; width: 100%; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body.no-scroll { overflow: hidden; height: 100vh; position: fixed; width: 100%; }

/* --- 2. SPLASH SCREEN (VALIDATO) --- */
.splash-screen { height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; position: relative; z-index: 10000; background: radial-gradient(circle, var(--bg-center), var(--bg-outer)); overflow: hidden; text-align: center; cursor: pointer; transition: 0.8s; }
.tech-grid { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: 50px 50px; background-image: linear-gradient(to right, rgba(0, 212, 255, 0.05) 1px, transparent 1px), linear-gradient(to bottom, rgba(0, 212, 255, 0.05) 1px, transparent 1px); }
.splash-content { z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; margin-bottom: 80px; }
.splash-logo { height: 250px; filter: drop-shadow(0 0 20px rgba(0,212,255,0.4)); margin-bottom: 20px; }
.splash-title { font-size: 3.5rem; letter-spacing: 12px; font-weight: 800; background: linear-gradient(to right, #fff, var(--blue-bright)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin: 0; }
.splash-subtitle { font-size: 1.2rem; letter-spacing: 4px; text-transform: uppercase; opacity: 0.7; margin-top: 15px; }
.scroll-indicator { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); z-index: 2; }
.mouse { width: 22px; height: 38px; border: 2px solid white; border-radius: 20px; position: relative; margin: 0 auto; }
.mouse::before { content: ""; width: 4px; height: 4px; background: var(--blue-bright); position: absolute; left: 50%; transform: translateX(-50%); top: 8px; border-radius: 50%; animation: scroll-ani 2s infinite; }
@keyframes scroll-ani { 0% { opacity: 1; top: 8px; } 100% { opacity: 0; top: 22px; } }

/* --- 3. HEADER (VALIDATO) --- */
header { height: 120px; display: flex; align-items: center; justify-content: space-between; padding: 0 5%; background: white; position: fixed; top: 0; width: 100%; z-index: 9000; box-shadow: 0 4px 20px rgba(0,0,0,0.08); transition: 0.5s; }
.logo-container { display: flex; align-items: center; }
.logo-container img { height: 90px; width: auto; }
.tagline { color: var(--antracite); font-size: 12px; font-weight: 700; text-transform: uppercase; margin-left: 25px; border-left: 3px solid var(--blue-bright); padding-left: 20px; line-height: 1.5; text-align: left; }
nav { display: flex; align-items: center; }
nav a { color: var(--antracite); text-decoration: none; font-weight: 800; margin-left: 40px; font-size: 13px; text-transform: uppercase; letter-spacing: 1.5px; transition: 0.3s; }
nav a:hover { color: var(--blue-bright); }

/* --- 4. HERO SECTION (VALIDATO) --- */
.hero { padding: 280px 5% 120px; text-align: center; max-width: 1200px; margin: 0 auto; }
.hero h1 { font-size: 65px; font-weight: 800; text-transform: uppercase; line-height: 1.1; margin-bottom: 25px; color: #fff; }
.hero .gradient-text { background: var(--gradient-text); -webkit-background-clip: text; -webkit-text-fill-color: transparent; display: inline-block; }
.hero-subtitle { font-size: 18px; line-height: 1.6; opacity: 0.9; margin-bottom: 50px; font-weight: 300; max-width: 850px; margin: 0 auto 50px; }
.hero-subtitle strong { color: var(--blue-bright); font-weight: 700; }
.hero-btns { display: flex; gap: 20px; justify-content: center; }

/* --- 5. STATS (VALIDATO) --- */
.stats-container { display: flex; justify-content: space-around; max-width: 1100px; margin: 80px auto; padding: 60px 20px; background: rgba(255, 255, 255, 0.03); border-radius: 30px; border: 1px solid rgba(0, 212, 255, 0.15); backdrop-filter: blur(10px); }
.stat-item { text-align: center; }
.stat-number { font-size: 4.5rem; font-weight: 800; color: var(--blue-bright); }
.stat-suffix { font-size: 2.5rem; color: var(--blue-bright); font-weight: 800; margin-left: -5px; }
.stat-text { font-size: 11px; letter-spacing: 3px; font-weight: 700; margin-top: 15px; opacity: 0.8; text-transform: uppercase; }

/* --- 6. TECH STACK (VERSIONE TESTUALE HIGH-END) --- */
.tech-stack { 
    padding: 80px 5%; 
    background: rgba(0, 0, 0, 0.2); 
    border-top: 1px solid rgba(0, 212, 255, 0.1); 
    text-align: center; 
    width: 100%; 
}

.tech-stack-title { 
    font-size: 10px; 
    letter-spacing: 5px; 
    text-transform: uppercase; 
    color: var(--blue-bright); 
    margin-bottom: 50px; 
    font-weight: 800; 
}

.tech-grid-logos { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 20px; 
    max-width: 800px; 
    margin: 0 auto; 
}

.tech-logo-card { 
    background: rgba(255, 255, 255, 0.02); 
    border: 1px solid rgba(255, 255, 255, 0.05); 
    padding: 20px; 
    border-radius: 10px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    height: 80px; /* Più sottile e sobrio */
    transition: 0.4s ease; 
}

/* Sostituiamo lo stile dell'immagine con quello del testo */
.tech-text {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.4); /* Grigio spento di base */
    text-transform: uppercase;
    transition: 0.4s;
}

.tech-logo-card:hover { 
    border-color: var(--blue-bright); 
    background: rgba(0, 212, 255, 0.05); 
    transform: translateY(-3px); 
}

.tech-logo-card:hover .tech-text { 
    color: #ffffff; 
    text-shadow: 0 0 15px rgba(0, 212, 255, 0.6); /* Effetto neon blu sul testo */
}

.crossmanager-card { 
    grid-column: span 2; 
    width: 100%; 
    max-width: 400px;
    margin: 0 auto;
}

/* --- 7. MEDIA QUERIES BASE (VALIDATO) --- */
@media (max-width: 768px) {
    header { height: 90px; padding: 0 20px; }
    .logo-container img { height: 60px; }
    .tagline { display: none; }
    .hamburger { display: flex; flex-direction: column; gap: 6px; cursor: pointer; z-index: 10001; }
    .hamburger span { width: 30px; height: 3px; background: var(--antracite); transition: 0.3s; }
    .hamburger.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
    nav { position: fixed; top: 0; right: -100%; width: 100%; height: 100vh; background: white; flex-direction: column; justify-content: center; transition: 0.5s; z-index: 10000; }
    nav.active { right: 0; }
    nav a { margin: 20px 0; font-size: 20px; }
    .hero { padding: 180px 20px 60px; }
    .hero h1 { font-size: 38px; }
	/* --- FIX SPLASH SCREEN MOBILE --- */
    .splash-logo {
        height: 140px !important; /* Riduce il logo (era 250px) */
        margin-bottom: 15px !important;
    }

    .splash-title {
        font-size: 1.8rem !important; /* Riduce il font (era 3.5rem) */
        letter-spacing: 4px !important; /* Riduce lo spazio tra lettere (era 12px) */
        line-height: 1.2 !important;
        padding: 0 20px !important;
        width: 100% !important;
        text-align: center !important;
    }

    .splash-subtitle {
        font-size: 0.9rem !important; /* Riduce il sottotitolo */
        letter-spacing: 2px !important;
    }
    .stats-container { flex-direction: column; gap: 40px; margin: 40px 20px; }
 /* --- TECH STACK TEXT MOBILE --- */
    .tech-grid-logos { 
        grid-template-columns: 1fr !important; 
        gap: 15px !important; 
    }
    
    .tech-logo-card { 
        height: 65px !important; /* Molto più elegante per il solo testo */
        padding: 10px !important;
        border-radius: 8px !important;
    }

    .tech-text {
        font-size: 0.85rem !important; /* Testo leggibile ma compatto */
        letter-spacing: 2px !important;
        color: #ffffff !important; /* Lo teniamo acceso su mobile */
    }
    /* Fix Hero Buttons Mobile */
    .hero-btns { flex-direction: column; padding: 0 20px; }
    .btn-primary, .btn-secondary, .btn-send { width: 100% !important; padding: 18px !important; }
}
@media (max-width: 768px) {

    /* 1. EXPERTISE: Forziamo 1 colonna (risolve lo screenshot delle card strette) */
    #expertise.expertise-grid {
        grid-template-columns: 1fr !important;
        gap: 25px !important;
        padding: 0 20px !important;
        margin-top: 40px !important;
    }

    .card {
        height: 380px !important; /* Più altezza per leggere bene i testi */
        padding: 30px !important;
    }

    .card p {
        opacity: 1 !important; /* Testo sempre visibile (su mobile non c'è l'hover) */
        transform: translateY(0) !important;
        font-size: 14px !important;
        line-height: 1.5 !important;
    }

    .card h3 {
        font-size: 20px !important;
        margin-bottom: 10px !important;
    }

    /* 2. ABOUT & CONTACT: Centratura forzata (risolve lo screenshot del testo a sinistra) */
    .about-card, .contact-card {
        text-align: center !important;
        padding: 60px 20px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    /* Titolo grande: Engineering / Tell Us... */
    .title-tech-large {
        font-size: 26px !important; 
        text-align: center !important;
        width: 100% !important;
        line-height: 1.3 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Testo descrizione About */
    .p-about {
        font-size: 15px !important;
        text-align: center !important;
        margin: 0 auto !important;
        width: 100% !important;
    }

    /* Location Tag (Polverigi) */
    .location-tag {
        text-align: center !important;
        width: 100% !important;
        margin-top: 30px !important;
    }

    /* 3. HERO BUTTONS: Incolonnati per il mobile */
    .hero-btns {
        flex-direction: column !important;
        gap: 15px !important;
        width: 100% !important;
        max-width: 300px !important;
        margin: 0 auto !important;
    }

    .btn-primary, .btn-secondary {
        width: 100% !important;
    }
}
/* ============================================================
   FIX MOBILE FINALE: NASCONDI FUMETTO WA SOPRA IL TORNA SU
   (NON TOCCA ALTRO DEL SITO)
   ============================================================ */

@media (max-width: 768px) {
    /* Nasconde il fumetto di testo su mobile */
    .wa-float .wa-bubble {
        display: none !important;
    }

    /* Assicura che l'icona tonda di WhatsApp sia visibile e non copra il torna su */
    .wa-float {
        bottom: 30px !important;
        left: 20px !important; /* Leggermente spostato per bilanciare il torna su a destra */
    }

    /* Assicura che il Torna Su sia visibile a destra */
    .back-to-top {
        bottom: 30px !important;
        right: 20px !important;
        opacity: 0.9 !important; /* Leggermente più visibile al tocco */
    }
}

/* --- 8. EXPERTISE GRID (VALIDATO) --- */
#expertise.expertise-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; max-width: 1100px; margin: 80px auto; padding: 0 5%; }
.card { position: relative; height: 400px; border-radius: 20px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.1); background: #000; display: flex; flex-direction: column; justify-content: flex-end; padding: 40px; transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1); cursor: pointer; }
.card-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; filter: grayscale(100%) brightness(0.4); transition: 0.8s cubic-bezier(0.2, 1, 0.3, 1); z-index: 1; }
.card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(4, 8, 16, 0.9) 15%, transparent 100%); z-index: 2; }
.card h3 { position: relative; z-index: 3; font-size: 20px; letter-spacing: 2px; font-weight: 800; margin-bottom: 10px; color: #fff; transition: 0.4s; }
.card p { position: relative; z-index: 3; font-size: 14px; line-height: 1.5; color: rgba(255, 255, 255, 0.7); opacity: 0; transform: translateY(20px); transition: 0.5s; }
.card:hover { border-color: var(--blue-bright); transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6); }
.card:hover .card-img { filter: grayscale(0%) brightness(0.7); transform: scale(1.1); }
.card:hover h3 { color: var(--blue-bright); }
.card:hover p { opacity: 1; transform: translateY(0); }

/* --- 9. BOTTONI UNIFICATI (HERO & SEND) --- */
.btn-primary, .btn-secondary, .btn-send {
    display: inline-block;
    padding: 22px 40px;
    border-radius: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 14px;
    transition: all 0.4s cubic-bezier(0.2, 1, 0.3, 1);
    cursor: pointer;
    text-decoration: none;
    border: none;
    text-align: center;
}
.btn-primary, .btn-send { background: var(--blue-bright); color: var(--antracite); }
.btn-primary:hover, .btn-send:hover { transform: translateY(-4px); letter-spacing: 4px; box-shadow: 0 12px 30px rgba(0, 212, 255, 0.4); filter: brightness(1.1); }
.btn-secondary { background: transparent; color: white; border: 1px solid rgba(255, 255, 255, 0.3); }
.btn-secondary:hover { border-color: var(--blue-bright); color: var(--blue-bright); transform: translateY(-4px); background: rgba(0, 212, 255, 0.05); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3); }

/* --- 10. ABOUT, CONTACTS & FOOTER --- */
.section-card-container { padding: 100px 5%; max-width: 1100px; margin: 0 auto; }
.about-card, .contact-card { position: relative; background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(0, 212, 255, 0.2); border-radius: 30px; padding: 80px 60px; text-align: center; backdrop-filter: blur(10px); margin-bottom: 50px; }
.badge-tech { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); background: var(--blue-bright); color: var(--antracite); padding: 10px 35px; border-radius: 50px; font-weight: 800; font-size: 11px; letter-spacing: 3px; box-shadow: 0 5px 20px rgba(0, 212, 255, 0.4); white-space: nowrap; }
.title-tech-large { font-size: 40px; font-weight: 800; letter-spacing: 2px; margin-bottom: 20px; color: #fff; text-transform: uppercase; }
.p-about { font-size: 18px; line-height: 1.8; opacity: 0.8; max-width: 800px; margin: 0 auto; color: #fff; }
.location-tag { margin-top: 30px; border-top: 1px solid rgba(255,255,255,0.05); padding-top: 20px; font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: #888; }
.contact-form-compact { max-width: 600px; margin: 40px auto 0; display: flex; flex-direction: column; gap: 15px; }
.input-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.contact-form-compact input, .contact-form-compact textarea, .contact-form-compact select { width: 100%; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); padding: 18px; border-radius: 12px; color: white; outline: none; transition: 0.3s; }
.contact-form-compact input:focus, .contact-form-compact select:focus { border-color: var(--blue-bright); }
.wa-float { position: fixed; bottom: 30px; left: 30px; z-index: 999; display: flex; align-items: center; gap: 12px; cursor: pointer; }
.wa-bubble { background: white; color: #333; padding: 10px 18px; border-radius: 15px 15px 15px 0; font-size: 13px; font-weight: 700; box-shadow: 0 10px 25px rgba(0,0,0,0.3); }
.back-to-top { position: fixed; bottom: 30px; right: 30px; width: 50px; height: 50px; background: rgba(255,255,255,0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0; transition: 0.5s; z-index: 999; border: 1px solid rgba(255,255,255,0.1); color: white; text-decoration: none; }
.back-to-top.show { opacity: 1; }
/* --- FIX MIRATO: VISIBILITÀ OPZIONI SELECT --- */

/* 1. Colore del testo nella casella chiusa */
.contact-form-compact select {
    color: #ffffff !important;
}

/* 2. Questo è il pezzo critico: forza lo sfondo scuro e testo bianco 
      nella lista che appare al clic, evitando il grigio su grigio */
.contact-form-compact select option {
    background-color: #1a202c !important; /* Colore Antracite coerente con il tuo brand */
    color: #ffffff !important;
    padding: 10px;
}
