/**
 * Custom Off-Canvas Navigation Menu Styles
 */

/* Hide Astra's default mobile menu - AGGRESSIVE */
.ast-mobile-popup-drawer,
.ast-mobile-header-content,
.ast-mobile-popup-content,
.ast-mobile-popup-inner,
.main-header-bar-navigation.toggle-on,
.ast-mobile-menu-buttons .menu-toggle.toggled ~ .ast-mobile-popup-drawer {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* Force hide Astra mobile header navigation */
body .ast-mobile-popup-drawer,
body.ast-main-header-nav-open .ast-mobile-popup-drawer,
.ast-mobile-header-wrap .ast-mobile-popup-drawer,
.ast-header-break-point .ast-mobile-popup-drawer {
  display: none !important;
  visibility: hidden !important;
}

/* Off-Canvas Container */
.cu-off-canvas-nav-container {
  position: fixed;
  top: 0;
  left: -100%;
  width: 384px;
  max-width: 90%;
  height: 100%;
  background-color: #fff;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
  z-index: 999999;
  transition: left 0.4s ease-in-out;
  overflow-y: auto;
  overflow-x: hidden;
}

.cu-off-canvas-nav-container.open {
  left: 0;
}

/* Overlay when menu is open */
.cu-off-canvas-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999998;
  display: none;
}

.cu-off-canvas-overlay.active {
  display: block;
}

/* Header Section */
.cu-off-canvas-header {
  padding: 25px 20px;
  background-color: #a50034;
  color: #fff;
  position: relative;
  min-height: 80px;
  display: flex;
  align-items: center;
}

.default-logo-cu {
  display: block;
  max-width: 200px;
  flex: 1;
}

.default-logo-cu svg {
  width: 100%;
  height: auto;
  display: block;
}

.default-logo-cu .cls-1 {
  fill: #fff;
}

.default-logo-cu .cls-2 {
  fill: #fff;
}

.cu-off-canvas-header .close {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 36px;
  cursor: pointer;
  color: #fff;
  font-weight: 300;
  line-height: 0.85;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 3px;
  transition: background-color 0.2s;
  font-family: Arial, sans-serif;
}

.cu-off-canvas-header .close:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.cu-off-canvas-links {
  margin-top: 15px;
}
#js-main-menu {
  display: none !important;
}
.cu-off-canvas-links .main-menu {
  color: #fff;
  font-weight: bold;
  font-size: 14px;
  text-transform: uppercase;
}

/* Navigation */
.cu-off-canvas-nav {
  background-color: #fff;
}

.cu-off-canvas-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cu-off-canvas-nav .level-1 > li {
  border-bottom: 1px solid #e0e0e0;
}

.cu-off-canvas-nav .level-1 > li > a {
  display: flex;
  align-items: center;
  padding: 18px 70px 18px 20px;
  color: #333;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  transition: background-color 0.2s;
  min-height: 56px;
}

.cu-off-canvas-nav .level-1 > li > a:hover {
  background-color: #f5f5f5;
}

.cu-off-canvas-nav .level-1 > li > a.has-icon {
  padding-left: 60px;
  position: relative;
}

.cu-off-canvas-nav .svg-icon {
  position: absolute;
  left: 20px;
  width: 24px;
  height: 24px;
  fill: #a50034;
}

/* Toggle Button */
.cu-off-canvas-nav .toggle {
  position: absolute;
  right: 20px;
  top: 10px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f0f0f0;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.cu-off-canvas-nav li {
  position: relative;
}

.cu-off-canvas-nav .toggle span {
  font-size: 24px;
  line-height: 1;
  color: #333;
  font-weight: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.cu-off-canvas-nav .toggle:hover {
  background-color: #e0e0e0;
}

/* Submenu */
.cu-off-canvas-nav .level-1 > li > ul {
  display: none;
  background-color: #f9f9f9;
}

.cu-off-canvas-nav .level-1 > li > ul li a {
  display: block;
  padding: 12px 20px 12px 60px;
  color: #555;
  text-decoration: none;
  font-size: 14px;
  transition: background-color 0.2s;
  border-bottom: 1px solid #e8e8e8;
}

.cu-off-canvas-nav .level-1 > li > ul li:last-child a {
  border-bottom: none;
}

.cu-off-canvas-nav .level-1 > li > ul li a:hover {
  background-color: #f0f0f0;
}

/* Hamburger Menu Button - Style the existing Astra hamburger or custom button */
.ast-mobile-menu-buttons .menu-toggle,
.ast-button-wrap .menu-toggle,
.menu-toggle {
  cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
  .cu-off-canvas-nav-container {
    width: 100%;
    max-width: 100%;
  }
}

/* Scrollbar styling */
.cu-off-canvas-nav-container::-webkit-scrollbar {
  width: 8px;
}

.cu-off-canvas-nav-container::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.cu-off-canvas-nav-container::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.cu-off-canvas-nav-container::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Additional styles to ensure Astra menu stays hidden */
body.custom-menu-open .ast-mobile-popup-drawer,
body.custom-menu-open .ast-mobile-header-content {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

/* Ensure our menu is always on top */
body.custom-menu-open .cu-off-canvas-nav-container {
  z-index: 999999 !important;
}

body.custom-menu-open .cu-off-canvas-overlay {
  z-index: 999998 !important;
}

/* Prevent Astra mobile menu from appearing */
.ast-mobile-popup-drawer.active {
  display: none !important;
}

body.ast-main-header-nav-open .ast-mobile-popup-drawer {
  display: none !important;
}

/* Nuclear option - hide ALL Astra mobile menus everywhere always */
html body .ast-mobile-popup-drawer,
html body.ast-main-header-nav-open .ast-mobile-popup-drawer,
html .ast-header-break-point .ast-mobile-popup-drawer,
html .ast-mobile-header-wrap .ast-mobile-popup-drawer,
html .ast-mobile-popup-inner,
html .ast-mobile-popup-content,
html .main-header-bar-navigation.toggle-on,
html body .main-header-bar-navigation.toggle-on .main-header-menu {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
}
