body.missioni-page { overflow: hidden; }

.missioni-scroll {
    position: fixed;
    inset: 0;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
}
.missioni-scroll::-webkit-scrollbar { display: none; }

.missione-slide {
    height: 100vh;
    scroll-snap-align: start;
    position: relative;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.missione-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
}

.missione-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.90) 0%,
        rgba(0, 0, 0, 0.48) 38%,
        rgba(0, 0, 0, 0.15) 62%,
        transparent 100%
    );
}

.missione-content {
    position: relative;
    z-index: 2;
    padding: 2.5rem 3rem 3rem;
    max-width: 720px;
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.missione-slide.visibile .missione-content {
    opacity: 1;
    transform: translateY(0);
}

.missione-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.missione-agenzia {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 0.2rem 0.65rem;
    border-radius: 2px;
}

.missione-anno {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.55);
}

.missione-content h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2rem, 5vw, 3.6rem);
    font-weight: 700;
    margin: 0 0 1rem 0;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.1;
}

.missione-content p {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.82);
    max-width: 560px;
    margin: 0;
}

/* pallini di navigazione laterali */
.missioni-dots {
    position: fixed;
    right: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.missioni-dots button {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background 0.3s, border-color 0.3s, transform 0.3s;
}

.missioni-dots button:hover {
    border-color: rgba(255, 255, 255, 0.9);
    transform: scale(1.2);
}

.missioni-dots button.attivo {
    background: var(--accent);
    border-color: var(--accent);
    transform: scale(1.3);
}

/* contatore in basso a sinistra */
.missione-counter {
    position: fixed;
    bottom: 1.8rem;
    left: 2rem;
    z-index: 100;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.12em;
}

/* freccia scorri */
.scroll-hint {
    position: fixed;
    bottom: 1.8rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.4rem;
    animation: scorri 2s ease-in-out infinite;
    transition: opacity 0.4s;
    pointer-events: none;
}

@keyframes scorri {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* pulsante torna su */
.btn-torna-su {
    position: fixed;
    bottom: 1.4rem;
    right: 1.2rem;
    z-index: 100;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    background: rgba(0, 0, 0, 0.45);
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    transition: background 0.25s, border-color 0.25s, color 0.25s, opacity 0.4s;
    opacity: 0;
    pointer-events: none;
}

.btn-torna-su.visibile {
    opacity: 1;
    pointer-events: auto;
}

.btn-torna-su:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

nav {
    position: fixed;
    width: 100%;
    z-index: 200;
}

@media (max-width: 600px) {
    .missione-content {
        padding: 1.5rem 1.2rem 5.5rem; /* padding extra in basso per non finire sotto i controlli fissi */
    }
    .missione-content h2 {
        font-size: clamp(1.5rem, 7vw, 2.2rem);
    }
    .missione-content p {
        font-size: 0.88rem;
        line-height: 1.6;
    }
    .missioni-dots { right: 0.4rem; }
    .btn-torna-su  { right: 0.4rem; bottom: 1rem; }
    .missione-counter { bottom: 1rem; left: 1rem; }
    .scroll-hint { bottom: 1rem; }
    .car-thumb { width: 80px; height: 52px; }
    .modal-info-box { padding: 1.5rem 1.4rem; }
}

/* carosello foto */
.missione-carousel {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1.1rem;
}
.car-track {
    display: flex;
    gap: 0.45rem;
    overflow: hidden;
}
.car-thumb {
    width: 110px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
    border: 2px solid transparent;
    transition: border-color 0.2s, transform 0.2s;
}
.car-thumb:hover { border-color: var(--accent); transform: scale(1.05); }
.car-btn {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.22);
    color: white;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.35rem 0.55rem;
    border-radius: 5px;
    flex-shrink: 0;
    transition: background 0.2s;
}
.car-btn:hover { background: rgba(255,255,255,0.24); }
.car-btn:disabled { opacity: 0.3; cursor: default; }

/* pulsante info */
.btn-info-missione {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.18);
    border: 1.5px solid rgba(59, 130, 246, 0.5);
    color: rgba(255,255,255,0.85);
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}
.btn-info-missione:hover { background: rgba(59, 130, 246, 0.42); }

/* lightbox */
.lightbox-overlay {
    display: flex;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.90);
    z-index: 400;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.lightbox-overlay.aperta {
    opacity: 1;
    pointer-events: auto;
}
.lightbox-overlay .lightbox-img {
    transform: scale(0.9);
    transition: transform 0.25s ease;
}
.lightbox-overlay.aperta .lightbox-img {
    transform: scale(1);
}
.lightbox-img {
    max-width: 82vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
}
.lightbox-chiudi {
    position: absolute;
    top: 1.2rem; right: 1.5rem;
    background: none; border: none;
    color: white; font-size: 2rem; cursor: pointer;
    line-height: 1;
}
.lightbox-nav {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    color: white; font-size: 2rem; cursor: pointer;
    padding: 0.6rem 0.9rem; border-radius: 6px;
    transition: background 0.2s;
    line-height: 1;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.25); }
.lightbox-nav:disabled { opacity: 0.2; cursor: default; }
#lightbox-prev { left: 1.2rem; }
#lightbox-next { right: 1.2rem; }
.lightbox-caption {
    position: absolute;
    bottom: 1.5rem;
    left: 50%; transform: translateX(-50%);
    color: rgba(255,255,255,0.65);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    text-align: center;
    width: 80%;
}

/* modal info aggiuntive */
.modal-info-overlay {
    display: flex;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.72);
    z-index: 400;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.modal-info-overlay.aperto {
    opacity: 1;
    pointer-events: auto;
}
.modal-info-overlay .modal-info-box {
    transform: scale(0.9);
    transition: transform 0.25s ease;
}
.modal-info-overlay.aperto .modal-info-box {
    transform: scale(1);
}
.modal-info-box {
    background: rgba(6, 10, 35, 0.97);
    border: 1px solid rgba(59, 130, 246, 0.28);
    border-radius: 14px;
    padding: 2rem 2.2rem;
    max-width: 480px;
    width: 90%;
    position: relative;
    backdrop-filter: blur(14px);
}
.modal-info-box h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    color: var(--accent);
    margin: 0 0 1rem 0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.modal-info-box p {
    font-family: 'Inter', sans-serif;
    font-size: 0.93rem;
    line-height: 1.75;
    color: rgba(255,255,255,0.82);
    margin: 0;
}
.modal-info-chiudi {
    position: absolute;
    top: 1rem; right: 1.2rem;
    background: none; border: none;
    color: rgba(255,255,255,0.55); font-size: 1.4rem; cursor: pointer;
}
.modal-info-chiudi:hover { color: white; }
