/**
 * ============================================================================
 * Kheda Arts and Commerce College - Dedicated Video Gallery Styles
 * ============================================================================
 * Palette:
 *   - Primary Blue:       #01356F
 *   - Deep Burgundy:      #792D43
 *   - Section Background: #F5E9EC
 *   - Body Text:          #302B35
 *   - Clean White:        #FFFFFF
 *   - Border Light:       #E2D5D9
 * All styles strictly prefixed with `.video-gallery-`.
 */

/* Main Section */
.video-gallery-section {
    background-color: #ffffff;
    padding: 100px 0 100px 0;
    position: relative;
}

.video-gallery-container {
    max-width: 1240px;
    margin: 0 auto;
}

/* Toolbar */
.video-gallery-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    background-color: #FFFFFF;
    padding: 18px 24px;
    border: 1px solid #E2D5D9;
    box-shadow: 0 4px 16px rgba(1, 53, 111, 0.04);
    margin-bottom: 35px;
}

.video-gallery-meta-text {
    font-size: 15px;
    color: #302B35;
    margin: 0;
    font-weight: 500;
}

.video-gallery-meta-text strong {
    color: #01356F;
    font-weight: 700;
}

.video-gallery-meta-text i {
    color: #792D43;
    font-size: 18px;
    margin-right: 6px;
    vertical-align: -2px;
}

/* Video Grid */
.video-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

/* Video Card */
.video-gallery-card {
    background-color: #FFFFFF;
    border: 1px solid #E2D5D9;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(1, 53, 111, 0.05);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.video-gallery-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 32px rgba(1, 53, 111, 0.12);
    border-color: #C8B2B9;
}

/* Thumbnail Wrap */
.video-gallery-thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: #1A1A1A;
}

.video-gallery-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease, filter 0.3s ease;
}

.video-gallery-card:hover .video-gallery-thumb-wrap img {
    transform: scale(1.06);
    filter: brightness(0.9);
}

/* Provider & Date Badges */
.video-gallery-badge-provider {
    position: absolute;
    top: 14px;
    right: 14px;
    background-color: rgba(1, 53, 111, 0.88);
    backdrop-filter: blur(4px);
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.video-gallery-badge-provider.youtube {
    background-color: #CC0000;
}

.video-gallery-badge-provider.vimeo {
    background-color: #1AB7EA;
}

.video-gallery-badge-provider i {
    font-size: 13px;
}

.video-gallery-badge-date {
    position: absolute;
    bottom: 14px;
    left: 14px;
    background-color: rgba(48, 43, 53, 0.85);
    backdrop-filter: blur(4px);
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 500;
    padding: 3px 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
}

.video-gallery-badge-date i {
    font-size: 12px;
}

/* Play Icon Overlay */
.video-gallery-play-btn {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    z-index: 3;
    background-color: rgba(1, 53, 111, 0.2);
    transition: background-color 0.3s ease;
}

.video-gallery-card:hover .video-gallery-play-btn {
    background-color: rgba(1, 53, 111, 0.4);
}

.video-gallery-play-icon {
    width: 60px;
    height: 60px;
    background-color: #792D43;
    color: #FFFFFF;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 8px 24px rgba(121, 45, 67, 0.5);
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    padding-left: 4px; /* visually center play triangle */
}

.video-gallery-card:hover .video-gallery-play-icon {
    transform: scale(1.15);
    background-color: #01356F;
    box-shadow: 0 10px 28px rgba(1, 53, 111, 0.6);
}

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

.video-gallery-card-title {
    font-family: "Source Serif Pro", serif;
    font-size: 19px;
    font-weight: 700;
    color: #01356F;
    line-height: 1.35;
    margin-bottom: 10px;
    transition: color 0.25s ease;
}

.video-gallery-card-title a {
    color: inherit;
    text-decoration: none;
}

.video-gallery-card-title a:hover {
    color: #792D43;
}

.video-gallery-card-desc {
    font-size: 14px;
    line-height: 1.6;
    color: #55505A;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Card Footer */
.video-gallery-card-footer {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #F0E6E9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.video-gallery-btn-watch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #792D43;
    text-decoration: none;
    padding: 6px 14px;
    background-color: #F5E9EC;
    transition: all 0.25s ease;
    border: none;
}

.video-gallery-btn-watch:hover {
    background-color: #792D43;
    color: #FFFFFF;
}

.video-gallery-btn-watch i {
    font-size: 15px;
}

.video-gallery-date-sub {
    font-size: 12px;
    color: #7D7884;
}

/* Empty State */
.video-gallery-empty-state {
    text-align: center;
    background-color: #FFFFFF;
    border: 1px solid #E2D5D9;
    padding: 70px 30px;
    max-width: 680px;
    margin: 40px auto;
    box-shadow: 0 6px 20px rgba(1, 53, 111, 0.05);
}

.video-gallery-empty-icon {
    width: 80px;
    height: 80px;
    background-color: #F5E9EC;
    color: #792D43;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    margin-bottom: 22px;
}

.video-gallery-empty-state h3 {
    font-family: "Source Serif Pro", serif;
    font-size: 26px;
    font-weight: 700;
    color: #01356F;
    margin-bottom: 12px;
}

.video-gallery-empty-state p {
    font-size: 15px;
    line-height: 1.7;
    color: #55505A;
    margin-bottom: 24px;
}

/* Magnific Popup Video Iframe Polish */
.mfp-video-gallery-popup .mfp-content {
    max-width: 900px;
}

.mfp-video-gallery-popup .mfp-iframe-scaler {
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
}

.mfp-video-gallery-popup .mfp-close {
    color: #FFFFFF;
    font-size: 34px;
    right: -10px;
    top: -40px;
    opacity: 0.85;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.mfp-video-gallery-popup .mfp-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Prevent Background Scrolling When Modal Open */
body.video-gallery-modal-open {
    overflow: hidden !important;
}

/* Responsive */
@media (max-width: 1199.98px) {
    .video-gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 22px;
    }
}

@media (max-width: 991.98px) {
    .video-gallery-section {
        padding: 50px 0 80px 0;
    }

    .video-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

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

@media (max-width: 767.98px) {
    .video-gallery-section {
        padding: 40px 0 60px 0;
    }

    .video-gallery-toolbar {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
        gap: 12px;
    }

    .video-gallery-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .video-gallery-play-icon {
        width: 52px;
        height: 52px;
        font-size: 24px;
    }

    .mfp-video-gallery-popup .mfp-close {
        right: 0;
        top: -36px;
    }
}

