:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --muted: #6b7280;
  --primary: #0ea5e9; /* sky-500 */
  --primary-700: #0369a1;
  --accent: #14b8a6;  /* teal-500 */
  --surface: #f8fafc;
  --border: #e5e7eb;
  --shadow: 0 10px 25px rgba(0,0,0,0.08);
  --radius: 14px;
  --transition: 280ms cubic-bezier(.2,.8,.2,1);
}

/* Dark theme variables will be in dark.css */
html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', Inter, system-ui, sans-serif;
}

html[lang="ar"],
html[dir="rtl"] {
  font-family: 'Cairo', system-ui, sans-serif;
}

html[dir="rtl"] {
  direction: rtl;
}

html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3 {
  font-weight: 700;
}


img { max-width: 100%; height: auto; display: block; }
a { color: var(--text); text-decoration: none; }
ul { list-style: none; padding: 0; margin: 0; }
.center { text-align: center; }

.header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.logo img { width: 28px; height: 28px; }
.nav ul { display: flex; gap: 18px; }
.nav a { padding: 8px 10px; border-radius: 8px; transition: background var(--transition), color var(--transition); }
.nav a:hover { background: var(--surface); }
.nav .active a, .nav a.active { color: var(--primary); }
.header-actions { display: flex; align-items: center; gap: 10px; }

.lang-switch, .theme-toggle {
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  padding: 6px 10px; border-radius: 10px; cursor: pointer; transition: transform var(--transition);
}
.lang-switch:hover, .theme-toggle:hover { transform: translateY(-2px); }

/* Burger-tooth animation */
.burger {
  position: relative; width: 44px; height: 44px; border: none; background: transparent; cursor: pointer;
  display: grid; place-items: center;
}
.burger .line {
  position: absolute; width: 24px; height: 3px; background: var(--text); border-radius: 3px; transition: all var(--transition);
}
.line1 { top: 14px; }
.line2 { top: 21px; }
.line3 { top: 28px; }
.burger .tooth {
  position: absolute; width: 0; height: 0; opacity: 0; transition: all 380ms cubic-bezier(.2,.8,.2,1);
  /* stylized tooth: a rounded drop with notch */
  border-radius: 12px 12px 18px 18px;
  background: var(--primary);
  transform: translateY(8px) scale(0.6);
}
.burger.active .line1 { transform: translateY(7px) rotate(45deg); }
.burger.active .line3 { transform: translateY(-7px) rotate(-45deg); }
.burger.active .line2 { opacity: 0; }
.burger.active .tooth {
  width: 18px; height: 22px; opacity: 1;
  box-shadow: inset 0 -6px 0 0 var(--bg), var(--shadow);
}
/* Tooth notch */
.burger.active .tooth::after {
  content: ""; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 8px; height: 6px; background: var(--bg); border-radius: 0 0 8px 8px;
}

.hero {
  display: grid; grid-template-columns: 1.25fr 1fr; gap: 24px; align-items: center;
  padding: 32px 20px; max-width: 1200px; margin: 0 auto;
}
.hero-content h1 { font-size: 2.2rem; line-height: 1.2; margin-bottom: 10px; }
.hero-content p { color: var(--muted); margin-bottom: 18px; }
.hero-image img { border-radius: var(--radius); box-shadow: var(--shadow); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 14px; border-radius: 12px; border: 1px solid var(--border); transition: all var(--transition);
}
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-700); }
.btn-outline { background: transparent; color: var(--text); }
.btn-outline:hover { background: var(--surface); }
.btn-link { color: var(--primary); border: none; background: transparent; padding: 0; }

.section { padding: 28px 20px; max-width: 1200px; margin: 0 auto; }
.section.alt { background: var(--surface); }
.section-header { margin-bottom: 16px; }
.section-header h2 { font-size: 1.6rem; }
.section-header p { color: var(--muted); }

.cards { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,0.12); }
.rounded { border-radius: var(--radius); }
.shadow { box-shadow: var(--shadow); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }

.page-header { padding: 24px 20px; max-width: 1200px; margin: 0 auto; }
.page-header h1 { font-size: 1.8rem; margin-bottom: 8px; }
.page-header p { color: var(--muted); }

.filters { display: flex; gap: 10px; margin-bottom: 12px; }
.filters input, .filters select, .form input, .form select, .form textarea {
  width: 100%; padding: 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text);
}
.form-group { margin-bottom: 12px; }
.form-actions { display: flex; align-items: center; gap: 10px; }
.form-msg { color: var(--accent); }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { border-bottom: 1px solid var(--border); padding: 10px; text-align: left; }

.faq { display: grid; gap: 10px; max-width: 900px; margin: 0 auto; }
.faq-item { border: 1px solid var(--border); border-radius: 12px; background: var(--bg); overflow: hidden; }
.faq-q { width: 100%; text-align: left; padding: 12px 14px; background: transparent; border: none; font-weight: 600; cursor: pointer; }
.faq-a { padding: 0 14px 14px; color: var(--muted); display: none; }
.faq-item.open .faq-a { display: block; animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

.cta { padding: 24px 20px; text-align: center; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; }
.cta .btn { border-color: rgba(255,255,255,0.5); }

.footer { padding: 20px; border-top: 1px solid var(--border); background: var(--bg); }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; max-width: 1200px; margin: 0 auto 12px; }
.footer-bottom { display: flex; gap: 12px; align-items: center; justify-content: center; color: var(--muted); }
.foot-link { color: var(--muted); }

.map { width: 100%; height: 220px; border: 0; border-radius: 12px; }

/* Responsive */
@media (max-width: 992px) {
  .hero { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav { position: fixed; inset: 64px 12px auto 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 12px;
         padding: 12px; box-shadow: var(--shadow); transform: translateY(-20px); opacity: 0; pointer-events: none; transition: all var(--transition); }
  .nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav ul { flex-direction: column; gap: 8px; }
  .grid-3 { grid-template-columns: 1fr; }
}
.card img,
.doctor-card img {
  width: 100%;
  height: 250px;      /* نفس الارتفاع لكل الصور */
  object-fit: cover; /* قص ذكي بدون تشويه */
  border-radius: 12px;
}


/* Burger يظهر فقط في الشاشات الصغيرة */
.burger {
  display: none; /* مخفي افتراضيًا */
}

@media (max-width: 768px) {
  .burger {
    display: inline-flex; /* يظهر في الهاتف */
  }
  .nav {
    display: none; /* إخفاء القائمة في الهاتف */
  }
  .nav.open {
    display: block; /* تظهر القائمة عند الضغط على البرجر */
  }
}


/* الهيدر */
.header {
  display: flex;
  justify-content: space-between; /* يوزع العناصر بين اليسار واليمين */
  align-items: center;
  height: 64px;
  padding: 0 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

/* اللوجو */
.header .logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text);
}

/* مجموعة الأزرار */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* زر البرجر */
.burger {
  display: none; /* مخفي افتراضيًا */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

/* خطوط البرجر */
.burger .line {
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* إظهار البرجر فقط في الهاتف */
@media (max-width: 860px) {
  .burger {
    display: flex;
  }
}