/* =========================================================================
   Mobile Navigation & Drawer Styles
   ========================================================================= */

/* Mobile Navigation Toggle (Hamburger) */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1100;
  transition: transform 0.3s ease;
}

.menu-toggle span {
  width: 100%;
  height: 2px;
  background-color: #0F172A;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: left;
}

/* Hamburger to X Animation */
.menu-toggle.is-active span:nth-child(1) {
  transform: rotate(45deg) translate(2px, -1px);
  width: 24px;
}
.menu-toggle.is-active span:nth-child(2) {
  opacity: 0;
  transform: translateX(10px);
}
.menu-toggle.is-active span:nth-child(3) {
  transform: rotate(-45deg) translate(2px, 1px);
  width: 24px;
}

/* Mobile Drawer (Navigation) */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 260px;
  height: 100vh;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  z-index: 1080;
  padding: 80px 32px 32px;
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -15px 0 45px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.mobile-drawer::-webkit-scrollbar {
  display: none;
}

.mobile-drawer.active {
  transform: translateX(0);
}

.mobile-drawer .nav-list {
  flex-direction: column;
  gap: 12px;
  display: flex !important;
  align-items: flex-start !important;
}

.mobile-drawer .nav-list a {
  font-size: 15px;
  font-weight: 500;
  color: #0F172A;
  padding: 6px 0;
  transition: color 0.3s ease;
}

.mobile-drawer .nav-list a:hover {
  color: #ea1b36 !important;
}
.mobile-drawer .nav-list a:hover::after {
  background: #ea1b36;
}

/* Overlay (Backdrop) */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1070;
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s ease;
}

.drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Responsive Header Layout Scaling */
@media (max-width: 1024px) {
  .header-inner {
    gap: 12px !important;
    padding-inline: 1.5rem !important;
  }
  .primary-nav {
    display: none !important;
  }
  .menu-toggle {
    display: flex !important;
  }
  .header-search-group {
    margin-inline: 10px !important;
    max-width: none !important;
  }
}

@media (max-width: 600px) {
  .header-inner {
    flex-wrap: wrap !important;
    padding-block: 16px !important;
  }
  .logo-link {
    order: 1 !important;
  }
  .menu-toggle {
    order: 2 !important;
  }
  .header-search-group {
    order: 3 !important;
    width: 100% !important;
    margin: 12px 0 0 0 !important;
    flex: none !important;
  }
  .header-search-bar {
    height: 44px !important;
  }
  .logo {
    width: 140px !important;
    height: auto !important;
  }
  .mobile-drawer {
    width: 240px !important;
  }
}
