/* ==========================================================================
   KSPL VIDEO HUB SPECIFIC STYLING
   ========================================================================== */

.videos-page-container {
    padding-top: 130px;
    padding-bottom: 90px;
    min-height: 90vh;
}

/* Page Hero Card Header (Match Center Styling) */
.videos-hero-card {
    position: relative;
    background: var(--glass-bg);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--glass-border);
    border-radius: 36px;
    padding: 60px 40px;
    text-align: center;
    margin-bottom: 45px;
    box-shadow: var(--elevated-shadow);
    overflow: hidden;
}

/* Slow rotating gradient mesh background */
.videos-hero-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 30% 30%, rgba(242, 192, 31, 0.12) 0%, transparent 75%),
        radial-gradient(circle at 70% 70%, rgba(144, 23, 29, 0.1) 0%, transparent 75%);
    pointer-events: none;
    animation: slow-bg-rotation 25s linear infinite;
    z-index: 0;
}

.videos-hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 4.2rem);
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: -2px;
    line-height: 1.1;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    display: inline-block;
    background: linear-gradient(135deg, var(--burgundy-dark) 0%, var(--burgundy) 40%, var(--gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.videos-hero-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 6px;
    background: linear-gradient(90deg, var(--burgundy) 0%, var(--gold) 100%);
    border-radius: 3px;
}

.videos-hero-subtitle {
    font-family: var(--font-body);
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 650px;
    margin: 25px auto 0;
    line-height: 1.6;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* Search and Filter Controls Layout */
.filter-controls-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 45px;
    flex-wrap: wrap;
}

/* Category Filter Pills */
.category-filters {
    display: flex;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(144, 23, 29, 0.08);
    border-radius: 40px;
    padding: 6px;
    box-shadow: var(--glass-shadow);
}

.filter-btn {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 12px 30px;
    border-radius: 35px;
    color: var(--text-secondary);
    cursor: pointer;
    background: transparent;
    border: none;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.filter-btn:hover {
    color: var(--burgundy);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--burgundy) 0%, var(--burgundy-dark) 100%);
    color: #ffffff !important;
    box-shadow: 0 8px 20px var(--burgundy-glow);
}

/* Search Box Wrapper styling */
.search-wrapper {
    position: relative;
    min-width: 320px;
    flex-grow: 0.3;
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    pointer-events: none;
    opacity: 0.6;
}

.search-bar {
    width: 100%;
    padding: 14px 20px 14px 50px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(144, 23, 29, 0.08);
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    outline: none;
    box-shadow: var(--glass-shadow);
    transition: all 0.3s ease;
}

.search-bar:focus {
    background: #ffffff;
    border-color: var(--burgundy);
    box-shadow: 0 10px 25px rgba(144, 23, 29, 0.05);
}

/* Videos Grid Layout */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 30px;
}

/* Video Card Styles */
.video-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.video-thumb-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #000;
}

.video-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Premium Play Hover Overlay */
.video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(144, 23, 29, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.video-play-icon {
    width: 55px;
    height: 55px;
    background: #ffffff;
    color: var(--burgundy);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    padding-left: 4px; /* Align play triangle */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    transform: scale(0.8);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Badges */
.category-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 14px;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    color: #ffffff;
    z-index: 2;
}

.badge-shorts {
    background: var(--gold);
    color: #0c051a;
}

.badge-highlights {
    background: var(--burgundy);
}

.video-info {
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.video-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.4;
    margin: 0;
    transition: color 0.3s ease;
}

/* Hover States for Video Cards */
.video-card:hover {
    transform: translateY(-8px);
    border-color: rgba(144, 23, 29, 0.15);
    box-shadow: var(--glass-shadow);
}

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

.video-card:hover .video-play-overlay {
    opacity: 1;
}

.video-card:hover .video-play-icon {
    transform: scale(1);
}

.video-card:hover .video-title {
    color: var(--burgundy);
}

/* No Videos Found Alert Style */
.no-videos-alert {
    text-align: center;
    padding: 60px 20px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(144, 23, 29, 0.08);
    border-radius: 28px;
    box-shadow: var(--card-shadow);
}

.no-videos-alert p {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin: 0;
}

/* Fullscreen Video Playback Lightbox Modal */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.video-modal.active {
    opacity: 1;
    visibility: visible;
}

.video-modal-close {
    position: absolute;
    top: 25px;
    right: 25px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 32px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10001;
    transition: all 0.3s ease;
}

.video-modal-close:hover {
    background: var(--wicket-red);
    color: #ffffff;
    transform: rotate(90deg);
}

.video-modal-body {
    width: 90%;
    max-width: 950px;
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.video-modal.active .video-modal-body {
    transform: scale(1);
}

.video-player-container {
    width: 100%;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.video-player-container video {
    width: 100%;
    max-height: 80vh;
    display: block;
    outline: none;
}

/* Adjust for portrait shorts layout within modal */
.video-modal.layout-portrait .video-modal-body {
    max-width: 400px;
    aspect-ratio: 9/16;
}

.video-modal.layout-portrait .video-player-container video {
    height: 100%;
    object-fit: cover;
}

/* Media Queries for Responsive Design */
@media (max-width: 768px) {
    .videos-page-container {
        padding-top: 100px;
        padding-bottom: 60px;
    }
    
    .videos-hero-card {
        padding: 40px 20px;
    }
    
    .filter-controls-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .category-filters {
        justify-content: center;
    }
    
    .search-wrapper {
        min-width: 100%;
    }
}
