/* ==========================================================================
   Halety — Shared Stylesheet
   Pure CSS, mobile-first, no JavaScript required.
   ========================================================================== */

:root {
  --brand:        #4457ED;   /* Halety blue   */
  --brand-dark:   #2c3bbf;   /* deep blue     */
  --brand-light:  #e9ecff;   /* light tint    */
  --accent:       #7c8bff;   /* lighter blue  */
  --ink:          #1f2233;   /* headings  */
  --body:         #3f4257;   /* body text */
  --muted:        #6b7280;   /* secondary */
  --line:         #e6e7ee;   /* borders   */
  --bg:           #f7f7fb;   /* page bg   */
  --card:         #ffffff;   /* surfaces  */
  --radius:       16px;
  --maxw:         860px;
  --shadow:       0 10px 30px rgba(31, 34, 51, 0.08);
  --shadow-sm:    0 2px 8px rgba(31, 34, 51, 0.06);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: "Roboto", "Segoe UI", "Helvetica Neue", Arial,
               "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  color: var(--body);
  background: var(--bg);
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* English titles use Domine (serif); Arabic titles stay on Tajawal */
h1, h2, h3 {
  font-family: "Domine", Georgia, "Times New Roman", serif;
}
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3 {
  font-family: "Tajawal", "Segoe UI", Tahoma, Arial, sans-serif;
}

/* ----------------------------------------------------------- Site header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
}
.brand:hover { text-decoration: none; }

.brand .logo {
  height: 34px;
  width: auto;
  display: block;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.nav a {
  color: var(--body);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 10px;
}
.nav a:hover { background: var(--brand-light); color: var(--brand-dark); text-decoration: none; }

/* ------------------------------------------------------------------- Hero */
.hero {
  background:
    radial-gradient(1200px 400px at 80% -10%, rgba(124, 139, 255, 0.35), transparent 60%),
    linear-gradient(135deg, var(--brand-dark), var(--brand));
  color: #fff;
  text-align: center;
  padding: 84px 20px 96px;
}
.hero .hero-logo {
  height: 52px;
  width: auto;
  margin: 0 auto 26px;
  display: block;
}
.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 6vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 800;
}
.hero p {
  margin: 0 auto;
  max-width: 600px;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: rgba(255, 255, 255, 0.9);
}
.hero .pill {
  display: inline-block;
  margin-bottom: 22px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ---------------------------------------------------------- Policy cards */
.cards {
  max-width: 1100px;
  margin: -56px auto 0;
  padding: 0 20px 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(31,34,51,0.12); }
.card .icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--brand-light);
  color: var(--brand-dark);
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
}
.card h3 { margin: 0 0 8px; color: var(--ink); font-size: 1.2rem; }
.card p  { margin: 0 0 18px; color: var(--muted); font-size: 0.98rem; }
.card .more {
  margin-top: auto;
  font-weight: 700;
  font-size: 0.95rem;
}
.card a.cover { color: inherit; }
.card a.cover:hover { text-decoration: none; }

/* --------------------------------------------------------- Content shell */
.page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 48px 20px 64px;
}

.doc {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(28px, 5vw, 56px);
}

.doc-head { text-align: center; margin-bottom: 8px; }
.doc-head h1 {
  margin: 0 0 6px;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.updated {
  display: inline-block;
  margin-top: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--brand-light);
  color: var(--brand-dark);
  font-size: 0.82rem;
  font-weight: 700;
}

.intro {
  margin: 22px 0 8px;
  color: var(--body);
}

.divider { height: 1px; background: var(--line); border: 0; margin: 36px 0; }

/* Document typography */
.doc h2 {
  margin: 38px 0 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 1.35rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.doc h2:first-of-type { border-top: 0; padding-top: 0; }
.doc h3 {
  margin: 22px 0 8px;
  font-size: 1.08rem;
  color: var(--brand-dark);
}
.doc p { margin: 0 0 14px; }
.doc ul { margin: 0 0 16px; padding-inline-start: 22px; }
.doc li { margin: 0 0 8px; }
.doc strong { color: var(--ink); }

/* Language switch tabs (anchor based, no JS) */
.lang-switch {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 24px 0 10px;
  flex-wrap: wrap;
}
.lang-switch a {
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--body);
  font-weight: 700;
  font-size: 0.95rem;
}
.lang-switch a:hover { background: var(--brand-light); color: var(--brand-dark); text-decoration: none; }

.lang-block { scroll-margin-top: 80px; }

/* RTL / Arabic block */
[dir="rtl"] {
  direction: rtl;
  text-align: right;
  font-family: "Tajawal", "Segoe UI", Tahoma, "Geeza Pro", Arial, sans-serif;
}
[dir="rtl"] .doc-head { text-align: center; }
[dir="rtl"] .doc ul { padding-inline-start: 22px; }

/* Back link */
.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 22px;
  font-weight: 700;
  font-size: 0.95rem;
}

/* ----------------------------------------------------------------- Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
  margin-top: 40px;
}
.site-footer .wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 30px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 0.92rem;
}
.site-footer .links { display: flex; flex-wrap: wrap; gap: 16px; }
.site-footer .links a { color: var(--body); font-weight: 600; }

/* ------------------------------------------------------------ Responsive */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .hero { padding: 64px 18px 80px; }
  .nav { display: none; }            /* keep header clean on small screens */
  .site-header .wrap { justify-content: center; }
}
