/* ============================================================
   Raoufi — GitHub Pages Stylesheet
   ============================================================ */

/* ---------- Reset & Custom Properties ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --green:        #2F6B3A;
  --green-dark:   #1e4a28;
  --green-mid:    #3d8a4f;
  --green-light:  #ecf6ef;
  --green-border: rgba(47, 107, 58, 0.18);

  --blue:         #2563EB;
  --blue-light:   #EFF6FF;
  --blue-mid:     #DBEAFE;
  --blue-border:  rgba(37, 99, 235, 0.15);

  --text:         #0f172a;
  --text-mid:     #374151;
  --text-sub:     #6B7280;
  --text-light:   #9CA3AF;

  --border:       #E5E7EB;
  --border-soft:  rgba(15, 23, 42, 0.07);

  --white:        #FFFFFF;
  --bg:           #FAFBFC;
  --bg-alt:       #F7FBF7;

  --shadow-sm:    0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md:    0 4px 16px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.05);
  --shadow-lg:    0 10px 32px rgba(0,0,0,.10), 0 4px 12px rgba(0,0,0,.06);

  --radius-sm:    8px;
  --radius-md:    14px;
  --radius-lg:    20px;
  --radius-xl:    28px;

  --max-w:        820px;
  --nav-h:        64px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 14px;
  color: #fff;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

.nav-brand {
  font-weight: 800;
  font-size: 15px;
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-sub);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  text-decoration: none;
}
.nav-links a:hover {
  background: var(--green-light);
  color: var(--green);
  text-decoration: none;
}
.nav-links a.active {
  color: var(--green);
  background: var(--green-light);
}

/* ---------- Page Wrapper ---------- */
.page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* ---------- Hero (index.html) ---------- */
.hero {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-mid) 100%);
  color: #fff;
  padding: 80px 24px 72px;
  text-align: center;
}

.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 99px;
  letter-spacing: 0.3px;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 16px;
}

.hero h1 span {
  opacity: 0.85;
}

.hero p {
  font-size: 17px;
  font-weight: 500;
  opacity: 0.88;
  max-width: 520px;
  margin: 0 auto 32px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 800;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { opacity: 0.88; transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }

.btn-white {
  background: #fff;
  color: var(--green);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.5);
}
.btn-outline:hover { border-color: #fff; }

.btn-green {
  background: var(--green);
  color: #fff;
}

/* ---------- Page Header (legal pages) ---------- */
.page-header {
  margin-bottom: 36px;
}

.page-header .eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 8px;
}

.page-header h1 {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--text);
  line-height: 1.15;
}

.page-header .meta {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
}

.page-header .intro {
  margin-top: 14px;
  font-size: 15px;
  color: var(--text-mid);
  line-height: 1.7;
  max-width: 680px;
}

/* ---------- Cards ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  margin-bottom: 16px;
}

.card-inner {
  padding: 28px 28px 8px;
}

/* ---------- Section (inside a card) ---------- */
.section {
  padding: 20px 0;
  border-bottom: 1px solid var(--border-soft);
}
.section:first-child { padding-top: 4px; }
.section:last-child { border-bottom: none; padding-bottom: 8px; }

.section h2 {
  font-size: 14px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 10px;
}

.section p {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-mid);
  line-height: 1.75;
}

.section p + p { margin-top: 10px; }

.section ul {
  margin: 8px 0 4px 18px;
}
.section ul li {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-mid);
  line-height: 1.75;
  margin-bottom: 4px;
}

/* ---------- Contact Card ---------- */
.contact-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
  margin-top: 20px;
  text-decoration: none;
  transition: box-shadow 0.15s;
}
.contact-card:hover {
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.contact-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--green-light);
  border: 1px solid var(--green-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.contact-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-sub);
}
.contact-email {
  font-size: 14px;
  font-weight: 900;
  color: var(--green);
  margin-top: 2px;
}
.contact-note {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-light);
  margin-top: 2px;
}

/* ---------- FAQ / Details ---------- */
.faq-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  margin-bottom: 14px;
}

.faq-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border-soft);
}

.faq-section-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--green-light);
  border: 1px solid var(--green-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.faq-section-title {
  font-size: 14px;
  font-weight: 900;
  color: var(--text);
}

details {
  border-top: 1px solid var(--border-soft);
}
details:first-of-type { border-top: none; }

summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  gap: 12px;
  line-height: 1.4;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "＋";
  font-size: 16px;
  font-weight: 400;
  color: var(--text-sub);
  flex-shrink: 0;
  transition: transform 0.2s;
}
details[open] summary::after {
  content: "－";
}

.faq-answer {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-mid);
  line-height: 1.75;
  padding: 0 20px 16px;
}

/* ---------- Features Grid (index) ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 36px 0;
}

.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  box-shadow: var(--shadow-sm);
}

.feature-icon {
  font-size: 26px;
  margin-bottom: 12px;
}

.feature-title {
  font-size: 14px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 6px;
}

.feature-desc {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-sub);
  line-height: 1.6;
}

/* ---------- Legal Links Section (index) ---------- */
.legal-links {
  background: var(--blue-light);
  border: 1px solid var(--blue-border);
  border-radius: var(--radius-xl);
  padding: 28px 28px 22px;
  margin-top: 16px;
}

.legal-links h2 {
  font-size: 16px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 16px;
}

.legal-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--blue-border);
  text-decoration: none;
  transition: opacity 0.15s;
}
.legal-link-row:last-child { border-bottom: none; }
.legal-link-row:hover { opacity: 0.75; text-decoration: none; }

.legal-link-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.legal-link-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--white);
  border: 1px solid var(--blue-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.legal-link-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}

.legal-link-sub {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
  margin-top: 2px;
}

.legal-link-arrow {
  color: var(--text-light);
  font-size: 16px;
}

/* ---------- Hours Notice ---------- */
.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--green-light);
  border: 1px solid var(--green-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin: 14px 0 24px;
}

.notice-dot {
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: #22C55E;
  flex-shrink: 0;
  margin-top: 5px;
}

.notice p {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-mid);
  line-height: 1.6;
}

.notice strong {
  color: var(--text);
  font-weight: 800;
}

/* ---------- CTA Card ---------- */
.cta-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  text-align: center;
  box-shadow: var(--shadow-md);
  margin-top: 16px;
}

.cta-card h2 {
  font-size: 18px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 8px;
}

.cta-card p {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-sub);
  line-height: 1.65;
  margin-bottom: 22px;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  background: var(--white);
  padding: 28px 24px;
  margin-top: 40px;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.footer-logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
}

.footer-brand {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}

.footer-copy {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--green); text-decoration: none; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .nav-inner { padding: 0 16px; }
  .nav-brand { display: none; }
  .nav-links a { font-size: 12px; padding: 6px 8px; }

  .hero { padding: 56px 16px 52px; }
  .hero h1 { letter-spacing: -0.5px; }
  .hero p { font-size: 15px; }

  .page { padding: 32px 16px 64px; }

  .card-inner { padding: 20px 16px 8px; }
  .section { padding: 16px 0; }
  summary { padding: 13px 16px; }
  .faq-answer { padding: 0 16px 14px; }
  .faq-section-header { padding: 14px 16px; }

  .features-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .feature-card { padding: 16px 14px; }

  .legal-links { padding: 20px 16px 14px; }

  .footer-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
  .footer-links { gap: 14px; }

  .cta-card { padding: 24px 16px; }
}

@media (max-width: 380px) {
  .features-grid { grid-template-columns: 1fr; }
  .nav-links a { padding: 6px 6px; font-size: 11px; }
}

/* ============================================================
   Language Switcher
   ============================================================ */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.lang-btn {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-sub);
  cursor: pointer;
  line-height: 1.4;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.lang-btn:hover {
  background: var(--green-light);
  color: var(--green);
  border-color: var(--green-border);
}
.lang-btn.lang-btn-active {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

/* ============================================================
   RTL (Arabic) Support
   ============================================================ */

/* Arabic system fonts render better with slightly more line height */
:lang(ar) {
  font-family: 'Segoe UI', Tahoma, 'Arabic Typesetting', 'Geeza Pro', sans-serif;
}
:lang(ar) .section p,
:lang(ar) .faq-answer,
:lang(ar) .hero p,
:lang(ar) .page-header .intro {
  line-height: 1.95;
}

/* Layout direction flips */
[dir="rtl"] .nav-inner         { flex-direction: row-reverse; }
[dir="rtl"] .nav-links         { flex-direction: row-reverse; }
[dir="rtl"] .nav-logo          { flex-direction: row-reverse; }
[dir="rtl"] .footer-inner      { flex-direction: row-reverse; }
[dir="rtl"] .footer-links      { flex-direction: row-reverse; }
[dir="rtl"] .footer-logo       { flex-direction: row-reverse; }
[dir="rtl"] .contact-card      { flex-direction: row-reverse; }
[dir="rtl"] .contact-card > div { text-align: right; }
[dir="rtl"] .hero-badge        { flex-direction: row-reverse; }
[dir="rtl"] .hero-actions      { flex-direction: row-reverse; }
[dir="rtl"] .legal-link-row    { flex-direction: row-reverse; }
[dir="rtl"] .legal-link-left   { flex-direction: row-reverse; }
[dir="rtl"] .legal-link-left > div { text-align: right; }
[dir="rtl"] .faq-section-header { flex-direction: row-reverse; }
[dir="rtl"] .notice            { flex-direction: row-reverse; }
[dir="rtl"] .notice > div      { text-align: right; }
[dir="rtl"] .cta-card          { text-align: center; } /* stays centered */

/* Summary (FAQ) arrows flip in RTL */
[dir="rtl"] summary { flex-direction: row-reverse; }

/* Text alignment */
[dir="rtl"] .page-header       { text-align: right; }
[dir="rtl"] .page-header .intro { text-align: right; }
[dir="rtl"] .section h2        { text-align: right; }
[dir="rtl"] .section p         { text-align: right; }
[dir="rtl"] .section ul        { padding-right: 20px; padding-left: 0; text-align: right; }
[dir="rtl"] .faq-section-title { text-align: right; }
[dir="rtl"] .faq-answer        { text-align: right; }
[dir="rtl"] .faq-answer ul     { padding-right: 20px; padding-left: 0; }
[dir="rtl"] .feature-card      { text-align: right; }
[dir="rtl"] .legal-links h2    { text-align: right; }
[dir="rtl"] .hero              { text-align: center; } /* hero stays centred */
[dir="rtl"] .notice p          { text-align: right; }

/* lang-switcher itself doesn't flip – always LTR order for UI consistency */
[dir="rtl"] .lang-switcher     { direction: ltr; }
