/* ===================== 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);
}

* {
  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);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}
a {
  text-decoration: none;
  color: inherit;
}
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
}
ul {
  list-style: none;
}

.hero__text {
  width: 100%;
  margin: 0 auto;
  padding: 20px 32px;
}

.hero__inner {
  height: 400px;
}

.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: 11px 20px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 600;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
  white-space: nowrap;
}
.btn svg {
  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: 15.5px;
}
.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: 12.5px;
  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: 13.5px;
  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%;
}

/* ---- جميع الصفحات mega menu ---- */
.nav__pages {
  position: relative;
}
.nav__pages-trigger {
  cursor: pointer;
}
.nav__pages-trigger .chev {
  transition: transform 0.2s ease;
}
.nav__pages.is-open .nav__pages-trigger .chev {
  transform: rotate(180deg);
}
.nav__pages.is-open .nav__pages-trigger {
  color: var(--text);
}
.mega {
  position: absolute;
  top: calc(100% + 22px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 560px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 28px;
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0.18s ease;
  z-index: 60;
}
.nav__pages.is-open .mega {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.mega__col {
  display: flex;
  flex-direction: column;
}
.mega__title {
  font-size: 12px;
  font-weight: 700;
  color: var(--purple-2);
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-soft);
}
.mega__col a {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-dim);
  padding: 7px 0;
  transition: color 0.15s ease;
}
.mega__col a:hover {
  color: var(--cyan);
}

.page-wrap {
  margin: auto;
  padding: 12px 10px 30px;
}
.breadcrumb {
  height: 35px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #778198;
  font-size: 10px;
}
.breadcrumb i {
  font-size: 7px;
  color: #58627a;
}
.breadcrumb strong {
  font-weight: 500;
  color: #9ea7b9;
}

.breadcrumb span > a {
  text-decoration: none;
  color: rgb(158, 159, 160);
}

.panel {
  border: 1px solid #1e2b40;
  border-radius: 8px;
  background: linear-gradient(
    145deg,
    rgba(5, 16, 31, 0.95),
    rgba(3, 12, 24, 0.94)
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.015),
    0 7px 30px rgba(0, 0, 0, 0.14);
}
.top-grid {
  display: grid;
  grid-template-columns: 2fr 1.06fr;
  gap: 16px;
}
.opportunity-card {
  height: 233px;
  padding: 10px;
  display: flex;
  direction: ltr;
}
.opportunity-image {
  width: 44%;
  position: relative;
  overflow: hidden;
  border-radius: 7px;
}
.opportunity-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.opportunity-image:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.38));
}
.image-badge {
  position: absolute;
  top: 11px;
  left: 12px;
  z-index: 2;
  background: rgba(4, 9, 17, 0.84);
  padding: 6px 9px;
  border-radius: 5px;
  font-size: 10px;
}
.image-badge i {
  color: #b05aff;
}
.image-btn {
  position: absolute;
  bottom: 8px;
  left: 8px;
  z-index: 3;
  background: #160d2e;
  border: 1px solid #8d3eff;
  color: #eee;
  border-radius: 5px;
  padding: 7px 19px;
  font-family: inherit;
  font-size: 10px;
  box-shadow: 0 0 16px rgba(132, 47, 255, 0.18);
}
.opportunity-info {
  direction: rtl;
  width: 56%;
  padding: 7px 4px 0 13px;
}
.opportunity-info h1 {
  font-size: 19px;
  margin: 4px 0 12px;
  font-weight: 700;
}
.location {
  color: #a9afbd;
  margin-bottom: 25px;
}
.location i {
  color: #9e46ff;
  margin-left: 5px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}
.metrics > div {
  border: 1px solid #1d2b40;
  border-radius: 6px;
  min-height: 88px;
  text-align: center;
  padding: 8px 3px;
  position: relative;
}
.metrics span {
  display: block;
  color: #9ba4b5;
  font-size: 9px;
  white-space: nowrap;
}
.metrics b {
  display: block;
  font-size: 16px;
  margin: 7px 0 4px;
}
.metrics i {
  color: #a24cff;
  font-size: 17px;
}
.interest-card {
  height: 233px;
  padding: 18px 20px;
  text-align: right;
}
.interest-card h2 {
  font-size: 20px;
  margin: 0 0 7px;
}
.interest-card p {
  font-size: 11px;
  color: #c0c5d0;
  line-height: 1.8;
}
.steps {
  display: flex;
  direction: rtl;
  align-items: flex-start;
  justify-content: space-between;
  margin-top: 28px;
  position: relative;
}
.steps:before {
  content: "";
  position: absolute;
  top: 17px;
  left: 14%;
  right: 14%;
  height: 3px;
  background: linear-gradient(90deg, #5b23bd, #8e35ff, #5b23bd);
}
.step {
  width: 31%;
  text-align: center;
  position: relative;
  z-index: 1;
}
.step span {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: auto;
  background: #121629;
  border: 1px solid #583098;
  color: #a4aabd;
  font-size: 14px;
}
.step.current span {
  background: radial-gradient(circle, #943fff, #4c17a3);
  border-color: #9c47ff;
  box-shadow: 0 0 20px rgba(133, 49, 255, 0.5);
  color: #fff;
  font-size: 17px;
}
.step.done span {
  background: #22133e;
  color: #c77bff;
}
.step label {
  display: block;
  margin-top: 8px;
  color: #dfe1e8;
  font-size: 10px;
}
.content-grid {
  display: grid;
  grid-template-columns: 2fr 1.06fr;
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}
.form-panel {
  padding: 0 16px;
}
.form-section {
  padding: 14px 0;
  border-bottom: 1px solid #1b2739;
}
.form-section:last-child {
  border: 0;
}
.form-section h3 {
  font-size: 15px;
  margin: 0 0 13px;
}
.form-section h3 b {
  color: #fff;
  margin-left: 3px;
}
.required:after {
  content: " *";
  color: #d72c67;
}
.form-section > label,
.field label {
  display: block;
  color: #e0e3eb;
  font-size: 10px;
  margin-bottom: 7px;
}
.interest-types {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 19px;
}
.interest-type {
  height: 75px;
  border: 1px solid #233149;
  border-radius: 6px;
  background: rgba(3, 11, 23, 0.75);
  color: #e9eaf0;
  font-family: inherit;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 10px;
}
.interest-type i {
  font-size: 19px;
  color: #9b43ff;
}
.interest-type.selected {
  border-color: #8b3cff;
  background: linear-gradient(145deg, #100c25, #071020);
  box-shadow: inset 0 0 24px rgba(124, 42, 255, 0.09);
}
.interest-type em {
  position: absolute;
  top: -6px;
  right: -5px;
  background: #c58bff;
  color: #24103c;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-style: normal;
  font-size: 10px;
  display: none;
}
.interest-type.selected em {
  display: grid;
  place-items: center;
}
.fields.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px 20px;
}
.field select,
.field input,
.field textarea {
  width: 100%;
  border: 1px solid #223049;
  border-radius: 5px;
  background: #06101e;
  color: #b7becb;
  font: inherit;
  font-size: 10px;
  outline: none;
}
.field select,
.field input {
  height: 35px;
  padding: 0 12px;
}
.field select:focus,
.field input:focus,
.field textarea:focus {
  border-color: #873aff;
  box-shadow: 0 0 0 2px rgba(127, 45, 255, 0.07);
}
.field select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #8490a6 50%),
    linear-gradient(135deg, #8490a6 50%, transparent 50%);
  background-position:
    calc(100% - 13px) 14px,
    calc(100% - 9px) 14px;
  background-size:
    4px 4px,
    4px 4px;
  background-repeat: no-repeat;
}
.hint {
  font-size: 10px;
  color: #8d96a9;
  margin: -5px 0 8px;
}
.field textarea {
  min-height: 80px;
  padding: 10px;
  resize: vertical;
}
.counter-input {
  width: 100%;
  min-height: 81px;
  border: 1px solid #223049;
  border-radius: 5px;
  background: #06101e;
  color: #d6d9e0;
  padding: 10px;
  font: inherit;
  font-size: 10px;
  resize: vertical;
  outline: none;
}
.counter-input:focus {
  border-color: #873aff;
}
.counter {
  color: #657085;
  font-size: 8px;
  margin-top: -17px;
  margin-right: 12px;
  position: relative;
  pointer-events: none;
}
.input-icon {
  position: relative;
}
.input-icon i {
  position: absolute;
  left: 11px;
  top: 11px;
  color: #7f899c;
}
.input-icon input {
  padding-left: 35px;
}
.extra-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 13px;
}
.option-box {
  min-height: 65px;
  border: 1px solid #223049;
  border-radius: 6px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  cursor: pointer;
}
.option-box input {
  display: none;
}
.fake-check {
  width: 17px;
  height: 17px;
  border: 1px solid #9a43ff;
  border-radius: 3px;
  flex: none;
}
.option-box input:checked + .fake-check {
  background: #8b3bff;
  box-shadow: inset 0 0 0 3px #06101e;
}
.option-box span:nth-child(3) {
  flex: 1;
}
.option-box b {
  display: block;
  font-size: 10px;
  margin-bottom: 3px;
}
.option-box small {
  display: block;
  color: #7f899c;
  font-size: 8px;
}
.option-box > i {
  color: #a54eff;
  font-size: 18px;
}
.full {
  margin-top: 7px;
}
.upload-box {
  height: 92px;
  border: 1px dashed #32425b;
  border-radius: 6px;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: #aab2c0;
}
.upload-box:hover {
  border-color: #8d3cff;
  background: rgba(126, 40, 255, 0.025);
}
.upload-box i {
  font-size: 20px;
  color: #a64cff;
}
.upload-box b {
  font-size: 9px;
}
.upload-box small {
  font-size: 7px;
  color: #727d92;
}
.form-actions {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 13px;
  margin-top: 14px;
}
.save-btn,
.submit-btn {
  height: 34px;
  border-radius: 5px;
  font-family: inherit;
  font-size: 10px;
}
.save-btn {
  background: #07101e;
  border: 1px solid #8a3aff;
  color: #d29cff;
}
.submit-btn {
  border: 1px solid #7e31ed;
  background: linear-gradient(90deg, #6e18f1, #5115bd);
  color: #fff;
  box-shadow: 0 0 20px rgba(119, 34, 255, 0.25);
}
.privacy {
  text-align: center;
  color: #737d91;
  font-size: 8px;
  margin-top: 8px;
}
.privacy i {
  color: #9b43ff;
  margin-left: 4px;
}
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sidebar .panel {
  padding: 15px 20px;
}
.sidebar h3 {
  font-size: 15px;
  margin: 0 0 11px;
}
.summary-row {
  min-height: 46px;
  border-bottom: 1px solid #1a2739;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.summary-row:last-child {
  border: 0;
}
.summary-row span {
  color: #d4d8e0;
}
.summary-row span i {
  float: right;
  color: #9d42ff;
  font-size: 17px;
  margin-left: 8px;
}
.summary-row b {
  font-weight: 400;
  text-align: left;
  font-size: 10px;
  color: #adb4c1;
}
.summary-row .purple {
  color: #b453ff;
}
.timeline {
  padding-bottom: 11px !important;
}
.timeline-item {
  min-height: 72px;
  position: relative;
  padding: 0 49px 9px 0;
}
.timeline-item:before {
  content: "";
  position: absolute;
  right: 19px;
  top: 36px;
  bottom: -4px;
  width: 1px;
  background: #3a2858;
}
.timeline-item:last-child:before {
  display: none;
}
.timeline-item > span {
  position: absolute;
  right: 5px;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #2a1153;
  color: #d2b3ff;
  display: grid;
  place-items: center;
  font-size: 11px;
}
.timeline-item > i {
  position: absolute;
  right: -1px;
  top: 37px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #553092;
  background: #110b25;
  color: #ae55ff;
  display: grid;
  place-items: center;
  font-size: 18px;
  box-shadow: 0 0 14px rgba(129, 45, 255, 0.1);
}
.timeline-item div {
  padding-top: 1px;
}
.timeline-item b {
  font-size: 11px;
}
.timeline-item p {
  font-size: 9px;
  color: #9aa3b3;
  line-height: 1.7;
  margin: 4px 0;
}
.help {
  border-color: #8238ed !important;
  background: linear-gradient(
    145deg,
    rgba(20, 10, 43, 0.98),
    rgba(5, 13, 27, 0.97)
  );
  box-shadow: 0 0 24px rgba(125, 40, 255, 0.13);
}
.help h3 {
  text-align: center;
  font-size: 17px;
}
.help > p {
  text-align: center;
  color: #b9bfcc;
  font-size: 10px;
  line-height: 1.8;
  margin-bottom: 13px;
}
.help a {
  display: block;
  border: 1px solid #26344b;
  border-bottom: 0;
  height: 43px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  color: #d7dae2;
  text-decoration: none;
  background: rgba(3, 10, 22, 0.5);
}
.help a:first-of-type {
  border-radius: 6px 6px 0 0;
}
.help a:last-of-type {
  border-bottom: 1px solid #26344b;
  border-radius: 0 0 6px 6px;
}
.help a i {
  color: #ad4dff;
  font-size: 17px;
  width: 20px;
}
.toast-message {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  opacity: 0;
  background: #170c31;
  border: 1px solid #8b3cff;
  color: #fff;
  padding: 11px 22px;
  border-radius: 6px;
  box-shadow: 0 0 25px rgba(132, 45, 255, 0.3);
  transition: 0.3s;
  z-index: 3000;
}
.toast-message.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
@media (max-width: 900px) {
  .nav-inner {
    gap: 10px;
  }
  .main-nav {
    gap: 14px;
  }
  .brand {
    min-width: auto;
  }
  .nav-actions {
    display: none;
  }
  .menu-toggle {
    display: block;
    margin-right: auto;
    order: 3;
  }
  .main-nav {
    position: absolute;
    top: 63px;
    right: 10px;
    left: 10px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #06101f;
    border: 1px solid #26334a;
    border-radius: 7px;
    padding: 9px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.45);
  }
  .main-nav.open {
    display: flex;
  }
  .main-nav a {
    padding: 11px 13px;
    border-bottom: 1px solid #152238;
  }
  .mobile-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding-top: 9px;
  }
  .mobile-actions .login-btn,
  .mobile-actions .create-btn {
    width: 100%;
  }
  .top-grid,
  .content-grid {
    grid-template-columns: 1fr;
  }
  .sidebar {
    order: 2;
  }
  .opportunity-card {
    height: auto;
    min-height: 245px;
  }
  .interest-card {
    height: auto;
    min-height: 225px;
  }
}
@media (max-width: 600px) {
  body {
    font-size: 12px;
  }
  .page-wrap {
    padding: 8px;
  }
  .breadcrumb {
    overflow: hidden;
    white-space: nowrap;
  }
  .brand-title {
    font-size: 10px;
  }
  .brand-mark {
    width: 39px;
    height: 39px;
  }
  .top-grid {
    gap: 10px;
  }
  .opportunity-card {
    flex-direction: column;
    padding: 8px;
  }
  .opportunity-image,
  .opportunity-info {
    width: 100%;
  }
  .opportunity-image {
    height: 190px;
  }
  .opportunity-info {
    padding: 10px 3px;
  }
  .opportunity-info h1 {
    font-size: 16px;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .interest-types {
    grid-template-columns: repeat(2, 1fr);
  }
  .interest-types .interest-type:last-child {
    grid-column: 1/-1;
  }
  .fields.two,
  .extra-options {
    grid-template-columns: 1fr;
  }
  .form-panel {
    padding: 0 11px;
  }
  .form-actions {
    grid-template-columns: 1fr;
  }
  .steps {
    margin-top: 18px;
  }
  .sidebar .panel {
    padding: 14px;
  }
  .main-nav {
    right: 8px;
    left: 8px;
  }
}

/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 768px) {
  .topbar {
    height: 64px;
  }

  .topbar-inner {
    padding: 0 16px;
  }

  /* Hide desktop elements */

  .desktop-nav,
  .top-actions {
    display: none;
  }

  /* Brand */

  .dlogo {
    width: 36px;
    height: 36px;

    font-size: 20px;
  }

  .brand-text strong {
    font-size: 15px;
  }

  .brand-text small {
    font-size: 8px;
  }

  /* Hamburger */

  .burger {
    display: flex;
  }

  /* Mobile dropdown */

  .mobile-nav {
    position: absolute;

    top: calc(100% + 8px);
    left: 12px;
    right: 12px;

    display: flex;
    flex-direction: column;

    padding: 10px;

    background: linear-gradient(
      145deg,
      rgba(8, 14, 28, 0.98),
      rgba(5, 10, 22, 0.98)
    );

    border: 1px solid rgba(92, 105, 139, 0.22);

    border-radius: 14px;

    box-shadow:
      0 20px 45px rgba(0, 0, 0, 0.45),
      0 0 25px rgba(91, 33, 182, 0.08);

    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    opacity: 0;
    visibility: hidden;

    transform: translateY(-8px);

    transition:
      opacity 0.25s ease,
      transform 0.25s ease,
      visibility 0.25s ease;
  }

  /* Open state */

  .mobile-nav.show {
    opacity: 1;
    visibility: visible;

    transform: translateY(0);
  }

  /* Links */

  .mobile-nav a {
    min-height: 47px;

    display: flex;
    align-items: center;

    gap: 13px;

    padding: 0 13px;

    border-radius: 9px;

    color: #8995ad;

    text-decoration: none;

    font-size: 13px;
    font-weight: 500;

    transition:
      background 0.2s ease,
      color 0.2s ease;
  }

  .mobile-nav a i {
    width: 20px;

    text-align: center;

    font-size: 16px;

    color: #74819a;
  }

  .mobile-nav a:hover {
    color: #fff;

    background: rgba(124, 58, 237, 0.08);
  }

  .mobile-nav a:hover i {
    color: #a78bfa;
  }

  /* Active */

  .mobile-nav a.active {
    color: #fff;

    background: linear-gradient(
      90deg,
      rgba(124, 58, 237, 0.16),
      rgba(34, 211, 238, 0.04)
    );

    border: 1px solid rgba(124, 58, 237, 0.14);
  }

  .mobile-nav a.active i {
    color: #a78bfa;
  }

  /* Divider */

  .mobile-divider {
    height: 1px;

    margin: 9px 4px;

    background: rgba(100, 115, 145, 0.14);
  }

  /* Account */

  .mobile-account {
    display: flex;
    align-items: center;

    gap: 11px;

    padding: 10px 8px 7px;
  }

  .mobile-account .avatar {
    width: 36px;
    height: 36px;
  }

  .mobile-account > div:last-child {
    display: flex;
    flex-direction: column;

    line-height: 1.1;
  }

  .mobile-account strong {
    color: #e8edf7;

    font-size: 11px;
  }

  .mobile-account small {
    margin-top: 4px;

    color: #65728b;

    font-size: 9px;
  }
}

/* =====================================================
   VERY SMALL PHONES
===================================================== */

@media (max-width: 380px) {
  .topbar-inner {
    padding: 0 12px;
  }

  .brand-text small {
    display: none;
  }

  .mobile-nav {
    left: 8px;
    right: 8px;
  }
}

/* ---- Mobile nav / burger breakpoint (desktop untouched above 860px) ---- */
@media (max-width: 860px) {
  .header__actions {
    display: none;
  }
  .nav {
    display: flex;
    position: absolute;
    top: calc(100% + 10px);
    right: 16px;
    left: 16px;
    width: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: linear-gradient(
      160deg,
      rgba(9, 15, 30, 0.98),
      rgba(5, 9, 20, 0.98)
    );
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding: 14px 16px 18px;
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    box-shadow: 0 24px 50px -12px rgba(0, 0, 0, 0.55);

    /* Smooth reveal instead of an abrupt display:none/flex swap,
       and no inner scrollbar under normal use. */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px) scale(0.98);
    transform-origin: top center;
    transition:
      opacity 0.22s ease,
      transform 0.22s ease,
      visibility 0.22s ease;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    overscroll-behavior: contain;
    z-index: 45;
  }
  .nav.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }
  .nav__link {
    width: 100%;
    padding: 13px 6px;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-soft);
    font-size: 13px;
  }
  .nav__link--active::after {
    display: none;
  }

  .nav__pages {
    width: 100%;
  }
  .nav__pages-trigger {
    width: 100%;
  }
  .mega {
    position: static;
    transform: none;
    min-width: 0;
    width: 100%;
    grid-template-columns: 1fr;
    gap: 4px;
    box-shadow: none;
    border-color: var(--border-soft);
    background: var(--surface-2);
    margin-top: 6px;
    display: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .nav__pages.is-open .mega {
    display: grid;
  }
  .mega__col a {
    padding: 9px 4px;
  }

  /* Login / Explore buttons, moved out of the header and shown
     full-width inside the hamburger menu on mobile only. */
  .nav__mobile-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
    padding-top: 14px;
  }
  .nav__mobile-actions .lang-switch {
    justify-content: center;
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px;
  }
  .nav__mobile-actions .btn--block {
    margin-top: 0;
    width: 100%;
  }
}

/* Extra safety for very narrow phones so the dropdown never
   touches the viewport edges or overlaps the burger/logo. */
@media (max-width: 380px) {
  .header__inner {
    padding: 16px 16px;
  }
  .brand {
    width: auto;
  }
  .nav {
    right: 10px;
    left: 10px;
    padding: 12px 12px 16px;
  }
}
