/* ================= ملف التنسيقات الرئيسي (style.css) - النسخة الكاملة والمحدثة ================= */

/* --- 1. متغيرات الهوية البصرية (Luxury Corporate) --- */
/* إصلاح مشكلة اختفاء القائمة */
body {
    padding-top: 80px; /* مسافة لتعويض ارتفاع القائمة الثابتة */
}

/* في الصفحة الرئيسية، القسم الأول لديه مسافة بالفعل لذا نلغي مسافة البودي */
body:has(.hero-section) {
    padding-top: 0;
}
:root {
    --primary-color: #002E5D; /* الكحلي الرسمي */
    --primary-dark: #001a35;
    --accent-color: #C5A059; /* الذهبي الأساسي */
    --accent-gradient: linear-gradient(135deg, #C5A059 0%, #E6C888 50%, #B08D45 100%);
    --bg-light: #f4f7f6;
    --text-dark: #333;
    --navbar-light: rgba(255, 255, 255, 0.95);
    --navbar-dark: rgba(0, 30, 60, 0.95);
}

body { font-family: 'Cairo', sans-serif; overflow-x: hidden; scroll-behavior: smooth; }
body.lang-en { font-family: 'Tajawal', sans-serif; }

/* --- 2. تخصيص الوضع الليلي (Dark Mode) --- */
[data-bs-theme="dark"] body { background-color: #001529; color: #e0e0e0; }
[data-bs-theme="dark"] .bg-light { background-color: #001e3b !important; }
[data-bs-theme="dark"] .navbar { background-color: var(--navbar-dark) !important; border-bottom: 1px solid rgba(255,255,255,0.05); }
[data-bs-theme="dark"] .card { background-color: #00264d; border: 1px solid #003366; color: #fff; }
[data-bs-theme="dark"] .service-card { background: #00264d; border-color: #003366; }
[data-bs-theme="dark"] .text-muted { color: #aab8c5 !important; }
[data-bs-theme="dark"] .modal-content { background-color: #00264d; color: #fff; border: 1px solid var(--accent-color); }

/* نموذج الواتساب في الوضع الليلي */
[data-bs-theme="dark"] #whatsappForm {
    background-color: #00264d !important;
    border: 1px solid #003366;
    color: #fff;
}
[data-bs-theme="dark"] #whatsappForm input,
[data-bs-theme="dark"] #whatsappForm select,
[data-bs-theme="dark"] #whatsappForm textarea {
    background-color: #001a35 !important;
    color: #fff !important;
    border: 1px solid #004080;
}
[data-bs-theme="dark"] #whatsappForm input::placeholder,
[data-bs-theme="dark"] #whatsappForm textarea::placeholder {
    color: #aab8c5;
}

/* --- 3. تنسيق أزرار اختيار الخدمات (Checkboxes) --- */
.btn-check:checked + .btn-outline-secondary {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(0, 46, 93, 0.3);
}
.btn-outline-secondary {
    border-color: #ccc;
    color: #555;
    transition: all 0.3s ease;
}
.btn-outline-secondary:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);
    border-color: var(--primary-color);
}
/* أزرار الخدمات في الوضع الليلي */
[data-bs-theme="dark"] .btn-outline-secondary {
    color: #ccc;
    border-color: #444;
}
[data-bs-theme="dark"] .btn-check:checked + .btn-outline-secondary {
    background-color: var(--accent-color);
    color: #000;
    border-color: var(--accent-color);
}

/* --- 4. شاشة التحميل (Loader) --- */
#preloader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--primary-color); z-index: 9999;
    display: flex; justify-content: center; align-items: center; flex-direction: column;
    transition: opacity 0.5s ease;
}
.spinner {
    width: 60px; height: 60px; border: 4px solid rgba(197, 160, 89, 0.3);
    border-radius: 50%; border-top-color: var(--accent-color);
    animation: spin 1s ease-in-out infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- 5. شريط العناوين (Navbar) --- */
.navbar { box-shadow: 0 2px 20px rgba(0,0,0,0.05); padding: 15px 0; transition: all 0.3s; }
.navbar-brand img { height: 55px; }
.nav-link { color: var(--primary-color) !important; font-weight: 700; margin: 0 10px; position: relative; }
[data-bs-theme="dark"] .nav-link { color: #fff !important; }
.nav-link::after {
    content: ''; position: absolute; width: 0; height: 2px;
    bottom: 0; left: 0; background: var(--accent-color);
    transition: width 0.3s;
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-link:hover, .nav-link.active { color: var(--accent-color) !important; }

.btn-gold {
    background: var(--accent-gradient);
    color: #fff; border: none; font-weight: bold;
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.4);
    transition: transform 0.3s;
}
.btn-gold:hover { transform: translateY(-2px); color: #fff; filter: brightness(1.1); }

/* --- 6. القسم الرئيسي (Hero) --- */
.hero-section {
    position: relative; min-height: 90vh;
    background: linear-gradient(rgba(0, 46, 93, 0.85), rgba(0, 20, 40, 0.9)), url('images/1.png');
    background-size: cover; background-attachment: fixed; background-position: center;
    display: flex; align-items: center; justify-content: center;
    text-align: center; color: white;
    padding-top: 80px;
}
.hero-content h1 { font-size: 3.5rem; font-weight: 800; margin-bottom: 20px; }
.hero-content span { color: var(--accent-color); }
@media (max-width: 768px) {
    .hero-content h1 { font-size: 2rem; }
}

/* --- 7. الخدمات والعناوين --- */
.section-title { position: relative; margin-bottom: 50px; text-align: center; }
.section-title h2 {
    font-size: 2.5rem; font-weight: 800; color: var(--primary-color);
    display: inline-block; padding-bottom: 15px;
    position: relative; /* ضروري جداً لربط الخط الأصفر بالعنوان فقط */
    margin-bottom: 20px; /* لعمل مسافة آمنة بين الخط والشرح */
}
[data-bs-theme="dark"] .section-title h2 { color: #fff; }
.section-title h2::after {
    content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 80px; height: 4px; background: var(--accent-color); border-radius: 2px;
}

.service-card {
    background: #fff; padding: 40px 30px; border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: all 0.4s ease; border-bottom: 4px solid transparent;
    height: 100%; cursor: pointer; text-align: center;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
}
.service-card:hover {
    transform: translateY(-10px);
    border-bottom-color: var(--accent-color);
    box-shadow: 0 15px 40px rgba(0,46,93,0.15);
}
.service-icon {
    font-size: 3.5rem; margin-bottom: 25px;
    background: -webkit-linear-gradient(#C5A059, #B08D45);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.service-title { font-weight: 700; color: var(--primary-color); margin-bottom: 15px; }
[data-bs-theme="dark"] .service-title { color: #fff; }

/* --- 8. الإحصائيات (Stats) --- */
.stats-section {
    background: var(--primary-color); color: #fff; padding: 60px 0;
    background-image: linear-gradient(rgba(0, 46, 93, 0.9), rgba(0, 46, 93, 0.9)), url('images/2.png');
    background-size: cover; background-attachment: fixed; background-position: center;
}
.stat-item h3 { font-size: 3rem; font-weight: bold; color: var(--accent-color); }

/* --- 9. خطوات العمل (Process) --- */
.process-step { position: relative; padding: 20px; }
.step-number {
    width: 50px; height: 50px; background: var(--accent-gradient);
    color: #fff; font-size: 24px; font-weight: bold;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px auto; box-shadow: 0 0 0 5px rgba(197, 160, 89, 0.2);
}

/* --- 10. الفوتر والأزرار العائمة (محدث) --- */
footer { background: #001a35; color: #fff; padding-top: 60px; border-top: 5px solid var(--accent-color); }
.footer-links a { color: #ccc; text-decoration: none; transition: 0.3s; display: block; margin-bottom: 10px; }
.footer-links a:hover { color: var(--accent-color); padding-right: 5px; }
.social-btn {
    width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.1);
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; margin: 0 5px; transition: 0.3s;
}
.social-btn:hover { background: var(--accent-color); transform: scale(1.1); }

/* === تنسيق الأزرار العائمة === */
.floating-btn {
    position: fixed;
    width: 60px; height: 60px;
    border-radius: 50%;
    z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 24px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    text-decoration: none; border: none;
    transition: all 0.3s ease;
    cursor: pointer;
}
.floating-btn:hover { transform: scale(1.1); color: white; }

/* 1. زر الواتساب (يسار الشاشة) */
.floating-btn.whatsapp-btn {
    background-color: #25D366;
    bottom: 30px;
    left: 30px;
    right: auto;
}

/* 2. زر التقييم (يمين الشاشة - في الأسفل) */
.floating-btn.review-btn {
    background: #f39c12;
    bottom: 30px;
    right: 30px;
    left: auto;
}
.floating-btn.review-btn:hover { background: #d38308; }

/* 3. زر التوظيف (يمين الشاشة - فوق التقييم) */
.floating-btn.career-btn, .career-btn {
    background: var(--accent-gradient);
    bottom: 100px; /* مسافة أعلى من زر التقييم */
    right: 30px;
    left: auto;
    position: fixed;
}

/* دعم اللغة الإنجليزية (عكس الاتجاهات) */
html[dir="ltr"] .floating-btn.whatsapp-btn { right: 30px; left: auto; }
html[dir="ltr"] .floating-btn.review-btn { left: 30px; right: auto; }
html[dir="ltr"] .floating-btn.career-btn { left: 30px; right: auto; }

/* أيقونات التواصل */
.contact-icon-box {
    width: 55px; height: 55px; min-width: 55px;
    background: #fff; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
[data-bs-theme="dark"] .contact-icon-box {
    background: #00264d; color: #fff;
    border: 1px solid rgba(255,255,255,0.1);
}

/* --- 11. آراء العملاء (Testimonials) --- */
.testimonial-card {
    background: #fff; padding: 30px; border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    position: relative; margin: 20px 0;
    border-bottom: 4px solid var(--accent-color);
}
.testimonial-card::before {
    content: "\f10d"; font-family: "Font Awesome 6 Free"; font-weight: 900;
    position: absolute; top: -20px; right: 30px;
    width: 50px; height: 50px; background: var(--accent-gradient);
    color: #fff; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 20px;
}
[data-bs-theme="dark"] .testimonial-card { background: #00264d; color: #fff; }

/* تنسيق النجوم داخل مودال التقييم */
.star-item { cursor: pointer; color: #ddd; transition: 0.2s; margin: 0 5px; }
.star-item.active { color: #f39c12; font-weight: 900; }

/* --- 12. الحاسبة (Calculator) --- */
.calc-box {
    background: linear-gradient(135deg, var(--primary-color) 0%, #001a35 100%);
    border-radius: 20px; padding: 40px; color: #fff;
    box-shadow: 0 15px 40px rgba(0,46,93,0.3);
}
.calc-input {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff; border-radius: 10px; padding: 15px;
    font-size: 1.2rem; text-align: center;
}
.calc-input:focus {
    background: rgba(255,255,255,0.2); box-shadow: none;
    border-color: var(--accent-color); color: #fff;
}
.calc-result-box {
    background: rgba(255,255,255,0.95); color: var(--primary-color);
    border-radius: 10px; padding: 20px; margin-top: 20px; display: none;
}

/* --- 13. الشريط المتحرك اللانهائي (Infinite Slider) --- */
.infinite-slider-container {
    overflow: hidden;
    background: #fff;
    padding: 40px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    position: relative;
    direction: ltr; /* اتجاه الحركة من اليسار لليمين */
}
.infinite-track {
    display: flex;
    width: max-content;
    animation: seamless-loop 60s linear infinite;
}
.partner-logo {
    width: 180px; padding: 0 25px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.partner-logo img {
    max-width: 100%; max-height: 70px;
    filter: grayscale(100%); opacity: 0.6; transition: 0.3s; object-fit: contain;
}
.partner-logo img:hover {
    filter: grayscale(0); opacity: 1; transform: scale(1.1);
}
@keyframes seamless-loop {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.fade-edge {
    position: absolute; top: 0; bottom: 0; width: 100px; z-index: 2; pointer-events: none;
}
.edge-left { left: 0; background: linear-gradient(to right, #fff, transparent); }
.edge-right { right: 0; background: linear-gradient(to left, #fff, transparent); }

/* دعم الوضع الليلي للشريط */
[data-bs-theme="dark"] .infinite-slider-container { background: #001a35; border-color: #003366; }
[data-bs-theme="dark"] .edge-left { background: linear-gradient(to right, #001a35, transparent); }
[data-bs-theme="dark"] .edge-right { background: linear-gradient(to left, #001a35, transparent); }

/* --- 14. تنسيقات الصفحات الجديدة (الباقات، الأخبار، المدونة) --- */
/* تنسيق كروت الباقات */
.pricing-card { transition: all 0.3s ease; }
.pricing-card:hover { transform: translateY(-5px); }

/* تنسيق الباقة المميزة (الأكثر طلباً) */
.popular-card {
    background: linear-gradient(135deg, #002E5D 0%, #001a35 100%);
    color: #fff !important;
    transform: scale(1.05);
    border: 2px solid var(--accent-color) !important;
}
.popular-card h4, .popular-card .list-unstyled { color: #fff !important; }
.popular-card .text-muted { color: rgba(255,255,255,0.7) !important; }

/* تنسيق صور الأخبار */
.news-img-wrapper {
    height: 200px; overflow: hidden; position: relative;
}
.news-img-wrapper img {
    height: 100%; object-fit: cover; transition: transform 0.3s;
}
.news-card:hover .news-img-wrapper img { transform: scale(1.1); 
}
/* --- تنسيق صفحة تواصل معنا --- */
/* تنسيق التبويبات (Tabs) */
.nav-pills .nav-link {
    color: var(--primary-color);
    background-color: transparent;
    border: 1px solid #eee;
    transition: all 0.3s ease;
}
.nav-pills .nav-link:hover {
    background-color: #f8f9fa;
    transform: translateY(-2px);
}
.nav-pills .nav-link.active {
    background: var(--primary-color) !important; /* لون كحلي عند التفعيل */
    color: #fff !important;
    border-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(0, 46, 93, 0.3);
}

/* في الوضع الليلي */
[data-bs-theme="dark"] .nav-pills .nav-link {
    color: #ccc;
    border-color: #444;
}
[data-bs-theme="dark"] .nav-pills .nav-link:hover {
    background-color: #00264d;
}
[data-bs-theme="dark"] .nav-pills .nav-link.active {
    background: var(--accent-color) !important; /* لون ذهبي في الوضع الليلي */
    color: #000 !important;
    border-color: var(--accent-color);
}
/* ================= إصلاح مشكلة التبويبات (Tabs Fix) ================= */
.tab-content > .tab-pane {
    display: none !important; /* إجبار إخفاء جميع التبويبات */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tab-content > .active {
    display: block !important; /* إجبار إظهار التبويب النشط فقط */
    opacity: 1;
}

/* التأكد من أن التبويب يأخذ كامل العرض */
.tab-content {
    width: 100%;
}

/* --- تنسيق خيارات التواصل في الرئيسية --- */
.contact-option-card {
    background: #f8f9fa;
    transition: all 0.3s ease;
    border: 1px solid #eee;
}

.contact-option-card:hover {
    background: #fff;
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 20px rgba(0, 46, 93, 0.1);
}

.contact-option-card:hover .icon-box {
    transform: scale(1.1);
    transition: transform 0.3s;
}

/* في الوضع الليلي */
[data-bs-theme="dark"] .contact-option-card {
    background: #001a35;
    border-color: #003366;
}
[data-bs-theme="dark"] .contact-option-card h5 { color: #fff !important; }
[data-bs-theme="dark"] .contact-option-card:hover {
    background: #00264d;
    border-color: var(--accent-color);
}
/* --- تنسيق صفحة المدونة (Blog Cards) --- */
.blog-card {
    transition: all 0.3s ease;
    background: #fff;
}
.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 46, 93, 0.15) !important;
}

/* حاوية الصورة */
.blog-img-wrapper {
    height: 240px; /* ارتفاع ثابت للصورة */
    overflow: hidden;
}
.blog-img-wrapper img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
/* تأثير الزووم عند المرور */
.blog-card:hover .blog-img-wrapper img {
    transform: scale(1.1);
}

/* تنسيق العنوان والرابط */
.blog-card h4 a {
    background-image: linear-gradient(var(--primary-color), var(--primary-color));
    background-size: 0% 2px;
    background-repeat: no-repeat;
    background-position: right bottom;
    transition: background-size 0.3s ease;
    color: var(--primary-color) !important;
}
.blog-card:hover h4 a {
    background-size: 100% 2px;
    color: var(--accent-color) !important;
}

/* تنسيق الترقيم (Pagination) */
.page-link {
    color: var(--primary-color);
    border: 1px solid #eee;
    padding: 10px 20px;
}
.page-link:hover {
    background-color: #f8f9fa;
    color: var(--accent-color);
    border-color: #eee;
}
.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* الوضع الليلي للمدونة */
[data-bs-theme="dark"] .blog-card {
    background-color: #00264d;
    border: 1px solid #003366;
}
[data-bs-theme="dark"] .page-link {
    background-color: #00264d;
    border-color: #003366;
    color: #fff;
}
[data-bs-theme="dark"] .page-item.active .page-link {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #000;
}
html, body {
    overflow-x: hidden !important;
    width: 100%;
    position: relative;
    max-width: 100vw; /* ضمان عدم تجاوز عرض الشاشة */
}
.row {
    margin-right: 0 !important;
    margin-left: 0 !important;
    max-width: 100%;
}

/* إعادة ضبط الحواشي للكولمات لتعويض إلغاء هوامش الصف */
.container, .container-fluid {
    padding-right: 15px;
    padding-left: 15px;
    overflow-x: hidden; /* تأمين إضافي */
}
/* --- تأثير القائمة الذكية (Smart Navbar) --- */
.navbar {
    transition: transform 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
}

/* كلاس لإخفاء القائمة برفعها للأعلى */
.navbar-hidden {
    transform: translateY(-100%);
}
/* ================= إصلاح قسم العملاء في الوضع الليلي ================= */

/* إجبار الخلفية على التغير للون الداكن في الوضع الليلي */
[data-bs-theme="dark"] #clients.bg-white,
[data-bs-theme="dark"] section.bg-white {
    background-color: #001a35 !important;
}

/* التأكد من أن ألوان التلاشي (Fade) تتطابق مع الخلفية الداكنة */
[data-bs-theme="dark"] #clients .edge-left {
    background: linear-gradient(to right, #001a35 10%, transparent 100%);
}

[data-bs-theme="dark"] #clients .edge-right {
    background: linear-gradient(to left, #001a35 10%, transparent 100%);
}
/* === إخفاء شريط التمرير نهائياً (Hide Scrollbar) === */

/* لمتصفحات Chrome, Edge, Safari */
::-webkit-scrollbar {
    display: none;
    width: 0px;
    background: transparent;
}

/* لمتصفح Firefox وباقي المتصفحات */
html, body {
    scrollbar-width: none; /* إخفاء في فايرفوكس */
    -ms-overflow-style: none; /* إخفاء في IE و Edge القديم */
}
/* تأثير هوفر لزر الباقة الشاملة */
.btn-outline-light.hover-gold:hover {
    background-color: var(--accent-color) !important; /* اللون الذهبي */
    border-color: var(--accent-color) !important;
    color: var(--primary-color) !important; /* النص يصبح أزرق داكن */
}
/* ================= تصميم جديد لمربع "كيف يمكننا مساعدتك" ================= */

/* 1. الحاوية الرئيسية */
.contact-help-container {
    background: rgba(255, 255, 255, 0.6); /* خلفية شفافة قليلاً */
    backdrop-filter: blur(10px); /* تأثير الزجاج */
    border: 1px solid rgba(0, 46, 93, 0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* 2. بطاقة الخيار (الكارت الصغير) */
.help-option-card {
    background: #fff;
    border: 1px solid #eee;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.help-option-card h6 { color: var(--primary-color); transition: color 0.3s; }
.help-option-card .icon-wrapper {
    width: 50px; height: 50px;
    background: #f4f7f6;
    color: var(--primary-color);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s;
}

/* 3. تأثير الهوفر (Hover Effect) */
.help-option-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 20px rgba(197, 160, 89, 0.2);
}

.help-option-card:hover .icon-wrapper {
    background: var(--accent-gradient);
    color: #fff;
}

/* 4. البطاقة المميزة (Active/Center) */
.help-option-card.active {
    border-color: var(--accent-color);
    background: linear-gradient(to bottom right, #fff, #fffbf0);
}
.help-option-card.active .icon-wrapper {
    color: var(--accent-color);
    background: rgba(197, 160, 89, 0.1);
}

/* ================= دعم الوضع الليلي (Dark Mode) ================= */
[data-bs-theme="dark"] .contact-help-container {
    background: rgba(0, 26, 53, 0.6);
    border-color: rgba(255,255,255,0.1);
}

[data-bs-theme="dark"] .help-option-card {
    background: #00264d;
    border-color: #003366;
}

[data-bs-theme="dark"] .help-option-card h6 { color: #fff; }
[data-bs-theme="dark"] .help-option-card p { color: #aab8c5 !important; }

[data-bs-theme="dark"] .help-option-card .icon-wrapper {
    background: #001a35;
    color: #fff;
}

/* تأثير الهوفر في الليلي */
[data-bs-theme="dark"] .help-option-card:hover {
    background: #003366;
    border-color: var(--accent-color);
}
[data-bs-theme="dark"] .help-option-card:hover .icon-wrapper {
    background: var(--accent-color);
    color: #000;
}
