/* =========================================================
   回音信使 · 全站增强层 opt.css
   作用：长图裁切 / 导航不折行 / 图标收敛 / 二级菜单可点
         / 联系方式强化 / 手机端三键底栏
   说明：不改动原 base.css 与各页骨架样式，只做覆盖式修正
   ========================================================= */

/* ---------- 1. 图片：超长图、竖长图统一裁切 ---------- */
img {
  max-width: 100%;
  height: auto;
}

/* 远程图床（新闻缩略图）常见超长图，强制进 16:9 框内裁切 */
img[src*="pic.xiahunao.cn"],
img[src*="xiahunao"],
img.fit-16x9 {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: 50% 50%;
  display: block;
  background: #e6e6e0;
}

/* 所有图片容器内部的统一裁切，防止原图比例把版式撑开 */
.frame img,
.ph img,
.shot img,
.home-hero__plate img,
.home-hero__plate2 img,
.home-coop__pic img,
.home-lv__pic img,
.hnews-card__media img,
.hnews-row__thumb img,
.news-item__media img,
.show-article__cover img,
.show-side__list img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

.show-article__cover img {
  height: auto;
  aspect-ratio: 16 / 9;
}

/* 正文里可能出现的长截图，限高避免一屏被一张图占满 */
.show-article__content img {
  max-height: 780px;
  width: auto;
  max-width: 100%;
  margin-inline: auto;
}

/* ---------- 2. 图标：尺寸收敛，与文字基线对齐 ---------- */
svg {
  max-width: 100%;
}

.topline__contact svg,
.topline__contact .ico,
.rail__toggle svg,
.btn svg,
.nav__trigger svg,
.contact-dock__btn svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  vertical-align: -0.1em;
}

.btn svg {
  width: 15px;
  height: 15px;
}

/* 装饰性大图标在大屏上不抢版面 */
.rank-head__medal svg {
  width: 96px;
  height: 96px;
}

@media (max-width: 860px) {
  .rank-head__medal svg {
    width: 64px;
    height: 64px;
  }
  .items-card__icon svg,
  .guide-keycard__icon svg {
    width: 22px;
    height: 22px;
  }
}

/* ---------- 3. 导航：文字不折行 ---------- */
.nav > a,
.nav__trigger,
.nav__panel a,
.mobile-menu__grid a,
.rail__list a {
  white-space: nowrap;
}

.nav__panel a {
  display: flex;
  align-items: center;
}

@media (max-width: 1320px) and (min-width: 1181px) {
  .nav {
    font-size: 14px;
    gap: 0;
  }
  .nav > a,
  .nav__trigger {
    padding: 8px 9px;
  }
}

/* ---------- 4. 二级菜单：一级移开时不消失 ---------- */
.nav__group {
  position: relative;
}

/* 一级与二级之间的透明桥，鼠标可以斜着走下去 */
.nav__group::after {
  content: "";
  position: absolute;
  left: -10px;
  right: -10px;
  top: 100%;
  height: 16px;
  background: transparent;
}

.nav__panel {
  z-index: 55;
  min-width: 220px;
  max-width: 300px;
}

.nav__panel a {
  line-height: 1.4;
  padding: 10px 12px;
}

.nav__group.is-open .nav__panel,
.nav__group:hover .nav__panel,
.nav__group:focus-within .nav__panel {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* ---------- 5. 顶部联系方式：任何屏宽都在 ---------- */
@media (max-width: 560px) {
  .topline {
    font-size: 12px;
  }
  .topline__inner {
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px 12px;
    padding: 6px 10px;
    min-height: 0;
  }
  .topline__contact {
    gap: 12px;
  }
  .topline__contact a:last-child {
    display: inline-flex;
  }
  .topline__contact a {
    font-weight: 700;
  }
}

/* ---------- 6. 手机端三键底栏 ---------- */
.mbar {
  display: none;
}

@media (max-width: 1180px) {
  body {
    padding-bottom: 66px;
  }
  .mbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--ink, #0d0d0f);
    box-shadow: 0 -10px 26px -18px rgba(13, 13, 15, 0.9);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .mbar__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    padding: 9px 4px 8px;
    background: #0d0d0f;
    color: #fff;
    font-size: 12px;
    line-height: 1.3;
    border: 0;
    border-radius: 0;
    width: 100%;
  }
  .mbar__item:active {
    background: #1e1f24;
  }
  .mbar__item--call {
    background: var(--orange, #ff6a1a);
    color: #0d0d0f;
  }
  .mbar__item b {
    font-weight: 800;
    font-size: 13px;
  }
  .mbar__item i {
    font-style: normal;
    font-size: 11px;
    opacity: 0.72;
    font-family: var(--font-num, monospace);
  }
  .mbar__ico {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    margin-bottom: 2px;
  }
  .mbar__ico svg {
    width: 18px;
    height: 18px;
  }
  .contact-dock {
    bottom: 84px;
  }
}

@media (max-width: 360px) {
  .mbar__item i {
    display: none;
  }
}

/* ---------- 7. 复制提示 ---------- */
.opt-toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translate(-50%, 12px);
  z-index: 200;
  padding: 10px 18px;
  border-radius: 999px;
  background: #0d0d0f;
  color: #fff;
  font-size: 13px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  pointer-events: none;
}

.opt-toast.is-on {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* ---------- 8. 编辑校验块 ---------- */
.opt-credit {
  margin: 0 auto;
  width: min(1240px, 100% - 48px);
  padding: 26px 0 34px;
  border-top: 1px solid var(--paper-3, #d8d8d1);
  color: var(--muted, #6c6d73);
  font-size: 13px;
  line-height: 1.9;
}

.opt-credit b {
  color: var(--text, #131316);
  font-weight: 700;
}

.opt-credit a {
  color: var(--orange-deep, #d24f05);
  font-weight: 700;
}

@media (max-width: 560px) {
  .opt-credit {
    width: calc(100% - 32px);
    font-size: 12.5px;
  }
}

/* ---------- 9. 表单替代：联系卡 ---------- */
.opt-cta-card {
  display: grid;
  gap: 10px;
  padding: 22px;
  border: 1.5px solid var(--ink, #0d0d0f);
  border-radius: 12px;
  background: #fff;
  box-shadow: 6px 6px 0 var(--ink, #0d0d0f);
}

.opt-cta-card h3 {
  font-size: 18px;
  margin: 0 0 2px;
}

.opt-cta-card p {
  color: var(--muted, #6c6d73);
  font-size: 13px;
  margin: 0 0 6px;
}

.opt-cta-card a,
.opt-cta-card button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--ink, #0d0d0f);
  font-weight: 800;
  font-size: 14px;
  background: var(--paper, #f1f1ed);
  color: var(--ink, #0d0d0f);
  text-align: left;
  width: 100%;
}

.opt-cta-card a small,
.opt-cta-card button small {
  font-weight: 600;
  font-size: 12px;
  color: var(--muted, #6c6d73);
}

.opt-cta-card .is-orange {
  background: var(--orange, #ff6a1a);
  border-color: var(--orange, #ff6a1a);
}


/* ---------- 10. 新增栏目页：统一文章版式 ---------- */
.opt-article-hero{padding:54px 0 26px;border-bottom:1px solid rgba(0,0,0,.08)}
.opt-article-hero .opt-crumb-x{display:flex;flex-wrap:wrap;gap:8px;align-items:center;font-size:13px;opacity:.72;margin-bottom:16px}
.opt-article-hero .opt-crumb-x a{text-decoration:none}
.opt-article-hero .opt-kicker{display:inline-block;font-size:12px;letter-spacing:.18em;text-transform:uppercase;font-weight:700;margin-bottom:10px;opacity:.8}
.opt-article-hero h1{font-size:clamp(26px,3.2vw,40px);line-height:1.3;margin:0 0 12px}
.opt-article-hero .opt-lead{font-size:15.5px;line-height:1.85;max-width:760px;opacity:.82;margin:0}
.opt-article-hero .opt-meta{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px;font-size:12.5px;opacity:.7}
.opt-article-hero .opt-meta span{padding:4px 10px;border:1px solid currentColor;border-radius:999px}
.opt-article-body{max-width:820px;padding:34px 0 10px}
.opt-article-body h2{font-size:clamp(19px,2.1vw,25px);line-height:1.4;margin:34px 0 12px}
.opt-article-body h3{font-size:17px;margin:22px 0 8px}
.opt-article-body p{margin:0 0 14px;line-height:1.9}
.opt-article-body ul,.opt-article-body ol{margin:0 0 16px;padding-left:1.3em;line-height:1.9}
.opt-article-body li{margin-bottom:6px}
.opt-article-body a{font-weight:600;text-decoration:underline;text-underline-offset:3px}
.opt-article-body table{width:100%;border-collapse:collapse;margin:10px 0 18px;font-size:14px}
.opt-article-body th,.opt-article-body td{border:1px solid rgba(0,0,0,.14);padding:9px 10px;text-align:left;vertical-align:top}
.opt-article-body th{font-weight:700;background:rgba(0,0,0,.04)}
.opt-note{margin:18px 0;padding:14px 16px;border-left:4px solid currentColor;background:rgba(0,0,0,.035);font-size:14px;line-height:1.85}
.opt-rel{margin:26px 0 40px;padding-top:22px;border-top:1px dashed rgba(0,0,0,.18)}
.opt-rel h2{font-size:18px;margin:0 0 12px}
.opt-rel ul{list-style:none;padding:0;display:grid;gap:8px}
.opt-rel li a{display:flex;justify-content:space-between;gap:12px;padding:10px 14px;border:1px solid rgba(0,0,0,.14);border-radius:10px;text-decoration:none;font-size:14px;font-weight:600}
@media(max-width:760px){.opt-article-hero{padding:34px 0 18px}.opt-article-body{padding:24px 0 6px}}

.opt-article-body{margin-inline:auto}

/* ---------- 11. 左侧竖栏并入顶部导航 ---------- */
.rail{display:none !important}
.shell{padding-left:0 !important}
body{--rail-w:0px}

/* 导航第七项：更多 */
.nav__group--more .nav__panel{min-width:190px}
@media(min-width:1181px) and (max-width:1460px){
  .nav{font-size:14px}
  .nav>a,.nav__trigger{padding:8px 8px}
}
@media(min-width:1181px) and (max-width:1300px){
  .nav{font-size:13px}
  .nav>a,.nav__trigger{padding:7px 6px;letter-spacing:0}
  .head-actions .btn{padding:9px 14px;font-size:13px}
}

@media(max-width:1180px){
  .contact-dock{display:none !important}
  .to-top{bottom:calc(78px + env(safe-area-inset-bottom))}
}
