.responsive-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.gallery-item {
    position: relative;
    cursor: pointer;
	display: flex;
	flex-direction: column;
}

.gallery-item > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 3/2;
    background: #f5f5f5;
    display: block;
}

.gallery-item-title {
	font-size:--wp--preset--font-size--large: clamp(1.3rem, 1.3rem + ((1vw - 0.2rem) * 0.875), 2rem);
	font-style: normal;
	font-weight: 500;
    margin-top: 8px;
    color: #333;
    text-align: left;
    padding: 0 4px;
}

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

.gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
}

.gallery-lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 1rem;
    transition: background 0.3s ease;
    border-radius: 4px;
}

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

.lightbox-close {
    top: 1rem;
    right: 1rem;
    font-size: 3rem;
    line-height: 1;
    padding: 0.5rem 1rem;
}

.lightbox-prev {
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

/* Tablet */
@media (max-width: 768px) {
    .responsive-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .lightbox-prev,
    .lightbox-next {
        font-size: 1.5rem;
        padding: 0.5rem;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .responsive-gallery {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}