/* ================================================================
   Rafiq Almuslim — Website Design System CSS
   Colors & tokens sourced from the Flutter app:
     lib/ui/theme/app_colors.dart
     lib/ui/theme/app_tokens.dart
   ================================================================ */


/* ── 1. Design Tokens ────────────────────────────────────────── */
:root {
  /* Core palette — lib/ui/theme/app_colors.dart */
  --app-primary:       #00C0E8;               /* AppColors.primary */
  --app-primary-soft:  rgba(0, 192, 232, 0.12); /* AppColors.primarySoft */
  --app-secondary:     #34C759;               /* AppColors.secondary */
  --app-bg:            #F9FAFB;               /* AppColors.background */
  --app-surface:       #FFFFFF;               /* AppColors.white */
  --app-text:          #000000;               /* AppColors.text */
  --app-muted:         #6B7280;               /* AppColors.muted */
  --app-border:        #E5E7EB;               /* AppColors.border */
  --app-error:         #FF3B30;               /* AppColors.error */
  --app-dark-bg:       #111111;               /* dark scaffoldBg */
  --app-dark-card:     #1A1A1A;               /* dark cardTheme.color */

  /* Semantic aliases */
  --color-bg:           var(--app-bg);
  --color-surface:      var(--app-surface);
  --color-text:         var(--app-text);
  --color-muted:        var(--app-muted);
  --color-border:       var(--app-border);
  --color-primary:      var(--app-primary);
  --color-primary-soft: var(--app-primary-soft);
  --color-secondary:    var(--app-secondary);

  /* Border radius — lib/ui/theme/app_tokens.dart */
  --radius-xs: 8px;    /* AppTokens.radiusXs */
  --radius-sm: 12px;   /* AppTokens.radiusSm */
  --radius-md: 16px;   /* AppTokens.radiusMd */
  --radius-lg: 24px;   /* AppTokens.radiusLg */
  --radius-xl: 30px;   /* AppTokens.radiusXl */

  /* Shadows — inspired by AppTokens.softShadow */
  --shadow-card: 0 4px 10px rgba(0, 0, 0, 0.04);
  --shadow-md:   0 8px 24px rgba(0, 0, 0, 0.09);

  /* Typography */
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
             "Helvetica Neue", Arial, sans-serif;
  --font-arabic: "Segoe UI", Tahoma, "Traditional Arabic",
                 "Arial Unicode MS", Arial, sans-serif;
  --font-mono: "Courier New", Consolas, "Liberation Mono", monospace;

  /* Layout */
  --max-width:  860px;
  --gap-card:   1.2rem;
}


/* ── 2. Base ─────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-ui);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
}
h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
h2 { font-size: clamp(1.15rem, 3vw, 1.4rem); }
h3 { font-size: 1.05rem; }
h4 { font-size: 0.93rem; color: var(--color-muted); font-weight: 600; }

p { margin-bottom: 0.7rem; }
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: 1.5rem; margin-bottom: 0.7rem; }
li { margin-bottom: 0.25rem; }

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.13s;
}
a:hover, a:focus { color: #0099BB; text-decoration: underline; }
a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 3px;
}

code {
  font-family: var(--font-mono);
  font-size: 0.84em;
  background: rgba(0, 0, 0, 0.05);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  color: var(--color-text);
}

strong { color: var(--color-text); }


/* ── 3. Layout ───────────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
  width: 100%;
}

main {
  flex: 1;
  padding: 2.25rem 0 3.5rem;
}


/* ── 4. Header ───────────────────────────────────────────────── */
.site-header {
  background-color: var(--app-dark-bg);
  border-bottom: 1px solid rgba(0, 192, 232, 0.18);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* App logo / brand */
.site-title {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  color: #FFFFFF;
  font-size: 0.97rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.site-title:hover, .site-title:focus {
  color: var(--color-primary);
  text-decoration: none;
}
.site-title .ar {
  font-family: var(--font-arabic);
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.78);
  direction: rtl;
}

/* Navigation */
.site-nav {
  display: flex;
  gap: 0.2rem;
  flex-wrap: wrap;
  align-items: center;
}
.site-nav a {
  font-size: 0.84rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  text-decoration: none;
  transition: background 0.13s, color 0.13s, border-color 0.13s;
  white-space: nowrap;
}
.site-nav a:hover,
.site-nav a:focus {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  text-decoration: none;
}
/* Active nav: mirrors bottom-nav selected state (cyan bg + border + text) */
.site-nav a[aria-current="page"] {
  background: var(--color-primary-soft);
  color: var(--color-primary);
  border-color: rgba(0, 192, 232, 0.4);
  text-decoration: none;
}


/* ── 5. Hero ─────────────────────────────────────────────────── */
/* Legal pages: compact dark hero */
.page-hero {
  background-color: var(--app-dark-bg);
  position: relative;
  overflow: hidden;
  padding: 3rem 0 2.5rem;
  text-align: center;
  /* Cyan top accent stripe */
  box-shadow: inset 0 3px 0 var(--color-primary);
}
/* Subtle radial cyan glow — mirrors the app hero's ambient light effect */
.page-hero::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(
    circle,
    rgba(0, 192, 232, 0.18) 0%,
    transparent 65%
  );
  top: -80px;
  right: -60px;
  pointer-events: none;
  border-radius: 50%;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: #FFFFFF; margin-bottom: 0.45rem; }
.page-hero .hero-sub {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.95rem;
  max-width: 520px;
  margin: 0 auto;
}

/* Hero badge — like the app's city pill on the home screen */
.hero-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(0, 192, 232, 0.35);
  border-radius: 999px;
  padding: 0.18rem 0.8rem;
  font-size: 0.73rem;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.82);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}


/* ── 6. Home Page ─────────────────────────────────────────────── */
/* Taller hero for the home page */
.home-hero {
  background-color: var(--app-dark-bg);
  position: relative;
  overflow: hidden;
  padding: 4rem 0 3.5rem;
  text-align: center;
  box-shadow: inset 0 3px 0 var(--color-primary);
}
.home-hero::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(
    circle,
    rgba(0, 192, 232, 0.16) 0%,
    transparent 60%
  );
  top: -120px;
  right: -80px;
  pointer-events: none;
  border-radius: 50%;
}
.home-hero::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(
    circle,
    rgba(52, 199, 89, 0.08) 0%,
    transparent 65%
  );
  bottom: -60px;
  left: -40px;
  pointer-events: none;
  border-radius: 50%;
}
.home-hero .container { position: relative; z-index: 1; }

/* Arabic brand name — large, like the app's heroPrayerName style */
.home-brand-arabic {
  font-family: var(--font-arabic);
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 700;
  color: var(--color-primary);
  direction: rtl;
  display: block;
  line-height: 1.15;
  margin-bottom: 0.35rem;
}
.home-brand-latin {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 600;
  color: #FFFFFF;
  display: block;
  margin-bottom: 0.75rem;
}
.home-tagline {
  font-size: 0.97rem;
  color: rgba(255, 255, 255, 0.72);
  max-width: 480px;
  margin: 0 auto 1.75rem;
}

/* Feature chips — modelled on app's _HomeQuickActionTile */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: var(--gap-card);
  margin-bottom: 1.5rem;
}

.feature-chip {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.1s;
}
.feature-chip:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(0, 192, 232, 0.4);
  transform: translateY(-1px);
}
.feature-chip .chip-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: var(--color-primary-soft);
  border-radius: 14px; /* between radiusSm and radiusMd, matching app */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}
.feature-chip .chip-body strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.2rem;
}
.feature-chip .chip-body p {
  font-size: 0.8rem;
  color: var(--color-muted);
  margin: 0;
  line-height: 1.4;
}

/* Legal links section on home page */
.home-legal-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  padding-top: 0.5rem;
}
.home-legal-links a {
  font-size: 0.85rem;
  color: var(--color-muted);
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  transition: border-color 0.13s, color 0.13s;
}
.home-legal-links a:hover,
.home-legal-links a:focus {
  border-color: var(--color-primary);
  color: var(--color-primary);
  text-decoration: none;
}


/* ── 7. Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  margin-bottom: var(--gap-card);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.15s;
}
.card:hover { box-shadow: var(--shadow-md); }

.card h2 {
  color: var(--color-text);
  margin-bottom: 0.9rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--color-border);
}
.card h3 {
  color: var(--color-primary);
  margin-top: 1.2rem;
  margin-bottom: 0.4rem;
}
.card h4 { margin-top: 0.8rem; margin-bottom: 0.25rem; }

/* Legal card hover border */
a.legal-card {
  display: block;
  text-decoration: none;
}
a.legal-card .card { transition: box-shadow 0.15s, border-color 0.15s, transform 0.1s; }
a.legal-card:hover .card,
a.legal-card:focus .card {
  box-shadow: var(--shadow-md);
  border-color: rgba(0, 192, 232, 0.45);
  transform: translateY(-2px);
}
a.legal-card:hover, a.legal-card:focus { text-decoration: none; }


/* ── 8. Legal Content ─────────────────────────────────────────── */
/* Date / meta line */
.meta-line {
  font-size: 0.82rem;
  color: var(--color-muted);
  margin-bottom: 1.25rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

/* Legal notice callout — cyan soft, matching primary-soft pattern */
.legal-notice {
  background: rgba(0, 192, 232, 0.07);
  border: 1px solid rgba(0, 192, 232, 0.22);
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius-xs);
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.86rem;
  color: var(--color-muted);
  line-height: 1.55;
}

/* Definition list (Impressum details) */
.detail-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.3rem 1.25rem;
  font-size: 0.91rem;
}
.detail-list dt {
  font-weight: 600;
  color: var(--color-muted);
  white-space: nowrap;
  padding-top: 0.05rem;
}
.detail-list dd { color: var(--color-text); }

/* DSGVO rights grid */
.rights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.7rem;
  margin-top: 0.75rem;
}
.right-item {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  font-size: 0.86rem;
  line-height: 1.5;
}
.right-item strong {
  display: block;
  font-size: 0.82rem;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
}

/* Third-party services list */
.service-list { display: flex; flex-direction: column; gap: 0.65rem; margin-top: 0.75rem; }
.service-item {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  font-size: 0.87rem;
}
.service-item .service-name {
  font-weight: 700;
  color: var(--color-text);
  display: block;
  margin-bottom: 0.2rem;
}
.service-item .service-url {
  font-family: var(--font-mono);
  font-size: 0.79rem;
  color: var(--color-muted);
  display: block;
  margin-bottom: 0.3rem;
}

/* Arabic RTL note block */
.arabic-note {
  direction: rtl;
  text-align: right;
  font-family: var(--font-arabic);
  background: rgba(0, 192, 232, 0.06);
  border-right: 3px solid var(--color-primary);
  border-radius: var(--radius-xs);
  padding: 0.85rem 1rem;
  font-size: 0.94rem;
  color: var(--color-text);
  line-height: 2.0;
  margin-top: 0.85rem;
}

/* Info box (support required info) */
.info-box {
  background: rgba(0, 192, 232, 0.06);
  border: 1px solid rgba(0, 192, 232, 0.2);
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
  font-size: 0.9rem;
}
.info-box h3 {
  margin-top: 0;
  color: var(--color-primary);
  font-size: 0.94rem;
  margin-bottom: 0.6rem;
}

/* Legal card grid (legal index) */
.legal-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: var(--gap-card);
  margin-top: 0.5rem;
}
.legal-card-inner {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.1s;
}
a.legal-card:hover .legal-card-inner,
a.legal-card:focus .legal-card-inner {
  box-shadow: var(--shadow-md);
  border-color: rgba(0, 192, 232, 0.45);
  transform: translateY(-2px);
}
.legal-card-inner .card-icon {
  width: 44px;
  height: 44px;
  background: var(--color-primary-soft);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}
.legal-card-inner h2 {
  font-size: 1.05rem;
  color: var(--color-text);
  margin-bottom: 0.35rem;
  border: none;
  padding: 0;
}
.legal-card-inner p {
  font-size: 0.83rem;
  color: var(--color-muted);
  margin: 0;
  line-height: 1.5;
}


/* ── 9. Buttons & Links ───────────────────────────────────────── */
/* Primary button — matches FilledButton: bg=primary, fg=text (black) */
.btn-primary {
  display: inline-block;
  background: var(--color-primary);
  color: var(--color-text);      /* black, matching FilledButton foreground */
  font-weight: 700;
  font-size: 0.97rem;
  padding: 0.75rem 2rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.13s, box-shadow 0.13s;
}
.btn-primary:hover, .btn-primary:focus {
  background: #00A8CC;
  box-shadow: 0 4px 14px rgba(0, 192, 232, 0.28);
  color: var(--color-text);
  text-decoration: none;
}

/* Soft button — matches FilledButton soft style: bg=primarySoft, fg=text */
.btn-soft {
  display: inline-block;
  background: var(--color-primary-soft);
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 192, 232, 0.25);
  text-decoration: none;
  transition: background 0.13s, border-color 0.13s;
}
.btn-soft:hover, .btn-soft:focus {
  background: rgba(0, 192, 232, 0.2);
  border-color: rgba(0, 192, 232, 0.5);
  color: var(--color-text);
  text-decoration: none;
}


/* ── 10. Components ───────────────────────────────────────────── */
/* Contact box (support page) */
.contact-box {
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  margin-bottom: var(--gap-card);
}
.contact-box .contact-label {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin-bottom: 0;
}

/* Topic grid (support page) */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 0.8rem;
  margin-top: 0.75rem;
}
.topic-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  transition: border-color 0.13s;
}
.topic-card:hover { border-color: rgba(0, 192, 232, 0.4); }
.topic-card .topic-icon-wrap {
  width: 36px;
  height: 36px;
  background: var(--color-primary-soft);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}
.topic-card strong {
  display: block;
  font-size: 0.87rem;
  color: var(--color-text);
  margin-bottom: 0.2rem;
}
.topic-card p {
  font-size: 0.80rem;
  color: var(--color-muted);
  margin: 0;
  line-height: 1.4;
}

/* Section/page divider */
.section-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 1.5rem 0;
}

/* Table of contents (optional, legal pages) */
.toc {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.87rem;
}
.toc h3 { font-size: 0.84rem; color: var(--color-muted); margin-bottom: 0.5rem; margin-top: 0; }
.toc ol { margin: 0; padding-left: 1.25rem; }
.toc li { margin-bottom: 0.15rem; }
.toc a { color: var(--color-muted); }
.toc a:hover { color: var(--color-primary); }


/* ── 11. Footer ───────────────────────────────────────────────── */
.site-footer {
  background-color: var(--app-dark-bg);
  border-top: 1px solid rgba(0, 192, 232, 0.14);
  color: rgba(255, 255, 255, 0.60);
  padding: 1.4rem 0;
  margin-top: auto;
}
.site-footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-align: center;
}
.footer-copyright { font-size: 0.83rem; }
.site-footer a {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.84rem;
  transition: color 0.13s;
}
.site-footer a:hover, .site-footer a:focus { color: var(--color-primary); text-decoration: none; }
.footer-nav {
  display: flex;
  gap: 0.15rem;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-nav a {
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-xs);
}
.footer-nav a:hover { background: rgba(255,255,255,0.07); }
.footer-nav a[aria-current="page"] { color: var(--color-primary); }


/* ── 12. Responsive ───────────────────────────────────────────── */
@media (max-width: 600px) {
  .site-header .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .site-nav { width: 100%; }

  .card { padding: 1.2rem; }
  .page-hero { padding: 2.25rem 0 2rem; }
  .home-hero { padding: 3rem 0 2.5rem; }

  .detail-list {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .detail-list dt { margin-top: 0.55rem; }

  .contact-box { padding: 1.5rem 1rem; }
}


/* ── 13. Print ────────────────────────────────────────────────── */
@media print {
  .site-header, .site-footer { display: none; }
  body { background: white; }
  .card { box-shadow: none; border: 1px solid #ccc; page-break-inside: avoid; }
  .page-hero, .home-hero { background: #f0f0f0 !important; color: black !important; }
  .page-hero h1, .home-hero h1, .home-brand-arabic, .home-brand-latin { color: black !important; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 0.78em; color: #555; }
  a.legal-card::after { content: none; }
}


/* ── 14. Language Switcher ────────────────────────────────────── */
.header-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.lang-switcher {
  display: flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-xs);
  overflow: hidden;
}
.lang-switcher a {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.60);
  padding: 0.18rem 0.55rem;
  text-decoration: none;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  transition: background 0.13s, color 0.13s;
  white-space: nowrap;
  letter-spacing: 0.03em;
}
.lang-switcher a:last-child { border-right: none; }
.lang-switcher a:hover,
.lang-switcher a:focus {
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
  text-decoration: none;
}
.lang-switcher a[aria-current="true"] {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}


/* ── 15. Translation Notice ───────────────────────────────────── */
.translation-notice {
  background: rgba(0, 192, 232, 0.05);
  border: 1px solid rgba(0, 192, 232, 0.20);
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius-xs);
  padding: 0.65rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.84rem;
  color: var(--color-muted);
  font-style: italic;
  line-height: 1.55;
}


/* ── 16. Home Sections (spacing fix) ─────────────────────────── */
.home-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.4rem;
  box-shadow: var(--shadow-card);
}
.home-section h2 {
  font-size: 1.0rem;
  color: var(--color-text);
  margin-bottom: 0.7rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--color-border);
}
.home-section-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.home-section-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--color-muted);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xs);
  padding: 0.3rem 0.65rem;
  text-decoration: none;
  transition: border-color 0.13s, color 0.13s;
}
a.home-section-item:hover,
a.home-section-item:focus {
  border-color: var(--color-primary);
  color: var(--color-primary);
  text-decoration: none;
}
.home-section-item .item-icon { font-size: 0.88rem; }


/* ── 17. RTL — Arabic Pages ───────────────────────────────────── */
html[lang="ar"] body {
  font-family: var(--font-arabic);
  direction: rtl;
  text-align: right;
}
html[lang="ar"] ul,
html[lang="ar"] ol {
  padding-left: 0;
  padding-right: 1.5rem;
}
html[lang="ar"] .toc ol { padding-left: 0; padding-right: 1.25rem; }
html[lang="ar"] .detail-list { direction: rtl; }
html[lang="ar"] .detail-list dt { text-align: right; }
html[lang="ar"] .legal-notice {
  border-left: 1px solid rgba(0, 192, 232, 0.22);
  border-right: 3px solid var(--color-primary);
}
html[lang="ar"] .translation-notice {
  border-left: 1px solid rgba(0, 192, 232, 0.20);
  border-right: 3px solid var(--color-primary);
}
html[lang="ar"] p,
html[lang="ar"] li { line-height: 1.9; }
html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3 { line-height: 1.4; }
html[lang="ar"] .lang-switcher { direction: ltr; }
html[lang="ar"] .footer-nav { direction: ltr; }
html[lang="ar"] code { direction: ltr; display: inline-block; }
html[lang="ar"] .home-section-items { justify-content: flex-end; }
html[lang="ar"] .home-legal-links { direction: ltr; }

@media (max-width: 600px) {
  .header-right { width: 100%; justify-content: space-between; }
}
