:root {
    --bg: #f1f5f9;
    --white: #fff;
    --blue: #1e88e5;
    --dark: #0b3c5d;
    --text: #1e293b;
    --border: #e2e8f0;
    --r: 18px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Cairo", sans-serif; background: var(--bg); color: var(--text); overflow-x: hidden; }

/* SPLASH SCREEN */
#splash { position: fixed; inset: 0; background: #0b3c5d; display: flex; align-items: center; justify-content: center; z-index: 9999; transition: 0.5s; }
#splash img { width: 280px; }

/* HEADER & NAV */
header {
    background: var(--white);
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 5%; position: sticky; top: 0; z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

#logo { display: flex; align-items: center; gap: 10px; }
#logo img { height: 50px; }
#logo span { font-size: 20px; font-weight: 700; color: var(--dark); }

nav a { margin: 0 12px; text-decoration: none; color: var(--dark); font-weight: 600; font-size: 15px; transition: 0.3s; }
nav a:hover { color: var(--blue); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.call-btn, .lang-btn { background: var(--blue); color: #fff; padding: 8px 18px; border-radius: 30px; border: none; cursor: pointer; font-family: inherit; text-decoration: none; font-size: 14px; }
.menu-toggle { display: none; font-size: 24px; cursor: pointer; color: var(--dark); }

.menu-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 998; display: none; opacity: 0; transition: 0.3s; }
.menu-overlay.active { display: block; opacity: 1; }

/* HERO SLIDER */
.slider { height: 75vh; position: relative; overflow: hidden; }
.slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: 1s; display: flex; align-items: center; justify-content: center; text-align: center; }
.slide.active { opacity: 1; }
.slide .overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.4); }
.slide h1 { position: relative; color: #fff; font-size: clamp(24px, 5vw, 42px); padding: 0 20px; text-shadow: 2px 2px 10px rgba(0,0,0,0.5); }

/* SECTIONS & CARDS */
section { max-width: 1200px; margin: auto; padding: 60px 20px; }
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.card { background: var(--white); padding: 30px; border-radius: var(--r); text-align: center; transition: 0.3s; box-shadow: 0 4px 6px rgba(0,0,0,0.02); }
.card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(30,136,229,0.15); }

/* STATS */
#stats { background: var(--dark); color: #fff; border-radius: var(--r); margin: 20px auto; }
.stats { display: flex; justify-content: space-around; text-align: center; flex-wrap: wrap; gap: 20px; }
.stats span { font-size: 40px; color: var(--blue); font-weight: bold; display: block; }

/* GALLERY */
.gallery-carousel { overflow: hidden; padding: 20px 0; }
.gallery-track { display: flex; gap: 15px; transition: 0.5s; }
.gallery-track img { width: 80%; height: 350px; object-fit: cover; border-radius: var(--r); flex-shrink: 0; }

/* الحاوية العائمة */
.floating-container {
    position: fixed;
    bottom: 30px;
    right: 25px;
    display: flex;
    flex-direction: column; /* ترتيب رأسي */
    gap: 15px; /* مسافة بين الزرين */
    z-index: 999; /* تظهر فوق المحتوى وتحت السبلش */
}

.whatsapp-float svg, .location-float svg {
    display: block;
    margin: auto;
}

.whatsapp-float {
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex !important; /* لضمان التمركز */
    align-items: center;
    justify-content: center;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
}

.location-float {
    background-color: #4285F4;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
}

/* التحويل لليسار في اللغة الإنجليزية */
html[dir="ltr"] .floating-container {
    right: auto;
    left: 25px;
}

/* دعم الاتجاه الأجنبي (تنتقل الأزرار لليسار) */
html[dir="ltr"] .floating-container {
    right: auto;
    left: 25px;
}

/* التعامل مع اتجاه اللغة */
html[dir="ltr"] .whatsapp-float, html[dir="ltr"] .location-float {
    right: auto;
    left: 20px;
}

/* ضمان عدم اختفاء النصوص حتى تتحمل الخطوط */
*:not(.fa):not(.fas) { 
    font-family: 'Cairo', sans-serif;
    display: swap; 
}

/* إعطاء مساحة محجوزة للصورة قبل تحميلها لعدم حدوث قفزة في التصميم */
#hero {
    background-color: #f0f0f0; /* لون مؤقت يشبه خلفية الموقع */
    min-height: 400px;
}

/* REVEAL ON SCROLL */
.reveal { opacity: 0; transform: translateY(30px); transition: 0.8s; }
.reveal.active { opacity: 1; transform: none; }

/* MOBILE RESPONSIVE */
@media (max-width: 992px) {
    .menu-toggle { display: block; }
    nav {
        position: fixed; top: 0; right: -100%; width: 280px; height: 100vh;
        background: var(--white); flex-direction: column; padding: 80px 20px;
        transition: 0.4s ease-in-out; z-index: 999; display: flex;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    }
    html[dir="ltr"] nav { right: auto; left: -100%; }
    html[dir="ltr"] nav.active { left: 0; }
    nav.active { right: 0; }
    nav a { margin: 10px 0; font-size: 18px; border-bottom: 1px solid var(--border); padding: 12px 0; width: 100%; text-align: right; }
    html[dir="ltr"] nav a { text-align: left; }
    #logo span { display: none; }
}

/* تنسيق اللوجو للجوال واللابتوب */
#logo {
    display: flex !important;
    align-items: center;
    gap: 8px;
}

#logo img {
    height: 40px; /* حجم مناسب للجوال */
    width: auto;
}

.logo-text {
    display: inline-block !important; /* إجبار النص على الظهور */
    font-size: 5px; /* تصغير الخط قليلاً للجوال */
    font-weight: 400;
    white-space: nowrap; /* منع انقسام الاسم لسطرين */
}

/* في الشاشات الكبيرة (اللابتوب) نكبر الخط */
@media (min-width: 768px) {
    #logo img {
        height: 55px;
    }
    .logo-text {
        font-size: 18px;
    }
}