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

body {
    font-family: sans-serif;
}

header { text-align: center; margin-bottom: 2rem; }

/* THE RESPONSIVE GRID */
.gallery-grid {
    display: grid;
    gap: 15px;
    grid-template-columns: 1fr; /* Mobile: 1 column */
    max-width: 1200px;
    margin: 0 auto;
}

/* Tablet: 2 columns */
@media (min-width: 600px) {
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Desktop: 3 columns (Max) */
@media (min-width: 900px) {
    .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Image Styling */
.gallery-item {
    width: 100%;
    
    /* NEW: Forces the box to be a perfect 1:1 square */
    aspect-ratio: 1 / 1; 
    
    /* OLD but CRITICAL: Ensures the image fills the square without stretching */
    /* This will crop 16x9 images on the sides automatically */
    object-fit: cover; 
    
    /* REMOVED: height: 300px; <-- Delete this line if it exists! */
    height: auto; 

    /* border-radius: 8px; */
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    background-color: #ddd;
    transition: transform 0.2s;
    cursor: pointer;
    
    /* Animation (keep existing) */
    opacity: 0;
    animation: fadeIn 0.5s forwards;
}

.sentinel {
    text-align: center;
    padding: 40px;
    color: #666;
}

@keyframes fadeIn { to { opacity: 1; } }

/* LIGHTBOX STYLES */
.lightbox {
    display: none; /* Hidden by default */
    position: fixed; /* Stays in place when scrolling */
    z-index: 1000; /* Sits on top of everything */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* Dark semi-transparent background */
    justify-content: center;
    align-items: center;
}

/* The image inside the lightbox */
.lightbox img {
    max-width: 90%;
    max-height: 90%;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    /* border: 2px solid white; */
    border-radius: 0px;
}

/* The Close Button (x) */
.close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.close:hover {
    color: #bbb;
}

/* Add a pointer cursor to gallery items so people know to click */
.gallery-item {
    cursor: pointer;
}