/* ===================================================================
 * VIDEO HERO SECTION - Industry Standard Fullscreen Video Background
 * ===================================================================
 * This stylesheet handles the full-screen video background hero section
 * with a transparent/floating navigation overlay, video slideshow
 * transitions, scroll indicator animation, and responsive behaviour.
 * =================================================================== */

/* ───────────────────────────────────────────
 * 1.  ROOT VARIABLES — Video Hero Tokens
 * ─────────────────────────────────────────── */
:root {
    /* Overlay gradients */
    --video-overlay-start: rgba(0, 0, 0, 0.55);
    --video-overlay-end: rgba(0, 0, 0, 0.30);
    --video-overlay-bottom: rgba(0, 0, 0, 0.65);

    /* Typography (hero‑specific) */
    --hero-title-size: clamp(2.5rem, 5vw, 4.5rem);
    --hero-subtitle-size: clamp(1rem, 2vw, 1.35rem);
    --hero-tagline-size: clamp(0.85rem, 1.4vw, 1.05rem);

    /* Timing */
    --video-transition-duration: 1.4s;
    --video-slide-interval: 8000;
    /* ms — consumed by JS */
    --hero-content-stagger: 0.15s;
}

/* ───────────────────────────────────────────
 * 2.  TRANSPARENT FLOATING NAVBAR
 *     Only on pages that use the video hero.
 * ─────────────────────────────────────────── */
body.has-video-hero .header-main {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
}

/* Top bar — semi‑transparent on video hero */
body.has-video-hero .top-bar {
    background: rgba(0, 0, 0, 0.35) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Main navbar — fully transparent when at top */
body.has-video-hero .navbar {
    background: transparent !important;
    box-shadow: none !important;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

/* Navbar brand / logo colours when transparent */
body.has-video-hero .navbar .nav-link {
    color: rgba(255, 255, 255, 0.92) !important;
}

body.has-video-hero .navbar .nav-link:hover,
body.has-video-hero .navbar .nav-link.active {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.12);
}

/* CTA button */
body.has-video-hero .navbar .btn-primary {
    background: rgba(220, 53, 69, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
}

body.has-video-hero .navbar .btn-primary:hover {
    background: rgba(220, 53, 69, 1);
}

/* Hamburger icon — white on transparent */
body.has-video-hero .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.4);
}

body.has-video-hero .navbar-toggler-icon {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* ── Scrolled State ────────────────────────
 * When the user scrolls past the hero,
 * `.navbar-scrolled` is added via JS.            */
body.has-video-hero .navbar.navbar-scrolled {
    background: rgba(255, 255, 255, 0.97) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

body.has-video-hero .navbar.navbar-scrolled .nav-link {
    color: var(--text-dark) !important;
}

body.has-video-hero .navbar.navbar-scrolled .nav-link:hover,
body.has-video-hero .navbar.navbar-scrolled .nav-link.active {
    color: var(--primary-color) !important;
    background-color: rgba(220, 53, 69, 0.1);
}

body.has-video-hero .navbar.navbar-scrolled .btn-primary {
    background: var(--gradient-primary);
    border: none;
    backdrop-filter: none;
}

body.has-video-hero .navbar.navbar-scrolled .navbar-toggler {
    border-color: rgba(0, 0, 0, 0.3);
}

body.has-video-hero .navbar.navbar-scrolled .navbar-toggler-icon {
    filter: none;
}

/* ───────────────────────────────────────────
 * 3.  FULLSCREEN VIDEO HERO WRAPPER
 * ─────────────────────────────────────────── */
.video-hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    background: #0a0a0a;
    /* fallback while videos load */
    z-index: 1;
}

/* ───────────────────────────────────────────
 * 4.  VIDEO SLIDES
 * ─────────────────────────────────────────── */
.video-hero__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity var(--video-transition-duration) ease-in-out;
    z-index: 1;
}

.video-hero__slide.active {
    opacity: 1;
    z-index: 2;
}

.video-hero__slide video,
.video-hero__slide .video-hero__fallback-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Ken-Burns subtle zoom on the active slide */
.video-hero__slide.active video,
.video-hero__slide.active .video-hero__fallback-image {
    animation: heroKenBurns 12s ease-in-out forwards;
}

@keyframes heroKenBurns {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.06);
    }
}

/* ───────────────────────────────────────────
 * 5.  OVERLAY — Multi-layer gradient
 * ─────────────────────────────────────────── */
.video-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;

    /* Top-to-bottom gradient for text legibility */
    background:
        linear-gradient(180deg,
            rgba(0, 0, 0, 0.50) 0%,
            rgba(0, 0, 0, 0.15) 40%,
            rgba(0, 0, 0, 0.20) 60%,
            rgba(0, 0, 0, 0.60) 100%);
}

/* ───────────────────────────────────────────
 * 6.  HERO CONTENT
 * ─────────────────────────────────────────── */
.video-hero__content {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 2rem;
    pointer-events: none;
}

.video-hero__content>* {
    pointer-events: auto;
}

/* ── Tagline — small uppercase label ── */
.video-hero__tagline {
    font-family: 'Poppins', sans-serif;
    font-size: var(--hero-tagline-size);
    font-weight: 600;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1rem;
    /* Hidden by default — driven by parent .active */
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.5s cubic-bezier(0.2, 1, 0.3, 1), transform 1.5s cubic-bezier(0.2, 1, 0.3, 1);
    transition-delay: 0s;
}

/* ── Title ── */
.video-hero__title {
    font-family: 'Space Grotesk', 'Poppins', sans-serif;
    font-size: var(--hero-title-size);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: #ffffff;
    margin-bottom: 1.25rem;
    max-width: 900px;
    text-shadow: 0 2px 40px rgba(0, 0, 0, 0.35);
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.8s cubic-bezier(0.2, 1, 0.3, 1), transform 1.8s cubic-bezier(0.2, 1, 0.3, 1);
    transition-delay: 0s;
}

/* ── Subtitle / description ── */
.video-hero__subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: var(--hero-subtitle-size);
    font-weight: 400;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.82);
    max-width: 680px;
    margin-bottom: 2.5rem;
    text-shadow: 0 1px 20px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.5s cubic-bezier(0.2, 1, 0.3, 1), transform 1.5s cubic-bezier(0.2, 1, 0.3, 1);
    transition-delay: 0s;
}

/* ── CTA Buttons ── */
.video-hero__actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.5s cubic-bezier(0.2, 1, 0.3, 1), transform 1.5s cubic-bezier(0.2, 1, 0.3, 1);
    transition-delay: 0s;
}

/* ── Staggered ENTRY delays when parent slide-content is .active ── */
.video-hero__slide-content.active .video-hero__tagline {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.3s;
}

.video-hero__slide-content.active .video-hero__title {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.6s;
}

.video-hero__slide-content.active .video-hero__subtitle {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.9s;
}

.video-hero__slide-content.active .video-hero__actions {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 1.2s;
}

/* ── Instant display on first load (no-transition class) ── */
.video-hero__slide-content.no-transition,
.video-hero__slide-content.no-transition .video-hero__tagline,
.video-hero__slide-content.no-transition .video-hero__title,
.video-hero__slide-content.no-transition .video-hero__subtitle,
.video-hero__slide-content.no-transition .video-hero__actions {
    transition: none !important;
}

/* ── Static content: always visible with fade-in animation ── */
.video-hero__static-content {
    opacity: 1;
    pointer-events: auto;
    z-index: 10;
}

.video-hero__static-content .video-hero__tagline,
.video-hero__static-content .video-hero__title,
.video-hero__static-content .video-hero__subtitle,
.video-hero__static-content .video-hero__actions {
    animation: heroTextFadeIn 1.5s ease-out both;
}

.video-hero__static-content .video-hero__tagline {
    animation-delay: 0.3s;
}

.video-hero__static-content .video-hero__title {
    animation-delay: 0.6s;
}

.video-hero__static-content .video-hero__subtitle {
    animation-delay: 0.9s;
}

.video-hero__static-content .video-hero__actions {
    animation-delay: 1.2s;
}

@keyframes heroTextFadeIn {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}


.video-hero__actions .btn-hero-primary {
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    padding: 1rem 2.5rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 50px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 25px rgba(220, 53, 69, 0.35);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.video-hero__actions .btn-hero-primary:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 35px rgba(220, 53, 69, 0.50);
}

.video-hero__actions .btn-hero-secondary {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.35);
    padding: 1rem 2.5rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 50px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.video-hero__actions .btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.55);
    transform: translateY(-3px);
}

/* ───────────────────────────────────────────
 * 7.  SLIDE INDICATORS (bottom dots)
 * ─────────────────────────────────────────── */
.video-hero__indicators {
    position: absolute;
    bottom: 5.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.6rem;
    z-index: 6;
}

.video-hero__indicator {
    width: 38px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.30);
    border: none;
    cursor: pointer;
    transition: all 0.4s ease;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.video-hero__indicator::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: #ffffff;
    border-radius: 2px;
    transition: none;
}

.video-hero__indicator.active {
    background: rgba(255, 255, 255, 0.30);
}

/* Progress fill animation — synced to slide interval */
.video-hero__indicator.active::after {
    width: 0;
    animation: indicatorProgress 8s linear forwards;
}

@keyframes indicatorProgress {
    0% {
        width: 0;
    }

    100% {
        width: 100%;
    }
}

.video-hero__indicator:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* ───────────────────────────────────────────
 * 8.  SCROLL-DOWN INDICATOR
 * ─────────────────────────────────────────── */
.video-hero__scroll-indicator {
    position: absolute;
    bottom: 1.8rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 6;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    animation: heroScrollBounce 2.2s ease-in-out infinite;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.video-hero__scroll-indicator:hover {
    opacity: 1;
}

.video-hero__scroll-label {
    font-family: 'Poppins', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
}

.video-hero__scroll-icon {
    width: 24px;
    height: 38px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    position: relative;
}

.video-hero__scroll-icon::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.8);
    animation: scrollDot 2.2s ease-in-out infinite;
}

@keyframes heroScrollBounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(8px);
    }
}

@keyframes scrollDot {

    0%,
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    50% {
        opacity: 0.3;
        transform: translateX(-50%) translateY(8px);
    }
}

/* ───────────────────────────────────────────
 * 9.  MUTE / UNMUTE BUTTON
 * ─────────────────────────────────────────── */
.video-hero__mute-btn {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    z-index: 6;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.video-hero__mute-btn:hover {
    background: rgba(0, 0, 0, 0.55);
    border-color: rgba(255, 255, 255, 0.55);
    transform: scale(1.08);
}

/* ───────────────────────────────────────────
 * 10. SLIDE-SPECIFIC CONTENT TRANSITIONS
 *     Text fades & repositions per slide.
 * ─────────────────────────────────────────── */
.video-hero__slide-content {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 2rem;
}

.video-hero__slide-content.active {
    opacity: 1;
    transform: translateY(0);
}

/* ───────────────────────────────────────────
 * 11. RESPONSIVE ADJUSTMENTS
 * ─────────────────────────────────────────── */

/* Tablet */
@media (max-width: 991px) {
    .video-hero {
        min-height: 500px;
    }

    .video-hero__content {
        padding: 0 1.5rem;
    }

    .video-hero__indicators {
        bottom: 4.5rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .video-hero {
        height: 100svh;
        /* short viewport height = accounts for mobile browser chrome */
        min-height: 480px;
    }

    .video-hero__title {
        max-width: 100%;
    }

    .video-hero__subtitle {
        max-width: 100%;
    }

    .video-hero__actions {
        flex-direction: column;
        width: 100%;
        max-width: 320px;
    }

    .video-hero__actions .btn-hero-primary,
    .video-hero__actions .btn-hero-secondary {
        width: 100%;
        justify-content: center;
        padding: 0.9rem 2rem;
    }

    .video-hero__indicators {
        bottom: 4rem;
    }

    .video-hero__mute-btn {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 38px;
        height: 38px;
        font-size: 0.85rem;
    }

    /* Hide top bar on mobile — already in header */
    body.has-video-hero .top-bar {
        display: none !important;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .video-hero__tagline {
        font-size: 0.75rem;
        letter-spacing: 0.2em;
    }

    .video-hero__scroll-indicator {
        bottom: 1rem;
    }
}

/* ───────────────────────────────────────────
 * 12. PREFERS-REDUCED-MOTION
 * ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .video-hero__slide {
        transition-duration: 0.01s;
    }

    .video-hero__slide.active video,
    .video-hero__slide.active .video-hero__fallback-image {
        animation: none;
    }

    .video-hero__tagline,
    .video-hero__title,
    .video-hero__subtitle,
    .video-hero__actions {
        transition: none !important;
        opacity: 1;
        transform: none;
    }

    .video-hero__scroll-indicator {
        animation: none;
    }

    .video-hero__scroll-icon::before {
        animation: none;
    }

    .video-hero__indicator.active::after {
        animation: none;
        width: 100%;
    }
}

/* ───────────────────────────────────────────
 * 13. AFTER-HERO SECTION ADJUSTMENT
 *     Gives a clean visual break from full-screen hero.
 * ─────────────────────────────────────────── */
.section-after-hero {
    position: relative;
    z-index: 10;
    background: #fff;
}

/* Subtle top edge to separate from hero */
.section-after-hero::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg,
            var(--primary-color) 0%,
            #0d6efd 50%,
            #198754 100%);
}