/* Container & Header */
.gallery-container {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 20px;
}
.gallery-header { text-align: center; margin-bottom: 40px; }

/* The Grid - Uniform sizes */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Image Wrapper - Forces same size */
.image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1; /* Makes them squares. Use 4 / 3 for rectangles */
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: #eee;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* KEY: Fills the area without stretching */
    transition: transform 0.5s ease;
}

/* Hover Effects */
.image-wrapper:hover img { transform: scale(1.1); }

.image-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
    color: white;
    text-align: center;
}

.image-wrapper:hover .image-overlay { opacity: 1; }

.hidden-desc { display: none; } /* Kept in DOM for JS to grab */

.view-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 16px;
    border: 2px solid white;
    border-radius: 20px;
    font-size: 0.8rem;
    text-transform: uppercase;
}

/* --- LIGHTBOX --- */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.lightbox.active { display: flex; }

.lightbox-content {
    max-width: 90%;
    max-height: 85vh;
    text-align: center;
}

#lightbox-img {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 8px;
    object-fit: contain;
}

#lightbox-caption { color: white; margin-top: 15px; }

.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
}