/* ==========================================================================
   site-common.css
   الأنماط المشتركة لهيدر وفوتر كل صفحات الموقع العامة (index, directory,
   plans, help, privacy, terms).
   ملف واحد يُحمَّل عبر <link> بدل تكرار نفس الأنماط داخل <style> في كل صفحة،
   فيُخزَّن في كاش المتصفح مرة واحدة ويُقرأ فورياً في باقي الصفحات.
   يعتمد على لون العلامة الأساسي #1A73E8 المُستخدم فعلياً في المشروع.
   ========================================================================== */

:root {
  --brand-primary: #1A73E8;
  --brand-primary-hover: #1558b0;
  --brand-primary-light: #e8f0fe;
  --brand-primary-glow: rgba(26, 115, 232, 0.15);
  --brand-ink: #1a1a2e;
  --brand-ink-soft: #5f6368;
  --brand-border: #e6e8eb;
  --brand-bg: #ffffff;
  --brand-bg-soft: #f8f9fb;
  --header-height: 72px;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(20, 20, 43, 0.06), 0 1px 1px rgba(20, 20, 43, 0.04);
  --shadow-md: 0 8px 24px rgba(20, 20, 43, 0.08);
  --font-body: 'Tajawal', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ===== إعادة ضبط أساسية للهيدر/فوتر فقط (لا تتعارض مع أنماط الصفحة) ===== */
.site-header * { box-sizing: border-box; }

/* ===== الهيدر ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--brand-border);
  font-family: var(--font-body);
}

.site-header__inner {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--brand-ink);
  flex-shrink: 0;
}

.site-header__brand img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.site-header__brand-name {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--brand-ink);
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.site-header__nav a {
  position: relative;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--brand-ink-soft);
  text-decoration: none;
  transition: color .15s ease, background-color .15s ease;
  white-space: nowrap;
}

.site-header__nav a:hover {
  color: var(--brand-primary);
  background: var(--brand-primary-light);
}

.site-header__nav a.is-active {
  color: var(--brand-primary);
  font-weight: 700;
  background: var(--brand-primary-light);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.site-header__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: 999px;
  background: var(--brand-primary);
  color: #fff !important;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: background-color .15s ease, transform .1s ease;
}

.site-header__cta:hover {
  background: var(--brand-primary-hover);
  transform: translateY(-1px);
}

.site-header__ghost {
  padding: 9px 16px;
  border-radius: 999px;
  color: var(--brand-ink-soft);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}

.site-header__ghost:hover {
  color: var(--brand-ink);
  background: var(--brand-bg-soft);
}

/* زر تبديل اللغة */
.site-header__lang {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--brand-primary);
  color: #fff !important;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color .15s ease, transform .1s ease;
}

.site-header__lang:hover {
  background: var(--brand-primary-hover);
  transform: translateY(-1px);
}

/* دعم الخطوط الإنجليزية */
html[lang="en"] {
  --font-body: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
}

html[lang="en"] .site-header,
html[lang="en"] .site-footer,
html[lang="en"] .page-intro {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* زر القائمة للموبايل */
.site-header__burger {
  display: none;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  border-radius: 10px;
  color: var(--brand-ink);
  font-size: 1.3rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.site-header__burger:hover { background: var(--brand-bg-soft); }

/* قائمة الموبايل المنسدلة */
.site-header__mobile {
  display: none;
  position: fixed;
  inset: var(--header-height) 0 0 0;
  background: var(--brand-bg);
  z-index: 999;
  padding: 12px 20px 24px;
  overflow-y: auto;
}

.site-header__mobile.is-open { display: block; }

.site-header__mobile a {
  display: block;
  padding: 14px 8px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--brand-ink);
  text-decoration: none;
  border-bottom: 1px solid var(--brand-border);
}

.site-header__mobile .site-header__cta {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

@media (max-width: 860px) {
  .site-header__nav { display: none; }
  .site-header__actions .site-header__ghost { display: none; }
  .site-header__actions .site-header__lang { display: none; }
  .site-header__burger { display: flex; }
}

/* ===== الفوتر ===== */
.site-footer {
  font-family: var(--font-body);
  background: var(--brand-bg-soft);
  border-top: 1px solid var(--brand-border);
  margin-top: 48px;
}

.site-footer__inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 40px 24px 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
}

.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--brand-ink);
  text-decoration: none;
  font-weight: 800;
  font-size: 1rem;
}

.site-footer__brand img { width: 26px; height: 26px; border-radius: 6px; }

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.site-footer__links a {
  color: var(--brand-ink-soft);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color .15s ease;
}

.site-footer__links a:hover { color: var(--brand-primary); }

.site-footer__meta {
  width: 100%;
  border-top: 1px solid var(--brand-border);
  margin-top: 8px;
  padding-top: 16px;
  text-align: center;
  color: #9aa0a6;
  font-size: 0.82rem;
}

/* ===== شريط عنوان الصفحة (يظهر تحت الهيدر في صفحات مثل الدليل) ===== */
.page-intro {
  background: linear-gradient(135deg, var(--brand-primary) 0%, #5a9bf0 100%);
  color: #fff;
  font-family: var(--font-body);
}

.page-intro__inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 32px 24px;
  text-align: center;
}

.page-intro__inner h1 {
  font-size: 1.6rem;
  font-weight: 800;
  margin: 0 0 6px;
}

.page-intro__inner p {
  margin: 0;
  opacity: 0.92;
  font-size: 0.98rem;
}
