/* ===================================================
   MOSTRE.CSS — Exhibitions page styles
   =================================================== */

/* ---- Lista mostre ---- */
.mostre-list {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px 80px;
    display: flex;
    flex-direction: column;
    gap: 60px;
}

/* ---- Singolo box mostra ---- */
.mostra-box {
    background: transparent;
    border: 4px solid #ff00ff;
    padding: 0;
    overflow: hidden;
}

@keyframes invertPulse {
    0%   { filter: invert(0); }
    25%  { filter: invert(1); }
    50%  { filter: invert(0); }
    75%  { filter: invert(1); }
    100% { filter: invert(0); }
}

.locandina-pulse {
    animation: invertPulse 0.6s linear;
}

/* -- Top del box: locandina sx + info dx -- */
.mostra-top {
    display: flex;
    gap: 0;
    border-bottom: 4px solid #ff00ff;
}

.mostra-locandina {
    flex: 0 0 300px;
    max-width: 300px;
    border-right: 4px solid #ff00ff;
    overflow: hidden;
    display: flex;
    align-items: stretch;
}

.mostra-locandina img,
.mostra-locandina video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
    -webkit-user-drag: none;
    user-select: none;
}

.mostra-info {
    flex: 1;
    padding: 30px 32px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #ff00ff;
}

.mostra-titolo {
    font-family: 'Press Start 2P', monospace;
    font-size: 1.2rem;
    color: #ffff00;
    line-height: 1.6;
    margin-bottom: 4px;
    text-align: right;
}

.mostra-desc {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.75rem;
    color: #ffff00;
    line-height: 2;
    text-align: right;
}

.mostra-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
    padding-right: 8px;
}

.mostra-meta-row {
    display: block;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.68rem;
    line-height: 1.8;
    text-align: right;
}

.mostra-meta-label {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.68rem;
    color: #ffff00;
    white-space: nowrap;
    padding-top: 2px;
    min-width: 60px;
    margin-left: 14px;
}

.mostra-meta-value {
    color: #ffff00;
}

.mostra-social {
    margin-top: 10px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.mostra-social a {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.75rem;
    color: #ffff00;
    text-decoration: none;
    padding: 0;
    border: none;
    background: none;
    transition: color 0.2s;
}

.mostra-social a:hover {
    color: #00aa00;
    background: none;
    border: none;
}

/* -- Bottom del box: carousel foto -- */
.mostra-foto-wrap {
    position: relative;
    overflow: hidden;
    background: #000;
    padding: 0;
}

.mostra-foto-track {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 0;
    flex-wrap: nowrap;
}

.mostra-foto-track::-webkit-scrollbar {
    display: none;
}

.mostra-foto-track img {
    flex: 0 0 auto;
    height: 100%;
    width: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
    -webkit-user-drag: none;
    user-select: none;
    transition: filter 0.2s;
}

.foto-item {
    position: relative;
    flex: 0 0 220px;
    width: 220px;
    height: 260px;
    border-right: 2px solid #000;
    cursor: pointer;
    display: inline-flex;
    overflow: hidden;
}

.foto-item:last-child {
    border-right: none;
}

.foto-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 0, 255, 0.45);
    mix-blend-mode: screen;
    pointer-events: none;
    transition: opacity 0.2s;
}

.foto-item:hover::after {
    opacity: 0;
}

.foto-item:hover img {
    filter: invert(1);
}

/* nessuna sfumatura */

/* ---- Fullscreen overlay ---- */
#mostra-fullscreen {
    display: none;
    position: fixed;
    inset: 0;
    background: #ffff00;
    z-index: 3000;
    justify-content: center;
    align-items: center;
    touch-action: none;
    overflow: hidden;
}

#mostra-fullscreen.aperto {
    display: flex;
}

#mostra-fullscreen-img {
    width: calc(100vw - 80px);
    height: calc(100vh - 80px);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: block;
    -webkit-user-drag: none;
    user-select: none;
}

#mostra-fullscreen-chiudi {
    position: fixed;
    top: 16px;
    right: 24px;
    background: none;
    border: none;
    cursor: pointer;
    color: #ff00ff;
    font-family: 'Press Start 2P', monospace;
    font-size: 1.2rem;
    z-index: 3001;
    line-height: 1;
    transition: color 0.2s;
}

#mostra-fullscreen-chiudi:hover {
    color: #00aa00;
}

/* ---- Responsive ---- */
@media (max-width: 768px), (pointer: coarse) {
    .mostra-top {
        flex-direction: column;
    }

    .mostra-locandina {
        flex: none;
        max-width: 100%;
        width: 100%;
        height: 260px;
        border-right: none;
        border-bottom: 4px solid #ff00ff;
    }

    .mostra-titolo {
        font-size: 0.9rem;
    }

    .mostra-desc {
        font-size: 0.62rem;
    }

    .mostra-meta-row {
        font-size: 0.56rem;
        justify-content: flex-end;
        white-space: normal;
    }

    .mostra-meta-label {
        font-size: 0.56rem;
        min-width: 48px;
    }

    .mostra-locandina img,
    .mostra-locandina video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        object-position: bottom;
    }

    .mostra-titolo {
        font-size: 0.9rem;
    }

    .mostra-info {
        padding: 20px 18px;
    }

    .foto-item {
        flex: 0 0 160px;
        width: 160px;
        height: 180px;
    }

    #mostra-fullscreen-img {
        width: 100vw;
        height: calc(100vh - 60px);
    }

    #mostra-fullscreen-chiudi {
        top: 10px;
        right: 14px;
    }
}

/* ---- Tablet touch (≥601px) ---- */
@media (pointer: coarse) and (min-width: 601px) {
    .mostra-locandina {
        height: 620px;
    }
    .mostra-titolo {
        font-size: 1.4rem;
    }
    .mostra-desc {
        font-size: 0.95rem;
    }
    .mostra-meta-row {
        font-size: 0.85rem;
        line-height: 2.2;
    }
    .mostra-meta-label {
        font-size: 0.85rem;
    }
    .mostra-social a {
        font-size: 1rem;
    }
    .mostra-info {
        padding: 28px 28px;
        gap: 20px;
    }
    .foto-item {
        flex: 0 0 260px;
        width: 260px;
        height: 280px;
    }
    #mostra-fullscreen-chiudi {
        font-size: 2.4rem;
        top: 16px;
        right: 24px;
    }
}
