/* ========================================
   باکس ویدیو در سایدبار
   ======================================== */
.video-sidebar-wrapper {
    margin-top: 15px;
    border-radius: 16px;
    overflow: hidden;
    background: rgb(248, 249, 250);
    border: 1px solid rgb(233, 236, 239);
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.video-sidebar-title {
    font-size: 14px;
    font-weight: 700;
    color: rgb(51, 51, 51);
    padding: 4px 8px 8px 8px;
    text-align: center;
    border-bottom: 2px solid rgb(238, 238, 238);
    letter-spacing: 0.3px;
}

/* ===== باکس مستطیلی ===== */
.video-box {
    position: relative;
    width: 100%;
    height: 180px;
    background: linear-gradient(145deg, rgb(60, 60, 60), rgb(40, 40, 40));
    margin-top: 8px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* الگوی توسی (خطوط) برای زیبایی */
.video-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
    z-index: 1;
}

/* ===== آیکون پخش فیلم ===== */
.video-box .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    filter: drop-shadow(0 4px 20px rgba(255, 235, 59, 0.3));
}

.video-box .play-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ===== هوور افکت ===== */
.video-box:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 35px rgba(0, 0, 0, 0.25);
}

.video-box:hover .play-icon {
    transform: translate(-50%, -50%) scale(1.08);
    filter: drop-shadow(0 4px 30px rgba(255, 235, 59, 0.5));
}

/* ========================================
   مودال (پاپ‌آپ) - ویدیو کامل از اول
   ======================================== */
.video-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgb(0, 0, 0);
}

.video-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-modal .modal-box {
    position: relative;
    width: 90%;
    max-width: 900px;
    background: rgb(0, 0, 0);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 40px 100px rgb(0, 0, 0);
}

.video-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 18px;
    background: rgb(20, 20, 20);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.video-modal .modal-header .modal-title {
    margin: 0;
    font-size: 15px;
    color: rgb(255, 255, 255);
    font-weight: 400;
}

.video-modal .modal-header .modal-title .highlight {
    color: rgb(255, 235, 59);
}

.video-modal .modal-close {
    background: none;
    border: none;
    font-size: 26px;
    cursor: pointer;
    color: rgb(255, 255, 255);
    transition: all 0.3s;
    padding: 0 6px;
    opacity: 0.6;
    line-height: 1;
}

.video-modal .modal-close:hover {
    color: rgb(255, 235, 59);
    transform: rotate(90deg);
    opacity: 1;
}

.video-modal .modal-body {
    padding: 0;
    background: rgb(0, 0, 0);
    position: relative;
}

.video-modal .modal-body .video-container {
    position: relative;
    width: 100%;
}

.video-modal .modal-body .video-container iframe {
    display: block;
    width: 100%;
    height: 500px;
    border: none;
}

/* ========================================
   ریسپانسیو
   ======================================== */

/* تبلت */
@media (max-width: 992px) {
    .video-box {
        height: 150px;
    }
    
    .video-box .play-icon {
        width: 160px;
        height: 160px;
    }
    
    .video-modal .modal-body .video-container iframe {
        height: 400px;
    }
}

/* موبایل بزرگ */
@media (max-width: 768px) {
    .video-sidebar-wrapper {
        max-width: 100%;
        margin: 15px 0;
        padding: 8px;
    }
    
    .video-box {
        height: 130px;
    }
    
    .video-box .play-icon {
        width: 130px;
        height: 130px;
    }
    
    .video-modal .modal-box {
        width: 98%;
        border-radius: 8px;
    }
    
    .video-modal .modal-header {
        padding: 8px 12px;
    }
    
    .video-modal .modal-header .modal-title {
        font-size: 13px;
    }
    
    .video-modal .modal-body .video-container iframe {
        height: 300px;
    }
}

/* موبایل کوچک */
@media (max-width: 576px) {
    .video-sidebar-title {
        font-size: 12px;
    }
    
    .video-box {
        height: 110px;
    }
    
    .video-box .play-icon {
        width: 100px;
        height: 100px;
    }
    
    .video-modal .modal-header {
        padding: 6px 10px;
    }
    
    .video-modal .modal-header .modal-title {
        font-size: 12px;
    }
    
    .video-modal .modal-close {
        font-size: 22px;
    }
    
    .video-modal .modal-body .video-container iframe {
        height: 220px;
    }
}

/* موبایل خیلی کوچک */
@media (max-width: 400px) {
    .video-box {
        height: 90px;
    }
    
    .video-box .play-icon {
        width: 80px;
        height: 80px;
    }
    
    .video-modal .modal-body .video-container iframe {
        height: 180px;
    }
}
/* ========================================
   توقف شناوری در فوتر
   ======================================== */
footer,
.main-footer,
.footer,
#footer {
    position: relative;
    z-index: 10;
    background: rgb(255, 255, 255);
    clear: both;
}

/* سایدبار شناور */
.col-left {
    position: sticky;
    top: 20px;
    align-self: flex-start;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

/* وقتی محتوا تموم میشه، شناوری متوقف بشه */
main {
    position: relative;
    z-index: 1;
}