/* =========================================================
   1. VARIABILI E TEMI
   ========================================================= */
@font-face {
    font-family: 'Krop';
    src: url('resources/fonts/Krop.woff2') format('woff2'); 
    font-weight: normal;
    font-style: normal;
    font-display: swap; 
}

:root {
    /* Palette base */
    --bg-color: #000814;
    --section-bg: rgba(0, 29, 61, 0.2);
    --border-color: #003566;
    --text-main: #ffffff;
    --text-muted: #e0e6ed;
    --title-color: #ffc300; 
    --btn-bg: #003566;
    --btn-hover: #ffd60a;
    --btn-text-hover: #000814;
    --bubble-bg: rgba(0, 29, 61, 0.7);
    --card-bg: rgba(255, 255, 255, 0.03); 
    --card-border: rgba(255, 255, 255, 0.08);

    /* Navigazione */
    --nav-glass-bg: rgba(255, 255, 255, 0.1); 
    --nav-text-color: #ffffff;                
    --nav-hover-bg: #ffc300;                  
    --nav-hover-text: #000814;                

    /* Mesh di sfondo */
    --mesh-1: radial-gradient(at 10% 20%, rgba(0, 53, 102, 0.5) 0px, transparent 50%);
    --mesh-2: radial-gradient(at 80% 10%, rgba(0, 29, 61, 0.6) 0px, transparent 50%);
    --mesh-3: radial-gradient(at 40% 80%, rgba(0, 100, 180, 0.25) 0px, transparent 50%);
    --mesh-4: radial-gradient(at 90% 90%, rgba(0, 20, 50, 0.5) 0px, transparent 50%);

    --nav-glass-bg: rgba(255, 255, 255, 0.05); 
    --nav-text-color: #ffffff;
    --nav-hover-bg: rgba(255, 195, 0, 0.15);  
    --nav-hover-text: #ffc300;                 
    --nav-glow: 0 0 15px rgba(255, 195, 0, 0.4), inset 0 0 10px rgba(255, 195, 0, 0.2);
    --nav-text-shadow: none;
}

[data-theme="light"] {
    --bg-color: #f4f6f8;       
    --section-bg: rgba(255, 255, 255, 0.4); 
    --border-color: #cce0ff;   
    --text-main: #000814;      
    --text-muted: #586069;     
    --title-color: #001d3d;    
    --btn-bg: #003566;         
    --btn-hover: #ffc300;      
    --btn-text-hover: #000814; 
    --bubble-bg: rgba(255, 255, 255, 0.7);
    --card-bg: #ffffff; 
    --card-border: rgba(0, 0, 0, 0.08);

    /* Navigazione */
    --nav-glass-bg: rgba(0, 53, 102, 0.8);   
    --nav-text-color: #ffffff;               
    --nav-hover-bg: #ffffff;                 
    --nav-hover-text: #001d3d;               

    /* Mesh di sfondo */
    --mesh-1: radial-gradient(at 10% 20%, rgba(200, 225, 255, 0.8) 0px, transparent 50%);
    --mesh-2: radial-gradient(at 80% 10%, rgba(240, 245, 255, 0.9) 0px, transparent 50%);
    --mesh-3: radial-gradient(at 40% 80%, rgba(180, 240, 255, 0.5) 0px, transparent 50%);
    --mesh-4: radial-gradient(at 90% 90%, rgba(220, 235, 250, 0.8) 0px, transparent 50%);

    --nav-glass-bg: rgba(255, 255, 255, 0.7);   
    --nav-text-color: #001d3d;                 
    
    --nav-hover-bg: rgba(0, 53, 102, 0.1);     
    --nav-hover-text: #0056b3;                 
    
    --nav-text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

/* =========================================================
   2. RESET E BASE
   ========================================================= */
/* Reset di base */
* { box-sizing: border-box; margin: 0; padding: 0; }

/* Comportamenti globali base */
html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Sfondo globale composto da mesh gradient */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    background-image: var(--mesh-1), var(--mesh-2), var(--mesh-3), var(--mesh-4);
    z-index: -1;
    transition: background-color 0.4s ease, background-image 0.4s ease;
}

/* Lingua: nasconde la lingua non attiva */
html[lang="it"] [lang="en"] { display: none !important; }
html[lang="en"] [lang="it"] { display: none !important; }
.lang-sep { display: none; }

/* =========================================================
   3. NAVBAR E CONTROLLI SUPERIORI
   ========================================================= */
/* Navbar layout and positioning */
.navbar { position: fixed; top: 0; left: 0; width: 100%; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 15px 40px; background-color: transparent; transition: padding 0.4s ease; z-index: 1000; }
.navbar.scrolled { padding: 0 40px; height: 80px; }
.nav-left { display: flex; justify-content: flex-start; }
.nav-center { display: flex; justify-content: center; }
.nav-right { display: flex; justify-content: flex-end; }

/* Language switch */
.lang-switch { display: flex; align-items: center; gap: 4px; background-color: var(--nav-glass-bg) !important; backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); border: 1px solid rgba(255, 255, 255, 0.2) !important; border-radius: 50px; padding: 4px 6px; box-shadow: 0 4px 15px rgba(0,0,0,0.2) !important; }
.lang-btn { background: transparent !important; border: none; color: var(--nav-text-color) !important; font-weight: 700; font-size: 0.85rem; cursor: pointer; padding: 6px 12px; border-radius: 30px; transition: all 0.3s ease; opacity: 0.5 !important; }
.lang-btn:hover { opacity: 1 !important; }
.lang-btn.active { opacity: 1 !important; background-color: var(--nav-hover-bg) !important; color: var(--nav-hover-text) !important; }

/* Theme switch (liquid glass style) */
.theme-switch { position: relative; display: flex; align-items: center; justify-content: space-between; width: 200px; height: 40px; border-radius: 50px; cursor: pointer; background-color: var(--nav-glass-bg); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); border: 1px solid rgba(255, 255, 255, 0.2); box-shadow: 0 4px 15px rgba(0,0,0,0.2); padding: 0 8px; transition: all 0.25s ease; overflow: hidden; }
html[data-theme="light"] .theme-switch { border: 1px solid rgba(0, 0, 0, 0.1); box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.theme-switch:hover { background-color: var(--nav-hover-bg); }

.switch-text { position: absolute; width: 100%; left: 0; text-align: center; font-size: 0.9rem; font-weight: 700; color: var(--nav-text-color); text-shadow: var(--nav-text-shadow); z-index: 2; pointer-events: none; transition: color 0.25s ease; }

/* Switch icon vertical centering */
.switch-icon { position: absolute; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; z-index: 2; pointer-events: none; color: var(--nav-text-color); padding: 6px; transition: color 0.25s ease; }
.switch-icon.sun { left: 4px; }
.switch-icon.moon { right: 4px; }

.theme-switch:hover .switch-text, .theme-switch:hover .switch-icon { color: var(--nav-hover-text); }

/* Slider (movable knob) positioning */
.switch-slider { position: absolute; top: 50%; left: 4px; width: 32px; height: 32px; border-radius: 50%; z-index: 1; transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.3s ease; pointer-events: none; }

/* Slider positions for themes */
html[data-theme="dark"] .switch-slider { transform: translate(158px, -50%); background-color: rgba(255, 255, 255, 0.2); }
html[data-theme="light"] .switch-slider { transform: translate(0, -50%); background-color: rgba(0, 53, 102, 0.15); }

/* =========================================================
   4. HERO ABOUT ME
   ========================================================= */
/* Hero container */
.about-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 80px;
    text-align: center;
}
.about-hero::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    max-width: 600px;
    height: 8px;
    background-color: var(--title-color);
    border-radius: 8px;
    z-index: 3;
}

/* Hero side intros (left/right) */
.hero-intro-left,
.hero-intro-right {
    position: absolute;
    top: 100px;
    max-width: 320px;
    z-index: 3;
}
.hero-intro-left {
    left: 40px;
    text-align: left;
    padding-left: 20px;
    border-left: 1px solid var(--border-color);
}
.hero-intro-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: -4px;
    width: 7px;
    height: 7px;
    background-color: var(--title-color);
    border-radius: 50%;
}
.hero-intro-right {
    right: 40px;
    text-align: right;
    padding-right: 20px;
    border-right: 1px solid var(--border-color);
}
.hero-intro-right::before {
    content: '';
    position: absolute;
    bottom: 0;
    right: -4px;
    width: 7px;
    height: 7px;
    background-color: var(--title-color);
    border-radius: 50%;
}

/* Hero texts and subtitle */
.hero-intro-left p,
.hero-intro-right p { font-size: 0.9rem; color: var(--text-muted); margin: 0; }
.hero-subtitle { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 1.2rem; color: var(--text-muted); margin-bottom: 10px; font-weight: 500; }
.minimal-hand { width: 26px; height: 26px; animation: wave 3s infinite ease-in-out; transform-origin: bottom right; }

@keyframes wave { 0%, 100% { transform: rotate(0deg); } 10% { transform: rotate(14deg); } 20% { transform: rotate(-8deg); } 30% { transform: rotate(14deg); } 40% { transform: rotate(-4deg); } 50% { transform: rotate(10deg); } }

.hero-content { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; width: 100%; }
.hero-title { display: flex; flex-direction: column; align-items: center; margin: 0; line-height: 0.9; text-transform: uppercase; letter-spacing: -2px; }
.solid-text { font-size: clamp(3.5rem, 10vw, 9rem); color: var(--title-color); font-weight: 900; }
.outline-text { font-size: clamp(4rem, 11vw, 10rem); color: transparent; -webkit-text-stroke: 2px var(--text-main); font-weight: 900; margin-top: -15px; }

.hero-image { position: absolute; bottom: 8px; left: 0; width: 100%; max-height: 65vh; z-index: 2; pointer-events: none; object-fit: contain; object-position: bottom center; filter: drop-shadow(0 20px 30px rgba(0,0,0,0.55)); transition: filter 0.25s ease, box-shadow 0.25s ease; }
.hero-asterisk { position: absolute; bottom: 40px; right: 40px; font-size: 1.15rem; font-weight: 800; color: var(--title-color); font-style: italic; z-index: 3; }

/* =========================================================
   5. SEZIONI GENERICHE E TITOLI
   ========================================================= */
.content-section { padding: 100px 20px; text-align: center; min-height: 50vh; }
.alternate-bg { background: transparent; }

/* Sezione: titoli grandi per sezioni */
.section-title-giant {
    width: 100%;
    max-width: 1050px;
    margin: 0 auto 60px auto;
}
.section-title-giant.align-left { align-items: flex-start; }
.section-title-giant.align-right { align-items: flex-end; }
.section-title-giant .solid-text { font-size: clamp(2.5rem, 6vw, 5rem); }
.section-title-giant .outline-text { font-size: clamp(3rem, 7vw, 6rem); margin-top: -10px; -webkit-text-stroke: 1.5px var(--text-main); }

/* =========================================================
   6. PROGETTI UNIVERSITARI E FILTRI
   ========================================================= */
.project-filters {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 0 !important;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 10px 10px 25px 10px !important;
    -webkit-overflow-scrolling: touch;
}
.project-filters::-webkit-scrollbar { display: none; }

/* Wrapper e mobile toggle for filters */
.filter-wrapper {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto 40px auto !important;
    z-index: 15;
}
.mobile-filter-toggle {
    display: none;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bubble-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}
.toggle-left { display: flex; align-items: center; gap: 10px; }
.mobile-filter-toggle .chevron-icon { transition: transform 0.3s ease; }
.mobile-filter-toggle.open .chevron-icon { transform: rotate(180deg); }

/* Filter buttons */
.filter-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: var(--bubble-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 14px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    white-space: nowrap;
}
.filter-btn svg { width: 16px; height: 16px; transition: transform 0.3s ease; }
.filter-btn:hover { transform: translateY(-2px); background-color: var(--border-color); }
.filter-btn.active { background-color: var(--title-color); color: var(--bg-color); box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
.filter-btn.filter-all { background-color: var(--btn-bg); border-color: var(--btn-bg); color: #ffffff; }
.filter-btn.filter-all:hover { background-color: var(--btn-hover); color: var(--btn-text-hover); }
.filter-btn.filter-all.active { background-color: var(--title-color); color: var(--bg-color); border-color: var(--title-color); }

/* Carousel container and 3D item layout */
.carousel-wrapper {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
}
.projects-carousel { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; }
.carousel-item {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    max-width: 360px;
    transform: translate(-50%, -50%);
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    opacity: 0;
    z-index: 0;
    pointer-events: none;
}
.carousel-item.active { display: block !important; opacity: 1; z-index: 3; transform: translate(-50%, -50%) translateZ(50px) scale(1); filter: blur(0); pointer-events: auto; box-shadow: 0 15px 40px rgba(0,0,0,0.4); }
.carousel-item.active:hover { transform: translate(-50%, -52%) translateZ(50px) scale(1.02); }
.carousel-item.prev { display: block !important; opacity: 0.25; z-index: 2; transform: translate(-115%, -50%) translateZ(-50px) scale(0.8) rotateY(15deg); filter: blur(6px); pointer-events: auto; cursor: pointer; }
.carousel-item.next { display: block !important; opacity: 0.25; z-index: 2; transform: translate(15%, -50%) translateZ(-50px) scale(0.8) rotateY(-15deg); filter: blur(6px); pointer-events: auto; cursor: pointer; }
.carousel-item.prev a, .carousel-item.next a { pointer-events: none; }
.carousel-item.hidden { display: none !important; }

/* Project cards: base card styles and variants */
.project-card {
    background-color: rgba(10, 15, 25, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    text-align: left;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at top left, rgba(100, 150, 255, 0.15) 0%, transparent 60%);
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.4s ease;
}
.project-card:hover::before { opacity: 1; }
html[data-theme="light"] .project-card::before { background: radial-gradient(ellipse at top left, rgba(0, 100, 255, 0.08) 0%, transparent 60%); }
html[data-theme="light"] .project-card { background-color: rgba(255, 255, 255, 0.95); border: 1px solid rgba(0, 0, 0, 0.1); box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1); }

.card-content {
    padding: 40px 35px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    position: relative;
    z-index: 2;
}
.card-browser { border: 1px solid var(--card-border); }
.browser-header { height: 32px; background-color: rgba(255, 255, 255, 0.05); border-bottom: 1px solid var(--card-border); display: flex; align-items: center; padding: 0 15px; gap: 6px; position: relative; }
html[data-theme="light"] .browser-header { background-color: #f0f0f0; }
.browser-dot { width: 10px; height: 10px; border-radius: 50%; }
.browser-dot.red { background-color: #ff5f56; } .browser-dot.yellow { background-color: #ffbd2e; } .browser-dot.green { background-color: #27c93f; }
.browser-url { position: absolute; left: 50%; transform: translateX(-50%); font-size: 0.65rem; color: var(--text-muted); background-color: var(--bg-color); padding: 2px 10px; border-radius: 10px; font-family: monospace; opacity: 0.8; }
.card-phone { border: 6px solid #2a2a2a; border-radius: 30px; position: relative; }
html[data-theme="light"] .card-phone { border-color: #d0d0d0; }
.phone-notch { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 90px; height: 20px; background-color: #2a2a2a; border-radius: 0 0 12px 12px; z-index: 2; }
html[data-theme="light"] .phone-notch { background-color: #d0d0d0; }
.card-phone .card-content { padding-top: 40px; }
.phone-home-indicator { width: 35%; height: 4px; background-color: var(--text-muted); border-radius: 4px; margin: 0 auto 15px auto; opacity: 0.5; }
.card-terminal { background-color: #111111 !important; border: 1px solid #333 !important; border-radius: 8px; }
.terminal-header { height: 28px; background-color: #2d2d2d; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid #111; }
.term-title { font-size: 0.7rem; color: #999; font-family: monospace; }
.card-terminal .card-title, .card-terminal .card-desc { color: #f1f1f1 !important; font-family: monospace; }
.card-terminal .term-prompt { color: #27c93f; }
.card-terminal .app-type-badge { color: #27c93f; border-color: #27c93f; background-color: rgba(39, 201, 63, 0.1); }
.card-terminal .card-btn { border-color: #f1f1f1; color: #f1f1f1; }
.card-terminal .card-btn:hover { background-color: #f1f1f1; color: #111111; }

.card-title { color: var(--title-color); font-size: 1.5rem; margin-bottom: 20px; display: flex; align-items: center; }
.card-desc { color: var(--text-main); font-size: 0.95rem; line-height: 1.6; margin-bottom: 30px; flex-grow: 1; }
.card-tags { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 30px; }
.tag { padding: 5px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 700; color: #ffffff; }
.tag.html { background-color: #e34c26; } .tag.css-tag { background-color: #563d7c; } .tag.javascript { background-color: #f1e05a; color: #000; } .tag.java { background-color: #b07219; } .tag.python { background-color: #3572A5; } .tag.kotlin { background-color: #A97BFF; } .tag.erlang { background-color: #B83998; } .tag.php { background-color: #4F5D95; } .tag.shell { background-color: #89e051; color: #000; } .tag.dockerfile { background-color: #384d54; }

.project-date { font-size: 0.85rem; color: var(--text-muted); font-family: monospace; font-weight: 600; white-space: nowrap; }
.app-type-badge { margin-left: auto; color: var(--text-main); border: 1px solid var(--card-border); font-size: 0.7rem; font-weight: bold; text-transform: uppercase; padding: 4px 10px; border-radius: 20px; background-color: var(--card-bg); white-space: nowrap; }
.card-links { margin-top: auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 15px; }

.card-btn { display: inline-block; padding: 10px 20px; background-color: transparent; color: var(--text-main); border: 2px solid var(--text-main); border-radius: 8px; text-decoration: none; font-weight: 600; font-size: 0.9rem; white-space: nowrap; text-align: center; transition: all 0.3s ease; }
.card-btn:hover { background-color: var(--text-main); color: var(--bg-color); }


/* =========================================================
   7. SEZIONE DESIGN (APP LAYOUT - ARROTONDATO E VIVIDO)
   ========================================================= */
.design-narrative-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* --- 1. STILE APP / GLASS BOX (ARROTONDATO) --- */
.glass-box-container {
    background-color: rgba(10, 15, 25, 0.6);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s ease;
}

/* Evita che i box con overflow visibile ritaglino contenuti fluttuanti */
.spotted-box, .tazzina-box { overflow: visible !important; }
.uni-box, .dmcoach-box { overflow: hidden; }

html[data-theme="light"] .glass-box-container {
    background-color: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
}

.glass-box-container:hover {
    /* Al passaggio: il box viene portato in primo piano e l'ombra aumenta */
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.4);
    z-index: 10;
}

/* --- 2. EFFETTO MESH BACKGROUND VIVIDO (MANTENUTO) --- */
.glass-box-container::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    border-radius: inherit;
    opacity: 0.75; pointer-events: none; z-index: 0; transition: opacity 0.4s ease;
}
.glass-box-container:hover::before { opacity: 1; }

.spotted-box { grid-column: span 10; background-color: rgba(138, 43, 226, 0.1) !important; }
.spotted-box::before { background-image: radial-gradient(at 10% 20%, rgba(168, 85, 247, 0.7) 0px, transparent 50%), radial-gradient(at 80% 10%, rgba(138, 43, 226, 0.8) 0px, transparent 50%), radial-gradient(at 40% 80%, rgba(216, 180, 254, 0.4) 0px, transparent 50%), radial-gradient(at 90% 90%, rgba(126, 34, 206, 0.7) 0px, transparent 50%); }

.tazzina-box { grid-column: span 3; background-color: rgba(255, 140, 0, 0.1) !important; }
.tazzina-box::before { background-image: radial-gradient(at 10% 20%, rgba(255, 150, 50, 0.7) 0px, transparent 50%), radial-gradient(at 80% 10%, rgba(255, 100, 0, 0.8) 0px, transparent 50%), radial-gradient(at 40% 80%, rgba(255, 200, 100, 0.4) 0px, transparent 50%), radial-gradient(at 90% 90%, rgba(230, 80, 0, 0.7) 0px, transparent 50%); }

.uni-box { grid-column: span 7; background-color: rgba(0, 168, 255, 0.1) !important; }
.uni-box::before { background-image: radial-gradient(at 10% 20%, rgba(0, 200, 255, 0.7) 0px, transparent 50%), radial-gradient(at 80% 10%, rgba(0, 140, 255, 0.8) 0px, transparent 50%), radial-gradient(at 40% 80%, rgba(100, 220, 255, 0.4) 0px, transparent 50%), radial-gradient(at 90% 90%, rgba(0, 100, 220, 0.7) 0px, transparent 50%); }

.dmcoach-box { grid-column: span 10; background-color: rgba(34, 139, 34, 0.1) !important; }
.dmcoach-box::before { background-image: radial-gradient(at 10% 20%, rgba(50, 205, 50, 0.7) 0px, transparent 50%), radial-gradient(at 80% 10%, rgba(0, 180, 60, 0.8) 0px, transparent 50%), radial-gradient(at 40% 80%, rgba(100, 255, 100, 0.4) 0px, transparent 50%), radial-gradient(at 90% 90%, rgba(0, 140, 40, 0.7) 0px, transparent 50%); }

/* --- 3. HEADER E TESTI CENTRATI --- */
.glass-box-header {
    padding: 25px 30px !important;
    
    /* 1. Stacco Netto: Colore più solido e ombra per profondità */
    background-color: rgba(10, 15, 25, 0.85); 
    border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important; 
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25); 
    
    /* 2. Bordi: arrotonda gli angoli superiori */
    border-radius: 20px 20px 0 0; 
    
    display: flex; 
    justify-content: flex-start; 
    align-items: center; 
    gap: 20px; 
    position: relative; 
    z-index: 2;
}
/* Garantisce la leggibilità di testi e icone sulla banda scura */
.glass-box-header .glass-box-title {
    color: #ffffff !important;
}

.glass-box-header .help-icon {
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

/* --- ADATTAMENTO TEMA CHIARO PER HEADER DESIGN (MANTENUTO SCURO) --- */
html[data-theme="light"] .glass-box-header { 
    background-color: rgba(10, 15, 25, 0.9) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.3) !important; 
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15); 
}

/* Forza il testo e l'icona ad essere SEMPRE bianchi, a prescindere dal tema */
.glass-box-header .glass-box-title,
html[data-theme="light"] .glass-box-header .glass-box-title {
    color: #ffffff !important;
}

.glass-box-header .help-icon,
html[data-theme="light"] .glass-box-header .help-icon {
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.glass-box-title { font-size: 1.8rem !important; text-transform: none; font-weight: 800; letter-spacing: -0.5px; color: var(--text-main); margin: 0; display: flex; align-items: center; }
.fun-title-emoji { font-size: 2.4rem !important; margin-right: 15px; line-height: 1; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2)); transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1); position: relative; top: 0; }
.glass-box-container:hover .fun-title-emoji { transform: scale(1.15) rotate(-8deg); }

.glass-box-content { flex: 1; position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; z-index: 2; }

.narrative-flow { display: flex; flex-direction: column; align-items: center; width: 100%; padding: 40px 20px; gap: 40px; }

.dm-narrative-step {
    display: flex; flex-direction: column; align-items: center; gap: 30px; width: 100%;
}
.dm-narrative-step + .dm-narrative-step {
    padding-top: 50px; border-top: 1px solid rgba(255, 255, 255, 0.05);
}
html[data-theme="light"] .dm-narrative-step + .dm-narrative-step { border-top: 1px solid rgba(0, 0, 0, 0.05); }

.narrative-text {
    text-align: center !important;
    font-size: 1.1rem !important;
    line-height: 1.6 !important;
    max-width: 650px !important;
    border-left: none !important;
    padding-left: 0 !important;
    margin: 0 auto !important;
    color: var(--text-muted);
    font-style: italic !important;
}

/* --- MARCHIO REGISTRATO SPOTTED --- */
.trademark-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background-color: var(--bg-color);
    border: 2px solid var(--text-main);
    color: var(--text-main);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 900;
    z-index: 25;
    box-shadow: 4px 4px 0 rgba(255, 255, 255, 0.1);
    cursor: help;
    transition: all 0.3s ease;
}

html[data-theme="light"] .trademark-badge {
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.1);
}

.trademark-badge:hover {
    transform: scale(1.1);
    background-color: var(--title-color);
    border-color: var(--title-color);
    color: var(--bg-color);
}

.trademark-disclaimer {
    display: block;
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 20px;
    border-left: 3px solid var(--title-color);
    padding-left: 15px;
    line-height: 1.5;
}

/* Spaziatura verticale del contenitore principale */
.telegram-logos-section {
    grid-column: 1 / span 2;
    width: 100%;
    
     /* Spaziatura verticale: margine 60px per separare slider e loghi */
     margin: 60px 0 !important; 
    
    padding: 10px 0;
}

.slider-title {
    font-size: 0.9rem;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 25px;
    text-align: center;
    color: var(--title-color);
}

.marquee-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    display: flex;
    mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

/* Safe-zone per l'ombra interna della pista scorrevole */
.marquee-content {
    display: flex;
    width: max-content;
    animation: marquee-infinite-box 30s linear infinite;
    
     /* Padding-bottom 60px per permettere l'ombra interna non tagliata */
     padding-bottom: 60px !important; 
}

/* BOX EFFETTO LIQUID GLASS */
.marquee-box {
    display: flex;
    gap: 35px;
    padding: 25px 40px;
    margin-right: 50px;
    flex-shrink: 0;
    border-radius: 24px !important;
    
    /* Effetto 'Liquid Glass' */
    background: rgba(10, 15, 25, 0.45) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3) !important;
}

html[data-theme="light"] .marquee-box {
    background: rgba(255, 255, 255, 0.65) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05) !important;
}

/* SINGOLO ELEMENTO (Immagine + Testo) */
.marquee-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* BORDI AZZURRINI E CERCHIO BIANCO */
.marquee-img-wrapper {
    width: 90px;
    height: 90px;
    background-color: #ffffff !important;
    border-radius: 50% !important;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s ease;
    
    /* Bordi azzurri e ombra ciano morbida */
    border: 2px solid rgba(0, 168, 255, 0.6) !important;
    box-shadow: 0 5px 15px rgba(0, 168, 255, 0.2);
}

.marquee-item:hover .marquee-img-wrapper {
    transform: translateY(-8px);
    border-color: rgba(0, 168, 255, 1) !important;
    box-shadow: 0 10px 25px rgba(0, 168, 255, 0.45);
}

.marquee-img-wrapper img {
    width: 85%;
    height: 85%;
    object-fit: contain;
}

/* ETICHETTA DI TESTO */
.marquee-label {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-main);
    text-align: center;
    letter-spacing: 0.5px;
    text-transform: capitalize;
}

@keyframes marquee-infinite-box {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } 
}

.marquee-container:hover .marquee-content {
    animation-play-state: paused;
}

/* Ottimizzazioni per mobile */
@media (max-width: 768px) {
    .telegram-logos-section {
        grid-column: span 10;
        margin: 20px 0;
    }
    .marquee-box {
        padding: 20px 25px;
        gap: 25px;
        margin-right: 30px;
    }
    .marquee-img-wrapper {
        width: 75px;
        height: 75px;
    }
    .marquee-label {
        font-size: 0.75rem;
    }
    .slider-title {
        font-size: 0.8rem;
        padding: 0 10px;
    }
}

/* --- 4. ELEMENTI INTERNI SCROLLY E CAROSELLI --- */
.scrolly-container { position: relative; width: 100%; margin-top: 20px; }
.scrolly-sticky { position: sticky; top: 20vh; height: 400px; display: flex; align-items: center; justify-content: center; gap: 60px; z-index: 10; }
.scrolly-visuals { flex: 1; display: flex; justify-content: flex-end; }
.scrolly-logo-wrapper { position: relative; }

.scrolly-circle { width: 250px; height: 250px; border-radius: 50%; background-color: #ffffff !important; border: 2px solid var(--border-color); display: flex; align-items: center; justify-content: center; box-shadow: 0 15px 35px rgba(0,0,0,0.3); position: relative; overflow: hidden; }
.tazzina-box .scrolly-circle { width: 180px; height: 180px; }

.scrolly-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.6s ease; }
.scrolly-img.active { opacity: 1; z-index: 2; }

.scrolly-texts { flex: 1; position: relative; height: 200px; display: flex; align-items: center; perspective: 1000px; }
.scrolly-text-box { position: absolute; width: 100%; max-width: 320px; padding: 24px; background: rgba(10, 15, 25, 0.85); border: 1px solid rgba(138, 43, 226, 0.4); border-radius: 16px; backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px); box-shadow: 0 10px 30px rgba(0,0,0,0.4); opacity: 0; transform: translateY(20px) translateZ(-50px); transition: all 0.6s ease; pointer-events: none; }
html[data-theme="light"] .scrolly-text-box { background: rgba(255, 255, 255, 0.95); border: 1px solid rgba(168, 85, 247, 0.3); box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.scrolly-text-box.active { opacity: 1; transform: translateY(0) translateZ(0); pointer-events: auto; z-index: 5; }
.scrolly-text-box h4 { color: #a855f7; margin-top: 0; margin-bottom: 12px; font-size: 1.3rem; font-weight: 800; }
.scrolly-text-box p { font-size: 0.95rem; line-height: 1.5; color: var(--text-main); margin: 0; }

.tazzina-box .scrolly-sticky { flex-direction: column; gap: 20px; height: 480px; }
.tazzina-box .scrolly-visuals { flex: none; justify-content: center; }
.tazzina-box .scrolly-texts { flex: none; width: 100%; height: 180px; }
.tazzina-box .scrolly-text-box { max-width: 400px; left: 50%; transform: translateX(-50%) translateY(20px) translateZ(-50px); border-color: rgba(255, 140, 0, 0.4); }
.tazzina-box .scrolly-text-box.active { transform: translateX(-50%) translateY(0) translateZ(0); }
html[data-theme="light"] .tazzina-box .scrolly-text-box { border-color: rgba(255, 140, 0, 0.3); }
.tazzina-box .scrolly-text-box h4 { color: #ff8c00; }

.scrolly-steps { position: relative; z-index: 1; margin-top: -300px; pointer-events: none; }
.scrolly-step { height: 60vh; width: 100%; }

.logo-wrapper { position: relative; display: inline-block; }
.logo-circle { width: 190px; height: 190px; border-radius: 50%; background-color: #ffffff !important; border: 2px solid var(--border-color); display: flex; justify-content: center; align-items: center; flex-shrink: 0; box-shadow: 0 10px 25px rgba(0,0,0,0.2); transition: transform 0.3s ease; }
.logo-circle:hover { transform: scale(1.05); }
.logo-circle img { width: 100%; height: 100%; object-fit: contain; transform: scale(0.9); display: block; }
.logo-caption { position: absolute; top: 5px; right: 0; transform: translateX(15px); z-index: 20; font-size: 0.65rem; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; padding: 6px 12px; border-radius: 20px; box-shadow: 0 5px 15px rgba(0,0,0,0.5); pointer-events: none; }
.logo-caption.official { background-color: #27c93f; color: #000814; border: none; }
.logo-caption.proposal { background-color: var(--bg-color); color: var(--title-color); border: 1px solid var(--title-color); }

/* Frecce Universali Caroselli */
.carousel-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; background-color: var(--bubble-bg); border: 1px solid var(--border-color); color: var(--text-main); z-index: 10; cursor: pointer; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(10px); transition: all 0.3s ease; }
.carousel-arrow:hover { background-color: var(--title-color); color: var(--bg-color); transform: translateY(-50%) scale(1.1); }
.carousel-arrow svg { width: 20px; height: 20px; }
.left-arrow { left: 10px; }
.right-arrow { right: 10px; }

.presentation-nav { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.pres-btn { background-color: transparent; border: 1px solid var(--border-color); color: var(--text-muted); padding: 8px 16px; border-radius: 20px; font-size: 0.9rem; cursor: pointer; transition: all 0.3s ease; }
.pres-btn:hover { border-color: var(--title-color); color: var(--text-main); }
.pres-btn.active { background-color: var(--title-color); color: var(--bg-color); border-color: var(--title-color); font-weight: bold; }

.presentation-showcase { width: 100%; max-width: 800px; position: relative; }
.presentation-content { display: none; width: 100%; flex-direction: column; gap: 25px; align-items: center; justify-content: center; animation: fadeIn 0.4s ease; }
.presentation-content.active { display: flex; }
.presentation-slider-row { display: flex; gap: 18px; width: 100%; align-items: center; justify-content: center; position: relative; }

.pdf-carousel { flex: 1; height: 400px; max-width: 1000px; position: relative; perspective: 1200px; overflow: visible;}
.pdf-carousel-card { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background-color: #ffffff !important; border-radius: 8px; overflow: hidden; border: 1px solid var(--border-color); box-shadow: 0 10px 25px rgba(0,0,0,0.6); width: 100%; max-width: 520px; aspect-ratio: 16 / 9; backface-visibility: hidden; transition: all 0.5s ease; opacity: 0; pointer-events: none; }
.carousel-item.active.pdf-carousel-card { opacity: 1; z-index: 5; transform: translate(-50%, -50%) translateZ(50px) scale(1); pointer-events: auto; }
.carousel-item.prev.pdf-carousel-card { opacity: 0.4; z-index: 2; transform: translate(-105%, -50%) translateZ(-50px) scale(0.7) rotateY(15deg); pointer-events: auto; cursor: pointer; }
.carousel-item.next.pdf-carousel-card { opacity: 0.4; z-index: 2; transform: translate(5%, -50%) translateZ(-50px) scale(0.7) rotateY(-15deg); pointer-events: auto; cursor: pointer; }
.pdf-carousel-card img { width: 100%; height: 100%; object-fit: cover; display: block; }

.poster-mini { height: 380px !important; border-radius: 12px; border: 1px solid var(--border-color); box-shadow: 0 8px 25px rgba(0,0,0,0.3); overflow: hidden; }
.poster-mini img { height: 100%; width: auto; object-fit: contain; display: block; }

.graphics-item.reel-container { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; max-width: 600px; height: 360px; overflow: visible; }
.reel-carousel { width: 100%; height: 100%; perspective: 1200px; position: relative; touch-action: pan-y; }
.reel-carousel-card { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background-color: transparent !important; border-radius: 12px; overflow: hidden; border: 1px solid var(--border-color); height: 100%; width: auto; min-width: 160px; max-width: 280px; backface-visibility: hidden; transition: all 0.5s ease; opacity: 0; pointer-events: none; }
.reel-carousel-card img { height: 100%; width: auto; object-fit: contain; display: block; }

.carousel-item.active.reel-carousel-card { opacity: 1; z-index: 5; transform: translate(-50%, -50%) translateZ(100px) scale(1); box-shadow: 0 10px 20px rgba(0,0,0,0.4); pointer-events: auto; }
.carousel-item.prev.reel-carousel-card { opacity: 0.7; z-index: 2; transform: translate(-125%, -50%) translateZ(-200px) scale(0.8) rotateY(15deg); filter: brightness(0.3); pointer-events: auto; cursor: pointer; }
.carousel-item.next.reel-carousel-card { opacity: 0.7; z-index: 2; transform: translate(25%, -50%) translateZ(-200px) scale(0.8) rotateY(-15deg); filter: brightness(0.3); pointer-events: auto; cursor: pointer; }

.reel-container .carousel-arrow { background-color: rgba(255, 255, 255, 0.1); border: 2px solid #ffffff; color: #ffffff; }
.reel-container .carousel-arrow:hover { background-color: #ffffff; color: #000000; border-color: #ffffff; }
.reel-container .left-arrow { left: 70px; }
.reel-container .right-arrow { right: 70px; }

.web-showcase { display: flex; flex-direction: row; justify-content: center; align-items: stretch; height: 480px; gap: 40px; width: 100%; padding: 0 20px; }
.web-video-wrapper { position: relative; background-color: transparent; overflow: hidden; box-shadow: 0 15px 35px rgba(0,0,0,0.5); flex: 0 0 auto; height: 100%; }
.web-video-wrapper video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: block; z-index: 1; }
.web-desktop { aspect-ratio: 16/9; border-radius: 12px; border: 1px solid var(--border-color); }
.web-desktop video { object-fit: cover; object-position: center center; transform: scale(1.03); }
.web-mobile { aspect-ratio: 9/19.5; border-radius: 30px; border: 6px solid #2a2a2a; }
.web-mobile video { object-fit: cover; object-position: center center; }

/* --- Mobile styles --- */
@media (max-width: 768px) {
    .glass-box-title { font-size: 1.8rem !important; }
    .fun-title-emoji { font-size: 1.6rem !important; }
    .narrative-flow { padding: 30px 20px !important; }
    .narrative-text { padding-left: 15px !important; font-size: 1rem !important; }
    .spotted-box, .tazzina-box, .uni-box, .dmcoach-box { grid-column: span 10; }
    .web-showcase { flex-direction: column; height: auto; align-items: center; }
    .web-desktop { width: 100%; height: auto; }
    .web-mobile { width: 220px; height: auto; }
}

/* --- HELP ICON & TOOLTIP --- */
.help-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    min-width: 26px;
    min-height: 26px;
    flex-shrink: 0;
    border-radius: 50%;
    background-color: var(--bubble-bg);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 800;
    cursor: help;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.help-icon:hover {
    background-color: var(--title-color);
    color: var(--bg-color);
    border-color: var(--title-color);
    transform: scale(1.1);
}

.help-tooltip {
    position: absolute;
    bottom: 140%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: var(--bubble-bg);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 50;
}

/* Animazione in entrata quando passi sopra con il mouse */
.help-icon:hover .help-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* --- BOTTONE LINK ESTERNO NELL'HEADER SCURO --- */
.glass-box-header .external-link-btn {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background-color: transparent;
    border: 2px solid #ffffff;
    color: #ffffff !important;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 10;
}

.glass-box-header .external-link-btn svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.glass-box-header .external-link-btn:hover {
    background-color: #ffffff;
    color: #000814 !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.3);
}

.glass-box-header .external-link-btn:hover svg {
    transform: translate(2px, -2px);
}

/* Adattamento per gli schermi dei telefoni */
@media (max-width: 768px) {
    .glass-box-header .external-link-btn {
        padding: 6px 12px;
        font-size: 0.75rem;
        border-width: 1.5px;
    }
    .glass-box-header .external-link-btn svg {
        width: 14px;
        height: 14px;
    }
}

/* =========================================================
    8. CONTATTI E LINK (CARD EMOJI)
    ========================================================= */
.contacts-layout { display: flex; align-items: center; justify-content: space-between; max-width: 1050px; margin: 0 auto; padding: 40px 50px 160px 50px; }
.contacts-layout .section-title-giant { margin: 0; flex: 1; }
.contact-cards-wrapper { display: flex; gap: 30px; flex: 1; justify-content: flex-end; }
.fun-contact-card { 
    background-color: rgba(10, 15, 25, 0.6); 
    border: 1px solid rgba(255, 255, 255, 0.08); 
    border-radius: 24px; 
    padding: 30px 20px; 
    width: 180px; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    text-align: center; 
    text-decoration: none; 
    backdrop-filter: blur(25px); 
    -webkit-backdrop-filter: blur(25px); 
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1); 
    box-shadow: 0 15px 35px rgba(0,0,0,0.2); 
    position: relative;
    overflow: hidden;
    z-index: 1;
}
html[data-theme="light"] .fun-contact-card {
    background-color: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
}

.fun-contact-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at top left, rgba(255, 195, 0, 0.4) 0%, transparent 70%);
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.4s ease;
}

html[data-theme="light"] .fun-contact-card::before {
    background: radial-gradient(ellipse at top left, rgba(255, 195, 0, 0.25) 0%, transparent 70%);
}

.fun-contact-card:hover { 
    transform: translateY(-10px); 
    border-color: rgba(255, 195, 0, 0.5); 
    box-shadow: 0 25px 50px rgba(0,0,0,0.4); 
}
.fun-contact-card:hover::before {
    opacity: 1;
}

.fun-emoji { font-size: 3.5rem; margin-bottom: 15px; transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1); filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2)); position: relative; z-index: 2; }
.fun-contact-card:hover .fun-emoji { transform: scale(1.15) rotate(10deg); }
.fun-title { font-size: 1.2rem; color: var(--text-main); margin-bottom: 5px; font-weight: 800; transition: color 0.3s ease; position: relative; z-index: 2; }
.fun-desc { font-size: 0.85rem; color: var(--text-muted); margin: 0; line-height: 1.2; transition: color 0.3s ease; position: relative; z-index: 2; }

/* Banner fotografico: effetto mesh e bordo cantiere */
.photo-banner {
    max-width: 1150px; 
    margin: 40px auto;
    border-radius: 24px;
    background-color: rgba(10, 15, 25, 0.55); 
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: none; 
    box-shadow: 0 15px 35px rgba(0,0,0,0.35);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    min-height: 180px;
}

/* Badge in alto a sinistra */
.wip-badge {
    position: absolute;
    top: 24px;
    left: 24px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: #ffc300;
    color: #000814;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 900;
    font-size: 0.85rem;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
}

.wip-badge svg {
    width: 16px;
    height: 16px;
}

/* Sfondo mesh gradient: tema industriale (giallo e grigio) */
.photo-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: inherit;
    opacity: 0.85; 
    pointer-events: none;
    z-index: 0;
    /* Colori: Giallo cantiere, Grigio chiaro metallico, Grigio scuro asfalto, Giallo ocra */
    background-image: 
        radial-gradient(at 10% 20%, rgba(255, 195, 0, 0.55) 0px, transparent 50%),
        radial-gradient(at 80% 15%, rgba(150, 150, 160, 0.4) 0px, transparent 50%),
        radial-gradient(at 40% 85%, rgba(60, 60, 70, 0.6) 0px, transparent 50%),
        radial-gradient(at 90% 85%, rgba(220, 160, 0, 0.5) 0px, transparent 50%);
    transition: opacity 0.4s ease;
}

.photo-banner:hover::before {
    opacity: 1; 
}

/* Bordo a strisce stile cantiere */
.photo-banner::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: inherit; 
    padding: 6px; 
    background: repeating-linear-gradient(
        -45deg, 
        #ffc300, 
        #ffc300 12px, 
        #000814 12px, 
        #000814 24px
    );
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 3; 
}

/* Adattamento Tema Chiaro */
html[data-theme="light"] .photo-banner {
    background-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}
html[data-theme="light"] .photo-banner::after {
    background: repeating-linear-gradient(-45deg, #ffc300, #ffc300 12px, #ffffff 12px, #ffffff 24px);
}

/* Foto e testo: layout ripristinato */
.banner-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 50%;
    z-index: 1;
    mask-image: linear-gradient(to right, rgba(0,0,0,1) 40%, rgba(0,0,0,0) 100%);
    -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,1) 40%, rgba(0,0,0,0) 100%);
}

.banner-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-banner .banner-text {
    position: relative;
    z-index: 2;
    width: 100%;
    margin-left: 45%; 
    padding: 40px 60px 40px 0; 
    color: var(--text-main);
    line-height: 1.5;
}

.photo-banner .banner-text p {
    margin: 0 0 10px 0;
    font-size: 1.05rem;
}

.photo-banner .banner-text strong {
    color: var(--title-color);
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: 1px;
}

/* --- 4. VERSIONE MOBILE --- */
@media (max-width: 768px) {
    .photo-banner {
        flex-direction: column;
        margin: 20px 20px;
        border-radius: 20px;
    }
    
    .banner-image-wrapper {
        position: relative;
        width: 100%;
        height: 200px;
        mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 100%);
        -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 100%);
    }

    .photo-banner .banner-text {
        margin-left: 0;
        padding: 0 25px 30px 25px;
        margin-top: -60px; 
        text-align: center;
    }
    
    .wip-badge {
        top: 16px;
        left: 16px;
        padding: 5px 12px;
        font-size: 0.75rem;
    }
}

/* Stile specifico per la card Instagram */
.fun-contact-card.instagram { background: linear-gradient(135deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%); border: 1px solid rgba(0,0,0,0.15); color: #ffffff; }
.fun-contact-card.instagram .fun-title, .fun-contact-card.instagram .fun-desc { color: #ffffff; }
.fun-contact-card.instagram::before { background: radial-gradient(ellipse at top left, rgba(255,255,255,0.08) 0%, transparent 60%); opacity: 0.18; }
.fun-contact-card.instagram:hover { transform: translateY(-12px) scale(1.02); box-shadow: 0 30px 60px rgba(0,0,0,0.45); }

/* =========================================================
   9. WRAPPER NAVIGAZIONE E FAB (FLUTTUANTI)
   ========================================================= */
.bottom-nav-wrapper { position: fixed; bottom: 30px; left: 0; width: 100%; height: 60px; pointer-events: none; z-index: 1000; }
.bottom-bubble { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; gap: 5px; padding: 10px 15px; background-color: var(--nav-glass-bg) !important; backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); border: 1px solid rgba(255, 255, 255, 0.2) !important; border-radius: 50px; box-shadow: 0 10px 30px rgba(0,0,0,0.3) !important; pointer-events: auto; }
/* --- LOGICA NAVIGAZIONE LIQUID GLASS (FLUIDA) --- */
.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--nav-text-color) !important;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 30px;
    /* Transizione specifica e più rapida, niente scatti */
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    text-shadow: var(--nav-text-shadow);
}

/* Hover: solo cambio colore sfondo a vetro colorato */
.nav-item:hover {
    background-color: var(--nav-hover-bg) !important;
    color: var(--nav-hover-text) !important;
}

/* Elemento attualmente selezionato */
.nav-item.active {
    color: var(--nav-hover-text) !important;
    font-weight: 800 !important;
    transform: scale(1.05);
}

/* Il pallino sotto l'elemento attivo (niente più bagliore neon) */
.nav-item.active::after {
    content: ''; 
    position: absolute; 
    bottom: -2px; 
    left: 50%; 
    transform: translateX(-50%); 
    width: 6px; 
    height: 6px; 
    background-color: var(--nav-hover-text) !important; 
    border-radius: 50%; 
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.nav-icon { width: 20px; height: 20px; }

.floating-contact { position: absolute; right: 40px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; pointer-events: auto; }
.contact-fab-toggle { width: 48px; height: 48px; border-radius: 50%; background-color: var(--nav-glass-bg) !important; color: var(--nav-text-color) !important; border: 1px solid rgba(255, 255, 255, 0.2) !important; cursor: pointer; display: flex; justify-content: center; align-items: center; box-shadow: 0 4px 15px rgba(0,0,0,0.3); transition: all 0.3s ease; position: relative; z-index: 2; backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); }
.contact-fab-toggle:hover { background-color: var(--nav-hover-bg) !important; color: var(--nav-hover-text) !important; transform: scale(1.05); }
.contact-fab-toggle svg { width: 22px; height: 22px; position: absolute; transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s ease; }
.icon-opened { opacity: 0; transform: rotate(-90deg) scale(0.5); }
.floating-contact.active .icon-closed { opacity: 0; transform: rotate(90deg) scale(0.5); }
.floating-contact.active .icon-opened { opacity: 1; transform: rotate(0) scale(1); }

.contact-options { position: absolute; bottom: 60px; left: 50%; transform: translateX(-50%) translateY(20px) scale(0.8); display: flex; flex-direction: column; gap: 12px; opacity: 0; visibility: hidden; transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1); z-index: 1; }
.floating-contact.active .contact-options { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0) scale(1); }
.contact-fab-item { width: 42px; height: 42px; border-radius: 50%; background-color: var(--nav-glass-bg) !important; color: var(--nav-text-color) !important; border: 1px solid rgba(255, 255, 255, 0.2) !important; display: flex; justify-content: center; align-items: center; box-shadow: 0 4px 10px rgba(0,0,0,0.2); transition: all 0.3s ease; position: relative; backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); }
.contact-fab-item:hover { background-color: var(--nav-hover-bg) !important; color: var(--nav-hover-text) !important; transform: scale(1.15) translateY(-3px); }
.contact-fab-item svg { width: 18px; height: 18px; }

/* --- Tooltip: migliora leggibilità del box testo --- */
.fab-tooltip { 
    position: absolute; 
    right: 55px; 
    top: 50%; 
    transform: translateY(-50%) translateX(10px); 
    
     /* Tooltip background: combine gradient with a near-opaque shield for legibility */
     background: linear-gradient(var(--nav-hover-bg), var(--nav-hover-bg)), rgba(15, 20, 25, 0.95) !important; 
    color: var(--nav-hover-text) !important; 
    
    /* Subtle border to separate tooltip from background */
    border: 1px solid rgba(255, 255, 255, 0.1) !important; 
    border-radius: 10px; 
    
    /* Preserve glass blur effect */
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    
    padding: 8px 16px; 
    font-size: 0.85rem; 
    font-weight: 700; 
    letter-spacing: 0.5px;
    white-space: nowrap; 
    pointer-events: none; 
    
    /* Increased shadow for prominence */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important; 
    
    opacity: 0; 
    visibility: hidden; 
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1); 
}

/* Adattamento per il Tema Chiaro */
html[data-theme="light"] .fab-tooltip {
    /* Light theme: near-opaque white shield under gradient for contrast */
    background: linear-gradient(var(--nav-hover-bg), var(--nav-hover-bg)), rgba(245, 245, 250, 0.95) !important; 
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}
.contact-fab-item:hover .fab-tooltip, .contact-fab-toggle:hover .fab-tooltip { opacity: 1; visibility: visible; transform: translateY(-50%) translateX(0); }
.floating-contact.active .contact-fab-toggle .fab-tooltip { opacity: 0; visibility: hidden; transform: translateY(-50%) translateX(10px); }

.floating-contact.active .contact-fab-toggle { color: #ff4757 !important; border-color: #ff4757 !important; }
.floating-contact.active .contact-fab-toggle svg { stroke: #ff4757 !important; fill: none; }
.floating-contact.active .contact-fab-toggle:hover { background-color: #ff4757 !important; color: #ffffff !important; }
.floating-contact.active .contact-fab-toggle:hover svg { stroke: #ffffff !important; }

/* =========================================================
   10. ANIMAZIONI ALLO SCROLL (OTTIMIZZATE)
   ========================================================= */
@keyframes popIn { 0% { transform: translateX(-50%) scale(0); opacity: 0; } 100% { transform: translateX(-50%) scale(1); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

.reveal { 
    opacity: 0; 
    transform: translateY(40px); 
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    /* Performance hint: reduce micro-jank during reveal animations */
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-style: preserve-3d;
}
.reveal.active { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* =========================================================
   11. MEDIA QUERIES (RESPONSIVE)
   ========================================================= */
@media (max-width: 1024px) {
    /* Hero Section Tablet */
    .about-hero { padding: 120px 20px 60px; justify-content: flex-start; min-height: auto; }
    .hero-intro-left, .hero-intro-right { position: relative; top: auto; left: auto; right: auto; bottom: auto; max-width: 100%; text-align: center; padding: 0; border: none; margin-bottom: 20px; }
    .hero-intro-left::before, .hero-intro-right::before { display: none; }
    .hero-content { margin-top: 20px; z-index: 3; }
    .hero-asterisk { position: relative; bottom: auto; right: auto; margin-top: 25px; text-align: center; width: 100%; order: 10; }
    .hero-image { position: relative; max-height: 35vh; margin-top: 30px; display: block; }
    .about-hero::after { position: relative; bottom: auto; left: auto; transform: none; width: 95%; max-width: 450px; margin: -15px auto 0 auto; z-index: 3; }
    .section-title-giant.align-left, .section-title-giant.align-right { align-items: center; text-align: center; margin-bottom: 40px; }
    
    /* Contatti e web showcase (tablet) */
    .contacts-layout { flex-direction: column; justify-content: center; text-align: center; padding: 30px 20px 140px 20px; }
    .contacts-layout .section-title-giant { margin: 0 auto 40px auto; }
    .contact-cards-wrapper { justify-content: center; width: 100%; }
    .web-showcase { height: 380px; gap: 30px; }
    
    /* Nasconde le frecce del carosello su tablet per favorire lo scroll nativo */
    .carousel-arrow { display: none !important; }
}

/* =========================================================
   MEDIA QUERY MOBILE: DESIGN UNIFICATO E DEFINITIVO
   ========================================================= */
@media (max-width: 768px) {
    /* --- IMPOSTAZIONI GLOBALI --- */
    body, html { overflow-x: hidden !important; width: 100% !important; }
    .content-section { padding: 60px 20px; }
    .solid-text { font-size: clamp(1.6rem, 9vw, 2.5rem) !important; }
    .outline-text { font-size: clamp(1.8rem, 10vw, 2.8rem) !important; margin-top: -5px !important; -webkit-text-stroke: 1px var(--text-main) !important; }
    .hero-subtitle { font-size: 1rem; flex-direction: column; gap: 5px; }

    /* --- NAVBAR & TEMA --- */
    .navbar, .navbar.scrolled { padding: 0 15px; height: 80px; }
    .lang-switch { margin-right: 0; padding: 3px 6px; }
    .lang-btn { padding: 4px 8px; font-size: 0.75rem; }
    .switch-text { display: none !important; }
    .theme-switch { width: 76px !important; }
    html[data-theme="dark"] .switch-slider { transform: translate(34px, -50%) !important; background-color: rgba(255, 255, 255, 0.2) !important; }
    html[data-theme="light"] .switch-slider { transform: translate(0, -50%) !important; background-color: rgba(0, 53, 102, 0.15) !important; }

    /* --- NAVIGAZIONE INFERIORE E FAB --- */
    .bottom-nav-wrapper { bottom: 20px; }
    .floating-contact { right: 20px; }
    .bottom-bubble { width: max-content; }
    .nav-text { display: none; }
    .nav-item { padding: 12px; border-radius: 50%; }
    .nav-item:hover { transform: scale(1.1); }
    .fab-tooltip { display: none !important; }

    /* --- FILTRI E PROGETTI UNI --- */
    .filter-wrapper { margin: 0 auto 20px auto !important; }
    .mobile-filter-toggle { display: flex; }
    .project-filters { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; width: 100%; background-color: var(--bg-color); border: 1px solid var(--border-color); border-radius: 12px; padding: 10px !important; margin-top: 10px; box-shadow: 0 10px 25px rgba(0,0,0,0.5); gap: 5px; z-index: 100;}
    .project-filters.show { display: flex; animation: fadeInDown 0.3s ease forwards; }
    .filter-btn { width: 100%; justify-content: flex-start; padding: 12px 15px; border-radius: 8px; border: none; background-color: transparent; box-shadow: none; }
    .filter-btn:hover, .filter-btn.active { transform: none; }
    
    .carousel-wrapper { height: 480px; margin-top: -20px; }
    .carousel-item.active { transform: translate(-50%, -50%) translateZ(50px) scale(1); }
    .carousel-item.prev { transform: translate(-80%, -50%) translateZ(-50px) scale(0.75) rotateY(10deg); }
    .carousel-item.next { transform: translate(-20%, -50%) translateZ(-50px) scale(0.75) rotateY(-10deg); }

    /* --- GRID E CONTENITORI PRINCIPALI --- */
    .design-narrative-grid { display: flex !important; flex-direction: column !important; padding: 15px !important; gap: 40px !important; width: 100% !important; box-sizing: border-box !important; }
    .glass-box-container { width: 100% !important; max-width: 100vw !important; box-sizing: border-box !important; border-radius: 20px !important; padding: 0 !important; margin: 0 !important; }
    .glass-box-container::before { border-radius: 20px !important; }
    
    /* Sblocco visibilità ombre ed elementi */
    .glass-box-content, .narrative-flow, .dm-narrative-step, .spotted-box, .tazzina-box { overflow: visible !important; clip-path: none !important; }

    /* Riattiva il taglio ai bordi ESCLUSIVAMENTE per i box con i caroselli 3D */
    .uni-box, .dmcoach-box {
        overflow: hidden !important;
    }

    /* Salviamo l'ombra in basso anche per i Reel di DM Coach (come avevamo fatto per l'uni-box) */
    .dmcoach-box .narrative-flow { 
        padding-bottom: 40px !important; 
    }

    /* Mantieni visibili le ombre dei video nel web-showcase */
    .web-showcase { width: 100% !important; max-width: 100vw !important; box-sizing: border-box !important; overflow: visible !important; }

    /* Taglio overflow limitato ai soli elementi che devono clipping */
    .telegram-logos-section { width: 100% !important; max-width: 100vw !important; box-sizing: border-box !important; overflow: hidden !important; }

    /* --- HEADER E TESTI --- */
    .glass-box-header { flex-direction: row !important; flex-wrap: wrap !important; align-items: center !important; padding: 20px 15px !important; gap: 15px !important; width: 100% !important; box-sizing: border-box !important; border-radius: 20px 20px 0 0 !important; }
    .glass-box-header .external-link-btn { margin-left: 0 !important; width: 100% !important; justify-content: center !important; padding: 12px 15px !important; font-size: 0.9rem !important; box-sizing: border-box !important; }
    .glass-box-title { font-size: 1.6rem !important; text-align: left !important; }
    .fun-title-emoji { font-size: 2.2rem !important; margin-right: 10px !important; }
    
    .narrative-flow, .dm-narrative-step { padding: 30px 15px !important; gap: 30px !important; width: 100% !important; box-sizing: border-box !important; }
    .narrative-text { font-size: 1rem !important; width: 100% !important; box-sizing: border-box !important; padding: 0 !important; margin: 0 auto !important; }
    
    /* Fix Ombra Presentazioni Accademiche */
    .uni-box .narrative-flow { padding-bottom: 60px !important; }

    /* --- SLIDER LOGHI E TESTI ORIZZONTALE --- */
    .scrolly-steps { display: none !important; }
    .scrolly-sticky { position: relative !important; top: 0 !important; height: auto !important; flex-direction: column !important; gap: 20px !important; }
    .scrolly-visuals { width: 100% !important; display: flex !important; justify-content: center !important; margin-bottom: 10px !important; }
    .scrolly-logo-wrapper { width: 160px !important; height: 160px !important; margin: 0 auto !important; }
    .logo-circle, .tazzina-box .scrolly-circle { width: 160px !important; height: 160px !important; }
    
    .scrolly-texts, .tazzina-box .scrolly-texts { display: flex !important; flex-direction: row !important; overflow-x: auto !important; scroll-snap-type: x mandatory; width: 100% !important; height: auto !important; min-height: min-content !important; margin: 0 auto !important; padding: 10px 5% 30px 5% !important; gap: 15px !important; align-items: stretch !important; scrollbar-width: none; }
    .scrolly-texts::-webkit-scrollbar { display: none; }
    
    .scrolly-text-box, .tazzina-box .scrolly-text-box { display: flex !important; flex-direction: column !important; justify-content: center !important; opacity: 1 !important; position: relative !important; flex: 0 0 90% !important; max-width: 90% !important; height: auto !important; scroll-snap-align: center !important; transform: none !important; left: auto !important; box-sizing: border-box !important; }

    .scrolly-circle { display: flex !important; flex-direction: row !important; overflow-x: auto !important; scroll-snap-type: x mandatory; scrollbar-width: none; justify-content: flex-start !important; align-items: center !important; scroll-behavior: auto !important; }
    .scrolly-circle::-webkit-scrollbar { display: none; }
    .scrolly-circle > a { display: contents !important; }
    .scrolly-img { position: relative !important; flex: 0 0 100% !important; min-width: 100% !important; height: 100% !important; scroll-snap-align: center !important; opacity: 1 !important; transform: none !important; object-fit: contain !important; padding: 12% !important; box-sizing: border-box !important; }

    /* --- LOCANDINE E REEL DM COACH --- */
    .poster-mini { height: auto !important; max-width: 320px !important; margin: 0 auto !important; display: flex; }
    .poster-mini img { width: 100%; height: auto; object-fit: cover; display: block; }
    
    .graphics-item.reel-container { 
        width: 100% !important; 
        height: 460px !important; /* Altezza aumentata per anteprime più grandi su mobile */
        margin: 30px 0 !important; 
        overflow: visible !important; 
        clip-path: none !important; 
    }

    .dm-narrative-step .narrative-text + .graphics-item.reel-container {
        margin-top: 45px !important;
    }
    
    .reel-carousel-card { 
        max-width: 300px !important; /* Anteprime più grandi su mobile */
        border: none !important;
        background-color: transparent !important;
        box-shadow: none !important;
    }

    .carousel-item.active.reel-carousel-card {
        box-shadow: none !important;
        border: none !important;
        background-color: transparent !important;
    }

    .reel-carousel-card img {
        border-radius: inherit !important;
    }
    
    /* Riequilibrio mobile: anteprime laterali meno invasive e più proporzionate rispetto alla card attiva */
    .carousel-item.prev.reel-carousel-card { transform: translate(-65%, -50%) translateZ(-100px) scale(0.8) rotateY(15deg) !important; filter: blur(4px) brightness(0.45) !important; }
    .carousel-item.next.reel-carousel-card { transform: translate(-35%, -50%) translateZ(-100px) scale(0.8) rotateY(-15deg) !important; filter: blur(4px) brightness(0.45) !important; }
    
    /* --- PDF CAROUSEL --- */
    .pdf-carousel { height: 260px !important; overflow: visible !important; }
    .presentation-showcase, .presentation-content, .presentation-slider-row, .projects-carousel { overflow: visible !important; clip-path: none !important; }
    .pdf-carousel-card { max-width: 280px !important; }
    .carousel-item.prev.pdf-carousel-card { transform: translate(-80%, -50%) translateZ(-50px) scale(0.7) rotateY(10deg) !important; }
    .carousel-item.next.pdf-carousel-card { transform: translate(-20%, -50%) translateZ(-50px) scale(0.7) rotateY(-10deg) !important; }

    /* --- SEZIONE TELEGRAM E MARQUEE --- */
    .telegram-logos-section { grid-column: span 10; margin: 20px 0; }
    .marquee-box { padding: 20px 25px; gap: 25px; margin-right: 30px; }
    .marquee-img-wrapper { width: 75px; height: 75px; }
    .marquee-label { font-size: 0.75rem; }
    .slider-title { font-size: 0.8rem; padding: 0 10px; }

    /* --- WEB SHOWCASE --- */
    .web-showcase { flex-direction: column; align-items: center; height: auto; gap: 40px; padding: 30px 10px; }
    .web-desktop { width: 100%; height: auto; aspect-ratio: 16 / 9; }
    .web-mobile { width: 220px; height: auto; aspect-ratio: 9 / 19.5; }

    /* --- CONTATTI BOTTOM --- */
    .contact-cards-wrapper { flex-direction: column; align-items: center; gap: 15px; width: 100%; justify-content: center; }
    .fun-contact-card { flex-direction: row; width: 100%; max-width: 300px; padding: 10px 24px; border-radius: 6px; background-color: var(--btn-bg); border: none; box-shadow: none; justify-content: center; }
    .fun-contact-card:hover { transform: translateY(-3px); background-color: var(--btn-hover); box-shadow: none; }
    .fun-contact-card:hover .fun-title { color: var(--btn-text-hover); }
    .fun-emoji, .fun-desc { display: none; } 
    .fun-title { font-size: 1rem; margin: 0; font-weight: 600; }
    
    /* --- PHOTO BANNER --- */
    .photo-banner { flex-direction: column; margin: 20px 20px; border-radius: 20px; }
    .banner-image-wrapper { position: relative; width: 100%; height: 200px; mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 100%); -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 100%); }
    .photo-banner .banner-text { margin-left: 0; padding: 0 25px 30px 25px; margin-top: -60px; text-align: center; }
    .wip-badge { top: 16px; left: 16px; padding: 5px 12px; font-size: 0.75rem; }
}

/* =========================================================
    12. TAZZINA MOCKUP PAGE
   ========================================================= */

body.tazzina-page {
    /* Page-scoped variables */
    --orange: #FF5500;
    --green: #004921;
    --bg-dark: #1a1a1a;
    --gap: 15px; 

    background-color: var(--bg-dark);
    height: 100vh;
    overflow: hidden; 
    display: flex;
    color: white;
}

/* Disable base mesh gradients */
body.tazzina-page::before {
    display: none;
}

.tazzina-page .sidebar {
    width: 80px;
    background-color: var(--bg-dark);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.tazzina-page .sidebar-left {
    transform: rotate(180deg);
}

.tazzina-page .marquee-track {
    display: flex;
    flex-direction: column; 
    animation: scrollMarquee 25s linear infinite; 
    height: max-content;
}

@keyframes scrollMarquee {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); } 
}

.tazzina-page .marquee-content {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-family: 'Krop', sans-serif; 
    font-size: 2.8rem;
    font-weight: 900;
    text-transform: uppercase;
    white-space: nowrap;
    display: flex;
    flex-direction: row; 
    align-items: center;
    gap: 20px; 
    padding-bottom: 20px; 
}

.tazzina-page .txt-orange { color: var(--orange); }
.tazzina-page .txt-green { color: var(--green); }
.tazzina-page .txt-white { color: #ffffff; } 

.tazzina-page .main-content {
    flex-grow: 1;
    height: 100vh;
    overflow-y: auto; 
    padding: var(--gap);
    
    /* Hide scrollbar on Firefox, IE and Edge */
    scrollbar-width: none; 
    -ms-overflow-style: none; 
}

/* Hide scrollbar on WebKit browsers */
.tazzina-page .main-content::-webkit-scrollbar {
    display: none;
}

.tazzina-page .mockup-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--gap);
    max-width: 1200px;
    margin: 0 auto;
}

.tazzina-page .grid-box {
    background-color: #333;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.2rem;
    overflow: hidden;
    min-height: 250px; 
    box-shadow: none;
    border: none;
}

.tazzina-page .grid-box img { width: 100%; height: 100%; object-fit: cover; }

.tazzina-page .box-logo { grid-column: span 6; background-color: #ffffff; min-height: 400px; color: #ccc;}
.tazzina-page .box-color-1 { grid-column: span 2; background-color: var(--orange); color: #fff;}
.tazzina-page .box-color-2 { grid-column: span 2; background-color: #ffffff; color: #000; border: 1px solid #ccc;}
.tazzina-page .box-color-3 { grid-column: span 2; background-color: var(--green); color: #fff;}

.tazzina-page .box-color {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 20px;
    font-size: 1.5rem;
    line-height: 1.2;
    min-height: 200px;
}

.tazzina-page .box-pattern { grid-column: span 6; background-color: #f0f0f0; }
.tazzina-page .box-half { grid-column: span 3; background-color: #2a2a2a; min-height: 350px; }

/* Images: logo and pattern layout */

    /* Logo layout */
    .tazzina-page .box-logo {
    padding: 0 !important;
}

.tazzina-page .box-logo img {
    width: auto !important;
    height: auto !important;
    max-width: 50% !important; 
    max-height: 60% !important; 
    object-fit: contain !important;
    object-position: center !important;
    margin: auto !important;
    display: block;
}

/* Pattern and mockup layout */
.tazzina-page .box-pattern,
.tazzina-page .box-half {
    position: relative;
}

.tazzina-page .box-pattern img,
.tazzina-page .box-half img {
    position: absolute;
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%;
    object-fit: cover !important;
}

/* Responsive per la pagina dei mockup */
@media (max-width: 768px) {
    .tazzina-page .sidebar { width: 45px; }
    .tazzina-page .marquee-content { font-size: 1.6rem; gap: 15px; padding-bottom: 15px; }
    .tazzina-page .box-color-1, 
    .tazzina-page .box-color-2, 
    .tazzina-page .box-color-3 { grid-column: span 6; min-height: 120px; }
    .tazzina-page .box-half { grid-column: span 6; }
}