/* --- PREMIUM MOBILE MENU (Rafael Lucas Inspired - Gooey/Elastic Effect) --- */
@media (max-width: 992px) {
  /* Increased breakpoint */

  /* 1. Toggle Button (Gooey Hamburger) */
  .menu-toggle {
    display: flex;
    /* Ensure it's visible */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    cursor: pointer;
    z-index: 10002;
    background: transparent;
    border-radius: 50%;
    transition: all 0.3s ease;
  }

  /* The Container for Lines */
  .menu-toggle .bar {
    width: 30px;
    height: 3px;
    background-color: var(--color-gold);
    border-radius: 3px;
    position: absolute;
    transition: all 0.5s cubic-bezier(0.68, -0.6, 0.32, 1.6);
    /* Elastic Bounce */
  }

  .menu-toggle .bar:nth-child(1) {
    transform: translateY(-10px);
    width: 30px;
  }

  .menu-toggle .bar:nth-child(2) {
    transform: translateY(0);
    width: 25px;
    transition-delay: 0.1s;
  }

  .menu-toggle .bar:nth-child(3) {
    transform: translateY(10px);
    width: 20px;
    transition-delay: 0.2s;
  }

  /* Active State (Elastic X) */
  .menu-toggle.active .bar:nth-child(1) {
    transform: rotate(45deg);
    width: 30px;
  }

  .menu-toggle.active .bar:nth-child(2) {
    transform: translateX(-50px);
    opacity: 0;
    width: 0;
  }

  .menu-toggle.active .bar:nth-child(3) {
    transform: rotate(-45deg);
    width: 30px;
    transition-delay: 0s;
  }

  /* 2. Full Screen Overlay */
  .nav-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(5, 5, 5, 0.98);
    /* Almost solid black for legibility */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* Start from top */
    align-items: center;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    clip-path: circle(0% at 90% 5%);
    /* Start from top right */
    transition: all 0.7s cubic-bezier(0.86, 0, 0.07, 1);
    padding-top: 100px;
    /* Space for header */
    overflow-y: auto;
    /* Allow scroll if menu is tall */
    box-sizing: border-box;
  }

  .nav-menu.active {
    opacity: 1;
    visibility: visible;
    clip-path: circle(150% at 90% 5%);
  }

  /* 3. Navigation Links (Staggered Entrance) */
  .nav-menu>li {
    /* Direct children only to avoid staggering submenus incorrectly */
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.4s ease;
    margin: 10px 0;
    width: 100%;
    /* Full width for clickable area */
    text-align: center;
  }

  /* Link Styling */
  .nav-menu a.nav-link {
    font-size: 1.8rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    padding: 10px;
  }

  /* Icon inside link (for dropdown toggle) */
  .nav-menu a.nav-link i {
    font-size: 1.2rem;
    vertical-align: middle;
    margin-left: 10px;
  }

  /* Highlight */
  .nav-menu a.nav-link:hover,
  .nav-menu a.nav-link.active {
    color: var(--color-gold);
    transform: scale(1.05);
  }

  /* Stagger Delays (Only for top level) */
  .nav-menu.active>li:nth-child(1) {
    transition-delay: 0.1s;
  }

  .nav-menu.active>li:nth-child(2) {
    transition-delay: 0.15s;
  }

  .nav-menu.active>li:nth-child(3) {
    transition-delay: 0.2s;
  }

  .nav-menu.active>li:nth-child(4) {
    transition-delay: 0.25s;
  }

  .nav-menu.active>li:nth-child(5) {
    transition-delay: 0.3s;
  }

  .nav-menu.active>li:nth-child(6) {
    transition-delay: 0.35s;
  }

  .nav-menu.active>li:nth-child(7) {
    transition-delay: 0.4s;
  }

  .nav-menu.active>li:nth-child(8) {
    transition-delay: 0.45s;
  }

  .nav-menu.active>li:nth-child(9) {
    transition-delay: 0.5s;
  }

  .nav-menu.active>li:nth-child(10) {
    transition-delay: 0.55s;
  }

  /* 4. Dropdown (Accordion Style for Mobile) */
  .nav-menu li.dropdown {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  /* The Link that toggles */
  .nav-menu li.dropdown>a.nav-link {
    cursor: pointer;
  }

  .dropdown-menu {
    position: static;
    /* In flow */
    background: rgba(255, 255, 255, 0.03);
    /* Subtle bg */
    box-shadow: none;
    border: none;
    display: none;
    /* JS will toggle block */
    opacity: 1;
    visibility: visible;
    transform: none;
    width: 80%;
    /* Boxed width */
    border-radius: 10px;
    margin-top: 10px;
    padding: 10px 0;
    flex-direction: column;
    gap: 5px;
  }

  /* Open State (Handled by JS .open class on parent li) */
  .nav-menu li.dropdown.open .dropdown-menu {
    display: flex;
    animation: slideDown 0.3s ease;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .dropdown-menu li {
    margin: 0;
    width: 100%;
  }

  .dropdown-menu a.nav-link {
    font-size: 1.1rem;
    /* Smaller subtext */
    font-weight: 500;
    color: var(--color-text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px;
  }

  .dropdown-menu a.nav-link:hover {
    background: transparent;
    /* No block hover */
    color: var(--color-gold);
    padding-left: 12px;
  }

  /* Buttons inside menu (Theme/Notify) */
  .nav-menu button {
    transform: scale(1.5);
    /* Make standard buttons bigger */
    margin: 10px;
  }

}