/* ============================================================================
   NurseKind AI - Video Section & Lightbox Modal CSS
   ============================================================================
   
   INSTRUCTIONS:
   Add this CSS to your existing styles.css file, or include it as a separate 
   stylesheet in your HTML head section:
   <link rel="stylesheet" href="css/video-lightbox.css">
   
   This CSS provides:
   1. Updated "How It Works" section styling with video thumbnail
   2. Professional lightbox modal for video playback
   3. Responsive design for mobile and desktop
   4. Smooth animations and transitions
   ============================================================================ */


/* ============================================================================
   HOW IT WORKS SECTION - VIDEO DESIGN
   ============================================================================ */

/* Update the How It Works section background for better visual hierarchy */
.how-it-works {
    background: linear-gradient(180deg, #ffffff 0%, #F8FAFC 100%);
    padding: 5rem 0;
    position: relative;
}

/* Add subtle pattern overlay for depth */
.how-it-works::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 2px 2px, rgba(37, 99, 235, 0.03) 1px, transparent 0);
    background-size: 40px 40px;
    pointer-events: none;
}

/* Video demo container */
.video-demo-container {
    max-width: 900px;
    margin: 3rem auto 0;
    text-align: center;
}

/* Video thumbnail wrapper */
.video-thumbnail {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.12),
        0 8px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: #000;
}

.video-thumbnail:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 30px 80px rgba(37, 99, 235, 0.2),
        0 12px 30px rgba(0, 0, 0, 0.12);
}

/* Thumbnail image */
.thumbnail-image {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform 0.4s ease, opacity 0.3s ease;
}

.video-thumbnail:hover .thumbnail-image {
    transform: scale(1.02);
    opacity: 0.9;
}

/* Play button overlay */
.play-button-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.video-thumbnail:hover .play-button-overlay {
    transform: translate(-50%, -50%) scale(1.1);
}

/* Play icon SVG */
.play-icon {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
    transition: all 0.3s ease;
}

.video-thumbnail:hover .play-icon {
    filter: drop-shadow(0 6px 20px rgba(37, 99, 235, 0.5));
}

.play-icon circle {
    transition: fill 0.3s ease;
}

.video-thumbnail:hover .play-icon circle {
    fill: rgba(37, 99, 235, 1);
}

/* Video caption */
.video-caption {
    margin-top: 1.5rem;
    font-size: 1rem;
    color: var(--text-muted, #64748b);
    font-style: italic;
    line-height: 1.6;
}


/* ============================================================================
   HERO SECTION - VIDEO DESIGN
   ============================================================================ */

/* Hero video thumbnail wrapper */
.hero-video-thumbnail {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 
        0 25px 70px rgba(0, 0, 0, 0.15),
        0 10px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: #000;
}

.hero-video-thumbnail:hover {
    transform: translateY(-10px);
    box-shadow: 
        0 35px 90px rgba(37, 99, 235, 0.25),
        0 15px 35px rgba(0, 0, 0, 0.15);
}

/* Hero thumbnail image */
.hero-thumbnail-image {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform 0.4s ease, opacity 0.3s ease;
}

.hero-video-thumbnail:hover .hero-thumbnail-image {
    transform: scale(1.03);
    opacity: 0.9;
}

/* Hero play button overlay */
.hero-play-button-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-video-thumbnail:hover .hero-play-button-overlay {
    transform: translate(-50%, -50%) scale(1.15);
}

/* Hero play icon SVG */
.hero-play-icon {
    width: 90px;
    height: 90px;
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.4));
    transition: all 0.3s ease;
}

.hero-video-thumbnail:hover .hero-play-icon {
    filter: drop-shadow(0 8px 24px rgba(37, 99, 235, 0.6));
}

.hero-play-icon circle {
    transition: fill 0.3s ease;
}

.hero-video-thumbnail:hover .hero-play-icon circle {
    fill: rgba(37, 99, 235, 1);
}

/* Hero video caption styling */
.hero-screenshot-caption {
    margin-top: 1.5rem;
    font-size: 1rem;
    color: var(--text-muted, #64748b);
    font-style: italic;
    line-height: 1.6;
    text-align: center;
}


/* ============================================================================
   VIDEO LIGHTBOX MODAL
   ============================================================================ */

/* Lightbox container */
.video-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

/* Dark overlay */
.video-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Video content container */
.video-lightbox-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    z-index: 10;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.video-lightbox.active .video-lightbox-content {
    transform: scale(1);
}

/* Close button */
.video-close-btn {
    position: absolute;
    top: -50px;
    right: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.video-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: rotate(90deg);
}

.video-close-btn svg {
    width: 20px;
    height: 20px;
}

/* Video wrapper (16:9 aspect ratio) */
.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 
        0 25px 100px rgba(0, 0, 0, 0.5),
        0 10px 40px rgba(0, 0, 0, 0.3);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}


/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

/* Tablet and below */
@media (max-width: 768px) {
    .how-it-works {
        padding: 3rem 0;
    }

    .video-demo-container {
        margin: 2rem auto 0;
    }

    .play-icon {
        width: 60px;
        height: 60px;
    }
    
    .hero-play-icon {
        width: 70px;
        height: 70px;
    }

    .video-caption,
    .hero-screenshot-caption {
        font-size: 0.9rem;
        margin-top: 1rem;
        padding: 0 1rem;
    }

    /* Lightbox adjustments for mobile */
    .video-lightbox-content {
        width: 95%;
    }

    .video-close-btn {
        top: -45px;
        width: 40px;
        height: 40px;
    }

    .video-close-btn svg {
        width: 18px;
        height: 18px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .play-icon {
        width: 50px;
        height: 50px;
    }
    
    .hero-play-icon {
        width: 60px;
        height: 60px;
    }

    .video-caption,
    .hero-screenshot-caption {
        font-size: 0.85rem;
    }

    .video-close-btn {
        top: -40px;
        width: 36px;
        height: 36px;
    }
}


/* ============================================================================
   ACCESSIBILITY ENHANCEMENTS
   ============================================================================ */

/* Focus states for keyboard navigation */
.video-thumbnail:focus-visible,
.hero-video-thumbnail:focus-visible,
.video-close-btn:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.5);
    outline-offset: 4px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .video-thumbnail,
    .hero-video-thumbnail,
    .play-button-overlay,
    .hero-play-button-overlay,
    .play-icon,
    .hero-play-icon,
    .thumbnail-image,
    .hero-thumbnail-image,
    .video-lightbox,
    .video-lightbox-content,
    .video-close-btn {
        transition: none;
    }
}


/* ============================================================================
   LOADING STATE (OPTIONAL)
   ============================================================================ */

/* Add a loading spinner while video loads */
.video-wrapper::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: rgba(37, 99, 235, 0.8);
    border-radius: 50%;
    animation: spinner 0.8s linear infinite;
    z-index: 1;
}

.video-wrapper iframe {
    z-index: 2;
}

@keyframes spinner {
    to { transform: rotate(360deg); }
}
