body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f4f4f4;
    color: #333;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    text-align: center;
}

h1 {
    color: #007bff;
    margin-bottom: 10px;
}

p {
    margin-bottom: 30px;
    color: #666;
}

/* --- Gallery Grid --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    padding: 10px;
    background-color: #eee;
    border-radius: 5px;
}

.gallery-item {
    display: block; /* Make the entire link clickable */
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.gallery-item:hover {
    transform: translateY(-5px); /* Lift effect on hover */
}

.gallery-item img {
    width: 100%;
    height: 150px; /* Fixed height for thumbnails */
    object-fit: cover; /* Crop to fit */
    display: block;
    border-radius: 5px;
}

/* --- Lightbox Styles --- */
.lightbox {
    /* Hide by default */
    display: none;
    position: fixed; /* Fixed position relative to the viewport */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Semi-transparent black overlay */
    z-index: 1000; /* Ensure it's on top of other content */
    justify-content: center; /* Center content horizontally */
    align-items: center; /* Center content vertically */
    backdrop-filter: blur(5px); /* Optional: blur background for modern browsers */
    -webkit-backdrop-filter: blur(5px); /* For Safari */
}

/* Show lightbox when its ID matches the URL hash */
.lightbox:target {
    display: flex; /* Use flexbox to center content */
}

.lightbox-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    max-width: 90%; /* Max width relative to viewport */
    max-height: 90%; /* Max height relative to viewport */
    overflow: hidden; /* Hide overflow if image is too large */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%; /* Ensure image fits within its container */
    max-height: 80vh; /* Max height relative to viewport height */
    height: auto;
    display: block;
    border-radius: 5px;
}

.lightbox-content p {
    color: #333;
    margin-top: 15px;
    font-size: 1.1em;
    text-align: center;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #000;
    font-size: 40px;
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s ease;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #007bff;
    outline: none; /* Remove focus outline */
}



/* Hide scrollbar when lightbox is active (optional, for better UX) */
body:has(.lightbox:target) {
    overflow: hidden;
}