/* ── Variables ──────────────────────────────────────────────────────────── */
:root {
  --navy: #0a1628;
  --navy-mid: #0f2040;
  --navy-light: #1a3260;
  --gold: #c9a84c;
  --gold-light: #e8c86a;
  --gold-dim: #8a6e2e;
  --white: #ffffff;
  --off-white: #f5f4f0;
  --muted: #8899aa;
  --text: #1a1a2e;
  --border: rgba(201,168,76,0.18);
  --radius: 10px;
  --radius-lg: 18px;
  --shadow: 0 4px 32px rgba(10,22,40,0.18);
}

/* ── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'DM Sans', sans-serif; color: var(--text); background: var(--white); line-height: 1.7; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1,h2,h3,h4,h5 { font-family: 'Syne', sans-serif; line-height: 1.2; }
input, textarea, select, button { font-family: inherit; }

/* ── Nav ─────────────────────────────────────────────────────────────────── */
.site-nav { background: var(--navy); position: sticky; top: 0; z-index: 100; border-bottom: 1px solid var(--border); }
.nav-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; height: 68px; display: flex; align-items: center; gap: 32px; }
.logo { display: flex; align-items: baseline; gap: 2px; }
.logo-amged { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 22px; color: var(--white); letter-spacing: 2px; }
.logo-inc { font-family: 'Syne', sans-serif; font-weight: 400; font-size: 14px; color: var(--gold); letter-spacing: 4px; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-links a { color: rgba(255,255,255,0.75); padding: 8px 12px; border-radius: 6px; font-size: 14px; font-weight: 500; transition: color .2s, background .2s; }
.nav-links a:hover { color: var(--gold); background: rgba(201,168,76,0.08); }
.nav-admin { color: var(--gold) !important; }
.nav-btn { display: inline-flex; align-items: center; padding: 8px 18px; border-radius: 6px; font-size: 14px; font-weight: 600; border: none; cursor: pointer; transition: all .2s; }
.nav-btn-ghost { color: rgba(255,255,255,0.75) !important; border: 1px solid rgba(255,255,255,0.2); background: transparent; }
.nav-btn-ghost:hover { border-color: var(--gold); color: var(--gold) !important; }
.nav-btn-gold { background: var(--gold); color: var(--navy) !important; }
.nav-btn-gold:hover { background: var(--gold-light); }
.nav-toggle { display: none; background: none; border: none; color: var(--white); font-size: 20px; cursor: pointer; margin-left: auto; }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero { background: var(--navy); color: var(--white); padding: 100px 24px 80px; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 70% 60% at 70% 50%, rgba(201,168,76,0.10) 0%, transparent 70%); pointer-events: none; }
.hero-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; position: relative; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; background: rgba(201,168,76,0.12); border: 1px solid var(--border); color: var(--gold); padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 24px; }
.hero h1 { font-size: clamp(36px, 5vw, 62px); font-weight: 800; line-height: 1.08; margin-bottom: 24px; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero-sub { font-size: 18px; color: rgba(255,255,255,0.65); line-height: 1.7; margin-bottom: 40px; max-width: 480px; }
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }
.btn-primary { display: inline-flex; align-items: center; gap: 8px; background: var(--gold); color: var(--navy); padding: 14px 28px; border-radius: 8px; font-weight: 700; font-size: 15px; transition: background .2s, transform .15s; }
.btn-primary:hover { background: var(--gold-light); transform: translateY(-1px); }
.btn-outline { display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,0.25); color: var(--white); padding: 14px 28px; border-radius: 8px; font-weight: 600; font-size: 15px; transition: border-color .2s, color .2s; }
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--border); }
.hero-stat-num { font-family: 'Syne', sans-serif; font-size: 36px; font-weight: 800; color: var(--gold); }
.hero-stat-label { font-size: 13px; color: var(--muted); margin-top: 4px; }
.hero-visual { display: flex; flex-direction: column; gap: 16px; }
.hero-card { background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; transition: border-color .2s; }
.hero-card:hover { border-color: var(--gold); }
.hero-card-icon { width: 44px; height: 44px; background: rgba(201,168,76,0.12); border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; color: var(--gold); font-size: 20px; }
.hero-card h3 { font-size: 16px; color: var(--white); margin-bottom: 6px; }
.hero-card p { font-size: 13px; color: var(--muted); line-height: 1.5; }

/* ── Section commons ─────────────────────────────────────────────────────── */
.section { padding: 96px 24px; }
.section-dark { background: var(--navy); color: var(--white); }
.section-alt { background: var(--off-white); }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-label { font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.section-title { font-size: clamp(26px, 3.5vw, 42px); font-weight: 800; margin-bottom: 16px; }
.section-sub { font-size: 17px; color: var(--muted); max-width: 560px; line-height: 1.7; margin-bottom: 56px; }
.section-dark .section-title { color: var(--white); }
.section-dark .section-sub { color: rgba(255,255,255,0.55); }

/* ── Grid ────────────────────────────────────────────────────────────────── */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card { background: var(--white); border: 1px solid rgba(0,0,0,0.07); border-radius: var(--radius-lg); overflow: hidden; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.card-body { padding: 28px; }
.card-icon { width: 48px; height: 48px; background: rgba(201,168,76,0.1); border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 18px; color: var(--gold); font-size: 22px; }
.card h3 { font-size: 18px; margin-bottom: 10px; }
.card p { font-size: 14px; color: #555; line-height: 1.7; }
.card-dark { background: rgba(255,255,255,0.04); border: 1px solid var(--border); color: var(--white); }
.card-dark h3 { color: var(--white); }
.card-dark p { color: rgba(255,255,255,0.55); }

/* ── Blog card ───────────────────────────────────────────────────────────── */
.blog-card { background: var(--white); border: 1px solid rgba(0,0,0,0.07); border-radius: var(--radius-lg); overflow: hidden; transition: box-shadow .2s, transform .2s; }
.blog-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.blog-card img { height: 200px; width: 100%; object-fit: cover; }
.blog-card-body { padding: 24px; }
.blog-card h3 { font-size: 17px; margin-bottom: 10px; line-height: 1.4; }
.blog-card p { font-size: 14px; color: #666; line-height: 1.6; }
.blog-card-meta { font-size: 12px; color: var(--muted); margin-top: 16px; display: flex; gap: 12px; }

/* ── Contact / Form ──────────────────────────────────────────────────────── */
.contact-wrap { display: grid; grid-template-columns: 1fr 1.4fr; gap: 64px; align-items: start; }
.contact-info h3 { font-size: 22px; color: var(--white); margin-bottom: 16px; }
.contact-info p { color: rgba(255,255,255,0.6); line-height: 1.8; margin-bottom: 32px; }
.contact-detail { display: flex; align-items: center; gap: 14px; color: rgba(255,255,255,0.7); margin-bottom: 14px; font-size: 15px; }
.contact-detail i { color: var(--gold); width: 20px; }
.contact-form-card { background: var(--white); border-radius: var(--radius-lg); padding: 40px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: #444; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select { width: 100%; border: 1.5px solid #e0e0e0; border-radius: 8px; padding: 12px 16px; font-size: 15px; transition: border-color .2s; background: #fafafa; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: none; border-color: var(--gold); background: var(--white); }
.form-group textarea { min-height: 120px; resize: vertical; }
.btn-submit { width: 100%; background: var(--navy); color: var(--white); border: none; padding: 15px; border-radius: 8px; font-size: 15px; font-weight: 700; cursor: pointer; transition: background .2s; display: flex; align-items: center; justify-content: center; gap: 10px; }
.btn-submit:hover { background: var(--navy-light); }
.form-success { display: none; background: #e8f5e9; color: #2e7d32; border-radius: 8px; padding: 16px; text-align: center; font-weight: 600; margin-top: 16px; }
.form-error { display: none; background: #fdecea; color: #c62828; border-radius: 8px; padding: 16px; text-align: center; margin-top: 16px; }

/* ── Forum ───────────────────────────────────────────────────────────────── */
.forum-hero { background: var(--navy); padding: 60px 24px 40px; color: var(--white); text-align: center; }
.forum-hero h1 { font-size: 40px; color: var(--white); }
.forum-hero p { color: var(--muted); margin-top: 10px; }
.forum-categories { max-width: 900px; margin: 40px auto; padding: 0 24px; }
.forum-cat { display: flex; align-items: center; gap: 20px; background: var(--white); border: 1px solid rgba(0,0,0,0.08); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 16px; text-decoration: none; color: var(--text); transition: box-shadow .2s, border-color .2s; }
.forum-cat:hover { box-shadow: var(--shadow); border-color: var(--gold); }
.forum-cat-icon { width: 52px; height: 52px; background: rgba(201,168,76,0.1); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; color: var(--gold); flex-shrink: 0; }
.forum-cat-info { flex: 1; }
.forum-cat-info h3 { font-size: 17px; margin-bottom: 4px; }
.forum-cat-info p { font-size: 14px; color: var(--muted); }
.forum-cat-meta { font-size: 13px; color: var(--muted); text-align: right; }
.forum-cat-meta strong { display: block; font-size: 18px; color: var(--navy); font-family: 'Syne', sans-serif; }
.lang-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 12px; font-size: 11px; font-weight: 700; }
.lang-en { background: rgba(59,130,246,0.1); color: #1d4ed8; }
.lang-ar { background: rgba(201,168,76,0.12); color: var(--gold-dim); }
.forum-post-list { max-width: 900px; margin: 0 auto; padding: 24px; }
.forum-post-item { display: flex; align-items: center; gap: 16px; padding: 18px 0; border-bottom: 1px solid rgba(0,0,0,0.06); text-decoration: none; color: var(--text); transition: color .15s; }
.forum-post-item:hover .post-title { color: var(--gold-dim); }
.post-pin { color: var(--gold); font-size: 14px; }
.post-title { font-size: 15px; font-weight: 600; flex: 1; }
.post-meta-sm { font-size: 12px; color: var(--muted); }
.reply-box { background: var(--off-white); border-radius: var(--radius-lg); padding: 28px; margin-top: 32px; }
.reply-box h3 { margin-bottom: 16px; font-size: 18px; }
.reply-item { background: var(--white); border: 1px solid rgba(0,0,0,0.06); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.reply-author { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.reply-content { font-size: 15px; line-height: 1.7; }
.accepted { border-left: 4px solid #22c55e; }
.accepted-badge { background: #22c55e; color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 700; }

/* ── Admin ───────────────────────────────────────────────────────────────── */
.admin-layout { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - 68px); }
.admin-sidebar { background: var(--navy); padding: 32px 0; }
.admin-sidebar a { display: flex; align-items: center; gap: 10px; padding: 12px 24px; color: rgba(255,255,255,0.65); font-size: 14px; transition: color .15s, background .15s; }
.admin-sidebar a:hover, .admin-sidebar a.active { color: var(--gold); background: rgba(201,168,76,0.08); }
.admin-sidebar .sidebar-head { padding: 0 24px 24px; font-size: 11px; font-weight: 700; letter-spacing: 2px; color: var(--muted); text-transform: uppercase; }
.admin-content { padding: 40px; background: var(--off-white); }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 20px; margin-bottom: 40px; }
.admin-stat { background: var(--white); border-radius: var(--radius); padding: 24px; }
.admin-stat-num { font-family: 'Syne', sans-serif; font-size: 32px; font-weight: 800; color: var(--navy); }
.admin-stat-label { font-size: 13px; color: var(--muted); margin-top: 4px; }
.admin-stat-new { border-top: 3px solid var(--gold); }
table.admin-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; }
.admin-table th { background: var(--navy); color: var(--white); padding: 12px 16px; text-align: left; font-size: 13px; }
.admin-table td { padding: 12px 16px; border-bottom: 1px solid #f0f0f0; font-size: 14px; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 700; }
.badge-new { background: rgba(201,168,76,0.15); color: var(--gold-dim); }
.badge-contacted { background: rgba(59,130,246,0.1); color: #1d4ed8; }
.badge-qualified { background: rgba(34,197,94,0.1); color: #15803d; }
.badge-converted { background: rgba(34,197,94,0.2); color: #15803d; }
.badge-archived { background: rgba(0,0,0,0.06); color: #666; }

/* ── Newsletter ──────────────────────────────────────────────────────────── */
.newsletter-bar { background: var(--navy-mid); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 56px 24px; text-align: center; }
.newsletter-bar h3 { font-size: 26px; color: var(--white); margin-bottom: 8px; }
.newsletter-bar p { color: var(--muted); margin-bottom: 28px; }
.newsletter-form { display: flex; gap: 12px; max-width: 480px; margin: 0 auto; }
.newsletter-form input { flex: 1; border: 1.5px solid var(--border); background: rgba(255,255,255,0.06); color: var(--white); padding: 13px 18px; border-radius: 8px; font-size: 15px; }
.newsletter-form input::placeholder { color: var(--muted); }
.newsletter-form button { background: var(--gold); color: var(--navy); padding: 13px 24px; border: none; border-radius: 8px; font-weight: 700; font-size: 15px; cursor: pointer; white-space: nowrap; transition: background .2s; }
.newsletter-form button:hover { background: var(--gold-light); }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer { background: var(--navy); color: rgba(255,255,255,0.6); padding: 72px 24px 0; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 48px; padding-bottom: 56px; }
.footer-brand .logo-amged { font-size: 24px; }
.footer-brand p { font-size: 13px; color: var(--muted); margin-top: 12px; line-height: 1.7; }
.footer-col h4 { font-family: 'Syne', sans-serif; font-size: 13px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold); margin-bottom: 18px; }
.footer-col a { display: block; font-size: 13px; color: rgba(255,255,255,0.55); margin-bottom: 10px; transition: color .15s; }
.footer-col a:hover { color: var(--gold); }
.footer-social { display: flex; gap: 14px; margin-top: 16px; }
.footer-social a { font-size: 18px; color: rgba(255,255,255,0.4); transition: color .15s; }
.footer-social a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid var(--border); padding: 20px 0; max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; font-size: 13px; }
.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: var(--gold); }

/* ── Utilities ───────────────────────────────────────────────────────────── */
.text-gold { color: var(--gold); }
.text-center { text-align: center; }
.mt-auto { margin-top: auto; }
.tag { display: inline-block; background: rgba(201,168,76,0.1); color: var(--gold-dim); padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; margin: 2px; }
.page-hero { background: var(--navy); color: var(--white); padding: 72px 24px 56px; }
.page-hero h1 { font-size: clamp(30px, 4vw, 52px); font-weight: 800; }
.page-hero p { color: var(--muted); font-size: 18px; margin-top: 12px; }
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.breadcrumb a { color: var(--gold); }

/* ── Markdown content ────────────────────────────────────────────────────── */
.prose h2 { font-size: 24px; margin: 32px 0 12px; }
.prose h3 { font-size: 19px; margin: 24px 0 10px; }
.prose p { margin-bottom: 18px; line-height: 1.8; }
.prose ul, .prose ol { margin: 0 0 18px 24px; }
.prose li { margin-bottom: 6px; line-height: 1.7; }
.prose code { background: #f3f4f6; padding: 2px 6px; border-radius: 4px; font-size: 14px; }
.prose pre { background: var(--navy); color: #e2e8f0; padding: 20px 24px; border-radius: var(--radius); overflow-x: auto; margin-bottom: 20px; }
.prose blockquote { border-left: 4px solid var(--gold); padding-left: 20px; color: #555; margin: 20px 0; font-style: italic; }
.prose a { color: var(--gold-dim); text-decoration: underline; }

/* ── RTL support ─────────────────────────────────────────────────────────── */
[dir="rtl"] { font-family: 'DM Sans', 'Segoe UI', Tahoma, sans-serif; }
[dir="rtl"] .forum-cat { flex-direction: row-reverse; text-align: right; }
[dir="rtl"] .forum-cat-meta { text-align: left; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .contact-wrap { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
}
@media (max-width: 640px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0; background: var(--navy); padding: 16px; border-top: 1px solid var(--border); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .form-row { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
}
