@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&display=swap');

/* ─── Section Header ─────────────────────────────────────────── */
.jt-section-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    direction: rtl;
}
.jt-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Cairo', sans-serif;
}
.jt-title-bar {
    display: inline-block;
    width: 4px;
    height: 22px;
    background: #e63946;
    border-radius: 2px;
    flex-shrink: 0;
}
.jt-title-text {
    font-size: 20px;
    font-weight: 700;
    color: #1b2a4a;
    font-family: 'Cairo', sans-serif;
}

/* ─── Slider Outer ───────────────────────────────────────────── */
.jt-slider-outer {
    position: relative;
    direction: rtl;
}

/* ─── Slide Buttons ──────────────────────────────────────────── */
.jt-slide-btn {
    position: absolute !important;
    top: 38% !important;
    transform: translateY(-50%) !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    background: #fff !important;
    border: 1.5px solid #ddd !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.15) !important;
    color: #444 !important;
    font-size: 22px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10 !important;
    padding: 0 !important;
    transition: all .2s !important;
}
.jt-slide-btn:hover {
    background: #e63946 !important;
    border-color: #e63946 !important;
    color: #fff !important;
}
.jt-slide-btn-right { right: -18px !important; }
.jt-slide-btn-left  { left: -18px !important; }

/* ─── Shorts Track ───────────────────────────────────────────── */
.jt-shorts-wrap {
    width: 100%;
    direction: rtl;
    font-family: 'Cairo', sans-serif;
    padding: 8px 0 20px;
}
.jt-shorts-track {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 14px !important;
    overflow-x: scroll !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    padding: 4px 24px 12px !important;
}
.jt-shorts-track::-webkit-scrollbar { display: none !important; }

.jt-short-card {
    flex: 0 0 148px !important;
    cursor: pointer !important;
    transition: transform .25s !important;
}
.jt-short-card:hover { transform: translateY(-5px) !important; }

.jt-short-thumb {
    position: relative !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    aspect-ratio: 9/16 !important;
    background: #111 !important;
    box-shadow: 0 4px 14px rgba(0,0,0,.2) !important;
}
.jt-short-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    transition: transform .35s !important;
}
.jt-short-card:hover .jt-short-thumb img { transform: scale(1.05) !important; }

.jt-short-overlay {
    position: absolute !important;
    inset: 0 !important;
    background: rgba(0,0,0,0) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background .25s !important;
    z-index: 2 !important;
}
.jt-short-card:hover .jt-short-overlay { background: rgba(0,0,0,.35) !important; }

.jt-short-play {
    width: 50px !important;
    height: 50px !important;
    background: rgba(255,255,255,.95) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 16px rgba(0,0,0,.3) !important;
    opacity: 0 !important;
    transform: scale(.7) !important;
    transition: all .25s !important;
}
.jt-short-card:hover .jt-short-play {
    opacity: 1 !important;
    transform: scale(1) !important;
}

.jt-short-title {
    margin: 8px 0 0 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #333 !important;
    line-height: 1.4 !important;
    text-align: center !important;
    font-family: 'Cairo', sans-serif !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

/* ─── Videos Track ───────────────────────────────────────────── */
.jt-videos-wrap {
    width: 100%;
    direction: rtl;
    font-family: 'Cairo', sans-serif;
    padding: 8px 0 20px;
}
.jt-videos-track {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 16px !important;
    overflow-x: scroll !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    padding: 4px 24px 12px !important;
}
.jt-videos-track::-webkit-scrollbar { display: none !important; }

.jt-video-card {
    flex: 0 0 calc(25% - 12px) !important;
    min-width: 220px !important;
    cursor: pointer !important;
    transition: transform .25s !important;
}
.jt-video-card:hover { transform: translateY(-5px) !important; }

.jt-video-thumb {
    position: relative !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    aspect-ratio: 16/9 !important;
    background: #111 !important;
    box-shadow: 0 4px 14px rgba(0,0,0,.15) !important;
}
.jt-video-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    transition: transform .35s !important;
}
.jt-video-card:hover .jt-video-thumb img { transform: scale(1.06) !important; }

.jt-video-overlay {
    position: absolute !important;
    inset: 0 !important;
    background: rgba(0,0,0,0) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background .25s !important;
    z-index: 2 !important;
}
.jt-video-card:hover .jt-video-overlay { background: rgba(0,0,0,.35) !important; }

.jt-video-play {
    width: 58px !important;
    height: 58px !important;
    background: rgba(255,255,255,.95) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 20px rgba(0,0,0,.3) !important;
    opacity: 0 !important;
    transform: scale(.7) !important;
    transition: all .25s !important;
}
.jt-video-card:hover .jt-video-play {
    opacity: 1 !important;
    transform: scale(1) !important;
}

.jt-video-title {
    margin: 10px 0 0 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #222 !important;
    line-height: 1.5 !important;
    font-family: 'Cairo', sans-serif !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

/* ─── Popup مشترك ────────────────────────────────────────────── */
#jt-popup-s, #jt-popup-v {
    position: fixed !important;
    inset: 0 !important;
    z-index: 999999 !important;
    display: none;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important;
}
#jt-popup-s.active, #jt-popup-v.active {
    display: flex !important;
}
.jt-popup-bg {
    position: absolute !important;
    inset: 0 !important;
    background: rgba(0,0,0,.88) !important;
    backdrop-filter: blur(8px) !important;
}

/* ─── Shorts Popup ───────────────────────────────────────────── */
.jt-popup-s-inner {
    position: relative !important;
    z-index: 1 !important;
    width: 36vh !important;
    max-width: 260px !important;
    direction: rtl !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    overflow: visible !important;
    margin: 60px 0 !important;
}

.jt-popup-s-topbar {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 10px !important;
}

.jt-popup-s-counter {
    color: rgba(255,255,255,.7) !important;
    font-size: 13px !important;
    font-family: 'Cairo', sans-serif !important;
}

.jt-popup-s-player {
    position: relative !important;
    width: 100% !important;
    padding-top: 177.77% !important;
    background: #000 !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    box-shadow: 0 8px 32px rgba(0,0,0,.5) !important;
}
.jt-popup-s-player iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: none !important;
}

.jt-popup-s-title {
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    margin: 10px 0 0 !important;
    font-family: 'Cairo', sans-serif !important;
    text-align: center !important;
    width: 100% !important;
}

/* ─── Videos Popup ───────────────────────────────────────────── */
.jt-popup-v-inner {
    position: relative !important;
    z-index: 1 !important;
    width: 92vw !important;
    max-width: 900px !important;
    direction: rtl !important;
    overflow: visible !important;
}

.jt-popup-v-topbar {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 10px !important;
}

.jt-popup-v-counter {
    color: rgba(255,255,255,.7) !important;
    font-size: 13px !important;
    font-family: 'Cairo', sans-serif !important;
}

.jt-popup-v-player {
    position: relative !important;
    width: 100% !important;
    padding-top: 56.25% !important;
    background: #000 !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    box-shadow: 0 8px 32px rgba(0,0,0,.5) !important;
}
.jt-popup-v-player iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: none !important;
}

.jt-popup-v-title {
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    margin: 10px 0 0 !important;
    font-family: 'Cairo', sans-serif !important;
    text-align: right !important;
    direction: rtl !important;
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .jt-video-card { flex: 0 0 calc(50% - 8px) !important; min-width: 160px !important; }
    .jt-short-card { flex: 0 0 128px !important; }
    .jt-slide-btn-right { right: -12px !important; }
    .jt-slide-btn-left  { left: -12px !important; }
    #jt-popup-v #jt-v-prev,
    #jt-popup-v #jt-v-next {
        top: auto !important;
        bottom: 16px !important;
        transform: none !important;
        width: 38px !important;
        height: 38px !important;
        font-size: 20px !important;
    }
    #jt-popup-v #jt-v-prev { right: auto !important; left: 60px !important; }
    #jt-popup-v #jt-v-next { left: auto !important; right: 60px !important; }
}
@media (max-width: 480px) {
    .jt-short-card { flex: 0 0 108px !important; }
    .jt-video-card { flex: 0 0 calc(50% - 6px) !important; }
    .jt-popup-s-inner { width: 80vw !important; max-width: 240px !important; }
}