/* Space Grotesk - Self Hosted */
@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('./fonts/space-grotesk-v22-latin-300.woff2') format('woff2');
}

@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('./fonts/space-grotesk-v22-latin-regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('./fonts/space-grotesk-v22-latin-500.woff2') format('woff2');
}

@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('./fonts/space-grotesk-v22-latin-700.woff2') format('woff2');
}

/* Outfit - Self Hosted */
@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('./fonts/outfit-v15-latin-300.woff2') format('woff2');
}

@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('./fonts/outfit-v15-latin-regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('./fonts/outfit-v15-latin-500.woff2') format('woff2');
}

@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('./fonts/outfit-v15-latin-700.woff2') format('woff2');
}

:root {
    --bg-color: #050505;
    --text-color: #ffffff;
    --accent-color: #008080;
    /* Deep Teal */
    --accent-glow: rgba(0, 128, 128, 0.4);
    --secondary-bg: #111111;
    --card-bg: #1a1a1a;
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;

    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    background-color: #000000;
    /* Ensure solid background even at bottom */
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Customize Iubenda Banner to match theme */
/* Customize Iubenda Banner to match theme */
#iubenda-cs-banner,
.iubenda-cs-content,
.iubenda-cs-banner-content,
div.iubenda-cs-rationale,
.iubenda-cs-opt-group,
.iubenda-cs-opt-group-consent,
.iubenda-cs-cookie-policy-lnk {
    background-color: #1a1a1a !important;
    /* Dark card bg */
    color: #ffffff !important;
    font-family: var(--font-body) !important;
}

#iubenda-cs-banner {
    bottom: 0px !important;
    left: 0px !important;
    position: fixed !important;
    width: 100% !important;
    z-index: 99999998 !important;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5) !important;
}

.iubenda-cs-rationale,
.iubenda-cs-close-btn,
.iubenda-banner-description {
    color: #cccccc !important;
}

/* Button overrides for Iubenda */
.iubenda-cs-accept-btn {
    background-color: var(--accent-color) !important;
    color: white !important;
    border: 1px solid var(--accent-color) !important;
}

.iubenda-cs-btn-primary {
    background-color: var(--accent-color) !important;
    color: white !important;
}

/* Fix specific area shown in user screenshot (Preferences/Privacy Tools) */
.iubenda-cs-preferences-link,
.iubenda-tp-btn,
.iubenda-cs-collection-notice-lnk,
.iubenda-cs-customize-btn {
    background-color: #1a1a1a !important;
    color: #fff !important;
    border-color: #333 !important;
}

/* Broad override for any white backgrounds in Iubenda components */
[class*="iubenda"] {
    scrollbar-color: var(--accent-color) #1a1a1a;
}

.iubenda-cs-content a {
    color: #fff !important;
}

/* Specific fix for the "Informativa sulla raccolta" link if it's a standalone block */
a.iubenda-cs-collection-notice-lnk {
    background: #1a1a1a !important;
    color: #fff !important;
    box-shadow: none !important;
}

/* Floating Banner position fix (if using float-bottom-center) */
/* Ensure it doesn't overlap excessively if it has a shadow or margin */
#iubenda-cs-banner.iubenda-cs-overlay {
    z-index: 99999999 !important;
}

/* Icons */
.iubenda-cs-icon,
.iub-icon {
    filter: invert(1) !important;
    /* Invert black icons to white if needed */
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.1;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-speed);
}

.accent {
    color: var(--accent-color);
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
    border: 1px solid var(--accent-color);
    box-shadow: 0 0 15px var(--accent-glow);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--accent-color);
}

.btn-secondary {
    border: 1px solid white;
    color: white;
}

.btn-secondary:hover {
    background-color: white;
    color: black;
}

/* Loader */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-content {
    text-align: center;
    width: 300px;
}

.loader-logo {
    width: 80px;
    margin-bottom: 20px;
}

.loading-bar-container {
    width: 100%;
    height: 4px;
    background: #333;
    border-radius: 2px;
    overflow: hidden;
}

.loading-bar {
    width: 0%;
    height: 100%;
    background: var(--accent-color);
    transition: width 0.1s linear;
}

.loading-text {
    margin-top: 10px;
    font-family: var(--font-heading);
    font-size: 14px;
    color: #666;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    left: 0;
    padding: 20px 20px;
    /* Safety padding for small screens */
    display: flex;
    justify-content: center;
    /* Center the inner container */
    z-index: 1000;
    /* Increased to stay above Hero content */
    background: linear-gradient(to bottom, rgba(5, 5, 5, 0.9), transparent);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.nav-container {
    width: 100%;
    max-width: 1180px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    /* Prevent wrapping */
}

.navbar .logo img {
    height: 55px;
    /* Increased by ~1/3 (was 40px) */
}

.mobile-menu-btn {
    display: none;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

.nav-links a:hover {
    color: var(--accent-color);
    opacity: 1;
}

.btn-nav {
    padding: 8px 20px;
    border: 1px solid var(--accent-color);
    border-radius: 4px;
    color: var(--accent-color) !important;
}

.btn-nav:hover {
    background: var(--accent-color);
    color: white !important;
}

/* Hero Section */
.parallax-container {
    position: relative;
    height: 100vh;
    /* Fallback for older browsers */
    height: 100lvh;
    /* Large Viewport Height (covers address bar area) */
    width: 100%;
    overflow: hidden;
    border-bottom: 1px solid #333;
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
    /* Static Fallback Image - Visible if Canvas fails */
    background-image: url('assets/backup bg landing/backupBg.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* Ultimate fallback color */
}

/* Hide fallback when Canvas is active */
body.js-loaded .parallax-container {
    background-image: none !important;
}

/* Mobile Optimized Background */
@media (max-width: 768px) {
    .parallax-container {
        background-image: url('assets/backup bg landing/backupBg-mobile.webp');
    }
}

/* ... existing styles ... */
/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    /* Ensure visibility */
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 20;
    transition: opacity 0.5s ease;
    animation: pulseScroll 2s infinite;
    /* Add pulse animation */
}

.scroll-indicator span {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
}

.scroll-indicator .mouse {
    width: 26px;
    height: 42px;
    border: 2px solid var(--accent-color);
    /* User requested accent color */
    border-radius: 20px;
    position: relative;
}

.scroll-indicator .mouse::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--accent-color);
    /* User requested accent color */
    border-radius: 50%;
    animation: scrollAnim 2s infinite;
}

@keyframes pulseScroll {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(10px);
    }
}

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

    100% {
        transform: translate(-50%, 15px);
        opacity: 0;
    }
}

#hero-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    /* Fallback */
    height: 100lvh !important;
    /* Large Viewport Height (covers address bar area) */
    transform: none;
    /* Rimuove traslazioni che potrebbero causare shift */
    z-index: 0;
    opacity: 0.6;
    /* Dim the background slightly */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    /* Full width, no max-width here */
    height: 100%;
    z-index: 1;
    pointer-events: none;
    /* Removed background: rgba(0,0,0,0.3) as per request */
}

.hero-container {
    width: 100%;
    max-width: 1180px;
    height: 100%;
    margin: 0 auto;
    position: relative;
    /* Determine relative context for absolute children */
    padding: 0 20px;
}

.hero-left,
.hero-right,
.hero-socials,
.scroll-indicator {
    pointer-events: auto;
}

/* Desktop Layout Restoration for Two-Block HTML */
.hero-left {
    position: absolute;
    top: 25%;
    left: 0;
    width: 100%;
    /* Spans full width to contain both sides */
    max-width: 100%;
    /* Remove default constraint */
    pointer-events: none;
    /* Let clicks pass through center */
}

/* Contents inside hero-left must be re-enabled */
.hero-top,
.skill-indicators,
.hero-right-content,
.hero-socials {
    pointer-events: auto;
}

.hero-top {
    max-width: 500px;
    /* Restore constraint for Title */
}

.skill-indicators {
    max-width: 500px;
    margin-top: 20px;
}

/* --- DESKTOP FIX (Min-Width 769px) --- */
/* --- DESKTOP FIX (Si applica solo da PC/Tablet in su) --- */
@media (min-width: 769px) {

    /* 1. RESETTA IL CONTENITORE (Annulla il flex mobile) */
    .hero-container {
        position: relative;
        height: 100vh;
        display: block;
        /* Torna a blocco standard per permettere l'absolute */
        padding: 0 20px;
        max-width: 1400px;
        /* Limite larghezza per schermi ultra-wide */
    }

    /* Rimuoviamo le costrizioni del wrapper mobile */
    .hero-left {
        position: static;
        width: 100%;
        height: 100%;
        display: block;
    }

    /* 2. BLOCCO SINISTRO (Titolo + Skills) */
    .hero-top {
        position: absolute;
        top: 50%;
        left: 20px;
        /* Ancorato a sinistra */
        transform: translateY(-50%);
        /* Centrato verticalmente */
        z-index: 10;
        max-width: 45%;
        /* Non invadere la faccia */
        text-align: left;
    }

    .hero-title {
        font-size: 5.5rem;
        /* Font grande Desktop */
        line-height: 0.9;
        margin-bottom: 40px;
    }

    /* FIX COLORI PERSIC: Forziamo il colore dell'accento qui */
    .accent-text {
        color: #008080;
        /* Teal */
        font-size: 14px;
        letter-spacing: 3px;
        margin-bottom: 15px;
        display: block;
    }

    /* 3. SKILLS (Orizzontali a sinistra) */
    .skill-indicators {
        display: flex;
        flex-direction: row;
        /* Orizzontale */
        gap: 40px;
        margin-top: 20px;
    }

    .skill-item {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    /* FIX COLORI NUMERI #01..#04 */
    .skill-index {
        color: #008080;
        /* Teal */
        font-weight: 700;
        font-size: 1.1rem;
        margin-bottom: 5px;
    }

    .skill-label {
        font-size: 0.9rem;
        color: #fff;
    }

    /* 4. BLOCCO DESTRO (Descrizione) */
    /* Lo tiriamo fuori dal flusso e lo mettiamo a destra */
    .hero-right-content {
        position: absolute;
        top: 50%;
        right: 20px;
        /* Ancorato a destra */
        transform: translateY(-50%);
        text-align: right;
        /* Testo allineato a destra */
        max-width: 400px;
        z-index: 10;
        margin: 0;
    }

    .subheadline {
        font-size: 2.2rem;
        line-height: 1.2;
        margin-bottom: 20px;
        color: #fff;
    }

    .supporting-text {
        font-size: 1.1rem;
        line-height: 1.6;
        color: rgba(255, 255, 255, 0.8);
    }

    /* Reset contenitore inferiore */
    .hero-bottom {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 100%;
        pointer-events: none;
        z-index: 5;
    }

    /* 5. SOCIAL & SCROLL (Basso) */
    .hero-socials {
        display: flex !important;
        /* Riappaiono su desktop */
        position: absolute;
        bottom: 50px;
        left: 40px;
        gap: 30px;
        z-index: 10;
    }

    .scroll-indicator {
        position: absolute;
        bottom: 30px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 10;
        display: flex;
    }
}

/*min-width: 769px*/
.hero-right {
    position: absolute;
    top: 40%;
    right: 0;
    /* Align to container edge */
    text-align: right;
    max-width: 400px;
}

.subheadline {
    font-size: 2rem;
    margin-bottom: 20px;
}

.supporting-text {
    font-size: 1rem;
    opacity: 0.8;
    line-height: 1.6;
}

.hero-socials {
    position: absolute;
    bottom: 40px;
    left: 40px;
    transform: none;
    display: flex;
    gap: 30px;
    z-index: 10;
}

.hero-socials a {
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-size: 12px;
    opacity: 0.6;
}

.hero-socials a:hover {
    opacity: 1;
    color: var(--accent-color);
}



/* Mobile Landscape Tweaks (Max-Height 500px) */
@media (max-height: 500px) {
    .navbar {
        padding: 10px 20px;
    }

    .navbar .logo img {
        height: 40px;
        /* Reduce logo size */
    }

    .scroll-indicator {
        display: none !important;
        /* Hide scroll indicator */
    }

    .hero-socials {
        bottom: 20px;
        /* Raise slightly */
        left: 30px;
    }

    /* Ensure canvas covers correctly */
    .hero-title {
        font-size: 3.5rem;
        /* Smaller title */
        margin-bottom: 20px;
    }
}

/* Sections */
.content-wrapper {
    position: relative;
    z-index: 2;
    background-color: var(--bg-color);
    margin-top: 100vh;
    /* Push below hero */
    box-shadow: 0 -50px 100px rgba(0, 0, 0, 0.8);
}

.section {
    padding: 100px 5%;
}

.container {
    max-width: 1180px;
    margin: 0 auto;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 50px;
    text-transform: uppercase;
}

.section-title.center {
    text-align: center;
}

/* About Redesign with Spotlight */
.about-section {
    position: relative;
    overflow: hidden;
    /* Contain spotlight */
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    /* Larger text column */
    gap: 60px;
    align-items: center;
}

.about-avatar-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-avatar {
    width: 100%;
    max-width: 480px;
    /* Increased by 1/3 (was 360px) */
    height: auto;
    position: relative;
    z-index: 2;
    border-radius: 20px;
    /* transition: transform 0.3s ease; Removed magnetic/transform for now unless requested */
}

.spotlight {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    /* Scaled up to match new avatar size (was 440px) */
    height: 600px;
    background: radial-gradient(circle, rgba(0, 128, 128, 0.4) 0%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    pointer-events: none;
    transition: width 0.3s, height 0.3s;
    /* Smooth resize if needed */
    will-change: transform, opacity;
}

/* Fallback Pulsing Animation */
@keyframes pulseGlow {
    0% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.1);
    }

    100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }
}

.spotlight.pulsing {
    animation: pulseGlow 3s infinite ease-in-out;
}

.about-content {
    z-index: 2;
}

.section-title span.accent-teal {
    color: #008080;
    /* Explicit Deep Teal */
}

.about-text {
    font-size: 1.15rem;
    /* ~18px */
    line-height: 1.8;
    color: #e0e0e0;
    font-weight: 300;
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid #333;
    transition: transform 0.3s, border-color 0.3s;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.service-card p {
    opacity: 0.7;
    font-size: 0.95rem;
}

/* Portfolio */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--secondary-bg);
    border-radius: 15px;
    overflow: hidden;
    display: block;
    /* Ensure anchor fills space */
    position: relative;
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    /* Riserva lo spazio preciso */
    position: relative;
    /* For overlay positioning */
    transition: filter 0.3s ease;
    overflow: hidden;
}

.project-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-thumb-gradient {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #111, #222);
}

.project-card:hover .project-thumb {
    filter: blur(3px);
    /* Blur effect on hover */
}

/* Overlay for "Visita il sito" */
.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Match parent aspect ratio */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
    /* Optional: subtle dark tint to make text pop against blurred image */
    background: rgba(0, 0, 0, 0.4);
    pointer-events: none;
    /* Let clicks pass through if needed, though anchor wraps all */
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.overlay-text {
    color: var(--accent-color);
    /* Teal #008080 */
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    /* Glow Effect */
    text-shadow: 0 0 10px rgba(0, 128, 128, 0.8), 0 0 20px rgba(0, 128, 128, 0.4);
}

.project-card:hover .overlay-text {
    transform: translateY(0);
}

.project-info {
    padding: 20px;
    position: relative;
    z-index: 3;
    /* Keep info above blur if needed */
    background: var(--secondary-bg);
    /* Ensure info background covers any bleed */
}

.project-info h3 {
    margin-bottom: 5px;
    color: white;
    /* Ensure title stays white */
}

.project-info p {
    font-size: 0.9rem;
    color: var(--accent-color);
}

/* FAQ */
.accordion {
    max-width: 800px;
    margin: 0 auto;
}

.accordion-item {
    border-bottom: 1px solid #333;
}

.accordion-header {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    color: white;
    padding: 20px 0;
    font-size: 1.2rem;
    font-family: var(--font-heading);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
}

.accordion-header:hover {
    color: var(--accent-color);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 10px;
}

.accordion-content p {
    padding-bottom: 20px;
    opacity: 0.8;
}

/* Footer */
.footer-section {
    padding: 100px 5% 50px;
    background-color: var(--secondary-bg);
    border-top: 1px solid #222;
}

.cta-box {
    text-align: center;
    background: linear-gradient(135deg, var(--card-bg), #000);
    padding: 60px;
    border-radius: 30px;
    margin-bottom: 80px;
    border: 1px solid #333;
}

.cta-box h2 {
    font-size: 2.5rem;
    margin-bottom: 30px;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    border-top: 1px solid #333;
    padding-top: 40px;
}

.footer-logo img {
    height: 90px;
}

.footer-links a,
.footer-socials a {
    margin: 0 15px;
    font-size: 14px;
    color: #888;
}

.footer-links a:hover,
.footer-socials a:hover {
    color: white;
}

/* Responsive */
/* --- NUOVO LAYOUT MOBILE OTTIMIZZATO --- */
/* --- MOBILE FIX (Sostituisci il blocco @media max-width: 768px esistente) --- */
@media (max-width: 768px) {

    /* 1. RIPRISTINO COLORI (Regole con !important per vincere su tutto) */
    .accent-text {
        color: var(--accent-color) !important;
        /* Forza il Teal */
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 2px;
        margin-bottom: 10px;
        text-shadow: 0 1px 5px rgba(0, 0, 0, 0.7);
        /* Leggibilità */
    }

    .skill-index {
        color: var(--accent-color) !important;
        /* Forza il Teal */
        font-size: 1rem;
        font-weight: bold;
    }

    /* 2. RIPRISTINO GRIGLIA 2x2 (Fix layout rotto) */
    .skill-indicators {
        display: grid !important;
        /* Forza Grid invece di Flex */
        grid-template-columns: 1fr 1fr;
        /* 2 Colonne uguali */
        gap: 15px;
        /* Spazio tra le celle */
        margin-top: 20px;
        width: 100%;
        /* Occupa tutto lo spazio */
    }

    .skill-item {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        /* Allinea a sinistra */
    }

    /* 3. ALTRE REGOLE DI POSIZIONAMENTO (Già presenti, manteniamole per sicurezza) */
    .navbar {
        padding: 15px 20px;
    }

    .hero-container {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        height: 100dvh;
        position: relative;
        padding-top: 130px;
        padding-bottom: 0px;
        padding-left: 20px;
        padding-right: 20px;
        box-sizing: border-box;
    }

    .hero-left {
        position: static;
        height: 100%;
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .hero-top {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .hero-title {
        font-size: clamp(2.8rem, 6vh, 3.5rem);
        line-height: 1;
        margin: 0;
    }

    .hero-bottom {
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        position: static;
        padding-bottom: 120px !important;
    }

    .hero-right-content {
        position: static;
        text-align: left;
        margin-bottom: 0;
        z-index: 5;
    }

    .subheadline {
        font-size: 1.4rem;
        margin-bottom: 10px;
        line-height: 1.2;
    }

    .supporting-text {
        font-size: 0.95rem;
        opacity: 0.9;
    }

    .hero-socials {
        display: none !important;
    }

    .scroll-indicator {
        position: absolute !important;
        bottom: 30px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        display: flex !important;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        z-index: 10;
        margin: 0 !important;
    }

    .mobile-menu-btn {
        display: flex;
        flex-direction: column;
        gap: 6px;
        cursor: pointer;
        z-index: 200;
    }

    .mobile-menu-btn span {
        width: 30px;
        height: 2px;
        background-color: white;
        transition: 0.3s;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: rgba(5, 5, 5, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        visibility: hidden;
        transition: visibility 0s 0.4s, right 0.4s ease;
        z-index: 150;
        border-left: 1px solid #333;
    }

    .nav-links.active {
        right: 0;
        visibility: visible;
        transition: right 0.4s ease;
    }

    /* --- FIX DEFINITIVO MOBILE (Colori + Griglia) --- */
    /* Incolla questo alla fine del blocco @media (max-width: 768px) */

    /* 1. Forza il colore Teal (#008080) su Mobile */
    .accent-text,
    .skill-index {
        color: var(--accent-color) !important;
        opacity: 1 !important;
    }

    /* 2. Forza la Griglia 2x2 (03 sotto 01, 04 sotto 02) */
    .skill-indicators {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        /* Crea due colonne uguali */
        gap: 30px 10px !important;
        /* Spazio verticale e orizzontale */
        width: 100%;
        margin-top: 20px;
    }

    /* Assicura che ogni skill sia allineata a sinistra */
    .skill-item {
        display: flex;
        flex-direction: column;
        align-items: flex-start !important;
        width: auto;
    }
}

@media (max-width: 768px) {

    /* Resetta posizionamenti strani */
    .hero-left {
        position: static;
        height: 100%;
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    /* 2. BLOCCO SUPERIORE (Titolo + Skills) */
    .hero-top {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        gap: 10px;
    }

    .hero-title {
        /* Dimensione font intelligente: si adatta allo schermo */
        font-size: clamp(2.5rem, 5vh, 3.5rem);
        line-height: 1;
        margin-top: 0;
        margin-bottom: 5px;
    }

    /* Skills in griglia orizzontale */
    .skill-indicators {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
        margin-top: 15px;
    }

    .skill-index {
        font-size: 0.9rem;
    }

    .skill-label {
        font-size: 0.7rem;
    }

    /* 3. BLOCCO INFERIORE (Testo + Scroll) */
    .hero-bottom {
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        gap: 20px;
        margin-top: auto;
    }

    .hero-right-content {
        position: static;
        text-align: left;
        margin-bottom: 0;
        order: 1;
        /* Testo prima dello scroll */
    }

    .subheadline {
        font-size: 1.3rem;
        margin-bottom: 10px;
        line-height: 1.3;
    }

    .supporting-text {
        font-size: 0.95rem;
        opacity: 0.9;
    }

    /* 4. RIMUOVI I SOCIAL (Per fare spazio) */
    .hero-socials {
        display: none !important;
    }

    /* 5. SCROLL INDICATOR */
    .scroll-indicator {
        position: static;
        margin-top: 0;
        transform: none;
        display: flex;
        align-items: center;
        gap: 8px;
        order: 2;
        /* Scroll sotto il testo */
    }

    .scroll-indicator span {
        font-size: 0.7rem;
        letter-spacing: 1px;


    }

    .scroll-indicator .mouse {
        width: 20px;
        height: 32px;
    }

    /* --- FIX COLORI MOBILE FORZATO --- */
    .accent-text,
    .skill-index,
    .hero-top .accent-text,
    .skill-item .skill-index {
        color: #008080 !important;
        /* Teal */
        opacity: 1 !important;
        visibility: visible !important;
        -webkit-text-fill-color: #008080 !important;
    }
}



/* --- Services Static Page Styles --- */

/* Hero Section - Video Background */
.hero-video-section {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    transform: scale(1.15);
    /* Scale up to hide Veo logo */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    /* 30% black overlay */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: 0 20px;
    color: #fff;
}

.hero-content h1 {
    font-size: 4rem;
    /* Desktop H1 */
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.35rem;
    /* ~21px */
    font-weight: 300;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    letter-spacing: 0.5px;
}

.hero-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: rgba(0, 128, 128, 0.9);
    /* Teal with slight transparency */
    color: #fff;
    padding: 14px 28px;
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.hero-cta-btn:hover {
    background-color: rgba(0, 128, 128, 1);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.hero-cta-btn:hover svg {
    transform: translateY(3px);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 20;
    transition: opacity 0.5s ease;
}

.scroll-indicator span {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
}

.scroll-indicator .mouse {
    width: 26px;
    height: 42px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    position: relative;
}

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

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

    100% {
        transform: translate(-50%, 15px);
        opacity: 0;
    }
}

/* Responsive adjustment for Scroll Indicator */
@media (max-width: 768px) {

    /* Alziamo i social per fare spazio alla freccia */
    .hero-socials {
        position: absolute;
        bottom: 100px;
        /* Li spostiamo più in alto */
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        justify-content: center;
        gap: 30px;
        z-index: 10;
    }

    /* Posizioniamo la freccia in basso al centro */
    .scroll-indicator {
        bottom: 15px;
        /* In basso, ma con margine ridotto */
        left: 50%;
        transform: translateX(-50%);
        opacity: 1;
        transition: opacity 0.3s;
    }

    /* Riduciamo leggermente il testo della freccia per eleganza */
    .scroll-indicator span {
        font-size: 0.6rem;
        margin-bottom: 6px;
        letter-spacing: 2px;
    }

    /* Riduciamo dimensione icona mouse */
    .scroll-indicator .mouse {
        width: 20px;
        height: 32px;
    }

    /* --- FIX CHI SONO (Ripristina layout a colonna) --- */
    .about-grid {
        display: flex !important;
        /* Forza il layout flessibile */
        flex-direction: column !important;
        /* Impila tutto in verticale */
        text-align: center !important;
        /* Centra Avatar e Titolo */
        gap: 30px !important;
        /* Spazio tra foto e testo */
    }

    .about-avatar-container {
        justify-content: center !important;
        width: 100% !important;
    }

    .about-avatar {
        max-width: 350px !important;
        /* Ripristina la dimensione grande */
        width: 100% !important;
        margin: 0 auto !important;
    }

    .about-text {
        text-align: left !important;
        /* Testo allineato a sinistra per leggibilità */
        padding: 0 10px;
    }
}

/* Premium Services Grid & Container Constraint */
/* Premium Services Grid & Container Constraint */
/* Premium Services Grid & Container Constraint */
.premium-services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    max-width: 1180px;
    /* USER REQUEST: Max Width 1180px */
    width: 100%;
    /* Ensure it takes full width up to max */
    margin: 0 auto;
    padding: 0 20px 80px;
    align-items: stretch;
    scroll-margin-top: 120px;
    /* Offset for anchor scroll */
}

.premium-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    min-height: 380px;
}

.premium-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-color);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), 0 0 25px rgba(0, 128, 128, 0.2);
}

.card-number {
    position: absolute;
    top: -15px;
    right: 5px;
    font-size: 6rem;
    font-family: var(--font-heading);
    font-weight: 700;
    color: transparent;
    -webkit-text-stroke: 2px rgba(255, 255, 255, 0.05);
    opacity: 0.4;
    transition: all 0.5s ease;
    z-index: 0;
    pointer-events: none;
}

.premium-card:hover .card-number {
    opacity: 0.6;
    -webkit-text-stroke: 2px var(--accent-color);
    transform: scale(1.05) rotate(-5deg);
}

.card-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
}

.card-content h3 {
    font-size: 1.8rem;
    margin-top: 30px;
    margin-bottom: 15px;
    color: #fff;
}

.card-content p {
    font-size: 1rem;
    line-height: 1.6;
    color: #bbb;
    margin-bottom: 25px;
}

.key-points {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.key-tag {
    background: rgba(255, 255, 255, 0.03);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.8rem;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: 0.3s;
}

.premium-card:hover .key-tag {
    border-color: var(--accent-color);
    background: rgba(0, 128, 128, 0.15);
}

/* CTA Section */
.premium-cta {
    display: block;
    max-width: 1180px !important;
    width: 100%;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-bottom: 100px;
    padding: 0 20px;
}

.premium-cta-content {
    background: linear-gradient(135deg, #111, #000);
    padding: 60px 40px;
    border-radius: 30px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.premium-cta-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 150%, rgba(0, 128, 128, 0.3), transparent 70%);
    pointer-events: none;
}

.premium-cta-content h2 {
    font-size: 2.4rem;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.premium-cta-content p {
    position: relative;
    z-index: 1;
    font-size: 1.1rem;
}

.glowing-btn {
    background: var(--accent-color);
    color: white;
    padding: 15px 35px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    box-shadow: 0 0 20px var(--accent-glow);
    transition: all 0.3s;
    display: inline-block;
    margin-top: 25px;
    position: relative;
    z-index: 1;
}

.glowing-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 40px var(--accent-glow);
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease-out;
}

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

/* Responsive Adjusments */
@media (max-width: 1024px) {
    .premium-services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
        /* Smaller H1 for mobile */
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .premium-services-grid {
        grid-template-columns: 1fr;
        padding-bottom: 60px;
    }

    .premium-card {
        padding: 25px;
        min-height: auto;
    }

    .card-number {
        font-size: 5rem;
    }

    .premium-cta-content {
        padding: 50px 20px;
    }

    .premium-cta-content h2 {
        font-size: 1.8rem;
    }
}

/* --- Glassmorphism Contact Page Redesign --- */

.contact-fullscreen {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 100px 20px;
    /* Space for navbar */
}

/* Background Video */
.contact-bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.contact-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    /* 50% opacity black overlay */
    z-index: 1;
}

/* Glass Panel */
.glass-panel {
    position: relative;
    z-index: 2;
    background: rgba(20, 20, 20, 0.6);
    /* Dark semi-transparent bg */
    backdrop-filter: blur(15px);
    /* Frost effect */
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 128, 128, 0.2);
    /* Subtle colored border */
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 550px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 128, 128, 0.1);
    animation: fadeInScale 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.glass-panel h2 {
    color: #fff;
    text-align: center;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 30px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Glass Inputs */
.glass-input-group {
    margin-bottom: 20px;
}

.glass-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    /* Darker input bg */
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 16px 20px;
    color: #fff;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.glass-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.glass-input:focus {
    outline: none;
    border-color: var(--accent-color);
    /* Teal border on focus */
    box-shadow: 0 0 15px rgba(0, 128, 128, 0.3);
    background: rgba(0, 0, 0, 0.7);
}

/* Custom Privacy Checkbox */
.glass-checkbox-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
    margin-top: 10px;
}

.glass-checkbox-group input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
    flex-shrink: 0;
}

.glass-checkbox-group input[type="checkbox"]:checked {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.glass-checkbox-group input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 14px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
}

.glass-checkbox-group label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    cursor: pointer;
}

.glass-checkbox-group a {
    color: var(--accent-color);
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 128, 128, 0.5);
    transition: 0.3s;
}

.glass-checkbox-group a:hover {
    border-color: var(--accent-color);
    text-shadow: 0 0 10px var(--accent-glow);
}

/* Full Width Button */
.teal-btn-full {
    width: 100%;
    background: var(--accent-color);
    color: #fff;
    border: none;
    padding: 18px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
    box-shadow: 0 5px 20px rgba(0, 128, 128, 0.4);
}

.teal-btn-full:hover {
    background: #009999;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 128, 128, 0.6);
}

.teal-btn-full svg {
    transition: transform 0.3s;
}

.teal-btn-full:hover svg {
    transform: translate(3px, -3px);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .glass-panel {
        padding: 30px 20px;
        border-radius: 25px 25px 0 0;
        /* Sheet-like on mobile if aligned bottom, but centered is usually safer */
        margin: 0 15px;
    }

    .contact-fullscreen {
        padding: 120px 0 40px;
        align-items: flex-start;
        /* Move up on mobile */
    }

    .glass-panel h2 {
        font-size: 1.8rem;
    }
}

/* --- Process Section "Il Mio Processo" --- */
.process-section {
    background-color: #000000;
    padding: 120px 5%;
}

.process-section .section-title {
    margin-bottom: 80px;
    font-size: 3.5rem;
    letter-spacing: 2px;
}

.white-text {
    color: #ffffff;
}

/* Grid Layout */
.process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 80px;
}

/* Card Styling */
.process-card {
    background: transparent;
    border: 1px solid var(--accent-color);
    border-radius: 12px;
    padding: 35px 25px;
    position: relative;
    transition: all 0.4s ease;
    box-shadow: 0 0 10px rgba(0, 128, 128, 0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.process-card:hover {
    box-shadow: 0 0 20px rgba(0, 128, 128, 0.4), inset 0 0 10px rgba(0, 128, 128, 0.1);
    transform: translateY(-5px);
}

/* Header & Icon */
.process-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
}

.process-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    max-width: 80%;
}

.process-icon {
    color: var(--accent-color);
    filter: drop-shadow(0 0 8px rgba(0, 128, 128, 0.6));
    transition: transform 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.process-card:hover .process-icon {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 0 12px rgba(0, 128, 128, 0.9));
}

/* List Styling */
.process-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.process-card ul li {
    color: #e0e0e0;
    font-family: var(--font-body);
    font-size: 1rem;
    /* ~16px */
    line-height: 1.6;
    margin-bottom: 12px;
    font-weight: 300;
}

.process-card ul li:last-child {
    margin-bottom: 0;
}

/* CTA Button */
.process-cta-container {
    text-align: center;
    margin-top: 20px;
}

.process-btn {
    display: inline-block;
    padding: 16px 40px;
    border: 1px solid var(--accent-color);
    color: #ffffff;
    text-transform: uppercase;
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: 1.5px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    background: transparent;
}

.process-btn:hover {
    background-color: rgba(0, 128, 128, 0.1);
    box-shadow: 0 0 20px rgba(0, 128, 128, 0.4);
    letter-spacing: 2px;
}

/* Footer Logo Adjustment */
.footer-logo img {
    width: 85px;
    height: auto;
}

/* Responsive */
@media (max-width: 1024px) {
    .process-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .process-grid {
        grid-template-columns: 1fr;
    }

    .process-section {
        padding: 80px 5%;
    }

    .process-section .section-title {
        font-size: 2.5rem;
    }
}

/* --- 404 Page Styles --- */
.page-404 {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #000000;
    padding: 20px;
    text-align: center;
    overflow: hidden;
    /* Prevent scroll on 404 */
}

.container-404 {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 600px;
    width: 100%;
}

.avatar-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    /* Align bottom to control overlap */
    margin-bottom: -50px;
    /* Extreme negative margin to pull title up */
    width: 100%;
}

.spotlight-404 {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 128, 128, 0.4) 0%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
    animation: pulseGlow 4s infinite ease-in-out;
}

.floating-avatar {
    max-width: 600px;
    width: 100%;
    height: auto;
    margin-bottom: 0;
    /* Handled by wrapper */
    animation: float 4s ease-in-out infinite;
    /* Optional drop shadow for depth */
    filter: drop-shadow(0 10px 20px rgba(0, 128, 128, 0.2));
    position: relative;
    z-index: 1;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

.title-404 {
    font-size: 5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 5px;
    line-height: 1;
    position: relative;
    top: -40px;
    /* Further pull up if needed */
    z-index: 2;
}

.text-404 {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 300;
    margin-bottom: 40px;
    line-height: 1.6;
}

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

/* Reuse specific button adjustments if needed */
.buttons-404 .btn {
    min-width: 180px;
    text-align: center;
}

/* Responsive 404 */
@media (max-width: 768px) {
    .title-404 {
        font-size: 3rem;
    }

    .floating-avatar {
        max-width: 300px;
    }

    .buttons-404 {
        flex-direction: column;
        width: 100%;
    }

    .buttons-404 .btn {
        width: 100%;
    }

    /* Mobile Footer Optimization */
    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .footer-links {
        display: flex;
        flex-direction: column;
        gap: 15px;
        margin: 10px 0;
    }

    .footer-links a {
        margin: 0;
        /* Reset horizontal margin */
        font-size: 1.1rem;
        /* Slightly bigger touch target */
    }

    /* Reduce Hero H1 on Mobile */
    .hero-content h1 {
        font-size: 2rem !important;
        /* Force smaller size */
    }


}

/* --- Refined Iubenda Visual Fix --- */
#iubenda-cs-banner {
    bottom: 0px !important;
    left: 0px !important;
    position: fixed !important;
    width: 100% !important;
    min-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 99999998 !important;
    background-color: #1a1a1a !important;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5) !important;
    border: none !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
}

/* Ensure inner content containers are full width and dark */
.iubenda-cs-content,
.iubenda-cs-rationale,
.iubenda-cs-banner-content {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
}

#iubenda-cs-paragraph {
    background-color: #1a1a1a !important;
}

/* Specific fix for the links and text to ensure visibility */
#iubenda-cs-banner a {
    color: #fff !important;
    text-decoration: underline;
}

#iubenda-cs-banner .iubenda-cs-opt-group-consent label {
    color: #fff !important;
}

#iubenda-cs-banner .iubenda-cs-icon-box {
    background-color: #1a1a1a !important;
}

/* Ensure Desktop Layout on Resize */
@media (min-width: 1024px) {
    .navbar {
        padding: 20px 20px;
    }

    .nav-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .nav-links {
        display: flex !important;
        flex-direction: row !important;
        position: static !important;
        width: auto !important;
        height: auto !important;
        background: transparent !important;
        backdrop-filter: none !important;
        gap: 30px;
        transform: none !important;
    }

    .nav-links.active {
        display: flex !important;
    }

    .nav-links a {
        margin: 0;
        font-size: 14px;
    }

    .mobile-menu-btn {
        display: none !important;
    }
}

/* --- DESKTOP LAYOUT FIX (Incolla alla fine del file CSS) --- */
/* --- DESKTOP FIX (Min-Width 769px) --- */
@media (min-width: 769px) {

    /* 1. CONTENITORE CENTRALE (La "Gabbia" 1180px) */
    .hero-container {
        position: relative;
        /* Riferimento per gli elementi assoluti */
        height: 100vh;
        /* Occupa tutto lo schermo */
        display: block;
        /* Rimuove il flex del mobile */
        max-width: 1180px;
        /* Larghezza massima come la Navbar */
        margin: 0 auto;
        /* Centra il contenitore nella pagina */
        padding: 0 20px;
        /* Allinea visivamente col padding della navbar */
    }

    /* 2. RENDI "INVISIBILI" I CONTENITORI MOBILI */
    /* Annulliamo le scatole strutturali del mobile per muoverci liberamente */
    .hero-left,
    .hero-bottom {
        position: static;
        width: 100%;
        height: 100%;
        display: block;
        margin: 0;
        padding: 0;
    }

    /* 3. BLOCCO SINISTRA: Titolo, Benvenuti, Skills */
    .hero-top {
        position: absolute;
        top: 50%;
        /* Centro verticale */
        left: 20px;
        /* Allineato al bordo sinistro del contenitore 1180px */
        transform: translateY(-50%);
        /* Centratura precisa */
        width: 45%;
        /* Occupa la metà sinistra */
        text-align: left;
        z-index: 10;
    }

    .hero-title {
        font-size: 5rem;
        /* Font grande desktop */
        line-height: 0.95;
        margin-bottom: 30px;
    }

    /* 4. BLOCCO DESTRA: Subheadline, Supporting Text */
    .hero-right-content {
        position: absolute;
        top: 50%;
        /* Centro verticale (stessa altezza del titolo) */
        right: 20px;
        /* Allineato al bordo destro del contenitore 1180px */
        transform: translateY(-50%);
        /* Centratura precisa */
        width: 40%;
        /* Occupa la metà destra (leggermente meno per estetica) */
        max-width: 450px;
        text-align: right;
        /* Testo allineato a destra */
        z-index: 10;
        margin: 0;
    }

    .subheadline {
        font-size: 2.2rem;
        line-height: 1.2;
    }

    /* 5. SKILLS ORIZZONTALI */
    .skill-indicators {
        display: flex;
        flex-direction: row;
        /* Orizzontale invece che griglia */
        gap: 40px;
        margin-top: 30px;
    }

    .skill-item {
        align-items: flex-start;
    }

    /* 6. RIPRISTINO COLORI (Se persi su Desktop) */
    .accent-text,
    .skill-index {
        color: var(--accent-color) !important;
        /* Forza il Teal #008080 */
    }

    /* 7. ELEMENTI IN BASSO (Social e Scroll) */
    .hero-socials {
        display: flex !important;
        position: absolute;
        bottom: 40px;
        left: 20px;
        /* Allineato col titolo */
        gap: 20px;
        z-index: 10;
    }

    .scroll-indicator {
        position: absolute;
        bottom: 30px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 10;
        display: flex !important;
    }
}

/* --- HERO SERVIZI (Specifico per .hero-video-section) --- */

/* 1. SETUP GENERALE (Mobile e Desktop) */
.hero-video-section {
    position: relative;
    height: 100vh;
    /* Altezza schermo intero */
    width: 100%;
    overflow: hidden;
    display: flex;
    /* Flexbox per centrare tutto */
    align-items: center;
    /* Centra Verticalmente */
    justify-content: center;
    /* Centra Orizzontalmente */
    padding: 0 20px;
    /* Margini laterali */
    box-sizing: border-box;
}

/* 2. VIDEO DI SFONDO */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Copre tutto senza deformare */
    z-index: 0;
}

/* 3. OVERLAY SCURO (Per leggere il testo) */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    /* Nero al 50% */
    z-index: 1;
}

/* 4. CONTENUTO CENTRALE */
.hero-content {
    position: relative;
    z-index: 2;
    /* Sopra video e overlay */
    text-align: center;
    /* Testo centrato */
    max-width: 900px;
    /* Larghezza massima lettura */
    width: 100%;
    margin-top: 60px;
    /* Compensa visivamente la navbar */
}

.hero-content h1 {
    color: #ffffff;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero-content p {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
    line-height: 1.6;
    margin-bottom: 40px;
    margin-left: auto;
    margin-right: auto;
    max-width: 600px;
    /* Stringe il paragrafo per eleganza */
}

/* --- REGOLE SPECIFICHE MOBILE (Sotto 768px) --- */
@media (max-width: 768px) {
    .hero-video-section {
        padding-top: 80px;
        /* Spazio per non finire sotto la navbar */
    }

    .hero-content h1 {
        font-size: 2.5rem;
        /* Titolo più piccolo su mobile */
    }

    .hero-content p {
        font-size: 1rem;
        padding: 0 10px;
    }

    /* Bottone CTA Mobile */
    .hero-cta-btn {
        width: 100%;
        /* Bottone largo su mobile */
        justify-content: center;
    }
}

/* --- REGOLE SPECIFICHE DESKTOP (Sopra 769px) --- */
@media (min-width: 769px) {
    .hero-content h1 {
        font-size: 4.5rem;
        /* Titolo impattante su desktop */
    }

    .hero-content p {
        font-size: 1.3rem;
    }
}