/* ===================================
   HERO SLIDER STYLES - SELJA AGRO INDUSTRIES
   =================================== */

/* Slider Container */
.hero-enhanced {
    position: relative;
    overflow: hidden;
}

/* Slider Base Styles */
.slide {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
    -webkit-transition: opacity 1s ease-in-out;
    -moz-transition: opacity 1s ease-in-out;
    -o-transition: opacity 1s ease-in-out;
    will-change: opacity;
}

.slide.active {
    opacity: 1 !important;
    z-index: 2;
}

/* Ensure slider container is positioned correctly */
.hero-enhanced .relative.h-screen {
    position: relative;
    overflow: hidden;
    contain: layout style paint;
}

/* Make sure first slide is visible initially */
.slide[data-slide="0"] {
    opacity: 1 !important;
    z-index: 2 !important;
}

/* Ensure slides are properly positioned */
.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Fix any potential Tailwind conflicts */
.slide.opacity-100 {
    opacity: 1 !important;
}

.slide.opacity-0 {
    opacity: 0 !important;
}

/* Enhanced Slider Navigation */
.slider-nav-enhanced {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 20;
}

.slider-nav-enhanced:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.slider-nav-enhanced.prev {
    left: 30px;
}

.slider-nav-enhanced.next {
    right: 30px;
}

/* Enhanced Dots */
.slider-dots-enhanced {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 20;
}

.dot-enhanced {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    border: none;
    outline: none;
}

.dot-enhanced.active {
    background: white;
    transform: scale(1.2);
}

.dot-enhanced::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dot-enhanced.active::after {
    opacity: 1;
}

.dot-enhanced:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

/* Enhanced Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 24px;
    animation: float 2s ease-in-out infinite;
    z-index: 10;
    cursor: pointer;
    transition: all 0.3s ease;
}

.scroll-indicator:hover {
    transform: translateX(-50%) scale(1.1);
    color: #FFD700;
}

@keyframes float {
    0%, 100% {
        transform: translateX(-50%) translateY(0px);
    }
    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .slider-nav-enhanced {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .slider-nav-enhanced.prev {
        left: 15px;
    }
    
    .slider-nav-enhanced.next {
        right: 15px;
    }
    
    .slider-dots-enhanced {
        bottom: 1rem;
        gap: 8px;
    }
    
    .dot-enhanced {
        width: 8px;
        height: 8px;
    }
    
    .scroll-indicator {
        font-size: 20px;
        bottom: 16px;
    }
}

@media (max-width: 640px) {
    .slider-nav-enhanced.prev {
        left: 0.5rem;
    }
    
    .slider-nav-enhanced.next {
        right: 0.5rem;
    }
    
    .slider-nav-enhanced {
        width: 35px;
        height: 35px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .slider-nav-enhanced {
        width: 35px;
        height: 35px;
        font-size: 12px;
    }
    
    .scroll-indicator {
        font-size: 18px;
    }
}

/* Performance optimizations for mobile */
@media (max-width: 768px) {
    .slide img {
        transform: none !important;
    }
    
    .hero-enhanced::before {
        display: none; /* Remove complex gradients on mobile for better performance */
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .slider-nav-enhanced:hover {
        transform: translateY(-50%) scale(1.05);
    }
    
    .dot-enhanced:hover {
        transform: scale(1.05);
    }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .slide {
        transition: none;
    }
    
    .slider-nav-enhanced {
        transition: none;
    }
    
    .dot-enhanced {
        transition: none;
    }
    
    .scroll-indicator {
        animation: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .slider-nav-enhanced {
        border: 2px solid white;
        background: rgba(0, 0, 0, 0.8);
    }
    
    .dot-enhanced {
        border: 1px solid white;
    }
}

/* Print styles */
@media print {
    .slider-nav-enhanced,
    .slider-dots-enhanced,
    .scroll-indicator {
        display: none;
    }
    
    .slide {
        position: static !important;
        opacity: 1 !important;
        page-break-inside: avoid;
    }
}