/* --- 1980s EXHIBIT GALLERY STYLING (Masonry Layout) --- */

html {
    scroll-behavior: smooth;
}

body {
    background-color: #000000;
    color: #ffffff;
    font-family: 'Open Sans', sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Page Container */
.gallery-main {
    padding-top: 180px; 
    padding-bottom: 100px;
    max-width: 1600px;
    margin: 0 auto;
    padding-left: 30px;
    padding-right: 30px;
}

/* Header */
.gallery-header {
    font-family: 'Montserrat', sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    color: #CFB53B; /* OLD GOLD */
    text-transform: uppercase;
    text-align: center;
    margin: 0 0 15px 0;
    letter-spacing: 4px;
    text-shadow: 4px 4px 0px rgba(255, 255, 255, 0.1);
}

.gold-bar {
    width: 120px;
    height: 6px;
    background-color: #CFB53B;
    margin: 0 auto 60px auto;
    border-radius: 3px;
}

/* --- MASONRY LAYOUT ENGINE --- */
.gallery-grid {
    column-count: 3; /* Creates 3 columns */
    column-gap: 20px; 
}

.gallery-item {
    break-inside: avoid; /* Prevents splitting images */
    margin-bottom: 20px; 
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    background-color: #111;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: auto; /* Maintains original aspect ratio */
    display: block; /* Removes tiny gap at bottom */
    transition: transform 0.6s ease;
}

/* --- HOVER EFFECTS --- */
.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(207, 181, 59, 0.25);
    z-index: 5;
    border: 1px solid #CFB53B;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* --- FLOATING BUTTONS --- */
.floating-btn {
    position: fixed;
    bottom: 30px;
    width: 50px;
    height: 50px;
    background-color: #CFB53B;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s, bottom 0.1s linear, background-color 0.3s;
}

.floating-btn.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.floating-btn:hover {
    background-color: white;
    color: #CFB53B;
    transform: scale(1.1);
    box-shadow: 0 6px 18px rgba(207, 181, 59, 0.4);
}

.btn-home { left: 30px; }
.btn-top { right: 30px; }

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 1100px) {
    .gallery-grid {
        column-count: 2; 
    }
}

@media (max-width: 700px) {
    .gallery-header { font-size: 2.2rem; }
    
    .gallery-grid {
        column-count: 1; 
    }
    
    .gallery-main {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .floating-btn { width: 45px; height: 45px; }
    .btn-home { left: 20px; }
    .btn-top { right: 20px; }
}