/* ==========================================
   1. RESET DI BASE E STRUTTURA FONDAMENTALE
   ========================================== */
html, body { 
    background-color: #000000; 
    color: #ffffff; 
    width: 100%; 
    max-width: 100vw; 
    overflow-x: hidden !important; 
    position: relative;
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
}

#page-wrapper { 
    overflow-x: hidden; 
    width: 100%; 
    position: relative; 
}

/* Scrollbar premium personalizzata */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #000000; }
::-webkit-scrollbar-thumb { background: #1a1a1a; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #FF7A00; }

/* ==========================================
   2. EFFETTI DI SFONDO PREMIUM (Glow & Noise)
   ========================================== */
.ambient-glow { 
    position: absolute; 
    width: 100%; 
    height: 1200px; 
    background: radial-gradient(ellipse at 50% 0%, rgba(255, 122, 0, 0.4) 0%, rgba(255, 122, 0, 0.1) 40%, rgba(0, 0, 0, 0) 85%); 
    top: 0; 
    left: 0; 
    z-index: 0; 
    pointer-events: none; 
}

.hero-noise { 
    position: absolute; 
    inset: 0; 
    background-image: url("https://grainy-gradients.vercel.app/noise.svg"); 
    opacity: 0.15; 
    pointer-events: none; 
    z-index: 1; 
}

/* ==========================================
   3. ELEMENTI INTERFACCIA CONDIVISI (Glassmorphism)
   ========================================== */
/* Navbar trasparente seamless */
.glass-nav { 
    background: transparent; 
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px); 
    transition: all 0.4s ease;
}

/* Card ad effetto vetro con interazione arancione al passaggio del mouse */
.glass-card { 
    background: rgba(255, 255, 255, 0.03); 
    backdrop-filter: blur(16px); 
    -webkit-backdrop-filter: blur(16px); 
    border: 1px solid rgba(255, 255, 255, 0.08); 
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease, box-shadow 0.4s ease; 
    backface-visibility: hidden; 
    transform-style: preserve-3d; 
}

.glass-card:hover { 
    transform: translateY(-8px); 
    border-color: rgba(255, 122, 0, 0.3); 
    box-shadow: 0 20px 40px -10px rgba(255, 122, 0, 0.1); 
}

/* Modali ed elementi popup */
.glass-modal { 
    background: rgba(15, 15, 15, 0.85); 
    backdrop-filter: blur(24px); 
    -webkit-backdrop-filter: blur(24px); 
    border: 1px solid rgba(255, 255, 255, 0.1); 
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); 
}









/* ==========================================
   4. STILI SPECIFICI PER PAGINA LAVORI
   ========================================== */
.nav-link { 
    padding: 0.6rem 1.4rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #AAAAAA;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.nav-link.active {
    background: rgba(255, 122, 0, 0.1);
    color: #FF7A00;
    border-color: rgba(255, 122, 0, 0.4);
    box-shadow: 0 0 20px -5px rgba(255, 122, 0, 0.2);
    font-weight: 600;
}

.nav-link::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
    transition: 0.5s;
}

.nav-link:hover::after { left: 100%; }

.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }
.work-overlay { background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%); opacity: 0; transition: opacity 0.3s ease; }
.glass-card:hover .work-overlay { opacity: 1; }
.view-badge { background: rgba(255, 122, 0, 0.95); backdrop-filter: blur(4px); padding: 4px 12px; border-radius: 99px; font-size: 11px; font-weight: 800; color: white; position: absolute; top: 16px; left: 16px; z-index: 30; box-shadow: 0 4px 12px rgba(0,0,0,0.3); }

@keyframes arrow-bounce { 0%, 100% { transform: translateY(0); opacity: 0.5; } 50% { transform: translateY(10px); opacity: 1; } }
.animate-arrow { animation: arrow-bounce 2s infinite ease-in-out; }

.chat-button { position: fixed; bottom: 2rem; right: 2rem; z-index: 130; display: flex; align-items: center; justify-content: center; background-color: #FF7A00; color: white; border-radius: 9999px; transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); min-width: 4rem; height: 4rem; box-shadow: 0 10px 20px rgba(255, 122, 0, 0.2); cursor: pointer; border: none; overflow: hidden; }
#chat-text { max-width: 0; opacity: 0; font-size: 0px; transition: all 0.5s ease; font-weight: 600; white-space: nowrap; }
.chat-button.expanded { padding: 0 1.5rem; max-width: 400px; }
.chat-button.expanded #chat-text { max-width: 250px; opacity: 1; font-size: 16px; margin-left: 12px; }

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
