/* SudanHD – Bootstrap 5 RTL theme
   Load AFTER Bootstrap CSS. Do not include any older style.css after this. */

:root{
  --brand:   #2e4e96;
  --brand-2: #f4b740;
  --ink-1:   #0f172a;
  --ink-2:   #475569;
  --bg-1:    #f7f9fc;
  --card:    #ffffff;
  --ring:    0 8px 24px rgba(15, 23, 42, .06);
  --ring-2:  0 10px 30px rgba(15, 23, 42, .08);
}

/* ---------- Base / reset ---------- */
body{
  background:var(--bg-1) !important;
  color:var(--ink-2) !important;
  font-family:'Cairo', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans Arabic", Arial, sans-serif;
  direction: rtl;
  text-align: right;
}
table, td, th{ background:transparent; color:inherit; }

/* Links */
a{ color:inherit; text-decoration:none !important; }
a:hover, a:focus, a:active{ text-decoration:none !important; }

/* Neutralize some legacy backgrounds if they exist */
.tablepage, .tablepage_header, .tableheadmem, .tableheadpage, .tableviewblog{
  background:#fff !important; color:var(--ink-2) !important;
}

/* Kill legacy table-based menu that used #nav (NOT our Bootstrap nav) */
#nav, #nav *{ all:unset; }

/* ------------------------------- NAVBAR ---------------------------------- */
.navbar{
  background:var(--brand);
  --bs-navbar-brand-color:#fff;
  --bs-navbar-color:#e8eefc;
  --bs-navbar-hover-color:#fff;
  --bs-navbar-brand-hover-color:#fff;
  --bs-navbar-toggler-border-color:rgba(255,255,255,.25);
  padding-top:.5rem !important;
  padding-bottom:.5rem !important;
}
.navbar .navbar-brand,
.navbar .nav-link{ color:#fff !important; font-weight:600; }
.navbar .nav-link:hover{ color:var(--brand-2) !important; }

.navbar .navbar-toggler{
  margin:0 !important;
  padding:.35rem .6rem;
  border-radius:.5rem;
}
.navbar .navbar-toggler-icon{
  background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Keep menu items right-aligned when expanded */
.navbar .navbar-collapse{ justify-content:flex-end !important; }

/* Language buttons */
.lang-switch .btn{ border-radius:.65rem; font-weight:700; padding:.35rem .6rem; }
.lang-switch .btn-warning{ background:var(--brand-2); border-color:var(--brand-2); color:#1b1b1b; }

/* ------------------------------- HERO ------------------------------------ */
.hero{
  background:var(--card);
  border-radius:18px;
  padding:24px;
  box-shadow:var(--ring);
}
.hero .form-control-lg,
.hero .form-select-lg{ border-radius:.9rem; }

/* ----------------------------- STAT PILLS -------------------------------- */
.stat-pill{
  background:#eef3ff;
  color:#1d3669;
  border-radius:12px;
  padding:.45rem .75rem;
  font-size:.9rem;
  display:inline-flex;
  align-items:center;
  gap:.35rem;
}

/* -------------------------------- CARDS ---------------------------------- */
.card{
  background:var(--card);
  border:0;
  border-radius:16px;
  box-shadow:var(--ring);
  transition:box-shadow .2s ease, transform .12s ease;
}
.card:hover{ box-shadow:var(--ring-2); transform:translateY(-1px); }
.card .badge{ font-weight:600; }

/* Subtle badges (consistent) */
.bg-primary-subtle   { background:#e8efff !important; color:#2448a3 !important; }
.bg-warning-subtle   { background:#fff3d6 !important; color:#8a5a00 !important; }
.bg-success-subtle   { background:#e6f6ee !important; color:#12784a !important; }
.bg-secondary-subtle { background:#f0f2f5 !important; color:#5b6472 !important; }

/* Chips */
.chip{
  background:#eef2f7;
  color:#334155;
  border-radius:999px;
  padding:.35rem .6rem;
  font-size:.82rem;
  display:inline-flex;
  align-items:center;
  gap:.35rem;
}

/* Section title + link */
.section-title{ display:flex; align-items:center; gap:.5rem; margin:0 0 .75rem; }
.section-title i{ color:var(--brand-2); font-size:1.15rem; }
.link-more{ color:var(--brand); }
.link-more:hover{ color:#1d3669; }

/* Partner logos */
.partner-logos img{
  max-height:56px; width:auto; object-fit:contain;
  filter:saturate(.95) contrast(1.02);
}

/* Forms nicer focus */
.form-control, .form-select{ border-color:#e6e9ef; }
.form-control:focus, .form-select:focus{
  border-color:#b9c6ff;
  box-shadow:0 0 0 .2rem rgba(46,78,150,.12);
}

/* Utilities */
.text-muted{ color:#7b8794 !important; }
.rounded-12{ border-radius:12px !important; }
.rounded-16{ border-radius:16px !important; }
.rounded-18{ border-radius:18px !important; }
section{ scroll-margin-top:80px; }

/* ------------------ RTL Layout / Mobile Padding Fix ------------------ */
body[dir="rtl"] .container,
body[dir="rtl"] .card,
body[dir="rtl"] section,
body[dir="rtl"] .hero {
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}

/* Fix for mobile */
@media (max-width: 576px) {
  body[dir="rtl"] .container,
  body[dir="rtl"] .card,
  body[dir="rtl"] .hero {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }
}

/* Prevent cards from touching screen edge */
@media (max-width: 576px) {
  .card, .hero { margin: 0 .25rem 1rem .25rem !important; }
}
