/*
  مكتب آسيا للخدمات الإلكترونية - تصميم واجهة عامة
  لغة: عربي (RTL)
  ألوان وهوية بسيطة وحديثة
*/

@import url("https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800;900&display=swap");

:root {
  --primary: #0e8b7f; /* deeper teal */
  --primary-600: #0c7f74;
  --primary-700: #0a6a61;
  --accent: #f59e0b;  /* amber-500 */
  --bg: #f8fafc;      /* slate-50 */
  --card: #ffffff;
  --text: #0f172a;    /* slate-900 */
  --muted: #475569;   /* slate-600 */
  --success: #16a34a;
  --danger: #dc2626;
  --radius: 14px;
  --shadow-sm: 0 4px 14px rgba(2, 6, 23, 0.08);
  --shadow-md: 0 12px 30px rgba(2, 6, 23, 0.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Tajawal", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  /* direction is set per [dir] attribute on html */
}

/* اجعل الاتجاه يعتمد على سمة dir في html لضمان LTR للنسخة الإنجليزية */
html[dir="rtl"] body { direction: rtl; }
html[dir="ltr"] body { direction: ltr; }

.container {
  width: min(1200px, 92%);
  margin-inline: auto;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #e2e8f0;
}
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}
.brand svg { width: 40px; height: 40px; }
.brand .titles { line-height: 1.1; }
.brand .title { font-weight: 800; font-size: 1.15rem; }
.brand .subtitle { font-size: 0.8rem; color: var(--muted); }

.nav {
  display: flex;
  gap: clamp(10px, 2vw, 22px);
  align-items: center;
}
.nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  padding: 12px 14px;
  border-radius: 10px;
}
.nav a.active, .nav a:hover { background: #e6fffb; color: var(--primary-700); }

.cta {
  background: linear-gradient(135deg, var(--primary), var(--primary-600));
  color: #fff !important;
  padding: 10px 16px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

/* Hero */
.hero {
  position: relative;
  padding: clamp(40px, 8vw, 90px) 0;
  overflow: hidden;
}
.hero .bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(1200px 600px at 90% -10%, rgba(10,106,97,0.12), transparent 60%),
              radial-gradient(1000px 600px at 10% -10%, rgba(245,158,11,0.10), transparent 60%);
  pointer-events: none;
}
.hero .content {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
}
.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.2;
}
.hero p { color: var(--muted); font-size: clamp(15px, 2vw, 18px); }
.hero .actions { margin-top: 18px; display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px;
  border-radius: 12px; text-decoration: none; font-weight: 700;
  border: 1px solid #e2e8f0; color: var(--text); background: #fff;
}
.btn.primary { background: linear-gradient(135deg, var(--primary), var(--primary-600)); color: #fff; border-color: transparent; }
.btn.accent { background: linear-gradient(135deg, #f59e0b, #f97316); color: #fff; border-color: transparent; }

.illustration {
  background: linear-gradient(180deg, #fff, #f1f5f9);
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--shadow-md);
}
.illustration svg { width: 100%; height: auto; display: block; }

/* Cards */
.section { padding: clamp(36px, 6vw, 70px) 0; }
.section .head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; }
.section h2 { margin: 0; font-size: clamp(22px, 3vw, 32px); }
.section .sub { color: var(--muted); font-size: 0.98rem; }

.grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(12, 1fr);
}
.grid.cards > * { grid-column: span 12;
}
@media (min-width: 640px) {
  .grid.cards > * { grid-column: span 6; }
}
@media (min-width: 992px) {
  .grid.cards > * { grid-column: span 4; }
}

.card {
  background: var(--card);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card .icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--icon-bg, #e6fffb); color: var(--icon-color, var(--primary)); }
.card .icon svg { width: 26px; height: 26px; display: block; fill: currentColor; }
.card h3 { margin: 12px 0 6px; font-size: 1.05rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.badge { display: inline-block; padding: 6px 10px; background: #e6fffb; color: var(--primary); border: 1px solid #b2f5ea; border-radius: 999px; font-weight: 700; font-size: 0.85rem; }

/* Feature list */
.features { display: grid; gap: 10px; }
.features li { list-style: none; display: flex; align-items: center; gap: 10px; }
.features svg { color: var(--success); }

/* Forms */
.form {
  background: var(--card);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.field { margin-bottom: 14px; }
.label { display: block; margin-bottom: 6px; font-weight: 700; }
.input, .select, .textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  font-family: inherit;
}
.textarea { min-height: 120px; resize: vertical; }

/* Footer (aligned with unified teal palette) */
.footer { margin-top: 40px; background: linear-gradient(135deg, var(--primary-700), #0b7c86); color: #eaf8fb; padding: 30px 0; }
.footer .grid { grid-template-columns: repeat(12, 1fr); gap: 20px; }
.footer a { color: #eaf8fb; text-decoration: none; }
.footer small { color: #d3eff4; }

/* Utilities */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 18px; }
.mt-4 { margin-top: 26px; }

/* Responsive tweaks */
@media (max-width: 860px) {
  .hero .content { grid-template-columns: 1fr; }
  .nav { display: none; }
}

/* Floating WhatsApp Button */
.whatsapp-float {
  position: fixed;
  left: 18px;
  bottom: 18px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366; /* WhatsApp green */
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px rgba(0,0,0,0.06), 0 10px 20px rgba(37, 211, 102, 0.35), var(--shadow-sm);
  z-index: 9999;
  text-decoration: none;
  transition: transform .2s ease;
}
.whatsapp-float:hover { transform: translateY(-2px); }
.whatsapp-float svg { display: none !important; width: 0; height: 0; }

/* Floating Directions Button (mobile only) */
.directions-float {
  position: fixed;
  left: 18px;
  bottom: 84px; /* فوق زر الواتساب بمسافة مناسبة */
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #1a73e8; /* Google Maps blue */
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 20px rgba(26, 115, 232, 0.35), var(--shadow-sm);
  z-index: 10000; /* للتأكد من الظهور فوق العناصر الأخرى */
  text-decoration: none;
  transition: transform .2s ease;
}
@media (min-width: 861px) { /* removed: global hide for directions-float; visible by default */ }
.directions-float:hover { transform: translateY(-2px); }
.directions-float svg { width: 28px; height: 28px; display: block; }

/* إظهار الزر على الشاشات الصغيرة فقط */
@media (min-width: 861px) {
  .directions-float { display: none; }
}
.whatsapp-float:hover { transform: translateY(-2px); }
.whatsapp-float svg { width: 28px; height: 28px; display: block; }
/* تحسينات استجابة شاملة للجوال */
@media (max-width: 640px) {
  /* الحاوية والمسافات العلوية */
  .container { width: 94%; }
  .navbar { padding: 10px 0; }
  .brand .title { font-size: 1rem; }
  .brand .subtitle { font-size: 0.72rem; }

  /* بطل الصفحة */
  .hero { padding: 28px 0; }
  .hero .actions { gap: 8px; }
  .hero .actions .btn { flex: 1 1 auto; }

  /* رأس الأقسام: عرض عمودي بدل صف واحد */
  .section .head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .section .sub { font-size: 0.95rem; }

  /* تكديس أي شبكة عامة على عمود واحد وإلغاء span المضمن */
  .grid > * { grid-column: 1 / -1 !important; }
  .footer .grid > * { grid-column: 1 / -1 !important; }

  /* البطاقات وهوامشها */
  .card { padding: 14px; }

  /* الأزرار العائمة مع مراعاة حافة الآيفون */
  .whatsapp-float, .directions-float { left: 14px; right: auto; }
  .whatsapp-float { bottom: calc(14px + env(safe-area-inset-bottom)); }
  .directions-float { bottom: calc(78px + env(safe-area-inset-bottom)); }

  /* زيادة تباعد روابط قسم "روابط سريعة" في الفوتر للجوال فقط */
  .footer .grid > div:nth-child(2) .mt-2 a {
    display: block;
    padding: 10px 0; /* مساحة لمس مريحة */
    line-height: 1.6;
  }
  /* إخفاء فواصل السطر لتجنب مضاعفة المسافات والاكتفاء بالـ padding */
  .footer .grid > div:nth-child(2) .mt-2 a + br { display: none; }
}

/* ضمان الصور تتقلص داخل الحاويات على الشاشات الصغيرة */
img { max-width: 100%; height: auto; }
/* ===== قائمة جانبية للجوال (هامبرغر) ===== */
.nav-toggle { display: none; }

.hamburger {
  display: none;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: var(--text);
  padding: 12px 12px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  align-items: center;
  gap: 8px;
}
.hamburger svg { width: 24px; height: 24px; display: block; }

.mobile-nav {
  position: fixed;
  top: 0; right: 0;
  height: 100dvh; width: min(360px, 78vw);
  background: var(--card);
  border-left: 1px solid #e2e8f0;
  box-shadow: var(--shadow-md);
  transform: translateX(100%);
  transition: transform .25s ease;
  z-index: 10001;
  padding: 16px;
  display: flex; flex-direction: column; gap: 8px;
}
/* نسخة LTR: تُفتح من اليسار وتتموضع يسار الشاشة */
html[dir="ltr"] .mobile-nav {
  left: 0; right: auto;
  border-right: 1px solid #e2e8f0; border-left: none;
  transform: translateX(-100%);
}

.mobile-nav a { padding: 14px 16px; border-radius: 10px; text-decoration: none; color: var(--text); font-weight: 700; margin: 6px 0; }
.mobile-nav a.active, .mobile-nav a:hover { background: #e6fffb; color: var(--primary-700); }

.backdrop {
  position: fixed; inset: 0;
  background: rgba(2,6,23,0.42);
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
  z-index: 10000;
}

/* إظهار عناصر الجوال فقط تحت 860px */
@media (max-width: 860px) {
  .hamburger { display: inline-flex; order: -1; font-size: 0; }
  .navbar { justify-content: flex-start; gap: 10px; }
}

/* تبديل القائمة عند التفعيل */
.nav-toggle:checked ~ .mobile-nav { transform: translateX(0); }
.nav-toggle:checked ~ .backdrop { opacity: 1; pointer-events: auto; }
/* ترتيب الروابط: وضع زر اتصل بنا قبل زر اللغة وجعل زر اللغة آخر عنصر في القوائم */
.nav a.cta { order: 1; }
.nav a.lang { order: 2; }
/* نفس الترتيب لقائمة الجوال (عمودية) */
.mobile-nav a.cta { order: 1; }
.mobile-nav a.lang { order: 2; }

/* Alerts (form feedback) */
.alert {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 12px;
  border: 1px solid transparent;
  font-weight: 600;
}
.alert .icon {
  width: 20px; height: 20px; display: grid; place-items: center;
}
.alert.success { background: #ecfdf5; border-color: #bbf7d0; color: #065f46; }
.alert.error { background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }
.alert.show { display: flex; animation: fadeSlide .25s ease; }
@keyframes fadeSlide { from { opacity: 0; transform: translateY(-4px);} to { opacity: 1; transform: none; } }

/* Invalid fields */
.input.invalid, .select.invalid, .textarea.invalid { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12); }

/* ===== Service Detail Banner (match teal card in image) ===== */
.service-detail-card {
  position: relative;
  border-radius: 18px;
  padding: clamp(18px, 4vw, 28px);
  box-shadow: var(--shadow-md);
  border: none;
  color: #fff;
  background: #19a39d;
  background-image:
    radial-gradient(140px 140px at 20% 25%, rgba(255,255,255,0.10), transparent 60%),
    radial-gradient(160px 160px at 70% 60%, rgba(255,255,255,0.10), transparent 60%),
    radial-gradient(110px 110px at 30% 80%, rgba(255,255,255,0.10), transparent 60%);
  overflow: hidden;
}
.service-detail-card h2 { margin: 0 0 12px; font-size: clamp(24px, 4vw, 34px); }
.service-detail-card p { margin: 0; color: rgba(255,255,255,0.95); font-size: clamp(15px, 2vw, 18px); }
.service-detail-card .actions { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }

/* Teal button to match card style */
.btn.teal { background: linear-gradient(135deg, #0f9f8f, #10b3a1); color: #fff; border-color: transparent; }

/* Uniform teal cards across services (darkened slightly) */
.cards .card { background: #148c86; }
.cards .card h3 { color: #fff; }
.cards .card p { color: rgba(255,255,255,0.95); }
.cards .card .icon {
  background: rgba(255,255,255,0.16);
  color: #fff;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.2);
}

/* Actions inside standard cards */
.cards .card .actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }

/* Removed: orange buttons inside card actions (reverted to teal scheme) */

/* WhatsApp icon visual alignment */
.whatsapp-float svg { width: 26px; height: 26px; }
.whatsapp-float svg path:last-child { fill: #25D366; }

/* Use the official WhatsApp logo via CSS and hide inline SVGs */
.whatsapp-float svg { display: none !important; }
.whatsapp-float::before {
  content: "";
  width: 28px; /* كان 26px: تكبير بسيط لتحسين الوضوح */
  height: 28px;
  display: block;
  background: no-repeat center / contain url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23fff"><path d="M17.472 14.382c-.297-.148-1.758-.867-2.03-.967-.273-.099-.472-.148-.672.15-.198.298-.766.967-.94 1.166-.173.198-.347.223-.644.075-.297-.149-1.255-.463-2.39-1.475-.883-.788-1.48-1.76-1.653-2.057-.173-.298-.018-.459.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.199.05-.373-.025-.521-.075-.149-.672-1.614-.921-2.215-.242-.58-.487-.5-.672-.51l-.571-.01c-.199 0-.52.074-.792.372-.272.298-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.095 3.2 5.076 4.487.709.306 1.262.489 1.694.626.712.226 1.361.194 1.872.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.29.173-1.413-.074-.124-.272-.198-.571-.347zM12.041 2C6.53 2 2 6.533 2 12.047c0 1.992.519 3.935 1.552 5.646L2 22l4.427-1.428c1.652.905 3.512 1.385 5.613 1.385 5.511 0 10.041-4.533 10.041-10.047C22.082 6.533 17.552 2 12.041 2z"/></svg>');
}
.brand-absher .icon { --icon-color: #006C35; --icon-bg: #e8fff2; }
.brand-baladi .icon { --icon-color: #0a7f78; --icon-bg: linear-gradient(90deg, #e9fbf7 50%, #f3fde9 50%); }
.brand-qiwa .icon { --icon-color: #0f2d6f; --icon-bg: linear-gradient(90deg, #e9efff 50%, #dff7ff 50%); }
.brand-zatca .icon { --icon-color: #0b6e4f; --icon-bg: #e9f7f1; }
.brand-gosi .icon { --icon-color: #0b5ea7; --icon-bg: #e7f2ff; }
.brand-chamber .icon { --icon-color: #2563eb; --icon-bg: #eef2ff; }
.brand-establishment .icon { --icon-color: #0ea5a0; --icon-bg: #e6fffb; }
.brand-digital-id .icon { --icon-color: #6d28d9; --icon-bg: #f3e8ff; }
.brand-others .icon { --icon-color: #64748b; --icon-bg: #f1f5f9; }
.brand-health-insurance .icon { --icon-color: #0ea5a0; --icon-bg: #e6fffb; }
.brand-car-insurance .icon { --icon-color: #f59e0b; --icon-bg: #fff7e6; }
.brand-electricity .icon { --icon-color: #004a8f; --icon-bg: #eaf3ff; }
.brand-water .icon { --icon-color: #1e40af; --icon-bg: #eef2ff; }
.brand-citizen .icon { --icon-color: #1d4ed8; --icon-bg: #eef2ff; }
.brand-mudad .icon { --icon-color: #7c3aed; --icon-bg: #f3e8ff; }
.brand-najiz .icon { --icon-color: #16a34a; --icon-bg: #ecfdf5; }
.brand-bank-personal .icon { --icon-color: #0ea5e9; --icon-bg: #e6f6ff; }
.brand-mci .icon { --icon-color: #0f766e; --icon-bg: #e6fffb; }
.card .icon svg { width: 26px; height: 26px; display: block; }
.card h3 { margin: 12px 0 6px; font-size: 1.05rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.badge { display: inline-block; padding: 6px 10px; background: #e6fffb; color: var(--primary); border: 1px solid #b2f5ea; border-radius: 999px; font-weight: 700; font-size: 0.85rem; }

/* Feature list */
.features { display: grid; gap: 10px; }
.features li { list-style: none; display: flex; align-items: center; gap: 10px; }
.features svg { color: var(--success); }

/* Forms */
.form {
  background: var(--card);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.field { margin-bottom: 14px; }
.label { display: block; margin-bottom: 6px; font-weight: 700; }
.input, .select, .textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  font-family: inherit;
}
.textarea { min-height: 120px; resize: vertical; }

/* Footer (aligned with unified teal palette) */
.footer { margin-top: 40px; background: linear-gradient(135deg, var(--primary-700), #0b7c86); color: #eaf8fb; padding: 30px 0; }
.footer .grid { grid-template-columns: repeat(12, 1fr); gap: 20px; }
.footer a { color: #eaf8fb; text-decoration: none; }
.footer small { color: #d3eff4; }

/* Utilities */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 18px; }
.mt-4 { margin-top: 26px; }

/* Responsive tweaks */
@media (max-width: 860px) {
  .hero .content { grid-template-columns: 1fr; }
  .nav { display: none; }
}

/* Floating WhatsApp Button */
.whatsapp-float {
  position: fixed;
  left: 18px;
  bottom: 18px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366; /* WhatsApp green */
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 20px rgba(37, 211, 102, 0.35), var(--shadow-sm);
  z-index: 9999;
  text-decoration: none;
  transition: transform .2s ease;
}
.whatsapp-float:hover { transform: translateY(-2px); }
.whatsapp-float svg { width: 28px; height: 28px; display: block; }

/* Floating Directions Button (mobile only) */
.directions-float {
  position: fixed;
  left: 18px;
  bottom: 84px; /* فوق زر الواتساب بمسافة مناسبة */
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #1a73e8; /* Google Maps blue */
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 20px rgba(26, 115, 232, 0.35), var(--shadow-sm);
  z-index: 10000; /* للتأكد من الظهور فوق العناصر الأخرى */
  text-decoration: none;
  transition: transform .2s ease;
}
@media (min-width: 861px) { /* removed: global hide for directions-float; visible by default */ }
.directions-float:hover { transform: translateY(-2px); }
.directions-float svg { width: 28px; height: 28px; display: block; }

/* Gov services: enforce brand icon colors within #platforms */
#platforms .cards .card .icon { background: var(--icon-bg, #e6fffb); color: var(--icon-color, var(--primary)); box-shadow: var(--shadow-sm); }
#platforms .cards .card .icon svg { fill: currentColor; }

/* تكرار تعريف الشارة لضمان تناسق التباين العالي أينما ظهرت */
.badge { display: inline-block; padding: 8px 12px; background: #e6fffb; color: var(--text); border: 1px solid #a5e9df; border-radius: 999px; font-weight: 800; font-size: 0.9rem; }
.mobile-nav { padding: 14px 16px; border-radius: 10px; text-decoration: none; color: var(--text); font-weight: 700; min-height: 48px; margin: 6px 0; }
.mobile-nav a.active, .mobile-nav a:hover { background: #e6fffb; color: var(--primary-700); }

.backdrop {
  position: fixed; inset: 0;
  background: rgba(2,6,23,0.42);
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
  z-index: 10000;
}

/* إظهار عناصر الجوال فقط تحت 860px */
@media (max-width: 860px) {
  .hamburger { display: inline-flex; order: -1; font-size: 0; }
  .navbar { justify-content: flex-start; gap: 10px; }
}

/* تبديل القائمة عند التفعيل */
.nav-toggle:checked ~ .mobile-nav { transform: translateX(0); }
.nav-toggle:checked ~ .backdrop { opacity: 1; pointer-events: auto; }
/* ترتيب الروابط: وضع زر اتصل بنا قبل زر اللغة وجعل زر اللغة آخر عنصر في القوائم */
.nav a.cta { order: 1; }
.nav a.lang { order: 2; }
/* نفس الترتيب لقائمة الجوال (عمودية) */
.mobile-nav a.cta { order: 1; }
.mobile-nav a.lang { order: 2; }

/* Alerts (form feedback) */
.alert {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 12px;
  border: 1px solid transparent;
  font-weight: 600;
}
.alert .icon {
  width: 20px; height: 20px; display: grid; place-items: center;
}
.alert.success { background: #ecfdf5; border-color: #bbf7d0; color: #065f46; }
.alert.error { background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }
.alert.show { display: flex; animation: fadeSlide .25s ease; }
@keyframes fadeSlide { from { opacity: 0; transform: translateY(-4px);} to { opacity: 1; transform: none; } }

/* Invalid fields */
.input.invalid, .select.invalid, .textarea.invalid { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12); }

/* ===== Service Detail Banner (match teal card in image) ===== */
.service-detail-card {
  position: relative;
  border-radius: 18px;
  padding: clamp(18px, 4vw, 28px);
  box-shadow: var(--shadow-md);
  border: none;
  color: #fff;
  background: #19a39d;
  background-image:
    radial-gradient(140px 140px at 20% 25%, rgba(255,255,255,0.10), transparent 60%),
    radial-gradient(160px 160px at 70% 60%, rgba(255,255,255,0.10), transparent 60%),
    radial-gradient(110px 110px at 30% 80%, rgba(255,255,255,0.10), transparent 60%);
  overflow: hidden;
}
.service-detail-card h2 { margin: 0 0 12px; font-size: clamp(24px, 4vw, 34px); }
.service-detail-card p { margin: 0; color: rgba(255,255,255,0.95); font-size: clamp(15px, 2vw, 18px); }
.service-detail-card .actions { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }

/* Teal button to match card style */
.btn.teal { background: linear-gradient(135deg, #0f9f8f, #10b3a1); color: #fff; border-color: transparent; }

/* Uniform teal cards across services (darkened slightly) */
.cards .card { background: #148c86; }
.cards .card h3 { color: #fff; }
.cards .card p { color: rgba(255,255,255,0.95); }
.cards .card .icon {
  background: rgba(255,255,255,0.16);
  color: #fff;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.2);
}

/* Actions inside standard cards */
.cards .card .actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }

/* Removed: orange buttons inside card actions (reverted to teal scheme) */

/* WhatsApp icon visual alignment */
.whatsapp-float svg { width: 26px; height: 26px; }
.whatsapp-float svg path:last-child { fill: #25D366; }

/* Use the official WhatsApp logo via CSS and hide inline SVGs */
.whatsapp-float svg { display: none !important; }
.whatsapp-float::before {
  content: "";
  width: 28px; /* كان 26px: تكبير بسيط لتحسين الوضوح */
  height: 28px;
  display: block;
  background: no-repeat center / contain url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23fff"><path d="M17.472 14.382c-.297-.148-1.758-.867-2.03-.967-.273-.099-.472-.148-.672.15-.198.298-.766.967-.94 1.166-.173.198-.347.223-.644.075-.297-.149-1.255-.463-2.39-1.475-.883-.788-1.48-1.76-1.653-2.057-.173-.298-.018-.459.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.199.05-.373-.025-.521-.075-.149-.672-1.614-.921-2.215-.242-.58-.487-.5-.672-.51l-.571-.01c-.199 0-.52.074-.792.372-.272.298-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.095 3.2 5.076 4.487.709.306 1.262.489 1.694.626.712.226 1.361.194 1.872.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.29.173-1.413-.074-.124-.272-.198-.571-.347zM12.041 2C6.53 2 2 6.533 2 12.047c0 1.992.519 3.935 1.552 5.646L2 22l4.427-1.428c1.652.905 3.512 1.385 5.613 1.385 5.511 0 10.041-4.533 10.041-10.047C22.082 6.533 17.552 2 12.041 2z"/></svg>');
}
.brand-absher .icon { --icon-color: #006C35; --icon-bg: #e8fff2; }
.brand-baladi .icon { --icon-color: #0a7f78; --icon-bg: linear-gradient(90deg, #e9fbf7 50%, #f3fde9 50%); }
.brand-qiwa .icon { --icon-color: #0f2d6f; --icon-bg: linear-gradient(90deg, #e9efff 50%, #dff7ff 50%); }
.brand-zatca .icon { --icon-color: #0b6e4f; --icon-bg: #e9f7f1; }
.brand-gosi .icon { --icon-color: #0b5ea7; --icon-bg: #e7f2ff; }
.brand-chamber .icon { --icon-color: #2563eb; --icon-bg: #eef2ff; }
.brand-establishment .icon { --icon-color: #0ea5a0; --icon-bg: #e6fffb; }
.brand-digital-id .icon { --icon-color: #6d28d9; --icon-bg: #f3e8ff; }
.brand-others .icon { --icon-color: #64748b; --icon-bg: #f1f5f9; }
.brand-health-insurance .icon { --icon-color: #0ea5a0; --icon-bg: #e6fffb; }
.brand-car-insurance .icon { --icon-color: #f59e0b; --icon-bg: #fff7e6; }
.brand-electricity .icon { --icon-color: #004a8f; --icon-bg: #eaf3ff; }
.brand-water .icon { --icon-color: #1e40af; --icon-bg: #eef2ff; }
.brand-citizen .icon { --icon-color: #1d4ed8; --icon-bg: #eef2ff; }
.brand-mudad .icon { --icon-color: #7c3aed; --icon-bg: #f3e8ff; }
.brand-najiz .icon { --icon-color: #16a34a; --icon-bg: #ecfdf5; }
.brand-bank-personal .icon { --icon-color: #0ea5e9; --icon-bg: #e6f6ff; }
.brand-mci .icon { --icon-color: #0f766e; --icon-bg: #e6fffb; }
.card .icon svg { width: 26px; height: 26px; display: block; }
.card h3 { margin: 12px 0 6px; font-size: 1.05rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.badge { display: inline-block; padding: 6px 10px; background: #e6fffb; color: var(--primary); border: 1px solid #b2f5ea; border-radius: 999px; font-weight: 700; font-size: 0.85rem; }

/* Feature list */
.features { display: grid; gap: 10px; }
.features li { list-style: none; display: flex; align-items: center; gap: 10px; }
.features svg { color: var(--success); }

/* Forms */
.form {
  background: var(--card);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.field { margin-bottom: 14px; }
.label { display: block; margin-bottom: 6px; font-weight: 700; }
.input, .select, .textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  font-family: inherit;
}
.textarea { min-height: 120px; resize: vertical; }

/* Footer (aligned with unified teal palette) */
.footer { margin-top: 40px; background: linear-gradient(135deg, var(--primary-700), #0b7c86); color: #eaf8fb; padding: 30px 0; }
.footer .grid { grid-template-columns: repeat(12, 1fr); gap: 20px; }
.footer a { color: #eaf8fb; text-decoration: none; }
.footer small { color: #d3eff4; }

/* Utilities */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 18px; }
.mt-4 { margin-top: 26px; }

/* Responsive tweaks */
@media (max-width: 860px) {
  .hero .content { grid-template-columns: 1fr; }
  .nav { display: none; }
}

/* Floating WhatsApp Button */
.whatsapp-float {
  position: fixed;
  left: 18px;
  bottom: 18px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366; /* WhatsApp green */
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 20px rgba(37, 211, 102, 0.35), var(--shadow-sm);
  z-index: 9999;
  text-decoration: none;
  transition: transform .2s ease;
}
.whatsapp-float:hover { transform: translateY(-2px); }
.whatsapp-float svg { width: 28px; height: 28px; display: block; }

/* Floating Directions Button (mobile only) */
.directions-float {
  position: fixed;
  left: 18px;
  bottom: 84px; /* فوق زر الواتساب بمسافة مناسبة */
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #1a73e8; /* Google Maps blue */
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 20px rgba(26, 115, 232, 0.35), var(--shadow-sm);
  z-index: 10000; /* للتأكد من الظهور فوق العناصر الأخرى */
  text-decoration: none;
  transition: transform .2s ease;
}
@media (min-width: 861px) { /* removed: global hide for directions-float; visible by default */ }
.directions-float:hover { transform: translateY(-2px); }
.directions-float svg { width: 28px; height: 28px; display: block; }

/* Gov services: enforce brand icon colors within #platforms */
#platforms .cards .card .icon { background: var(--icon-bg, #e6fffb); color: var(--icon-color, var(--primary)); box-shadow: var(--shadow-sm); }
#platforms .cards .card .icon svg { fill: currentColor; }

/* تكرار تعريف الشارة لضمان تناسق التباين العالي أينما ظهرت */
.badge { display: inline-block; padding: 8px 12px; background: #e6fffb; color: var(--text); border: 1px solid #a5e9df; border-radius: 999px; font-weight: 800; font-size: 0.9rem; }
.mobile-nav { padding: 14px 16px; border-radius: 10px; text-decoration: none; color: var(--text); font-weight: 700; min-height: 48px; margin: 6px 0; }
.mobile-nav a.active, .mobile-nav a:hover { background: #e6fffb; color: var(--primary-700); }

.backdrop {
  position: fixed; inset: 0;
  background: rgba(2,6,23,0.42);
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
  z-index: 10000;
}

/* إظهار عناصر الجوال فقط تحت 860px */
@media (max-width: 860px) {
  .hamburger { display: inline-flex; order: -1; font-size: 0; }
  .navbar { justify-content: flex-start; gap: 10px; }
}

/* تبديل القائمة عند التفعيل */
.nav-toggle:checked ~ .mobile-nav { transform: translateX(0); }
.nav-toggle:checked ~ .backdrop { opacity: 1; pointer-events: auto; }
/* ترتيب الروابط: وضع زر اتصل بنا قبل زر اللغة وجعل زر اللغة آخر عنصر في القوائم */
.nav a.cta { order: 1; }
.nav a.lang { order: 2; }
/* نفس الترتيب لقائمة الجوال (عمودية) */
.mobile-nav a.cta { order: 1; }
.mobile-nav a.lang { order: 2; }

/* Alerts (form feedback) */
.alert {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 12px;
  border: 1px solid transparent;
  font-weight: 600;
}
.alert .icon {
  width: 20px; height: 20px; display: grid; place-items: center;
}
.alert.success { background: #ecfdf5; border-color: #bbf7d0; color: #065f46; }
.alert.error { background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }
.alert.show { display: flex; animation: fadeSlide .25s ease; }
@keyframes fadeSlide { from { opacity: 0; transform: translateY(-4px);} to { opacity: 1; transform: none; } }

/* Invalid fields */
.input.invalid, .select.invalid, .textarea.invalid { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12); }

/* ===== Service Detail Banner (match teal card in image) ===== */
.service-detail-card {
  position: relative;
  border-radius: 18px;
  padding: clamp(18px, 4vw, 28px);
  box-shadow: var(--shadow-md);
  border: none;
  color: #fff;
  background: #19a39d;
  background-image:
    radial-gradient(140px 140px at 20% 25%, rgba(255,255,255,0.10), transparent 60%),
    radial-gradient(160px 160px at 70% 60%, rgba(255,255,255,0.10), transparent 60%),
    radial-gradient(110px 110px at 30% 80%, rgba(255,255,255,0.10), transparent 60%);
  overflow: hidden;
}
.service-detail-card h2 { margin: 0 0 12px; font-size: clamp(24px, 4vw, 34px); }
.service-detail-card p { margin: 0; color: rgba(255,255,255,0.95); font-size: clamp(15px, 2vw, 18px); }
.service-detail-card .actions { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }

/* Teal button to match card style */
.btn.teal { background: linear-gradient(135deg, #0f9f8f, #10b3a1); color: #fff; border-color: transparent; }

/* Uniform teal cards across services (darkened slightly) */
.cards .card { background: #148c86; }
.cards .card h3 { color: #fff; }
.cards .card p { color: rgba(255,255,255,0.95); }
.cards .card .icon {
  background: rgba(255,255,255,0.16);
  color: #fff;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.2);
}

/* Actions inside standard cards */
.cards .card .actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }

/* Removed: orange buttons inside card actions (reverted to teal scheme) */

/* WhatsApp icon visual alignment */
.whatsapp-float svg { width: 26px; height: 26px; }
.whatsapp-float svg path:last-child { fill: #25D366; }

/* Use the official WhatsApp logo via CSS and hide inline SVGs */
.whatsapp-float svg { display: none !important; }
.whatsapp-float::before {
  content: "";
  width: 28px; /* كان 26px: تكبير بسيط لتحسين الوضوح */
  height: 28px;
  display: block;
  background: no-repeat center / contain url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23fff"><path d="M17.472 14.382c-.297-.148-1.758-.867-2.03-.967-.273-.099-.472-.148-.672.15-.198.298-.766.967-.94 1.166-.173.198-.347.223-.644.075-.297-.149-1.255-.463-2.39-1.475-.883-.788-1.48-1.76-1.653-2.057-.173-.298-.018-.459.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.199.05-.373-.025-.521-.075-.149-.672-1.614-.921-2.215-.242-.58-.487-.5-.672-.51l-.571-.01c-.199 0-.52.074-.792.372-.272.298-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.095 3.2 5.076 4.487.709.306 1.262.489 1.694.626.712.226 1.361.194 1.872.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.29.173-1.413-.074-.124-.272-.198-.571-.347zM12.041 2C6.53 2 2 6.533 2 12.047c0 1.992.519 3.935 1.552 5.646L2 22l4.427-1.428c1.652.905 3.512 1.385 5.613 1.385 5.511 0 10.041-4.533 10.041-10.047C22.082 6.533 17.552 2 12.041 2z"/></svg>');
}
.brand-absher .icon { --icon-color: #006C35; --icon-bg: #e8fff2; }
.brand-baladi .icon { --icon-color: #0a7f78; --icon-bg: linear-gradient(90deg, #e9fbf7 50%, #f3fde9 50%); }
.brand-qiwa .icon { --icon-color: #0f2d6f; --icon-bg: linear-gradient(90deg, #e9efff 50%, #dff7ff 50%); }
.brand-zatca .icon { --icon-color: #0b6e4f; --icon-bg: #e9f7f1; }
.brand-gosi .icon { --icon-color: #0b5ea7; --icon-bg: #e7f2ff; }
.brand-chamber .icon { --icon-color: #2563eb; --icon-bg: #eef2ff; }
.brand-establishment .icon { --icon-color: #0ea5a0; --icon-bg: #e6fffb; }
.brand-digital-id .icon { --icon-color: #6d28d9; --icon-bg: #f3e8ff; }
.brand-others .icon { --icon-color: #64748b; --icon-bg: #f1f5f9; }
.brand-health-insurance .icon { --icon-color: #0ea5a0; --icon-bg: #e6fffb; }
.brand-car-insurance .icon { --icon-color: #f59e0b; --icon-bg: #fff7e6; }
.brand-electricity .icon { --icon-color: #004a8f; --icon-bg: #eaf3ff; }
.brand-water .icon { --icon-color: #1e40af; --icon-bg: #eef2ff; }
.brand-citizen .icon { --icon-color: #1d4ed8; --icon-bg: #eef2ff; }
.brand-mudad .icon { --icon-color: #7c3aed; --icon-bg: #f3e8ff; }
.brand-najiz .icon { --icon-color: #16a34a; --icon-bg: #ecfdf5; }
.brand-bank-personal .icon { --icon-color: #0ea5e9; --icon-bg: #e6f6ff; }
.brand-mci .icon { --icon-color: #0f766e; --icon-bg: #e6fffb; }
.card .icon svg { width: 26px; height: 26px; display: block; }
.card h3 { margin: 12px 0 6px; font-size: 1.05rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.badge { display: inline-block; padding: 6px 10px; background: #e6fffb; color: var(--primary); border: 1px solid #b2f5ea; border-radius: 999px; font-weight: 700; font-size: 0.85rem; }

/* Feature list */
.features { display: grid; gap: 10px; }
.features li { list-style: none; display: flex; align-items: center; gap: 10px; }
.features svg { color: var(--success); }

/* Forms */
.form {
  background: var(--card);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.field { margin-bottom: 14px; }
.label { display: block; margin-bottom: 6px; font-weight: 700; }
.input, .select, .textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  font-family: inherit;
}
.textarea { min-height: 120px; resize: vertical; }

/* Footer (aligned with unified teal palette) */
.footer { margin-top: 40px; background: linear-gradient(135deg, var(--primary-700), #0b7c86); color: #eaf8fb; padding: 30px 0; }
.footer .grid { grid-template-columns: repeat(12, 1fr); gap: 20px; }
.footer a { color: #eaf8fb; text-decoration: none; }
.footer small { color: #d3eff4; }

/* Utilities */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 18px; }
.mt-4 { margin-top: 26px; }

/* Responsive tweaks */
@media (max-width: 860px) {
  .hero .content { grid-template-columns: 1fr; }
  .nav { display: none; }
}

/* Floating WhatsApp Button */
.whatsapp-float {
  position: fixed;
  left: 18px;
  bottom: 18px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366; /* WhatsApp green */
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px rgba(0,0,0,0.06), 0 10px 20px rgba(37, 211, 102, 0.35), var(--shadow-sm);

  z-index: 9999;
  text-decoration: none;
  transition: transform .2s ease;
}
.whatsapp-float:hover { transform: translateY(-2px); }
.whatsapp-float svg { display: none !important; width: 0; height: 0; }

/* Floating Directions Button (mobile only) */
.directions-float {
  position: fixed;
  left: 18px;
  bottom: 84px; /* فوق زر الواتساب بمسافة مناسبة */
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #1a73e8; /* Google Maps blue */
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 20px rgba(26, 115, 232, 0.35), var(--shadow-sm);
  z-index: 9999;
  text-decoration: none;
  transition: transform .2s ease;
}
.directions-float:hover { transform: translateY(-2px); }
.directions-float svg { width: 28px; height: 28px; display: block; }