/* ===== Navbar ===== */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--nav-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 0 var(--pad-x);
  border-bottom: 1px solid transparent;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease);
}

.nav.is-scrolled {
  background: rgba(4, 7, 13, 0.72);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-self: start;
}

.nav__mark {
  font-family: var(--font-en);
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.nav__name {
  padding-inline-start: 16px;
  border-inline-start: 1px solid var(--line);
  font-family: var(--font-en);
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  white-space: nowrap;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 44px);
}

.nav__links a {
  position: relative;
  padding: 8px 0;
  color: var(--text-dim);
  font-size: 0.9rem;
  transition: color 0.25s var(--ease);
}

.nav__links a:hover,
.nav__links a.is-active {
  color: var(--text);
}

.nav__links a::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  transform: scaleX(0);
  transition: transform 0.35s var(--ease);
}

.nav__links a.is-active::after {
  transform: scaleX(1);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-self: end;
}

/* مبدّل اللغة */
.lang {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-dim);
  font-size: 0.8rem;
}

.lang button {
  color: var(--text-dim);
  font-weight: 500;
  transition: color 0.25s var(--ease);
}

.lang button:hover {
  color: var(--text);
}

.lang button.is-active {
  color: var(--accent);
  font-weight: 700;
}

/* زرار القائمة (موبايل) */
.nav__burger {
  display: none;
  width: 42px;
  height: 42px;
  align-content: center;
  justify-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.nav__burger span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.3s var(--ease);
}

.nav.is-open .nav__burger span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.nav.is-open .nav__burger span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

body.no-scroll {
  overflow: hidden;
}

/* ===== النقط الجانبية ===== */
.dots {
  position: fixed;
  inset-inline-end: 22px;
  top: 50%;
  z-index: 10;
  display: grid;
  gap: 18px;
  padding: 14px 0;
  transform: translateY(-50%);
}

.dots::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 50%;
  width: 1px;
  background: var(--line);
  transform: translateX(-50%);
}

.dots a {
  position: relative;
  width: 9px;
  height: 9px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  background: var(--bg);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.dots a::after {
  content: "";
  position: absolute;
  inset: -8px;
}

.dots a.is-active {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .nav {
    grid-template-columns: 1fr auto;
  }

  .nav__burger {
    display: grid;
  }

  .nav__links {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    gap: 4px;
    padding: 18px var(--pad-x) 28px;
    border-bottom: 1px solid var(--line);
    background: rgba(4, 7, 13, 0.96);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    opacity: 0;
    transform: translateY(-12px);
    pointer-events: none;
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  }

  .nav.is-open .nav__links {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .nav__links a {
    width: 100%;
    padding: 12px 0;
    text-align: center;
    font-size: 1.05rem;
  }

  .dots {
    display: none;
  }
}

@media (max-width: 640px) {
  .nav__cta {
    display: none;
  }
}

@media (max-width: 480px) {
  .nav__name {
    display: none;
  }
}