/* Video Gallery Specific Styles */

:root {
    --card-bg: rgba(25, 24, 59, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --accent-glow: rgba(67, 186, 255, 0.4);
}

.video-gallery-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.video-gallery-item:hover {
    transform: translateY(-12px);
    border-color: var(--primary);
    box-shadow: 0 20px 50px rgba(67, 186, 255, 0.25);
}

.video-thumbnail-wrapper {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-bottom: 1px solid var(--glass-border);
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.video-gallery-item:hover .video-thumbnail {
    transform: scale(1.15) rotate(2deg);
}

.video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.4;
    transition: all 0.4s ease;
}

.video-gallery-item:hover .video-overlay {
    opacity: 1;
    background: rgba(0, 0, 0, 0.5);
}

.play-button {
    width: 80px;
    height: 80px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 28px;
    box-shadow: 0 0 30px var(--accent-glow);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: scale(0.8);
    position: relative;
    z-index: 2;
}

.play-button::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid var(--primary);
    border-radius: 50%;
    animation: playRipple 2s linear infinite;
    opacity: 0;
}

@keyframes playRipple {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

.video-gallery-item:hover .play-button {
    transform: scale(1) rotate(15deg);
    background: #fff;
    color: var(--primary);
}

.video-content {
    padding: 25px;
    background: rgba(255, 255, 255, 0.02);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.video-category {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary);
    font-weight: 800;
    margin-bottom: 12px;
    display: block;
}

.video-title {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.4;
    transition: all 0.3s ease;
}

.video-gallery-item:hover .video-title {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Tab Styling for modern look */
.video-tabs-container {
    position: relative;
    width: 100%;
    margin-bottom: 50px;
    padding: 0 60px; /* Space for arrows */
}

.category-swiper {
    padding: 15px 0;
    width: 100%;
    overflow: hidden;
    position: relative;
    min-height: 60px; /* Ensure visibility */
}

.category-swiper .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    height: auto;
}

/* Swiper will handle widths for numeric slidesPerView */
.category-swiper .swiper-slide .video-tab-btn {
    width: 100%;
    text-align: center;
}

.video-tab-btn {
    padding: 10px 22px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.video-tab-btn:hover,
.video-tab-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 5px 15px rgba(67, 186, 255, 0.3); /* Softer glow */
}

/* Category Scroll Arrows */
.scroll-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 35px;
    height: 35px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    opacity: 0.8;
}

.scroll-nav-btn:hover {
    opacity: 1;
    background: #fff;
    color: var(--primary);
    transform: translateY(-50%) scale(1.1);
}

.scroll-nav-btn.prev-btn {
    left: 10px;
}

.scroll-nav-btn.next-btn {
    right: 10px;
}

.scroll-nav-btn.swiper-button-disabled {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Hide arrows on mobile as they are too small and swipe is native */
@media (max-width: 767px) {
    .scroll-nav-btn {
        display: none;
    }
}

/* Magnific Popup Enhancement */
.mfp-iframe-scaler {
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #000;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.mfp-close {
    width: 44px !important;
    height: 44px !important;
    line-height: 44px !important;
    background: var(--primary) !important;
    border-radius: 50% !important;
    margin: 20px !important;
    opacity: 1 !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    color: #fff !important;
    font-size: 24px !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3) !important;
    cursor: pointer !important;
}

.mfp-close:hover {
    transform: rotate(90deg) scale(1.1) !important;
    background: #fff !important;
    color: var(--primary) !important;
}

/* Responsive adjustments */
@media (max-width: 1199px) {
    .video-item-col {
        padding-bottom: 15px;
    }
}

@media (max-width: 767px) {
    .rg-40 {
        row-gap: 35px;
    }

    .play-button {
        width: 60px;
        height: 60px;
        font-size: 20px;
    }

    .video-title {
        font-size: 18px;
    }

    .video-content {
        padding: 20px;
    }

    .video-tabs-container {
        padding: 0 10px;
    }

    .category-swiper {
        padding: 5px 0;
    }
    
    .video-tabs-container {
        padding: 0 5px; /* Less padding on mobile for more button space */
    }

    .video-tab-btn {
        padding: 8px 18px;
        font-size: 13px;
    }

    .mfp-close {
        margin: 10px !important;
    }
}

/* Background Decoration */
.main-content.tf-spacing-2 {
    position: relative;
    overflow: hidden;
}

.main-content.tf-spacing-2::before,
.main-content.tf-spacing-2::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(67, 186, 255, 0.05) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

.main-content.tf-spacing-2::before {
    top: -100px;
    left: -200px;
}

.main-content.tf-spacing-2::after {
    bottom: -100px;
    right: -200px;
}

/* Typography Refinement */
.video-title {
    font-family: 'Outfit', sans-serif;
    /* Assuming Outfit or similar is available */
    letter-spacing: -0.02em;
}

.video-category {
    background: linear-gradient(90deg, var(--primary), #1bdac3);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

/* Magnific Popup Fade Animation */
.mfp-fade.mfp-bg {
    opacity: 0;
    transition: all 0.3s ease-out;
    background: rgba(10, 10, 30, 0.9);
    backdrop-filter: blur(8px);
}

.mfp-fade.mfp-bg.mfp-ready {
    opacity: 1;
}

.mfp-fade.mfp-bg.mfp-removing {
    opacity: 0;
}

.mfp-fade.mfp-wrap .mfp-content {
    opacity: 0;
    transition: all 0.3s ease-out;
    transform: scale(0.9) translateY(20px);
}

.mfp-fade.mfp-wrap.mfp-ready .mfp-content {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.mfp-fade.mfp-wrap.mfp-removing .mfp-content {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
}