/* ========== NAV (PC & Mobile 同款效果) ========== */

/* 顶栏容器：保持你的渐变，提升层级避免被轮播盖住 */
.nav-bar{
  --bar-h: 72px;
  position: sticky; top: 0; z-index: 5000;
  background: linear-gradient(90deg, #004e92, #000428);
  border: 0; box-shadow: none;
}

/* 内部左右布局 */
.nav-inner{
  max-width: 1200px; margin: 0 auto; padding: 10px 16px;
  display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 24px;
}

/* 左 LOGO（包含“中洪机械设备厂”文字） */
.brand{ height: var(--bar-h); display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration:none; font-weight:800; }
.brand img{ height: 120px; width:auto; display:block; transform: scale(1.35); transform-origin:left center; }
.brand-text{ color:#fff; font-size:16px; }

/* 右菜单：贴右 */
.nav{ display:flex; justify-content:flex-end; align-items:center; gap:32px; margin:0; padding:0; list-style:none; }
.nav-item{ position:relative; }
.nav-link{
  color:#fff; text-decoration:none; font-weight:700;
  padding: 12px 2px; line-height:1; display:inline-flex; align-items:center; gap:8px;
}
.nav-link:hover{ text-decoration: underline; }

/* 金色小下划线 */
.nav-underline{
  display:block; height:3px; width:32px; margin:6px auto 0;
  background:#f2cc3c; border-radius:2px; transform:scaleX(0);
  transform-origin:center; transition:transform .25s ease;
}
.has-dropdown:hover > .nav-link .nav-underline,
.has-dropdown:focus-within > .nav-link .nav-underline{ transform:scaleX(1); }

/* 下拉菜单（PC & Mobile 同款视觉） */
.has-dropdown .dropdown{
  position:absolute; top: calc(100% + 6px); right:0;
  min-width: 200px; padding:8px 0; margin:0; list-style:none;
  background: rgba(0,0,0,.6);               /* 若想完全透明，改成 transparent */
  backdrop-filter: blur(6px);
  border-radius:8px; box-shadow: 0 12px 32px rgba(0,0,0,.25);
  display:none; z-index: 6000;              /* 高于轮播 */
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown{ display:block; }

.dropdown-item{
  display:block; padding:12px 16px; color:#fff; text-decoration:none; font-weight:600;
  white-space:nowrap; line-height:1.2; text-shadow:0 1px 2px rgba(0,0,0,.3);
}
.dropdown-item:hover{ background: rgba(255,255,255,.08); }

/* 彻底清除“分隔小白条 / 小圆点 / 小黑点” */
.nav > li::before,
.nav > li::after,
.nav > li > a::before,
.nav > li > a::after{ content:none !important; border:0 !important; }

/* 兜底：任何旧样式的分隔符都清理 */
*::marker{ content: none; }
.nav, .nav *{ list-style: none; }

/* 手机：与 PC 完全同款，点击即可展开（focus-within）；视觉不变 */
@media (max-width: 768px){
  .nav-inner{ padding: 10px 12px; }
  .nav{ gap: 20px; }
  .brand-text{ font-size:14px; }
  .dropdown-item{ font-size:16px; }
  /* 这里不改行为，保持与 PC 同视觉：使用 :focus-within 展开 */
}

/* —— 只影响手机端，不动 PC —— */

/* —— 手机端微调，不影响 PC —— */

/* 常见手机宽度 */
@media (max-width: 480px){
  /* 头部容器：收紧左右留白，给菜单多一点空间 */
  .nav-inner{
    padding: 8px 10px !important;
  }

  /* 品牌区：只隐藏文字，允许 LOGO 溢出显示完整 */
  .brand{
    display:flex !important;
    align-items:center !important;
    gap:6px !important;
    overflow:visible !important;         /* 关键：别裁 LOGO */
  }
  .brand-text{ display:none !important; } /* 隐藏公司名 */
  .brand img{ height:24px !important; }   /* LOGO 稍小一点 */

  /* 菜单：紧凑不换行 */
  .nav{
    display:flex !important;
    align-items:center !important;
    flex-wrap:nowrap !important;          /* 不换行 */
    white-space:nowrap !important;
    gap:10px !important;                  /* 再收一点间距 */
    min-width:0 !important;
  }
  .nav > li{ flex:0 0 auto !important; }
  .nav a{
    font-size:13.5px !important;          /* 比 14 再小一点 */
    padding:6px 0 !important;             /* 减少上下内边距 */
    line-height:1 !important;
    letter-spacing:0 !important;          /* 防止字距拉宽 */
  }

  /* 省空间：去掉下划线和分隔装饰 */
  .nav-underline{ display:none !important; }
  .nav > li::before,
  .nav > li::after,
  .nav > li > a::before,
  .nav > li > a::after{ content:none !important; }
}

/* 更窄机型的兜底（iPhone mini / 老机型等） */
@media (max-width: 390px){
  .nav{ gap:8px !important; }
  .nav a{ font-size:13px !important; }
}
@media (max-width: 768px){
  .brand img{ height:50px !important; }
  .nav a{ font-size:12.5px !important; }
}
/* 1) 保证导航及父级不裁剪，层级足够高 */
header, .nav-bar, .nav-inner { 
  overflow: visible !important; 
  position: relative; 
  z-index: 2000; 
}

/* 2) 下拉容器的定位与显示方式：始终占位，用透明度控制 */
.has-dropdown{ position: relative; }

.has-dropdown .dropdown{
  position: absolute;
  top: 100%;
  left: 0;                 /* 右对齐就改成 right:0; left:auto; */
  margin-top: 0;           /* 别用 margin-top 造成“缝隙” */
  padding-top: 8px;        /* 与标题之间的视觉间距 */
  display: block;          /* 不用 display:none，避免闪一下 */
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .15s ease, transform .15s ease, visibility 0s .15s;
  z-index: 3000;           /* 盖住轮播等元素 */
  pointer-events: none;    /* 关闭指针，待展开时再打开 */
}

/* 3) 悬停/聚焦时展开（PC 悬停 + 键盘/触屏 focus-within） */
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown{
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
  pointer-events: auto;    /* 开指针，能点里面的链接 */
}

/* 4) “防掉落桥梁”：在标题和下拉之间铺一条不可见的 hover 区 */
.has-dropdown::after{
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: 100%;
  height: 10px;            /* 桥宽，可按需要 6–14px 调整 */
}
/* 1) 保证导航及父级不裁剪，层级足够高 */
header, .nav-bar, .nav-inner { 
  overflow: visible !important; 
  position: relative; 
  z-index: 2000; 
}
/* PC 端品牌文字尺寸（logo 右侧的公司名） */
.nav-bar .brand-text{
  font-size: 22px;         /* 你想要的 PC 尺寸 */
  font-weight: 700;
  color: #fff;
  letter-spacing: .5px;
  white-space: nowrap;     /* 防止换行 */
  line-height: 1;          /* 与 logo 垂直对齐更紧凑 */
}

/* 大屏再稍微放大一点（可选） */
@media (min-width: 1200px){
  .nav-bar .brand-text{ font-size: 24px; }
}

/* 手机端隐藏公司名（保留 logo），避免挤出 “联系我们” */
@media (max-width: 768px){
  .nav-bar .brand-text{ display: none !important; }
}
