/* SW GALLERY - FIXED VERSION */

/* Smooth lightbox transitions */
.sw-lightbox-open {
    overflow: hidden !important;
    transition: padding-right 0.2s ease !important;
}

/* Lightbox overlay */
#sw-simple-lightbox {
    animation: fadeIn 0.2s ease;
}

.sw-lightbox-close:hover {
    background: rgba(255,255,255,0.2) !important;
    border-color: white !important;
    transform: scale(1.1);
}

/* Gallery Container */
.sw-gallery-container {
    display: grid;
    gap: 10px;
    max-width: 100%;
    box-sizing: border-box;
}

.media-item {
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    aspect-ratio: 1/1;
    border: none !important;
    outline: none !important;
}

.aspect-16-9 .media-item {
    aspect-ratio: 16/9;
}

.aspect-9-16 .media-item {
    aspect-ratio: 9/16;
}

.media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border: none !important;
    outline: none !important;
}

/* Video Styles */
.video-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.video-cover-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.video-cover {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    top: 0;
    left: 0;
    z-index: 3;
    background: #fff;
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.video-cover.hidden {
    opacity: 0;
}

.video-player {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.video-player iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* Loading Animation */
#gallery-loading {
    display: none;
    text-align: center;
    padding: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .sw-gallery-container {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Fallback for browsers without aspect-ratio support */
@supports not (aspect-ratio: 1/1) {
    .media-item {
        padding-bottom: 100%;
        height: 0;
    }
    .aspect-16-9 .media-item {
        padding-bottom: 56.25%;
    }
    .aspect-9-16 .media-item {
        padding-bottom: 177.78%;
    }
    .media-item > * {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Ensure no theme interference */
body.sw-lightbox-open {
    overflow: hidden !important;
    position: static !important;
    top: auto !important;
    left: auto !important;
}
/* ============================================
   SLIDESHOW LIGHTBOX STYLES
   ============================================ */

.sw-slideshow-open {
    overflow: hidden !important;
    transition: padding-right 0.2s ease !important;
}

/* Slideshow overlay */
.sw-slideshow-overlay {
    animation: fadeIn 0.2s ease;
}

/* Navigation buttons */
.sw-slideshow-prev,
.sw-slideshow-next,
.sw-slideshow-close {
    transition: all 0.2s ease !important;
}

.sw-slideshow-prev:hover,
.sw-slideshow-next:hover {
    background: rgba(255,255,255,0.2) !important;
    border-color: white !important;
    transform: translateY(-50%) scale(1.1) !important;
}

.sw-slideshow-close:hover {
    background: rgba(255,255,255,0.2) !important;
    border-color: white !important;
    transform: scale(1.1) !important;
}

/* Image transitions */
.sw-slideshow-image {
    transition: opacity 0.3s ease !important;
}

/* Counter */
.sw-slideshow-counter {
    font-family: Arial, sans-serif;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Ensure no theme interference */
body.sw-slideshow-open {
    overflow: hidden !important;
    position: static !important;
    top: auto !important;
    left: auto !important;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .sw-slideshow-prev,
    .sw-slideshow-next {
        width: 40px !important;
        height: 40px !important;
        font-size: 16px !important;
    }
    
    .sw-slideshow-prev {
        left: 10px !important;
    }
    
    .sw-slideshow-next {
        right: 10px !important;
    }
    
    .sw-slideshow-close {
        top: 10px !important;
        right: 10px !important;
    }
    
    .sw-slideshow-counter {
        font-size: 14px !important;
        padding: 6px 12px !important;
    }
}
/* ============================================
   ENHANCED LIGHTBOX WITH TOUCH FEATURES
   ============================================ */

.sw-enhanced-open {
    overflow: hidden !important;
    transition: padding-right 0.2s ease !important;
}

/* Enhanced overlay */
.sw-enhanced-overlay {
    animation: fadeIn 0.2s ease;
    cursor: default;
}

/* Image wrapper for zooming */
.sw-image-wrapper {
    overflow: hidden;
    transition: transform 0.3s ease;
}

.sw-enhanced-image {
    transition: transform 0.1s linear, opacity 0.3s ease !important;
    will-change: transform;
}

/* BIG ARROWS WITHOUT CIRCLES */
.sw-enhanced-prev,
.sw-enhanced-next {
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
    font-family: Arial, sans-serif !important;
    font-weight: 300 !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5) !important;
}

.sw-enhanced-overlay:hover .sw-enhanced-prev,
.sw-enhanced-overlay:hover .sw-enhanced-next {
    opacity: 0.7 !important;
}

.sw-enhanced-prev:hover,
.sw-enhanced-next:hover {
    opacity: 1 !important;
    background: linear-gradient(to right, rgba(0,0,0,0.9), transparent) !important;
}

.sw-enhanced-next:hover {
    background: linear-gradient(to left, rgba(0,0,0,0.9), transparent) !important;
}

/* Close button */
.sw-enhanced-close:hover {
    background: rgba(0,0,0,0.8) !important;
    transform: scale(1.1) !important;
}

/* Zoom controls */
.sw-zoom-controls {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.sw-enhanced-overlay:hover .sw-zoom-controls {
    opacity: 1;
}

.sw-zoom-in:hover,
.sw-zoom-out:hover,
.sw-reset-zoom:hover {
    background: rgba(0,0,0,0.8) !important;
    transform: scale(1.1);
}

/* Counter */
.sw-enhanced-counter {
    font-family: Arial, sans-serif;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Touch feedback */
.sw-enhanced-image:active {
    cursor: grabbing;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    /* Bigger touch targets for mobile */
    .sw-enhanced-prev,
    .sw-enhanced-next {
        width: 60px !important;
        font-size: 60px !important;
        opacity: 0.5 !important;
    }
    
    .sw-enhanced-close {
        width: 50px !important;
        height: 50px !important;
        font-size: 30px !important;
        top: 10px !important;
        right: 10px !important;
    }
    
    .sw-zoom-controls {
        bottom: 10px !important;
        right: 10px !important;
    }
    
    .sw-zoom-in,
    .sw-zoom-out,
    .sw-reset-zoom {
        width: 40px !important;
        height: 40px !important;
        font-size: 24px !important;
    }
    
    .sw-enhanced-counter {
        top: 10px !important;
        left: 10px !important;
        padding: 8px 16px !important;
        font-size: 16px !important;
    }
}

/* Disable text selection */
.sw-enhanced-overlay * {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Ensure no theme interference */
body.sw-enhanced-open {
    overflow: hidden !important;
    position: static !important;
    top: auto !important;
    left: auto !important;
}