/* ==========================================================================
   STYLE-FUTURE.CSS - Next-Gen Tech Dark & Light Theme for NoSolo3D
   ========================================================================== */

:root {
    --bg-primary: #07090e;
    --bg-secondary: #0d111a;
    --bg-elevated: #131926;
    --bg-glass: rgba(13, 17, 26, 0.72);
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(0, 240, 255, 0.25);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --neon-cyan: #00f0ff;
    --neon-blue: #3b82f6;
    --neon-purple: #8b5cf6;
    --neon-amber: #f59e0b;
    
    --gradient-glow: linear-gradient(135deg, #00f0ff 0%, #3b82f6 50%, #8b5cf6 100%);
    --gradient-card: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   LIGHT THEME VARIABLES OVERRIDE
   ========================================================================== */
body.theme-light, [data-theme="light"] {
    --bg-primary: #F8FAFC;
    --bg-secondary: #FFFFFF;
    --bg-elevated: #F1F5F9;
    --bg-glass: rgba(255, 255, 255, 0.82);
    --border-glass: rgba(0, 0, 0, 0.08);
    --border-glow: rgba(0, 113, 227, 0.25);
    
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #64748B;
    
    --neon-cyan: #0284c7;
    --neon-blue: #2563eb;
    --neon-purple: #7c3aed;
    --neon-amber: #d97706;
    
    --gradient-glow: linear-gradient(135deg, #0284c7 0%, #2563eb 50%, #7c3aed 100%);
    --gradient-card: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.8) 100%);
}

/* Reset & Global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    cursor: default;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 240, 255, 0.2);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--neon-cyan);
}

/* Interactive Cursor Follower */
.cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background: var(--neon-cyan);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: opacity 0.2s, transform 0.08s ease;
    box-shadow: 0 0 12px var(--neon-cyan);
}

.cursor-trail {
    position: fixed;
    top: 0;
    left: 0;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(0, 240, 255, 0.4);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, border-color 0.3s, background-color 0.3s;
}

body:hover .cursor-dot, body:hover .cursor-trail {
    opacity: 1;
}

@media (pointer: coarse) {
    .cursor-dot, .cursor-trail { display: none !important; }
}

/* Ambient Canvas / Cyber Grid Background */
.bg-grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(0, 240, 255, 0.08) 0%, transparent 60%),
        radial-gradient(circle at 90% 70%, rgba(139, 92, 246, 0.06) 0%, transparent 50%),
        linear-gradient(to right, rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 60px 60px, 60px 60px;
    pointer-events: none;
    z-index: 0;
}

/* Container */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   NAVBAR
   ========================================================================== */
.navbar-future {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    max-width: 1240px;
    padding: 12px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: var(--bg-glass);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-full);
    transition: var(--transition);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.navbar-future.scrolled {
    top: 10px;
    padding: 10px 24px;
    background: rgba(7, 9, 14, 0.92);
    border-color: rgba(0, 240, 255, 0.2);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8), 0 0 25px rgba(0, 240, 255, 0.1);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.nav-brand img {
    height: 34px;
    width: auto;
    filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.35));
    transition: var(--transition);
}

.nav-brand .logo-mobile {
    display: none;
}
.nav-brand .logo-desktop {
    display: block;
}

.nav-brand:hover img {
    transform: scale(1.05);
    filter: drop-shadow(0 0 14px rgba(0, 240, 255, 0.65));
}

.nav-links-future {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-links-future a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    position: relative;
    padding: 6px 0;
    transition: var(--transition);
}

.nav-links-future a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--gradient-glow);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-links-future a:hover {
    color: #fff;
    text-shadow: 0 0 12px rgba(0, 240, 255, 0.5);
}

.nav-links-future a:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.lang-switch-future {
    display: flex;
    background: rgba(255, 255, 255, 0.04);
    padding: 4px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-glass);
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
}

.lang-btn.active, .lang-btn:hover {
    color: #fff;
    background: rgba(0, 240, 255, 0.2);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.btn-nav-cta {
    background: var(--gradient-glow);
    color: #000;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 9px 22px;
    border-radius: var(--radius-full);
    text-decoration: none;
    letter-spacing: 0.03em;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.6);
}

/* Mobile Menu Toggle */
.mobile-toggle {
    display: none;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
}

/* ==========================================================================
   HERO SECTION - CINEMATIC IMMERSIVE
   ========================================================================== */
.hero-future {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 80px;
}

.hero-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    filter: brightness(0.92) contrast(1.05); /* Molto più chiaro, vivido e brillante */
    transform: scale(1.02);
    transition: filter 1s ease, transform 1.2s cubic-bezier(0.1, 1, 0.1, 1);
}

.hero-overlay-future {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    /* Di base overlay di sicurezza elegante con vignettatura morbida */
    background: 
        radial-gradient(circle at center, rgba(7, 9, 14, 0.15) 0%, rgba(7, 9, 14, 0.5) 60%, rgba(7, 9, 14, 0.9) 100%),
        linear-gradient(to bottom, rgba(7, 9, 14, 0.3) 0%, transparent 40%, rgba(7, 9, 14, 0.85) 100%);
    pointer-events: none;
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), background 1s ease;
    opacity: 0.85; /* Stato attivo quando l'utente muove il mouse */
}

/* Modalità Cinema / Trasparenza Ultra-Clear (dopo 2.5s di inattività) */
.hero-future.cinema-mode .hero-overlay-future {
    opacity: 0.15; /* Diventa quasi totalmente trasparente per ammirare il video! */
    background: 
        radial-gradient(circle at center, transparent 35%, rgba(7, 9, 14, 0.45) 85%),
        linear-gradient(to bottom, transparent 0%, transparent 70%, rgba(7, 9, 14, 0.75) 100%);
}

.hero-future.cinema-mode .hero-video-bg {
    filter: brightness(1.02) contrast(1.08); /* Massima brillantezza cinematografica */
}

.hero-content-future {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 960px;
    padding: 0 20px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.3);
    padding: 8px 18px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--neon-cyan);
    margin-bottom: 28px;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.15);
    backdrop-filter: blur(10px);
}

.hero-badge .pulse-point {
    width: 6px;
    height: 6px;
    background: var(--neon-cyan);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--neon-cyan);
    animation: pulseGlow 1.8s infinite;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.4); }
}

.hero-title-future {
    font-size: clamp(2.8rem, 6vw, 5.2rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
    color: #fff;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.9), 0 10px 40px rgba(0, 0, 0, 0.85);
}

.hero-title-future .gradient-text {
    background: linear-gradient(135deg, #00f0ff 0%, #38bdf8 45%, #818cf8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    text-shadow: none; /* Rimuove l'ombra scura del genitore che creava l'alone interno sporco */
    filter: drop-shadow(0 2px 10px rgba(0, 240, 255, 0.5));
}

.hero-desc-future {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    color: #cbd5e1; /* Leggermente più luminoso */
    max-width: 700px;
    margin: 0 auto 36px auto;
    font-weight: 400;
    text-shadow: 0 3px 15px rgba(0, 0, 0, 0.95);
}

.hero-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-primary-future {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--gradient-glow);
    color: #07090e;
    font-weight: 700;
    font-size: 1.02rem;
    padding: 16px 36px;
    border-radius: var(--radius-full);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(0, 240, 255, 0.35);
    border: none;
    cursor: pointer;
}

.btn-primary-future:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 45px rgba(0, 240, 255, 0.6);
}

.btn-secondary-future {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid var(--border-glass);
    padding: 15px 32px;
    border-radius: var(--radius-full);
    font-size: 1.02rem;
    font-weight: 500;
    text-decoration: none;
    backdrop-filter: blur(12px);
    transition: var(--transition);
}

.btn-secondary-future:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(0, 240, 255, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.audio-toggle-future {
    position: absolute;
    bottom: 35px;
    right: 35px;
    z-index: 10;
    background: rgba(13, 17, 26, 0.6);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    color: #fff;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.audio-toggle-future:hover {
    background: rgba(0, 240, 255, 0.15);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

.scroll-indicator-future {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-decoration: none;
    transition: var(--transition);
}

.scroll-indicator-future:hover {
    color: var(--neon-cyan);
}

.scroll-mouse {
    width: 22px;
    height: 36px;
    border: 2px solid var(--text-muted);
    border-radius: 12px;
    position: relative;
}

.scroll-mouse::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 6px;
    background: var(--neon-cyan);
    border-radius: 2px;
    animation: scrollAnim 2s infinite;
}

@keyframes scrollAnim {
    0% { transform: translate(-50%, 0); opacity: 1; }
    80% { transform: translate(-50%, 14px); opacity: 0; }
    100% { transform: translate(-50%, 0); opacity: 0; }
}

/* ==========================================================================
   METRICS / HIGHLIGHTS STRIP
   ========================================================================= */
.metrics-strip {
    padding: 40px 0;
    border-bottom: 1px solid var(--border-glass);
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.metric-card {
    padding: 20px;
}

.metric-number {
    font-size: 2.8rem;
    font-weight: 800;
    background: var(--gradient-glow);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin-bottom: 8px;
}

.metric-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ==========================================================================
   SERVICES SHOWCASE - 3D INTERACTIVE CARDS
   ========================================================================== */
.section-future {
    padding: 130px 0;
    position: relative;
    z-index: 1;
}

.section-header-future {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 70px auto;
}

.section-tag {
    display: inline-block;
    color: var(--neon-cyan);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.section-title-future {
    font-size: clamp(2.2rem, 4vw, 3.4rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
    margin-bottom: 18px;
    line-height: 1.15;
}

.section-desc-future {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.services-grid-future {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 36px;
}

.service-card-future {
    position: relative;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    /* Forza il ritaglio dei bordi arrotondati durante le trasformazioni 3D/hover */
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    mask-image: radial-gradient(white, black);
    border: 1px solid var(--border-glass);
    transition: transform 0.4s var(--ease-out), border-color 0.4s, box-shadow 0.4s;
    cursor: pointer;
    will-change: transform;
}

.service-card-future::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(0, 240, 255, 0.12), transparent 40%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
    z-index: 3;
    border-radius: inherit;
}

.service-card-future:hover::before {
    opacity: 1;
}

.service-card-future:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 240, 255, 0.4);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 35px rgba(0, 240, 255, 0.15);
}

.card-media-wrapper {
    position: relative;
    width: 100%;
    height: 320px;
    overflow: hidden;
    background: #000;
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    mask-image: radial-gradient(white, black);
}

.card-media-wrapper img, 
.card-media-wrapper .card-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
    transition: transform 0.6s var(--ease-out), filter 0.6s;
    will-change: transform;
}

.service-card-future:hover .card-media-wrapper img,
.service-card-future:hover .card-media-wrapper .card-bg-img {
    transform: scale(1.08);
}

.card-badge-category {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 4;
    background: rgba(7, 9, 14, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--neon-cyan);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.card-explore-hint {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 4;
    width: 44px;
    height: 44px;
    background: var(--gradient-glow);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #07090e;
    font-size: 1.2rem;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
    transform: scale(0.85);
    opacity: 0.8;
    transition: var(--transition);
}

.service-card-future:hover .card-explore-hint {
    transform: scale(1.1) rotate(45deg);
    opacity: 1;
}

.card-body-future {
    padding: 32px 30px;
    position: relative;
    z-index: 2;
    background: linear-gradient(180deg, rgba(13, 17, 26, 0.95) 0%, rgba(7, 9, 14, 1) 100%);
}

.card-body-future h3 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
    transition: color 0.3s;
}

.service-card-future:hover .card-body-future h3 {
    color: var(--neon-cyan);
}

.card-body-future p {
    font-size: 1.02rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ==========================================================================
   WORKFLOW TIMELINE - CINEMATIC STEPPER
   ========================================================================== */
.workflow-section {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-glass);
    border-bottom: 1px solid var(--border-glass);
    position: relative;
    overflow: hidden;
}

.workflow-glow-ball {
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.workflow-timeline {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    position: relative;
    margin-top: 50px;
}

.workflow-timeline::before {
    content: '';
    position: absolute;
    top: 36px;
    left: 5%;
    width: 90%;
    height: 2px;
    background: linear-gradient(90deg, rgba(0, 240, 255, 0.1) 0%, rgba(0, 240, 255, 0.6) 50%, rgba(139, 92, 246, 0.6) 100%);
    z-index: 1;
}

.workflow-step-card {
    position: relative;
    z-index: 2;
    background: rgba(7, 9, 14, 0.7);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 24px 20px;
    backdrop-filter: blur(12px);
    transition: var(--transition);
}

.workflow-step-card:hover {
    transform: translateY(-8px);
    border-color: var(--neon-cyan);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 25px rgba(0, 240, 255, 0.2);
}

.step-number-bubble {
    width: 48px;
    height: 48px;
    background: var(--bg-secondary);
    border: 2px solid var(--neon-cyan);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--neon-cyan);
    margin-bottom: 20px;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
    transition: var(--transition);
}

.workflow-step-card:hover .step-number-bubble {
    background: var(--neon-cyan);
    color: #000;
    box-shadow: 0 0 25px var(--neon-cyan);
}

.workflow-step-card h4 {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 10px;
}

.workflow-step-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ==========================================================================
   ABOUT FOUNDER SECTION - TECH BIOGRAPHY
   ========================================================================== */
.about-future-wrapper {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 70px;
    align-items: center;
}

.about-image-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    padding: 12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(0, 240, 255, 0.2) 100%);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
}

.about-image-inner {
    position: relative;
    border-radius: calc(var(--radius-lg) - 10px);
    overflow: hidden;
    aspect-ratio: 4/5;
}

.about-image-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: contrast(1.05);
    transition: transform 0.6s var(--ease-out);
}

.about-image-card:hover img {
    transform: scale(1.04);
}

.about-experience-badge {
    position: absolute;
    bottom: 24px;
    right: 24px;
    background: rgba(7, 9, 14, 0.85);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-glow);
    padding: 14px 22px;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.about-experience-badge strong {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--neon-cyan);
    line-height: 1;
}

.about-experience-badge span {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.about-text-column h2 {
    margin-bottom: 24px;
}

.about-bio-text {
    font-size: 1.12rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 30px;
}

.about-bio-text strong {
    color: #fff;
    font-weight: 600;
}

.about-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.pill-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    padding: 8px 18px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.pill-item:hover {
    background: rgba(0, 240, 255, 0.1);
    border-color: var(--neon-cyan);
    color: #fff;
}

/* ==========================================================================
   CLIENT LOGOS MARQUEE / GRID
   ========================================================================== */
.clients-section-future {
    padding: 90px 0;
    border-top: 1px solid var(--border-glass);
    background: var(--bg-primary);
}

.clients-grid-future {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 40px;
    align-items: center;
    justify-items: center;
    margin-top: 40px;
}

.client-logo-future {
    max-width: 130px;
    max-height: 50px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(100%) brightness(0.65) invert(1);
    opacity: 0.45;
    transition: all 0.4s ease;
    cursor: pointer;
}

.client-logo-future:hover {
    filter: grayscale(0%) brightness(1) invert(0);
    opacity: 1;
    transform: scale(1.15);
}

/* ==========================================================================
   FOOTER CTA - HIGH IMPACT
   ========================================================================== */
.footer-future {
    position: relative;
    padding: 120px 0 60px 0;
    background: radial-gradient(circle at 50% 0%, rgba(0, 240, 255, 0.12) 0%, var(--bg-primary) 70%);
    border-top: 1px solid var(--border-glass);
    text-align: center;
}

.footer-cta-box {
    max-width: 760px;
    margin: 0 auto;
}

.footer-title-future {
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.footer-btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--gradient-glow);
    color: #07090e;
    font-weight: 800;
    font-size: 1.15rem;
    padding: 18px 48px;
    border-radius: var(--radius-full);
    text-decoration: none;
    letter-spacing: 0.02em;
    box-shadow: 0 10px 40px rgba(0, 240, 255, 0.4);
    transition: var(--transition);
    margin-bottom: 60px;
    cursor: pointer;
    border: none;
}

.footer-btn-cta:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 20px 60px rgba(0, 240, 255, 0.7);
}

.footer-bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 40px;
    border-top: 1px solid var(--border-glass);
    color: var(--text-muted);
    font-size: 0.9rem;
    flex-wrap: wrap;
    gap: 20px;
}

/* ==========================================================================
   MODALS (GALLERY & CONTACT) - CYBER GLASS
   ========================================================================== */
.modal-future {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    background: rgba(7, 9, 14, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.35s ease;
    padding: 20px;
    pointer-events: none;
}

.modal-future.show {
    opacity: 1;
    display: flex !important;
    pointer-events: auto;
}

.modal-future-content {
    position: relative;
    width: 100%;
    max-width: 1200px;
    max-height: 90vh;
    background: var(--bg-secondary);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.9), 0 0 50px rgba(0, 240, 255, 0.15);
    overflow-y: auto;
    padding: 48px;
    transform: scale(0.95);
    transition: transform 0.4s var(--ease-out);
}

.modal-future.show .modal-future-content {
    transform: scale(1);
}

.modal-future-close {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.modal-future-close:hover {
    background: rgba(0, 240, 255, 0.2);
    border-color: var(--neon-cyan);
    transform: rotate(90deg);
}

/* ==========================================================================
   GALLERY MODAL HEADER (STICKY IN ALTO CON RIDUZIONE DINAMICA DEL TITOLO)
   ========================================================================== */
.gallery-modal-header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 20px;
    margin: -48px -48px 32px -48px; /* Si espande fino ai bordi di modal-future-content con margine inferiore generoso */
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 1px solid transparent;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-modal-header.is-scrolled {
    padding: 10px 20px;
    background: transparent;
    box-shadow: none;
    border-bottom-color: transparent;
}

.gallery-modal-title {
    margin: 0;
    color: #fff;
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    transition: font-size 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s ease;
    word-break: break-word;
}

/* Quando l'utente scorre la galleria: il titolo si riduce di dimensione e rimane fisso in alto */
.gallery-modal-header.is-scrolled .gallery-modal-title {
    font-size: 1.25rem;
}

/* Gallery Grid in Modal - Responsive Theater Layout */
.gallery-grid-future {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    grid-auto-flow: dense; /* Riempie automaticamente i vuoti della griglia */
    gap: 28px;
    margin-top: 0;
    padding-top: 14px; /* Padding in alto per distanziare bene le miniature dal titolo */
    align-items: stretch;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item-future {
    scroll-margin-top: 100px; /* Evita che durante lo scrollIntoView l'elemento finisca sotto l'header sticky */
}

/* Quando un video è attivo (in play) */
.gallery-grid-future.has-active-media {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    grid-auto-flow: dense;
    gap: 20px;
}

.gallery-item-future {
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-glass);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease, border-color 0.4s;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
}

.gallery-item-future:hover {
    border-color: rgba(0, 240, 255, 0.5);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

/* VIDEO WRAPPER & PLAY OVERLAY */
.gallery-video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
}

.gallery-video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Pulsante Play al centro */
.video-play-btn-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: 60px;
    height: 60px;
    background: rgba(7, 9, 14, 0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid var(--neon-cyan);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neon-cyan);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.35);
    cursor: pointer;
    z-index: 5;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.video-play-btn-overlay svg {
    margin-left: 4px;
    transition: transform 0.3s ease;
}

.gallery-video-wrapper:hover .video-play-btn-overlay {
    transform: translate(-50%, -50%) scale(1.12);
    background: rgba(0, 240, 255, 0.25);
    color: #fff;
    border-color: #fff;
    box-shadow: 0 0 30px var(--neon-cyan);
}

/* Quando il video è in riproduzione nascondi il bottone play centrale */
.gallery-item-future.is-playing .video-play-btn-overlay {
    display: none !important;
}

/* --- STATO VIDEO ATTIVO IN PLAY: GRANDE IL DOPPIO E CENTRATO CON ANIMAZIONE FLUIDA --- */
.gallery-item-future.is-active-theater {
    grid-column: span 2;
    grid-row: span 2;
    order: -1;
    border-color: var(--neon-cyan);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.9), 0 0 45px rgba(0, 240, 255, 0.35);
    z-index: 10;
    background: #090e17;
    animation: theaterExpand 0.65s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes theaterExpand {
    0% {
        transform: scale(0.92);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.gallery-item-future.is-active-theater .gallery-video-wrapper {
    aspect-ratio: 16/9;
}

/* Gli altri video che NON sono in play: compatti ed equilibrati senza buchi */
.gallery-grid-future.has-active-media .gallery-item-future:not(.is-active-theater) {
    opacity: 0.75;
    filter: brightness(0.85);
    transition: opacity 0.4s ease, filter 0.4s ease, transform 0.4s ease;
}

.gallery-grid-future.has-active-media .gallery-item-future:not(.is-active-theater):hover {
    transform: translateY(-4px);
    opacity: 1;
    filter: brightness(1);
}

.gallery-item-future .img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
    cursor: zoom-in;
    flex-shrink: 0;
}

.gallery-item-future .img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item-future:hover .img-wrapper img {
    transform: scale(1.08);
}

/* Didascalie uniformi per evitare card asimmetriche che creano buchi nella griglia */
.gallery-caption-future {
    padding: 14px 18px;
    font-size: 0.88rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-glass);
    line-height: 1.45;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Limita a max 3 righe per le anteprime, così tutte le card hanno altezza armoniosa */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.3s ease;
}

/* Quando la card è espansa in modalità theater, mostra l'intero testo completo senza troncatura */
.gallery-item-future.is-active-theater .gallery-caption-future {
    display: block;
    -webkit-line-clamp: unset;
    font-size: 1.05rem;
    color: #fff;
    padding: 22px 26px;
    background: rgba(13, 17, 26, 0.9);
}

/* ==========================================================================
   FULLSCREEN MEDIA OVERLAYS (IMMAGINI & VIDEO A TUTTO SCHERMO)
   ========================================================================== */
.fullscreen-media-overlay {
    display: none;
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    background: rgba(4, 6, 10, 0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    align-items: center;
    justify-content: center;
    padding: 30px;
    animation: viewerFadeIn 0.35s var(--ease-out) forwards;
}

@keyframes viewerFadeIn {
    0% { opacity: 0; transform: scale(0.97); }
    100% { opacity: 1; transform: scale(1); }
}

.viewer-close-btn {
    position: fixed;
    top: 24px;
    left: 24px;
    z-index: 100005;
    background: rgba(13, 17, 26, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(0, 240, 255, 0.3);
    color: #fff;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

.viewer-close-btn:hover {
    background: rgba(0, 240, 255, 0.25);
    border-color: var(--neon-cyan);
    color: #fff;
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.5);
    transform: translateY(-2px);
}

.viewer-nav-btn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    background: rgba(13, 17, 26, 0.85);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100001;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.viewer-prev-btn { left: 24px; }
.viewer-next-btn { right: 24px; }

.viewer-nav-btn:hover {
    background: var(--neon-cyan);
    color: #000;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 30px var(--neon-cyan);
    transform: translateY(-50%) scale(1.1);
}

.viewer-image-container,
.viewer-video-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 92vw;
    max-height: 90vh;
    position: relative;
    z-index: 100000;
}

#viewerMainImg {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.9);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

#viewerMainVideo {
    max-width: 100%;
    max-height: 78vh;
    border-radius: var(--radius-sm);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.95);
    outline: none;
    background: #000;
}

.viewer-caption {
    margin-top: 16px;
    color: #fff;
    font-size: 1.05rem;
    text-align: center;
    max-width: 800px;
    line-height: 1.5;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.viewer-counter {
    margin-top: 8px;
    color: var(--neon-cyan);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}

/* Contact Box Specifica */
.contact-future-box {
    max-width: 580px !important;
}

.future-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 24px;
}

.form-group-future {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.future-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    outline: none;
}

.future-input:focus {
    border-color: var(--neon-cyan);
    background: rgba(0, 240, 255, 0.04);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.15);
}

textarea.future-input {
    min-height: 130px;
    resize: vertical;
}

.btn-submit-future {
    background: var(--gradient-glow);
    color: #07090e;
    font-weight: 800;
    font-size: 1rem;
    padding: 16px 30px;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(0, 240, 255, 0.3);
}

.btn-submit-future:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(0, 240, 255, 0.6);
}

/* Toast */
.toast-future {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(13, 17, 26, 0.95);
    border: 1px solid var(--neon-cyan);
    color: #fff;
    padding: 14px 28px;
    border-radius: var(--radius-full);
    font-weight: 600;
    z-index: 3000;
    opacity: 0;
    transition: all 0.4s var(--ease-out);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 240, 255, 0.3);
}

.toast-future.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-future.error {
    border-color: #ef4444;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

/* ==========================================================================
   COOKIE BANNER FUTURISTICO
   ========================================================================== */
.cookie-banner-future {
    position: fixed;
    bottom: -220px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 840px;
    background: rgba(10, 15, 26, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(0, 240, 255, 0.25);
    border-radius: var(--radius-lg);
    padding: 20px 32px;
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    gap: 28px;
    z-index: 99999;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), 0 0 30px rgba(0, 240, 255, 0.12);
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    pointer-events: none;
}

.cookie-banner-future.is-visible {
    bottom: 28px;
    opacity: 1;
    pointer-events: auto;
}

.cookie-banner-future p {
    font-size: 0.95rem;
    color: #e2e8f0;
    margin: 0;
    line-height: 1.5;
}

.cookie-actions-future {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.cookie-btn-accept-future,
.cookie-btn-reject-future {
    padding: 10px 22px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    letter-spacing: 0.03em;
}

.cookie-btn-accept-future {
    background: var(--gradient-glow);
    color: #07090e;
    border: none;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.35);
}

.cookie-btn-accept-future:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.6);
}

.cookie-btn-reject-future {
    background: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
    border: 1px solid var(--border-glass);
}

.cookie-btn-reject-future:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   SCROLL REVEAL / MOTION UTILITIES
   ========================================================================== */
.reveal-fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal-fade-up.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-stagger-1 { transition-delay: 0.1s; }
.reveal-stagger-2 { transition-delay: 0.2s; }
.reveal-stagger-3 { transition-delay: 0.3s; }
.reveal-stagger-4 { transition-delay: 0.4s; }

/* ==========================================================================
   THEME TOGGLE BUTTON (CIRCOLINO SWITCH TEMA CHIARO / SCURO)
   ========================================================================== */
.theme-toggle-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    outline: none;
    flex-shrink: 0;
    
    /* STATO DEFAULT (Tema Scuro visibile): Circolino chiaro brillante */
    background: #f8fafc;
    color: #07090e;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.6), 0 2px 8px rgba(0, 0, 0, 0.4);
}

.theme-toggle-btn:hover {
    transform: scale(1.12);
    box-shadow: 0 0 22px rgba(255, 255, 255, 0.95);
}

.theme-toggle-btn svg {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Icone nel bottone */
.theme-toggle-btn .icon-sun {
    display: block;
}
.theme-toggle-btn .icon-moon {
    display: none;
}

/* QUANDO IL TEMA VISIBILE È CHIARO: il circolino diventa scuro */
body.theme-light .theme-toggle-btn,
[data-theme="light"] .theme-toggle-btn {
    background: #0f172a;
    color: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.3);
    box-shadow: 0 0 14px rgba(15, 23, 42, 0.35), 0 2px 8px rgba(0, 0, 0, 0.15);
}

body.theme-light .theme-toggle-btn:hover,
[data-theme="light"] .theme-toggle-btn:hover {
    transform: scale(1.12);
    box-shadow: 0 0 22px rgba(15, 23, 42, 0.55);
}

body.theme-light .theme-toggle-btn .icon-sun,
[data-theme="light"] .theme-toggle-btn .icon-sun {
    display: none;
}

body.theme-light .theme-toggle-btn .icon-moon,
[data-theme="light"] .theme-toggle-btn .icon-moon {
    display: block;
}

/* ==========================================================================
   STILI DETTAGLIATI TEMA CHIARO (BODY.THEME-LIGHT)
   ========================================================================== */
body.theme-light {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

/* Ambient Canvas / Grid in tema chiaro */
body.theme-light .bg-grid-overlay {
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(2, 132, 199, 0.08) 0%, transparent 60%),
        radial-gradient(circle at 90% 70%, rgba(124, 58, 237, 0.06) 0%, transparent 50%),
        linear-gradient(to right, rgba(0, 0, 0, 0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
}

/* Navbar in tema chiaro */
body.theme-light .navbar-future {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 1);
}

body.theme-light .navbar-future.scrolled {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(2, 132, 199, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

body.theme-light .nav-brand img {
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
}

body.theme-light .nav-links-future a {
    color: #475569;
}

body.theme-light .nav-links-future a:hover {
    color: #0f172a;
    text-shadow: none;
}

body.theme-light .lang-switch-future {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.08);
}

body.theme-light .lang-btn {
    color: #64748b;
}

body.theme-light .lang-btn.active,
body.theme-light .lang-btn:hover {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body.theme-light .btn-nav-cta {
    background: var(--gradient-glow);
    color: #fff;
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.35);
}

/* Card servizi in tema chiaro */
body.theme-light .section-title-future {
    color: #0f172a;
}

body.theme-light .service-card-future {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

body.theme-light .service-card-future:hover {
    border-color: rgba(2, 132, 199, 0.35);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.12), 0 0 25px rgba(2, 132, 199, 0.15);
}

body.theme-light .card-body-future {
    background: #ffffff;
}

body.theme-light .card-body-future h3 {
    color: #0f172a;
}

body.theme-light .card-body-future p {
    color: #475569;
}

body.theme-light .card-badge-category {
    background: rgba(255, 255, 255, 0.9);
    color: #0284c7;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

body.theme-light .card-explore-hint {
    color: #fff;
}

/* Workflow section in tema chiaro */
body.theme-light .workflow-section {
    background: #f1f5f9;
    border-color: rgba(0, 0, 0, 0.08);
}

body.theme-light .workflow-step-card {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
}

body.theme-light .workflow-step-card h4 {
    color: #0f172a;
}

body.theme-light .workflow-step-card p {
    color: #475569;
}

body.theme-light .step-number-bubble {
    background: #ffffff;
    border-color: #0284c7;
    color: #0284c7;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.2);
}

body.theme-light .workflow-step-card:hover .step-number-bubble {
    background: #0284c7;
    color: #fff;
}

/* About / Chi Sono in tema chiaro */
body.theme-light .about-image-card {
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

body.theme-light .about-experience-badge {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

body.theme-light .about-experience-badge strong {
    color: #0284c7;
}

body.theme-light .about-text-column h2 {
    color: #0f172a;
}

body.theme-light .about-bio-text {
    color: #475569;
}

body.theme-light .about-bio-text strong {
    color: #0f172a;
}

body.theme-light .pill-item {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
    color: #334155;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

body.theme-light .pill-item:hover {
    background: rgba(2, 132, 199, 0.1);
    border-color: #0284c7;
    color: #0284c7;
}

/* Client logos in tema chiaro */
body.theme-light .clients-section-future {
    border-color: rgba(0, 0, 0, 0.08);
}

body.theme-light .clients-section-future .section-title-future {
    color: #0f172a;
}

body.theme-light .client-logo-future {
    filter: grayscale(100%) brightness(0.2) invert(0);
    opacity: 0.55;
}

body.theme-light .client-logo-future:hover {
    filter: none;
    opacity: 1;
}

/* Footer in tema chiaro */
body.theme-light .footer-future {
    background: radial-gradient(circle at 50% 0%, rgba(2, 132, 199, 0.08) 0%, #f8fafc 70%);
    border-color: rgba(0, 0, 0, 0.08);
}

body.theme-light .footer-title-future {
    color: #0f172a;
}

body.theme-light .footer-btn-cta {
    color: #fff;
}

body.theme-light .footer-bottom-bar {
    border-color: rgba(0, 0, 0, 0.08);
    color: #64748b;
}

/* Modale Gallerie & Contatti in tema chiaro */
body.theme-light .modal-future {
    background: rgba(15, 23, 42, 0.6);
}

body.theme-light .modal-future-content {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.25);
}

body.theme-light .gallery-modal-header {
    background: transparent;
    border-bottom-color: transparent;
}

body.theme-light .gallery-modal-header.is-scrolled {
    background: transparent;
    border-bottom-color: transparent;
    box-shadow: none;
}

body.theme-light .gallery-modal-title {
    color: #0f172a;
}

body.theme-light .modal-future-close {
    background: rgba(0, 0, 0, 0.06);
    color: #0f172a;
    border-color: rgba(0, 0, 0, 0.1);
}

body.theme-light .modal-future-close:hover {
    background: rgba(2, 132, 199, 0.15);
    border-color: #0284c7;
    color: #0284c7;
}

body.theme-light .gallery-item-future {
    background: #f8fafc;
    border-color: rgba(0, 0, 0, 0.08);
}

body.theme-light .gallery-caption-future {
    color: #475569;
    border-top-color: rgba(0, 0, 0, 0.08);
}

body.theme-light .gallery-item-future.is-active-theater {
    background: #ffffff;
    border-color: #0284c7;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.15), 0 0 35px rgba(2, 132, 199, 0.2);
}

body.theme-light .gallery-item-future.is-active-theater .gallery-caption-future {
    background: #ffffff;
    color: #0f172a;
}

/* Modale Contatti Form in tema chiaro */
body.theme-light #contactTitleFuture {
    color: #0f172a !important;
}

body.theme-light .future-input {
    background: #f8fafc;
    border-color: rgba(0, 0, 0, 0.12);
    color: #0f172a;
}

body.theme-light .future-input:focus {
    border-color: #0284c7;
    background: #ffffff;
    box-shadow: 0 0 15px rgba(2, 132, 199, 0.15);
}

body.theme-light .btn-submit-future {
    color: #fff;
    box-shadow: 0 10px 30px rgba(2, 132, 199, 0.3);
}

/* Cookie banner in tema chiaro */
body.theme-light .cookie-banner-future {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 25px rgba(2, 132, 199, 0.1);
}

body.theme-light .cookie-banner-future p {
    color: #334155;
}

body.theme-light .cookie-btn-accept-future {
    color: #fff;
}

body.theme-light .cookie-btn-reject-future {
    background: rgba(0, 0, 0, 0.06);
    color: #475569;
    border-color: rgba(0, 0, 0, 0.12);
}

body.theme-light .cookie-btn-reject-future:hover {
    background: rgba(0, 0, 0, 0.12);
    color: #0f172a;
}

/* Overlay scheda Hero su mobile in tema chiaro */
@media (max-width: 768px) {
    body.theme-light .hero-content-future {
        background: linear-gradient(to bottom, rgba(255, 255, 255, 0.88) 0%, rgba(255, 255, 255, 0.96) 25%, rgba(248, 250, 252, 1) 100%) !important;
        border-top-color: rgba(0, 0, 0, 0.08) !important;
        box-shadow: 0 -15px 35px rgba(0, 0, 0, 0.08) !important;
    }

    body.theme-light .hero-title-future {
        color: #0f172a !important;
        text-shadow: none !important;
    }

    body.theme-light .hero-desc-future {
        color: #475569 !important;
        text-shadow: none !important;
    }

    body.theme-light .hero-badge {
        background: rgba(2, 132, 199, 0.1);
        border-color: rgba(2, 132, 199, 0.25);
        color: #0284c7;
    }

    body.theme-light .hero-buttons .btn-primary-future {
        color: #fff;
    }

    body.theme-light .hero-buttons .btn-secondary-future {
        background: #ffffff;
        color: #0f172a;
        border-color: rgba(0, 0, 0, 0.12);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    }
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .workflow-timeline {
        grid-template-columns: 1fr;
    }
    .workflow-timeline::before {
        display: none;
    }
    .about-future-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .services-grid-future {
        grid-template-columns: 1fr;
    }
    .nav-links-future {
        display: none;
    }
    .navbar-future {
        width: calc(100% - 20px);
        padding: 8px 12px;
        top: 12px;
        gap: 8px;
    }

    .nav-brand {
        flex-shrink: 0;
    }

    .nav-brand .logo-desktop {
        display: none !important;
    }

    .nav-brand .logo-mobile {
        display: block !important;
        height: 32px;
        width: auto;
    }

    .nav-actions {
        gap: 8px;
        flex-shrink: 0;
    }

    .theme-toggle-btn {
        width: 30px;
        height: 30px;
    }

    .lang-switch-future {
        padding: 2px 3px;
    }

    .lang-btn {
        padding: 3px 6px;
        font-size: 0.7rem;
    }

    .btn-nav-cta {
        padding: 7px 14px;
        font-size: 0.78rem;
    }

    .modal-future-content {
        padding: 24px;
    }

    .gallery-modal-header {
        margin: -24px -24px 24px -24px;
        padding: 14px 16px;
    }

    .gallery-modal-title {
        font-size: 1.6rem;
    }

    .gallery-modal-header.is-scrolled {
        padding: 8px 16px;
    }

    .gallery-modal-header.is-scrolled .gallery-modal-title {
        font-size: 1.1rem;
    }

    .gallery-grid-future {
        padding-top: 10px !important;
    }

    .gallery-item-future {
        scroll-margin-top: 80px;
    }

    /* =========================================================
       HERO MOBILE - IMITAZIONE LAYOUT E COMPORTAMENTO ORIGINALE
       ========================================================= */
    .hero-future {
        height: auto;
        min-height: auto;
        display: flex;
        flex-direction: column;
        padding-top: 60px; /* Spazio per navbar fissa */
        background-color: var(--bg-deep);
        z-index: 10;
        overflow: visible !important;
    }

    .hero-video-bg {
        position: relative;
        width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
        filter: brightness(1) !important;
    }

    .hero-overlay-future {
        display: none !important; /* Rimosso come nell'originale dove l'overlay scuro su mobile era disattivato */
    }

    .hero-content-future {
        position: relative;
        top: 0 !important;
        bottom: auto;
        left: auto;
        right: auto;
        transform: none;
        margin-top: -140px; /* Alza il blocco sovrapponendolo al video */
        z-index: 999; /* Massima priorità per stare sopra il video */
        opacity: 1 !important;
        padding: 32px 20px 40px;
        width: 100%;
        max-width: 100%;
        text-align: center;
        background: linear-gradient(to bottom, rgba(7, 9, 14, 0.75) 0%, rgba(7, 9, 14, 0.92) 25%, rgba(7, 9, 14, 0.98) 100%);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 28px 28px 0 0;
        box-shadow: 0 -15px 35px rgba(0, 0, 0, 0.6);
    }

    .hero-badge {
        margin-bottom: 12px;
        font-size: 0.72rem;
        padding: 5px 12px;
    }

    .hero-title-future {
        color: #fff !important;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
        margin-bottom: 10px;
        font-size: 1.6rem !important;
        line-height: 1.2;
    }

    .hero-desc-future {
        color: #f5f5f7 !important;
        text-shadow: 0 1px 5px rgba(0, 0, 0, 0.7);
        margin-bottom: 35px;
        font-size: 0.95rem;
        line-height: 1.5;
        max-width: 100%;
    }

    .hero-buttons {
        gap: 12px;
        flex-direction: column;
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }

    .hero-buttons .btn-primary-future,
    .hero-buttons .btn-secondary-future {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
        font-size: 0.95rem;
    }

    .audio-toggle-future {
        position: absolute;
        bottom: auto;
        top: calc(60px + 56.25vw - 140px - 44px); /* 60px padding-top + 56.25vw altezza video 16:9 - 140px overlap - 44px offset */
        right: 16px;
        left: auto;
        z-index: 1005;
        padding: 6px 14px;
        font-size: 0.75rem;
        background: rgba(0, 0, 0, 0.65);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    }

    .scroll-indicator-future {
        display: none !important; /* Rimosso su mobile per non coprire il testo o i pulsanti */
    }

    /* Disattiva l'espansione e arrangiamento a teatro su Mobile: le miniature rimangono stabili */
    .gallery-grid-future,
    .gallery-grid-future.has-active-media {
        grid-template-columns: 1fr !important;
        grid-auto-flow: row !important;
        gap: 20px !important;
    }

    .gallery-item-future.is-active-theater {
        grid-column: auto !important;
        grid-row: auto !important;
        order: initial !important;
        animation: none !important;
        transform: none !important;
        box-shadow: none !important;
        border-color: var(--border-glass) !important;
    }

    .gallery-grid-future.has-active-media .gallery-item-future:not(.is-active-theater) {
        opacity: 1 !important;
        filter: none !important;
        transform: none !important;
    }

    /* Su Mobile: i video nella griglia agiscono da cover con anteprima e tap diretto per fullscreen */
    .gallery-item-future {
        cursor: pointer !important;
    }

    .gallery-video-wrapper video {
        pointer-events: none !important; /* Il tocco va dritto al wrapper/card che apre il fullscreen */
    }

    /* Visualizzatore Immagini & Video a Schermo Intero su Mobile */
    .fullscreen-media-overlay {
        padding: 55px 10px 20px 10px;
        touch-action: pan-y pinch-zoom;
    }

    #viewerMainImg,
    #viewerMainVideo {
        max-height: 65vh;
        width: 100%;
        object-fit: contain;
    }

    .viewer-close-btn {
        top: 14px;
        left: 14px;
        padding: 8px 16px;
        font-size: 0.82rem;
    }

    .viewer-nav-btn {
        width: 44px;
        height: 44px;
        background: rgba(13, 17, 26, 0.9);
    }
    .viewer-prev-btn { left: 8px; }
    .viewer-next-btn { right: 8px; }

    .viewer-caption {
        font-size: 0.92rem;
        margin-top: 12px;
        padding: 0 10px;
    }

    /* Cookie Banner su Mobile */
    .cookie-banner-future {
        width: calc(100% - 24px) !important;
        bottom: -280px;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 16px !important;
        padding: 18px 20px !important;
    }

    .cookie-banner-future.is-visible {
        bottom: 16px !important;
    }

    .cookie-banner-future p {
        font-size: 0.88rem;
        text-align: center;
    }

    .cookie-actions-future {
        width: 100%;
        display: flex;
        gap: 10px;
    }

    .cookie-btn-accept-future,
    .cookie-btn-reject-future {
        flex: 1;
        padding: 11px 14px;
        text-align: center;
    }
}
