/* ===== المتغيرات العامة ===== */
:root {
    --brand-primary: #4BA3C7;
    --primary-dark: #3a8bb0;
    --brand-primary-light: #e6f3f9;
    --text: #333;
    --bg-light: #f9f9f9;
}

/* ===== إعادة التعيين ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    line-height: 1.6;
}

html[dir="rtl"] body {
    font-family: 'Cairo', sans-serif;
}

html[dir="rtl"] button {
    font-family: 'Cairo', sans-serif;
}

html[dir="rtl"] ::placeholder {
    font-family: 'Cairo', sans-serif;
}

/* ===== الحاوية ===== */
.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container { max-width: 640px; }
}
@media (min-width: 768px) {
    .container { max-width: 768px; }
}
@media (min-width: 1024px) {
    .container { max-width: 1024px; }
}
@media (min-width: 1280px) {
    .container { max-width: 1280px; }
}

/* ===== الهوامش والحشو ===== */
.mx-auto { margin-left: auto; margin-right: auto; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.p-8 { padding: 2rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.pt-8 { padding-top: 2rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-16 { margin-bottom: 4rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-6 { margin-top: 1.5rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.mb-3 { margin-bottom: 0.75rem; }

/* ===== المرونة ===== */
.flex { display: flex; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-col { flex-direction: column; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-8 { gap: 2rem; }
.whitespace-nowrap { white-space: nowrap; }

/* ===== الشبكة ===== */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.gap-8 { gap: 2rem; }
@media (min-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ===== الموضع ===== */
.relative { position: relative; }
.absolute { position: absolute; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.z-10 { z-index: 10; }
.-z-10 { z-index: -10; }
.left-1\/2 { left: 50%; }
.right-1\/2 { right: 50%; }
.top-0 { top: 0; }
.top-8 { top: 2rem; }
.-translate-x-1\/2 { transform: translateX(-50%); }
.-translate-y-1 { transform: translateY(-0.25rem); }

/* ===== الأبعاد ===== */
.min-h-screen { min-height: 100vh; }
.w-full { width: 100%; }
.w-auto { width: auto; }
.w-14 { width: 3.5rem; }
.h-14 { height: 3.5rem; }
.w-16 { width: 4rem; }
.h-16 { height: 4rem; }
.h-32 { height: 8rem; }
.h-12 { height: 3rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }
@media (min-width: 768px) {
    .md\:h-40 { height: 10rem; }
}

/* ===== الخلفيات ===== */
.bg-white { background-color: #fff; }
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-900 { background-color: #111827; }
.bg-gradient-to-br { background-image: linear-gradient(to bottom right, var(--tw-gradient-from), var(--tw-gradient-to)); }
.bg-gradient-to-b { background-image: linear-gradient(to bottom, var(--tw-gradient-stops)); }
.from-cyan-50 { --tw-gradient-from: #ecfeff; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(236, 254, 255, 0)); }
.to-sky-100 { --tw-gradient-to: #e0f2fe; }
.from-gray-50 { --tw-gradient-from: #f9fafb; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(249, 250, 251, 0)); }
.to-white { --tw-gradient-to: #fff; }

/* ===== الحدود ===== */
.border { border-width: 1px; }
.border-2 { border-width: 2px; }
.border-t { border-top-width: 1px; }
.border-gray-200 { border-color: #e5e7eb; }
.border-gray-800 { border-color: #1f2937; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-full { border-radius: 9999px; }

/* ===== الظلال ===== */
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04); }
.hover\:shadow-xl:hover { box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04); }

/* ===== النصوص ===== */
.text-center { text-align: center; }
.text-white { color: #fff; }
.text-white\/90 { color: rgba(255, 255, 255, 0.9); }
.text-white\/80 { color: rgba(255, 255, 255, 0.8); }
.text-gray-900 { color: #111827; }
.text-gray-700 { color: #374151; }
.text-gray-600 { color: #4B5563; }
.text-gray-400 { color: #9ca3af; }
.text-gray-300 { color: #d1d5db; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.leading-relaxed { line-height: 1.625; }

@media (min-width: 768px) {
    .md\:text-5xl { font-size: 3rem; line-height: 1; }
    .md\:text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
    .md\:text-xl { font-size: 1.25rem; line-height: 1.75rem; }
}

/* ===== التجاوب مع الاتجاه ===== */
.sm\:flex-row { flex-direction: row; }
.sm\:flex-row-reverse { flex-direction: row-reverse; }
.rotate-180 { transform: rotate(180deg); }

/* ===== تأثيرات ===== */
.opacity-10 { opacity: 0.1; }
.object-cover { object-fit: cover; }
.overflow-hidden { overflow: hidden; }
.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-colors { transition-property: background-color, border-color, color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.duration-300 { transition-duration: 300ms; }
.hover\:text-white:hover { color: #fff; }
.hover\:text-blue:hover { color: #3a8bb0; }
.focus\:outline-none:focus { outline: 2px solid transparent; outline-offset: 2px; }
.focus\:ring-4:focus { box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3); }
.last\:hidden:last-child { display: none; }

/* ===== الهيدر ===== */
.header {
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}
.logo img { height: 50px; }
.nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}
.nav a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
}
.nav a:hover { color: var(--brand-primary); }
.language-switcher a {
    background: var(--brand-primary);
    color: white;
    padding: 8px 16px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s;
}
.language-switcher a:hover { background: var(--primary-dark); }

/* ===== أزرار مخصصة ===== */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}
.btn-primary {
    background: white;
    color: var(--brand-primary);
}
.btn-primary:hover { background: #f0f0f0; }
.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}
.btn-secondary:hover {
    background: white;
    color: var(--brand-primary);
}

/* ===== الهيرو ===== */
.hero h1 { font-size: 3rem; margin-bottom: 20px; }
.hero p { font-size: 1.2rem; max-width: 600px; margin: 0 auto 30px; }
.hero-buttons { display: flex; gap: 20px; justify-content: center; }
.hero-background {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}
.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* ===== الميزات ===== */
.features .feature-card {
    background: white;
    padding: 2rem;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    transition: all 0.3s;
}
.features .feature-card:hover {
    border-color: var(--brand-primary);
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}
.features .feature-card h3 {
    color: var(--brand-primary);
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
}
.w-14.h-14.rounded-lg {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--brand-primary-light);
}
.w-14.h-14.rounded-lg svg {
    width: 28px;
    height: 28px;
    color: var(--brand-primary);
}

/* ===== كيف يعمل ===== */
.w-16.h-16.rounded-full {
    width: 4rem;
    height: 4rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--brand-primary);
}
.w-16.h-16.rounded-full svg {
    width: 32px;
    height: 32px;
    color: white;
}
.how-it-works .step-number {
    display: inline-block;
    width: 60px;
    height: 60px;
    background: var(--brand-primary);
    color: white;
    border-radius: 50%;
    line-height: 60px;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 20px;
}

/* الخط الفاصل بين الخطوات - يتم التحكم باتجاهه عبر RTL */
.absolute.top-8.right-1\/2 {
    right: 50%;
}
html[dir="rtl"] .absolute.top-8.right-1\/2 {
    right: auto;
    left: 50%;
}

/* ===== CTA ===== */
.cta input {
    padding: 12px 20px;
    width: 100%;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
}
.cta input:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(255,255,255,0.3);
}
.cta button {
    background: white;
    color: var(--brand-primary);
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}
.cta button:hover { background: #f0f0f0; }
@media (min-width: 640px) {
    .cta input.sm\:w-96 { width: 24rem; }
}

/* ===== الفوتر ===== */
.footer-logo img {
    height: 40px;
    margin-bottom: 20px;
    filter: brightness(0) invert(1);
}
.footer-contact h4 {
    margin-bottom: 10px;
    color: var(--brand-primary);
}
.footer-copyright {
    margin-top: 30px;
    opacity: 0.8;
}

a {
    text-decoration: none !important;
}

/* ===== أدوات مساعدة إضافية ===== */
.border-brand-primary { border-color: var(--brand-primary); }
.hover\:border-brand-primary:hover { border-color: var(--brand-primary); }
.text-brand-primary { color: var(--brand-primary); }
.bg-brand-primary-light { background-color: var(--brand-primary-light); }


/* ===== زر تبديل اللغة ===== */
.fixed { position: fixed; }
.top-6 { top: 1.5rem; }
.z-50 { z-index: 50; }
.bg-white { background-color: #ffffff; }
.hover\:bg-gray-50:hover { background-color: #f9fafb; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.rounded-lg { border-radius: 0.5rem; }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }
.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: 0.5rem; }
.border { border-width: 1px; border-style: solid; }
.left-6 { left: 1.5rem; }
.right-6 { right: 1.5rem; }
.font-semibold { font-weight: 600; }



