/* Gallery Section */
#gallery {
    padding: 4rem 2rem;
    background-color: #fff;
    text-align: center;
}

.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto 3rem;
}

.gallery-item {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    aspect-ratio: 1; /* Square items */
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-cta {
    margin-top: 2rem;
}

/* Full Gallery Modal */
.full-gallery-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
    overflow: hidden;
}

.full-gallery-content {
    position: relative;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.close-full-gallery {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.close-full-gallery:hover {
    color: #ccc;
}

.full-gallery-content h2 {
    color: #fff;
    text-align: center;
    margin-bottom: 20px;
    font-size: 2rem;
}

.full-gallery-container {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    overflow-y: auto;
    padding: 10px;
}

.full-gallery-item {
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.full-gallery-item:hover {
    transform: scale(1.05);
}

.full-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 1;
}


/* Lightbox for individual image view */
.gallery-lightbox {
    display: none;
    position: fixed;
    z-index: 1002;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.98);
}

.gallery-lightbox-content {
    position: relative;
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80%;
    margin-top: 5%;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
}

.lightbox-nav-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 30px;
    padding: 15px 20px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.lightbox-nav-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* Lightbox/Modal for enlarged view */
.gallery-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
}

.gallery-modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    margin-top: 5%;
}

.close-gallery {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}