/* ================================================
   INA News Slider - slider.css  v2.0
   RTL | Mobile-first | WordPress + Elementor
   ================================================ */

.ina-slider-wrap *,
.ina-slider-wrap *::before,
.ina-slider-wrap *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ---- Wrapper ---- */
.ina-slider-wrap {
    position: relative;
    width: 100%;
    background: #111;
    overflow: hidden;
    direction: rtl;
    font-family: 'Segoe UI', Tahoma, 'Arabic UI Text', Arial, sans-serif;
    user-select: none;
    -webkit-user-select: none;
}

/* ================================================
   MAIN SLIDES
   ================================================ */
.ina-slides-track {
    display: flex;
    /* لا transition هنا — نتحكم بيها من JS بشكل ذكي للـ loop */
    will-change: transform;
}

.ina-slide {
    min-width: 100%;
    position: relative;
    /* الارتفاع الكلي = صورة + شريط مصغرات (160px) */
    height: 520px;
    overflow: hidden;
    flex-shrink: 0;
}

.ina-slide-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.ina-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 7s ease;
    transform: scale(1.0);
}

.ina-slide.active img {
    transform: scale(1.08);
}

/* Gradient overlay — أغمق في الأسفل لإظهار العنوان */
.ina-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.92) 0%,
        rgba(0,0,0,0.55) 35%,
        rgba(0,0,0,0.10) 100%
    );
    pointer-events: none;
}

/* ---- Slide Title ---- */
/* bottom = ارتفاع شريط المصغرات (160px) + مسافة (20px) */
.ina-slide-title {
    position: absolute;
    bottom: 180px;          /* فوق شريط المصغرات */
    right: 6%;
    left: 6%;
    color: #fff;
    font-size: clamp(1.1rem, 2.8vw, 2rem);
    font-weight: 700;
    line-height: 1.6;
    text-align: center;
    text-shadow: 0 2px 20px rgba(0,0,0,0.85);
    pointer-events: none;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.55s ease 0.1s, transform 0.55s ease 0.1s;
}

.ina-slide.active .ina-slide-title {
    opacity: 1;
    transform: translateY(0);
}

/* ================================================
   THUMBNAILS SECTION  — ارتفاع ثابت 160px
   ================================================ */
.ina-thumbs-section {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    height: 160px;
    background: rgba(0,0,0,0.86);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10px 0 8px;
}

/* Thumbs scrollable area */
.ina-thumbs-wrap {
    overflow: hidden;
    cursor: grab;
    padding: 0 52px 0 52px; /* مكان لأزرار التنقل */
    flex: 1;
    display: flex;
    align-items: center;
}

.ina-thumbs-wrap.is-dragging {
    cursor: grabbing;
}

/* الـ track يحتوي الكروت */
.ina-thumbs-track {
    display: flex;
    gap: 10px;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    align-items: stretch;
}

/* ---- Single thumb card ---- */
/* العرض = (عرض المنطقة - gaps) / 4 — يُحسب بـ JS */
.ina-thumb {
    flex-shrink: 0;
    background: rgba(255,255,255,0.08);
    border-radius: 7px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.3s ease, transform 0.25s ease, background 0.25s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.ina-thumb:hover {
    transform: translateY(-3px);
    background: rgba(255,255,255,0.13);
}

.ina-thumb.active {
    border-color: #cc0000;
    background: rgba(204,0,0,0.12);
}

.ina-thumb-link {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-decoration: none;
    color: inherit;
}

.ina-thumb img {
    width: 100%;
    height: 78px;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

.ina-thumb-info {
    padding: 6px 8px 6px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.ina-thumb-title {
    color: #fff;
    font-size: 0.72rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}

.ina-thumb-time {
    color: rgba(255,255,255,0.48);
    font-size: 0.63rem;
    display: flex;
    align-items: center;
    gap: 3px;
}

.ina-thumb-time svg {
    width: 11px;
    height: 11px;
    flex-shrink: 0;
}

/* ---- Nav buttons — يمين ويسار الـ track ---- */
.ina-nav-btns {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 160px;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
}

.ina-nav-btn {
    pointer-events: all;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.18);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
    transition: background 0.2s ease, transform 0.15s ease;
    flex-shrink: 0;
}

.ina-nav-btn:hover {
    background: #cc0000;
    border-color: #cc0000;
    transform: scale(1.08);
}

.ina-nav-btn:focus-visible {
    outline: 2px solid #cc0000;
    outline-offset: 2px;
}

/* Progress bar */
.ina-progress-bar {
    position: absolute;
    bottom: 0;
    right: 0;
    height: 3px;
    width: 0%;
    background: #cc0000;
}

/* ================================================
   RESPONSIVE — TABLET (≤ 900px)
   ================================================ */
@media (max-width: 900px) {
    .ina-slide { height: 460px; }
    .ina-slide-title {
        bottom: 170px;
        font-size: clamp(1rem, 3vw, 1.4rem);
    }
    .ina-thumbs-section { height: 150px; }
    .ina-nav-btns { height: 150px; }
    .ina-thumb img { height: 68px; }
}

/* ================================================
   RESPONSIVE — MOBILE (≤ 600px)
   ================================================ */
@media (max-width: 600px) {
    .ina-slide { height: 360px; }
    .ina-slide-title {
        bottom: 155px;
        font-size: 0.9rem;
        right: 4%;
        left: 4%;
    }
    .ina-thumbs-section { height: 140px; }
    .ina-nav-btns { height: 140px; padding: 0 4px; }
    .ina-thumbs-wrap { padding: 0 44px; }
    .ina-nav-btn { width: 30px; height: 30px; font-size: 16px; }
    .ina-thumb img { height: 60px; }
    .ina-thumb-title { font-size: 0.67rem; }
}

/* ================================================
   ELEMENTOR FIX
   ================================================ */
.elementor-widget-ina_news_slider .elementor-widget-container {
    overflow: hidden;
}
