/* ========================================
   BLACKBOX STUDIO - CSS DEDICATO
   Design minimalista con scroll sincronizzato
   Desktop: Parallax sync tra foto e testo
   Mobile: Classico scroll con footer fisso in fondo
   COLORI INVERTITI - Sfondo nero, testo bianco
======================================== */

/* === SCROLLBAR PERSONALIZZATA BLACKBOX - BIANCA ULTRA-MINIMAL === */
/* Webkit browsers (Chrome, Safari, Edge) - Forzato con !important */
html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
    width: 2px !important;
    height: 2px !important;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
*::-webkit-scrollbar-track {
    background: transparent !important;
    border-radius: 0 !important;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.6) !important;
    border-radius: 1px !important;
    border: none !important;
    box-shadow: none !important;
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
*::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.9) !important;
}

html::-webkit-scrollbar-corner,
body::-webkit-scrollbar-corner,
*::-webkit-scrollbar-corner {
    background: transparent !important;
}

/* Firefox - Forzato */
html,
body,
* {
    scrollbar-width: thin !important;
    scrollbar-color: rgba(255, 255, 255, 0.6) transparent !important;
}

/* Blackbox page specific */
body.blackbox-page,
body.blackbox-page *,
.blackbox-page,
.blackbox-page * {
    scrollbar-width: thin !important;
    scrollbar-color: rgba(255, 255, 255, 0.6) transparent !important;
}

/* === LOADING SCREEN === */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.active {
    opacity: 1;
    visibility: visible;
}

.loading-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.loading-logo {
    width: 200px;
    height: auto;
    animation: logoFade 2s ease-in-out infinite;
}

@keyframes logoFade {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 1rem;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    margin: 0;
}

/* === RESET E BASE === */
body.blackbox-page {
    margin: 0;
    padding: 0;
    background: #000000;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

/* Smooth scrolling per tutta la pagina */
html {
    scroll-behavior: smooth;
}

/* === HERO SECTION === */
.blackbox-hero {
    min-height: 78vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #000000;
    padding: 2rem;
    margin-bottom: 0;
    margin-bottom: -190px;
}

.blackbox-title {
    font-family: 'Inter', sans-serif;
    font-weight: 100;
    font-size: 4rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: #ffffff;
    margin: 0;
    margin-bottom: 3rem;
    text-align: center;
}

/* === REGOLAMENTO CONTENT === */
.blackbox-page .regolamento-content {
    background: #000000 !important;
    color: #ffffff !important;
}

.blackbox-page .regolamento-content .blackbox-sections {
    background: #000000 !important;
}

.blackbox-page .regolamento-content .content-section {
    background: #000000 !important;
}

.blackbox-page .regolamento-content .section-content {
    background: #000000 !important;
    color: #ffffff !important;
}

.blackbox-page .regolamento-content .regolamento-text {
    background: #000000 !important;
    color: #ffffff !important;
}

.blackbox-page .regolamento-content .regolamento-intro,
.blackbox-page .regolamento-content p,
.blackbox-page .regolamento-content li {
    color: rgba(255, 255, 255, 0.9) !important;
}

.blackbox-page .regolamento-content h3 {
    color: #ffffff !important;
    margin-top: 3rem !important;
    margin-bottom: 1.5rem !important;
}

.blackbox-page .regolamento-content ul {
    list-style-position: outside !important;
    padding-left: 0 !important;
    margin-left: 1.2em !important;
}

.blackbox-book-btn {
    display: inline-block;
    padding: 1rem 3rem;
    background: transparent;
    border: 1px solid #ffffff;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50px;
    margin-top: 0;
    margin-bottom: 0;
}

.blackbox-book-btn:hover {
    background: #ffffff;
    color: #000000;
    transform: translateY(-2px);
}

/* === INTRO CENTRALE DESKTOP === */
.blackbox-intro-central {
    background: #000000;
    padding: 6rem 10%;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
    margin-bottom: 250px;
}

.intro-central-text {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 1.1rem;
    line-height: 1.9;
    color: #ffffff;
    margin: 0 0 2rem 0;
    text-align: center;
}

.intro-central-text:last-child {
    margin-bottom: 0;
}

/* Nascondi su mobile */
@media (max-width: 768px) {
    .blackbox-intro-central {
        display: none !important;
    }
}

/* === INTRO SECTIONS CENTRALI - NASCOSTE === */
.blackbox-intro-sections {
    display: none;
}

/* === MOBILE CONTENT - DOPO PRENOTA === */
.blackbox-mobile-content {
    display: none; /* Nascosto su desktop */
}

@media (max-width: 768px) {
    /* SOLUZIONE DEFINITIVA ANTI-OVERFLOW */
    html {
        overflow-x: hidden !important;
    }
    
    body.blackbox-page {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* FORZA TUTTO A STARE DENTRO */
    body.blackbox-page *,
    body.blackbox-page *:before,
    body.blackbox-page *:after {
        box-sizing: border-box !important;
        overflow-wrap: break-word !important;
        word-wrap: break-word !important;
    }
    
    /* HEADER COMPATTO */
    body.blackbox-page .header-bar {
        width: 100% !important;
        padding: 0 0.5rem !important;
        overflow: hidden !important;
    }

    .blackbox-mobile-content {
        display: block !important;
        padding: 4rem 4% 1rem 4%; /* Aumentato padding-top per più spazio dopo PRENOTA */
        background: #000000;
        text-align: center;
        width: 100%;
        box-sizing: border-box;
        margin-top: 0; /* Assicura che inizi subito dopo la hero */
    }

    .mobile-intro-section,
    .mobile-about-section,
    .mobile-services-section,
    .mobile-rates-section {
        margin-bottom: 2.5rem; /* Ridotto spazio tra sezioni */
    }

    .mobile-section-title {
        font-family: 'Inter', sans-serif;
        font-weight: 400;
        font-size: 1.4rem;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: #ffffff;
        margin-bottom: 2rem;
        text-align: center;
    }

    .mobile-intro-text {
        font-family: 'Inter', sans-serif;
        font-weight: 300;
        font-size: 1rem;
        line-height: 1.7;
        color: #ffffff;
        margin-bottom: 1.5rem;
        text-align: center;
    }

    .mobile-features-list {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .mobile-features-list li {
        padding: 1rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        font-size: 0.9rem;
        letter-spacing: 0.03em;
        line-height: 1.6;
        color: #ffffff;
        text-align: center;
    }

    .mobile-features-list li:first-child {
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .mobile-min-booking {
        font-size: 0.85rem;
        font-style: italic;
        color: rgba(255, 255, 255, 0.5);
        margin-bottom: 2rem;
        padding-top: 2rem;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        text-align: center;
    }

    .mobile-rates-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 2rem;
    }

    .mobile-rate-item {
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 15px;
        padding: 1.5rem 1rem;
        text-align: center;
        transition: all 0.3s ease;
    }

    .mobile-rate-item h3 {
        font-family: 'Inter', sans-serif;
        font-size: 1rem;
        font-weight: 600;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        margin-bottom: 0.8rem;
        color: #ffffff;
    }

    .mobile-rate-item p {
        font-family: 'Inter', sans-serif;
        font-size: 0.9rem;
        color: rgba(255, 255, 255, 0.8);
        margin: 0;
        line-height: 1.5;
    }

    .mobile-regolamento-btn {
        display: inline-block;
        margin: 0 auto;
        padding: 0.8rem 2rem;
        background: transparent;
        border: 1px solid #ffffff;
        color: #ffffff;
        font-family: 'Inter', sans-serif;
        font-weight: 400;
        font-size: 0.75rem;
        letter-spacing: 0.15em;
        text-transform: uppercase;
        text-decoration: none;
        transition: all 0.3s ease;
    }

    .mobile-regolamento-btn:hover {
        background: #ffffff;
        color: #000000;
    }
}

/* Riduce spazio tra mobile content e galleria */
@media (max-width: 768px) {
    .blackbox-right-photos {
        margin-top: 1rem !important; /* Avvicina galleria al bottone regolamento */
    }
}

/* === INTRO SECTIONS NELLA SIDEBAR SINISTRA === */
.intro-section {
    margin-bottom: 6rem;
}

.intro-title-sidebar {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 1.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #ffffff;
    margin-bottom: 2rem;
    margin-top: 0;
    text-align: center;
}

.intro-text-sidebar {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.8;
    color: #ffffff;
    margin: 0 0 1.5rem 0;
    text-align: center;
}

/* === DESKTOP LAYOUT: UN SOLO SCROLL GLOBALE === */
.blackbox-desktop-layout {
    display: none; /* Nascosto su mobile */
    position: relative;
    width: 100%;
    display: flex;
    background: #000000;
    gap: 0;
    min-height: auto;
    align-items: flex-start;
    justify-content: center;
}

/* Left Content (38%) - Tutto il contenuto visibile, NO scrollbar */
.blackbox-left-content {
    width: 38%;
    padding: 8rem 4rem 4rem 6rem; /* Aumentato padding-top per più spazio dopo PRENOTA */
    background: #000000;
    position: sticky;
    top: 0;
    display: block;
    height: auto;
    overflow: visible;
    align-self: flex-start;
}

/* Remove navigation dots - non servono più */
.blackbox-nav-dots {
    display: none;
}

/* Container unico per tutto il contenuto testuale - TUTTO VISIBILE */
.blackbox-sections {
    width: 100%;
    position: relative;
    display: block;
    height: auto;
    overflow: visible;
}

/* Sezione unica che scorre normalmente con la pagina */
.content-section {
    margin-bottom: 0;
    opacity: 1;
    transform: none;
    height: auto;
    overflow: visible;
}

.section-title {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 1.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #ffffff;
    margin-bottom: 5rem;
    margin-top: 0;
    text-align: center;
}

.section-title:not(:first-child) {
    margin-top: 10rem;
}

.section-content {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.9;
    color: #ffffff;
    text-align: center;
}

/* Features List - ALTEZZA MASSIMA per allinearsi alle foto */
.features-list {
    list-style: none;
    padding: 0;
    margin: 0 0 12rem 0;
}

.features-list li {
    padding: 3rem 0;
    padding-left: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.95rem;
    letter-spacing: 0.03em;
    line-height: 1.6;
    color: #ffffff;
    transition: all 0.3s ease;
    position: relative;
}

.features-list li::before {
    content: "—";
    position: absolute;
    left: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    transition: color 0.3s ease;
}

.features-list li:first-child {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.features-list li:hover {
    padding-left: 2.5rem;
    color: rgba(255, 255, 255, 0.6);
}

.features-list li:hover::before {
    color: rgba(255, 255, 255, 1);
}

.features-list li.no-arrow {
    padding-left: 0;
}

.features-list li.no-arrow::before {
    content: none;
}

.features-list li.no-arrow:hover {
    padding-left: 0.5rem;
}

/* Rates Section - ALTEZZA MASSIMA per sincronizzare con foto */
.rates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.rate-item {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.rate-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.rate-item h3 {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    color: white;
}

.rate-item p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.min-booking {
    font-size: 1rem;
    font-weight: 500;
    color: white;
    text-align: center;
    margin-top: 1rem;
}

/* Right Photos (62%) - Scorrono con il flusso normale della pagina */
.blackbox-right-photos {
    width: 62%;
    padding: 8rem 6rem 4rem 4rem; /* Aumentato padding-top per allineamento con il testo */
    display: block;
    background: #000000;
}

.blackbox-photo-scroll {
    display: block;
    width: 100%;
    max-width: 850px;
    margin: 0 auto;
}

.blackbox-photo-item {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.06);
    margin-bottom: 6rem;
}

.blackbox-photo-item:last-child {
    margin-bottom: 0;
}

.blackbox-photo-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(255, 255, 255, 0.12);
}

.blackbox-photo-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease, opacity 0.3s ease;
    opacity: 0; /* Nascosta inizialmente */
}

.blackbox-photo-item img.loaded {
    opacity: 1; /* Visibile quando caricata */
}

.blackbox-photo-item:hover img {
    transform: scale(1.03);
}

/* Bottom CTA */
.blackbox-bottom-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem;
    text-align: center;
    background: #000000;
    width: 100%;
}

.blackbox-bottom-title {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 3rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    margin-bottom: 2rem;
    color: #ffffff;
}

.blackbox-book-btn-bottom {
    margin-top: 1rem;
}

/* Mobile Gallery - Hidden on Desktop */
.blackbox-gallery {
    display: none;
}

/* Mobile Central Links - Hidden on Desktop */
.mobile-central-links {
    display: none;
}

/* === SLIDE MENU PERSONALIZZATO PER BLACKBOX STUDIO === */
/* Su desktop, sposta il menu più in basso con background trasparente blurrato */
@media (min-width: 769px) {
    body.blackbox-page .slide-menu {
        top: 5rem !important;
        background: rgba(255, 255, 255, 0.1) !important;
        backdrop-filter: blur(20px) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
    }
}

/* Su mobile background trasparente blurrato */
@media (max-width: 768px) {
    body.blackbox-page .slide-menu {
        background: rgba(255, 255, 255, 0.15) !important;
        backdrop-filter: blur(15px) !important;
        border: 1px solid rgba(255, 255, 255, 0.25) !important;
    }
}

/* === MENU ITEMS BIANCO PER BLACKBOX STUDIO === */
/* Testo bianco per menu items */
body.blackbox-page .menu-item {
    color: rgba(255, 255, 255, 0.7) !important;
}

body.blackbox-page .menu-item:hover {
    color: rgba(255, 255, 255, 0.9) !important;
}

body.blackbox-page .menu-item.active {
    color: rgba(255, 255, 255, 1) !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

body.blackbox-page .menu-item::before {
    background: rgba(255, 255, 255, 0.05) !important;
}

/* === REGOLE SPECIFICHE PER GARANTIRE UNIFORMITÀ MENU === */
body.blackbox-page .slide-menu {
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    border-radius: 25px !important;
}

@media (min-width: 769px) {
    body.blackbox-page .slide-menu {
        background: rgba(255, 255, 255, 0.1) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        top: 6rem !important;
    }
}

/* Forza lo stile dei menu items */
body.blackbox-page .menu-item {
    color: rgba(255, 255, 255, 0.7) !important;
    background: transparent !important;
    font-weight: 400 !important;
    transition: all 0.3s ease !important;
}

body.blackbox-page .menu-item:hover {
    color: rgba(255, 255, 255, 0.9) !important;
    background: rgba(255, 255, 255, 0.05) !important;
    transform: translateX(5px) !important;
}

body.blackbox-page .menu-item.active {
    color: rgba(255, 255, 255, 1) !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

/* === FOOTER === */
body.blackbox-page .main-footer {
    position: relative !important;
    z-index: 250 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 1.5rem 1rem !important;
    background: transparent !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

body.blackbox-page .footer-left, 
body.blackbox-page .footer-right {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
}

body.blackbox-page .footer-center {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 1rem !important;
}

body.blackbox-page .footer-link {
    color: rgba(255, 255, 255, 0.7) !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 300 !important;
    font-size: 0.7rem !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
    cursor: none !important;
    text-decoration: none !important;
    transition: color 0.3s ease !important;
}

body.blackbox-page .footer-link:hover {
    color: rgba(255, 255, 255, 1) !important;
}

body.blackbox-page .footer-separator {
    color: rgba(255, 255, 255, 0.9) !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 400 !important;
    font-size: 0.7rem !important;
    letter-spacing: 0.1em !important;
    margin: 0 0.2rem !important;
}

body.blackbox-page .footer-credit-link {
    display: inline-flex !important;
    align-items: baseline !important;
    gap: 0.3rem !important;
    color: rgba(255, 255, 255, 1) !important;
    text-decoration: none !important;
    font-family: 'Inter', sans-serif !important;
    text-transform: uppercase !important;
    cursor: none !important;
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
    transform-style: preserve-3d !important;
    perspective: 1000px !important;
}

body.blackbox-page .footer-credit-link:hover {
    transform: rotateY(360deg) rotateX(15deg) !important;
}

body.blackbox-page .credit-by {
    font-weight: 200 !important;
    font-size: 0.6rem !important;
    letter-spacing: 0.1em !important;
    opacity: 0.8 !important;
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
}

body.blackbox-page .credit-twh {
    font-weight: 400 !important;
    font-size: 0.8rem !important;
    letter-spacing: 0.2em !important;
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
}

body.blackbox-page .footer-credit-link:hover .credit-twh {
    transform: rotateY(720deg) !important;
}

/* ==========================================
   MODAL FOTO
========================================== */

/* Modal Container */
#fullscreenModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow: hidden;
}

#fullscreenModal.active {
    opacity: 1;
    visibility: visible;
}

body.modal-open .header-bar,
body.modal-open .mobile-header {
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#fullscreenImage {
    cursor: pointer;
}

@media (max-width: 768px) {
    #fullscreenModal {
        z-index: 99999 !important;
    }
    
    body.modal-open .header-bar {
        z-index: -1 !important;
    }
}

#closeButton {
    display: none !important;
}

.modal-content {
    max-width: 95%;
    max-height: 95%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

#fullscreenImage {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
}

#fullscreenImage[src*="plan_blackbox.png"] {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    min-width: 80%;
}

#rotationHint {
    display: none;
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1.5rem;
}

/* Icona di rotazione centrata sotto l'immagine */
.rotation-icon {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    z-index: 10002;
}

.rotation-icon:hover {
    opacity: 1;
}

@media (max-width: 768px) and (orientation: portrait) {
    #rotationHint {
        display: block;
    }
    
    #fullscreenImage {
        max-height: 70vh;
    }
    
    .rotation-icon {
        bottom: -50px;
        width: 35px;
        height: 35px;
    }
}

/* ========================================
   RESPONSIVE: MOBILE
======================================== */
@media (max-width: 768px) {
    /* Hero */
    .blackbox-title {
        font-size: 2.5rem;
        margin-bottom: 0.5rem;
    }

    .blackbox-book-btn {
        font-size: 0.75rem;
        padding: 0.8rem 2rem;
        margin-bottom: 0;
    }

    .blackbox-hero {
        min-height: 50vh;
        padding: 2rem 5%;
        margin-bottom: -150px;
    }
    
    .blackbox-title {
        margin-bottom: 3rem;
        margin-top: 0; /* Assicura che il titolo non abbia margin-top extra */
    }

    .blackbox-intro-sections {
        display: block;
    }

    #homepage-intro {
        display: none;
    }

    .blackbox-intro-item {
        min-height: auto;
        padding: 3rem 5%;
    }

    .intro-title {
        font-size: 2rem;
        letter-spacing: 0.2em;
        margin-bottom: 2rem;
        text-align: center;
    }

    .intro-text {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 1rem;
        text-align: center;
    }

    .blackbox-desktop-layout {
        display: none !important;
    }

    .blackbox-content {
        display: block;
        width: 100%;
    }

    .blackbox-left-content {
        display: block !important;
        width: 100%;
        padding: 3rem 5% 2rem 5%;
    }

    .blackbox-sections {
        display: block;
    }

    .content-section {
        margin-bottom: 0;
    }

    .section-title {
        font-size: 1.4rem;
        letter-spacing: 0.1em;
        margin-bottom: 1.5rem;
        margin-top: 0;
        text-align: center;
    }

    .section-title:not(:first-child) {
        margin-top: 3rem;
    }

    .section-content {
        font-size: 0.95rem;
        line-height: 1.7;
        text-align: center;
    }

    .features-list {
        margin-bottom: 3rem;
    }

    .features-list li {
        font-size: 0.9rem;
        padding: 1rem 0;
        color: #ffffff;
    }

    .rate-item {
        padding: 1.5rem 1rem !important;
        background: rgba(255, 255, 255, 0.08) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        border-radius: 15px !important;
        text-align: center !important;
    }

    .rate-item h3 {
        font-size: 1rem !important;
        font-weight: 600 !important;
        letter-spacing: 0.05em !important;
        text-transform: uppercase !important;
        margin-bottom: 0.8rem !important;
        color: #ffffff !important;
        text-align: center !important;
    }

    .rate-item p {
        font-size: 0.9rem !important;
        color: rgba(255, 255, 255, 0.8) !important;
        margin: 0 !important;
        text-align: center !important;
        line-height: 1.5 !important;
    }

    .rates-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        margin-bottom: 2rem !important;
    }

    .min-booking {
        font-size: 0.85rem !important;
        font-weight: 500 !important;
        color: #ffffff !important;
        text-align: center !important;
        margin-top: 1rem !important;
        padding-top: 1.5rem !important;
    }

    .blackbox-right-photos {
        display: none;
    }

    .blackbox-gallery {
        display: block;
        padding: 5%;
        background: #000000;
        top: -200px;
        margin-bottom: -300px;
    }

    .gallery-title {
        font-family: 'Inter', sans-serif;
        font-weight: 400;
        font-size: 1.5rem;
        letter-spacing: 0.15em;
        text-transform: uppercase;
        text-align: center;
        margin-bottom: 2rem;
        color: #ffffff;
    }

    .gallery-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-bottom: 250px;
    }

    .gallery-item {
        position: relative;
        width: 100%;
        border-radius: 12px;
        overflow: hidden;
        cursor: pointer;
        transition: transform 0.3s ease;
        border: none !important;
        outline: none !important;
    }

    .gallery-item img {
        width: 100%;
        display: block;
        transition: opacity 0.3s ease;
        opacity: 0; /* Nascosta inizialmente */
        border: none !important;
        outline: none !important;
    }

    .gallery-item img.loaded {
        opacity: 1; /* Visibile quando caricata */
    }

    .blackbox-bottom-title {
        font-size: 2rem;
        letter-spacing: 0.3em;
        margin-bottom: 2rem;
    }

    .mobile-central-links {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 2rem 0;
        background: #000000;
    }

    .mobile-central-link {
        font-family: 'Inter', sans-serif;
        font-weight: 300;
        font-size: 0.7rem;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: #ffffff;
        text-decoration: none;
    }

    .mobile-separator {
        margin: 0 0.5rem;
        color: #ffffff;
    }

    body.blackbox-page .main-footer {
        display: flex !important;
        justify-content: center !important;
        padding: 1rem !important;
    }
    
    /* Nascondi MILAN su mobile */
    body.blackbox-page .main-footer .footer-left {
        display: none !important;
    }
    
    /* Nascondi footer-right su mobile */
    body.blackbox-page .main-footer .footer-right {
        display: none !important;
    }
    
    /* Mostra e centra solo footer-center su mobile */
    body.blackbox-page .main-footer .footer-center {
        display: flex !important;
        justify-content: center !important;
        gap: 0.5rem !important;
    }
    
    body.blackbox-page .footer-link {
        color: rgba(255, 255, 255, 0.8) !important;
        font-size: 0.65rem !important;
    }

    #closeButton {
        display: none !important;
        visibility: hidden !important;
    }

    #fullscreenImage {
        max-height: 70vh;
    }

    /* Rotation hint posizionato sotto la foto */
    #rotationHint {
        display: block !important;
        bottom: 40px !important;
        left: 50% !important;
        right: auto !important;
        top: auto !important;
        transform: translateX(-50%) !important;
        font-size: 1rem !important;
        padding: 10px 15px !important;
        border-radius: 25px !important;
        z-index: 99998 !important;
        color: white !important;
        text-align: center !important;
        width: auto !important;
        font-weight: 500 !important;
        letter-spacing: 0.5px !important;
    }

    /* Icona personalizzata con animazione di rotazione */
    #rotationHint:before {
        display: none !important;
    }

    /* Animazione di rotazione di 90 gradi */
    @keyframes rotatePhone {
        0% { transform: rotate(0deg); }
        50% { transform: rotate(90deg); }
        100% { transform: rotate(90deg); }
    }

    .regolamento-btn {
        display: inline-block;
        margin-top: 2rem;
        padding: 0.8rem 2rem;
        background: transparent;
        border: 1px solid #ffffff;
        color: #ffffff;
        font-family: 'Inter', sans-serif;
        font-weight: 400;
        font-size: 0.75rem;
        letter-spacing: 0.15em;
        text-transform: uppercase;
        text-decoration: none;
        border-radius: 50px;
        transition: all 0.3s ease;
    }

    .regolamento-btn:hover {
        background: #ffffff;
        color: #000000;
    }

    .mobile-only {
        display: block;
    }
}

/* Bottone Regolamento per Desktop */
.regolamento-btn {
    display: inline-block;
    margin: 2rem auto;
    padding: 0.8rem 2rem;
    background: transparent;
    border: 1px solid #ffffff;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.3s ease;
}

.regolamento-btn:hover {
    background: #ffffff;
    color: #000000;
}

@media (min-width: 769px) {
    .blackbox-desktop-layout {
        display: flex;
    }

    .mobile-only {
        display: none;
    }

    .blackbox-gallery {
        display: none;
    }

    .blackbox-bottom-cta {
        display: flex;
    }
}

/* === POLICY LINKS === */
.blackbox-policy-links {
    display: none !important;
}

.blackbox-policy-link {
    color: #ffffff !important;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 15px;
}

.blackbox-policy-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #cccccc !important;
}

.blackbox-separator {
    color: #cccccc;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 300;
}

@media (max-width: 768px) {
    .blackbox-policy-links {
        display: none !important;
    }
}

/* === LAYOUT PER GRANDI SCHERMI === */
@media (min-width: 1200px) {
    .blackbox-left-content {
        width: 38%;
        padding: 0 2rem 4rem 3rem;
        font-size: 0.9rem;
        position: sticky;
        top: 0;
        align-self: flex-start;
    }
    
    .blackbox-right-photos {
        width: 62%;
        padding: 0 3rem 4rem 2rem;
    }
    
    .blackbox-left-content .section-title {
        font-size: 1.4rem;
        margin-bottom: 3rem;
    }
    
    .blackbox-left-content .section-title:not(:first-child) {
        margin-top: 6rem;
    }
    
    .blackbox-left-content .features-list {
        margin: 0 0 8rem 0;
    }
    
    .blackbox-left-content .features-list li {
        padding: 2rem 0;
        font-size: 0.85rem;
        color: #ffffff;
    }
    
    .blackbox-left-content .rates-grid {
        gap: 4rem;
        margin-bottom: 4rem;
    }
    
    .blackbox-left-content .rate-item {
        padding-bottom: 2rem;
    }
    
    .blackbox-left-content .rate-item h3 {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .blackbox-left-content .rate-item p {
        font-size: 0.8rem;
    }
}

@media (min-width: 1600px) {
    .blackbox-desktop-layout {
        max-width: 1400px;
        margin: 0 auto;
        justify-content: space-between;
    }
    
    .blackbox-left-content {
        width: 35%;
        padding: 0 3rem 4rem 3rem;
        font-size: 1rem;
        position: sticky;
        top: 0;
        align-self: flex-start;
    }
    
    .blackbox-right-photos {
        width: 65%;
        padding: 0 3rem 4rem 3rem;
    }
    
    .blackbox-left-content .section-title {
        font-size: 1.6rem;
        margin-bottom: 4rem;
        letter-spacing: 0.12em;
    }
    
    .blackbox-left-content .section-title:not(:first-child) {
        margin-top: 8rem;
    }
}

/* === FOOTER VISIBILE === */
/* Ripristina il footer su Blackbox Studio - Solo Desktop */
@media (min-width: 769px) {
    html body.blackbox-page .main-footer {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        height: auto !important;
        overflow: visible !important;
    }

    html body.blackbox-page .main-footer .footer-center,
    html body.blackbox-page .main-footer .footer-left,
    html body.blackbox-page .main-footer .footer-link {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        height: auto !important;
        overflow: visible !important;
        color: #ffffff !important; /* Scritte bianche per Black Box */
    }

    html body.blackbox-page .main-footer .footer-link:hover {
        color: rgba(255, 255, 255, 0.7) !important;
    }

    html body.blackbox-page .main-footer .footer-credit-link {
        color: #ffffff !important;
    }
}

/* Nascondi solo i policy links duplicati se esistono */
html body.blackbox-page .blackbox-policy-links {
    display: none !important;
}

/* Schermi piccoli */
@media (max-width: 480px) {
    /* Tariffe mobile per schermi piccoli */
    .mobile-rates-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        margin-bottom: 2rem !important;
    }

    .mobile-rate-item {
        background: rgba(255, 255, 255, 0.08) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        border-radius: 15px !important;
        padding: 1.5rem 1rem !important;
        text-align: center !important;
    }

    .mobile-rate-item h3 {
        font-family: 'Inter', sans-serif !important;
        font-size: 1rem !important;
        font-weight: 600 !important;
        letter-spacing: 0.05em !important;
        text-transform: uppercase !important;
        margin-bottom: 0.8rem !important;
        color: #ffffff !important;
    }

    .mobile-rate-item p {
        font-family: 'Inter', sans-serif !important;
        font-size: 0.9rem !important;
        color: rgba(255, 255, 255, 0.8) !important;
        margin: 0 !important;
        line-height: 1.5 !important;
    }

    .mobile-min-booking {
        font-size: 0.85rem !important;
        color: rgba(255, 255, 255, 0.5) !important;
        text-align: center !important;
    }

    /* Tariffe desktop per schermi piccoli */
    .rate-item {
        padding: 1.5rem 1rem !important;
        background: rgba(255, 255, 255, 0.08) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        border-radius: 15px !important;
        text-align: center !important;
    }

    .rate-item h3 {
        font-size: 1rem !important;
        font-weight: 600 !important;
        letter-spacing: 0.05em !important;
        text-transform: uppercase !important;
        margin-bottom: 0.8rem !important;
        color: #ffffff !important;
        text-align: center !important;
    }

    .rate-item p {
        font-size: 0.9rem !important;
        color: rgba(255, 255, 255, 0.8) !important;
        margin: 0 !important;
        text-align: center !important;
        line-height: 1.5 !important;
    }

    .rates-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        margin-bottom: 2rem !important;
    }

    .min-booking {
        font-size: 0.85rem !important;
        font-weight: 500 !important;
        color: #ffffff !important;
        text-align: center !important;
        margin-top: 1rem !important;
        padding-top: 1.5rem !important;
    }
    
    /* Touch-friendly 3D effects for mobile footer in blackbox */
    body.blackbox-page .footer-credit-link:active {
        transform: rotateY(360deg) rotateX(15deg) !important;
    }
    
    body.blackbox-page .footer-credit-link:active .credit-twh {
        transform: rotateY(720deg) !important;
    }
}
