/* ==========================================
   UNIVERSAL MOBILE HERO SECTIONS
   Optimized for ALL iOS & Android devices
   No gaps between header and hero
   ========================================== */

/* Reset - Remove all spacing */
body.page-home-mobile,
body.page-about-mobile,
body.page-contact-mobile,
body.page-services-mobile,
body[class*="-mobile"] {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.main-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Mobile Content Spacer - Ensures proper spacing after fixed header */
.mobile-content-spacer {
    height: var(--mh-height, 56px);
    flex-shrink: 0;
    margin: 0;
    padding: 0;
}

/* Remove ALL spacing after spacer */
.mobile-content-spacer + * {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* ==========================================
   BASE MOBILE HERO SECTION
   ========================================== */
.mobile-hero-section {
    position: relative;
    width: 100%;
    min-height: calc(100vh - var(--mh-height, 56px));
    min-height: calc(100dvh - var(--mh-height, 56px)); /* Dynamic viewport */
    margin: 0;
    padding: 3rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #0A1F44 0%, #1e3a8a 100%);
}

/* Ensure first section has no top margin */
.main-content > section:first-child,
.main-content > *:first-child {
    margin-top: 0 !important;
}

/* Hero Background Image */
.mobile-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
}

/* Hero Overlay */
.mobile-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10, 31, 68, 0.9) 0%, rgba(30, 58, 138, 0.85) 100%);
    z-index: 1;
}

/* Hero Content Container */
.mobile-hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 100%;
    padding: 0 1.25rem;
    text-align: center;
    color: white;
}

/* Hero Title */
.mobile-hero-title {
    font-size: clamp(1.75rem, 7vw, 2.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: white;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

/* Hero Subtitle */
.mobile-hero-subtitle {
    font-size: clamp(1rem, 4vw, 1.25rem);
    line-height: 1.6;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.2);
}

/* Hero Description */
.mobile-hero-description {
    font-size: clamp(0.95rem, 3.5vw, 1.1rem);
    line-height: 1.7;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero Buttons */
.mobile-hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    margin-top: 2rem;
}

.mobile-hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 280px;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    min-height: 48px;
    text-align: center;
}

.mobile-hero-btn-primary {
    background: linear-gradient(135deg, #0078d4, #1e40af);
    color: white;
    box-shadow: 0 4px 16px rgba(0, 120, 212, 0.3);
}

.mobile-hero-btn-primary:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(0, 120, 212, 0.4);
}

.mobile-hero-btn-outline {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.mobile-hero-btn-outline:active {
    background: rgba(255, 255, 255, 0.25);
}

/* ==========================================
   VIDEO HERO SECTION (Home Page)
   ========================================== */
.mobile-video-hero-slider {
    position: relative;
    width: 100%;
    min-height: calc(100vh - var(--mh-height, 56px));
    min-height: calc(100dvh - var(--mh-height, 56px));
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.mobile-slider-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: calc(100vh - var(--mh-height, 56px));
    min-height: calc(100dvh - var(--mh-height, 56px));
}

.mobile-video-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.mobile-video-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.mobile-video-background {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    filter: brightness(0.7);
}

.mobile-slide-content-container {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--mh-height, 56px));
    min-height: calc(100dvh - var(--mh-height, 56px));
    padding: 2rem 1.25rem;
}

/* Slider Dots */
.mobile-slider-dots {
    position: absolute;
    bottom: 6rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
    z-index: 3;
}

.mobile-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.mobile-dot.active {
    background: white;
    width: 28px;
    border-radius: 5px;
}

/* Scroll Indicator */
.mobile-scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 3;
    animation: bounce 2s infinite;
}

.scroll-dot-inner {
    width: 24px;
    height: 36px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    position: relative;
}

.scroll-dot-inner::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: white;
    border-radius: 2px;
    animation: scroll-dot 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

@keyframes scroll-dot {
    0% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(12px); }
}

/* ==========================================
   BREADCRUMB IN HERO
   ========================================== */
.mobile-hero-breadcrumb {
    position: absolute;
    top: 1rem;
    left: 1.25rem;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

.mobile-hero-breadcrumb a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s ease;
}

.mobile-hero-breadcrumb a:active {
    color: white;
}

/* ==========================================
   RESPONSIVE BREAKPOINTS
   ========================================== */

/* Small Phones */
@media (max-width: 374px) {
    .mobile-hero-section {
        padding: 2rem 0;
    }
    
    .mobile-hero-content {
        padding: 0 1rem;
    }
    
    .mobile-hero-buttons {
        gap: 0.75rem;
    }
    
    .mobile-hero-btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* Landscape Mode */
@media (orientation: landscape) and (max-height: 500px) {
    .mobile-hero-section,
    .mobile-video-hero-slider,
    .mobile-slider-container,
    .mobile-slide-content-container {
        min-height: 100vh;
    }
    
    .mobile-hero-section {
        padding: 1.5rem 0;
    }
    
    .mobile-hero-title {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }
    
    .mobile-hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 1rem;
    }
    
    .mobile-slider-dots {
        bottom: 3rem;
    }
    
    .mobile-scroll-indicator {
        bottom: 1rem;
    }
}

/* Tablets */
@media (min-width: 768px) and (max-width: 1024px) {
    .mobile-hero-buttons {
        flex-direction: row;
        justify-content: center;
    }
    
    .mobile-hero-btn {
        max-width: 200px;
    }
}

/* Dark Mode Support */
[data-theme="dark"] .mobile-hero-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

/* Performance Optimizations */
@media (prefers-reduced-motion: reduce) {
    .mobile-video-slide,
    .mobile-dot,
    .mobile-scroll-indicator,
    .scroll-dot-inner::before {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================
   RTL SUPPORT FOR ARABIC
   ========================================== */

[dir="rtl"] .mobile-hero-section {
    direction: rtl;
}

[dir="rtl"] .mobile-hero-content {
    direction: rtl;
    text-align: center;
}

[dir="rtl"] .mobile-hero-title,
[dir="rtl"] .mobile-hero-subtitle,
[dir="rtl"] .mobile-hero-description {
    text-align: center;
}

[dir="rtl"] .mobile-hero-buttons {
    flex-direction: column;
}

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

[dir="rtl"] .mobile-video-hero-slider {
    direction: rtl;
}

[dir="rtl"] .mobile-slide-content-container {
    direction: rtl;
}

[dir="rtl"] .mobile-slider-dots {
    direction: rtl;
}

[dir="rtl"] .mobile-hero-breadcrumb {
    left: auto;
    right: 1.25rem;
    flex-direction: row-reverse;
}

[dir="rtl"] .mobile-hero-breadcrumb a {
    text-align: right;
}

