@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Scheherazade+New:wght@400;700&display=swap');

:root {
  --primary:       #1B6B4A;
  --primary-light: #2E8B6A;
  --primary-dark:  #0D4A30;
  --accent:        #D4A843;
  --accent-light:  #E8C96A;
  --bg:            #F6F2EB;
  --white:         #ffffff;
  --text-primary:  #2C2C2C;
  --text-muted:    #344D31;
  --success:       #27AE60;
  --error:         #E74C3C;
  --warning:       #F39C12;
  --shadow:        0 4px 24px rgba(27,107,74,0.09);
  --radius:        14px;
  --radius-sm:     8px;
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); }
img { max-width: 100%; }

/* ── Navigation ─────────────────────────────────────────────── */
.nav {
  background: var(--bg);
  border-bottom: 1px solid rgba(27,107,74,.09);
  position: sticky; top: 0; z-index: 200;
  /* needed so the mobile dropdown is positioned relative to the nav bar */
  isolation: isolate;
}
.nav-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 24px;
  height: 64px; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--primary);
  font-weight: 800; font-size: 21px; letter-spacing: -.3px;
}
.nav-logo img { height: 64px; width: auto; }
.nav-logo .arabic-name {
  font-family: 'Scheherazade New', serif;
  font-size: 26px; font-weight: 700;
  color: var(--accent); margin-left: 4px;
}
.nav-links { display: flex; gap: 28px; list-style: none; align-items: center; }
.nav-links a {
  text-decoration: none; color: var(--text-muted);
  font-size: 14px; font-weight: 500;
  transition: color .2s;
}
.nav-links a:hover { color: var(--primary); }
.nav-links .btn-nav {
  background: var(--primary); color: var(--bg);
  padding: 8px 18px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 13px;
}
.nav-links .btn-nav:hover { background: var(--primary-light); color: var(--white); }

/* ── Language switcher ───────────────────────────────────────── */
/* Desktop: dropdown button + floating panel */
.lang-switcher { position: relative; }
.lang-select-mobile { display: none; } /* shown only inside @media mobile */
.lang-btn {
  -webkit-appearance: none; appearance: none;
  display: flex; align-items: center; gap: 6px;
  background: rgba(27,107,74,.08);
  border: 1.5px solid rgba(27,107,74,.2);
  border-radius: var(--radius-sm);
  color: var(--primary-dark); font-family: inherit;
  font-size: 13px; font-weight: 600;
  padding: 6px 11px; cursor: pointer;
  transition: background .18s, border-color .18s, color .18s;
  white-space: nowrap;
}
.lang-btn:hover { background: rgba(27,107,74,.15); border-color: var(--primary); color: var(--primary); }
.lang-switcher.is-open .lang-btn {
  background: var(--primary); color: var(--white); border-color: var(--primary);
}
.lang-chevron { font-size: 10px; transition: transform .2s; display: inline-block; }
.lang-switcher.is-open .lang-chevron { transform: rotate(180deg); }

.lang-menu {
  display: none;
  position: absolute; top: calc(100% + 6px); right: 0;
  list-style: none !important;                /* écrase le style navigateur pour <ul> imbriqué */
  background: var(--white); border-radius: var(--radius);
  border: 1px solid rgba(27,107,74,.12);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  min-width: 160px; padding: 6px; z-index: 300;
}
.lang-switcher.is-open .lang-menu { display: block; }
.lang-menu li {
  list-style: none !important;
  border-bottom: none !important;
  padding: 0; margin: 0;
}
.lang-option {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  font-size: 13px; text-decoration: none; color: var(--text-primary);
  transition: background .15s, color .15s;
}
.lang-option:hover { background: rgba(27,107,74,.08); color: var(--primary); }
.lang-option.is-current { color: var(--primary); font-weight: 700; background: rgba(27,107,74,.05); }
.lang-code { font-weight: 800; font-size: 12px; min-width: 28px; letter-spacing: .3px; }
.lang-name { color: var(--text-muted); font-size: 12px; font-weight: 400; }

/* Burger button — hidden on desktop */
.nav-burger {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  background: none; border: none; cursor: pointer;
  padding: 8px; border-radius: var(--radius-sm);
  transition: background .15s;
}
.nav-burger:hover { background: rgba(27,107,74,.07); }
.nav-burger span {
  display: block; width: 24px; height: 2px;
  background: var(--primary-dark); border-radius: 2px;
  transition: transform .25s, opacity .25s;
  transform-origin: center;
}
/* Burger → X animation when open */
.nav.is-open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.is-open .nav-burger span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav.is-open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Container ──────────────────────────────────────────────── */
.container    { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 680px;  margin: 0 auto; padding: 0 24px; }
.container-md { max-width: 860px;  margin: 0 auto; padding: 0 24px; }

section { padding: 72px 0; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: var(--radius);
  font-weight: 600; font-size: 15px;
  text-decoration: none; cursor: pointer; border: none;
  transition: all .2s; font-family: inherit;
}
.btn-primary  { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-light); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(27,107,74,.25); }
.btn-accent   { background: var(--accent); color: var(--primary-dark); }
.btn-accent:hover { background: var(--accent-light); transform: translateY(-2px); }
.btn-outline  { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: var(--white); }
.btn-ghost    { background: rgba(27,107,74,.08); color: var(--primary); }
.btn-ghost:hover { background: rgba(27,107,74,.14); }
.btn-lg { padding: 16px 34px; font-size: 16px; border-radius: 16px; }
.btn-full { width: 100%; justify-content: center; }
.btn-danger { background: var(--error); color: var(--white); }
.btn-danger:hover { background: #c0392b; }
.btn[disabled] { opacity: .5; cursor: not-allowed; pointer-events: none; }

/* Bitcoin button */
.btn-bitcoin {
  background: linear-gradient(135deg, #f7931a, #e67e00);
  color: var(--white); font-weight: 700;
}
.btn-bitcoin:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(247,147,26,.3); }

/* ── Card ────────────────────────────────────────────────────── */
.card {
  background: var(--white); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
  border: 1px solid rgba(27,107,74,.06);
}

/* ── Alerts ──────────────────────────────────────────────────── */
.alert {
  padding: 14px 18px; border-radius: var(--radius-sm);
  font-size: 14px; margin-bottom: 20px; line-height: 1.5;
}
.alert-error   { background: rgba(231,76,60,.07); border: 1px solid #E74C3C; color: #C0392B; }
.alert-success { background: rgba(39,174,96,.07);  border: 1px solid #27AE60; color: #1E8449; }
.alert-info    { background: rgba(27,107,74,.07);  border: 1px solid rgba(27,107,74,.3); color: var(--primary); }
.alert-warning { background: rgba(243,156,18,.07); border: 1px solid var(--warning); color: #9a6600; }

/* ── Forms ───────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
input[type=email], input[type=text], input[type=number], input[type=password] {
  width: 100%; padding: 13px 16px;
  border: 1.5px solid rgba(27,107,74,.2);
  border-radius: var(--radius-sm); font-size: 15px;
  font-family: inherit; background: var(--white); color: var(--text-primary);
  transition: border-color .2s; outline: none;
}
input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(27,107,74,.1); }

/* ── Section headers ─────────────────────────────────────────── */
.section-label {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(27,107,74,.08); color: var(--primary);
  padding: 5px 14px; border-radius: 20px;
  font-size: 12px; font-weight: 700; letter-spacing: .8px;
  text-transform: uppercase; margin-bottom: 16px;
}
.section-title {
  font-size: clamp(26px, 4vw, 40px); font-weight: 800;
  color: var(--primary-dark); line-height: 1.2; letter-spacing: -.5px;
}
.section-subtitle {
  font-size: 17px; color: var(--text-muted);
  margin-top: 12px; line-height: 1.7;
  max-width: 560px;
}

/* ── Features grid ───────────────────────────────────────────── */
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  margin-top: 52px;
}
.feature-card {
  background: var(--white); border-radius: var(--radius);
  padding: 28px; border: 1px solid rgba(27,107,74,.07);
  box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(27,107,74,.13); }
.feature-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; margin-bottom: 16px;
  background: rgba(27,107,74,.09);
}
.feature-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; color: var(--primary-dark); }
.feature-card p  { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

/* ── Steps (delete flow) ─────────────────────────────────────── */
.steps {
  display: flex; gap: 0; margin-bottom: 36px; counter-reset: step;
}
.step {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  position: relative;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px;
  background: rgba(27,107,74,.1); color: var(--text-muted);
  z-index: 1;
}
.step::after {
  content: ''; position: absolute; top: 18px; left: 50%;
  width: 100%; height: 2px; background: rgba(27,107,74,.1);
}
.step:last-child::after { display: none; }
.step.active::before { background: var(--primary); color: var(--white); }
.step.done::before   { background: var(--success); color: var(--white); content: '✓'; }
.step-label {
  font-size: 12px; color: var(--text-muted); margin-top: 8px; text-align: center;
}
.step.active .step-label { color: var(--primary); font-weight: 600; }

/* ── Legal pages ─────────────────────────────────────────────── */
.legal-content h2 { font-size: 20px; font-weight: 700; margin: 36px 0 12px; color: var(--primary-dark); }
.legal-content h3 { font-size: 16px; font-weight: 600; margin: 20px 0 8px; }
.legal-content p  { margin-bottom: 14px; font-size: 15px; color: var(--text-muted); }
.legal-content ul { padding-left: 24px; margin-bottom: 14px; }
.legal-content li { font-size: 15px; color: var(--text-muted); margin-bottom: 6px; }
.legal-content a  { color: var(--primary); }
.legal-meta {
  display: flex; gap: 24px; flex-wrap: wrap;
  padding: 16px; background: rgba(27,107,74,.05);
  border-radius: var(--radius-sm); margin-bottom: 32px;
  font-size: 13px; color: var(--text-muted);
}

/* ── Donate widget (tabbed) ──────────────────────────────────── */
.donate-card { padding: 24px 28px; }

/* Donate tab styles live in support-us.php <style> block */

.donate-panel { }   /* no extra padding — card already has it */
.donate-desc {
  font-size: 14px; color: var(--text-muted);
  line-height: 1.6; margin-bottom: 20px;
}
.donate-footer-note {
  font-size: 12px; color: var(--text-muted);
  margin-top: 12px; text-align: center;
}


/* ── Support (other ways) ────────────────────────────────────── */
.divider { height: 1px; background: rgba(27,107,74,.09); margin: 40px 0; }

/* Generic 3-column responsive grid */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(160deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
  color: var(--white); padding: 48px 0 64px; overflow: hidden; position: relative;
}
.hero::after {
  content: 'صدر'; font-family: 'Scheherazade New', serif;
  font-size: 380px; font-weight: 700;
  color: rgba(255,255,255,.04);
  position: absolute; top: -60px; right: -40px;
  pointer-events: none; line-height: 1;
}
.hero-inner { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  padding: 6px 16px; border-radius: 20px; font-size: 13px; font-weight: 600;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(36px, 6vw, 60px); font-weight: 800;
  line-height: 1.08; letter-spacing: -1px; max-width: 700px;
  margin-bottom: 20px;
}
.hero h1 .arabic {
  font-family: 'Scheherazade New', serif; color: var(--accent);
  font-size: 1.2em;
}
.hero p {
  font-size: 18px; opacity: .85; max-width: 520px; line-height: 1.7; margin-bottom: 40px;
}
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 40px; margin-top: 64px; flex-wrap: wrap; }
.hero-stat-value { font-size: 32px; font-weight: 800; color: var(--accent); }
.hero-stat-label { font-size: 13px; opacity: .7; margin-top: 2px; }

/* ── App stores ──────────────────────────────────────────────── */
.store-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--white); color: var(--primary-dark);
  border-radius: var(--radius); padding: 11px 20px;
  text-decoration: none; font-weight: 600; font-size: 14px;
  border: none; transition: all .2s;
  box-shadow: 0 2px 10px rgba(0,0,0,.1);
}
.store-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.15); color: var(--primary); }
.store-btn svg { width: 24px; height: 24px; flex-shrink: 0; }

/* ── Page hero (inner pages) ─────────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--white); padding: 56px 0 48px;
}
.page-hero h1 { font-size: 36px; font-weight: 800; margin-bottom: 10px; }
.page-hero p  { font-size: 16px; opacity: .8; }

/* ── Footer ──────────────────────────────────────────────────── */
footer {
  background: var(--primary-dark); color: rgba(255,255,255,.65);
  padding: 56px 0 28px; margin-top: 80px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-brand { font-size: 22px; font-weight: 800; color: var(--white); margin-bottom: 12px; }
.footer-brand span { font-family: 'Scheherazade New', serif; color: var(--accent); font-size: 28px; }
.footer-desc { font-size: 14px; line-height: 1.7; max-width: 260px; }
.footer-col h4 { font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: rgba(255,255,255,.4); margin-bottom: 16px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: rgba(255,255,255,.6); text-decoration: none; font-size: 14px; transition: color .2s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 24px; font-size: 13px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
}

/* ── Utils ───────────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-accent  { color: var(--accent); }
.text-muted   { color: var(--text-muted); }
.font-arabic  { font-family: 'Scheherazade New', serif; }
.mt-8  { margin-top: 8px; }  .mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; } .mt-64 { margin-top: 64px; }
.mb-8  { margin-bottom: 8px; }  .mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; } .mb-32 { margin-bottom: 32px; }
.gap-8  { gap: 8px; }  .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.flex { display: flex; } .flex-center { display: flex; align-items: center; }
.w-full { width: 100%; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .features-grid  { grid-template-columns: 1fr 1fr; }
  .support-options { grid-template-columns: 1fr; }
  .footer-grid    { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; gap: 16px; }
}
@media (max-width: 640px) {
  /* Burger visible, nav links hidden by default */
  .nav-burger { display: flex; }

  .nav-links {
    display: none;
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white);
    border-bottom: 1px solid rgba(27,107,74,.1);
    box-shadow: 0 8px 24px rgba(0,0,0,.09);
    padding: 8px 0 16px; z-index: 199;
  }
  .nav.is-open .nav-links { display: flex; }

  .nav-links li { border-bottom: 1px solid rgba(27,107,74,.06); }
  .nav-links li:last-child { border-bottom: none; }

  .nav-links a {
    display: block; padding: 14px 24px;
    font-size: 15px; color: var(--primary-dark);
  }
  .nav-links a:hover { background: rgba(27,107,74,.05); }

  .nav-links .btn-nav {
    margin: 12px 24px 4px;
    display: block; text-align: center;
    padding: 12px; border-radius: var(--radius-sm);
    width: calc(100% - 48px);
  }

  /* Mobile lang: hide desktop dropdown, show native select */
  .lang-btn  { display: none; }
  .lang-menu { display: none !important; }
  .lang-select-mobile {
    display: block;
    width: calc(100% - 48px); margin: 10px 24px 14px;
    padding: 10px 14px;
    font-family: inherit; font-size: 14px; font-weight: 600;
    color: var(--primary-dark);
    background: var(--white);
    border: 1.5px solid rgba(27,107,74,.25);
    border-radius: var(--radius-sm);
    cursor: pointer;
    appearance: auto;
  }

  /* Other mobile adjustments */
  .features-grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; gap: 12px; }
  .hero-btns { flex-direction: column; }
  .hero-stats { gap: 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .steps { flex-direction: column; gap: 12px; }
  .step::after { display: none; }
  section { padding: 48px 0; }
}
