.backdrop-60 {
    background-color: rgba(0, 0, 0, 0.6);
}

.gallery-image {
    transition: transform 0.3s ease;
}

.gallery-image:hover {
    transform: scale(1.02);
}

.dialog-transition {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.dialog-enter {
    opacity: 0;
    transform: scale(0.9);
}

.dialog-active {
    opacity: 1;
    transform: scale(1);
}

.pdf-container {
    width: 100%;
    height: 100%;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.zoomable {
    transform-origin: 0 0;
    transition: transform 0.1s;
    cursor: grab;
    max-width: 100%;
    max-height: 100%;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    /* Crucial: disable default touch actions */
}

.zoomable:active {
    cursor: grabbing;
}

.grid-item {
    position: relative;
    overflow: hidden;
    border-radius: 0.375rem;
}

.grid-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 30%);
    opacity: 0;
    transition: opacity 0.3s;
}

.grid-item:hover::after {
    opacity: 1;
}

.file-icon {
    font-size: 3rem;
    color: #4f46e5;
}

.current-slide-indicator {
    transition: all 0.3s ease;
}

/* Slick Slider Custom Styles */
.slick-slider {
    width: 100%;
    height: 100%;
    position: relative;
}

.slick-list {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.slick-track {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
    position: relative;
    left: 0;
    top: 0;
}

.slick-slide {
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    outline: none;
}

.slick-slide > div {
    width: 100%;
    height: 100%;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.slick-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    margin: 0 auto;
    pointer-events: auto;
}

/* Image container for proper event handling */
.image-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: pan-y pinch-zoom;
}

.slick-prev,
.slick-next {
    z-index: 40;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.7) !important;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.slick-prev:hover,
.slick-next:hover {
    background: rgba(0, 0, 0, 0.9) !important;
    transform: scale(1.1);
}

.slick-prev:before,
.slick-next:before {
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 900;
    font-size: 24px;
    color: white;
    opacity: 1;
}

.slick-prev:before {
    content: '\f060' !important;
}

.slick-next:before {
    content: '\f061' !important;
}

.slick-prev {
    left: 25px !important;
}

.slick-next {
    right: 25px !important;
}

.slick-dots {
    bottom: 20px !important;
    z-index: 40;
}

.slick-dots li button:before {
    color: white;
    opacity: 0.5;
    font-size: 12px;
}

.slick-dots li.slick-active button:before {
    color: white;
    opacity: 1;
}

/* Zoom overlay and controls */
.zoom-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 25;
    pointer-events: none;
}

.zoom-controls {
    position: absolute;
    bottom: 30px;
    right: 30px;
    z-index: 40;
    display: flex;
    gap: 10px;
    pointer-events: auto;
}

.zoom-controls button {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.zoom-controls button:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.zoom-level-indicator {
    position: absolute;
    top: 25px;
    right: 25px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 40;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.zoom-level-indicator.show {
    opacity: 1;
}

.slide-counter {
    position: absolute;
    top: 25px;
    left: 25px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 40;
    font-weight: 500;
}

/* Non-image slides */
.non-image-slide {
    width: 100%;
    height: 100%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.media-preview {
    width: 100%;
    max-width: 800px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

/* Thumbnail gallery */
.thumbnail-slider {
    margin: 0 -5px;
}

.thumbnail-slider .slick-slide {
    padding: 0 5px;
}

.thumbnail-item {
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s;
    opacity: 0.6;
}

.thumbnail-item.slick-current {
    border-color: #4f46e5;
    opacity: 1;
    transform: scale(1.05);
}

.thumbnail-item:hover {
    opacity: 1;
    transform: scale(1.05);
}

/* Pull to close */
.pull-to-close-indicator {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 3px;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 40;
}

/* Zoom mode indicator */
.zoom-mode-indicator {
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    z-index: 40;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.zoom-mode-indicator.show {
    opacity: 1;
}

/* Prevent text selection during drag */
.no-select {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Drag mode cursor */
.drag-mode {
    cursor: grab !important;
}

.drag-mode:active {
    cursor: grabbing !important;
}

/* Image wrapper for zoom */
.image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Double tap hint */
.double-tap-hint {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 35;
}

.double-tap-hint.show {
    opacity: 1;
}

.gallery-frame-container {
    /*border: 1px solid red;*/
}

.gallery-frame-wrapper {
    /*border: 1px solid red;*/
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100%;
    padding-top: 56.25%;
    /* 16:9 Aspect Ratio (divide 9 by 16 = 0.5625) */
}

.gallery-frame-window {
    /*border: 1px solid red;*/
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
}

@media (max-width: 768px) {
    #mainSlider .slick-track {
        transform: translate3d(0, 0, 0) !important;
    }

    #mainSlider .slick-slide:not(.slick-active) {
        opacity: 0;
        visibility: hidden;
        display: none !important;
    }
}

#mainSliderSwiper {
    /*border: 1px solid red;*/
    height: 100%;
    width: 100%;
}

#mainSliderSwiperWrapper {
    /*border: 1px solid red;*/
    height: 100%;
    width: 100%;
}

#mainSliderSwiperWrapper .swiper-slide {
    /*border: 1px solid red;*/
    height: 100%;
    width: 100%;
}

#mainSliderSwiperWrapper .iframe-container {
    /*border: 1px solid red;*/
    height: 100%;
    width: 100%;
    padding: 20px;
}

#mainSliderSwiperWrapper .iframe-container iframe {
    /*border: 1px solid red;*/
    border: 0;
    width: 100%;
    height: 100%;
}

#mobileThumbnailSlider div.slick-list {
    /*border: 1px solid red;*/
    padding: 20px;
}

#mobileThumbnailSlider img {
    /*border: 1px solid red;*/
    max-height: 150px;
    width: auto;
}

.fma_joomla6_photo_gallery_con {
    /*border: 1px solid red;*/
    margin-top: 2rem;
}
