/* Gallery Styling */
.custom-gallery {
    padding: 50px 0;
    background-color: #f9f9f9;
    text-align: center;
}

.custom-gallery .gallery-header h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.custom-gallery .gallery-header p {
    color: #666;
    font-size: 1rem;
    margin-bottom: 40px;
}

/* Responsive Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 0 20px;
}

/* Fixed height and responsive images */
.gallery-grid img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.gallery-grid img:hover {
    transform: scale(1.05);
}

/* Lightbox Styling */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    flex-direction: column;
    padding: 20px;
}

.lightbox img {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 10px;
}

.close-lightbox {
    color: white;
    font-size: 2rem;
    position: absolute;
    top: 30px;
    right: 40px;
    cursor: pointer;
    z-index: 10000;
    font-weight: bold;
    transition: color 0.3s;
}

.close-lightbox:hover {
    color: #f33;
}

/* Optional: Improve text size on smaller screens */
@media (max-width: 600px) {
    .custom-gallery .gallery-header h2 {
        font-size: 1.8rem;
    }

    .custom-gallery .gallery-header p {
        font-size: 0.9rem;
    }

    .gallery-grid img {
        height: 180px;
    }
}

.gallery-grid {
    display: grid;
    gap: 20px;
    padding: 0 20px;
    
    /* Default: 1 column for small devices */
    grid-template-columns: repeat(1, 1fr);
}

/* Medium devices (tablets) */
@media (min-width: 600px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large devices (desktops and up) */
@media (min-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
