/* =========================================
   LEGENDARY SLIDER (Mobile & Desktop)
   ========================================= */

/* --- ROOT VARS --- */
:root {
    --ls-height-d: 800px;
    /* Increased for Taller Portrait Images */
    --ls-height-m: 450px;
    /* Significant increase for mobile */
    --ls-accent: #ff0055;
    --ls-dark: #0f0f0f;
    --ls-overlay: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
}

/* --- WRAPPER --- */
.legendary-slider-v2 {
    position: relative;
    width: 100%;
    height: var(--ls-height-d);
    background: transparent;
    /* Seamless integration */
    overflow: hidden;
    margin-bottom: 30px;
    direction: ltr;
    /* Important for JS calculations */
}

/* --- TRACK --- */
.ls-track {
    display: flex;
    height: 100%;
    will-change: transform;
    cursor: grab;
    touch-action: pan-y;
}

/* --- SLIDE ITEM --- */
.ls-slide {
    flex: 0 0 65%;
    /* Desktop width */
    max-width: 900px;
    height: 100%;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s, transform 0.3s;
    opacity: 0.5;
    transform: scale(0.92);
    position: relative;
}

.ls-slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 10;
}

/* --- CARD DESIGN (CINEMATIC) --- */
.ls-card {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    background: #000;
}

/* 1. Background Blur Layer */
.ls-bg-blur {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center top;
    filter: blur(25px) brightness(0.4);
    transform: scale(1.2);
    /* Prevent white edges from blur */
    z-index: 0;
}

/* 2. Main Foreground Image */
.ls-main-img {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Full Image! */
    z-index: 1;
    transition: transform 0.5s ease;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
}

.ls-card:hover .ls-main-img {
    transform: scale(1.02);
}

/* 3. Text Overlay */
.ls-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.5) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    /* Left Align */
    padding: 30px;
    z-index: 2;
    pointer-events: none;
    /* Let clicks pass to button/link */
}

.ls-info {
    pointer-events: auto;
    text-align: left;
    direction: ltr;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.ls-info h2 {
    color: white;
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0 0 10px 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
    width: 100%;
    /* Ensure full width for text-align to work */
}

.ls-desc {
    color: #ddd;
    font-size: 1rem;
    line-height: 1.5;
    max-width: 600px;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ls-meta {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    /* In RTL, this means Right */
}

.ls-btn {
    background: var(--ls-accent);
    color: white;
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    box-shadow: 0 5px 15px rgba(255, 0, 85, 0.4);
}

.ls-btn:hover {
    background: white;
    color: var(--ls-accent);
}

/* --- MOBILE OPTIMIZATION --- */
@media (max-width: 768px) {
    .legendary-slider-v2 {
        height: var(--ls-height-m);
        margin-bottom: 20px;
    }

    .ls-slide {
        flex: 0 0 88%;
        /* Wider on mobile */
        padding: 5px;
        opacity: 0.6;
        transform: scale(0.94);
    }

    .ls-slide.active {
        opacity: 1;
        transform: scale(1);
    }

    .ls-card {
        border-radius: 8px;
    }

    .ls-overlay {
        padding: 15px;
    }

    .ls-info h2 {
        font-size: 1.1rem;
        margin-bottom: 5px;
    }

    .ls-desc {
        display: none;
    }

    .ls-btn {
        padding: 5px 15px;
        font-size: 10px;
    }

    /* On mobile, maybe image should be cover if the user insists? 
       But user said "Full Shape" so contain is safer with blur bg. 
       Let's keep the blur effect which solves black bars. */
}

/* --- DOTS --- */
.ls-dots {
    position: absolute;
    bottom: 20px;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 6px;
    z-index: 20;
    pointer-events: none;
}

.ls-dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    transition: 0.3s;
    pointer-events: auto;
    cursor: pointer;
}

.ls-dot.active {
    width: 25px;
    border-radius: 10px;
    background: var(--ls-accent);
}

@media (max-width: 768px) {
    .ls-dots {
        bottom: 10px;
    }

    .ls-dot {
        width: 6px;
        height: 6px;
    }

    .ls-dot.active {
        width: 20px;
    }
}