/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Aref+Ruqaa+Ink&family=Cedarville+Cursive&family=Tajawal:wght@400;500;700&family=Montserrat:wght@400;500;700&family=Playfair+Display:wght@700&display=swap');

/* --- Global Styles & Variables --- */
:root {
    --primary-color: #1a3a5d; /* Dark Blue */
    --secondary-color: #d4a017; /* Gold */
    --text-color: #555;
    --light-gray-bg: #f8f9fa;
    --white-color: #ffffff;
    --header-height: 80px;
    --heading-color: #1a3a5d; /* لون أغمق للعناوين لتباين أفضل */
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif; /* Default Font */
    margin: 0;
    padding: 0;
    color: var(--text-color);
    line-height: 1.7;
    background-color: var(--white-color);
}

/* Apply Tajawal font for Arabic page */
html[lang="ar"] body, html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3, html[lang="ar"] h4, html[lang="ar"] .cta-button, html[lang="ar"] .main-nav ul li a {
    font-family: 'Tajawal', sans-serif;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    color: var(--heading-color); /* استخدام المتغير الجديد */
    font-weight: 700;
}

a {
    text-decoration: none;
    color: var(--secondary-color);
    transition: color 0.3s ease;
}

main {
    padding-top: var(--header-height);
}

.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
    font-size: 2.8em;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--secondary-color);
    margin: 15px auto 0;
}

.cta-button {
    background-color: var(--secondary-color);
    color: var(--white-color);
    padding: 15px 30px;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid var(--secondary-color);
    display: inline-block;
    letter-spacing: 0.5px; /* تباعد الأحرف */
    text-transform: uppercase; /* تحويل النص إلى أحرف كبيرة */
}
.cta-button:hover {
    background-color: transparent;
    color: var(--secondary-color);
}

/* --- Header --- */
.header {
    background-color: var(--white-color);
    height: var(--header-height);
    border-bottom: 1px solid #e0e0e0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

.header.scrolled {
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo img {
    max-height: 60px;
    width: auto;
    display: block;
}

/* --- Main Navigation (Desktop) --- */
.main-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
}
.main-nav ul li {
    margin: 0 15px;
    position: relative; /* لجعل القائمة الفرعية تتوضع بالنسبة للعنصر الأب */
}
.main-nav ul li a {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 1em;
    display: block; /* لجعل المساحة كلها قابلة للنقر */
    padding: 10px 0; /* لزيادة مساحة النقر */
}
.main-nav ul li a:hover {
    color: var(--secondary-color);
}

/* Submenu Styles (Desktop) */
.main-nav .submenu {
    list-style: none;
    margin: 0;
    padding: 10px 0;
    position: absolute;
    top: 100%; /* وضعها أسفل العنصر الأب مباشرة */
    left: 0; /* أو right: 0; لـ RTL */
    background-color: var(--white-color);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 5px;
    min-width: 200px;
    z-index: 1001; /* فوق العناصر الأخرى */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px); /* تأثير بسيط عند الظهور */
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.main-nav .has-submenu:hover > .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-nav .submenu li {
    margin: 0;
}
.main-nav .submenu li a {
    padding: 8px 20px; /* تباعد عناصر القائمة الفرعية */
    color: var(--text-color);
    white-space: nowrap; /* منع انقسام النص */
}
.main-nav .submenu li a:hover {
    background-color: var(--light-gray-bg);
    color: var(--primary-color);
}

/* RTL adjustments for desktop submenu */
html[lang="ar"] .main-nav .submenu {
    left: auto;
    right: 0; /* وضع القائمة الفرعية على اليمين */
}
html[lang="ar"] .main-nav .submenu li a {
    text-align: right; /* محاذاة النص لليمين */
}


.lang-switch {
    font-weight: bold;
    border: 1px solid var(--primary-color);
    padding: 5px 10px;
    border-radius: 5px;
}
.lang-switch:hover {
    background-color: var(--primary-color);
    color: var(--white-color) !important;
}

/* --- Mobile Navigation --- */
.nav-toggle, .mobile-nav {
    display: none; /* مخفية افتراضيًا على سطح المكتب */
}

/* --- Hero Slider Styles --- */
.hero-slider {
    position: relative;
    width: 100%;
    height: 600px; /* يمكن تعديل الارتفاع حسب الرغبة */
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

/* صور خلفية سلايدر الصفحة الرئيسية */
.hero-slider:not(.hero-page-slider) .slide-1 { background-image: linear-gradient(rgba(26, 58, 93, 0.7), rgba(26, 58, 93, 0.7)), url('https://images.unsplash.com/photo-1450101499163-c8848c66ca85?q=80&w=2070&auto=format&fit=crop'); }
.hero-slider:not(.hero-page-slider) .slide-2 { background-image: linear-gradient(rgba(26, 58, 93, 0.7), rgba(26, 58, 93, 0.7)), url('https://images.unsplash.com/photo-1589216532372-1c2a36790239?q=80&w=2070&auto=format&fit=crop'); }
.hero-slider:not(.hero-page-slider) .slide-3 { background-image: linear-gradient(rgba(26, 58, 93, 0.7), rgba(26, 58, 93, 0.7)), url('https://images.unsplash.com/photo-1600880292210-85938a199f54?q=80&w=1974&auto=format&fit=crop'); }

/* أنماط خاصة لسلايدر صفحات الخدمات (مثل asesoría-empresas.html) */
.hero-page-slider {
    height: 400px; /* ارتفاع أقل مثلاً لصفحات الخدمات */
}
.hero-page-slider .slide-1 {
    background-image: linear-gradient(rgba(26, 58, 93, 0.7), rgba(26, 58, 93, 0.7)), url('../img/consultoria_empresarial.jpg'); /* الصورة الجديدة لخدمة الشركات */
}
/* أنماط خاصة لسلايدر Extranjería */
.hero-page-slider.extranjeria-slider .slide-1 {
    background-image: linear-gradient(rgba(26, 58, 93, 0.7), rgba(26, 58, 93, 0.7)), url('../img/extranjeria_banner.jpg'); /* صورة خلفية لخدمة Extranjería */
}

.slide-content {
    color: var(--white-color);
    max-width: 800px;
    padding: 20px;
}

.slide-content h1 {
    color: var(--white-color);
    font-size: 3.5em; /* يمكنك تعديل هذا الحجم ليتناسب مع الصفحات الداخلية */
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(30px);
}
.slide-content p {
    font-size: 1.3em;
    margin-bottom: 30px;
    font-weight: 300;
    opacity: 0;
    transform: translateY(30px);
}
.slide-content .cta-button {
    opacity: 0;
    transform: translateY(30px);
}
.slide-content .whatsapp-btn-header { /* تنسيق زر الواتساب في الهيدر */
    background-color: #25D366;
    border-color: #25D366;
    color: white;
}
.slide-content .whatsapp-btn-header:hover {
    background-color: transparent;
    color: #25D366;
}

.slide.active .slide-content h1 { animation: fadeInUp 0.8s 0.3s ease forwards; }
.slide.active .slide-content p { animation: fadeInUp 0.8s 0.6s ease forwards; }
.slide.active .slide-content .cta-button { animation: fadeInUp 0.8s 0.9s ease forwards; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    font-size: 2em;
    padding: 10px 15px;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.3s ease;
}
.slider-arrow:hover {
    background-color: rgba(0, 0, 0, 0.7);
}
.prev-arrow { left: 20px; }
.next-arrow { right: 20px; }
/* RTL adjustments for slider arrows */
html[lang="ar"] .prev-arrow { left: auto; right: 20px; }
html[lang="ar"] .next-arrow { right: auto; left: 20px; }


/* --- Practice Areas Section --- */
.practice-areas { background-color: var(--light-gray-bg); }
.areas-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.area-card { background-color: var(--white-color); padding: 30px; border-radius: 8px; text-align: center; box-shadow: 0 4px 20px rgba(0,0,0,0.05); transition: all 0.3s ease; display: flex; flex-direction: column; }
.area-card:hover { transform: translateY(-10px); box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.area-card .icon { font-size: 3em; color: var(--secondary-color); margin-bottom: 20px; }
.area-card h3 { font-size: 1.4em; margin-bottom: 15px; }
.area-card p { flex-grow: 1; }
.card-link-button { display: inline-block; margin-top: 15px; padding: 8px 20px; background-color: transparent; border: 2px solid var(--primary-color); color: var(--primary-color); border-radius: 5px; font-weight: bold; transition: all 0.3s ease; }
.card-link-button:hover { background-color: var(--primary-color); color: var(--white-color); }


/* --- Call to Action Section --- */
.cta-section { background-color: var(--primary-color); color: var(--white-color); padding: 60px 0; text-align: center; }
.cta-section h2 { color: var(--white-color); font-size: 2.2em; margin-top: 0; margin-bottom: 15px; }
.cta-section p { max-width: 600px; margin: 0 auto 30px; color: rgba(255, 255, 255, 0.9); }
.cta-section .cta-button:hover { background-color: var(--white-color); border-color: var(--white-color); color: var(--primary-color); }


/* --- About Section --- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.about-image img { max-width: 100%; border-radius: 8px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.about-text { text-align: left; }
html[lang="ar"] .about-text { text-align: right; }
.about-text h2 { font-size: 2.2em; text-align: left; margin-top: 0; }
html[lang="ar"] .about-text h2 { text-align: right; }
.about-text .role { font-size: 1.1em; font-weight: 700; color: var(--secondary-color); margin-top: -15px; margin-bottom: 20px; }
.about-text .signature { font-family: 'Cedarville Cursive', cursive; font-size: 1.9em; color: var(--primary-color); margin-top: 20px; }
html[lang="ar"] .about-text .signature { font-family: 'Aref Ruqaa Ink', cursive; font-size: 2.2em; }


/* --- Contact Section --- */
.contact-section { background-color: var(--light-gray-bg); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.contact-info, .map-container { background: var(--white-color); padding: 40px; border-radius: 8px; height: 100%; box-sizing: border-box; }
.contact-info h3 { font-size: 2.2em; text-align: left; }
html[lang="ar"] .contact-info h3 { text-align: right; }
.info-item { display: flex; align-items: center; margin-bottom: 20px; }
.info-item .icon { font-size: 1.4em; color: var(--secondary-color); margin-right: 15px; width: 25px; }
html[lang="ar"] .info-item .icon { margin-right: 0; margin-left: 15px; }
.info-item a { color: var(--text-color); font-weight: 500; }
.map-container { padding: 0; overflow: hidden; }
.map-container iframe { vertical-align: middle; }


/* --- Testimonials Section --- */
.testimonials-section { background-color: var(--white-color); position: relative; }
.testimonial-slider-container { overflow: hidden; position: relative; }
.testimonial-slider { display: flex; transition: transform 0.5s ease-in-out; }
.testimonial-card { background-color: var(--light-gray-bg); border-left: 5px solid var(--secondary-color); padding: 35px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); flex: 0 0 100%; box-sizing: border-box; margin: 0 15px; }
@media (min-width: 768px) { .testimonial-card { flex: 0 0 48%; } }
@media (min-width: 992px) { .testimonial-card { flex: 0 0 31%; } }
html[lang="ar"] .testimonial-card { border-left: none; border-right: 5px solid var(--secondary-color); }
.testimonial-text { font-style: italic; color: #444; margin-bottom: 20px; position: relative; padding-left: 35px; }
.testimonial-text::before { content: '“'; font-family: 'Playfair Display', serif; font-size: 4em; color: var(--secondary-color); position: absolute; left: -5px; top: -10px; opacity: 0.8; }
html[lang="ar"] .testimonial-text { padding-left: 0; padding-right: 35px; }
html[lang="ar"] .testimonial-text::before { left: auto; right: -5px; }
.testimonial-author { font-weight: bold; color: var(--primary-color); font-size: 1.1em; }
.testimonial-rating { color: #f39c12; margin-bottom: 15px; }
.slider-controls { text-align: center; margin-top: 30px; }
.slider-btn { background-color: var(--primary-color); color: var(--white-color); border: none; padding: 10px 18px; border-radius: 50%; cursor: pointer; font-size: 1.2em; margin: 0 10px; transition: background-color 0.3s ease; }
.slider-btn:hover { background-color: var(--secondary-color); }

/* --- Inner Page Styles --- */
.page-header { background-color: var(--primary-color); color: var(--white-color); padding: 60px 0; text-align: center; }
.page-header h1 { color: var(--white-color); font-size: 3em; margin: 0; }
.page-header p { font-size: 1.2em; color: rgba(255,255,255,0.8); margin-top: 10px; }

.section-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px auto;
    font-size: 1.1em;
    line-height: 1.8;
}

.service-detail-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 50px; align-items: flex-start; }
.service-content h2 { font-size: 2.2em; margin-top: 0; }
.subsection-title { font-size: 1.8em; border-bottom: 2px solid var(--secondary-color); padding-bottom: 10px; margin-top: 40px; margin-bottom: 20px; }
.service-list, .why-us-list { list-style: none; padding: 0; font-size: 1.1em; }
.service-list li, .why-us-list li { padding: 8px 0; display: flex; align-items: flex-start; }
.service-list .icon { color: var(--secondary-color); margin-right: 10px; }
html[lang="ar"] .service-list .icon { margin-right: 0; margin-left: 10px; }
.service-sidebar .sidebar-widget { background-color: var(--light-gray-bg); padding: 30px; border-radius: 8px; margin-bottom: 30px; }
.service-sidebar .sidebar-widget h4 { margin-top: 0; font-size: 1.5em; border-bottom: 2px solid #ddd; padding-bottom: 10px; margin-bottom: 20px; }
.service-sidebar .contact-widget { background-color: var(--primary-color); color: var(--white-color); text-align: center; }
.service-sidebar .contact-widget h4 { color: var(--white-color); border-bottom-color: rgba(255,255,255,0.3); }
.service-sidebar .contact-widget .cta-button { margin-top: 10px; }

/* --- تصميم قسم المحتوى مع الصورة (تعديلات الصور والأزرار) --- */
.content-image-section,
.bicultural-advantage-section {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 60px;
    flex-wrap: wrap; /* السماح للعناصر بالالتفاف على الشاشات الصغيرة */
    justify-content: center; /* توسيط العناصر عند الالتفاف */
}

.content-image-section .text-content,
.bicultural-advantage-section .text-content {
    flex: 1;
    min-width: 300px; /* ضمان حد أدنى للعرض لمنع الكسر السيء */
}

.content-image-section .image-content,
.bicultural-advantage-section .image-content {
    flex: 1;
    min-width: 300px; /* ضمان حد أدنى للعرض لمنع الكسر السيء */
    max-width: 500px; /* تحديد أقصى عرض للصور لجعلها لا تظهر كبيرة جداً */
    overflow: hidden; /* لمنع تجاوز الصورة */
}

.content-image-section .image-content img,
.bicultural-advantage-section .image-content img {
    width: 100%; /* جعل الصورة تتجاوب مع عرض الحاوية */
    height: auto; /* الحفاظ على نسبة العرض إلى الارتفاع */
    display: block; /* إزالة أي مسافات إضافية تحت الصورة */
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* عكس ترتيب الصورة والنص للصفحات العربية في قسم Bicultural Advantage */
html[lang="ar"] .bicultural-advantage-section {
    flex-direction: row-reverse; /* عكس الترتيب ليكون النص على اليمين والصورة على اليسار */
}

/* لضمان أن النص في القوائم يبدأ من يمين العلامة في العربية */
html[lang="ar"] .text-content ul li {
    padding-left: 0;
    padding-right: 25px; /* المسافة البادئة من اليمين */
}

html[lang="ar"] .text-content ul li::before {
    left: auto; /* إلغاء الموضع من اليسار */
    right: 0; /* وضع علامة الصح على اليمين */
}

/* --- قسم أزرار التواصل الاجتماعي (تعديلات WhatsApp و TikTok) --- */
.final-cta-section {
    text-align: center;
    background-color: var(--light-gray-bg); /* استخدام متغير اللون */
    padding: 50px 20px;
    border-radius: 8px;
    margin-top: 40px;
}

.final-cta-section h2 {
    margin-bottom: 15px;
}

.social-cta-buttons {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* للسماح للأزرار بالالتفاف على الشاشات الصغيرة */
}

.social-cta-buttons a {
    padding: 12px 25px;
    text-decoration: none;
    color: white;
    font-weight: bold;
    border-radius: 8px; /* زيادة قيمة border-radius لجعلها تبدو أفضل */
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.3s; /* إضافة transition للون الخلفية */
    display: flex; /* لتمكين استخدام الأيقونات والنص معاً */
    align-items: center; /* لمحاذاة الأيقونة والنص عمودياً */
    gap: 10px; /* مسافة بين الأيقونة والنص */
    min-width: 150px; /* لضمان حجم متناسق للأزرار */
    justify-content: center; /* توسيط المحتوى داخل الزر */
}

.social-cta-buttons a:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.3); /* زيادة قوة الظل */
}

.whatsapp-btn {
    background-color: #25D366; /* لون واتساب الأخضر */
}
.whatsapp-btn:hover {
    background-color: #1DA851; /* لون أغمق عند التحويم */
}

.tiktok-btn {
    background-color: #000000; /* لون تيك توك الأسود */
}
.tiktok-btn:hover {
    background-color: #333333; /* لون أفتح عند التحويم */
}


/* NEW: TikTok Grid Styles */
.tiktok-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    justify-items: center;
}
.tiktok-embed {
    margin: 0 auto !important; /* Force center TikTok embed */
}

/* --- Footer --- */
.footer {
    background-color: var(--primary-color); /* استخدام اللون الأساسي من المتغيرات */
    color: rgba(255, 255, 255, 0.8);
    padding: 60px 0 30px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
    text-align: left;
}
html[lang="ar"] .footer-grid { text-align: right; }
.footer-column .logo img { max-height: 50px; margin-bottom: 20px; }
.footer-column h4 {
    color: var(--white-color); /* التأكد من أن عناوين الأعمدة بيضاء */
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    margin-bottom: 20px;
    font-size: 1.2em;
}
.footer-column p { margin: 0 0 10px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
}
.footer-links a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}
html[lang="ar"] .footer-links a:hover { padding-left: 0; padding-right: 5px; }
.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.15); /* خط أفتح للقسم السفلي */
    font-size: 0.9em;
}

/* =============================================== */
/* ===         زر التمرير للأعلى (Scroll to Top Button)         === */
/* =============================================== */
#scrollToTopBtn {
    position: fixed; /* يجعل الزر ثابتًا على الشاشة */
    bottom: 25px;
    right: 25px; /* الموضع الافتراضي للصفحات LTR (الإسبانية) */
    display: none; /* يظهر عبر الجافاسكريبت */
    width: 45px;
    height: 45px;
    background-color: var(--primary-color); /* استخدم اللون الأساسي */
    color: var(--white-color);
    text-align: center;
    line-height: 45px;
    font-size: 24px;
    border-radius: 50%;
    z-index: 1000; /* تأكد أنه يظهر فوق معظم العناصر */
    text-decoration: none;
    transition: opacity 0.4s, background-color 0.3s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2); /* إضافة ظل لتحسين مظهره */
}

#scrollToTopBtn:hover {
    background-color: var(--secondary-color); /* يتغير اللون عند التحويم */
}

/* تعديل موضع الزر لصفحات RTL (العربية) */
html[lang="ar"] #scrollToTopBtn {
    right: auto; /* إلغاء الموضع من اليمين */
    left: 25px; /* وضعه في اليسار */
}


/* ================== Media Queries for Responsiveness ================== */
@media (max-width: 992px) {
    .about-grid,
    .contact-grid,
    .service-detail-layout,
    .content-image-section, /* أضفنا هذه الأقسام هنا أيضًا لتطبيق التخطيط العمودي على الشاشات الأصغر */
    .bicultural-advantage-section {
        grid-template-columns: 1fr; /* جعل الأقسام عمودية على الشاشات الأصغر */
        flex-direction: column; /* لضمان أن flexbox يصبح عمودياً */
    }
    html[lang="ar"] .bicultural-advantage-section {
        flex-direction: column; /* إلغاء عكس الترتيب الأفقي عندما يكون عموديًا */
    }
}
@media (max-width: 768px) {
    .header { --header-height: 70px; }
    .main-nav { display: none; }
    .nav-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 25px;
        cursor: pointer;
    }
    .nav-toggle span {
        width: 100%;
        height: 3px;
        background-color: var(--primary-color);
        border-radius: 3px;
        transition: all 0.3s ease;
    }
    .nav-toggle.active span:nth-child(1) { transform: translateY(11px) rotate(45deg); }
    .nav-toggle.active span:nth-child(2) { opacity: 0; }
    .nav-toggle.active span:nth-child(3) { transform: translateY(-11px) rotate(-45deg); }

    .mobile-nav {
        display: block;
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background-color: var(--white-color);
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        max-height: 0; /* مخفية افتراضيا */
        overflow: hidden;
        transition: max-height 0.4s ease-in-out;
        z-index: 999;
    }

    .mobile-nav.open { max-height: 400px; /* تظهر عند الفتح */ }
    .mobile-nav ul { list-style: none; padding: 0; margin: 0; width: 100%; text-align: center; }
    .mobile-nav ul li a { display: block; padding: 18px; color: var(--primary-color); font-weight: 500; border-bottom: 1px solid #f0f0f0; }
    /* Mobile submenu specific styles */
    .mobile-nav .has-submenu > a { /* لزر الخدمات الأب في الجوال */
        position: relative;
        padding-right: 40px; /* مساحة لزر التبديل */
    }
    html[lang="ar"] .mobile-nav .has-submenu > a {
        padding-left: 40px;
        padding-right: 18px; /* تباعد افتراضي */
    }

    .mobile-nav .submenu-toggle {
        position: absolute;
        top: 50%;
        right: 15px; /* موضع زر التبديل */
        transform: translateY(-50%);
        width: 25px;
        height: 25px;
        background-color: var(--light-gray-bg);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        /* هذا هو التعديل: إخفاؤه عندما لا تكون القائمة الرئيسية مفتوحة */
        opacity: 0; 
        pointer-events: none; 
        transition: opacity 0.3s ease; /* إضافة انتقال للأوباسيتي */
    }
    /* إظهار زر التبديل فقط عندما تكون القائمة الرئيسية مفتوحة */
    .mobile-nav.open .submenu-toggle {
        opacity: 1;
        pointer-events: auto;
    }

    html[lang="ar"] .mobile-nav .submenu-toggle {
        right: auto;
        left: 15px;
    }
    .mobile-nav .submenu-toggle::before {
        content: '+';
        font-size: 1.2em;
        color: var(--primary-color);
        transition: transform 0.3s ease;
    }
    .mobile-nav .has-submenu.open .submenu-toggle::before {
        content: '−'; /* يتغير إلى ناقص عند الفتح */
        transform: rotate(0deg); /* للتأكد من عدم وجود دوران غريب */
    }

    .mobile-nav .submenu {
        list-style: none;
        padding: 0;
        margin: 0;
        background-color: rgba(0, 0, 0, 0.05); /* خلفية خفيفة للقائمة الفرعية */
        max-height: 0; /* مخفية افتراضيا */
        overflow: hidden;
        transition: max-height 0.3s ease-in-out;
    }

    .mobile-nav .has-submenu.open .submenu {
        max-height: 200px; /* أو قيمة كافية لعرض جميع العناصر */
    }

    .mobile-nav .submenu li a {
        padding: 12px 30px; /* تباعد لعناصر القائمة الفرعية */
        font-size: 0.95em;
        border-bottom: 1px dashed #e0e0e0; /* خط رفيع بين عناصر القائمة الفرعية */
        text-align: left; /* محاذاة لليسار */
    }
    html[lang="ar"] .mobile-nav .submenu li a {
        text-align: right; /* محاذاة لليمين في RTL */
    }

    .hero-slider { height: 500px; }
    .slide-content h1, .page-header h1 { font-size: 2.2em; }
    .section-title { font-size: 2.2em; }
}
/* --- Instagram Button Style --- */
.instagram-btn {
    background: #d6249f;
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%,#d6249f 60%,#285AEB 90%);
}

.instagram-btn:hover {
    opacity: 0.9;
}
/*
 * FIX: Mobile Submenu Link Color
 * -----------------------------------------------
*/
.mobile-nav .submenu li a {
    /* تحديد لون النص بشكل صريح ليكون أزرق داكن وواضح */
    color: var(--primary-color);
}

.mobile-nav .submenu li a:hover {
    /* تغيير اللون عند التمرير لتمييزه */
    color: var(--secondary-color);
    
    /*
 * FIX: Sidebar Widget Link Color
 * -----------------------------------------------
*/
.service-sidebar .sidebar-widget .footer-links a {
    /* تحديد لون النص ليكون أزرق داكن وواضح على الخلفية الفاتحة */
    color: var(--primary-color);
    font-weight: 500;
}

.service-sidebar .sidebar-widget .footer-links a:hover {
    /* تغيير اللون عند التمرير إلى اللون الذهبي */
    color: var(--secondary-color);
}
}
/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Aref+Ruqaa+Ink&family=Cedarville+Cursive&family=Tajawal:wght@400;500;700&family=Montserrat:wght@400;500;700&family=Playfair+Display:wght@700&display=swap');

/* --- Global Styles & Variables --- */
:root {
    --primary-color: #1a3a5d; /* Dark Blue */
    --secondary-color: #d4a017; /* Gold */
    --text-color: #555;
    --light-gray-bg: #f8f9fa;
    --white-color: #ffffff;
    --header-height: 125px; /* Adjusted for two-tiered header */
    --top-bar-height: 45px;
    --main-header-height: 80px;
    --heading-color: #1a3a5d;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    padding: 0;
    color: var(--text-color);
    line-height: 1.7;
    background-color: var(--white-color);
}

html[lang="ar"] body {
    font-family: 'Tajawal', sans-serif;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    color: var(--heading-color);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: var(--secondary-color);
    transition: color 0.3s ease;
}

main {
    padding-top: var(--header-height);
}

.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
    font-size: 2.8em;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--secondary-color);
    margin: 15px auto 0;
}

.cta-button {
    background-color: var(--secondary-color);
    color: var(--white-color);
    padding: 15px 30px;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid var(--secondary-color);
    display: inline-block;
}
.cta-button:hover {
    background-color: transparent;
    color: var(--secondary-color);
}

/* --- NEW HEADER STYLES --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--white-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    z-index: 1000;
}

/* Top Bar */
.top-bar {
    background-color: #f5f5f5;
    height: var(--top-bar-height);
    border-bottom: 1px solid #e7e7e7;
    font-size: 0.9em;
}
.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}
.top-bar-contact a {
    color: var(--text-color);
    margin-right: 20px;
}
.top-bar-contact a i {
    color: var(--primary-color);
    margin-right: 5px;
}
.top-bar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}
.top-bar-social a {
    color: var(--text-color);
    font-size: 1.1em;
    margin-left: 15px;
}
.top-bar-social a:hover {
    color: var(--primary-color);
}

/* Language Switcher */
.language-switcher {
    position: relative;
}
.selected-lang {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--primary-color);
    font-weight: 500;
}
.selected-lang i {
    font-size: 0.8em;
}
.lang-submenu {
    position: absolute;
    top: 120%;
    right: 0;
    background: var(--white-color);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 5px;
    list-style: none;
    padding: 5px 0;
    margin: 0;
    min-width: 100px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.language-switcher:hover .lang-submenu {
    opacity: 1;
    visibility: visible;
}
.lang-submenu li a {
    display: block;
    padding: 8px 15px;
    color: var(--text-color);
}
.lang-submenu li a:hover {
    background-color: var(--light-gray-bg);
}

html[lang="ar"] .top-bar-contact a { margin-right: 0; margin-left: 20px; }
html[lang="ar"] .top-bar-contact a i { margin-right: 0; margin-left: 5px; }
html[lang="ar"] .top-bar-social a { margin-left: 0; margin-right: 15px; }
html[lang="ar"] .lang-submenu { right: auto; left: 0; }

/* Main Header Bar */
.main-header {
    height: var(--main-header-height);
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}
.logo img {
    max-height: 60px;
}

/* Main Navigation (Desktop) */
.main-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
}
.main-nav ul li { margin: 0 15px; position: relative; }
.main-nav ul li a { color: var(--primary-color); font-weight: 500; font-size: 1em; padding: 10px 0; }
.main-nav ul li a:hover { color: var(--secondary-color); }
.main-nav .submenu {
    list-style: none;
    margin: 0;
    padding: 10px 0;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white-color);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 5px;
    min-width: 220px;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}
.main-nav .has-submenu:hover > .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.main-nav .submenu li a { padding: 8px 20px; color: var(--text-color); white-space: nowrap; }
.main-nav .submenu li a:hover { background-color: var(--light-gray-bg); color: var(--primary-color); }
html[lang="ar"] .main-nav .submenu { left: auto; right: 0; }
html[lang="ar"] .main-nav .submenu li a { text-align: right; }

/* --- Hero Slider --- */
/* ... (Hero slider styles are the same as the file you sent) ... */

/* --- Other Sections & Responsive --- */
/* ... (All other styles for sections, footer, mobile nav, etc., are the same as the last file you sent) ... */

/* --- FINAL FIXES from our conversation --- */

/* Social Buttons in Service Pages */
.social-cta-buttons { margin-top: 30px; display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }
.social-cta-buttons a { padding: 10px 20px; text-decoration: none; color: white; font-weight: bold; border-radius: 5px; transition: all 0.3s; display: flex; align-items: center; gap: 8px; }
.social-cta-buttons a:hover { transform: translateY(-3px); box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
.whatsapp-btn { background-color: #25D366; }
.tiktok-btn { background-color: #000000; }
.instagram-btn {
    background: #d6249f;
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%,#d6249f 60%,#285AEB 90%);
}

/* Sidebar Link Color Fix */
.service-sidebar .sidebar-widget .footer-links a {
    color: var(--primary-color);
    font-weight: 500;
}
.service-sidebar .sidebar-widget .footer-links a:hover {
    color: var(--secondary-color);
}
/*
 * FINAL FIX: Force Vertical Submenu Display
 * -----------------------------------------------
*/
nav.main-nav ul > li.has-submenu > ul.submenu > li {
    display: block !important; /* يجبر العنصر على أن يأخذ سطراً كاملاً */
    width: 100%;
}

nav.main-nav ul > li.has-submenu > ul.submenu > li > a {
    display: block !important; /* يضمن أن الرابط يملأ المساحة */
}
