/* Gallery Styles */
.image-gallery {
    margin: 1.5em 0;
}

.gallery-item {
    position: relative;
    display: none;
    margin-bottom: 0.5em;
    text-align: center;
}

.gallery-item.active {
    display: block;
}

.gallery-image {
    max-width: 100%;
    height: auto;
    cursor: pointer;
}

.gallery-thumbnails {
    display: flex;
    gap: 0.5em;
    margin-top: 0.5em;
    flex-wrap: wrap;
    justify-content: center;
}

.gallery-thumbnail {
    width: 80px;
    height: 60px;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    border: 2px solid transparent;
}

.gallery-thumbnail:hover {
    opacity: 0.8;
}

.gallery-thumbnail.active {
    opacity: 1;
    border-color: #0066cc;
}

/* Lightbox Styles */
.gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
}

.gallery-lightbox.zone-prev {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><path d="M20 7 L11 16 L20 25" fill="none" stroke="black" stroke-opacity="0.5" stroke-width="6" stroke-linecap="round" stroke-linejoin="round"/><path d="M20 7 L11 16 L20 25" fill="none" stroke="white" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round"/></svg>') 16 16, w-resize;
}

.gallery-lightbox.zone-next {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><path d="M12 7 L21 16 L12 25" fill="none" stroke="black" stroke-opacity="0.5" stroke-width="6" stroke-linecap="round" stroke-linejoin="round"/><path d="M12 7 L21 16 L12 25" fill="none" stroke="white" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round"/></svg>') 16 16, e-resize;
}

.gallery-lightbox.zone-close {
    cursor: zoom-out;
}

.gallery-lightbox-content {
    position: relative;
    z-index: 10001;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.gallery-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    color: rgba(255, 255, 255, 0.85);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
    cursor: pointer;
    transition: color 0.2s ease;
    z-index: 10002;
}

.gallery-lightbox-nav svg {
    display: block;
    width: 34px;
    height: 34px;
}

.gallery-lightbox-nav:hover {
    color: #fff;
}

.gallery-lightbox-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    padding: 0;
    color: rgba(255, 255, 255, 0.85);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
    cursor: pointer;
    transition: color 0.2s ease;
    z-index: 10002;
}

.gallery-lightbox-close svg {
    display: block;
    width: 28px;
    height: 28px;
}

.gallery-lightbox-close:hover {
    color: #fff;
}

.gallery-lightbox-prev {
    left: -70px;
}

.gallery-lightbox-next {
    right: -70px;
}

@media (max-width: 768px) {
    .gallery-lightbox-prev {
        left: 10px;
    }
    
    .gallery-lightbox-next {
        right: 10px;
    }
    
    .gallery-lightbox-nav svg {
        width: 28px;
        height: 28px;
    }
    
    .gallery-thumbnail {
        width: 60px;
        height: 45px;
    }
}

.medium-zoom-overlay {
    z-index: 5
}

.medium-zoom-overlay + img {
    z-index: 6
}