/* Hero Video Background Fix */
.hero1 {
    position: relative;
    overflow: hidden;
}

.hero-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.hero-video-bg video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

/* Ensure hero content is visible above video */
.hero1 .container {
    position: relative;
    z-index: 2;
}

/* Add overlay for better text readability */
.hero1::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

/* Ensure all hero content is above overlay */
.hero1 .main-heading1,
.hero1 .hero1-images {
    position: relative;
    z-index: 3;
}

/* Header Fix */
header {
    position: relative;
    z-index: 999;
}

.vl-header-area1 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;
}

.header1-bg {
    position: relative;
    z-index: 999;
}

/* Service Cards Enhancement */
.service1-box {
    display: flex;
    flex-direction: column;
    height: auto;
    text-align: center;
    padding: 30px 20px;
    border-radius: 15px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.service1-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #fff 0%, #f0f2f5 100%);
}

.service1-box .service-image {
    order: 1;
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.service1-box .service-image::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 200px;
    border-radius: 15px;
    background: linear-gradient(45deg, #007bff, #0056b3);
    opacity: 0.1;
    z-index: 0;
    transition: all 0.3s ease;
}

.service1-box:hover .service-image::before {
    opacity: 0.2;
    transform: scale(1.1);
}

.service1-box .num {
    order: 2;
    padding: 0 20px 15px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-weight: 600;
    color: #333;
}

.service1-box .heading1 {
    order: 3;
    padding: 0 20px 20px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.service1-box .service-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center;
    border-radius: 15px;
    display: block;
    border: 4px solid #fff;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.service1-box:hover .service-image img {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

/* Hide Page Loader */
#page-loader {
    display: none;
}

/* Header Menu Alignment */
.vl-main-menu {
    text-align: right;
}

.vl-main-menu ul {
    justify-content: flex-end;
    display: flex;
}

/* Navbar Scroll Effect */
.vl-header-area1 {
    transition: all 0.3s ease;
}

.vl-header-area1.scrolled {
    background: rgba(248, 249, 250, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.vl-header-area1.scrolled .vl-main-menu ul li a {
    color: #333 !important;
}

.vl-header-area1.scrolled .vl-offcanvas-toggle {
    border-color: #000 !important;
}

.vl-header-area1.scrolled .vl-offcanvas-toggle i {
    color: #000 !important;
}

/* Hero Content Positioning */
.hero1 {
    padding-top: 120px;
}

.hero1 .main-heading1 {
    margin-top: -450px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero1 {
        min-height: 100vh;
        padding: 100px 0 40px;
    }
    
    .hero1 .main-heading1 {
        margin-top: -30px;
    }
    
    .vl-header-area1 {
        padding: 10px 0;
    }
    
    .vl-logo img {
        max-width: 120px;
        height: auto;
    }
    
    .main-heading1 h1 {
        font-size: 28px;
        line-height: 1.3;
    }
    
    .main-heading1 .sub-title {
        font-size: 14px;
    }
    
    .hero1-counters {
        margin-top: 30px;
    }
    
    .mobile-lang {
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid #eee;
    }
    
    /* Force logo to top left in Arabic mobile */
    body.rtl .vl-logo {
        text-align: left !important;
    }
}

/* Fix button arrow direction */
.theme-btn3 .arrow1,
.theme-btn3 .arrow2 {
    direction: ltr !important;
}

/* Fix button rotation */
.theme-btn3 {
    transform: none !important;
    -webkit-transform: none !important;
    -moz-transform: none !important;
    -ms-transform: none !important;
    -o-transform: none !important;
}
/* Keep menu items at current scroll position */
.vl-offcanvas {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    left: auto !important;
    height: 100vh !important;
    overflow-y: auto !important;
}

.vl-offcanvas-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

body.rtl .vl-offcanvas {
    right: auto !important;
    left: 0 !important;
}