/* Banner Slider Frontend Styles */

.banner-slider-owl {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
}

.banner-slider-owl.owl-loading {
    opacity: 0;
    visibility: hidden;
}

.banner-slider-owl.owl-loaded {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease;
}

/* Banner slides */
.banner-slide {
    position: relative;
    width: 100%;
    height: 480px; /* Fixed height for all slides */
    overflow: hidden;
}

.banner-slide img {
    display: block;
    width: 100% !important;
    height: 100% !important; /* Full height of slide container */
    object-fit: cover; /* Cover entire area while maintaining aspect ratio */
    object-position: center; /* Center the image */
    transition: transform 0.3s ease;
}

.banner-slide:hover img {
    transform: scale(1.05);
}

/* Owl Carousel navigation */
.banner-slider-owl .owl-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 10;
}

.banner-slider-owl .owl-nav button {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    color: #333;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    pointer-events: all;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.banner-slider-owl .owl-nav button:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.banner-slider-owl .owl-nav button.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.banner-slider-owl .owl-nav .owl-prev {
    left: 0;
}

.banner-slider-owl .owl-nav .owl-next {
    right: 0;
}

/* Owl Carousel dots */
.banner-slider-owl .owl-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.banner-slider-owl .owl-dots .owl-dot {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.banner-slider-owl .owl-dots .owl-dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.banner-slider-owl .owl-dots .owl-dot.active {
    background: #fff;
    transform: scale(1.3);
}


/* Responsive design */
@media screen and (max-width: 768px) {
    .banner-slider-owl .owl-nav button {
        width: 40px;
        height: 40px;
        font-size: 18px;
        margin: 0 5px;
    }
    
    .banner-slider-owl .owl-dots {
        bottom: 10px;
    }
    
    .banner-slider-owl .owl-dots .owl-dot {
        width: 10px;
        height: 10px;
    }
    
    .banner-slide {
        height: 300px; /* Smaller fixed height for tablets */
    }
}

@media screen and (max-width: 480px) {
    .banner-slider-owl .owl-nav button {
        width: 35px;
        height: 35px;
        font-size: 16px;
        margin: 0 3px;
    }
    
    .banner-slider-owl .owl-dots {
        bottom: 8px;
        gap: 6px;
    }
    
    .banner-slider-owl .owl-dots .owl-dot {
        width: 8px;
        height: 8px;
    }
    
    .banner-slide {
        height: 250px; /* Smaller fixed height for mobile */
    }
}

/* Loading animation */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.banner-slide {
    animation: fadeIn 0.6s ease;
}

/* Accessibility improvements */
.banner-slider-owl .owl-nav button:focus,
.banner-slider-owl .owl-dots .owl-dot:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.banner-slide img:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Touch-friendly navigation */
@media (hover: none) and (pointer: coarse) {
    .banner-slider-owl .owl-nav button {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }
    
    .banner-slider-owl .owl-dots .owl-dot {
        width: 16px;
        height: 16px;
    }
}

/* Performance optimizations */
.banner-slide img {
    will-change: transform;
    backface-visibility: hidden;
    perspective: 1000px;
}

.banner-slider-owl .owl-stage {
    display: flex;
    will-change: transform;
}

/* Custom animations */
.banner-slider-owl .owl-item.animated {
    animation-duration: 1000ms;
}

.banner-slider-owl .owl-item.fadeIn {
    animation-name: fadeIn;
}

.banner-slider-owl .owl-item.slideInLeft {
    animation-name: slideInLeft;
}

.banner-slider-owl .owl-item.slideInRight {
    animation-name: slideInRight;
}

/* Container styling for different contexts */
.wp-block-cover .banner-slider-owl,
.entry-content .banner-slider-owl,
.page-content .banner-slider-owl {
    margin: 20px 0;
}

/* Full-width container */
.banner-slider-owl.full-width {
    max-width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

/* Contained slider */
.banner-slider-owl.contained {
    max-width: 1200px;
    padding: 0 20px;
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .banner-slider-owl .owl-nav button {
        background: rgba(0, 0, 0, 0.7);
        color: #fff;
    }
    
    .banner-slider-owl .owl-nav button:hover {
        background: rgba(0, 0, 0, 0.9);
    }
    
    .banner-slider-owl .owl-dots .owl-dot {
        background: rgba(0, 0, 0, 0.5);
        border-color: rgba(0, 0, 0, 0.8);
    }
    
    .banner-slider-owl .owl-dots .owl-dot.active {
        background: #000;
    }
}
