/* Additional mobile-friendly styles for FancyBox */
.gallery-item {
    transition: all 0.3s ease-in-out !important;
    position: relative;
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.4));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    border-radius: 8px;
}

.gallery-item:hover::before {
    opacity: 1;
}

/* Make thumbnails larger on mobile */
@media (max-width: 480px) {
    .gallery-carousel {
        display: grid;
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .gallery-item {
        width: 100% !important;
        height: auto !important;
        margin: 0 auto;
    }
    
    .gallery-item img {
        width: 100%;
        height: auto;
        max-height: none;
        border-radius: 10px;
    }
    
    /* Improve mobile FancyBox view */
    .fancybox__container .fancybox__content {
        padding: 0;
    }
    
    .fancybox__slide {
        padding: 0;
    }
}

/* Improve FancyBox experience */
.fancybox__caption {
    font-size: 16px;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 5px;
    max-width: 80%;
    margin: 0 auto;
}

/* Video specific styles */
.fancybox__content video {
    width: 100%;
    height: auto;
    max-height: 90vh;
    display: block;
}

.fancybox__html5video {
    outline: none;
    width: 100%;
    height: 100%;
    max-width: 900px;
    margin: 0 auto;
}

/* Video controls styling */
.fancybox__content video::-webkit-media-controls {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
}

/* Improve play button visibility */
.play-button {
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

/* Improve preview size */
.f-thumbs__slide {
    height: auto !important;
}

.f-thumbs__slide__img {
    height: 80px !important;
    border: 2px solid transparent;
}

.is-nav-selected .f-thumbs__slide__img {
    border-color: #1a3a8f;
}