/* 增强的移动端菜单样式 */
.mobile-menu-panel {
  position: fixed;
  top: 0;
  right: -100%;
  width: 300px;
  height: 100vh;
  background: #fff;
  z-index: 9999;
  transition: right 0.3s ease;
  box-shadow: -2px 0 10px rgba(0,0,0,0.1);
  overflow-y: auto;
}

.mobile-menu-panel.active {
  right: 0;
}

.mobile-menu-header {
  background: #3b9bff;
  color: white;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mobile-menu-close {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.mobile-menu-close:hover {
  background: rgba(255,255,255,0.1);
}

.mobile-menu-content {
  padding: 0;
}

.mobile-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-menu-item {
  border-bottom: 1px solid #f0f0f0;
}

.mobile-menu-item:last-child {
  border-bottom: none;
}

.mobile-menu-item a {
  display: block;
  padding: 18px 20px;
  color: #333;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.mobile-menu-item a:hover {
  background: #f8f9fa;
  color: #3b9bff;
  padding-left: 25px;
}

.mobile-menu-item a:active {
  background: #e9ecef;
}

/* 遮罩层 */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

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

/* 汉堡菜单按钮样式 */
.hamburger {
  cursor: pointer;
  padding: 10px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.hamburger:hover {
  background: rgba(59, 155, 255, 0.1);
}

.hamburger_btn {
  width: 24px;
  height: 18px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger_btn span {
  display: block;
  width: 100%;
  height: 2px;
  background: #333;
  border-radius: 1px;
  transition: all 0.3s ease;
}

.hamburger:hover .hamburger_btn span {
  background: #3b9bff;
}

/* 汉堡菜单激活状态 */
.hamburger.active .hamburger_btn span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active .hamburger_btn span:nth-child(2) {
  opacity: 0;
}

.hamburger.active .hamburger_btn span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* 移动端适配 */
@media (max-width: 768px) {
  .mobile-menu-panel {
    width: 280px;
  }
  
  .mobile-menu-header {
    padding: 15px;
  }
  
  .mobile-menu-item a {
    padding: 15px 20px;
    font-size: 15px;
  }
}

@media (max-width: 576px) {
  .mobile-menu-panel {
    width: 100%;
    right: -100%;
  }
  
  .mobile-menu-panel.active {
    right: 0;
  }
  
  .mobile-menu-header {
    padding: 12px 15px;
  }
  
  .mobile-menu-item a {
    padding: 12px 15px;
    font-size: 14px;
  }
}

/* 动画效果 */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(100%);
  }
}

.mobile-menu-panel.active {
  animation: slideInRight 0.3s ease forwards;
}

.mobile-menu-panel:not(.active) {
  animation: slideOutRight 0.3s ease forwards;
}

/* 确保在所有页面都能正常显示 */
body.mobile-menu-open {
  overflow: hidden;
}

/* 响应式导航栏 */
@media (max-width: 991px) {
  .main_navigation {
    position: relative;
  }
  
  .hamburger {
    display: block;
  }
  
  .main-menu {
    display: none;
  }
}

@media (min-width: 992px) {
  .hamburger {
    display: none;
  }
  
  .main-menu {
    display: flex;
  }
}
