/**
 * Single Exhibition Gallery Styles
 * Matches index.html styling but without infinite scrolling
 */

/* Background styling for show pages */
body {
    background-color: #e5e5e5; /* Light grey background */
    background-image: url('../img/logo-trost-filter-01.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #e5e5e5; /* Light grey background */
    z-index: -2;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/logo-trost-filter-01.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    opacity: 0.3; /* 30% opacity */
    z-index: -1;
}

/* Back button positioned automatically by flexbox in .frame__top-nav */

/* Exhibition Gallery Container */
.exhibition-gallery-container {
    position: relative;
    z-index: 100;
    padding: calc(1rem + 72px + 1rem + 3.5rem + 4rem) 0 4rem 0;
    margin: 0 1rem;
    width: calc(100% - 2rem);
    box-sizing: border-box;
    min-height: 100vh;
}

.exhibition-title {
    font-size: 2rem;
    font-weight: normal;
    text-transform: none;
    letter-spacing: normal;
    margin: 0 0 2rem 0;
    color: var(--color-text);
    font-family: "Times New Roman", Times, serif !important;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 2rem;
    flex-wrap: wrap;
}

.exhibition-title-text {
    font-family: "Times New Roman", Times, serif !important;
    font-size: var(--headline-font-size-desktop);
    line-height: var(--headline-line-height-desktop);
    letter-spacing: var(--headline-letter-spacing);
    flex: 1;
    min-width: 0;
    display: inline-block;
}

.exhibition-date {
    font-size: var(--headline-font-size-desktop);
    line-height: var(--headline-line-height-desktop);
    letter-spacing: var(--headline-letter-spacing);
    font-weight: normal;
    text-transform: none;
    color: var(--color-text);
    font-family: "Times New Roman", Times, serif !important;
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-block;
}

/* Exhibition Description */
.exhibition-description {
    padding: var(--button-inner-padding);
    text-align: left;
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    box-sizing: border-box;
    margin-bottom: 2rem;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-size: var(--font-size-desktop);
    line-height: 1.5;
    text-transform: uppercase;
    font-weight: normal;
    letter-spacing: 0.05em;
    word-spacing: 0.08em;
    font-family: inherit;
}

.exhibition-description p {
    margin: 0 0 1rem 0;
}

.exhibition-description p:last-child {
    margin-bottom: 0;
}

/* Desktop: disable collapsible behavior, show content always */
details.exhibition-description-collapsible {
    cursor: default;
}

details.exhibition-description-collapsible > summary {
    display: none;
}

details.exhibition-description-collapsible > .exhibition-description-content {
    display: block;
}

.exhibition-links {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.exhibition-links a {
    color: var(--color-text);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: opacity 0.3s ease;
    font-size: var(--font-size-desktop);
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: normal;
}

.exhibition-links a:hover {
    opacity: 0.7;
}

.exhibition-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    margin-bottom: 4rem;
    align-items: start;
    width: 100%;
}

.exhibition-figure {
    margin: 0;
    display: block;
}

/* Portrait images: stay in 2 columns */
.exhibition-figure--portrait {
    grid-column: span 1;
}

/* Landscape images: span full width (2 columns) */
.exhibition-figure--landscape {
    grid-column: span 2;
}

.exhibition-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    border-radius: 4px;
}

.exhibition-caption {
    margin-top: 1rem;
    font-size: var(--font-size-desktop);
    line-height: 1.5;
    color: var(--color-text);
    text-transform: uppercase;
    font-weight: normal;
    letter-spacing: 0.05em;
    word-spacing: 0.08em;
    text-align: left;
    font-family: inherit;
}

.exhibition-empty {
    text-align: center;
    color: var(--color-text);
    font-size: 0.875rem;
    padding: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Mobile responsive */
@media screen and (max-width: 52.99em) {
    /* Back button handled by .frame__top-nav in base.css */
    
    .exhibition-gallery-container {
        padding: calc(1rem + 72px + 1rem + 3.5rem + 4rem) 0 2rem 0;
        margin: 0 1rem;
        width: calc(100% - 2rem);
        box-sizing: border-box;
    }
    
    .exhibition-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
        flex-direction: row;
        align-items: baseline;
        gap: 1rem;
    }
    
    .exhibition-title-text {
        font-family: "Times New Roman", Times, serif !important;
        font-size: var(--headline-font-size-mobile);
        line-height: var(--headline-line-height-mobile);
        letter-spacing: var(--headline-letter-spacing);
        flex: 1;
        min-width: 0;
        display: inline-block;
    }
    
    .exhibition-date {
        font-size: var(--headline-font-size-mobile);
        line-height: var(--headline-line-height-mobile);
        letter-spacing: var(--headline-letter-spacing);
        font-family: "Times New Roman", Times, serif !important;
        flex-shrink: 0;
        display: inline-block;
    }
    
    .exhibition-description {
        font-size: var(--font-size-mobile);
        margin-bottom: 1.5rem;
    }
    
    /* Mobile collapsible description */
    details.exhibition-description-collapsible {
        cursor: pointer;
    }
    
    details.exhibition-description-collapsible:not([open]) {
        min-height: var(--button-height);
        line-height: 1;
    }
    
    details.exhibition-description-collapsible > summary {
        list-style: none;
        display: flex !important;
        align-items: center;
        gap: 0.5rem;
        line-height: 1;
    }
    
    details.exhibition-description-collapsible > summary::-webkit-details-marker {
        display: none;
    }
    
    .exhibition-description-label {
        flex-shrink: 0;
    }
    
    .exhibition-description-line {
        flex: 1;
    }
    
    .exhibition-description-toggle::after {
        content: '+';
        flex-shrink: 0;
    }
    
    details.exhibition-description-collapsible[open] .exhibition-description-toggle::after {
        content: '–';
    }
    
    .exhibition-description-content {
        margin-top: 0.75rem;
    }
    
    .exhibition-gallery {
        gap: 2rem;
        grid-template-columns: 1fr; /* Single column on mobile */
        width: 100%;
    }
    
    /* On mobile, all images are single column */
    .exhibition-figure--portrait,
    .exhibition-figure--landscape {
        grid-column: span 1;
    }
    
    .exhibition-caption {
        font-size: var(--font-size-mobile);
        margin-top: 0.75rem;
    }
}

/* Desktop adjustments - back button handled by .frame__top-nav in base.css */

