/* ================================
   SHANGHAI X RUN - STYLE UNIFICATO
   Palette: #262B24, #F68B00, #F4EFE3
   Font: Bricolage Grotesque
   ================================ */

:root {
    /* Palette Grafico */
    --primary-orange: #F68B00;
    --secondary-orange: #F68B00;
    --dark-orange: #D97700;
    --black: #262B24;        /* Sfondo principale */
    --dark-gray: #1D211B;    /* Leggermente più scuro per staccare sezioni/card */
    --medium-gray: #32382F;  /* Leggermente più chiaro per bordi e input */
    --light-gray: #F4EFE3;   /* Testo crema */
    --white: #F4EFE3;        /* Titoli e testi principali */

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-orange), var(--dark-orange));
    --gradient-dark: linear-gradient(180deg, rgba(29, 33, 27, 0.95), rgba(38, 43, 36, 0.98));

    /* Typography */
    --font-display: 'Bricolage Grotesque', sans-serif;
    --font-body: 'Bricolage Grotesque', sans-serif;

    /* Spacing */
    --section-padding: 120px 0;
    --container-padding: 0 20px;

    /* Transitions */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ================================
   RESET & BASE
   ================================ */

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

html {
    scroll-behavior: smooth;
    overflow-x: clip;
}

body {
    font-family: var(--font-body);
    background-color: var(--black);
    color: var(--white);
    line-height: 1.6;
    overflow-x: clip;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--container-padding);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

/* ================================
   TYPOGRAPHY & LOGHI X
   ================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.02em;
}

h1 { font-size: clamp(3rem, 8vw, 6rem); }
h2 { font-size: clamp(2.5rem, 6vw, 4rem); }
h3 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h4 { font-size: clamp(1.2rem, 3vw, 1.8rem); }

p {
    font-size: clamp(1rem, 2vw, 1.1rem);
    line-height: 1.8;
    color: var(--light-gray);
}

.x-text-bold {
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--primary-orange);
    font-size: 1.05em;
    display: inline;
    vertical-align: baseline;
    letter-spacing: 0.03em;
}

.logo-text-unified {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-size: 1.8rem;
    letter-spacing: 0.05em;
    color: var(--white);
}

.x-integrated {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 50px;
}

.x-logo-inline {
    height: 45px;
    width: auto;
    object-fit: contain;
    transition: var(--transition-smooth);
}

.x-logo-inline:hover {
    transform: scale(1.05);
}

/* ================================
   BUTTONS
   ================================ */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 36px;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: -1;
}

.btn:hover::before {
    width: 400px;
    height: 400px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 8px 30px rgba(246, 139, 0, 0.35);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(246, 139, 0, 0.55);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--primary-orange);
}

.btn-secondary:hover {
    background: var(--primary-orange);
    transform: translateY(-3px);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.btn-small {
    padding: 12px 24px;
    font-size: 0.95rem;
}

/* ================================
   FIXED CTA MOBILE
   ================================ */

.fixed-cta-mobile {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    display: none;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fixed-cta-mobile.active {
    pointer-events: auto;
    opacity: 1;
}

.btn-fixed {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: rgba(246, 139, 0, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--white);
    font-family: var(--font-display);
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    border-radius: 50px;
    border: 2px solid rgba(246, 139, 0, 0.3);
    box-shadow: 0 8px 40px rgba(246, 139, 0, 0.4);
    animation: pulse 2s infinite;
    transition: var(--transition-smooth);
}

.btn-fixed:hover {
    background: var(--primary-orange);
    box-shadow: 0 12px 50px rgba(246, 139, 0, 0.7);
    transform: translateY(-2px);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

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

/* ================================
   NAVIGATION
   ================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--gradient-dark);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    z-index: 1000;
    transition: var(--transition-smooth);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

.navbar.scrolled {
    padding: 15px 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 0.04em;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-orange);
    transition: width 0.3s;
}

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

.nav-link-highlight {
    color: var(--primary-orange) !important;
    font-weight: 800 !important;
    text-transform: uppercase;
}

.nav-link-highlight:hover {
    color: var(--white) !important;
}

.burger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.burger span {
    width: 30px;
    height: 3px;
    background: var(--white);
    border-radius: 2px;
    transition: var(--transition-smooth);
}
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--gradient-dark);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    z-index: 1000;
    transition: transform 0.4s ease, opacity 0.4s ease, padding 0.3s ease;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);

    /* Nascosta in partenza sopra lo schermo */
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

/* Appare quando si supera la Hero */
.navbar.navbar-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}
/* ================================
   HERO SECTION 
   ================================ */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow: hidden;
    z-index: 5;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 1000px;
    padding: 0 20px;
}

.hero-title-unified {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    font-family: var(--font-display);
    font-size: clamp(3.5rem, 10vw, 7rem);
    color: var(--white);
    margin-bottom: 20px;
}

.hero-info-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin: 30px auto 50px auto;
    width: 100%;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-size: 1.5rem;
    letter-spacing: 2px;
    color: var(--white);
    white-space: nowrap;
}

.info-item i {
    color: var(--primary-orange);
    font-size: 1.4rem;
}

.hero-cta-container {
    margin: 40px auto 20px auto;
    width: 100%;
    max-width: 600px;
    display: flex;
    justify-content: center;
    padding: 0 20px;
}

.btn-iscriviti-main {
    display: block;
    width: 100%;
    background-color: var(--primary-orange);
    color: var(--white);
    font-family: var(--font-display);
    font-size: 2.2rem;
    padding: 18px 30px;
    text-align: center;
    border-radius: 60px;
    letter-spacing: 2px;
    box-shadow: 0 10px 25px rgba(246, 139, 0, 0.4);
    transition: var(--transition-smooth);
    border: none;
    white-space: nowrap;
}

.btn-iscriviti-main:hover {
    transform: translateY(-5px);
    background-color: var(--white);
    color: var(--primary-orange);
}
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: var(--black);
    overflow: hidden;
    z-index: 5;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Riempie sempre lo schermo senza deformare il video */
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none; /* Impedisce click accidentali sul video */
}
/* Velo leggerissimo sul video */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.25); /* 0.25 = velatura molto leggera */
    z-index: 1;
    pointer-events: none;
}

/* Logo centrato sopra al video */
.hero-logo-center {
    width: min(80vw, 520px); /* Grande su desktop, si adatta da solo su mobile */
    height: auto;
    margin: 0 auto;
    filter: drop-shadow(0 6px 24px rgba(0, 0, 0, 0.45)); /* Stacca il logo dal video */
}
.hero-slogan {
    margin-top: 18px;
    font-family: var(--font-display);
    font-size: clamp(0.95rem, 1.8vw, 1.25rem);
    font-weight: 500;
    letter-spacing: 0.18em;
    color: var(--white);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.75);
}

.hero-slogan span {
    color: var(--primary-orange);
}
/* Frecce a cascata in fondo alla Hero */
.-arrows {
    position: absolute;
    bottom: 35px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    cursor: pointer;
}

/* Frecce a cascata in fondo alla Hero */
.scroll-down-arrows {
    position: absolute;
    bottom: 65px; /* Più in alto rispetto al fondo */
    left: 50%;
    transform: translateX(-50%);
    z-index: 10; /* Sopra a tutto per garantire il click */
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 25px; /* Area cliccabile più comoda */
    cursor: pointer;
}

.scroll-down-arrows span {
    display: block;
    width: 18px;
    height: 18px;
    border-bottom: 3px solid var(--primary-orange);
    border-right: 3px solid var(--primary-orange);
    transform: rotate(45deg);
    margin: 4px 0; /* Più spazio tra una freccia e l'altra */
    opacity: 0;
    filter: drop-shadow(0 0 6px rgba(246, 139, 0, 0.6));
    animation: arrowCascade 1.8s infinite;
}
.scroll-down-arrows span:nth-child(1) { animation-delay: 0s; }
.scroll-down-arrows span:nth-child(2) { animation-delay: 0.2s; }
.scroll-down-arrows span:nth-child(3) { animation-delay: 0.4s; }

@keyframes arrowCascade {
    0% {
        opacity: 0;
        transform: rotate(45deg) translate(-6px, -6px);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: rotate(45deg) translate(6px, 6px);
    }
}
/* ================================
   SECTION COMMON STYLES
   ================================ */

section {
    padding: var(--section-padding);
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 70px;
}

.section-tag {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--primary-orange);
    margin-bottom: 15px;
    padding: 8px 20px;
    border: 2px solid var(--primary-orange);
    border-radius: 30px;
}

.section-subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    margin-top: 15px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}
/* ================================
   TEASER DATA 2027 (SOTTO HERO)
   ================================ */

.section-teaser-date {
    background-color: var(--dark-gray);
    border-top: 1px solid var(--medium-gray);
    border-bottom: 1px solid var(--medium-gray);
    padding: 85px 0;
    position: relative;
    z-index: 10;
}

.teaser-wrapper {
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.teaser-date {
    font-family: var(--font-display);
    font-size: clamp(3.4rem, 9vw, 6.2rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.08em;
    color: var(--white);
    margin: 12px 0 22px;
}

.teaser-x {
    color: var(--primary-orange);
    display: inline-block;
    animation: teaserPulse 2.6s ease-in-out infinite;
}

.teaser-sep {
    color: var(--primary-orange);
    opacity: 0.75;
    margin: 0 2px;
}

@keyframes teaserPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

.teaser-subtitle {
    max-width: 560px;
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--light-gray);
    opacity: 0.9;
    margin-bottom: 36px;
}

.teaser-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

/* Box Newsletter espandibile */
.teaser-newsletter-box {
    width: 100%;
    max-width: 540px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin-top: 0;
    transition: max-height 0.4s ease, opacity 0.35s ease, margin-top 0.35s ease;
}

.teaser-newsletter-box.open {
    max-height: 220px;
    opacity: 1;
    margin-top: 30px;
}

.teaser-newsletter-form {
    display: flex;
    gap: 10px;
    background: var(--black);
    border: 2px solid var(--medium-gray);
    border-radius: 50px;
    padding: 6px 6px 6px 22px;
    transition: var(--transition-smooth);
}

.teaser-newsletter-form:focus-within {
    border-color: var(--primary-orange);
}

.teaser-newsletter-form input[type="email"] {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    color: var(--white);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
}

.teaser-newsletter-form input[type="email"]::placeholder {
    color: var(--light-gray);
    opacity: 0.55;
}

.teaser-privacy-note {
    font-size: 0.85rem;
    color: var(--light-gray);
    opacity: 0.65;
    margin-top: 12px;
}

@media (max-width: 600px) {
    .section-teaser-date {
        padding: 65px 0;
    }

    .teaser-actions {
        width: 100%;
        flex-direction: column;
    }

    .teaser-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .teaser-newsletter-form {
        flex-direction: column;
        border-radius: 20px;
        padding: 12px;
    }

    .teaser-newsletter-form input[type="email"] {
        padding: 10px 8px;
        text-align: center;
    }

    .teaser-newsletter-form .btn {
        width: 100%;
        justify-content: center;
    }
}



/* ================================
   L'ESPERIENZA & GALLERY INFINITA
   ================================ */

.section-esperienza {
    background-color: var(--black);
    position: relative;
    z-index: 10;
}

.infinite-wrapper {
    overflow: hidden;
    width: 100%;
    padding: 20px 0;
    margin-bottom: 30px;
    display: flex;
}

.infinite-track {
    display: flex;
    gap: 20px;
    width: max-content;
    animation: scorriInfinito 35s linear infinite;
}

.infinite-track:hover {
    animation-play-state: paused;
}

@keyframes scorriInfinito {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-50% - 10px));
    }
}

.gallery-item-full {
    flex: 0 0 350px;
    min-width: 350px;
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
}

.gallery-item-full img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

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

/* Elementi nascosti temporaneamente (tabs / stories) */
.tabs-nav,
#tab-stories,
#reminderBtn {
    display: none !important;
}

/* ================================
   SCROLLYTELLING (LA X, PERCORSI, TERRITORIO)
   ================================ */

.scrolly-section {
    position: relative;
    padding: 0;
    background: transparent;
    /* Ritaglia lo sfondo fixed dentro la propria sezione */
    clip-path: inset(0);
    z-index: 5;
}
.scrolly-panel {
    position: relative;
    clip-path: inset(0);
}
.scrolly-fixed-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-size: cover;
    background-position: center;
    z-index: 0;
    pointer-events: none;
}

.scrolly-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
}

.scrolly-step {
    min-height: 120vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.scrolly-text-block {
    text-align: center;
    padding: 40px 20px;
    max-width: 900px;
    margin: 0 auto;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 80%);
}

.scrolly-icon {
    font-size: 2.5rem;
    color: var(--primary-orange);
    margin-bottom: 15px;
}

.scrolly-text-block .scrolly-tag {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--primary-orange);
    margin-bottom: 20px;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 1);
}

.scrolly-text-block h3 {
    color: var(--white);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    margin-bottom: 25px;
    line-height: 1.1;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 1);
}

.scrolly-text-block p {
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    line-height: 1.8;
    color: var(--light-gray);
    margin-bottom: 20px;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 1);
}

.scrolly-text-block p:last-child {
    margin-bottom: 0;
}

.scrolly-text-block strong {
    color: var(--white);
}

/* Statistiche Percorsi */
.percorso-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.percorso-stats span {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--white);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
    background: rgba(0, 0, 0, 0.45);
    padding: 8px 16px;
    border-radius: 30px;
    border: 1px solid rgba(246, 139, 0, 0.35);
}

.percorso-stats i {
    color: var(--primary-orange);
    font-size: 1.15rem;
}
/* Animazione lettere e dissolvenza nello Scrollytelling */
/* Animazione lettere e dissolvenza pulita nello Scrollytelling */
.scrolly-word {
    display: inline-block;
    white-space: nowrap;
}

.scrolly-ready .scrolly-char {
    display: inline-block;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

.scrolly-ready.is-visible .scrolly-char {
    opacity: 1;
    transform: translateY(0);
}

.scrolly-ready .scrolly-fade-item {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.scrolly-ready.is-visible .scrolly-fade-item {
    opacity: 1;
    transform: translateY(0);
}

.scrolly-ready.is-visible .btn:hover {
    transition-delay: 0s !important;
}

/* Fascia titolo sopra alle 3 foto di Territorio */
.scrolly-intro-banner {
    background-color: var(--dark-gray);
    padding: 90px 20px 70px;
    position: relative;
    z-index: 6;
    text-align: center;
}

.scrolly-intro-banner .scrolly-text-block {
    background: none;
    padding: 0;
}

.scrolly-intro-banner h2 {
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    color: var(--white);
    margin-bottom: 16px;
}

/* Ogni foto di Territorio occupa esattamente uno schermo intero */
#territorio .scrolly-step {
    min-height: 100vh;
}

/* ================================
   LAYOUT EDITORIALE ANGOLI (PULITO, SENZA BOX)
   ================================ */

@media (min-width: 993px) {
    /* Posizionamento in basso negli angoli */
    #la-x > .scrolly-step,
    #territorio .scrolly-panel .scrolly-step {
        align-items: flex-end;
        padding-bottom: 12vh;
        padding-left: 6%;
        padding-right: 6%;
    }

    /* Blocchi a SINISTRA */
    #la-x > .scrolly-step:nth-child(2),
    #territorio .panel-left .scrolly-step {
        justify-content: flex-start;
    }

    /* Blocchi a DESTRA */
    #la-x > .scrolly-step:nth-child(3),
    #territorio .panel-right .scrolly-step {
        justify-content: flex-end;
    }

    /* Testo libero senza box, con linea arancione di accento */
    #la-x .scrolly-text-block,
    #territorio .scrolly-panel .scrolly-text-block {
        margin: 0;
        max-width: 500px;
        text-align: left;
        padding: 10px 0 10px 28px;
        background: none;
        border-left: 3px solid var(--primary-orange);
    }

    #la-x .scrolly-text-block h3,
    #territorio .scrolly-panel h3 {
        font-size: clamp(2rem, 3.2vw, 2.8rem);
        margin-bottom: 16px;
        text-shadow: 0 3px 16px rgba(0, 0, 0, 0.85);
    }

    #la-x .scrolly-text-block p,
    #territorio .scrolly-panel p {
        font-size: 1.05rem;
        line-height: 1.7;
        text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
    }

    /* Per i blocchi a destra: linea arancione a destra e testo allineato a destra */
    #la-x > .scrolly-step:nth-child(3) .scrolly-text-block,
    #territorio .panel-right .scrolly-text-block {
        text-align: right;
        padding: 10px 28px 10px 0;
        border-left: none;
        border-right: 3px solid var(--primary-orange);
    }
}

/* ================================
   SEZIONE PERCORSI (MAPPA FULLSCREEN + TESTI A SINISTRA)
   ================================ */

.section-percorsi {
    padding: 0;
    position: relative;
    z-index: 5;
    background-color: var(--black);
}

.percorsi-stage {
    position: relative;
    clip-path: inset(0); /* Ritaglia la mappa fissa esattamente dentro questa sezione */
}

/* Mappa satellitare fissa a tutto schermo */
.percorsi-fixed-bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

.percorsi-map-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Livello SVG vuoto a tutto schermo sopra la mappa */
.percorsi-svg-layer {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.percorsi-svg-layer svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Gradiente laterale: scuro a sinistra per il testo, libero a destra per la mappa */
.percorsi-map-gradient {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(
        90deg,
        rgba(29, 33, 27, 0.88) 0%,
        rgba(29, 33, 27, 0.65) 35%,
        rgba(29, 33, 27, 0.18) 65%,
        rgba(29, 33, 27, 0.05) 100%
    );
}

/* Testi che scorrono sul lato sinistro */
.percorsi-steps-wrapper {
    position: relative;
    z-index: 3;
    padding: 0 6%;
}

.percorso-step {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.percorso-step-content {
    max-width: 480px;
    padding: 12px 0 12px 28px;
    border-left: 3px solid rgba(244, 239, 227, 0.25);
    opacity: 0.4;
    transition: opacity 0.4s ease, border-color 0.4s ease;
}

.percorso-step.is-active .percorso-step-content {
    opacity: 1;
    border-left-color: var(--primary-orange);
}

.percorso-step-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.percorso-step-header i {
    color: var(--primary-orange);
    font-size: 1.25rem;
}

.percorso-tag {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: var(--primary-orange);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

.percorso-step-content h3 {
    font-size: clamp(2.2rem, 3.8vw, 3.2rem);
    color: var(--white);
    margin-bottom: 16px;
    line-height: 1.1;
    text-shadow: 0 3px 16px rgba(0, 0, 0, 0.9);
}

.percorso-step-content h3 span {
    display: block;
    font-size: 0.48em;
    font-weight: 500;
    color: var(--primary-orange);
    letter-spacing: 0.08em;
    margin-top: 6px;
}

.percorso-step-content p {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--light-gray);
    margin-bottom: 24px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.95);
}

.section-percorsi .percorso-stats {
    justify-content: flex-start;
    margin-top: 0;
}

/* Responsive Tablet & Mobile */
@media (max-width: 992px) {
    .percorsi-map-gradient {
        background: rgba(29, 33, 27, 0.65);
    }

    .percorso-step {
        min-height: 75vh;
        padding: 40px 0;
    }

    .percorso-step-content {
        max-width: 100%;
        opacity: 1;
        border-left-color: var(--primary-orange);
    }
}

/* ================================
   BENEFICENZA
   ================================ */

.section-beneficenza {
    background-color: var(--black);
    position: relative;
    z-index: 10;
}

.beneficenza-impact-wrapper {
    max-width: 1100px;
    margin: 0 auto;
}

/* Griglia 2 foto */
.beneficenza-photos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 28px;
}

.beneficenza-photo-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--medium-gray);
    background-color: var(--dark-gray);
    aspect-ratio: 16 / 10;
}

.beneficenza-photo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: var(--transition-smooth);
}

.beneficenza-photo-card:hover img {
    transform: scale(1.03);
}

.beneficenza-photo-card figcaption {
    position: absolute;
    left: 14px;
    bottom: 14px;
    background: rgba(29, 33, 27, 0.88);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: var(--white);
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    padding: 6px 14px;
    border-radius: 30px;
    border: 1px solid rgba(246, 139, 0, 0.5);
}

/* 3 colonne 2025 / 2026 / 2027 */
.beneficenza-timeline {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.impact-card {
    background: var(--dark-gray);
    border: 1px solid var(--medium-gray);
    border-top: 3px solid var(--primary-orange);
    border-radius: 16px;
    padding: 30px 22px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition-smooth);
}

.impact-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-orange);
}

.impact-card-future {
    border-style: dashed;
    border-color: rgba(246, 139, 0, 0.65);
    border-top: 3px solid var(--primary-orange);
    background: rgba(246, 139, 0, 0.06);
}

.impact-year {
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--primary-orange);
}

.impact-amount {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 3.8vw, 3rem);
    font-weight: 800;
    color: var(--white);
    line-height: 1.1;
    margin: 4px 0;
}

.impact-card-future .impact-amount {
    color: var(--primary-orange);
}

.impact-org {
    font-size: 1rem;
    font-weight: 500;
    color: var(--light-gray);
}

/* Citazione di chiusura */
.beneficenza-quote {
    max-width: 780px;
    margin: 55px auto 0;
    padding: 24px 28px;
    border-left: 3px solid var(--primary-orange);
    background: var(--dark-gray);
    border-radius: 0 14px 14px 0;
}

.beneficenza-quote p {
    font-size: clamp(1rem, 2vw, 1.15rem);
    font-style: italic;
    line-height: 1.7;
    color: var(--white);
    margin-bottom: 10px;
}

.beneficenza-quote footer {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--primary-orange);
}

/* Responsive Mobile */
@media (max-width: 768px) {
    .beneficenza-photos-grid,
    .beneficenza-timeline {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .impact-card {
        padding: 22px 18px;
    }

    .beneficenza-quote {
        margin-top: 38px;
        padding: 18px 20px;
    }
}
/* ================================
   SPONSOR & VOLONTARI SECTION
   ================================ */

.section-sponsor {
    background-color: var(--black);
    position: relative;
    z-index: 10;
}

.sponsor-intro {
    margin-bottom: 50px;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.sponsor-major {
    display: grid;
    grid-template-columns: 1fr;
    max-width: 650px;
    margin: 40px auto 60px auto;
}

.sponsor-card {
    background: var(--dark-gray);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(246, 139, 0, 0.25);
    text-align: center;
}

#box-decathlon.sponsor-logo-placeholder-decathlon {
    background: #FFFFFF;
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 12px;
    margin: 10px 0 25px 0;
}

#box-decathlon.sponsor-logo-placeholder-decathlon img {
    max-height: 80px;
    width: auto;
    max-width: 95%;
    object-fit: contain;
}

.sponsor-card h4 {
    color: var(--primary-orange);
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.sponsor-wall-wrapper {
    margin: 60px 0;
    text-align: center;
}

.sponsor-wall-title {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--light-gray);
    margin-bottom: 30px;
    letter-spacing: 2px;
}

.sponsor-wall {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.sponsor-logo-box {
    width: 240px;
    height: 140px;
    background: #FFFFFF;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.sponsor-logo-box img {
    width: 90%;
    height: 90%;
    object-fit: contain;
}

.sponsor-logo-box:hover {
    transform: translateY(-8px) scale(1.04);
    box-shadow: 0 12px 30px rgba(246, 139, 0, 0.3);
}

.sponsor-cta {
    background: var(--dark-gray);
    border: 1px solid var(--medium-gray);
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
}

.sponsor-cta-content > i {
    font-size: 2.8rem;
    color: var(--primary-orange);
    margin-bottom: 15px;
}

.sponsor-cta-content h3 {
    color: var(--primary-orange);
    margin-bottom: 20px;
}

.sponsor-cta-content p {
    margin-bottom: 20px;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

/* ================================
   FAQ SECTION
   ================================ */

.section-faq {
    background-color: var(--dark-gray);
    position: relative;
    z-index: 10;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.faq-item {
    background: var(--black);
    border: 1px solid var(--medium-gray);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.faq-item:hover {
    border-color: rgba(246, 139, 0, 0.4);
}

.faq-item.active {
    border-color: var(--primary-orange);
    box-shadow: 0 8px 25px rgba(246, 139, 0, 0.15);
}

.faq-question {
    width: 100%;
    text-align: left;
    padding: 20px 25px;
    background: transparent;
    border: none;
    color: var(--white);
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-smooth);
}

.faq-question:hover {
    color: var(--primary-orange);
}

.faq-question i {
    color: var(--primary-orange);
    font-size: 1.2rem;
    transition: transform 0.4s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-content {
    padding: 20px 25px 25px 25px;
    color: var(--light-gray);
    line-height: 1.6;
    border-top: 1px dashed rgba(246, 139, 0, 0.25);
    margin-top: 5px;
}

/* ================================
   CONTATTI SECTION
   ================================ */

.section-contatti {
    background-color: var(--black);
    position: relative;
    z-index: 10;
}

.contatti-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contatti-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.info-block {
    background: var(--dark-gray);
    border: 1px solid var(--medium-gray);
    border-radius: 16px;
    padding: 25px;
}

.info-icon {
    font-size: 1.8rem;
    color: var(--primary-orange);
    margin-bottom: 10px;
}

.info-block h3 {
    font-size: 1.4rem;
    color: var(--white);
    margin-bottom: 8px;
}

.info-link {
    color: var(--primary-orange);
    font-weight: 600;
}

.info-link:hover {
    text-decoration: underline;
}

.contatti-form-wrapper {
    background: var(--dark-gray);
    border: 1px solid var(--medium-gray);
    border-radius: 20px;
    padding: 40px;
}

.form-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.form-header i {
    font-size: 2rem;
    color: var(--primary-orange);
}

.form-header h3 {
    color: var(--primary-orange);
    font-size: 1.8rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.form-group label {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--light-gray);
}

.form-group label i {
    color: var(--primary-orange);
    margin-right: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 14px 18px;
    background: var(--black);
    border: 2px solid var(--medium-gray);
    border-radius: 10px;
    color: var(--white);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-orange);
}

/* ================================
   FOOTER REDESIGNED
   ================================ */

.footer-redesigned {
    background: var(--dark-gray);
    border-top: 3px solid var(--primary-orange);
    padding: 60px 0 30px;
    position: relative;
    z-index: 10;
}

.footer-top {
    text-align: center;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--medium-gray);
    margin-bottom: 40px;
}

.footer-logo-section {
    margin-bottom: 25px;
}

.footer-logo-unified {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 2.3rem;
    letter-spacing: 0.05em;
    color: var(--white);
    margin-bottom: 12px;
}

.footer-text {
    font-weight: 800;
}

.footer-x {
    display: inline-flex;
    align-items: center;
}

.footer-x img {
    height: 45px;
    width: auto;
    object-fit: contain;
}

.footer-date {
    font-size: 1.1rem;
    color: var(--primary-orange);
    font-weight: 600;
}

.footer-quote {
    max-width: 700px;
    margin: 0 auto;
}

.quote-text {
    font-size: 1.25rem;
    font-style: italic;
    line-height: 1.8;
    color: var(--light-gray);
    font-weight: 300;
}

.footer-middle {
    padding-bottom: 30px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.footer-links a {
    color: var(--light-gray);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.footer-links a:hover {
    color: var(--primary-orange);
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-social a {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--black);
    border: 2px solid var(--medium-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--white);
    transition: var(--transition-smooth);
}

.footer-social a:hover {
    background: var(--primary-orange);
    border-color: var(--primary-orange);
    transform: translateY(-4px);
    box-shadow: 0 5px 20px rgba(246, 139, 0, 0.4);
}

.footer-bottom {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid var(--medium-gray);
}

.footer-bottom p {
    font-size: 0.9rem;
    color: var(--light-gray);
    opacity: 0.8;
}

/* ================================
   LIGHTBOX GALLERY
   ================================ */

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox.active {
    display: flex;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: var(--primary-orange);
    color: var(--white);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    z-index: 10001;
}

.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }

.lightbox-image {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 10px;
}

.lightbox-caption {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: var(--white);
    padding: 12px 25px;
    border-radius: 50px;
    font-size: 1rem;
}

/* ================================
   COMPONENTI PRONTI PER FUTURO RIUSO
   (Pacco Gara / Iscrizioni / Form Volontari)
   ================================ */

.race-kit-section {
    margin-top: 80px;
    padding: 0 20px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.kit-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.kit-card {
    background: var(--dark-gray);
    border: 1px solid var(--medium-gray);
    border-radius: 15px;
    padding: 35px 25px;
    text-align: center;
    transition: var(--transition-smooth);
}

.kit-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary-orange);
}

.kit-card i {
    font-size: 2.5rem;
    color: var(--primary-orange);
    margin-bottom: 18px;
}

.kit-card h3 {
    font-size: 1.5rem;
    color: var(--white);
    margin-bottom: 12px;
}

/* ================================
   RESPONSIVE
   ================================ */

@media (max-width: 1024px) {
    .beneficenza-content,
    .contatti-grid {
        grid-template-columns: 1fr;
    }

    .beneficiary-card {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
    }

    .beneficiary-logo {
        width: 180px;
        margin: 0 auto;
    }

    .kit-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 80px 0;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        height: 100vh;
        background: var(--gradient-dark);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 35px;
        transition: var(--transition-smooth);
        z-index: 999;
    }

    .nav-links.nav-active {
        right: 0 !important;
    }

    .burger {
        display: flex;
        z-index: 1001;
    }

    .burger.active span:nth-child(1) { transform: rotate(45deg) translate(9px, 9px); }
    .burger.active span:nth-child(2) { opacity: 0; }
    .burger.active span:nth-child(3) { transform: rotate(-45deg) translate(9px, -9px); }

    .x-logo-inline {
        height: 35px;
    }

    .hero-info-container {
        flex-direction: column;
        gap: 15px;
    }

    .gallery-item-full {
        flex: 0 0 280px;
        min-width: 280px;
    }

    .beneficenza-stats {
        grid-template-columns: 1fr;
    }

    .sponsor-logo-box {
        width: calc(50% - 10px);
        height: 110px;
        padding: 8px;
    }

    .contatti-form-wrapper {
        padding: 25px;
    }

    .kit-grid {
        grid-template-columns: 1fr;
    }

    .footer-logo-unified {
        font-size: 1.8rem;
    }

    .footer-x img {
        height: 32px;
    }

    .footer-links {
        flex-direction: column;
        gap: 15px;
    }
/* Ridimensionamento Beneficenza su mobile */
    .beneficenza-icon {
        width: 60px;
        height: 60px;
        font-size: 1.7rem;
        border-radius: 14px;
    }

    .stat-item {
        padding: 18px 14px;
    }

    .stat-number,
    .stat-icon {
        font-size: 1.85rem;
        margin-bottom: 6px;
    }

    /* Ridimensionamento box e tasti Sponsor / Volontari su mobile */
    .sponsor-cta {
        padding: 32px 20px;
    }

    .sponsor-cta-content > i {
        font-size: 2rem;
        margin-bottom: 10px;
    }

    .sponsor-cta .btn {
        padding: 13px 22px;
        font-size: 0.95rem;
        gap: 8px;
    }


}
/* Disattiva l'effetto comparsa AOS sulle sezioni a sfondo solido */
.section-esperienza [data-aos],
.section-beneficenza [data-aos],
.section-sponsor [data-aos],
.section-faq [data-aos],
.section-contatti [data-aos],
.footer-redesigned [data-aos] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}