/* =====================================
   Hero Section CSS - Unified Styles
   =====================================
   
   جميع أنماط CSS الخاصة بالـ Hero Section موحدة في هذا الملف
   
   المحتويات:
   1. Navbar Positioning
   2. Hero Section Base Styles
   3. Hero Carousel
   4. Hero Content & Overlay
   5. Hero Navigation Buttons
   6. Scroll Indicator
   7. Owl Carousel Customization
   8. Responsive Design (Mobile & Tablet)
   9. RTL & LTR Support
   
   ===================================== */

/* =====================================
   1. Navbar Positioning
   ===================================== */
/* تم نقل navbar داخل header - راجع header-footer.css */

.navbar-toggler {
    z-index: 1051 !important;
    cursor: pointer !important;
    pointer-events: all !important;
}

/* =====================================
   2. Hero Section Base Styles
   ===================================== */
.hero-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin-top: 0 !important;
    z-index: 1 !important;
    padding-top: 0 !important;
}

/* Hero يبدأ من تحت الـ header مباشرة */
body {
    padding-top: 0 !important;
}

/* =====================================
   3. Hero Carousel
   ===================================== */
.hero-carousel {
    height: 100vh;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.hero-slide {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 0;
}

/* =====================================
   4. Hero Content & Overlay
   ===================================== */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(207, 134, 75, 0.7), rgba(53, 53, 53, 0.6));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white !important;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.hero-subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    opacity: 0.9;
    text-transform: uppercase;
    color: white !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    color: white !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.hero-description {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    line-height: 1.6;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    color: white !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-buttons .btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-buttons .btn-primary {
    background: #cf864b;
    border: 2px solid #cf864b;
    color: white;
}

.hero-buttons .btn-primary:hover {
    background: #b8733a;
    border-color: #b8733a;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(207, 134, 75, 0.4);
}

.hero-buttons .btn-outline-light {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.hero-buttons .btn-outline-light:hover {
    background: white;
    color: #333;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

/* =====================================
   5. Hero Navigation Buttons
   ===================================== */
.hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    z-index: 10;
    pointer-events: none;
}

.hero-nav-btn {
    position: absolute;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    color: #333;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: all;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.hero-nav-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.15);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    opacity: 1;
}

.hero-nav-btn:active {
    transform: scale(1.05);
    transition: all 0.1s ease;
}

.hero-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: scale(0.9);
}

.prev-btn {
    left: 30px;
}

.next-btn {
    right: 30px;
}

/* =====================================
   6. Scroll Indicator
   ===================================== */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    text-align: center;
    color: white;
}

.scroll-arrow {
    width: 40px;
    height: 40px;
    border: 2px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: bounce 2s infinite;
}

.scroll-arrow:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* =====================================
   7. Owl Carousel Customization
   ===================================== */

/* Fallback: Show first slide by default */
.hero-carousel .hero-slide {
    display: none;
}

.hero-carousel .hero-slide:first-child {
    display: block !important;
}

/* Owl Carousel Customization */
.owl-carousel .owl-stage-outer {
    height: 100vh;
    overflow: hidden;
}

.owl-carousel .owl-stage {
    height: 100vh;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.owl-carousel .owl-item {
    height: 100vh;
    transition: all 0.8s ease-in-out;
}

.owl-carousel .owl-item.active {
    z-index: 2;
}

.owl-carousel .owl-nav {
    display: none;
}

.owl-carousel .owl-dots {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.owl-carousel .owl-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0.6;
}

.owl-carousel .owl-dot.active {
    background: #cf864b;
    transform: scale(1.3);
    opacity: 1;
    box-shadow: 0 0 15px rgba(207, 134, 75, 0.6);
}

.owl-carousel .owl-dot:hover {
    background: white;
    opacity: 1;
    transform: scale(1.1);
}

/* Smooth fade transitions */
.owl-carousel .owl-item {
    transition: opacity 0.8s ease-in-out;
}

.owl-carousel .owl-item.active {
    opacity: 1;
    z-index: 2;
}

.owl-carousel .owl-item:not(.active) {
    opacity: 0;
    z-index: 1;
}

/* Hero content transitions - محسنة لمنع التعارض */
.hero-content {
    transition: all 0.6s ease-in-out;
}

.owl-carousel .owl-item.active .hero-content {
    opacity: 1 !important;
    transform: translateY(0) !important;
    visibility: visible !important;
}

.owl-carousel .owl-item:not(.active) .hero-content {
    opacity: 0;
    transform: translateY(30px);
    visibility: hidden;
}

/* منع التعارض بين الانتقالات */
.owl-carousel.owl-loaded {
    position: relative;
}

.owl-carousel .owl-stage {
    position: relative;
}

.owl-carousel .owl-item {
    position: relative;
}

/* Critical Fix: Ensure background images appear */
.hero-slide .hero-bg[style*="background-image"] {
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 0 !important;
}

/* =====================================
   8. Responsive Design (Mobile & Tablet)
   ===================================== */
@media (max-width: 768px) {
    /* Force hero section to appear on mobile */
    .hero-section,
    body .hero-section,
    html body .hero-section {
        min-height: 100vh !important;
        height: 100vh !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        overflow: visible !important;
    }
    
    .hero-carousel,
    body .hero-carousel,
    html body .hero-carousel {
        height: 100vh !important;
        min-height: 100vh !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
    }
    
    .hero-slide,
    body .hero-slide,
    html body .hero-slide {
        height: 100vh !important;
        min-height: 100vh !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
    }
    
    .hero-bg,
    body .hero-bg,
    html body .hero-bg {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        background-size: cover !important;
        background-position: center !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
        z-index: 0 !important;
    }
    
    .hero-overlay,
    body .hero-overlay,
    html body .hero-overlay {
        display: block !important;
        visibility: visible !important;
        opacity: 0.8 !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
        z-index: 1 !important;
        background: linear-gradient(135deg, rgba(207, 134, 75, 0.7), rgba(53, 53, 53, 0.6)) !important;
    }
    
    .hero-content,
    body .hero-content,
    html body .hero-content {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        padding: 1.5rem !important;
        position: relative !important;
        z-index: 2 !important;
    }
    
    .hero-title,
    body .hero-title,
    html body .hero-title {
        font-size: 2rem !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        color: white !important;
        margin-bottom: 1rem !important;
    }
    
    .hero-subtitle,
    body .hero-subtitle,
    html body .hero-subtitle {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        color: white !important;
        font-size: 0.9rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .hero-description,
    body .hero-description,
    html body .hero-description {
        font-size: 1rem !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        color: white !important;
        margin-bottom: 1.5rem !important;
    }
    
    .hero-buttons,
    body .hero-buttons,
    html body .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .hero-buttons .btn,
    body .hero-buttons .btn,
    html body .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
        display: inline-block !important;
        visibility: visible !important;
        opacity: 1 !important;
        font-size: 0.95rem !important;
        padding: 0.75rem 1.5rem !important;
    }
    
    .hero-nav-btn {
        width: 45px !important;
        height: 45px !important;
        font-size: 0.9rem !important;
    }
    
    .prev-btn {
        left: 10px !important;
    }
    
    .next-btn {
        right: 10px !important;
    }
    
    .scroll-indicator {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .hero-section {
        min-height: 100vh !important;
        height: auto !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .hero-carousel {
        height: 100vh !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .hero-slide {
        height: 100vh !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .hero-title {
        font-size: 2rem !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        color: white !important;
    }
    
    .hero-subtitle {
        font-size: 0.9rem !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        color: white !important;
    }
    
    .hero-description {
        font-size: 1rem !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        color: white !important;
    }
    
    .hero-content {
        padding: 1rem !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .hero-buttons {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .hero-buttons .btn {
        display: inline-block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* =====================================
   9. RTL & LTR Support
   ===================================== */
[dir="rtl"] .hero-section {
    direction: rtl;
}

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

[dir="rtl"] .hero-buttons {
    justify-content: flex-end;
}

[dir="rtl"] .hero-nav-btn.prev-btn {
    left: auto;
    right: 30px;
}

[dir="rtl"] .hero-nav-btn.next-btn {
    right: auto;
    left: 30px;
}

[dir="rtl"] .hero-nav-btn i {
    transform: scaleX(-1);
}

[dir="rtl"] .hero-buttons .btn i {
    margin-left: 0.5rem;
    margin-right: 0;
}

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

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

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

/* LTR Support */
[dir="ltr"] .hero-section {
    direction: ltr;
}

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

[dir="ltr"] .hero-buttons {
    justify-content: center;
}

[dir="ltr"] .hero-nav-btn.prev-btn {
    left: 30px;
    right: auto;
}

[dir="ltr"] .hero-nav-btn.next-btn {
    right: 30px;
    left: auto;
}

[dir="ltr"] .hero-subtitle {
    text-align: center;
}

[dir="ltr"] .hero-title {
    text-align: center;
}

[dir="ltr"] .hero-description {
    text-align: center;
}

/* Force visibility for Arabic */
[dir="rtl"] .hero-section,
[dir="rtl"] .hero-carousel,
[dir="rtl"] .hero-slide,
[dir="rtl"] .hero-bg,
[dir="rtl"] .hero-content,
[dir="rtl"] .hero-title,
[dir="rtl"] .hero-subtitle,
[dir="rtl"] .hero-description {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: white !important;
}

/* Override any conflicting styles */
body[dir="rtl"] .hero-section {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-height: 100vh !important;
    background: transparent !important;
    position: relative !important;
    z-index: 1 !important;
    margin-top: 0 !important;
}

body[dir="rtl"] .hero-carousel {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: 100vh !important;
}

body[dir="rtl"] .hero-slide {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: 100vh !important;
    position: relative !important;
}

body[dir="rtl"] .hero-bg {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    z-index: 0 !important;
}

body[dir="rtl"] .hero-content {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: white !important;
    position: relative !important;
    z-index: 2 !important;
}

body[dir="rtl"] .hero-title,
body[dir="rtl"] .hero-subtitle,
body[dir="rtl"] .hero-description {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: white !important;
}
