/* ========================================
   Owl Carousel - Complete Modern Rewrite
   Optimized for Performance & Modern Browsers
   ======================================== */

/* Core Container */
.owl-carousel {
    display: block !important;
    width: 100%;
    position: relative;
    z-index: 1;
    -webkit-tap-highlight-color: transparent;
}

    /* Stage & Items */
    .owl-carousel .owl-stage {
        position: relative;
        touch-action: manipulation;
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }

        .owl-carousel .owl-stage:after {
            content: "";
            display: table;
            clear: both;
        }

    .owl-carousel .owl-stage-outer {
        position: relative;
        transform: translateZ(0);
    }

    .owl-carousel .owl-wrapper,
    .owl-carousel .owl-item {
        transform: translateZ(0);
        backface-visibility: hidden;
    }

    .owl-carousel .owl-item {
        position: relative;
        float: left;
        min-height: 1px;
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
    }

        .owl-carousel .owl-item img {
            display: block;
            width: 100%;
            height: auto;
            object-fit: cover;
        }

    /* Navigation & Controls */
    .owl-carousel .owl-nav.disabled,
    .owl-carousel .owl-dots.disabled {
        display: block !important;
    }

    .owl-carousel [class*="owl-"] button,
    .owl-carousel .owl-dot {
        cursor: pointer;
        user-select: none;
        -webkit-user-select: none;
    }

    .owl-carousel button {
        background: none;
        border: none;
        padding: 0;
        font: inherit;
        color: inherit;
        margin: 0;
    }

    /* Loading States */
    .owl-carousel.owl-loading {
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .owl-carousel.owl-loaded {
        opacity: 1;
    }

    .owl-carousel.owl-hidden {
        opacity: 0;
    }

    .owl-carousel.owl-refresh .owl-item {
        visibility: hidden;
    }

    /* Drag & Interaction States */
    .owl-carousel.owl-drag .owl-item {
        touch-action: pan-y;
        user-select: none;
    }

    .owl-carousel.owl-grab {
        cursor: grab;
        cursor: -webkit-grab;
    }

    .owl-carousel.owl-grabbing {
        cursor: grabbing;
        cursor: -webkit-grabbing;
    }

    /* RTL Support */
    .owl-carousel.owl-rtl {
        direction: rtl;
    }

        .owl-carousel.owl-rtl .owl-item {
            float: right;
        }

/* No-JS Fallback */
.no-js .owl-carousel {
    display: block;
}

/* ========================================
   ANIMATION PLUGIN
   ======================================== */
.owl-carousel .animated {
    animation-duration: 1000ms;
    animation-fill-mode: both;
}

.owl-carousel .owl-animated-in {
    z-index: 0;
}

.owl-carousel .owl-animated-out {
    z-index: 1;
}

@keyframes owl-fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

.owl-carousel .fadeOut {
    animation-name: owl-fadeOut;
}

/* ========================================
   AUTO HEIGHT PLUGIN
   ======================================== */
.owl-height {
    transition: height 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   LAZY LOAD PLUGIN
   ======================================== */
.owl-carousel .owl-item .owl-lazy {
    opacity: 0;
    transition: opacity 0.4s ease;
}

    .owl-carousel .owl-item .owl-lazy[src],
    .owl-carousel .owl-item .owl-lazy:not([src]) {
        max-height: 0;
        opacity: 0;
    }

.owl-carousel .owl-item img.owl-lazy {
    transform-style: preserve-3d;
}

/* ========================================
   VIDEO PLUGIN
   ======================================== */
.owl-carousel .owl-video-wrapper {
    position: relative;
    height: 100%;
    background: #000;
}

.owl-carousel .owl-video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80px;
    height: 80px;
    margin: -40px 0 0 -40px;
    background: url("owl.video.play.png") no-repeat;
    background-size: 100%;
    cursor: pointer;
    z-index: 1;
    transition: all 0.1s ease;
    border-radius: 50%;
}

    .owl-carousel .owl-video-play-icon:hover {
        transform: scale(1.3);
    }

.owl-carousel .owl-video-playing .owl-video-tn,
.owl-carousel .owl-video-playing .owl-video-play-icon {
    display: none;
}

.owl-carousel .owl-video-tn {
    opacity: 0;
    height: 100%;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    transition: opacity 0.4s ease;
}

.owl-carousel .owl-video-frame {
    position: relative;
    z-index: 1;
    height: 100%;
    width: 100%;
}

/* ========================================
   MODERN BROWSER ENHANCEMENTS
   ======================================== */

/* Container Flex Support */
@supports (display: flex) {
    .owl-carousel .owl-stage {
        display: flex;
    }

    .owl-carousel .owl-item {
        flex: 0 0 auto;
    }
}

/* High DPI Retina Support */
@media (-webkit-min-device-pixel-ratio: 2), (-moz-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
    .owl-carousel .owl-video-play-icon {
        background-image: url("owl.video.play@2x.png");
        background-size: 80px 80px;
    }
}

/* Performance on Low-Power Devices */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .owl-height {
        transition: none;
    }
}

/* Touch Device Optimizations */
@supports (overflow: clip) {
    .owl-carousel .owl-stage {
        will-change: transform;
    }
}

/* Print Styles */
@media print {
    .owl-carousel .owl-nav,
    .owl-carousel .owl-dots {
        display: none !important;
    }

    .owl-carousel .owl-item {
        float: none !important;
        break-inside: avoid;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .owl-carousel .owl-video-wrapper {
        background: #111;
    }
}

/* Focus States for Accessibility */
.owl-carousel button:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Smooth Scrolling */
.owl-carousel {
    scroll-behavior: smooth;
}
