/* Mobile responsiveness + full-screen hamburger menu */

html,
body {
  overflow-x: hidden;
}

#root {
  overflow-x: hidden;
  max-width: 100%;
}

/* Hide desktop center nav below lg; show hamburger */
@media (max-width: 1023px) {
  header nav.desktop-nav {
    display: none !important;
  }

  .mobile-menu-btn {
    display: inline-flex !important;
  }

  .header-login-btn,
  a:has(> .header-login-btn) {
    display: none !important;
  }

  .w-100,
  .w-115,
  .w-150,
  .w-180,
  .max-w-180 {
    max-width: 100% !important;
    width: 100% !important;
  }

  img,
  svg,
  video,
  iframe {
    max-width: 100%;
    height: auto;
  }

  table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
  }

  #heroSection {
    min-height: auto;
    max-height: none;
    padding-top: 6rem;
    padding-bottom: 3rem;
  }

  #heroSection .max-ctn {
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
  }

  #heroSection h1 {
    font-size: 1.875rem;
    line-height: 1.25;
  }

  #heroSection p br {
    display: none;
  }
}

@media (min-width: 1024px) {
  .mobile-menu-btn {
    display: none !important;
  }

  #mobile-menu {
    display: none !important;
  }
}

.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.5rem;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.mobile-menu-btn:hover {
  border-color: rgba(96, 165, 250, 0.6);
  color: #60a5fa;
}

.mobile-menu-btn svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* Full-screen mobile menu */
#mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: flex;
  flex-direction: column;
  background: #0b0f19;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

#mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.menu-open {
  overflow: hidden;
}

.mobile-menu-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(31, 41, 55, 0.8);
  flex-shrink: 0;
}

.mobile-menu-top img {
  width: 20px;
  height: 17px;
  flex-shrink: 0;
}

.mobile-menu-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.5rem;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.mobile-menu-close:hover {
  border-color: rgba(96, 165, 250, 0.6);
  color: #60a5fa;
}

.mobile-menu-close svg {
  width: 1.5rem;
  height: 1.5rem;
}

.mobile-menu-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem 2rem;
  -webkit-overflow-scrolling: touch;
}

.mobile-menu-section {
  border-bottom: 1px solid rgba(31, 41, 55, 0.6);
}

.mobile-accordion-btn {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 0;
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: left;
  cursor: pointer;
}

.mobile-accordion-btn svg {
  width: 1rem;
  height: 1rem;
  opacity: 0.5;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.mobile-menu-section.is-open .mobile-accordion-btn svg {
  transform: rotate(180deg);
}

.mobile-accordion-panel {
  display: none;
  padding: 0 0 1rem;
}

.mobile-menu-section.is-open .mobile-accordion-panel {
  display: block;
}

.mobile-accordion-panel a {
  display: block;
  padding: 0.625rem 0.75rem;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 0.9375rem;
  border-radius: 0.375rem;
  transition: color 0.15s ease, background 0.15s ease;
}

.mobile-accordion-panel a:hover {
  color: #60a5fa;
  background: rgba(255, 255, 255, 0.04);
}

.mobile-menu-link {
  display: block;
  padding: 1rem 0;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-bottom: 1px solid rgba(31, 41, 55, 0.6);
}

.mobile-menu-link:hover {
  color: #60a5fa;
}

.mobile-menu-footer {
  flex-shrink: 0;
  padding: 1rem 1.25rem 1.5rem;
  border-top: 1px solid rgba(31, 41, 55, 0.8);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-menu-footer a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.875rem 1rem;
  border-radius: 0.5rem;
  background: linear-gradient(90deg, #fcd34d, #60a5fa);
  color: #0b0f19;
  font-weight: 600;
  text-decoration: none;
}

.mobile-menu-footer a:last-child {
  background: transparent;
  border: 1px solid rgba(96, 165, 250, 0.6);
  color: #e5e7eb;
}
