@import url('https://fonts.googleapis.com/css2?family=Almarai:wght@300;400;700;800&display=swap');

body {
    font-family: 'Almarai', sans-serif;
    background-color: #f7f9fb; /* Light background */
    color: #1f2937; /* Dark text */
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* --- STICKY NAV BAR ANIMATION --- */
nav.scrolled {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

nav {
    transition: all 0.3s ease-in-out;
}

/* --- PRELOADER STYLES --- */
#preloader {
    background-color: #ffffff;
    transition-property: opacity, visibility;
    visibility: visible;
}

/* Hero Wave/Grid Animation (Darker, more professional blue/gold) */
.hero-bg {
    background: linear-gradient(135deg, #0c4a6e 0%, #215bb8 100%); /* Blue gradient */
    position: relative;
    overflow: hidden;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200%;
    height: 200%;
    background: 
        /* Subtle diagonal lines */
        repeating-linear-gradient(
            -45deg, 
            rgba(255, 255, 255, 0.05), 
            rgba(255, 255, 255, 0.05) 5px, 
            transparent 5px, 
            transparent 10px
        ),
        repeating-linear-gradient(
            45deg, 
            rgba(255, 255, 255, 0.05), 
            rgba(255, 255, 255, 0.05) 5px, 
            transparent 5px, 
            transparent 10px
        );
    background-size: 40px 40px;
    animation: moveGrid 30s linear infinite;
    opacity: 0.3; /* Less visible grid */
}

@keyframes moveGrid {
    from { background-position: 0 0; }
    to { background-position: 40px 40px; }
}

/* Section Title Style - Sharper Look with darker blue */
.section-title {
    position: relative;
    display: inline-block;
    font-size: 2.25rem;
    font-weight: 800;
    color: #016fb9; /* Dark Blue */
    padding-bottom: 0.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    right: 50%;
    transform: translateX(50%);
    bottom: 0;
    width: 80px;
    height: 5px;
    background-color: #f59e0b; /* Amber/Gold Accent */
    border-radius: 3px;
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- PRELOADER STYLES (5. لوجو صفحة التحميل) --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff; /* لون خلفية يتناسب مع اللوجو */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

#preloader.hidden {
    opacity: 0;
    pointer-events: none;
}

#preloader img {
max-width:100%; /* الحد الأقصى للعرض هو 80% من عرض النافذة */
max-height:100vh; /* الحد الأقصى للارتفاع هو 80% من ارتفاع النافذة */
animation:pulse-loader 1.5s infinite;
}
@keyframes pulse-loader {
0% { transform: scale(0.9); opacity: 0.7; }
50% { transform: scale(1); opacity: 1; }
100% { transform: scale(0.9); opacity: 0.7; }
}.text-logo-blue {
color: #016fb9; /* هذا هو لون أزرق تقريبي مأخوذ من اللوجو المرفق */
}
/* --- CLIENTS MARQUEE / TICKER STYLES (Final Version) --- */
.marquee {
    white-space: nowrap;
    overflow: hidden;
    display: flex;
    width: 100%;
}

/* الكلاس الخاص بالحركة من اليمين لليسار (RTL) */
.rtl-animation {
    animation: marquee-rtl 20s linear infinite;
    padding-right: 1rem;
}

/* الكلاس الخاص بالحركة من اليسار لليمين (LTR) */
.ltr-animation {
    animation: marquee-ltr 20s linear infinite;
    padding-right: 1rem;
}

/* Keyframes for RTL horizontal movement */
@keyframes marquee-rtl {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-50% - 1rem)); } 
}

/* Keyframes for LTR horizontal movement */
@keyframes marquee-ltr {
    0% { transform: translateX(calc(-50% - 1rem)); }
    100% { transform: translateX(0); }
}

.marquee-content {
    display: inline-block;
}

.marquee-item {
    display: inline-block;
    margin-left: 4rem; 
}

.client-logo {
    max-height: 8rem; 
    height: auto;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    padding: 0.5rem;
    display: block;
    filter: none;
}

.client-logo:hover {
    filter: none;
}
/* Free Consultation Notification (Call-to-Action Pop-up) */
#cta-notification {
    position: fixed;
    z-index: 1000;
    background-color: #f59e0b; /* Amber background */
    color: #1e3a8a; /* Dark blue text */
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    
    /* **التعديل الهام: ليكون أسفل الهيدر مباشرة** */
    top: 100px; /* تم زيادتها لتجنب تداخل الهيدر (يمكن تعديل القيمة 100px حسب ارتفاع الهيدر الفعلي) */
    right: 20px;
    left: auto; /* التأكد من تثبيته في اليمين فقط */

    /* Start off-screen (right) for initial animation */
    transform: translateX(120%); 
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Spring-like animation */
    
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 300px;
    border: 2px solid #fff;
}

#cta-notification.show {
    transform: translateX(0);
}

@media (max-width: 640px) {
     #cta-notification {
        /* للحفاظ على وضعه في الأسفل اليمين على الجوال */
        top: auto; 
        bottom: 20px; 
        right: 20px;
        left: auto; 
        max-width: 90%;
    }
    /* Adjust back-to-top button on mobile to avoid overlap */
    #back-to-top.show {
        bottom: 90px; /* Move up to clear the CTA notification */
    }
}
/* Move CTA down on larger screens to avoid overlapping sticky header/logo */
@media (min-width: 1024px) {
    #cta-notification {
        top: 80px; /* lower on desktop so it doesn't collide with the sticky header */
    }
}

/* Floating WhatsApp Button & Back-to-Top */
.floating-btn {
    position: fixed;
    bottom: 20px;
    z-index: 990;
    padding: 0.75rem;
    border-radius: 9999px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease-in-out, background-color 0.3s;
    cursor: pointer;
}

.floating-btn:hover {
    transform: scale(1.1);
}

#whatsapp-btn {
    left: 20px; /* WhatsApp on the left in RTL */
    background-color: #25D366; 
    color: white;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

#whatsapp-btn:hover {
    background-color: #1fbc6b;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.6);
    transform: scale(1.12);
}

#back-to-top {
    right: 20px; /* Back-to-top on the right in RTL */
    background-color: #016fb9; /* Dark Blue */
    color: white;
    opacity: 0;
    visibility: hidden;
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* Search Bar Style */
#search-modal {
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    transition: opacity 0.3s ease;
}

#search-modal.hidden {
    opacity: 0;
    pointer-events: none;
}

#search-input {
    border: none;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}
#content {
    overflow: visible !important;
}
/* Add this to your styles.css */

/* Keyframes للحركة الأفقية للخلفية */
@keyframes movePattern {
    0% { background-position-x: 0; }
    100% { background-position-x: 1200px; } 
}

/* نمط الخلفية الأساسي */
.hero-bg-new {
    background-color: #ffffff; 
    position: relative;
    overflow: hidden; 
}

.hero-bg-new {
    background-color: #ffffff;
    background-image: url("../img/wave.png");
    background-repeat: no-repeat;
    background-position: bottom center;
    background-size: cover;
    position: relative;
    overflow: hidden;
}
