/* Lexend Opposite Direction Slider Styles */
.lexend-opposite-slider {
    overflow: hidden;
    position: relative;
    background: transparent;
    width: 100%;
    height: 500px;
}

.slider-row {
    display: flex;
    align-items: center;
    height: 50%;
    position: relative;
    gap: 20px;
    will-change: transform;
}

/* First row slides left to right */
.row-1 {
    animation: slideLeft 30s linear infinite;
    animation-play-state: running;
}

/* Second row slides right to left */
.row-2 {
    animation: slideRight 30s linear infinite;
    animation-play-state: running;
}

/* Ensure animations start immediately */
.lexend-opposite-slider .row-1,
.lexend-opposite-slider .row-2 {
    animation-fill-mode: both;
    width: 200%; /* Make sure there's enough content to scroll */
}

/* Debug: Ensure the slider container is visible */
.lexend-opposite-slider {
    min-height: 400px;
}

/* Debug: Make sure rows are properly positioned */
.slider-row {
    width: 200%;
    min-width: 200%;
}

/* Pause on hover if enabled */
.lexend-opposite-slider[data-pause="paused"]:hover .row-1,
.lexend-opposite-slider[data-pause="paused"]:hover .row-2 {
    animation-play-state: paused;
}

.slider-item {
    flex-shrink: 0;
    width: 300px;
    margin-right: 20px;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
}

.slider-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0,0,0,0.25);
}

.slider-item a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.image-container {
    position: relative;
    overflow: hidden;
}

.slider-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.slider-item:hover img {
    transform: scale(1.05);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 100%);
    display: flex;
    align-items: flex-end;
    padding: 25px;
    opacity: 0;
    transition: opacity 0.4s ease;
    backdrop-filter: blur(2px);
}

.slider-item:hover .overlay {
    opacity: 1;
}

.content {
    width: 100%;
    transform: translateY(10px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.slider-item:hover .content {
    transform: translateY(0);
}

.title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px 0;
    line-height: 1.3;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 13px;
    margin: 0;
    opacity: 0.9;
    line-height: 1.4;
    color: #e0e0e0;
    font-weight: 400;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Keyframe animations */
@keyframes slideLeft {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes slideRight {
    0% {
        transform: translateX(-50%);
    }
    100% {
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .slider-item {
        width: 280px;
        margin-right: 18px;
    }
}

@media (max-width: 992px) {
    .lexend-opposite-slider {
        height: 400px;
    }
    
    .slider-item {
        width: 250px;
        margin-right: 15px;
    }
    
    .slider-item img {
        height: 160px;
    }
    
    .title {
        font-size: 16px;
    }
    
    .subtitle {
        font-size: 12px;
    }
    
    .overlay {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .lexend-opposite-slider {
        height: 350px;
    }
    
    .slider-item {
        width: 220px;
        margin-right: 12px;
    }
    
    .slider-item img {
        height: 140px;
    }
    
    .title {
        font-size: 14px;
        margin-bottom: 6px;
    }
    
    .subtitle {
        font-size: 11px;
    }
    
    .overlay {
        padding: 15px;
    }
    
    .slider-item:hover {
        transform: translateY(-4px) scale(1.01);
    }
}

@media (max-width: 480px) {
    .lexend-opposite-slider {
        height: 300px;
    }
    
    .slider-item {
        width: 180px;
        margin-right: 10px;
    }
    
    .slider-item img {
        height: 120px;
    }
    
    .title {
        font-size: 13px;
    }
    
    .subtitle {
        font-size: 10px;
    }
    
    .overlay {
        padding: 12px;
    }
}

/* Performance optimizations */
.slider-row,
.slider-item,
.slider-item img,
.overlay,
.content {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .row-1,
    .row-2 {
        animation-duration: 120s;
    }
    
    .slider-item,
    .slider-item img,
    .overlay,
    .content {
        transition-duration: 0.1s;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .overlay {
        background: rgba(0,0,0,0.9);
    }
    
    .title {
        color: #ffffff;
        text-shadow: none;
    }
    
    .subtitle {
        color: #cccccc;
        text-shadow: none;
    }
}