/* Video Background Banner - Full Screen */
.video-hero-area {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background-color: #000;
    /* Prevent white flashes */
    -webkit-tap-highlight-color: transparent;
}

.video-hero-background {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    z-index: 0;
    object-fit: cover;
    background-color: #000;
    opacity: 1;
    /* Smooth rendering */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.video-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.video-hero-content {
    position: relative;
    z-index: 2;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 0 15px;
}

.video-hero-inner {
    max-width: 900px;
    width: 100%;
    padding: 20px;
    margin: 0 auto;
}

.video-hero-title {
    font-size: 60px;
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 20px;
    margin-left: auto;
    margin-right: auto;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 1s ease-out;
    text-align: center;
    font-family: quentin, sans-serif;
}

.video-hero-subtitle {
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 30px;
    margin-left: auto;
    margin-right: auto;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 1.2s ease-out;
    text-align: center;
}

.video-hero-description {
    font-size: 20px;
    line-height: 1.6;
    margin-bottom: 40px;
    margin-left: auto;
    margin-right: auto;
    color: #f0f0f0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 1.4s ease-out;
    text-align: center;
}

.video-hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    animation: fadeInUp 1.6s ease-out;
    margin-left: auto;
    margin-right: auto;
}

.video-scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    animation: bounce 2s infinite;
}

.video-scroll-down a {
    color: #fff;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.video-scroll-down svg {
    width: 24px;
    height: 24px;
    stroke: #fff;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .video-hero-title {
        font-size: 50px !important;
    }

    .video-hero-subtitle {
        font-size: 18px;
    }

    .video-hero-description {
        font-size: 16px;
    }

    .video-hero-buttons {
        flex-direction: column;
        gap: 15px;
        align-items: center;
        width: 100%;
    }

    .video-hero-inner {
        padding: 20px 15px;
        text-align: center;
    }

    .video-hero-content {
        padding: 0 20px;
    }
}

@media (max-width: 480px) {
    .video-hero-title {
        font-size: 28px;
    }

    .video-hero-subtitle {
        font-size: 16px;
    }

    .video-hero-description {
        font-size: 14px;
        margin-bottom: 30px;
    }

    .video-hero-content {
        padding: 0 15px;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .video-hero-title {
        font-size: 48px;
    }

    .video-hero-subtitle {
        font-size: 20px;
    }
}

/* RTL Support */
[dir="rtl"] .video-hero-content {
    text-align: center;
}

[dir="rtl"] .video-hero-buttons {
    flex-direction: row-reverse;
}

[dir="rtl"] .video-scroll-down {
    left: auto;
    right: 50%;
    transform: translateX(50%);
}

[dir="rtl"] .video-control {
    right: auto;
    left: 30px;
}

/* RTL Video Background - ensure video displays correctly */
[dir="rtl"] .video-hero-background {
    /* Keep video centered regardless of direction */
    left: 50%;
    transform: translate(-50%, -50%);
}

[dir="rtl"] .video-hero-area {
    /* Ensure no layout issues in RTL */
    direction: ltr;
}

[dir="rtl"] .video-hero-content {
    /* Reset to RTL for content */
    direction: rtl;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {

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

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

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

/* RTL Bounce Animation */
@keyframes bounceRtl {

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

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

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

[dir="rtl"] .video-scroll-down {
    animation: bounceRtl 2s infinite;
}

/* Video Play/Pause Control */
.video-control {
    position: absolute;
    bottom: 30px;
    right: 30px;
    z-index: 3;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #fff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.video-control:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

.video-control svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}

[dir="rtl"] .video-control {
    right: auto;
    left: 30px;
}

/* Fallback for browsers that don't support video */
.no-video .video-hero-background {
    display: none;
}

.no-video .video-hero-area {
    background-image: url('../img/hero-fallback.jpg');
    background-size: cover;
    background-position: center;
}

/* Ensure video covers full screen on all devices */
@media (orientation: portrait) {
    .video-hero-background {
        width: 100%;
        height: auto;
    }
}

@media (orientation: landscape) {
    .video-hero-background {
        width: auto;
        height: 100%;
    }
}

/* iOS specific fixes */
@supports (-webkit-touch-callout: none) {
    .video-hero-background {
        /* Fixed positioning for iOS to prevent white screen */
        position: absolute;
        /* Ensure video stays in view */
        -webkit-transform: translate3d(-50%, -50%, 0);
        transform: translate3d(-50%, -50%, 0);
        /* Hardware acceleration */
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        -webkit-perspective: 1000;
        perspective: 1000;
    }

    .video-hero-area {
        /* Prevent white screen on iOS */
        -webkit-overflow-scrolling: touch;
        /* Force GPU acceleration */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }

    /* Fix for iOS Safari scrolling issue */
    .video-hero-background {
        /* Keep video visible during scroll */
        will-change: transform;
    }
}

/* Additional iOS Safari fixes */
@media (max-width: 768px) {

    /* Ensure video stays visible on mobile iOS */
    .video-hero-background {
        /* Prevent flicker */
        -webkit-transform: translate3d(-50%, -50%, 0);
        transform: translate3d(-50%, -50%, 0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        /* Keep video in GPU memory */
        will-change: transform, opacity;
    }

    /* Fix for iOS blank screen when scrolling */
    body {
        -webkit-overflow-scrolling: touch;
    }
}

/* Ensure video plays smoothly on all devices */
.video-hero-background {
    /* Smooth playback */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}