/* =====================================================
   منصة وظائف الشرق الأوسط - التصميم الرئيسي
   Mobile-First | RTL | Arabic Typography
   ===================================================== */

/* Google Fonts - Cairo & Tajawal */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&family=Tajawal:wght@300;400;500;700;800&display=swap');

/* =====================================================
   المتغيرات الرئيسية (CSS Variables)
   ===================================================== */
:root {
    /* الألوان الأساسية */
    --primary:        #1a56db;
    --primary-dark:   #1341aa;
    --primary-light:  #e8f0fe;
    --secondary:      #f59e0b;
    --secondary-dark: #d97706;
    --accent:         #10b981;
    --danger:         #ef4444;

    /* الألوان الخلفية */
    --bg-main:        #f8faff;
    --bg-white:       #ffffff;
    --bg-card:        #ffffff;
    --bg-dark:        #0f172a;
    --bg-dark-2:      #1e293b;

    /* ألوان النص */
    --text-primary:   #0f172a;
    --text-secondary: #475569;
    --text-muted:     #94a3b8;
    --text-white:     #ffffff;

    /* الحدود */
    --border:         #e2e8f0;
    --border-light:   #f1f5f9;

    /* الظلال */
    --shadow-sm:  0 1px 3px rgba(0,0,0,0.08);
    --shadow-md:  0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg:  0 8px 32px rgba(0,0,0,0.12);
    --shadow-xl:  0 20px 60px rgba(0,0,0,0.15);
    --shadow-blue: 0 8px 32px rgba(26,86,219,0.2);

    /* الخطوط */
    --font-primary: 'Cairo', 'Tajawal', sans-serif;
    --font-size-xs:   0.75rem;
    --font-size-sm:   0.875rem;
    --font-size-base: 1rem;
    --font-size-lg:   1.125rem;
    --font-size-xl:   1.25rem;
    --font-size-2xl:  1.5rem;
    --font-size-3xl:  1.875rem;
    --font-size-4xl:  2.25rem;

    /* الحواف */
    --radius-sm:  6px;
    --radius-md:  12px;
    --radius-lg:  18px;
    --radius-xl:  24px;
    --radius-full: 9999px;

    /* التحولات */
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    /* الأحجام */
    --nav-height: 64px;
    --container-max: 1200px;
}

/* =====================================================
   إعادة الضبط والأساسيات
   ===================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    direction: rtl;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    color: var(--text-primary);
    background-color: var(--bg-main);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover { color: var(--primary-dark); }

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol { list-style: none; }

button {
    cursor: pointer;
    font-family: var(--font-primary);
    border: none;
    background: none;
}

input, textarea, select {
    font-family: var(--font-primary);
    outline: none;
}

/* =====================================================
   الحاوية والتخطيط
   ===================================================== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 16px;
}

.section {
    padding: 48px 0;
}

.section-lg {
    padding: 72px 0;
}

/* =====================================================
   شريط التنقل العلوي (Navbar)
   ===================================================== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    height: var(--nav-height);
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: var(--font-size-xl);
    color: var(--primary);
    white-space: nowrap;
}

.navbar-brand .brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    flex-shrink: 0;
    box-shadow: var(--shadow-blue);
}

.navbar-nav {
    display: none;
    align-items: center;
    gap: 4px;
}

.navbar-nav a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: var(--font-size-sm);
    padding: 8px 14px;
    border-radius: var(--radius-full);
    transition: var(--transition);
}

.navbar-nav a:hover,
.navbar-nav a.active {
    color: var(--primary);
    background: var(--primary-light);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-post-job {
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    color: white !important;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: var(--font-size-sm);
    box-shadow: var(--shadow-blue);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.btn-post-job:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(26,86,219,0.35);
    color: white !important;
}

.hamburger {
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.hamburger span {
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: var(--nav-height);
    right: 0;
    left: 0;
    background: white;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    transform: translateY(-110%);
    transition: var(--transition-slow);
    z-index: 999;
}

.mobile-menu.open {
    transform: translateY(0);
}

.mobile-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    color: var(--text-primary);
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.mobile-menu a:hover,
.mobile-menu a.active {
    background: var(--primary-light);
    color: var(--primary);
}

/* =====================================================
   بطل الصفحة الرئيسية (Hero Section)
   ===================================================== */
.hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 40%, #1a56db 100%);
    padding: 56px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59,130,246,0.2) 0%, transparent 70%);
    animation: pulse-bg 6s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(245,158,11,0.12) 0%, transparent 70%);
    animation: pulse-bg 8s ease-in-out infinite reverse;
}

@keyframes pulse-bg {
    0%, 100% { transform: scale(1) translateY(0); }
    50% { transform: scale(1.1) translateY(-20px); }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(245,158,11,0.15);
    border: 1px solid rgba(245,158,11,0.3);
    color: #fbbf24;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: clamp(1.75rem, 5vw, 3.5rem);
    font-weight: 900;
    color: white;
    line-height: 1.3;
    margin-bottom: 16px;
}

.hero-title .highlight {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: var(--font-size-base);
    color: rgba(255,255,255,0.75);
    margin-bottom: 36px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* نموذج البحث */
.search-box {
    background: white;
    border-radius: var(--radius-xl);
    padding: 8px;
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 720px;
    margin: 0 auto;
}

.search-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-main);
    border-radius: var(--radius-lg);
    padding: 4px 12px;
}

.search-input-group .icon {
    color: var(--text-muted);
    font-size: 18px;
    flex-shrink: 0;
}

.search-input-group input,
.search-input-group select {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 4px;
    font-size: var(--font-size-base);
    color: var(--text-primary);
    font-family: var(--font-primary);
    min-width: 0;
}

.search-input-group input::placeholder {
    color: var(--text-muted);
}

.search-divider {
    width: 1px;
    height: 24px;
    background: var(--border);
    flex-shrink: 0;
}

.btn-search {
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    color: white;
    padding: 14px 28px;
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-size: var(--font-size-base);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    box-shadow: var(--shadow-blue);
    width: 100%;
}

.btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(26,86,219,0.4);
}

/* الإحصائيات في الهيرو */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 36px;
    flex-wrap: wrap;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.hero-stat .stat-number {
    font-size: var(--font-size-2xl);
    font-weight: 900;
    color: white;
    line-height: 1;
}

.hero-stat .stat-label {
    font-size: var(--font-size-xs);
    color: rgba(255,255,255,0.6);
}

.hero-stat .stat-number .counter {
    display: inline-block;
}

/* =====================================================
   شريط الثقة (Trust Banner)
   ===================================================== */
.trust-banner {
    background: linear-gradient(135deg, #10b981, #059669);
    padding: 14px 0;
}

.trust-banner .container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    text-align: center;
}

.trust-banner p {
    color: white;
    font-weight: 700;
    font-size: var(--font-size-sm);
}

.trust-banner .icon {
    font-size: 18px;
}

/* =====================================================
   أقسام الدول (Countries Section)
   ===================================================== */
.countries-section {
    padding: 48px 0;
    background: white;
}

.section-header {
    text-align: center;
    margin-bottom: 36px;
}

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-light);
    color: var(--primary);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 700;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.section-title {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.3;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: var(--font-size-base);
    max-width: 500px;
    margin: 0 auto;
}

.countries-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.country-card {
    background: var(--bg-main);
    border: 2px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.country-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: var(--country-color, var(--primary));
    transform: scaleX(0);
    transition: var(--transition);
}

.country-card:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.country-card:hover::before {
    transform: scaleX(1);
}

.country-flag {
    font-size: 42px;
    line-height: 1;
}

.country-name {
    font-weight: 700;
    font-size: var(--font-size-sm);
    color: var(--text-primary);
}

.country-count {
    display: inline-flex;
    align-items: center;
    background: var(--primary-light);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 700;
}

/* =====================================================
   بطاقات الوظائف (Job Cards)
   ===================================================== */
.jobs-section {
    padding: 48px 0;
    background: var(--bg-main);
}

.jobs-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.job-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 20px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.job-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.job-card.featured {
    border-color: var(--secondary);
    background: linear-gradient(to left, rgba(245,158,11,0.03), white);
}

.job-card.featured::before {
    content: '⭐ مميزة';
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--secondary);
    color: white;
    font-size: var(--font-size-xs);
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.job-card-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
}

.company-logo {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    background: var(--bg-main);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
    flex-shrink: 0;
    overflow: hidden;
}

.company-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.job-info {
    flex: 1;
    min-width: 0;
}

.job-title {
    font-size: var(--font-size-base);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.4;
}

.job-title a {
    color: inherit;
    transition: var(--transition);
}

.job-title a:hover {
    color: var(--primary);
}

.job-company {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.job-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
    white-space: nowrap;
}

.badge-country {
    background: #eff6ff;
    color: #1d4ed8;
}

.badge-verified {
    background: #f0fdf4;
    color: #16a34a;
}

.badge-residency {
    background: #fefce8;
    color: #854d0e;
}

.badge-type {
    background: #faf5ff;
    color: #7c3aed;
}

.badge-new {
    background: #fef2f2;
    color: #dc2626;
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.job-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border-light);
    flex-wrap: wrap;
    gap: 8px;
}

.job-salary {
    font-weight: 800;
    color: var(--accent);
    font-size: var(--font-size-sm);
    display: flex;
    align-items: center;
    gap: 6px;
}

.job-time {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-apply {
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    color: white;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: var(--font-size-sm);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: var(--shadow-blue);
}

.btn-apply:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26,86,219,0.4);
    color: white;
}

.btn-apply-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 8px 18px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: var(--font-size-sm);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-apply-outline:hover {
    background: var(--primary);
    color: white;
}

/* =====================================================
   الأزرار العامة
   ===================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: var(--font-size-sm);
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: var(--font-primary);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    color: white;
    box-shadow: var(--shadow-blue);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(26,86,219,0.4);
    color: white;
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background: var(--secondary-dark);
    transform: translateY(-2px);
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-ghost {
    background: var(--bg-main);
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--border);
    color: var(--text-primary);
}

.btn-lg {
    padding: 16px 36px;
    font-size: var(--font-size-base);
}

.btn-sm {
    padding: 8px 16px;
    font-size: var(--font-size-xs);
}

.btn-block {
    width: 100%;
}

/* =====================================================
   حقول الإدخال (Forms)
   ===================================================== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-label .required {
    color: var(--danger);
    margin-right: 4px;
}

.form-control {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    color: var(--text-primary);
    font-family: var(--font-primary);
    background: white;
    transition: var(--transition);
    -webkit-appearance: none;
    appearance: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,86,219,0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control.error {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

select.form-control {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 12px center;
    background-size: 16px;
    padding-left: 36px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: var(--bg-main);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 10px;
}

.form-check:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.form-check label {
    font-size: var(--font-size-sm);
    font-weight: 500;
    cursor: pointer;
    color: var(--text-primary);
    flex: 1;
}

.form-error {
    color: var(--danger);
    font-size: var(--font-size-xs);
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* =====================================================
   بطاقات المدونة (Blog Cards)
   ===================================================== */
.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.blog-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: var(--transition);
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.blog-card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--primary-light), #bfdbfe);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.blog-card-body {
    padding: 20px;
}

.blog-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--primary-light);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 700;
    margin-bottom: 10px;
}

.blog-title {
    font-size: var(--font-size-base);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 8px;
}

.blog-title a {
    color: inherit;
}

.blog-title a:hover {
    color: var(--primary);
}

.blog-excerpt {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border-light);
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

/* =====================================================
   الفلاتر (Filters Bar)
   ===================================================== */
.filters-bar {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    position: sticky;
    top: var(--nav-height);
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.filters-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.filters-scroll::-webkit-scrollbar {
    display: none;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition);
    border: 1.5px solid var(--border);
    background: white;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.filter-chip:hover,
.filter-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* =====================================================
   الصفحة التفصيلية للوظيفة
   ===================================================== */
.job-detail-hero {
    background: linear-gradient(135deg, #0f172a, #1e3a5f);
    padding: 40px 0;
    color: white;
}

.job-detail-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.company-logo-lg {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-lg);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    flex-shrink: 0;
    overflow: hidden;
}

.job-detail-title {
    font-size: clamp(1.25rem, 3vw, 2rem);
    font-weight: 900;
    color: white;
    line-height: 1.3;
    margin-bottom: 8px;
}

.job-detail-company {
    color: rgba(255,255,255,0.8);
    font-size: var(--font-size-base);
    margin-bottom: 14px;
}

/* مشاركة الوظيفة */
.share-section {
    background: white;
    border-radius: var(--radius-xl);
    padding: 20px;
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

.share-title {
    font-weight: 700;
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    margin-bottom: 12px;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: 600;
    transition: var(--transition);
    color: white;
    flex: 1;
    justify-content: center;
    min-width: 100px;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
}

.share-whatsapp { background: #25D366; }
.share-telegram { background: #0088cc; }
.share-twitter  { background: #000000; }
.share-facebook { background: #1877f2; }
.share-linkedin { background: #0077b5; }

.copy-link-btn {
    background: var(--bg-main);
    color: var(--text-primary);
    border: 1.5px solid var(--border);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    justify-content: center;
}

.copy-link-btn:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

.copy-link-btn.copied {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* =====================================================
   نموذج التقديم
   ===================================================== */
.apply-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 28px 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.apply-title {
    font-size: var(--font-size-xl);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.apply-subtitle {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.residency-questions {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border: 1.5px solid #fcd34d;
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 20px;
}

.residency-questions-title {
    font-weight: 700;
    font-size: var(--font-size-sm);
    color: #92400e;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* file upload */
.file-upload {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.file-upload:hover, .file-upload.drag-over {
    border-color: var(--primary);
    background: var(--primary-light);
}

.file-upload input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.file-upload-icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.file-upload-text {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    font-weight: 500;
}

.file-upload-hint {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    margin-top: 4px;
}

/* =====================================================
   الفوتر
   ===================================================== */
.footer {
    background: var(--bg-dark);
    color: white;
    padding: 48px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 36px;
    margin-bottom: 36px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: var(--font-size-xl);
    color: white;
    margin-bottom: 14px;
}

.footer-brand .brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.footer-desc {
    color: rgba(255,255,255,0.6);
    font-size: var(--font-size-sm);
    line-height: 1.7;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 10px;
}

.footer-social a {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary);
    transform: translateY(-3px);
    color: white;
}

.footer-heading {
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: white;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    color: rgba(255,255,255,0.6);
    font-size: var(--font-size-sm);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links a:hover {
    color: white;
    padding-right: 4px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    color: rgba(255,255,255,0.4);
    font-size: var(--font-size-xs);
}

/* =====================================================
   Breadcrumb
   ===================================================== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: var(--font-size-sm);
    color: rgba(255,255,255,0.7);
    margin-bottom: 20px;
}

.breadcrumb a {
    color: rgba(255,255,255,0.7);
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: white;
}

.breadcrumb-sep {
    opacity: 0.5;
    font-size: 12px;
}

/* =====================================================
   Pagination
   ===================================================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 36px;
    flex-wrap: wrap;
}

.page-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-sm);
    font-weight: 600;
    border: 1.5px solid var(--border);
    background: white;
    color: var(--text-secondary);
    transition: var(--transition);
    cursor: pointer;
}

.page-btn:hover, .page-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* =====================================================
   الإشعارات (Toast Notifications)
   ===================================================== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 16px;
    left: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    background: white;
    border-radius: var(--radius-lg);
    padding: 14px 18px;
    box-shadow: var(--shadow-xl);
    border-right: 4px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-primary);
    pointer-events: auto;
    animation: slide-up 0.3s cubic-bezier(0.4,0,0.2,1);
    opacity: 1;
    transition: var(--transition);
}

.toast.success { border-color: var(--accent); }
.toast.error   { border-color: var(--danger); }
.toast.warning { border-color: var(--secondary); }

@keyframes slide-up {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* =====================================================
   Loading Skeleton
   ===================================================== */
.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* =====================================================
   Empty State
   ===================================================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.empty-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-text {
    color: var(--text-secondary);
    font-size: var(--font-size-base);
}

/* =====================================================
   قسم الشهادات (Testimonials)
   ===================================================== */
.testimonials {
    padding: 48px 0;
    background: white;
}

.testimonial-card {
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 24px 20px;
    position: relative;
}

.testimonial-quote {
    font-size: 36px;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 12px;
    font-family: serif;
}

.testimonial-text {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.testimonial-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: var(--font-size-base);
    flex-shrink: 0;
}

.testimonial-name {
    font-weight: 700;
    font-size: var(--font-size-sm);
    color: var(--text-primary);
}

.testimonial-role {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

/* =====================================================
   Responsive - Tablet (768px+)
   ===================================================== */
@media (min-width: 768px) {
    .navbar-nav { display: flex; }
    .hamburger  { display: none; }

    .container { padding: 0 24px; }

    .search-box {
        flex-direction: row;
        padding: 6px 6px 6px 12px;
        align-items: center;
    }

    .search-input-group {
        flex: 1;
        background: transparent;
    }

    .btn-search {
        width: auto;
        white-space: nowrap;
    }

    .countries-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
    }

    .jobs-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .share-buttons {
        flex-wrap: nowrap;
    }

    .share-btn {
        flex: 1;
    }

    .hero-stats {
        gap: 48px;
    }
}

/* =====================================================
   Responsive - Desktop (1024px+)
   ===================================================== */
@media (min-width: 1024px) {
    .container { padding: 0 32px; }
    .section { padding: 72px 0; }

    .hero { padding: 80px 0 100px; }

    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-grid {
        grid-template-columns: 2.5fr 1fr 1fr 1fr;
    }

    .job-detail-layout {
        display: grid;
        grid-template-columns: 1fr 380px;
        gap: 28px;
        align-items: start;
    }
}

/* =====================================================
   Animations
   ===================================================== */
.fade-in {
    animation: fadeIn 0.5s ease-out both;
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out both;
}

.slide-up {
    animation: slideUp 0.4s ease-out both;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes slideInRight {
    from { transform: translateX(20px); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(16px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }

/* =====================================================
   Utilities
   ===================================================== */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-left   { text-align: left; }
.d-none      { display: none !important; }
.d-flex      { display: flex; }
.w-full      { width: 100%; }
.mt-1  { margin-top: 4px; }
.mt-2  { margin-top: 8px; }
.mt-3  { margin-top: 16px; }
.mt-4  { margin-top: 24px; }
.mb-1  { margin-bottom: 4px; }
.mb-2  { margin-bottom: 8px; }
.mb-3  { margin-bottom: 16px; }
.mb-4  { margin-bottom: 24px; }

/* RTL-specific overrides */
[dir="rtl"] select.form-control {
    background-position: left 12px center;
    padding-left: 36px;
    padding-right: 16px;
}
