/**
 * Hero Video Slider Styles
 *
 * Full viewport slider with video backgrounds, navigation,
 * and animated progress bars. Responsive design included.
 *
 * Scoped to Elementor widget to prevent conflicts
 */

/* =============================================================================
   Main Container & Video Background
   ============================================================================= */

/* Main slider container - default height 800px, customizable via Elementor */
.elementor-widget-ad_hero_video_slider .video-slider {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    overflow: hidden;
}

/* Container for all background videos */
.elementor-widget-ad_hero_video_slider .video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 100%;
}

/* Individual background video - hidden by default, fades in when active */
.elementor-widget-ad_hero_video_slider .background-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

/* Active video state - fully visible */
.elementor-widget-ad_hero_video_slider .background-video.active {
    opacity: 1;
}

/* Dark overlay on top of videos for better text contrast */
.elementor-widget-ad_hero_video_slider .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Customizable via Elementor */
    z-index: 1;
}

/* =============================================================================
   Content Layer (above video and overlay)
   ============================================================================= */

/* Main content container - positioned above video and overlay */
.elementor-widget-ad_hero_video_slider .content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1440px;
    height: 100%;
    padding: 40px 60px 140px; /* Bottom padding to accommodate navigation at 100px from bottom */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Vertically center content */
    color: white;
    margin: 0 auto; /* Center the content container horizontally */
}

/* Main heading - large, bold text vertically centered and left-aligned */
.elementor-widget-ad_hero_video_slider .main-heading {
    font-size: clamp(42px, 4.5vw + 2rem, 72px); /* Responsively scales from 42px (mobile) to 72px (desktop) */
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -1px;
    position: relative;
    text-align: left;
    padding-left: 50px; /* Space for logo */
}

.elementor-widget-ad_hero_video_slider .main-subheading-container {
    display: grid;
    margin: 16px 0 0 50px;
    max-width: 640px;
}

.elementor-widget-ad_hero_video_slider .main-subheading {
    grid-area: 1 / 1 / 2 / 2;
    font-size: 20px;
    line-height: 1.5;
    font-weight: 400;
    margin: 0;
    color: #ffffff;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
}

.elementor-widget-ad_hero_video_slider .main-subheading.active {
    opacity: 1;
    transform: translateY(0);
}

/* Logo container - positioned to left of heading */
.elementor-widget-ad_hero_video_slider .logo {
    position: absolute;
    left: clamp(-120px, -8vw - 1rem, -110px); /* Responsively scales from -120px (mobile) to -100px (desktop) */
    top: 50%;
    transform: translateY(-50%);
}

/* Logo image - height matches approximately two lines of heading text */
.elementor-widget-ad_hero_video_slider .logo img {
    height: 150px;
    width: auto;
}

/* =============================================================================
   Navigation & Slide Controls
   ============================================================================= */

/* Navigation container - horizontal layout with equal-width items, positioned 100px from bottom */
.elementor-widget-ad_hero_video_slider .slider-nav {
    display: flex;
    gap: 30px;
    align-items: flex-end;
    position: absolute;
    bottom: 100px;
    left: 0px;
    right: 0px;
}

/* Individual navigation item - clickable slide selector */
.elementor-widget-ad_hero_video_slider .nav-item {
    flex: 1; /* Equal width distribution */
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Navigation content wrapper - title and arrow icon */
.elementor-widget-ad_hero_video_slider .nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    min-height: 50px;
    text-decoration: none;
    color: inherit;
}

/* Navigation title - semi-transparent by default */
.elementor-widget-ad_hero_video_slider .nav-content .nav-title {
    display: block;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

/* Active navigation title - fully opaque */
.elementor-widget-ad_hero_video_slider .nav-item.active .nav-content .nav-title {
    opacity: 1;
}

/* Arrow icon - hidden by default, slides in when active */
.elementor-widget-ad_hero_video_slider .arrow-icon {
    width: 24px;
    height: 24px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

/* Active arrow icon - visible and in position */
.elementor-widget-ad_hero_video_slider .nav-item.active .arrow-icon {
    opacity: 1;
    transform: translateX(0);
}

/* =============================================================================
   Progress Bar Animation
   ============================================================================= */

/* Progress bar container - thin line under each nav item */
.elementor-widget-ad_hero_video_slider .progress-bar {
    width: 100%;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.3);
    overflow: hidden;
    position: relative;
}

/* Progress fill - animates from 0 to 100% when slide is active */
.elementor-widget-ad_hero_video_slider .progress-fill {
    height: 100%;
    background-color: #c94444; /* Customizable via Elementor */
    width: 0;
    transition: width 0.1s linear;
}

/* Active progress animation - duration set dynamically via JavaScript to match autoplay speed */
.elementor-widget-ad_hero_video_slider .nav-item.active .progress-fill {
    /* Animation applied via inline style with configurable duration */
}

/* Keyframe animation - fills progress bar from left to right */
@keyframes fillProgress {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

/* =============================================================================
   Hover Effects
   ============================================================================= */

/* Show full opacity title on hover */
.elementor-widget-ad_hero_video_slider .nav-item:hover .nav-content .nav-title {
    opacity: 1;
}

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

/* Tablet breakpoint - reduce font sizes and spacing */
@media (max-width: 1024px) {
    .elementor-widget-ad_hero_video_slider .slider-nav {
        gap: 20px;
    }

    .elementor-widget-ad_hero_video_slider .nav-content .nav-title {
        font-size: 16px;
    }
}

/* Mobile breakpoint - stack navigation vertically, further reduce sizes */
@media (max-width: 768px) {
    .elementor-widget-ad_hero_video_slider .content {
        padding: 30px 30px;
        justify-content: flex-start; /* Align content to top to prevent overlap with navigation */
        padding-top: 15vh;
    }

    .elementor-widget-ad_hero_video_slider .main-heading {
        margin-bottom: 10px;
    }

    /* Stack navigation items vertically on mobile */
    .elementor-widget-ad_hero_video_slider .slider-nav {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
        left: 10%; /* Add left margin on mobile */
        right: 10%; /* Add right margin on mobile */
    }

    .elementor-widget-ad_hero_video_slider .nav-item {
        width: 100%;
    }

    /* Smaller logo on mobile */
    .elementor-widget-ad_hero_video_slider .logo img {
        height: 40px;
    }
}
