/* EduPortalVideoGallery Component Styles */

/* Card Custom */
.video-card-custom {
    background: #FFFFFF;
    border-radius: 16px !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(18, 62, 116, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    overflow: hidden;
}
.video-card-custom:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 24px rgba(18, 62, 116, 0.12);
}

/* Thumbnail Wrapper */
.video-thumb-wrapper {
    position: relative;
    height: 240px;
    overflow: hidden;
    background-color: #EBF0F6;
}
.video-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.video-card-custom:hover .video-thumb-img {
    transform: scale(1.08);
}

/* Play Overlay */
.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out;
    z-index: 2;
}
.video-card-custom:hover .play-overlay {
    opacity: 1;
    pointer-events: auto;
}
.video-card-custom:hover .play-overlay .play-btn-circle {
    transform: scale(1.1);
}

/* Badge Count Videos */
.badge-count-videos {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(220, 53, 69, 0.85); /* Màu đỏ đặc trưng cho video */
    color: #FFFFFF;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(4px);
    z-index: 2;
}

/* Title Custom */
.video-title-custom {
    font-size: 16px;
    font-weight: 700;
    color: #123E74;
    line-height: 1.4;
    height: 44px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 15px;
}
.video-title-custom a {
    color: #123E74;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s ease-in-out;
}
.video-title-custom a:hover {
    color: #EF4444; /* Hover màu đỏ */
}

/* Footer Info */
.video-footer-info {
    font-size: 13px;
    color: #8A99AD;
    border-top: 1px solid #F0F4F8;
    padding-top: 12px;
}


/* Video Intro */
.video-intro {
    border-left: 4px solid var(--bs-primary, #0d6efd);
    background-color: #f8f9fa;
}

/* Hover Link */
.hover-primary-link {
    color: #212529;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s ease-in-out;
}
.hover-primary-link:hover {
    color: var(--bs-primary, #0d6efd);
}

/* Video Lightbox */
.video-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}
.video-lightbox-container {
    position: relative;
    width: 90%;
    max-width: 850px;
    background: #000;
    border: 3px solid rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    overflow: visible;
}
.video-lightbox-close {
    position: absolute;
    top: -45px;
    right: 0;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 38px;
    cursor: pointer;
    outline: none;
    transition: color 0.2s;
}
.video-lightbox-close:hover {
    color: #ffc107;
}
.video-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #ffffff;
    font-size: 32px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.2s, transform 0.2s, color 0.2s;
    outline: none;
    z-index: 100000;
}
.video-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-50%) scale(1.1);
    color: #ffc107;
}
.video-lightbox-nav.prev {
    left: -80px;
}
.video-lightbox-nav.next {
    right: -80px;
}

@media (max-width: 991px) {
    .video-lightbox-nav.prev {
        left: 15px;
        background: rgba(0, 0, 0, 0.6);
    }
    .video-lightbox-nav.next {
        right: 15px;
        background: rgba(0, 0, 0, 0.6);
    }
    .video-lightbox-close {
        top: -40px;
        right: 10px;
    }
}

.video-lightbox-info {
    color: #ffffff;
    margin-top: 20px;
    text-align: center;
    max-width: 80%;
}
.video-lightbox-caption {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #f8f9fa;
}
.video-lightbox-counter {
    font-size: 14px;
    color: #adb5bd;
}

/* Layout adjustments for sidebar */
.row:has(> .col-lg-8 > .video-container-wrapper) {
    align-items: flex-start !important;
}

.col-lg-8:has(.video-container-wrapper) ~ .col-lg-4 {
    margin-top: 45px;
}

@media (max-width: 991px) {
    .col-lg-8:has(.video-container-wrapper) ~ .col-lg-4 {
        margin-top: 0;
    }
}

.col-lg-8:has(.video-container-wrapper) ~ .col-lg-4 .card-block {
    background: #FFFFFF !important;
    border-radius: 16px !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(18, 62, 116, 0.05) !important;
    overflow: hidden !important;
    margin-bottom: 24px !important;
}
.col-lg-8:has(.video-container-wrapper) ~ .col-lg-4 .panel-head {
    background-color: transparent !important;
    padding: 24px 24px 10px 24px !important;
    border-bottom: 2px solid #EBF0F6 !important;
}
.col-lg-8:has(.video-container-wrapper) ~ .col-lg-4 .panel-head h5 {
    color: #123E74 !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    display: flex !important;
    align-items: center !important;
}
.col-lg-8:has(.video-container-wrapper) ~ .col-lg-4 .panel-body {
    border: none !important;
    padding: 12px 24px 24px 24px !important;
}

/* Custom Pagination (Đồng bộ với listpost) */
.news-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 30px 0 6px;
}
.news-pagination button {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--line, #EBF0F6);
    background: #ffffff;
    color: var(--ink-soft, #4B5563);
    font-weight: 700;
    font-size: .82rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}
.news-pagination button.active {
    background: var(--navy, #123E74);
    color: #ffffff;
    border-color: var(--navy, #123E74);
}
.news-pagination button:hover:not(.active) {
    background: var(--bg, #F3F4F6);
}
.news-pagination button.nav {
    width: auto;
    padding: 0 12px;
    gap: 4px;
    font-size: .78rem;
}
