/* ============================================
   FONTS
   ============================================ */
@import url('https://fonts.cdnfonts.com/css/din-condensed');
@import url('https://fonts.cdnfonts.com/css/input-mono-condensed');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Input Mono Condensed', monospace;
    overflow: hidden;
    background-color: #ffffff;
    color: #2c2c2c;
}

/* ============================================
   PAGE TRANSITIONS
   ============================================ */
.page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

.page.active {
    opacity: 1;
    pointer-events: all;
}

/* ============================================
   COVER PAGE
   ============================================ */
#cover-page {
    background-image: url('images/web-hero.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #f5f5f0;
    overflow-y: auto;
}

/* Mobile version */
@media only screen and (max-width: 768px) {
    #cover-page {
        background-image: url('images/web-hero-mobile.jpg'); /* Your mobile image */
    }
}

.cover-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 4rem;
}

.cover-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.venue-name {
    font-family: 'Input Mono Condensed', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-weight: normal;
}

.dates {
    font-family: 'Input Mono Condensed', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
}

.cover-main {
    display: inline-block;
}

.exhibition-logo {
    max-width: 400px;
    width: 100%;
    height: auto;
    display: block;
    padding-top: 50px;
}

.artist-name {
    font-family: 'DIN Condensed', 'Arial Narrow', sans-serif;
    font-size: 2rem;
    letter-spacing: 0.05em;
    font-weight: normal;
    text-align: right;
    line-height: 0.8;
    margin-top: 0.5rem;
    width: 400px;
}

.by-line,
.name-line {
    display: block;
}

.cover-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.info-block {
    font-family: 'Input Mono Condensed', monospace;
    font-size: 0.75rem;
    line-height: 1.6;
}

.enter-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border: 2px solid #f5f5f0;
    background: transparent;
    color: #f5f5f0;
    font-family: 'DIN Condensed', 'Arial Narrow', sans-serif;
    font-size: 1.25rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.enter-btn:hover {
    background: #f5f5f0;
    color: #2c2c2c;
}

.enter-text {
    display: flex;
    flex-direction: column;
    line-height: 0.75;
    text-align: left;
}

.enter-line {
    display: block;
}

/* ============================================
   ARTWORK GALLERY PAGES
   ============================================ */
.artwork-page {
    background-color: #2c2c2c;
    color: #f5f5f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    overflow: hidden;
}

.gallery-nav {
    background: transparent;
    border: none;
    color: #f5f5f0;
    cursor: pointer;
    padding: 2rem;
    transition: opacity 0.3s ease;
    flex-shrink: 0;
    z-index: 10;
}

.gallery-nav:hover {
    opacity: 0.6;
}

.gallery-nav.prev {
    margin-left: 1rem;
}

.gallery-nav.next {
    margin-right: 1rem;
}

.gallery-content {
    flex: 1;
    max-width: 1200px;
    height: 100vh;
    margin: 0 auto;
    padding: 6rem 4rem 4rem 4rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.gallery-header {
    display: flex;
    flex-direction: column; /* Add this */
    justify-content: flex-start; /* Change from space-between */
    align-items: flex-start;
    gap: 0.5rem; /* Add this for spacing */
    flex-shrink: 0;
}

.gallery-year {
    font-family: 'Input Mono Condensed', monospace;
    font-size: 0.7rem; /* Same size as gallery-meta */
    letter-spacing: 0.05em;
}

.gallery-title {
    font-family: 'DIN Condensed', 'Arial Narrow', sans-serif;
    font-size: 2.5rem;
    line-height: 0.7;
    font-weight: normal;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    word-spacing: 9999px;
    /* Remove flex: 1; */
}

.gallery-counter {
    font-family: 'Input Mono Condensed', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    white-space: nowrap;
}

.gallery-grid {
    flex: 1;
    display: flex;
    gap: 1.5rem;
    align-items: center;  /* Change from flex-start to center */
    justify-content: center;
    max-height: calc(100vh - 250px);
}

.gallery-image {
    overflow: hidden;
    background: #1a1a1a;
    flex-shrink: 0;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Hero image (first/large image) */
.gallery-image.large {
    width: 300px;
    height: 225px;
}

/* Secondary images in vertical stack */
.gallery-image.small,
.gallery-image.medium {
    width: 150px;
    height: 150px;
}

/* Container for secondary images */
.gallery-grid .gallery-image:not(:first-child) {
    margin-top: 0;
}

.gallery-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex-shrink: 0;
}

.gallery-meta {
    font-family: 'Input Mono Condensed', monospace;
    font-size: 0.7rem;
    line-height: 1.6;
    letter-spacing: 0.05em;
}

.gallery-meta p {
    margin-bottom: 0.3rem;
}

/* ============================================
   END PAGE
   ============================================ */
#end-page {
    background-color: #2c2c2c;
    color: #f5f5f0;
}

.end-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    padding: 4rem;
    text-align: center;
}

.end-title {
    font-family: 'DIN Condensed', 'Arial Narrow', sans-serif;
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: bold;
}

.end-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-family: 'Input Mono Condensed', monospace;
    font-size: 0.875rem;
}

.end-exhibition {
    letter-spacing: 0.1em;
}

.end-details {
    font-size: 0.75rem;
    opacity: 0.6;
    padding-top: 2rem;
}

.view-again-btn {
    padding: 0.75rem 2rem;
    border: 2px solid #f5f5f0;
    background: transparent;
    color: #f5f5f0;
    font-family: 'Input Mono Condensed', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-again-btn:hover {
    background: #f5f5f0;
    color: #2c2c2c;
}

/* ============================================
   PROGRESS BAR
   ============================================ */
.progress-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: #444444;
    display: none;
    z-index: 100;
}

.progress-bar.show {
    display: block;
}

.progress-fill {
    height: 100%;
    background-color: #f5f5f0;
    transition: width 0.3s ease;
    width: 0%;
}

/* ============================================
   MAIN NAVIGATION MENU
   ============================================ */
.main-nav {
    position: fixed;
    top: 2rem;
    right: 2rem;
    display: flex;
    gap: 0.5rem;
    z-index: 1000;
}

.main-nav button {
    background: transparent;
    border: none;
    color: #f5f5f0;
    font-family: 'Input Mono Condensed', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    padding: 0.5rem 1rem;
    transition: opacity 0.3s ease;
}

.main-nav button:hover {
    opacity: 0.6;
}

body:has(.info-page.active) .main-nav button {
    color: #2c2c2c;
}

/* ============================================
   HAMBURGER MENU
   ============================================ */
.hamburger {
    position: fixed;
    top: 2rem;
    right: 2rem;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 0;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: #f5f5f0;
    transition: all 0.3s ease;
    display: block;
}

body:has(.info-page.active) .hamburger span {
    background: #2c2c2c;
}

.hamburger.active span {
    background: #f5f5f0 !important;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ============================================
   INFO PAGES
   ============================================ */
.info-page {
    background-color: #ffffff;
    color: #2c2c2c;
    overflow-y: auto;
}

.info-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: row;
}

.info-image {
    width: 45%;
    height: 100vh;
    overflow: hidden;
    position: sticky;
    top: 0;
}

.info-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.info-content {
    width: 55%;
    min-height: 100vh;
    padding: 6rem 5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    justify-content: center;
    position: relative;
}

.info-title {
    font-family: 'DIN Condensed', 'Arial Narrow', sans-serif;
    font-size: 2rem;
    line-height: 0.7;
    font-weight: normal;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    word-spacing: 9999px;
    margin-bottom: 0.5rem;
}

.info-text {
    font-family: 'Input Mono Condensed', monospace;
    font-size: 0.7rem;
    line-height: 1.8;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 500px;
}

.close-btn {
    position: fixed;
    top: 2rem;
    left: 2rem;

    width: 40px;
    height: 40px;

    background: #ffffff;
    border: 2px solid #ffffff;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    z-index: 1000;

    transition: transform 0.2s ease;
}

.close-btn:hover {
    transform: scale(1.08);
}

.close-btn span {
    position: absolute;
    width: 20px;
    height: 2px;
    background: #2c2c2c;
}

.close-btn span:first-child {
    transform: rotate(45deg);
}

.close-btn span:last-child {
    transform: rotate(-45deg);
}


.back-btn {
    display: none;
}

.info-nav {
    display: none;
}

.page {
    padding-bottom: calc(env(safe-area-inset-bottom) + 5rem);
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

@media only screen and (max-width: 768px) {
    .cover-content {
        padding: 1.5rem;
    }
    
    .cover-header {
        margin-bottom: 2rem;
    }
    
    .exhibition-logo {
        max-width: 280px;
    }
    
    .artist-name {
        width: 280px;
        font-size: 1.5rem;
    }
    
    .cover-footer {
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;
    }
    
    .info-block {
        font-size: 0.7rem;
    }
    
    .enter-btn {
        font-size: 1rem;
        padding: 0.75rem 1rem;
    }
    
    .artwork-page {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        overflow-y: auto;
    }
    
    .gallery-content {
        padding: 2rem 0.75rem;
        height: auto;
        min-height: 100vh;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center; /* This centers vertically */
        align-items: center; /* This centers horizontally */
    }
    
    .gallery-header {
        flex-direction: column;
        gap: 0.5rem;
        justify-content: flex-start;
        align-items: flex-start;
        flex-shrink: 0;
    }
    
    .gallery-title {
        font-size: 1.25rem;
        max-width: 100%;
    }
    
    .gallery-counter {
        align-self: flex-start;
        font-size: 0.65rem;
    }
    
    .gallery-grid {
        max-height: none !important;
        min-height: auto !important;
        height: auto !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 1rem;
        justify-content: center;
        align-items: flex-start;
        flex: 0 1 auto; /* Changed from flex: 1 */
        width: 100%; /* Added explicit width */
    }

    .gallery-image.large {
        width: 100% !important;
        max-width: 280px;
        height: auto !important;
        flex: 0 0 100%;
        margin: 0 auto; /* Center the large image */
    }

    .gallery-image.large img {
        width: 100%;
        height: auto !important;
        object-fit: contain !important;
        max-height: 280px;
    }

    .gallery-image.small,
    .gallery-image.medium {
        width: calc(50% - 0.5rem) !important; /* Make them sit side by side */
        max-width: 130px !important;
        height: auto !important;
        aspect-ratio: 1 / 1; /* Maintain square shape */
        flex: 0 0 calc(50% - 0.5rem);
    }

    .gallery-image.small img,
    .gallery-image.medium img {
        width: 100%;
        height: 100%;
        object-fit: cover !important;
        background: #1a1a1a;
    }
    
    .gallery-info {
        flex-shrink: 0;
        gap: 0.3rem;
    }
    
    .gallery-meta {
        font-size: 0.6rem;
        line-height: 1.4;
    }
    
    .gallery-meta p {
        margin-bottom: 0.1rem;
    }
    
    .hamburger {
        display: flex;
    }
    
    body:has(.info-page.active) .hamburger:not(.active) {
        background: #ffffff;
        border: 2px solid #ffffff;
        padding: 0.5rem;
    }
    
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 250px;
        height: 100vh;
        background: #2c2c2c;
        flex-direction: column;
        gap: 0;
        padding: 5rem 0 0 0;
        transition: right 0.3s ease;
    }
    
    .main-nav.open {
        right: 0 !important;
    }
    
    .main-nav button {
        border: none !important;
        border-bottom: 1px solid rgba(245, 245, 240, 0.2) !important;
        color: #f5f5f0 !important;
        padding: 1.5rem 2rem;
        text-align: left;
        background: transparent !important;
    }
    
    .main-nav button:hover {
        background: rgba(245, 245, 240, 0.1) !important;
        opacity: 1;
    }
    
    .info-layout {
        flex-direction: column;
    }
    
    .info-image {
        width: 100%;
        height: 40vh;
        position: relative;
    }
    
    .info-content {
        width: 100%;
        min-height: 60vh;
        padding: 3rem 2rem;
    }
}