/* =========================================================================
   Video Gallery Page Styles - R. G. Shah Science College
   Palette: Primary #0F2A4C | Secondary #D6AD60 | Cream #F7F3EA | Text #344054 | Highlight #3987C9
   ========================================================================= */

.video-gallery-main-wrap {
    background-color: var(--white, #FFFFFF);
    padding-top: 120px;
    padding-bottom: 120px;
    position: relative;
}

/* =========================================================================
   Video Header & Filter Bar
   ========================================================================= */
.video-gallery-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ECE7DB;
}

.video-gallery-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.video-meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 8px 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--primary-color, #0F2A4C);
    background-color: #F7F3EA;
    border: 1px solid #ECE7DB;
}

.video-meta-badge i {
    color: #FF0000;
    font-size: 15px;
}

.video-meta-count {
    font-size: 15px;
    color: var(--body-text, #344054);
    font-weight: 500;
}

.video-meta-count strong {
    color: var(--primary-color, #0F2A4C);
    font-weight: 700;
}

.video-gallery-hint {
    font-size: 13px;
    color: #667085;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* =========================================================================
   Video Cards Grid
   ========================================================================= */
.video-card {
    background-color: var(--white, #FFFFFF);
    border: 1px solid #ECE7DB;
    border-radius: 16px 0;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(15, 42, 76, 0.05);
    transition: transform 0.35s cubic-bezier(0.165, 0.84, 0.44, 1),
    box-shadow 0.35s cubic-bezier(0.165, 0.84, 0.44, 1),
    border-color 0.35s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.video-card:hover {
    transform: translateY(-6px);
    border-color: var(--secondary-color, #D6AD60);
    box-shadow: 0 16px 36px rgba(15, 42, 76, 0.12);
}

/* Thumbnail Wrapper */
.video-card-thumb-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background-color: #0F2A4C;
    display: block;
    text-decoration: none;
    cursor: pointer;
}

.video-card-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.video-card:hover .video-card-thumb {
    transform: scale(1.06);
}

/* Gradient Overlay */
.video-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 42, 76, 0.15) 0%, rgba(15, 42, 76, 0.72) 100%);
    transition: background 0.35s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-card:hover .video-card-overlay {
    background: linear-gradient(180deg, rgba(15, 42, 76, 0.25) 0%, rgba(15, 42, 76, 0.85) 100%);
}

/* Top Provider Badge */
.video-card-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    background: rgba(15, 42, 76, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 6px 0;
    border: 1px solid rgba(214, 173, 96, 0.35);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.video-card-badge i {
    color: #FF0000;
    font-size: 12px;
}

/* Play Button */
.video-card-play-btn {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background-color: var(--secondary-color, #D6AD60);
    color: var(--primary-color, #0F2A4C);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
    position: relative;
}

.video-card-play-btn i {
    margin-left: 3px; /* visual center for play triangle */
}

.video-card-play-btn::before {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid rgba(214, 173, 96, 0.6);
    animation: videoPulse 2s infinite ease-out;
}

@keyframes videoPulse {
    0% {
        transform: scale(0.95);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.15);
        opacity: 0.3;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

.video-card:hover .video-card-play-btn {
    transform: scale(1.1);
    background-color: #FFFFFF;
    color: var(--primary-color, #0F2A4C);
}

/* Duration / Order Badge (bottom-left of thumb) */
.video-card-index {
    position: absolute;
    bottom: 12px;
    left: 14px;
    z-index: 2;
    background: rgba(15, 42, 76, 0.75);
    color: var(--secondary-color, #D6AD60);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px 0;
    letter-spacing: 0.4px;
}

/* Card Body */
.video-card-body {
    padding: 22px 24px 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.video-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color, #0F2A4C);
    line-height: 1.45;
    margin-bottom: 10px;
    transition: color 0.25s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-card:hover .video-card-title {
    color: var(--secondary-color, #D6AD60);
}

.video-card-desc {
    font-size: 14px;
    color: var(--body-text, #344054);
    line-height: 1.6;
    margin-bottom: 18px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
}

.video-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid #ECE7DB;
    margin-top: auto;
}

.video-card-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-color, #0F2A4C);
    text-decoration: none;
    letter-spacing: 0.3px;
    transition: color 0.25s ease, transform 0.25s ease;
}

.video-card-action i {
    color: var(--secondary-color, #D6AD60);
    font-size: 16px;
    transition: transform 0.25s ease;
}

.video-card:hover .video-card-action {
    color: var(--secondary-color, #D6AD60);
}

.video-card:hover .video-card-action i {
    transform: scale(1.15);
}

.video-card-watch-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #667085;
}

/* =========================================================================
   Empty State
   ========================================================================= */
.video-empty-card {
    text-align: center;
    padding: 80px 30px;
    background-color: #FAF8F3;
    border: 1px dashed #D6AD60;
    border-radius: 16px 0;
    max-width: 680px;
    margin: 30px auto;
}

.video-empty-icon {
    font-size: 56px;
    color: var(--secondary-color, #D6AD60);
    margin-bottom: 20px;
    display: inline-block;
}

.video-empty-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color, #0F2A4C);
    margin-bottom: 12px;
}

.video-empty-desc {
    font-size: 15px;
    color: var(--body-text, #344054);
    max-width: 480px;
    margin: 0 auto 24px;
    line-height: 1.6;
}

/* =========================================================================
   Magnific Popup Customization for Video Lightbox
   ========================================================================= */
.video-gallery-mfp.mfp-bg {
    z-index: 99999 !important;
    background: rgba(15, 42, 76, 0.94) !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-gallery-mfp.mfp-bg.mfp-ready {
    opacity: 1;
}

.video-gallery-mfp.mfp-bg.mfp-removing {
    opacity: 0;
}

.video-gallery-mfp.mfp-wrap {
    z-index: 100000 !important;
}

.video-gallery-mfp .mfp-content {
    max-width: 1040px;
    padding: 0 15px;
}

.video-gallery-mfp .mfp-iframe-scaler {
    border-radius: 14px 0;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
    border: 2px solid rgba(214, 173, 96, 0.45);
    background: #000000;
}

.video-gallery-mfp .mfp-close {
    top: -46px;
    right: 0;
    width: 38px;
    height: 38px;
    line-height: 38px;
    border-radius: 50%;
    background-color: var(--secondary-color, #D6AD60) !important;
    color: var(--primary-color, #0F2A4C) !important;
    text-align: center;
    opacity: 1;
    font-size: 22px;
    font-weight: 700;
    padding: 0;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.video-gallery-mfp .mfp-close:hover {
    background-color: #FFFFFF !important;
    color: var(--primary-color, #0F2A4C) !important;
    transform: rotate(90deg);
}

/* =========================================================================
   Responsive Design
   ========================================================================= */
@media (max-width: 991px) {
    .video-gallery-main-wrap {
        padding-top: 80px;
        padding-bottom: 80px;
    }

    .video-card-title {
        font-size: 17px;
    }
}

@media (max-width: 767px) {
    .video-gallery-main-wrap {
        padding-top: 60px;
        padding-bottom: 60px;
    }

    .video-gallery-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 30px;
    }

    .video-card-body {
        padding: 18px 20px 20px;
    }

    .video-card-title {
        font-size: 16px;
    }

    .video-card-play-btn {
        width: 50px;
        height: 50px;
        font-size: 16px;
    }

    .video-gallery-mfp .mfp-close {
        top: -40px;
        right: 0;
        width: 34px;
        height: 34px;
        line-height: 34px;
        font-size: 18px;
    }
}
