/* Components Styles */
.text-box {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ececec;
    transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease;
    z-index: 100;
    padding: 5vh 5vw;
    box-sizing: border-box;
    overflow: auto;
    transform: translateY(100%);
}

.text-box.active {
    transform: translateY(0);
}

.text-box-content {
    height: auto;
    overflow-y: auto;
    padding-right: 3vw;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.3) transparent;
    scroll-behavior: smooth;
}

.text-box.active .text-box-content h2 {
    display: none;
}

.text-box-content::-webkit-scrollbar {
    width: 0.5vh;
}

.text-box-content::-webkit-scrollbar-track {
    background: transparent;
}

.text-box-content::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0);
    border-radius: 0.5vh;
    transition: background 0.2s ease;
}

.text-box-content.scrolling::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
}

.text-box h2 {
    margin-top: 0;
    font-size: 3vh;
    font-weight: 300;
    text-transform: lowercase;
}

.text-box p {
    line-height: 1.5em;
    margin-bottom: 1.5em;
    max-width: 100%;
    word-wrap: break-word;
    font-size: 1.8vh;
    font-weight: 200;
}

.home-gallery {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5;
    transition: opacity 0.3s ease;
}

.home-gallery-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: auto;
    height: auto;
    position: relative;
}

.home-gallery-box {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    max-width: calc(87vw - 13%);
    height: 75vh;
}

.home-gallery-photo {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    display: block;
}

.single-photo-container {
    position: fixed;
    top: 50%;
    right: 13%;
    transform: translateY(-50%);
    width: auto;
    height: auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    z-index: 5;
    transition: opacity 0.3s ease;
}

.single-photo-box {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    position: relative;
    max-width: calc(87vw - 13%);
    height: 75vh;
}

.single-photo {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    margin-left: auto;
    display: block;
}
.nav-arrow, .home-nav-arrow {
    display: none !important;
}

.image-navigation-overlay {
    position: absolute;
    top: 0;
    height: 75vh;
    z-index: 5;
    cursor: default; 
    transition: none;
    overflow: hidden;
}

.image-navigation-overlay.nav-overlay-left {
    cursor: w-resize; 
}

.image-navigation-overlay.nav-overlay-right {
    cursor: e-resize; 
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #222;
    color: #fff;
    font-style: italic;
    font-size: 1.5vh;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
}

.filename-display {
    font-size: 1.8vh;
    font-weight: 200;
    color: #171717;
    z-index: 15;
    opacity: 1;
    line-height: 1.4;
    max-width: 40vw;
    word-break: none;
    position: fixed;
    bottom: 3vh; 
    right: 3vw;  
    text-align: right; 
    max-width: 250px; 
    white-space: normal; 
}

.right-text-box {
    position: fixed;
    top: 37.5%;
    left: 18%;
    transform: translateY(-50%);
    width: 20vw;
    max-height: 70vh;
    background: #ececec;
    padding: 3vh 2vw;
    box-sizing: border-box;
    overflow: auto;
    z-index: -10;
    display: none;
    border-radius: 4px;
}

.right-text-content {
    text-align: right;
    font-size: 1.6vh;
    line-height: 1.6;
    color: #171717;
}

.right-text-content p {
    margin-bottom: 1.5em;
    font-weight: 200;
}

.right-text-box.visible {
    display: block;
}

.right-text-box::-webkit-scrollbar {
    width: 0.4vw;
}

.right-text-box::-webkit-scrollbar-track {
    background: transparent;
}

.right-text-box::-webkit-scrollbar-thumb {
    background: rgba(214, 214, 214, 0.4);
    border-radius: 0.4vw;
}

.right-text-box::-webkit-scrollbar-thumb:hover {
    background: rgba(214, 214, 214, 0.6);
}

.image-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: fit-content; 
    max-width: 100%;
    margin: 0 auto; 
}

.image-shield {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background: transparent;
    pointer-events: auto;
}

.home-progress-bar {
    width: 100%;
    height: 4px;
    background: transparent;
    margin-top: 2px;
    flex-shrink: 0;
}

.home-progress-fill {
    height: 100%;
    width: 0%;
    background: #171717;
}

/* Nasconde la didascalia quando i pannelli sono attivi */
body:has(.about-panel.active, #exhibitions-panel.active, #contact-panel.active) .filename-display {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* === EXHIBITIONS — LAYOUT DESKTOP: TITOLI SX / CONTENUTO DX === */
.exhibitions-panel {
    overflow: hidden !important;
    padding: 0 !important;
}

.exhibitions-layout {
    display: flex;
    width: 100%;
    height: 100%;
}

.exhibitions-sidebar {
    width: 22vw;
    min-width: 220px;
    max-width: 300px;
    border-right: none;
    padding: 5vh 2vw 5vh 3vw;
        padding-top: 13vh;   /* ← cambia questo valore */

    overflow-y: auto;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.exhibitions-sidebar-label {
    font-size: 2.5vh;
    font-weight: 300;
    text-transform: lowercase;
    margin-bottom: 3vh;
    color: #171717;
}

.exhibitions-titles-list {
    display: flex;
    flex-direction: column;
    gap: 0.5vh;
}

.exhibition-title-item {
    font-size: 2vh;
    font-weight: 200;
    padding: 1.2vh 0;
    cursor: pointer;
    transition: opacity 0.2s, border-color 0.2s;
    border-bottom: none;
    color: #171717;
}

.exhibition-title-item:hover {
    opacity: 0.6;
}

.exhibition-title-item.active {
    font-weight: 400;
    border-bottom: none;
}

.exhibitions-stage {
    flex: 1;
    padding: 5vh 4vw;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

.exhibitions-stage-placeholder {
    font-size: 2vh;
    font-weight: 200;
    color: #999;
    text-align: center;
}

.exhibitions-stage-content {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    display: none;
}

.exhibit-media-viewport {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
}

.exhibit-media-wrapper {
    position: relative;
    width: auto;
    height: 55vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #171717;
    overflow: hidden;
}

.exhibit-media {
    max-width: 100%;
    max-height: 55vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.exhibit-media-wrapper video {
    max-width: 100%;
    max-height: 55vh;
    width: auto;
    height: auto;
    display: block;
}

.exhibit-skip-video {
    display: none;
    align-items: center;
    gap: 8px;
    margin-top: 2vh;
    padding: 0;
    background: none;
    border: none;
    color: #171717;
    font-family: 'IBM Plex Sans Condensed', sans-serif;
    font-size: 1.6vh;
    font-weight: 200;
    cursor: pointer;
    text-transform: lowercase;
}

.exhibit-skip-video:hover {
    opacity: 0.6;
}

.skip-arrow {
    font-size: 2vh;
}

.exhibit-stage-caption {
    margin-top: 2vh;
    font-size: 1.6vh;
    font-weight: 200;
    line-height: 1.5;
    color: #171717;
    max-width: 600px;
}


/* Contact Form Styles */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 2vh;
    width: 100%;
    max-width: 400px;
    margin-top: 2vh;
}

.contact-form input,
.contact-form textarea {
    background: transparent;
    border: 1px solid #171717;
    padding: 1.5vh;
    font-family: 'IBM Plex Sans Condensed', sans-serif;
    font-size: 1.8vh;
    font-weight: 200;
    color: #171717;
    border-radius: 2px;
    outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: #777;
}

.contact-form button {
    background: #171717;
    color: #ececec;
    border: none;
    padding: 1.5vh;
    font-family: 'IBM Plex Sans Condensed', sans-serif;
    font-size: 1.8vh;
    font-weight: 300;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border-radius: 2px;
    margin-top: 1vh;
}

.contact-form button:hover {
    background-color: #333;
}

/* Instagram Icon Style */
#btn-socials {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
}

#btn-socials svg {
    transition: stroke 0.3s ease;
}

#btn-socials:hover svg {
    stroke: #ececec;
}
