



:root {
    --primary-red: #e61b36;
    --text-white: #ffffff;
    --text-black: #1a1a1b;
    --text-gray: #5d5d5f;
    --transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.rtlAr .staggered-controls,.rtlAr .staggered-track,.rtlAr .staggered-container{
    direction: ltr;
}
.rtlAr .hover-content,.rtlAr .card-content-overlay{
    direction: rtl; 
}   
.staggered-section {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding-top: var(--top_bottom_margin, 2rem);
    padding-bottom: var(--top_bottom_margin, 2rem);
    background-color: var(--bg_color, #fff);
    box-sizing: border-box;
}

.staggered-container {
    width: 100%;
}

.staggered-track {
    display: flex;
    width: max-content;
    padding: 50px 0;
}

/* PC Marquee Animation */
@media (min-width: 769px) {
    .staggered-track.marquee-active {
        animation: marquee-scroll 40s linear infinite;
    }
    .staggered-track:hover {
        animation-play-state: paused;
    }
}

/* CSS Marquee removed in favor of JS RequestAnimationFrame for absolute seamlessness */
.staggered-track {
    display: flex;
    width: max-content;
    will-change: transform;
}

.staggered-item {
    flex: 0 0 420px;
    margin: 0 20px;
    background: #fff;
    transition: var(--transition);
}

/* PC Staggered vertical offset and styles */
@media (min-width: 769px) {
    .staggered-item {
        padding: 20px;
        box-shadow: 0 4px 43px #00000014;
    }
    .staggered-item:nth-child(odd) {
        transform: translateY(-40px);
    }
    .staggered-item:nth-child(even) {
        transform: translateY(40px);
    }
}

.staggered-card {
    position: relative;
    height: 560px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    background: #fff;
    transition: var(--transition);
}

/* Default State Layer */
.card-state-default {
    box-sizing: border-box;
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1;
    transition: opacity 0.4s ease, visibility 0.4s;
}

.card-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-bg-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(180deg,rgba(13, 27, 56, 0.85)  0%,rgba(13, 27, 56, 0.2)  100%);
}

.card-content-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    padding: 40px;
    color: var(--text-white);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.staggered-title {
    font-size: var(--title_font_size, 26px);
    font-weight: 600;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.staggered-desc {
    font-size: var(--desc_font_size, 16px);
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.staggered-btn {
    position: absolute;
    bottom: 30px;
    right: 30px;
    width: 65px;
    height: 65px;
    background-color: var(--icon_bg_color, var(--primary-red));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: var(--transition);
}

.staggered-btn svg {
    width: 28px;
    height: 28px;
    stroke-width: 2;
}

/* Hover State Layer (White Background) */
.card-state-hover {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #ffffff;
    z-index: 2;
    opacity: 0;
    visibility: hidden;
    padding: 40px;
    display: flex;
    flex-direction: column;
    transition: opacity 0.4s ease, visibility 0.4s;
    box-sizing: border-box;
}

.hover-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.hover-title {
    font-size: var(--title_font_size, 26px);
    font-weight: 600;
    color: var(--text-black);
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hover-desc {
    font-size: var(--desc_font_size, 16px);
    line-height: 1.6;
    color: var(--text-gray);
    margin-bottom: 30px;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hover-img-box {
    flex: 1;
    overflow: hidden;
    border-radius: 2px;
}

.hover-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

/* Hover Interactivity for PC */
@media (min-width: 769px) {
    .staggered-card:hover .card-state-default {
        opacity: 0;
        visibility: hidden;
    }
    .staggered-card:hover .card-state-hover {
        opacity: 1;
        visibility: visible;
    }
    .staggered-card:hover .hover-img-box img {
        transform: scale(1.05);
    }
}

/* Mobile Controls Styling */
.staggered-controls {
    display: none; /* Hidden on PC */
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    justify-content: space-between;
    padding: 0 5px;
    pointer-events: none;
    z-index: 110;
    box-sizing: border-box;
}

.nav-btn {
    pointer-events: auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    border: none;
}

.nav-btn.next-btn {
    /* background: var(--icon_bg_color, var(--primary-red));
    color: #fff; */
}

.nav-btn svg {
    width: 24px;
    height: 24px;
    stroke-width: 2.5;
}

/* Mobile Adaptations */
@media (max-width: 768px) {
    .staggered-section{
        padding-left: 2rem;
        padding-right: 2rem;
    }
    .staggered-track {
        padding: 0;
        display: flex;
        flex-wrap: nowrap;
        width: 100%; 
    }
    
    .staggered-track.transition-active {
        transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    }
    
    .staggered-item {
        flex: 0 0 100%; 
        width: 100%;
        margin: 0;
        transform: translateY(0) !important;
    }
    
    .staggered-card {
        height: 460px;
    }
    
    /* Force hover state on mobile */
    .card-state-default {
        display: none !important;
    }
    
    .card-state-hover {
        opacity: 1 !important;
        visibility: visible !important;
        position: relative !important;
        height: 100%;
    }
    
    .staggered-controls {
        display: flex;
    }

    .staggered-container {
        overflow: hidden;
    }
}
