/* ========================================
   ویدیو در سایدبار (کنار گالری)
   ======================================== */
.video-sidebar-wrapper {
    margin-top: 15px;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    padding: 8px;
}

.video-sidebar-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    padding: 4px 8px 6px 8px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.video-sidebar-thumb {
    position: relative;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    background: #0a0a0a;
    margin-top: 6px;
}

.video-sidebar-thumb .h_iframe-aparat_embed_frame {
    position: relative;
    pointer-events: none;
}

.video-sidebar-thumb .h_iframe-aparat_embed_frame .ratio {
    display: block;
    width: 100%;
    height: auto;
}

.video-sidebar-thumb .h_iframe-aparat_embed_frame iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-sidebar-thumb .play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 2;
}

.video-sidebar-thumb .play-overlay .play-btn {
    width: 45px;
    height: 45px;
    background: rgba(233, 30, 99, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(233, 30, 99, 0.5);
}

.video-sidebar-thumb:hover .play-overlay .play-btn {
    transform: scale(1.12);
    background: #c2185b;
}

.video-sidebar-thumb:hover {
    border-color: #e91e63;
}

/* ========================================
   مودال (پاپ‌آپ)
   ======================================== */
.video-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}

.video-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-modal .modal-box {
    position: relative;
    width: 92%;
    max-width: 850px;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    animation: modalSlideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.video-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.video-modal .modal-header h3 {
    margin: 0;
    font-size: 17px;
    color: #333;
    font-weight: 600;
}

.video-modal .modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    transition: all 0.3s;
    padding: 0 6px;
    line-height: 1;
}

.video-modal .modal-close:hover {
    color: #e91e63;
    transform: rotate(90deg);
}

.video-modal .modal-body {
    padding: 16px;
    background: #0a0a0a;
}

.video-modal .modal-body .h_iframe-aparat_embed_frame {
    position: relative;
    width: 100%;
}

.video-modal .modal-body .h_iframe-aparat_embed_frame .ratio {
    display: block;
    width: 100%;
    height: auto;
}

.video-modal .modal-body .h_iframe-aparat_embed_frame iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

/* ========================================
   انیمیشن‌ها
   ======================================== */
@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.92);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ========================================
   ریسپانسیو
   ======================================== */
@media (max-width: 768px) {
    .video-sidebar-wrapper {
        max-width: 100%;
        margin: 15px 0;
    }
    
    .video-modal .modal-box {
        width: 98%;
        border-radius: 12px;
    }
    
    .video-modal .modal-header {
        padding: 10px 14px;
    }
    
    .video-modal .modal-header h3 {
        font-size: 15px;
    }
    
    .video-modal .modal-body {
        padding: 10px;
    }
}

@media (max-width: 576px) {
    .video-sidebar-thumb .play-overlay .play-btn {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }
}