/* Yarwy Legal Pages — shared stylesheet
   Minimal, neutral grey, flat, Arabic-only.
   Version: 3.0.0
*/

:root {
  --grey-50:  #fafafa;
  --grey-100: #f4f4f5;
  --grey-200: #e4e4e7;
  --grey-300: #d4d4d8;
  --grey-400: #a1a1aa;
  --grey-500: #71717a;
  --grey-600: #52525b;
  --grey-700: #3f3f46;
  --grey-800: #27272a;
  --grey-900: #18181b;

  --bg:            var(--grey-100);
  --card-bg:       #ffffff;
  --border:        var(--grey-200);
  --text:          var(--grey-800);
  --text-muted:    var(--grey-600);
  --text-soft:     var(--grey-500);
  --link:          var(--grey-700);
  --link-hover:    var(--grey-900);

  --radius-lg: 12px;
  --radius-md: 8px;
  --radius-sm: 6px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  direction: rtl;
  line-height: 1.9;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  padding: 40px 16px;
  font-size: 16px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background-color: var(--grey-300);
  color: var(--grey-900);
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-track {
  background: var(--grey-100);
}
*::-webkit-scrollbar-thumb {
  background: var(--grey-300);
  border-radius: 10px;
  border: 2px solid var(--grey-100);
}
*::-webkit-scrollbar-thumb:hover {
  background: var(--grey-400);
}

/* Main container ─────────────────────────────────────── */

.container {
  max-width: 860px;
  margin: 0 auto;
  background: var(--card-bg);
  padding: 48px 44px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

/* Header ─────────────────────────────────────────────── */

.header {
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.logo {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--grey-900);
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}

.subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 400;
  margin-bottom: 18px;
}

.last-updated {
  display: inline-block;
  background: var(--grey-100);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
}

.last-updated strong {
  color: var(--text);
}

/* Sections ──────────────────────────────────────────── */

.section {
  margin-bottom: 36px;
}

.section:last-of-type {
  margin-bottom: 24px;
}

h1, h2, h3, h4 {
  color: var(--text);
  font-weight: 700;
  line-height: 1.5;
}

h1 {
  font-size: 1.8rem;
  color: var(--grey-900);
  margin-bottom: 12px;
}

h2 {
  font-size: 1.4rem;
  margin-bottom: 16px;
  color: var(--grey-900);
}

h3 {
  font-size: 1.1rem;
  margin-top: 22px;
  margin-bottom: 10px;
  color: var(--grey-800);
  font-weight: 600;
}

h4 {
  font-size: 1rem;
  margin-top: 16px;
  margin-bottom: 8px;
  color: var(--grey-700);
  font-weight: 600;
}

p {
  margin-bottom: 14px;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.9;
}

strong {
  color: var(--text);
  font-weight: 600;
}

ul {
  margin: 12px 0 18px;
  padding-right: 22px;
  list-style: none;
}

ul li {
  position: relative;
  padding-right: 18px;
  margin-bottom: 10px;
  color: var(--text-muted);
  line-height: 1.85;
}

ul li::before {
  content: '';
  position: absolute;
  right: 0;
  top: 13px;
  width: 5px;
  height: 5px;
  background: var(--grey-400);
  border-radius: 50%;
}

/* Links ──────────────────────────────────────────────── */

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--grey-300);
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
  font-weight: 500;
}

a:hover {
  color: var(--link-hover);
  text-decoration-color: var(--grey-500);
}

/* Footer ─────────────────────────────────────────────── */

.footer {
  text-align: center;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  color: var(--text-soft);
}

.footer .logo {
  font-size: 1.5rem;
  margin-bottom: 12px;
  color: var(--grey-800);
}

.footer p {
  color: var(--text-soft);
  font-size: 0.9rem;
  margin-bottom: 6px;
}

/* Back-to-home link ─────────────────────────────────── */

.back-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 10px 22px;
  background: var(--grey-800);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.15s ease;
}

.back-home:hover {
  color: #fff;
  background: var(--grey-900);
  text-decoration: none;
}

/* Responsive ─────────────────────────────────────────── */

@media (max-width: 768px) {
  body {
    padding: 20px 12px;
    font-size: 15px;
  }

  .container {
    padding: 28px 22px;
    border-radius: var(--radius-md);
  }

  .header {
    margin-bottom: 28px;
    padding-bottom: 22px;
  }

  .logo {
    font-size: 1.75rem;
  }

  .subtitle {
    font-size: 0.95rem;
  }

  h1 {
    font-size: 1.45rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  h3 {
    font-size: 1.05rem;
  }
}
