/**
 * Video Library Page Custom Styling
 * Version: 1.0.0
 *
 * Dedicated stylesheet for the Video Library page (/video)
 * Mirrors the Dark-Fire design system and follows the Contact Us styling pattern
 */

/* ========================================
   CSS Variables
======================================== */
:root {
    --video-base: #1a1a1a;
    --video-base-2: #2a2a2a;
    --video-base-3: #3a3a3a;
    --video-primary: #ff9800;
    --video-primary-dark: #ff6f00;
    --video-contrast: #ffffff;
    --video-contrast-2: #e0e0e0;
    --video-contrast-3: #cccccc;
    --video-border: rgba(255, 255, 255, 0.25);
    --video-border-light: rgba(255, 255, 255, 0.15);
    --video-shadow: rgba(0, 0, 0, 0.3);
    --video-radius-lg: 16px;
    --video-radius: 12px;
}

/* ========================================
   Base Layout
======================================== */

.video-page {
    position: relative;
    z-index: 1;
}

.video-page h2,
.video-page h3,
.video-page h4,
.video-page h5 {
    font-family: 'Poppins', sans-serif;
}

/* Hero Cover Section */
.video-page > .wp-block-cover {
    position: relative;
    overflow: hidden;
}

.video-page > .wp-block-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, rgba(255, 152, 0, 0.1), transparent 60%);
    pointer-events: none;
    z-index: 1;
}

.video-page > .wp-block-cover .wp-block-cover__inner-container {
    position: relative;
    z-index: 2;
}

/* ========================================
   Video Card Modern Design
======================================== */

.video-card-modern {
    background-color: var(--video-base);
    border: 1px solid var(--video-border);
    border-radius: var(--video-radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 12px var(--video-shadow);
    transition: all 0.3s ease;
    position: relative;
}

.video-card-modern::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(255, 152, 0, 0.08), transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 0;
}

.video-card-modern:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 152, 0, 0.4);
}

.video-card-modern:hover::before {
    opacity: 1;
}

/* Video embed wrapper */
.video-parallax-wrapper {
    overflow: hidden;
    border-radius: var(--video-radius-lg) var(--video-radius-lg) 0 0;
    position: relative;
    background: var(--video-base-2);
}

.video-parallax-wrapper .wp-block-embed {
    margin: 0;
}

.video-parallax-wrapper .wp-block-embed__wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.video-parallax-wrapper .wp-block-embed__wrapper iframe,
.video-parallax-wrapper .wp-block-embed__wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Content section below video */
.video-card-modern > .wp-block-group {
    position: relative;
    z-index: 1;
}

.video-card-modern h3 {
    color: var(--video-contrast);
    font-family: 'Poppins', sans-serif;
    line-height: 1.3;
    margin: 0 0 12px 0;
}

.video-card-modern p {
    color: var(--video-contrast-2);
    margin: 0;
}

/* ========================================
   Section Headings
======================================== */

.video-page .scroll-reveal-heading {
    color: var(--video-contrast);
    font-family: 'Poppins', sans-serif;
    position: relative;
    padding-bottom: 12px;
}

.video-page .scroll-reveal-heading::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, var(--video-primary), transparent);
    border-radius: 2px;
}

/* ========================================
   Separators
======================================== */

.video-page .scroll-reveal-separator {
    border-color: var(--video-border-light);
    opacity: 0.5;
}

/* ========================================
   Direct Video Blocks (Non-Card)
======================================== */

.video-page > .wp-block-group > .wp-block-group > .wp-block-columns > .wp-block-column > .wp-block-video {
    margin-bottom: 32px;
    border-radius: var(--video-radius);
    overflow: hidden;
    box-shadow: 0 4px 12px var(--video-shadow);
    transition: all 0.3s ease;
}

.video-page > .wp-block-group > .wp-block-group > .wp-block-columns > .wp-block-column > .wp-block-video:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.video-page > .wp-block-group > .wp-block-group > .wp-block-columns > .wp-block-column > .wp-block-video video {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--video-radius);
}

/* ========================================
   Content Typography
======================================== */

.video-page .wp-block-column > p strong {
    color: var(--video-contrast);
    font-weight: 600;
}

.video-page .wp-block-column > p {
    color: var(--video-contrast-2);
    line-height: 1.7;
    margin-bottom: 16px;
}

.video-page .wp-block-column > h3 {
    color: var(--video-contrast);
    margin-top: 32px;
    margin-bottom: 16px;
}

/* ========================================
   2025 TRENDY SCROLL EFFECTS
======================================== */

/* Initial state - hidden and prepared for animation */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px) scale(0.96);
    filter: blur(8px);
    transition: all 0.9s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity, filter;
}

/* Visible state - smooth reveal */
.scroll-reveal.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

/* Staggered delay for sequential cards */
.scroll-reveal:nth-child(1) { transition-delay: 0ms; }
.scroll-reveal:nth-child(2) { transition-delay: 100ms; }
.scroll-reveal:nth-child(3) { transition-delay: 200ms; }
.scroll-reveal:nth-child(4) { transition-delay: 300ms; }
.scroll-reveal:nth-child(5) { transition-delay: 400ms; }
.scroll-reveal:nth-child(6) { transition-delay: 500ms; }
.scroll-reveal:nth-child(7) { transition-delay: 600ms; }

/* Video parallax effect */
.video-parallax-wrapper .wp-block-embed {
    transform: scale(1.08);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal.is-visible .video-parallax-wrapper .wp-block-embed {
    transform: scale(1);
}

/* Enhanced hover effects for visible cards */
.scroll-reveal.is-visible:hover {
    transform: translateY(-8px) scale(1);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.scroll-reveal.is-visible:hover .wp-block-embed {
    transform: scale(1.02);
}

/* Section headings animation */
.scroll-reveal-heading {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal-heading.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* Separator animation */
.scroll-reveal-separator {
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal-separator.is-visible {
    opacity: 1;
    transform: scaleX(1);
}

/* Premium border glow effect on hover */
.scroll-reveal.is-visible {
    border: 1px solid var(--video-border);
    transition: all 0.9s cubic-bezier(0.16, 1, 0.3, 1), 
                border-color 0.3s ease;
}

.scroll-reveal.is-visible:hover {
    border-color: var(--video-primary);
}

/* ========================================
   Sidebar Column
======================================== */

.video-page .wp-block-columns > .wp-block-column[style*="flex-basis:30%"] {
    position: relative;
}

/* ========================================
   Responsive Design
======================================== */

@media (max-width: 1024px) {
    .video-page .wp-block-columns {
        gap: 40px;
    }

    .video-card-modern {
        margin-bottom: 24px;
    }
    
    /* Reduce blur effect on tablets */
    .scroll-reveal {
        filter: blur(4px);
    }
}

@media (max-width: 782px) {
    /* Stack columns */
    .video-page .wp-block-columns {
        flex-direction: column;
    }

    .video-page .wp-block-column {
        flex-basis: 100% !important;
        width: 100%;
    }

    /* Adjust video card spacing */
    .video-card-modern {
        margin-bottom: 20px;
    }

    /* Simplify scroll effects on mobile */
    .scroll-reveal {
        transform: translateY(30px) scale(0.98);
        filter: blur(3px);
        transition-duration: 0.7s;
    }
    
    /* Remove stagger delays on mobile for faster reveal */
    .scroll-reveal:nth-child(n) {
        transition-delay: 0ms;
    }
}

@media (max-width: 480px) {
    /* Tighter spacing on small screens */
    .video-page > .wp-block-cover {
        min-height: 280px !important;
    }

    .video-page .scroll-reveal-heading {
        font-size: 28px !important;
    }

    .video-card-modern h3 {
        font-size: 20px !important;
    }

    .video-card-modern p {
        font-size: 14px !important;
    }
    
    /* Further simplify on small screens */
    .scroll-reveal {
        transform: translateY(20px) scale(0.99);
        filter: none;
    }
}

/* ========================================
   Accessibility - Reduced Motion
======================================== */

@media (prefers-reduced-motion: reduce) {
    .scroll-reveal,
    .scroll-reveal-heading,
    .scroll-reveal-separator,
    .video-card-modern,
    .video-parallax-wrapper .wp-block-embed {
        transition: none !important;
        animation: none !important;
    }
    
    /* Show all content immediately */
    .scroll-reveal,
    .scroll-reveal-heading,
    .scroll-reveal-separator {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
    }
}

/* ========================================
   Focus Styles for Accessibility
======================================== */

.video-page a:focus-visible {
    outline: 2px solid var(--video-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

.video-card-modern:focus-within {
    border-color: var(--video-primary);
    box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.2);
}

/* ========================================
   Print Styles
======================================== */

@media print {
    .video-page .wp-block-cover {
        display: none !important;
    }

    .video-page .wp-block-columns {
        flex-direction: column;
    }

    .video-card-modern {
        break-inside: avoid;
        border: 1px solid #000;
        background: #fff;
        color: #000;
        box-shadow: none;
    }

    .video-card-modern h3 {
        color: #000;
    }

    .video-parallax-wrapper {
        display: none;
    }
}
