/* =================================================== */
/* ==============  قسم الفيديو — تصميم جديد  ========= */
/* =================================================== */

/* ─── الحاوية الخارجية ─── */
.video-section {
    width: 100%;
    /* background-color: var(--seyasa-primary-color); */
    padding: 1.5rem 1rem;
    /* box-shadow: 0 0 0 100vmax var(--seyasa-primary-color); */
    clip-path: inset(0 -100vmax);
}

/* ─── الشبكة الرئيسية ─── */
.video-gallery {
    width: 100%;
    max-width: 1200px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    border-radius: 6px;
    overflow: hidden;
    margin: 0 auto;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

@media (min-width: 1024px) {
    .video-gallery {
        grid-template-columns: 5fr 2fr;
    }
}

/* ═══════════════════════════════════════════════════ */
/*                الفيديو الرئيسي                      */
/* ═══════════════════════════════════════════════════ */

a.main-video-wrapper {
    display: block;
    text-decoration: none;
    color: inherit;
    position: relative;
    background-color: #000;
    overflow: hidden;
}

.main-video-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #000;
    position: relative;
}

.main-video-player img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0.85;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

a.main-video-wrapper:hover .main-video-player img {
    opacity: 1;
    transform: scale(1.03);
}

/* أيقونة التشغيل */
.main-video-wrapper .play-icon-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: transform 0.3s ease, background-color 0.3s ease;
    pointer-events: none;
}

a.main-video-wrapper:hover .play-icon-overlay {
    transform: translate(-50%, -50%) scale(1.1);
    background: var(--seyasa-secondary-color);
    border-color: var(--seyasa-secondary-color);
}

.main-video-wrapper .play-icon-overlay svg {
    width: 28px;
    height: 28px;
    fill: #fff;
    margin-right: -3px;
}

/* معلومات الفيديو (Overlay) */
.video-info-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    padding: 2rem 1.5rem 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, transparent 100%);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.is-changing .video-info-overlay {
    transform: translateY(110%);
}

.is-changing .main-video-player img {
    opacity: 0;
    transform: scale(1.05);
}

.video-info-overlay .category-tag {
    background-color: var(--seyasa-secondary-color);
    color: #fff;
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 3px;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.video-info-overlay .main-video-title {
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.4;
    color: #fff;
}

@media only screen and (max-width: 600px) {
    .video-info-overlay .main-video-title {
        font-size: 1rem;
    }

    a.main-video-wrapper {
        height: 350px;
    }

    .video-info-overlay {
        padding: 1.5rem 1rem 1rem;
    }
}

/* ═══════════════════════════════════════════════════ */
/*                قائمة التشغيل                        */
/* ═══════════════════════════════════════════════════ */

.video-playlist {
    background-color: var(--seyasa-primary-color-darker);
    padding: 0;
    display: flex;
    flex-direction: column;
}

.playlist-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1rem;
    font-weight: 800;
    color: var(--seyasa-secondary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.video-header-icon {
    width: 24px;
    height: 24px;
}

.video-header-icon .screen {
    fill: var(--seyasa-secondary-color);
}

.video-header-icon .play-button {
    fill: var(--seyasa-primary-color-darker);
}

/* عناصر القائمة */
.playlist-items {
    list-style: none;
    margin: 0;
    padding: 0.5rem;
    overflow-y: auto;
    flex-grow: 1;
}

.playlist-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-right: 3px solid transparent;
    align-items: center;
}

.playlist-item:not(:last-child) {
    margin-bottom: 0.25rem;
}

.playlist-item:hover {
    background-color: rgba(255, 255, 255, 0.06);
}

.playlist-item.active {
    background: linear-gradient(to left, rgba(62, 174, 214, 0.12), transparent);
    box-shadow: inset 3px 0 0 var(--seyasa-secondary-color);
}

/* الصورة المصغرة */
.playlist-thumbnail {
    width: 100px;
    height: 65px;
    flex-shrink: 0;
    position: relative;
    border-radius: 4px;
    overflow: hidden;
}

.playlist-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.playlist-thumbnail .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 22px;
    height: 22px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.playlist-item:hover .playlist-thumbnail .play-icon {
    opacity: 1;
}

.playlist-thumbnail .play-icon svg {
    width: 10px;
    height: 10px;
    fill: #fff;
}

/* معلومات العنصر */
.playlist-item-info .item-category {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--seyasa-secondary-color);
    margin-bottom: 0.15rem;
}

.playlist-item-info .item-title {
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.7);
}

.playlist-item.active .item-title {
    color: rgba(255, 255, 255, 0.95);
}

/* ─── شريط التقدم ─── */
.video-autoplay-progress-bar {
    width: 100%;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.08);
    margin-top: auto;
}

.video-autoplay-progress-bar-inner {
    height: 100%;
    width: 0%;
    background: linear-gradient(to left, var(--seyasa-secondary-color), var(--seyasa-tertiary-color));
    transition: width 0s;
}

/* ─── Scrollbar ─── */
.playlist-items::-webkit-scrollbar {
    width: 4px;
}

.playlist-items::-webkit-scrollbar-track {
    background: transparent;
}

.playlist-items::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.playlist-items::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}