section.image-gallery {
    padding: 70px 8%;
}

section.image-gallery .gallery-header {
    max-width: 500px;
    margin-bottom: 40px;
	color: var(--white);
}


section.image-gallery .gallery-header span {
        color: #8E869C;
}

section.image-gallery .gallery-header h2 {
		color: var(--white);
}

section.image-gallery .gallery-header p {
    margin-bottom: 0;
		color: var(--white);
}

section.image-gallery .gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

section.image-gallery .gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    cursor: pointer;
    background: #f4f4f4;
    aspect-ratio: 1 / 0.7;
}

section.image-gallery .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease;
}

section.image-gallery .gallery-item:hover img {
    transform: scale(1.05);
}

section.image-gallery .gallery-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.18), rgba(0,0,0,0));
    opacity: 0;
    transition: opacity 0.3s ease;
}

section.image-gallery .gallery-item:hover::after {
    opacity: 1;
}

/* Lightbox */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.gallery-lightbox.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.gallery-lightbox-inner {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: 100%;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.gallery-lightbox-stage {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gallery-lightbox-stage img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 14px;
}

.gallery-lightbox-close,
.gallery-lightbox-prev,
.gallery-lightbox-next {
    position: absolute;
    border: none;
    background: rgba(255,255,255,0.12);
    color: #fff;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 3;
}

.gallery-lightbox-close:hover,
.gallery-lightbox-prev:hover,
.gallery-lightbox-next:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.04);
}

.gallery-lightbox-close {
    top: 10px;
    right: 10px;
}

.gallery-lightbox-prev {
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.gallery-lightbox-next {
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.gallery-lightbox-prev:hover,
.gallery-lightbox-next:hover {
    transform: translateY(-50%) scale(1.04);
}

.gallery-lightbox-meta {
    color: #fff;
    text-align: center;
    padding-top: 20px;
    min-height: 54px;
}

.gallery-lightbox-meta p {
    margin: 0;
    color: #fff;
}

.gallery-lightbox-thumbs {
    margin-top: 20px;
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 6px 4px 10px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.gallery-lightbox-thumbs::-webkit-scrollbar {
    height: 8px;
}

.gallery-lightbox-thumbs::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.25);
    border-radius: 20px;
}

.gallery-lightbox-thumbs::-webkit-scrollbar-track {
    background: transparent;
}

.gallery-lightbox-thumb {
    flex: 0 0 auto;
    width: 72px;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.6;
    border: 2px solid transparent;
    transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.gallery-lightbox-thumb:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.gallery-lightbox-thumb.active {
    opacity: 1;
    border-color: #fff;
}
.gallery-lightbox-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

body.gallery-no-scroll {
    overflow: hidden;
}

@media screen and (max-width: 900px) {
    section.image-gallery .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    section.image-gallery {
        padding: 50px 5%;
    }

    section.image-gallery .gallery-grid {
        gap: 12px;
    }

    .gallery-lightbox {
        padding: 20px 12px;
    }

    .gallery-lightbox-prev,
    .gallery-lightbox-next {
        width: 46px;
        height: 46px;
    }

    .gallery-lightbox-thumb {
        width: 56px;
        height: 56px;
    }
}

@media screen and (max-width: 600px) {
    section.image-gallery .gallery-grid {
        grid-template-columns: 1fr;
    }
}