/* ============================================
   VARIABILI COLORI E FONT - VERSIONE ELEGANTE
   ============================================ */
:root {
    /* COLORI BRAND */
    --brand-terracotta: #C06045;
    --brand-beige: #F2EEDF;

    /* PALETTE RAFFINATA */
    --primary-dark: #2A2420;
    /* Marrone quasi nero */
    --primary-terracotta: #C06045;
    /* Terracotta brand */
    --terracotta-dark: #A14D34;
    /* Terracotta scuro (hover) */
    --terracotta-light: #D07B61;
    /* Terracotta chiaro */

    /* NEUTRI SOFISTICATI */
    --bg-primary: #FAFAF7;
    /* Bianco sporco elegante */
    --bg-secondary: #F2EEDF;
    /* Beige brand (Panna) */

    /* MODIFICA: Panna più scuro per fine sfumatura (Contrasto migliore) */
    --bg-darker: #DCD5C5;
    /* <--- Scurito per far risaltare il bianco */

    --bg-card: #FFFFFF;
    /* Bianco puro per card */

    /* TESTI */
    --text-primary: #2A2420;
    /* Nero caldo */
    --text-secondary: #5C5654;
    /* Grigio scuro */
    --text-muted: #8B8481;
    /* Grigio medio */

    /* BORDI E DIVISORI */
    --border-subtle: #E8E4DB;
    --border-medium: #D9D3CA;

    /* OMBRE */
    --shadow-xs: 0 1px 2px rgba(42, 36, 32, 0.06);
    --shadow-sm: 0 2px 8px rgba(42, 36, 32, 0.08);
    --shadow-md: 0 4px 16px rgba(42, 36, 32, 0.1);
    --shadow-lg: 0 8px 32px rgba(42, 36, 32, 0.12);
    --shadow-xl: 0 16px 48px rgba(42, 36, 32, 0.15);

    /* ACCENTI SECONDARI */
    --success-green: #7A9B76;
    --warm-gold: #D4AF85;

    /* FONT */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;

    /* TRANSIZIONI */
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

/* ============================================
   TIPOGRAFIA
   ============================================ */
h1,
h2,
h3 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.2;
    color: var(--primary-dark);
    letter-spacing: -0.02em;
}

h1 {
    font-size: 3.5rem;
    font-weight: 500;
}

h2 {
    font-size: 2.8rem;
    font-weight: 400;
}

h3 {
    font-size: 2rem;
    font-weight: 500;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

strong {
    font-weight: 700;
    color: var(--text-primary);
}

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

/* Focus visibile per accessibilità */
a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--primary-terracotta);
    outline-offset: 4px;
    border-radius: 2px;
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.75rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    background: rgba(250, 250, 247, 0.97);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    transition: all var(--transition-normal);
}

.logo {
    font-size: 1.9rem;
    font-weight: 600;
    letter-spacing: 4px;
    font-family: var(--font-heading);
    transition: all var(--transition-normal);
    display: inline-block;
    color: var(--primary-dark);
}

.logo:hover {
    color: var(--primary-terracotta);
    transform: translateY(-2px);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 500;
    position: relative;
    color: var(--text-secondary);
    transition: color var(--transition-normal);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary-terracotta);
    transition: width var(--transition-normal);
}

.nav-links a:hover {
    color: var(--primary-dark);
}

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

/* Stile Bottone Contatti nel Menu */
.btn-nav {
    padding: 0.65rem 1.75rem;
    border: 1.5px solid var(--primary-dark);
    border-radius: 30px;
    background: transparent;
    transition: all var(--transition-normal);
    color: var(--primary-dark);
}

.btn-nav::after {
    display: none;
}

/* FIX: Hover diventa scuro con testo BIANCO */
.btn-nav:hover {
    background: var(--primary-dark);
    color: #FFFFFF !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0.5rem;
}

.bar {
    display: block;
    width: 26px;
    height: 2px;
    margin: 6px auto;
    background-color: var(--primary-dark);
    transition: all var(--transition-normal);
}

/* ============================================
   MENU LINGUE (Nuovo)
   ============================================ */
.lang-item {
    position: relative;
    margin-left: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-dark);
}

.current-lang {
    padding: 10px;
    display: block;
    transition: color var(--transition-normal);
}

.lang-item:hover .current-lang {
    color: var(--primary-terracotta);
}

/* Dropdown nascosto di default */
.lang-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    min-width: 60px;
    box-shadow: var(--shadow-md);
    border-radius: 8px;
    padding: 5px 0;
    list-style: none;
    z-index: 1000;
    border: 1px solid var(--border-subtle);
    flex-direction: column;
    /* Forza verticale */
    gap: 0;
    /* Reset gap del genitore */
}

/* Mostra dropdown al passaggio del mouse */
.lang-item:hover .lang-dropdown {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.lang-dropdown li {
    margin: 0;
    padding: 0;
    width: 100%;
    text-align: center;
}

.lang-dropdown a {
    display: block;
    padding: 8px 15px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.lang-dropdown a:hover {
    background-color: var(--bg-secondary);
    color: var(--primary-terracotta);
}

.lang-dropdown a.active {
    color: var(--primary-terracotta);
    font-weight: 700;
}

/* Modifiche per Mobile */
@media (max-width: 768px) {
    .lang-item {
        margin-left: 0;
        margin-top: 1rem;
        border-top: 1px solid var(--border-subtle);
        width: 100%;
        padding-top: 1rem;
    }

    .lang-dropdown {
        position: static;
        display: flex;
        /* Sempre visibile su mobile o gestito diversamente */
        flex-direction: row;
        justify-content: center;
        transform: none;
        box-shadow: none;
        border: none;
        background: transparent;
        gap: 15px;
        margin-top: 10px;
    }

    .current-lang {
        display: none;
        /* Nascondi "IT" su mobile, mostra direttamente le opzioni */
    }

    .lang-dropdown a {
        padding: 5px 10px;
        border: 1px solid var(--border-medium);
        border-radius: 4px;
    }
}

/* ============================================
   HERO SECTION - GRADIENTE MIGLIORATO
   ============================================ */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 160px 5% 80px 5%;
    gap: 5rem;
    /* Gradiente che parte dal Panna e scurisce verso il fondo */
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-darker) 100%);
}

.hero-content {
    flex: 1;
    z-index: 2;
    max-width: 600px;
}

.hero-content h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--primary-dark);
    font-weight: 500;
}

.hero-content .subtitle {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 2.5rem;
    line-height: 1.8;
    font-weight: 300;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    max-height: 70vh;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(42, 36, 32, 0.15));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

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

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

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
    display: inline-block;
    padding: 18px 42px;
    background-color: var(--primary-terracotta);
    color: var(--bg-card);
    border-radius: 50px;
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 2px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    background-color: var(--terracotta-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    display: inline-block;
    padding: 18px 42px;
    background-color: transparent;
    color: var(--primary-dark);
    border: 2px solid var(--primary-dark);
    border-radius: 50px;
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 2px;
    transition: all var(--transition-normal);
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: var(--primary-dark);
    color: var(--bg-card);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* ============================================
   EDITORIAL SECTION
   ============================================ */
.editorial-section {
    padding: 140px 5%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
    background: var(--bg-card);
}

.editorial-img {
    height: auto;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    overflow: visible;
    border-radius: 0;
    background: transparent;
    transition: transform var(--transition-slow);
}

.editorial-img:hover {
    transform: translateY(-8px);
}

.editorial-img img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform var(--transition-slow);
}

.editorial-img:hover img {
    transform: scale(1.05);
}

.editorial-text {
    padding: 0 2rem;
}

.editorial-text h2 {
    font-size: 3.2rem;
    margin: 1rem 0 2rem 0;
    line-height: 1.15;
    color: var(--primary-dark);
}

.editorial-text .overline {
    display: inline-block;
    text-transform: uppercase;
    color: var(--primary-terracotta);
    font-size: 0.8rem;
    letter-spacing: 3px;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.editorial-text p {
    font-size: 1.1rem;
    line-height: 1.9;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: var(--primary-dark);
    font-weight: 600;
    border-bottom: 2px solid var(--primary-terracotta);
    padding-bottom: 2px;
    transition: all var(--transition-normal);
}

.text-link:hover {
    color: var(--primary-terracotta);
    gap: 0.75rem;
}

/* ============================================
   FEATURES SECTION - GRADIENTE MIGLIORATO
   ============================================ */
.features-section {
    padding: 140px 5%;
    /* Gradiente verticale dal Panna al Sabbia scuro */
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-darker) 100%);
}

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

.section-header .overline {
    display: inline-block;
    text-transform: uppercase;
    color: var(--primary-terracotta);
    font-size: 0.8rem;
    letter-spacing: 3px;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-header h2 {
    font-size: 3.2rem;
    margin-bottom: 1.5rem;
    color: var(--primary-dark);
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.8;
    font-weight: 300;
}

.features-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 80px;
}

.feature-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5rem;
    background: var(--bg-card);
    padding: 4rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-slow);
    border: 1px solid var(--border-subtle);
}

.feature-row:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--border-medium);
}

.feature-row.reverse {
    flex-direction: row-reverse;
}

.feature-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.feature-image img {
    width: 100%;
    max-width: 480px;
    height: auto;
    filter: drop-shadow(0 10px 30px rgba(42, 36, 32, 0.1));
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}


/* Questa regola assicura che lo zoom avvenga quando passi il mouse su tutta la riga */
.feature-row:hover .feature-image img {
    transform: scale(1.08); /* Uno zoom leggermente più visibile */
}

.feature-image img.round-feature {
    max-width: 380px;
    border-radius: 50%;
}

.feature-text {
    flex: 1;
    padding: 0 1.5rem;
}

.feature-number {
    font-size: 4rem;
    font-weight: 300;
    color: var(--terracotta-light);
    font-family: var(--font-heading);
    margin-bottom: 0.5rem;
    opacity: 0.5;
    line-height: 1;
}

.feature-text h3 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: var(--primary-dark);
}

.divider {
    width: 70px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-terracotta), var(--terracotta-light));
    margin-bottom: 1.5rem;
}

.feature-benefit {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--success-green);
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================
   TECH SECTION
   ============================================ */
.tech-section {
    padding: 140px 5%;
    background: var(--bg-card);
}

.tech-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 6rem;
    align-items: flex-start;
}

.tech-info {
    flex: 1;
}

.tech-info h2 {
    margin-bottom: 1rem;
    color: var(--primary-dark);
    font-size: 3rem;
}

.tech-intro {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-weight: 300;
}

.specs-list {
    list-style: none;
    margin-bottom: 3rem;
}

.specs-list li {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    transition: padding-left var(--transition-normal);
}

.specs-list li:hover {
    padding-left: 0.5rem;
}

.specs-list li:last-child {
    border-bottom: none;
}

.specs-list li strong {
    color: var(--primary-dark);
    font-weight: 600;
}

.tech-extras {
    display: flex;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.extra-item {
    text-align: center;
    cursor: pointer;
    transition: transform var(--transition-normal);
}

.extra-item:hover {
    transform: translateY(-8px);
}

/* CERCHI GRANDI 200PX */
.extra-item img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 2px solid var(--border-medium);
    padding: 12px;
    background: var(--bg-primary);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    object-fit: cover;
}

.extra-item:hover img {
    transform: scale(1.1);
    border-color: var(--primary-terracotta);
    box-shadow: 0 8px 24px rgba(192, 96, 69, 0.25);
}

.extra-item span {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    margin-top: 0.75rem;
}

.tech-drawing {
    flex: 1;
    text-align: center;
}

.tech-drawing img {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 30px rgba(42, 36, 32, 0.1));
    border-radius: 8px;
}

.tech-caption {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
    padding: 120px 5%;
    background: linear-gradient(135deg, var(--terracotta-dark) 0%, var(--primary-terracotta) 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.3;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.15;
    }
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.cta-content h2 {
    font-size: 3.5rem;
    color: var(--bg-card);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.cta-content p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 3rem;
    font-weight: 300;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* FIX: Bottone WhatsApp (Scrivici) */
.cta-buttons .btn-primary {
    background: var(--bg-card);
    color: var(--primary-terracotta);
}

/* FIX: Hover diventa Terracotta con testo BIANCO */
.cta-buttons .btn-primary:hover {
    background: var(--primary-terracotta);
    color: #FFFFFF !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cta-buttons .btn-secondary {
    border-color: var(--bg-card);
    color: var(--bg-card);
    border-width: 2px;
}

.cta-buttons .btn-secondary:hover {
    background: var(--bg-card);
    color: var(--primary-terracotta);
}

/* ============================================
   FOOTER (NUOVO LAYOUT 3 COLONNE)
   ============================================ */
footer {
    padding: 4rem 5% 2rem 5%;
    background: var(--primary-dark);
    color: var(--bg-secondary);
    border-top: 4px solid var(--primary-terracotta);
    /* Dettaglio estetico */
}

.footer-content {
    display: grid;
    /* 3 Colonne: Brand largo 1.2, le altre 1 */
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto 3rem auto;
    text-align: left;
}

/* --- STILE COLONNE --- */
.footer-col h3 {
    margin-bottom: 1rem;
    font-size: 1.8rem;
    color: var(--bg-card);
    letter-spacing: 3px;
}

.footer-col h4 {
    color: var(--primary-terracotta);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

/* Brand Text */
.brand-col p {
    color: var(--bg-secondary);
    opacity: 0.9;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.brand-col strong {
    color: #fff;
    /* Bianco puro per il nome azienda */
}

/* --- MENU CENTRALE --- */
.footer-menu {
    list-style: none;
    padding: 0;
}

.footer-menu li {
    margin-bottom: 0.8rem;
}

.footer-menu a {
    color: var(--bg-secondary);
    text-decoration: none;
    transition: all var(--transition-normal);
    font-size: 0.95rem;
    display: inline-block;
}

.footer-menu a:hover {
    color: var(--primary-terracotta);
    transform: translateX(5px);
    /* Effetto scivolamento a destra */
}

/* --- COPYRIGHT --- */
.copyright {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 2rem;
    opacity: 0.6;
}

/* ============================================
   RESPONSIVE (MOBILE) - BLOCCO UNICO
   ============================================ */
@media (max-width: 768px) {

    /* --- NASCONDI MOUSE SCROLL --- */
    .scroll-indicator {
        display: none !important;
        /* !important forza la regola se c'è conflitto */
    }

    /* --- FOOTER MOBILE --- */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .footer-menu a:hover,
    .contact-links-vertical a:hover {
        transform: none;
    }

    .contact-links-vertical {
        align-items: center;
    }

    .contact-links-vertical a {
        justify-content: center;
    }

    /* --- COOKIE BANNER MOBILE --- */
    .cookie-banner {
        bottom: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 16px 16px 0 0;
        padding: 1.5rem;
        transform: translateY(100%);
    }

    .cookie-banner.show {
        transform: translateY(0);
    }

    .cookie-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .cookie-buttons {
        width: 100%;
    }

    .cookie-buttons .btn-sm {
        width: 100%;
        text-align: center;
    }

    /* --- MENU MOBILE (HAMBURGER) --- */
    .hamburger {
        display: block;
    }

    .nav-links {
        position: fixed;
        left: -100%;
        top: 85px;
        flex-direction: column;
        background-color: var(--bg-card);
        width: 100%;
        text-align: center;
        transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: var(--shadow-lg);
        padding: 2.5rem 0;
        gap: 2rem;
        border-top: 1px solid var(--border-subtle);
    }

    .nav-links.active {
        left: 0;
    }

    /* --- HERO SECTION MOBILE --- */
    .hero-section {
        flex-direction: column-reverse;
        padding-top: 140px;
        gap: 2.5rem;
        text-align: center;
    }

    /* --- REGOLE GENERICHE --- */
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Nascondi il link "Torna al sito" nella navbar mobile per fare spazio */
    .navbar-divider {
        display: none;
    }

    /* Adattamenti pagine legali */
    .page-header {
        padding-top: 120px;
        padding-bottom: 40px;
    }

    .page-header h1 {
        font-size: 2.2rem;
    }

    .legal-container {
        padding: 2.5rem 1.5rem;
    }
}

.footer-menu a:hover,
.contact-links-vertical a:hover {
    transform: none;
    /* Rimuove lo scivolamento su touch */
}

.contact-links-vertical {
    align-items: center;
    /* Centra le icone e il testo */
}

.contact-links-vertical a {
    justify-content: center;
}


/* ============================================
   SCROLL TO TOP & LIGHTBOX
   ============================================ */
.scroll-to-top {
    position: fixed;
    bottom: 35px;
    right: 35px;
    width: 54px;
    height: 54px;
    background-color: var(--primary-terracotta);
    color: var(--bg-card);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-normal);
    z-index: 999;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background-color: var(--terracotta-dark);
    transform: translateY(-6px) scale(1.05);
}

.scroll-to-top:active {
    transform: translateY(-3px) scale(1);
}

.scroll-to-top svg {
    width: 24px;
    height: 24px;
}

.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(42, 36, 32, 0.95);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
    animation: zoomIn 0.3s ease;
}

.lightbox.active .lightbox-content::before {
    content: '';
    display: block;
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--primary-terracotta);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.lightbox-content img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
    position: relative;
    z-index: 2;
    box-shadow: var(--shadow-xl);
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    color: white;
    font-size: 42px;
    font-weight: 300;
    cursor: pointer;
    transition: all var(--transition-normal);
    background: transparent;
    border: none;
    padding: 0;
    line-height: 1;
    z-index: 3;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    color: var(--primary-terracotta);
    transform: rotate(90deg) scale(1.1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

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

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.clickable-image {
    cursor: pointer;
    transition: opacity var(--transition-normal);
}

.clickable-image:hover {
    opacity: 0.9;
}

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

.delay-300 {
    transition-delay: 0.3s;
}

/* ============================================
   CUSTOM SCROLLBAR (Solo per browser WebKit - Chrome, Edge, Safari)
   ============================================ */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    /* Sfondo della barra (Panna) */
}

::-webkit-scrollbar-thumb {
    background-color: var(--primary-terracotta);
    /* La barra che si muove */
    border-radius: 6px;
    border: 3px solid var(--bg-secondary);
    /* Crea un effetto "galleggiante" */
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--terracotta-dark);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2.5rem;
    }

    .hero-section {
        padding: 140px 5% 80px 5%;
        gap: 3rem;
    }

    .hero-content h1 {
        font-size: 3.5rem;
    }

    .editorial-section,
    .features-section,
    .tech-section {
        padding: 100px 5%;
    }

    .feature-row {
        gap: 3rem;
        padding: 3rem;
    }

    .tech-container {
        gap: 4rem;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-links {
        position: fixed;
        left: -100%;
        top: 85px;
        flex-direction: column;
        background-color: var(--bg-card);
        width: 100%;
        text-align: center;
        transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: var(--shadow-lg);
        padding: 2.5rem 0;
        gap: 2rem;
        border-top: 1px solid var(--border-subtle);
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links li {
        margin: 0;
    }

    .nav-links li a {
        font-size: 1rem;
    }

    .btn-nav {
        padding: 0.65rem 2rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2.2rem;
    }

    h3 {
        font-size: 1.6rem;
    }

    .hero-section {
        flex-direction: column-reverse;
        padding-top: 140px;
        gap: 2.5rem;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-image img {
        max-height: 50vh;
    }

    .editorial-section,
    .features-section,
    .tech-section,
    .cta-section {
        padding: 80px 5%;
    }

    .editorial-section {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .editorial-text {
        padding: 0;
        text-align: center;
    }

    .features-container {
        gap: 60px;
    }

    .feature-row,
    .feature-row.reverse {
        flex-direction: column;
        text-align: center;
        gap: 2.5rem;
        padding: 2.5rem 2rem;
    }

    .feature-text {
        padding: 0;
    }

    .divider {
        margin: 0 auto 1.5rem auto;
    }

    .tech-container {
        flex-direction: column;
        gap: 3rem;
    }

    .tech-info h2 {
        font-size: 2.2rem;
        text-align: center;
    }

    .tech-intro {
        text-align: center;
    }

    .tech-extras {
        justify-content: center;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .cta-buttons .btn-primary,
    .cta-buttons .btn-secondary {
        width: 100%;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 2.5rem;
    }

    .contact-links {
        flex-direction: column;
        gap: 1rem;
    }

    .footer-projects {
        flex-direction: column;
        gap: 1rem;
    }

    .projects-buttons {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
        max-width: 280px;
    }

    .btn-project {
        width: 100%;
        text-align: center;
    }

    .lightbox-close {
        top: 15px;
        right: 15px;
        font-size: 36px;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 1.5rem 5%;
    }

    .logo {
        font-size: 1.6rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .btn-primary,
    .btn-secondary {
        padding: 16px 32px;
        font-size: 0.8rem;
    }

    .feature-row {
        padding: 2rem 1.5rem;
    }

    .feature-number {
        font-size: 2.5rem;
    }

    .tech-extras {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }
}

/* ============================================
   WHATSAPP FLOATING BUTTON
   ============================================ */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    /* A sinistra per non coprire il "Torna su" a destra */
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.whatsapp-float img,
.whatsapp-float svg {
    width: 35px;
    height: 35px;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Animazione pulsante per attirare l'attenzione */
.whatsapp-float {
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* ============================================
   SCROLL INDICATOR (HERO)
   ============================================ */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.7;
    cursor: pointer;
    /* <--- IMPORTANTE: Fa apparire la manina */
    transition: opacity 0.3s ease, transform 0.3s ease;
    /* Animazione fluida */
}

/* Effetto quando passi sopra col mouse */
.scroll-indicator:hover {
    opacity: 1;
    transform: translateX(-50%) translateY(5px);
    /* Si muove leggermente */
}

/* Mouse Icon */
.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--primary-dark);
    border-radius: 20px;
    position: relative;
    margin-bottom: 10px;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--primary-terracotta);
    border-radius: 2px;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll-wheel 1.5s infinite;
}

@keyframes scroll-wheel {
    0% {
        opacity: 1;
        top: 10px;
    }

    100% {
        opacity: 0;
        top: 30px;
    }
}

/* Frecce (Opzionale, se vuoi solo il mouse togli questo pezzo) */
.arrow-scroll span {
    display: block;
    width: 10px;
    height: 10px;
    border-bottom: 2px solid var(--primary-dark);
    border-right: 2px solid var(--primary-dark);
    transform: rotate(45deg);
    margin: -5px auto;
    animation: scroll-arrow 2s infinite;
}

.arrow-scroll span:nth-child(2) {
    animation-delay: -0.2s;
}

.arrow-scroll span:nth-child(3) {
    animation-delay: -0.4s;
}

@keyframes scroll-arrow {
    0% {
        opacity: 0;
        transform: rotate(45deg) translate(-5px, -5px);
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: rotate(45deg) translate(5px, 5px);
    }
}

/* Nascondi su schermi molto piccoli se dà fastidio */
@media (max-height: 600px) {
    .scroll-indicator {
        display: none;
    }
}

/* ============================================
   PAGINE LEGALI (Privacy Policy)
   ============================================ */
.legal-section {
    padding: 160px 5% 80px 5%;
    /* Padding alto per compensare la navbar fissa */
    background-color: var(--bg-primary);
    min-height: 80vh;
}

.legal-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.legal-section h1 {
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.last-updated {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 1rem;
}

.legal-content h2 {
    font-size: 1.5rem;
    color: var(--primary-terracotta);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-family: var(--font-body);
    /* Più leggibile per testi legali */
    font-weight: 700;
}

.legal-content p,
.legal-content ul {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
}

.legal-content ul {
    padding-left: 1.5rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
}

.legal-content a {
    color: var(--primary-terracotta);
    text-decoration: underline;
}

.legal-content a:hover {
    color: var(--primary-dark);
}

/* Mobile */
@media (max-width: 768px) {
    .legal-container {
        padding: 1.5rem;
    }

    .legal-section {
        padding-top: 120px;
    }
}

/* ============================================
   PAGINE LEGALI (Stile Premium)
   ============================================ */
.legal-page {
    background-color: var(--bg-primary);
}

/* --- Header di Pagina (Fascia scura) --- */
.page-header {
    background-color: var(--primary-dark);
    padding: 140px 5% 60px 5%;
    /* Padding alto per la navbar fissa */
    text-align: center;
    color: var(--bg-card);
    position: relative;
}

.page-header h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.header-decoration {
    width: 60px;
    height: 3px;
    background-color: var(--primary-terracotta);
    margin: 0 auto 1.5rem auto;
}

.last-updated {
    font-family: var(--font-body);
    font-size: 0.95rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Contenitore Principale (Box bianco) --- */
.legal-section {
    padding: 0 5% 80px 5%;
    margin-top: -40px;
    /* Sovrappone leggermente all'header */
    position: relative;
    z-index: 10;
}

.legal-container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--bg-card);
    padding: 4rem 5rem;
    /* Tanto spazio interno */
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    /* Ombra morbida premium */
}

/* --- Tipografia del contenuto --- */
.legal-block {
    margin-bottom: 3.5rem;
}

.legal-block h2 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--primary-terracotta);
    margin-bottom: 1.2rem;
    font-weight: 600;
}

.legal-body p,
.legal-body ul {
    color: var(--text-secondary);
    font-size: 1.05rem;
    /* Testo leggermente più grande */
    line-height: 1.8;
    /* Interlinea ariosa */
    margin-bottom: 1.2rem;
}

.legal-body ul {
    padding-left: 1.5rem;
    list-style-type: disc;
}

.legal-body li {
    margin-bottom: 0.8rem;
    padding-left: 0.5rem;
}

.legal-body li strong {
    color: var(--primary-dark);
    font-weight: 600;
}

/* Link nel testo */
.legal-body a {
    color: var(--primary-terracotta);
    text-decoration: none;
    border-bottom: 1px solid rgba(192, 96, 69, 0.3);
    transition: all var(--transition-normal);
}

.legal-body a:hover {
    color: var(--primary-dark);
    border-bottom-color: var(--primary-dark);
}

/* Box in evidenza (Dati Aziendali) */
.highlight-box {
    background-color: var(--bg-secondary);
    padding: 1.5rem 2rem;
    border-left: 4px solid var(--primary-terracotta);
    border-radius: 0 8px 8px 0;
    margin: 1.5rem 0;
    font-size: 1rem;
}

/* Nota a piè di pagina */
.legal-footer-note {
    margin-top: 4rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
}

/* --- Adattamenti Mobile --- */
@media (max-width: 768px) {
    .page-header {
        padding-top: 120px;
        padding-bottom: 40px;
    }

    .page-header h1 {
        font-size: 2.2rem;
    }

    .legal-container {
        padding: 2.5rem 1.5rem;
        /* Meno padding laterale su mobile */
        border-radius: 12px;
    }

    .legal-block h2 {
        font-size: 1.4rem;
    }

    .highlight-box {
        padding: 1.2rem;
    }

    /* Nascondi il link "Torna al sito" nella navbar mobile per fare spazio */
    .navbar-divider {
        display: none;
    }
}

/* ============================================
   COOKIE BANNER
   ============================================ */
.cookie-banner {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(150%);
    /* Nascosto inizialmente sotto lo schermo */
    width: 90%;
    max-width: 600px;
    background-color: var(--primary-dark);
    /* Sfondo scuro elegante */
    color: var(--bg-secondary);
    padding: 1.5rem 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    /* Sopra a tutto, anche alla lightbox */
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-banner.show {
    transform: translateX(-50%) translateY(0);
    /* Appare */
}

.cookie-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    justify-content: space-between;
}

.cookie-text h3 {
    font-size: 1.1rem;
    color: var(--bg-card);
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
}

.cookie-text p {
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
}

.cookie-text a {
    color: var(--primary-terracotta);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.cookie-text a:hover {
    color: #fff;
}

.cookie-buttons {
    flex-shrink: 0;
}

/* Versione piccola del bottone primario */
.btn-sm {
    padding: 12px 24px;
    font-size: 0.8rem;
    white-space: nowrap;
}

/* Responsive per Mobile */
@media (max-width: 768px) {
    .cookie-banner {
        bottom: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 16px 16px 0 0;
        /* Solo angoli in alto */
        padding: 1.5rem;
        transform: translateY(100%);
    }

    .cookie-banner.show {
        transform: translateY(0);
    }

    .cookie-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .cookie-buttons {
        width: 100%;
    }

    .cookie-buttons .btn-sm {
        width: 100%;
        text-align: center;
    }
}

/* ============================================
   VIDEO SECTION (ADATTIVO SENZA TAGLI)
   ============================================ */
.video-section {
    width: 100%;
    background-color: #000;
    padding: 0;
    margin: 0;
    position: relative;
    /* Rimuoviamo limiti al contenitore esterno */
    height: auto;
    display: block;
}

.video-wrapper-full {
    width: 100%;
    max-width: 100%;
    position: relative;

    /* MODIFICA FONDAMENTALE: */
    /* Togliamo aspect-ratio fisso e max-height */
    /* Lasciamo che l'altezza sia "automatica" in base al video */
    height: auto;
    aspect-ratio: auto;

    overflow: hidden;
    display: block;
    /* Non flex, per evitare comportamenti strani */
}

.video-wrapper-full video {
    width: 100%;

    /* MODIFICA FONDAMENTALE: */
    /* L'altezza si calcola in automatico per mantenere le proporzioni */
    height: auto;

    /* Torniamo a cover per essere sicuri che riempia la larghezza */
    object-fit: cover;

    /* Rimuove quel fastidioso spazietto bianco di 4px sotto i video */
    display: block;
}

.video-overlay-text {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(42, 36, 32, 0.7);
    padding: 10px 25px;
    border-radius: 30px;
    backdrop-filter: blur(5px);
    pointer-events: none;
    z-index: 10;
}

.video-overlay-text h3 {
    color: #fff;
    font-size: 1.1rem;
    margin: 0;
    font-weight: 500;
    letter-spacing: 1px;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .video-overlay-text {
        bottom: 15px;
        padding: 8px 15px;
    }

    .video-overlay-text h3 {
        font-size: 0.9rem;
    }
}

/* ============================================
   SLIDESHOW
   ============================================ */

/* AREA DELLO SLIDER */
.slideshow-container {
    position: relative;
    width: 100%;

    /* AUMENTATA L'ALTEZZA: Più spazio verticale = foto più grandi */
    height: 750px;

    display: flex;
    align-items: center;
    justify-content: center;
}

/* 3. LE SLIDE */
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    animation: slideShow 12s infinite linear;

    /* Centratura */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 4. LE FOTO */
.slide img {
    /* Le immagini si espandono al massimo dello spazio disponibile */
    width: 100%;
    height: 100%;

    /* Mantiene le proporzioni originali (niente tagli, niente stiramenti) */
    object-fit: contain;

    /* L'ombra ora è applicata direttamente alla sagoma della foto */
    filter: drop-shadow(0 20px 40px rgba(42, 36, 32, 0.25));

    display: block;
}

/* 5. ANIMAZIONE */
.slide:nth-child(1) {
    animation-delay: 0s;
}

.slide:nth-child(2) {
    animation-delay: 4s;
}

.slide:nth-child(3) {
    animation-delay: 8s;
}

@keyframes slideShow {
    0% {
        opacity: 0;
        transform: scale(0.95);
        z-index: 2;
    }

    5% {
        opacity: 1;
        transform: scale(1);
        z-index: 2;
    }

    33% {
        opacity: 1;
        transform: scale(1);
        z-index: 2;
    }

    38% {
        opacity: 0;
        transform: scale(1.05);
        z-index: 1;
    }

    100% {
        opacity: 0;
        z-index: 1;
    }
}

/* 6. MOBILE */
@media (max-width: 768px) {
    .slideshow-container {
        /* Su mobile riduciamo l'altezza altrimenti è troppo lungo */
        height: 500px;
    }
}

/* ============================================
   LAZY VIDEO (Versione "Seamless" - Zero Stacchi)
   ============================================ */
.lazy-video {
    cursor: pointer;
    position: relative;
    display: block;
    width: 100%;
    /* Manteniamo le proporzioni usando aspect-ratio per evitare collassi */
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
    /* Importante per ritagliare */
}

/* L'immagine copertina - Resta visibile finché il video non parte */
.video-placeholder {
    position: absolute;
    /* Sovrapposta */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
    /* Sta sopra al video inizialmente */
    transition: opacity 0.8s ease;
    /* Dissolvenza lenta e morbida */
}

/* Tasto Play */
.custom-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background-color: rgba(192, 96, 69, 0.9);
    border: none;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    /* Sopra a tutto */
    cursor: pointer;
    animation: pulse-play 2s infinite;
    transition: all 0.3s ease;
}

.custom-play-btn svg {
    width: 35px;
    height: 35px;
    margin-left: 4px;
}

.lazy-video:hover .custom-play-btn {
    transform: translate(-50%, -50%) scale(1.1);
    background-color: var(--primary-terracotta);
}

/* Il video (generato da JS) */
.lazy-video video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    /* Sta sotto l'immagine mentre carica */
}

/* --- STATO "IN RIPRODUZIONE" --- */

/* Quando il video è PRONTO (classe aggiunta da JS): */
.video-playing .video-placeholder {
    opacity: 0;
    /* Svanisce lentamente */
    pointer-events: none;
    /* Non cliccabile */
}

.video-playing .custom-play-btn {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
    /* Effetto zoom out */
    pointer-events: none;
}

/* ============================================
   PULSANTI DOWNLOAD - SIMMETRIA E GLOW
   ============================================ */
.download-buttons-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap; /* Va a capo se non c'è spazio */
    margin-top: 2rem;
}

.download-buttons-group .btn-primary,
.download-buttons-group .btn-secondary {
    min-width: 280px; /* Forza la larghezza uguale per entrambi su desktop */
    text-align: center;
    justify-content: center;
    display: inline-flex;
    align-items: center;
    position: relative;
    transition: all 0.4s ease; /* Transizione fluida per l'effetto glow e movimento */
}

/* Effetto Glow e sollevamento per il pulsante primario (Terracotta) */
.download-buttons-group .btn-primary:hover {
    box-shadow: 0 0 20px rgba(192, 96, 69, 0.5); 
    transform: translateY(-3px);
}

/* Effetto Glow e sollevamento per il pulsante secondario (Bordo scuro) */
.download-buttons-group .btn-secondary:hover {
    box-shadow: 0 0 20px rgba(42, 36, 32, 0.2); 
    transform: translateY(-3px);
}

/* Gestione Mobile: occupano tutta la larghezza per essere cliccati meglio */
@media (max-width: 768px) {
    .download-buttons-group {
        flex-direction: column;
    }

    .download-buttons-group .btn-primary,
    .download-buttons-group .btn-secondary {
        width: 100%;
        min-width: 100%; /* Rimuove il vincolo dei 280px su schermi piccoli */
        text-align: center;
    }
}

/* ============================================
   CONTATTI VERTICALI - ALLINEAMENTO PERFETTO
   ============================================ */

.contact-links-vertical {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    align-items: flex-start;
    /* Forza l'allineamento a sinistra su desktop */
}

.contact-links-vertical a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--bg-secondary);
    font-size: 0.95rem;
    transition: all var(--transition-normal);
    text-align: left;
}

.contact-links-vertical a::before {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    margin-right: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    color: var(--primary-terracotta);
    font-size: 1.1rem;
    transition: all var(--transition-normal);
    flex-shrink: 0;
}

/* Icone */
.contact-links-vertical a[href^="mailto:"]::before {
    content: '\2709';
}

.contact-links-vertical a[href^="tel:"]::before {
    content: '\260E';
}

.contact-links-vertical a[href^="http"]::before {
    content: '\1F310';
}

.contact-links-vertical a:hover {
    color: #fff;
    transform: translateX(5px);
}

.contact-links-vertical a:hover::before {
    background: var(--primary-terracotta);
    color: #fff;
}

/* Fix per Mobile: manteniamo l'allineamento a sinistra nel blocco centrato */
@media (max-width: 768px) {
    .contact-col {
        display: flex;
        flex-direction: column;
        align-items: center;
        /* Centra il blocco nel footer mobile */
    }

    .contact-links-vertical {
        width: auto;
        /* Il contenitore si stringe attorno al contenuto */
        align-items: flex-start;
        /* Ma le icone restano allineate tra loro */
    }
}

/* ============================================
   RIPRISTINO SEZIONE PROGETTI - LOOK PREMIUM
   ============================================ */
.footer-projects {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.2rem;
    opacity: 0;
    /* Inizia invisibile per l'animazione */
    transform: translateY(30px);
    transition: opacity 1s ease, transform 1s ease;
}

/* Classe attivata dallo script quando si arriva al footer */
.footer-projects.active {
    opacity: 1;
    transform: translateY(0);
}

.projects-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary-terracotta);
    font-weight: 700;
}

.projects-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-project {
    padding: 10px 24px;
    border: 1.5px solid var(--primary-terracotta);
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    background: transparent;
    transition: all var(--transition-normal);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    text-align: center;
}

.btn-project:hover {
    background: var(--primary-terracotta);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* --- MOBILE: UNO SOTTO L'ALTRO --- */
@media (max-width: 768px) {
    .footer-projects {
        align-items: center;
        text-align: center;
    }

    .projects-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 280px;
        gap: 12px;
    }

    .btn-project {
        width: 100%;
    }
}