/* =========================================================
   RESET
========================================================= */

/* ===================== TOKENS ===================== */
:root {
  --bg: #060a16;
  --bg-alt: hsl(225, 56%, 7%);
  --surface: #0d1428;
  --surface-2: #111a33;
  --border: #1b2440;
  --border-soft: #161f38;
  --purple: #6f03ad;
  --purple-2: #9941fd;
  --purple-deep: #6f029b98;
  --cyan: #06c2db;
  --text: #f3f5fb;
  --text-dim: #a6adc4;
  --text-mute: #6b738f;
  --green: #02fa72;
  --font: "Cairo", "Tajawal", sans-serif;
  --neon-green: #00ff88;
  --neon-glow: rgba(0, 255, 136, 0.25);

  /* ---- Unified type scale (was scattered 8px/9px/10px/11px/13px) ---- */
  --fs-2xs: 11px; /* chips, tiny meta */
  --fs-xs: 11.5px; /* small labels, captions */
  --fs-sm: 12.5px; /* nav links, buttons, secondary text */
  --fs-base: 13.5px; /* body copy / paragraphs */
  --fs-md: 14.5px; /* card titles */
  --fs-lg: 16px; /* section headings */
  --fs-xl: 22px; /* page title */
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden !important;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}
a {
  text-decoration: none;
  color: inherit;
}
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  font-size: var(--fs-sm);
}
ul {
  list-style: none;
}

p {
  font-size: var(--fs-base);
  line-height: 1.6;
}

/* Icons: give every Bootstrap Icon a consistent baseline so mixed
   icon+text rows (nav, buttons, metrics, info list) line up instead
   of sitting at whatever size the surrounding text happens to be. */
.bi {
  line-height: 1;
  vertical-align: -0.125em;
  flex-shrink: 0;
}

.container {
  max-width: 1800px;
  margin: 0 auto;
  padding: 0 30px;
}

.container-fluid {
  width: 100%;
  padding: 0 30px;
}

/* ===================== BUTTONS ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 25px !important;
  border-radius: 10px;
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
  white-space: nowrap;
}
.btn svg,
.btn .bi {
  flex-shrink: 0;
}
.btn--primary {
  background: linear-gradient(
    135deg,
    var(--purple) 0%,
    var(--purple-deep) 100%
  );
  color: #fff;
  box-shadow: 0 8px 24px -8px rgba(124, 92, 255, 0.65);
  display: inline-flex;
}
.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px -6px rgba(124, 92, 255, 0.8);
}
.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn--ghost:hover {
  border-color: var(--purple-2);
}
.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn--outline:hover {
  border-color: var(--purple-2);
  background: rgba(124, 92, 255, 0.06);
}
.btn--lg {
  padding: 14px 26px;
  font-size: 15px;
}
.btn--block {
  width: 100%;
  margin-top: 18px;
}

/* ===================== HEADER ===================== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(6, 10, 22, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 24px;
  padding: 20px 30px;
  direction: ltr !important;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  width: 200px;
}
.brand__logo {
  width: 48px;
  height: 48px;
  border: 2px solid #8d2bdf;
  clip-path: polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
  display: grid;
  place-items: center;
  color: #f8f7f8;
  font-weight: 800;
  font-size: 17px;
  background: rgb(104, 3, 236);
  flex-shrink: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 30px;
  flex: 1;
  justify-content: center;
  direction: rtl !important;
}
.nav__link {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-dim);
  transition: color 0.15s ease;
  position: relative;
  background: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
}
.nav__link:hover {
  color: var(--text);
}
.nav__link--active {
  color: var(--text);
}
.nav__link--active::after {
  content: "";
  position: absolute;
  right: 0;
  left: 0;
  bottom: -27px;
  height: 2px;
  background: linear-gradient(90deg, var(--purple), var(--cyan));
}
.header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--text-dim);
  font-size: var(--fs-sm);
  font-weight: 600;
  padding: 8px 4px;
}
.lang-switch .chev {
  opacity: 0.6;
}
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  padding: 6px;
  flex-shrink: 0;
}
.burger span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.2s ease;
}
.burger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.burger.is-open span:nth-child(2) {
  opacity: 0;
}
.burger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Buttons duplicated inside the mobile hamburger menu.
   Hidden everywhere by default; only revealed on small screens
   when the mobile nav is open (see the 860px media query). */
.nav__mobile-actions {
  display: none;
}
.nav__mobile-btn-wrap {
  display: block;
  width: 100%;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.02fr 1.22fr;
  gap: 20px;
  padding: 9px 22px 0;
  direction: ltr;
}
.map-card,
.overview {
  direction: rtl;
}
.map-card {
  height: 440px;
  border: 1px solid #20283b;
  border-radius: 9px;
  overflow: hidden;
  position: relative;
  background: #030918;
  box-shadow: inset 0 0 30px rgba(71, 39, 130, 0.06);
}
.map-card > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.76;
  filter: saturate(1.15);
}
.compare {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 2;
  background: #071022;
  border: 1px solid #30384e;
  color: #ddd;
  border-radius: 6px;
  padding: 5px 14px;
  font-family: inherit;
  padding-bottom: 10px;
}
.compare b {
  color: #bc61ff;
  font-size: 20px;
  margin-right: 8px;
  text-align: center;
}
.map-tools {
  position: absolute;
  z-index: 2;
  right: 16px;
  top: 84px;
  display: flex;
  flex-direction: column;
  background: #071022;
  border: 1px solid #30384e;
  border-radius: 7px;
  overflow: hidden;
}
.map-tools button {
  width: 40px;
  height: 42px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #222c43;
  color: #bcb9c8;
  font-size: 18px;
}
.map-tools .selected {
  background: #6722c9;
  color: #fff;
}
.map-score {
  position: absolute;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.map-score b {
  width: 40px;
  height: 40px;
  border: 2px solid #7c25e6;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #070b1a;
  font-size: 15px;
  box-shadow: 0 0 16px rgba(143, 43, 255, 0.45);
}
.map-score span {
  font-size: 9px;
  text-align: center;
  line-height: 1.4;
  color: #eee;
}
.score3 b {
  width: 52px;
  height: 52px;
  border: 3px solid #8b2cff;
  font-size: 19px;
}
.score1 {
  top: 62px;
  left: 47%;
}
.score2 {
  top: 90px;
  left: 67%;
}
.score3 {
  top: 167px;
  left: 52%;
}
.score4 {
  top: 175px;
  left: 32%;
}
.score5 {
  top: 197px;
  right: 17%;
}
.score6 {
  bottom: 68px;
  left: 37%;
}
.score7 {
  bottom: 63px;
  left: 57%;
}
.legend {
  position: absolute;
  bottom: 12px;
  right: 24px;
  display: flex;
  gap: 9px;
  font-size: 8px;
  color: #aaa;
}
.legend:before {
  content: "";
  position: absolute;
  bottom: 15px;
  right: 0;
  width: 155px;
  height: 7px;
  background: linear-gradient(
    90deg,
    #151b46,
    #2d1a75,
    #5c21a7,
    #8630c8,
    #b04aff
  );
  transform: translateY(-14px);
}
.overview {
  padding: 0 0 0 0;
}
.crumb {
  font-size: 10px;
  color: #858397;
  margin: 6px 0 8px;
}

.crumb a {
  text-decoration: none;
  color: #858397;
}

.title-row {
  display: flex;
  gap: 10px;
}
.back,
.bookmark {
  background: #071022;
  border: 1px solid #2a3247;
  color: #eee;
  border-radius: 6px;
  padding: 8px 13px;
  font-family: inherit;
}

.back a {
  text-decoration: none;
  color: rgb(170, 1, 248);
}
.bookmark {
  width: 42px;
  color: #ad63ff;
}
.heading {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  margin-top: 2px;
}
.heading h1 {
  font-size: 30px;
  margin: 0;
}
.pin {
  color: #b13fff;
  font-size: 32px;
}
.subtitle {
  margin: 0;
  color: #d6d1dc;
  font-size: 13px;
}
.intro {
  color: #a8a5b4;
  line-height: 1.9;
  max-width: 660px;
  margin: 8px 0 13px;
}
.stats4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.stats4 div {
  background: #071022;
  border: 1px solid #172039;
  padding: 12px;
  text-align: center;
  border-radius: 8px;
}
.stats4 span {
  display: block;
  color: #a204fd;
  font-size: 10px;
  margin-bottom: 4px;
}
.stats4 b {
  font-size: 12px;
}
.kpis {
  margin-top: 11px;
  border: 1px solid #1a2338;
  border-radius: 8px;
  background: #050b19;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-height: 86px;
}
.kpis > div {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border-left: 1px solid #1b2438;
}
.kpis > div:last-child {
  border-left: 0;
}
.kpis b {
  font-size: 19px;
}
.kpis small {
  font-size: 9px;
  color: #aa01f8;
  text-align: center;
}
.ring-kpi {
  position: relative;
}
.ring-kpi svg {
  width: 38px;
  position: absolute;
  right: 15px;
  top: 16px;
}
.ring-kpi circle {
  fill: none;
  stroke: #243044;
  stroke-width: 4;
}
.ring-kpi .ring-progress {
  stroke: #3dd3a5;
  stroke-dasharray: 95 107;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}
.ring-kpi b {
  padding-right: 48px;
}
.ring-kpi span {
  font-size: 8px;
  color: #aaa6b5;
}
.tabs {
  display: flex;
  gap: 27px;
  border-bottom: 1px solid #222a3c;
  margin-top: 13px;
  height: 42px;
  align-items: end;
}
.tabs button {
  height: 100%;
  background: none;
  border: 0;
  color: #bbb7c4;
  font-family: inherit;
  font-size: 11px;
  padding: 0 1px;
  position: relative;
}
.tabs button.active {
  color: #fff;
}
.tabs button.active:after {
  content: "";
  position: absolute;
  height: 2px;
  background: #a32fff;
  bottom: -1px;
  right: 0;
  left: 0;
}
.cards-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1.18fr 1.18fr 1.25fr;
  gap: 9px;
  padding: 12px 22px 0;
  direction: ltr;
}
.panel {
  direction: rtl;
  border: 1px solid #1b2539;
  border-radius: 8px;
  background: linear-gradient(180deg, #050c1a, #040a16);
  padding: 14px;
  min-height: 250px;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.panel-head h3 {
  font-size: 12px;
  margin: 0;
}
.panel-head span {
  color: #7d2fff;
}
.risk {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  align-items: center;
  gap: 7px;
  padding: 7px 0;
  border-bottom: 1px solid #151e31;
  font-size: 9px;
}
.risk i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.risk b {
  font-weight: 500;
  color: #70d7a7;
}
.risk:nth-child(3) b,
.risk:nth-child(5) b {
  color: #d5c24b;
}
.low {
  background: #b22d71;
}
.med {
  background: #ef742b;
}
.med2 {
  background: #e7ce34;
}
.med3 {
  background: #a5c734;
}
.safe {
  background: #61c94f;
}
.outline {
  margin-top: 10px;
  width: 100%;
  background: #070e20;
  border: 1px solid #6425ae;
  border-radius: 5px;
  color: #c78aff;
  font-family: inherit;
  padding: 7px;
  font-size: 9px;
}
.barrow {
  height: 34px;
  border-bottom: 1px solid #151e31;
  position: relative;
  padding-top: 5px;
}
.barrow span {
  font-size: 9px;
}
.barrow b {
  float: left;
  font-size: 10px;
}
.barrow em {
  position: absolute;
  bottom: 0;
  right: 0;
  height: 2px;
  background: #2b9fd3;
  opacity: 0.85;
}
.spark {
  width: 100%;
  height: 54px;
}
.spark polyline {
  fill: none;
  stroke: #a341ff;
  stroke-width: 2;
}
.spark .spark2 {
  stroke: #27334d;
  stroke-width: 1;
}
.metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
  font-size: 9px;
}
.metric b {
  color: #aaa5ff;
}
.metric .green {
  color: #65dc89;
}
.metric .yellow {
  color: #f0d34b;
}
.donut-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.donut {
  width: 115px;
  height: 145px;
  transform: rotate(-90deg);
}
.donut circle {
  fill: none;
  stroke-width: 20;
}
.donut-bg {
  stroke: #10192a;
}
.seg {
  stroke-linecap: butt;
}
.s1 {
  stroke: #27aaa8;
}
.s2 {
  stroke: #e3d63d;
}
.s3 {
  stroke: #9bc53a;
}
.s4 {
  stroke: #6f7bcb;
}
.s5 {
  stroke: #7130d2;
}
.s6 {
  stroke: #3e1a96;
}
.sector-list {
  flex: 1;
}
.sector-list p {
  font-size: 8px;
  margin: 5px 0;
  color: #aaa7b4;
  display: flex;
  align-items: center;
  gap: 6px;
}
.sector-list p b {
  margin-right: auto;
  color: #ddd;
}
.sector-list i {
  width: 6px;
  height: 6px;
  border-radius: 1px;
}
.c1 {
  background: #27aaa8;
}
.c2 {
  background: #e3d63d;
}
.c3 {
  background: #9bc53a;
}
.c4 {
  background: #6f7bcb;
}
.c5 {
  background: #7130d2;
}
.c6 {
  background: #3e1a96;
}
.about ul {
  padding: 0;
  margin: 12px 0 22px;
  list-style: none;
}
.about li {
  font-size: 9px;
  border-bottom: 1px solid #151e31;
  padding: 9px 0;
  color: #d3cfda;
}
.about li:before {
  content: "◇";
  color: #a64aff;
  margin-left: 7px;
}
.opps {
  margin: 14px 22px 30px;
  border: 1px solid #1b2539;
  border-radius: 8px;
  padding: 10px 12px 13px;
  background: #040a16;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.section-head h2 {
  font-size: 12px;
  margin: 0;
}
.section-head a {
  font-size: 10px;
  color: #b968ff;
}
.opp-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-top: 9px;
}
.opp {
  position: relative;
  border: 1px solid #222c40;
  border-radius: 7px;
  overflow: hidden;
  background: #050b18;
}
.thumb {
  height: 93px;
  background-size: cover;
  background-position: center;
}

.thumb img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.t1 {
  background:
    linear-gradient(135deg, #13253c, #0b0f1b), url("map-placeholder.png");
}
.t2 {
  background: linear-gradient(135deg, #3d2a22, #0b111d);
}
.t3 {
  background: linear-gradient(135deg, #062f4a, #071226);
}
.t4 {
  background: linear-gradient(135deg, #3b443b, #10151b);
}
.t5 {
  background: linear-gradient(135deg, #514033, #0b101a);
}
.tag {
  position: absolute;
  top: 7px;
  right: 7px;
  padding: 4px 7px;
  border-radius: 4px;
  color: #fff;
  font-size: 8px;
  background: #17306d;
}
.tag.purple {
  background: #6332a5;
}
.tag.cyan {
  background: #075d77;
}
.tag.teal {
  background: #176c72;
}
.tag.green {
  background: #315d58;
}
.mini {
  position: absolute;
  top: 7px;
  left: 7px;
  background: none;
  border: 0;
  color: #fff;
  font-size: 15px;
}
.opp h3 {
  font-size: 11px;
  margin: 7px 10px 0;
}
.opp p {
  font-size: 8px;
  color: #aaa6b4;
  margin: 1px 10px 9px;
}
.opp footer {
  border-top: 1px solid #151e31;
  display: grid;
  grid-template-columns: 1fr 1fr 36px;
  align-items: center;
  padding: 7px 10px;
}
.opp footer b {
  font-size: 11px;
}
.opp footer small {
  display: block;
  color: #8d8998;
  font-size: 7px;
  font-weight: 400;
}
.opp footer strong {
  width: 31px;
  height: 31px;
  border: 1px solid #28384a;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  color: #ddd;
}

/* =========================================================
   PROFESSIONAL MOBILE RESPONSIVE
   ========================================================= */

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  body {
    font-size: 12px;
  }

  .topbar {
    height: 68px;
    padding: 0 16px;
    gap: 18px;
  }

  .brand {
    min-width: 200px;
  }

  .topbar nav {
    gap: 18px;
  }

  .topbar nav a {
    font-size: 11px;
  }

  .actions {
    gap: 7px;
  }

  .actions button {
    padding: 8px 12px;
    font-size: 10px;
  }

  /* الصفحة الرئيسية */

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 12px 16px 0;
  }

  .map-card {
    height: 430px;
  }

  .overview {
    width: 100%;
  }

  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 12px 16px 0;
  }

  .opp-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .opps {
    margin-left: 16px;
    margin-right: 16px;
  }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {
  html,
  body {
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  body {
    font-size: 12px;
  }

  /* =========================
     HEADER
     ========================= */

  .topbar {
    position: sticky;
    top: 0;

    height: auto;
    min-height: 64px;

    padding: 10px 12px;

    display: flex;
    flex-wrap: wrap;

    gap: 0;

    background: rgba(2, 7, 17, 0.97);

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  /* Logo */

  .brand {
    min-width: 0;
    flex: 1;

    gap: 8px;
  }

  .sip {
    width: 38px;
    height: 38px;
    font-size: 13px;
  }

  .brand b {
    font-size: 11px;
  }

  .brand span {
    font-size: 9px;
  }

  /* Buttons */

  .actions {
    gap: 5px;
  }

  .actions .lang,
  .actions .login {
    display: none;
  }

  .actions .signup {
    display: block;

    padding: 8px 11px;

    font-size: 9px;

    border-radius: 6px;
  }

  /* Navigation */

  .topbar nav {
    order: 3;

    width: 100%;

    margin-top: 10px;

    padding: 0 2px;

    display: flex;

    justify-content: flex-start;

    gap: 24px;

    overflow-x: auto;

    scrollbar-width: none;

    border-top: 1px solid #121a2c;
  }

  .topbar nav::-webkit-scrollbar {
    display: none;
  }

  .topbar nav a {
    height: 38px;

    flex-shrink: 0;

    font-size: 10px;

    color: #aaa7b5;
  }

  .topbar nav a.active {
    color: #c875ff;
  }

  /* =========================
     HERO
     ========================= */

  .hero-grid {
    display: flex;

    flex-direction: column;

    gap: 14px;

    padding: 10px 10px 0;

    width: 100%;
  }

  /* =========================
     MAP
     ========================= */

  .map-card {
    width: 100%;

    height: 330px;

    border-radius: 10px;
  }

  .map-card > img {
    object-position: center;
  }

  /* Map compare */

  .compare {
    top: 10px;
    left: 10px;

    padding: 6px 10px;

    font-size: 9px;
  }

  .compare b {
    font-size: 16px;
    margin-right: 5px;
  }

  /* Map tools */

  .map-tools {
    top: 65px;

    right: 9px;

    border-radius: 6px;
  }

  .map-tools button {
    width: 34px;
    height: 36px;

    font-size: 15px;
  }

  /* Map numbers */

  .map-score b {
    width: 34px;
    height: 34px;

    font-size: 12px;
  }

  .map-score span {
    font-size: 7px;
  }

  .score3 b {
    width: 44px;
    height: 44px;

    font-size: 16px;
  }

  .score1 {
    top: 54px;
    left: 42%;
  }

  .score2 {
    top: 75px;
    left: 67%;
  }

  .score3 {
    top: 135px;
    left: 49%;
  }

  .score4 {
    top: 145px;
    left: 25%;
  }

  .score5 {
    top: 160px;
    right: 11%;
  }

  .score6 {
    bottom: 55px;
    left: 30%;
  }

  .score7 {
    bottom: 48px;
    left: 55%;
  }

  /* Legend */

  .legend {
    right: 12px;
    bottom: 9px;

    gap: 5px;

    font-size: 6px;
  }

  .legend:before {
    width: 115px;
    height: 5px;

    bottom: 12px;
  }

  /* =========================
     OVERVIEW
     ========================= */

  .overview {
    width: 100%;

    padding: 0;
  }

  /* Breadcrumb */

  .crumb {
    margin: 2px 2px 8px;

    font-size: 8px;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
  }

  /* Back buttons */

  .title-row {
    display: flex;

    gap: 7px;

    margin-bottom: 7px;
  }

  .back,
  .bookmark {
    padding: 7px 10px;

    font-size: 9px;
  }

  .bookmark {
    width: 37px;
  }

  /* Title */

  .heading {
    gap: 6px;

    margin-top: 2px;
  }

  .heading h1 {
    font-size: 23px;

    line-height: 1.3;
  }

  .pin {
    font-size: 25px;
  }

  .subtitle {
    font-size: 10px;

    margin-top: 2px;
  }

  .intro {
    font-size: 9px;

    line-height: 1.9;

    margin: 7px 0 11px;

    color: #9895a5;
  }

  /* =========================
     FOUR STAT CARDS
     ========================= */

  .stats4 {
    grid-template-columns: repeat(2, 1fr);

    gap: 6px;
  }

  .stats4 div {
    min-height: 64px;

    padding: 9px 6px;

    display: flex;

    flex-direction: column;

    justify-content: center;
  }

  .stats4 span {
    font-size: 8px;

    margin-bottom: 3px;
  }

  .stats4 b {
    font-size: 10px;
  }

  /* =========================
     KPI
     ========================= */

  .kpis {
    margin-top: 7px;

    grid-template-columns: repeat(2, 1fr);

    min-height: auto;

    overflow: hidden;
  }

  .kpis > div {
    min-height: 72px;

    padding: 8px 5px;

    border-left: 1px solid #1b2438;
    border-bottom: 1px solid #1b2438;
  }

  .kpis > div:nth-child(2n) {
    border-left: 0;
  }

  .kpis > div:nth-child(3),
  .kpis > div:nth-child(4) {
    border-bottom: 0;
  }

  .kpis b {
    font-size: 17px;
  }

  .kpis small {
    font-size: 7px;

    line-height: 1.5;

    max-width: 110px;
  }

  /* KPI ring */

  .ring-kpi svg {
    width: 31px;

    right: 8px;

    top: 13px;
  }

  .ring-kpi b {
    padding-right: 33px;

    font-size: 16px;
  }

  .ring-kpi span {
    font-size: 6px;

    margin-top: 2px;
  }

  /* =========================
     TABS
     ========================= */

  .tabs {
    margin-top: 8px;

    height: 40px;

    gap: 20px;

    overflow-x: auto;

    overflow-y: hidden;

    justify-content: flex-start;

    scrollbar-width: none;

    padding-right: 2px;
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }

  .tabs button {
    flex-shrink: 0;

    font-size: 9px;
  }

  /* =========================
     DASHBOARD CARDS
     ========================= */

  .cards-grid {
    width: 100%;

    display: grid;

    grid-template-columns: 1fr;

    gap: 9px;

    padding: 10px 10px 0;
  }

  .panel {
    width: 100%;

    min-height: auto;

    padding: 12px;

    border-radius: 9px;
  }

  /* Panel headings */

  .panel-head {
    margin-bottom: 8px;
  }

  .panel-head h3 {
    font-size: 11px;
  }

  .panel-head span {
    font-size: 13px;
  }

  /* =========================
     RISKS
     ========================= */

  .risk {
    grid-template-columns: 7px 1fr auto;

    padding: 8px 0;

    font-size: 8px;
  }

  .risk b {
    font-size: 8px;
  }

  /* =========================
     INFRASTRUCTURE
     ========================= */

  .barrow {
    height: 36px;

    padding-top: 6px;
  }

  .barrow span {
    font-size: 8px;
  }

  .barrow b {
    font-size: 9px;
  }

  /* =========================
     INDICATORS
     ========================= */

  .spark {
    height: 65px;

    margin-bottom: 5px;
  }

  .metric {
    font-size: 8px;

    padding: 5px 0;
  }

  .metric b {
    font-size: 9px;
  }

  /* =========================
     SECTORS
     ========================= */

  .donut-wrap {
    justify-content: center;

    gap: 18px;

    padding: 4px 0;
  }

  .donut {
    width: 125px;

    height: 145px;

    flex-shrink: 0;
  }

  .sector-list {
    max-width: 180px;
  }

  .sector-list p {
    font-size: 8px;

    margin: 6px 0;
  }

  /* =========================
     ABOUT
     ========================= */

  .about ul {
    margin: 8px 0 13px;
  }

  .about li {
    font-size: 8px;

    padding: 8px 0;
  }

  /* =========================
     BUTTONS
     ========================= */

  .outline {
    margin-top: 9px;

    padding: 8px;

    font-size: 8px;

    min-height: 34px;
  }

  /* =========================
     INVESTMENT OPPORTUNITIES
     ========================= */

  .opps {
    margin: 10px 10px 22px;

    padding: 11px 9px;

    border-radius: 9px;
  }

  .section-head {
    margin-bottom: 8px;
  }

  .section-head h2 {
    font-size: 10px;
  }

  .section-head a {
    font-size: 8px;
  }

  .opp-grid {
    grid-template-columns: repeat(2, 1fr);

    gap: 7px;
  }

  .opp {
    border-radius: 7px;
  }

  .thumb {
    height: 90px;
  }

  .opp h3 {
    font-size: 9px;

    margin: 6px 7px 0;
  }

  .opp p {
    font-size: 7px;

    margin: 2px 7px 7px;
  }

  .tag {
    top: 5px;
    right: 5px;

    padding: 3px 5px;

    font-size: 7px;
  }

  .mini {
    top: 5px;
    left: 5px;

    font-size: 13px;
  }

  .opp footer {
    grid-template-columns: 1fr 1fr 31px;

    padding: 6px 7px;
  }

  .opp footer b {
    font-size: 9px;
  }

  .opp footer small {
    font-size: 6px;

    margin-top: 1px;
  }

  .opp footer strong {
    width: 27px;
    height: 27px;

    font-size: 9px;
  }
}

/* =========================================================
   SMALL PHONES
   ========================================================= */

@media (max-width: 430px) {
  .topbar {
    padding: 8px 10px;
  }

  .sip {
    width: 35px;
    height: 35px;
  }

  .brand b {
    font-size: 10px;
  }

  .brand span {
    font-size: 8px;
  }

  .actions .signup {
    padding: 7px 9px;
    font-size: 8px;
  }

  /* Map */

  .map-card {
    height: 285px;
  }

  .map-score {
    transform: scale(0.82);
  }

  .score1 {
    left: 38%;
  }

  .score2 {
    left: 66%;
  }

  .score3 {
    left: 47%;
    top: 118px;
  }

  .score4 {
    left: 20%;
  }

  .score5 {
    right: 7%;
  }

  .score6 {
    left: 28%;
  }

  .score7 {
    left: 55%;
  }

  /* Title */

  .heading h1 {
    font-size: 21px;
  }

  .pin {
    font-size: 22px;
  }

  /* Stats */

  .stats4 div {
    min-height: 60px;
  }

  /* KPI */

  .kpis b {
    font-size: 16px;
  }

  /* Opportunities */

  .opp-grid {
    grid-template-columns: 1fr;

    gap: 8px;
  }

  .thumb {
    height: 120px;
  }

  .opp h3 {
    font-size: 10px;
  }

  .opp p {
    font-size: 7px;
  }
}

/* =========================================================
   VERY SMALL PHONES
   ========================================================= */

@media (max-width: 360px) {
  .topbar nav {
    gap: 18px;
  }

  .topbar nav a {
    font-size: 9px;
  }

  .map-card {
    height: 260px;
  }

  .map-score {
    transform: scale(0.72);
  }

  .intro {
    font-size: 8px;
  }

  .stats4 b {
    font-size: 9px;
  }

  .kpis b {
    font-size: 15px;
  }

  .tabs {
    gap: 16px;
  }

  .tabs button {
    font-size: 8px;
  }
}

/* =========================
   HAMBURGER BUTTON
   ========================= */

.hamburger {
  display: none;

  width: 42px;
  height: 42px;

  padding: 0;

  border: 1px solid #292f45;
  border-radius: 8px;

  background: #071022;

  align-items: center;
  justify-content: center;

  flex-direction: column;
  gap: 5px;

  cursor: pointer;
}

.hamburger span {
  width: 19px;
  height: 2px;

  background: #c875ff;

  border-radius: 5px;

  transition:
    transform 0.3s ease,
    opacity 0.2s ease,
    width 0.3s ease;
}

/* =========================
   MOBILE NAVBAR
   ========================= */

/* =====================================================
   MOBILE HAMBURGER NAV
   ===================================================== */

@media (max-width: 700px) {
  .topbar {
    position: sticky;
    top: 0;
    z-index: 1000;

    height: 64px;
    min-height: 64px;

    padding: 8px 10px;

    display: flex;
    align-items: center;
    flex-wrap: nowrap;

    background: rgba(2, 7, 17, 0.97);

    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
  }

  /* =========================
     BRAND
     ========================= */

  .brand {
    min-width: 0;
    flex: 1;

    display: flex;
    align-items: center;

    gap: 8px;
  }

  .sip {
    width: 38px;
    height: 38px;

    flex-shrink: 0;

    font-size: 13px;
  }

  .brand span {
    font-size: 8px;
  }

  .brand b {
    font-size: 10px;
  }

  /* =========================
     HAMBURGER
     ========================= */

  .hamburger {
    display: flex;

    width: 40px;
    height: 40px;

    flex-shrink: 0;

    padding: 0;

    margin-left: 7px;

    align-items: center;
    justify-content: center;

    flex-direction: column;

    gap: 5px;

    background: #071022;

    border: 1px solid #292f45;

    border-radius: 8px;

    cursor: pointer;

    position: relative;

    z-index: 1003;
  }

  .hamburger span {
    display: block;

    width: 18px;
    height: 2px;

    background: #c875ff;

    border-radius: 10px;

    transition: 0.3s ease;
  }

  /* =========================
     NAV
     ========================= */

  .topbar nav {
    display: none;

    position: absolute;

    top: 56px;
    right: 10px;

    width: calc(100% - 20px);

    height: auto;

    padding: 7px;

    margin: 0;

    flex: none;

    flex-direction: column;

    align-items: stretch;

    justify-content: flex-start;

    gap: 3px;

    background: rgba(5, 11, 25, 0.98);

    border: 1px solid #272f46;

    border-radius: 10px;

    box-shadow:
      0 15px 40px rgba(0, 0, 0, 0.55),
      0 0 25px rgba(123, 44, 255, 0.08);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    z-index: 1002;

    overflow: hidden;

    direction: rtl;
  }

  /* القائمة مفتوحة */

  .topbar nav.mobile-open {
    display: flex;

    animation: mobileNavOpen 0.22s ease forwards;
  }

  /* =========================
     NAV LINKS
     ========================= */

  .topbar nav.mobile-open a {
    width: 100%;

    height: 43px;

    min-height: 43px;

    padding: 0 13px;

    display: flex;

    align-items: center;

    justify-content: flex-start;

    border-radius: 7px;

    color: #bdb9c8;

    font-size: 10px;

    text-decoration: none;

    transition:
      background 0.2s ease,
      color 0.2s ease,
      padding-right 0.2s ease;

    position: relative;
  }

  .topbar nav.mobile-open a:hover {
    background: #0c1529;

    color: #c875ff;

    padding-right: 17px;
  }

  .topbar nav.mobile-open a.active {
    background: rgba(123, 44, 255, 0.13);

    color: #d18aff;
  }

  /* الخط البنفسجي بجانب العنصر النشط */

  .topbar nav.mobile-open a.active::before {
    content: "";

    position: absolute;

    right: 0;

    top: 7px;
    bottom: 7px;

    width: 2px;

    background: #a335ff;

    border-radius: 5px;

    box-shadow: 0 0 10px #8e2fff;
  }

  /* إزالة الخط السفلي القديم */

  .topbar nav.mobile-open a.active::after {
    display: none;
  }

  /* =========================
     HAMBURGER → X
     ========================= */

  .hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;

    transform: scaleX(0);
  }

  .hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* =========================
     MENU ANIMATION
     ========================= */

  @keyframes mobileNavOpen {
    from {
      opacity: 0;
      transform: translateY(-8px) scale(0.98);
    }

    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  /* =========================
     ACTIONS
     ========================= */

  .actions {
    flex-shrink: 0;
  }

  .actions .lang,
  .actions .login,
  .actions .signup {
    display: none;
  }
}
/* =========================================================
   MOBILE NAVBAR — FINAL FIX
========================================================= */

@media screen and (max-width: 768px) {
  /* Header */
  .header__inner {
    height: 64px !important;
    padding: 0 20px !important;
  }

  /* Hide desktop actions */
  .header__actions {
    display: none !important;
  }

  /* Show burger */
  .burger {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* ================= NAV ================= */

  .header .nav {
    position: fixed !important;

    top: 64px !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;

    z-index: 999 !important;

    width: 100% !important;
    height: calc(60vh - 64px) !important;

    /* THIS IS THE IMPORTANT PART */
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;

    flex: none !important;

    gap: 0 !important;

    padding: 20px !important;

    background: var(--surface, #0d1428) !important;
    border-top: 1px solid var(--border-soft, #161f38);

    overflow-y: auto !important;
    overflow-x: hidden !important;

    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;

    transform: translateY(-10px) !important;

    transition:
      opacity 0.2s ease,
      transform 0.2s ease,
      visibility 0.2s ease !important;
  }

  /* Open */
  .header .nav.is-open {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
  }

  /* ================= LINKS ================= */

  .header .nav > .nav__link {
    display: flex !important;

    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;

    flex: 0 0 auto !important;

    align-items: center !important;
    justify-content: flex-start !important;

    padding: 15px 5px !important;

    margin: 0 !important;

    font-size: 14px !important;
    text-align: right !important;

    border-bottom: 1px solid var(--border-soft, #161f38);

    white-space: normal !important;
  }

  /* Remove desktop active underline */
  .header .nav__link--active::after {
    display: none !important;
  }

  /* ================= MOBILE BUTTONS ================= */

  .header .nav__mobile-actions {
    display: flex !important;

    flex-direction: column !important;

    align-items: stretch !important;

    width: 100% !important;

    flex: 0 0 auto !important;

    gap: 10px !important;

    margin-top: 20px !important;
  }

  .header .nav__mobile-btn-wrap {
    display: block !important;
    width: 100% !important;
  }

  .header .nav__mobile-actions .lang-switch {
    display: flex !important;
    width: 100% !important;

    align-items: center !important;
    justify-content: flex-start !important;

    padding: 12px 5px !important;
  }

  .header .nav__mobile-actions .btn {
    width: 100% !important;
  }
}
