/*! Pushy - Modified Version - 不覆盖顶部header */
/* 基础重置 */
:root {
  --header-height: 0px; 
  /* --header-height: 60px; 默认值，JS会动态更新 */
}

/* 顶部header必须存在的样式 */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  background: #ffffff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* 抽屉菜单核心样式 */
.pushy {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 280px;
  height: calc(100vh - var(--header-height));
  height: calc(100dvh - var(--header-height)); /* 现代浏览器 */
  z-index: 999;
  width: 100vw;         /* 100% 视口宽度 */
  max-width: 100%;      /* 防止溢出 */
  background: #191918;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* 防止页面滚动穿透 */
.pushy-open-left,
.pushy-open-right {
  overflow-y: hidden;
  height: 100vh;
}

/*除菜单和header即主题部分可滚动*/
/* #marine-content-inner{
  overflow-y: auto;
  overflow-x: hidden;
} */

/* 右侧菜单变体 */
.pushy-right {
  left: auto;
  right: 0;
  transform: translateX(100%);
}

/* 菜单打开状态 */
.pushy-open-left .pushy-left {
  transform: translateX(0);
}
.pushy-open-right .pushy-right {
  transform: translateX(0);
}

/* 菜单内容 */
/* .pushy-content {
  padding: 20px 0;
} */

#m_menu_container{
padding: 20px 0;
}

/* 菜单链接样式 */
/* .pushy a { */
#m_menu_container a {
  display: block;
  color: #b3b3b1;
  font-size:16px;
  padding: 12px 30px;
  text-decoration: none;
  transition: color 0.2s;
}
/* .pushy a:hover { */
#m_menu_container a:hover {  
  color: #ffffff;
}

/* 遮罩层 */
.site-overlay {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 100%;
  height: calc(100vh - var(--header-height));
  background: #191918;
  z-index: 998;
  animation: fadeIn 0.3s;
}
.pushy-open-left .site-overlay,
.pushy-open-right .site-overlay {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

#m_menu_container .pushy-submenu > ul {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding-left: 15px;
}

#m_menu_container .pushy-submenu-open > ul {
  max-height: 1000px;
}

#m_menu_container .pushy-submenu > a, 
#m_menu_container .pushy-submenu > button {
  position: relative;
  cursor: pointer;
}

#m_menu_container .pushy-submenu > a::after,
#m_menu_container .pushy-submenu > button::after {
  content: "›";
  position: absolute;
  font-size: 24px;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.3s;
}

#m_menu_container .pushy-submenu-open > a::after,
#m_menu_container .pushy-submenu-open > button::after {
  transform: translateY(-50%) rotate(90deg);
}

/* 三级菜单样式 */
#m_menu_container .pushy-submenu .pushy-submenu > ul {
  padding-left: 25px;
}

#m_menu_container ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: block;
}
#m_menu_container ul li a:hover {  
  color: #ffffff;
}

/* 菜单项分隔线 */
#m_menu_container ul li {
  display: block;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

#m_menu_container ul li a{
  font-size:16px;
}

#m_menu_container .pushy-submenu a{
 font-size:14px;
}

/* 基础按钮样式 */
/* #m_main_nav_btn {
  background: none;
  border: none;
  width: 40px;
  height: 40px;
  padding: 10px;
  cursor: pointer;
  position: relative;
  z-index: 1001;
} */

/* 三条杠基础样式 */
#m_main_nav_btn .menu-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: #333;
  position: absolute;
  left: 0;
  transition: all 0.2s cubic-bezier(0.8, 0.1, 0.1, 0.8);
}

/* 精确计算线条位置 */
.menu-bar.top {
  top: calc(50% - 5px);
  transform-origin: center;
}
.menu-bar.middle {
  top: 50%;
  opacity: 1;
}
.menu-bar.bottom {
  top: calc(50% + 5px);
  transform-origin: center;
}

/* 打开状态下的变化 */
/* X形转换动画 - 完全对称版本 */
.pushy-open-left .menu-btn .menu-bar.top,
.pushy-open-right .menu-btn .menu-bar.top {
  transform: translateY(5px) rotate(45deg); /* 精确计算位移 */
  width: 100%; /* 保持长度一致 */
}
.pushy-open-left .menu-btn .menu-bar.middle,
.pushy-open-right .menu-btn .menu-bar.middle {
  opacity: 0;
}
.pushy-open-left .menu-btn .menu-bar.bottom,
.pushy-open-right .menu-btn .menu-bar.bottom {
  transform: translateY(-5px) rotate(-45deg);
  width: 100%;
}

/* 图标颜色变化 */
.pushy-open-left .menu-bar,
.pushy-open-right .menu-bar {
  background: #fff; /* 菜单打开时图标变白色 */
}

/* ============================================
   二级菜单特殊样式
   放在文件最后以确保覆盖Pushy默认样式
   ============================================ */
/* 隐藏Pushy自带箭头 */
.level2-submenu > .menu-link-with-arrow::after {
    display: none;
}

/* 自定义可点击箭头 */
.clickable-arrow {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    cursor: pointer;
    position: relative;
}

.clickable-arrow::before {
   content: "›";
  position: absolute;
  font-size: 24px;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.3s;
}

/* 展开状态 */
.level2-submenu.pushy-submenu-open .clickable-arrow::before {
    /* content: '▼'; */
     transform: translateY(-50%) rotate(90deg);
}

/* 确保文字和箭头可以分别点击 */
.menu-link-with-arrow {
    /* display: flex;
    align-items: center; */
    display: flex !important;
    align-items: center !important;
    justify-content: space-between;
    pointer-events: none; /* 禁用整个链接的点击 */
}

.link-text {
    pointer-events: auto; /* 启用文字点击 */
    flex: 1;
      min-width: 0; /* 关键：允许缩小到0 */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.clickable-arrow {
    pointer-events: auto; /* 启用箭头点击 */
    flex-shrink: 0 !important; /* 关键：禁止缩小 */
}
