/* Gallery Section with Background */
.gallery-section {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 60px 20px;
    text-align: center;
}

.gallery-section h2 {
    color: #14285d;
    font-size: 2.8rem;
    margin-bottom: 40px;
    text-shadow: 1px 1px 6px rgba(0,0,0,0.6);
}
.gallery-block {
    margin: 50px 0; /* Adds vertical spacing between sections */
}

.gallery-heading {
    margin-bottom: 20px;
    text-align: center;
    color: #14285d;
    font-size: 1.6rem;
}

/* Grid Layout */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); /* wider cards */
    gap: 30px; /* more space between */
}

.gallery-item {
    cursor: pointer;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.25);
    background: #fff;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.35);
}

/* Image */
.gallery-item img {
    width: 100%;
    height: 320px; /* adjust height to balance width */
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

/* Video */
.gallery-item iframe {
    width: 100%;
    height: 320px; /* same height as image */
    border: none;
}
/* Title */
.gallery-title-below {
    padding: 12px;
    text-align: center;
    background: #f9f9f9;
    color: #2d6ef0;
    font-size: 1.2rem;
    font-weight: bold;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.lightbox img {
    max-width: 90%;
    max-height: 80%;
}

.lightbox-caption {
    margin-top: 15px;
    text-align: center;
    color: #fff;
    font-size: 1.2rem;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2.5rem;
    color: #fff;
    cursor: pointer;
}

/* ---------------- RESPONSIVE DESIGN ---------------- */

/* Tablets */
@media (max-width: 991px) {
    .gallery-section {
        padding: 40px 15px;
    }
    .gallery-section h2 {
        font-size: 2.2rem;
    }
    .gallery-item img,
    .gallery-item iframe {
        height: 250px;
    }
    .gallery-title-below {
        font-size: 1rem;
    }
}

/* Mobile Phones */
@media (max-width: 600px) {
    .gallery-section {
        padding: 30px 10px;
    }
    .gallery-section h2 {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }
    .gallery-grid {
        grid-template-columns: 1fr; /* single column */
    }
    .gallery-item img,
    .gallery-item iframe {
        height: 200px;
    }
    .gallery-title-below {
        font-size: 1rem;
    }
    .lightbox-caption {
        font-size: 1rem;
        padding: 0 10px;
    }
    .lightbox-close {
        font-size: 2rem;
        right: 15px;
    }
}
