/* ============================================
   MOBILE NAVBAR — Hamburger Menu
   Rafif Modest Wear
   ============================================ */

/* --- Close button inside mobile menu --- */
.mobile-menu__close {
  position: absolute;
  top: 20px;
  left: 20px;
  background: none;
  border: 0.5px solid var(--color-border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  color: var(--color-text-muted);
  line-height: 1;
  transition: color 0.2s, border-color 0.2s;
  z-index: 160;
}

[dir="ltr"] .mobile-menu__close { left: auto; right: 20px; }

.mobile-menu__close:hover {
  color: var(--color-text-primary);
  border-color: var(--color-text-faint);
}

/* --- Logo as link --- */
a.mobile-menu__logo {
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

a.mobile-menu__logo:hover { opacity: 0.65; }

/* --- Hamburger button (hidden on desktop) --- */
.navbar__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 200;
}

.navbar__hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background-color: var(--color-text-primary);
  transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
  transform-origin: center;
}

/* Hamburger → X animation */
.navbar__hamburger.is-open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.navbar__hamburger.is-open span:nth-child(2) {
  opacity: 0;
  width: 0;
}
.navbar__hamburger.is-open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* --- Mobile menu overlay --- */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background-color: var(--color-bg);
  z-index: 150;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-menu.is-open {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu__logo {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 300;
  letter-spacing: 0.12em;
  color: var(--color-text-primary);
  text-transform: uppercase;
  margin-bottom: 48px;
}

.mobile-menu__logo em { font-style: italic; }

.mobile-menu__links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.mobile-menu__link {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 300;
  color: var(--color-text-primary);
  text-decoration: none;
  padding: 12px 40px;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.35s ease, transform 0.35s ease, color 0.2s ease;
  width: 100%;
  text-align: center;
}

.mobile-menu.is-open .mobile-menu__link:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0.05s; }
.mobile-menu.is-open .mobile-menu__link:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 0.12s; }
.mobile-menu.is-open .mobile-menu__link:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 0.19s; }
.mobile-menu.is-open .mobile-menu__link:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 0.26s; }

.mobile-menu__link:hover {
  color: var(--color-text-faint);
}

.mobile-menu__bottom {
  margin-top: 48px;
  display: flex;
  gap: 24px;
  opacity: 0;
  transition: opacity 0.35s ease 0.3s;
}

.mobile-menu.is-open .mobile-menu__bottom {
  opacity: 1;
}

.mobile-menu__bottom a {
  font-size: 13px;
  color: var(--color-text-faint);
  letter-spacing: 0.1em;
}

/* --- Show on mobile --- */
@media (max-width: 768px) {
  .navbar__hamburger {
    display: flex;
  }

  .mobile-menu {
    display: flex;
  }

  /* Hide desktop links on mobile (already hidden in responsive.css, keeping in sync) */
  .navbar__links {
    display: none;
  }
}
