.image-gallery {
    width: 100%;
    margin: 2rem 0;
    position: relative;
}

.image-gallery__grid {
    display: grid;
    gap: 1rem;
    width: 100%;
}

/* 2 columns */
.image-gallery__grid--2-cols {
    grid-template-columns: repeat(2, 1fr);
}

/* 3 columns */
.image-gallery__grid--3-cols {
    grid-template-columns: repeat(3, 1fr);
}

/* 4 columns */
.image-gallery__grid--4-cols {
    grid-template-columns: repeat(4, 1fr);
}

.image-gallery__item {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
}

.image-gallery__thumb {
    width: 100%;
    height: 100%;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    display: block;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.image-gallery__thumb:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.image-gallery__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Lightbox Modal */
.image-gallery__lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-gallery__lightbox[aria-hidden="false"] {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.image-gallery__lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    cursor: pointer;
}

.image-gallery__lightbox-content {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.image-gallery__lightbox-img {
    max-width: 100%;
    max-height: calc(90vh - 60px);
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.image-gallery__lightbox-counter {
    color: #ffffff;
    font-family: 'Lexend', sans-serif;
    font-size: 14px;
    margin-top: 1rem;
    text-align: center;
}

.image-gallery__lightbox-close,
.image-gallery__lightbox-prev,
.image-gallery__lightbox-next {
    position: absolute;
    z-index: 2;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff !important;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, transform 0.3s ease;
    backdrop-filter: blur(10px);
}

.image-gallery__lightbox-close:hover,
.image-gallery__lightbox-prev:hover,
.image-gallery__lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.image-gallery__lightbox-close {
    top: 20px;
    right: 20px;
}

.image-gallery__lightbox-prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.image-gallery__lightbox-next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.image-gallery__lightbox-prev:hover,
.image-gallery__lightbox-next:hover {
    transform: translateY(-50%) scale(1.1);
}

.image-gallery__lightbox-close svg,
.image-gallery__lightbox-prev svg,
.image-gallery__lightbox-next svg {
    width: 32px;
    height: 32px;
    display: block;
    flex-shrink: 0;
    pointer-events: none;
    color: inherit;
}

.image-gallery__lightbox-close svg path,
.image-gallery__lightbox-prev svg path,
.image-gallery__lightbox-next svg path {
    stroke: currentColor !important;
    stroke-width: 2.5;
    fill: none;
    color: inherit;
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .image-gallery__grid--2-cols,
    .image-gallery__grid--3-cols,
    .image-gallery__grid--4-cols {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .image-gallery__lightbox-prev,
    .image-gallery__lightbox-next {
        width: 40px;
        height: 40px;
        padding: 6px;
    }
    
    .image-gallery__lightbox-prev svg,
    .image-gallery__lightbox-next svg {
        width: 28px;
        height: 28px;
    }
    
    .image-gallery__lightbox-prev {
        left: 10px;
    }
    
    .image-gallery__lightbox-next {
        right: 10px;
    }
    
    .image-gallery__lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        padding: 6px;
    }
    
    .image-gallery__lightbox-close svg {
        width: 28px;
        height: 28px;
    }
    
    .image-gallery__lightbox-img {
        max-height: calc(90vh - 40px);
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .image-gallery__grid--4-cols {
        grid-template-columns: repeat(3, 1fr);
    }
}

