/* =========================================================
   越光电缆 · 官网样式
   ========================================================= */
:root {
  --blue: #174a9e;
  --blue-dark: #0e336f;
  --blue-light: #2f6fd0;
  --accent: #f0a500;
  --bg: #ffffff;
  --bg-gray: #f5f7fb;
  --text: #333;
  --text-muted: #6b7280;
  --border: #e5e9f2;
  --radius: 10px;
  --shadow: 0 6px 18px rgba(17, 60, 130, .08);
  --shadow-lg: 0 14px 40px rgba(17, 60, 130, .16);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  font-size: 15px;
  line-height: 1.75;
  background: var(--bg);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
code { background: #eef2f9; padding: 1px 6px; border-radius: 4px; font-size: 13px; color: #174a9e; }
.container { width: 1200px; max-width: 94%; margin: 0 auto; }
.center { text-align: center; }
section[id] { scroll-margin-top: 78px; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: #fff;
  box-shadow: 0 2px 10px rgba(17, 60, 130, .08);
}
.header-inner { display: flex; align-items: center; height: 72px; gap: 28px; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 42px; height: 42px; border-radius: 9px; flex: none;
  background: linear-gradient(135deg, var(--blue-light), var(--blue-dark));
  color: #fff; font-weight: 800; font-size: 17px;
  display: inline-flex; align-items: center; justify-content: center; letter-spacing: .5px;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.25; }
.logo-text b { font-size: 20px; color: var(--blue-dark); }
.logo-text i { font-style: normal; font-size: 12px; color: var(--text-muted); letter-spacing: 1px; }

.main-nav { display: flex; gap: 6px; margin-left: auto; }
.nav-link {
  padding: 6px 16px; border-radius: 20px; font-size: 15px; color: #444; position: relative;
  transition: all .2s;
}
.nav-link:hover { color: var(--blue); }
.nav-link.active { color: #fff; background: var(--blue); }
.header-phone { font-size: 13px; color: var(--text-muted); }
.header-phone b { display: block; font-size: 17px; color: var(--blue); letter-spacing: .5px; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: #333; margin: 5px 0; border-radius: 2px; }

/* ---------- Banner ---------- */
.hero { position: relative; margin-top: 72px; overflow: hidden; height: 72vh; min-height: 420px; max-height: 640px; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .8s; pointer-events: none; display: none; }
.hero-slide.active { opacity: 1; pointer-events: auto; display: block; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-slide::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(8, 30, 70, .72), rgba(8, 30, 70, .25));
}
.hero-caption { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: center; color: #fff; }
.hero-caption h2 { font-size: 46px; line-height: 1.2; margin-bottom: 16px; }
.hero-caption p { font-size: 18px; max-width: 620px; opacity: .94; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 14px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 28px; border-radius: 26px; font-size: 15px; cursor: pointer;
  border: 1px solid transparent; transition: all .2s; line-height: 1.4;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-light); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.85); }
.btn-ghost:hover { background: rgba(255,255,255,.16); }
.btn-plain { background: #fff; color: var(--blue); border: 1px solid var(--blue); }
.btn-plain:hover { background: var(--blue); color: #fff; }
.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255,255,255,.7);
  background: rgba(255,255,255,.12); color: #fff; font-size: 26px; line-height: 1; cursor: pointer;
}
.hero-arrow.left { left: 22px; }
.hero-arrow.right { right: 22px; }
.hero-arrow:hover { background: var(--blue); }
.hero-dots { position: absolute; left: 0; right: 0; bottom: 22px; z-index: 3; display: flex; justify-content: center; gap: 8px; }
.hero-dots button { width: 10px; height: 10px; border-radius: 50%; border: 0; background: rgba(255,255,255,.5); cursor: pointer; }
.hero-dots button.on { background: var(--accent); width: 22px; border-radius: 6px; }

/* ---------- 通用版块 ---------- */
.section { padding: 78px 0; }
.section-head { text-align: center; margin-bottom: 46px; }
.section-en { letter-spacing: 4px; font-size: 13px; color: var(--blue-light); }
.section-head h2 { font-size: 32px; color: var(--blue-dark); margin-top: 6px; position: relative; display: inline-block; }
.section-head h2::after { content: ""; display: block; width: 46px; height: 3px; background: var(--accent); border-radius: 2px; margin: 12px auto 0; }
.section-sub { color: var(--text-muted); margin-top: 14px; font-size: 14px; }

/* ---------- 关于我们 ---------- */
.about { background: var(--bg); }
.about-grid { display: grid; grid-template-columns: 480px 1fr; gap: 52px; align-items: center; }
.about-img-wrap { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.about-img-wrap img { width: 100%; height: 360px; object-fit: cover; }
.about-text h3 { font-size: 24px; color: var(--blue-dark); margin-bottom: 14px; }
.about-text p { margin-bottom: 12px; color: #444; }
.about-points { margin-top: 10px; }
.about-points li { padding: 5px 0; color: #444; }
.about-points li::before { color: var(--blue-light); content: "✔ "; }

/* ---------- 产品中心 ---------- */
.products { background: var(--bg-gray); }
.product-filter { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 34px; }
.filter-chip {
  padding: 7px 20px; border-radius: 20px; cursor: pointer; font-size: 14px;
  background: #fff; border: 1px solid var(--border); color: #555; transition: all .2s;
}
.filter-chip:hover { color: var(--blue); border-color: var(--blue-light); }
.filter-chip.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.product-card {
  background: #fff; border-radius: var(--radius); overflow: hidden; cursor: pointer;
  box-shadow: var(--shadow); transition: transform .22s, box-shadow .22s;
  display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.product-card .p-img { height: 190px; background: #eef3fb; display: flex; align-items: center; justify-content: center; }
.product-card .p-img img { width: 82%; height: 82%; object-fit: contain; transition: transform .25s; }
.product-card:hover .p-img img { transform: scale(1.05); }
.product-card .p-info { padding: 16px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.product-card .p-info h3 { font-size: 17px; color: var(--blue-dark); }
.product-card .p-tag {
  display: inline-block; margin-top: 8px; align-self: flex-start; font-size: 12px;
  color: var(--blue); background: #eef3fb; border-radius: 4px; padding: 2px 8px;
}
.product-card .p-desc { margin-top: 10px; font-size: 13px; color: var(--text-muted); flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card .p-more { margin-top: 12px; color: var(--blue); font-size: 13px; }

/* ---------- 新闻动态 ---------- */
.news { background: #fff; }
.news-filter { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 30px; }
.news-list { max-width: 960px; margin: 0 auto; }
.news-item {
  display: flex; gap: 20px; align-items: flex-start; padding: 20px 6px;
  border-bottom: 1px dashed var(--border); cursor: pointer; transition: background .18s; border-radius: 6px;
}
.news-item:hover { background: #f7faff; }
.news-date {
  flex: none; width: 68px; text-align: center; background: var(--blue); color: #fff;
  border-radius: 8px; padding: 8px 0;
}
.news-date b { display: block; font-size: 22px; line-height: 1.1; }
.news-date span { font-size: 12px; opacity: .85; }
.news-main h3 { font-size: 17px; color: var(--text); margin: 2px 0 6px; }
.news-item:hover .news-main h3 { color: var(--blue); }
.news-main p { font-size: 13px; color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-tag { display: inline-block; font-size: 12px; color: var(--blue-light); border: 1px solid var(--blue-light); border-radius: 4px; padding: 0 6px; margin-right: 8px; vertical-align: 1px; }
.news-list .center { margin-top: 24px; }
.news-tip { text-align: center; color: var(--text-muted); background: #fafbfe; padding: 40px; border: 1px dashed var(--border); border-radius: var(--radius); }

/* 新闻详情弹层 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(10, 25, 55, .55); z-index: 300;
  display: flex; align-items: center; justify-content: center; padding: 30px 16px;
}
.modal-mask[hidden] { display: none; }
.modal {
  position: relative; background: #fff; border-radius: 12px; max-width: 760px; width: 100%;
  max-height: 84vh; overflow: auto; padding: 30px 34px; animation: pop .22s;
}
@keyframes pop { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-close {
  position: absolute; top: 12px; right: 16px; border: 0; background: #f0f2f7;
  width: 32px; height: 32px; border-radius: 50%; font-size: 20px; cursor: pointer; color: #666; line-height: 1;
}
.modal-close:hover { background: #e3e7f0; }
.modal h2 { color: var(--blue-dark); font-size: 22px; padding-right: 30px; }
.modal .m-meta { color: var(--text-muted); font-size: 13px; margin: 8px 0 18px; }
.modal .m-meta span { margin-right: 16px; }
.modal .m-content p { margin-bottom: 12px; text-align: justify; }

/* ---------- 在线留言 ---------- */
.message { background: linear-gradient(180deg, var(--bg-gray), #fff); }
.message-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }
.message-info h2 { font-size: 28px; color: var(--blue-dark); margin-top: 4px; }
.contact-list { margin-top: 18px; }
.contact-list li { padding: 7px 0; border-bottom: 1px dashed var(--border); color: #444; }
.contact-list b { color: var(--blue-dark); }
.qr-wrap { display: inline-flex; flex-direction: column; align-items: center; margin-top: 18px; }
.qr-wrap img { width: 110px; height: 110px; border-radius: 8px; border: 1px solid var(--border); }
.qr-wrap p { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

.message-form {
  background: #fff; border-radius: var(--radius); padding: 30px 32px; box-shadow: var(--shadow-lg);
}
.message-form h3 { font-size: 20px; color: var(--blue-dark); }
.form-tip { color: var(--text-muted); font-size: 13px; margin: 4px 0 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.message-form label { display: block; margin-bottom: 14px; font-size: 13px; color: #555; }
.message-form label i { color: #d33; font-style: normal; }
.message-form input, .message-form textarea {
  width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 6px; font-size: 14px; font-family: inherit; color: var(--text); background: #fbfcfe;
}
.message-form input:focus, .message-form textarea:focus { outline: none; border-color: var(--blue-light); background: #fff; box-shadow: 0 0 0 3px rgba(47, 111, 208, .12); }
.form-result { margin-top: 12px; font-size: 14px; }
.form-result.ok { color: #1a7f37; }
.form-result.err { color: #c0392b; }

/* 在线留言弹层（点击右下角按钮弹出，替代原页面底部的固定版块） */
.msg-modal { max-width: 960px; }
.msg-head { margin-bottom: 22px; padding-right: 30px; border-bottom: 1px dashed var(--border); padding-bottom: 16px; }
.msg-head .section-en { display: block; }
.msg-head h2 { color: var(--blue-dark); font-size: 24px; margin: 4px 0 2px; }
.msg-head p { color: var(--text-muted); font-size: 13px; }
.msg-head p b { color: var(--blue); }
.msg-modal .message-grid { gap: 42px; align-items: start; }
.msg-modal .message-info h2 { display: none; }   /* 标题已在弹层头部 */
.msg-modal .message-form { box-shadow: var(--shadow); padding: 26px 28px; }
.msg-modal .message-form .btn-primary { margin-top: 4px; width: 100%; }

/* 右下角悬浮「在线留言」按钮 */
.float-message {
  position: fixed; right: 22px; bottom: 24px; z-index: 120;
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--blue-light), var(--blue-dark));
  color: #fff; border: 0; border-radius: 30px; padding: 11px 20px;
  font-size: 15px; font-family: inherit; cursor: pointer; line-height: 1;
  box-shadow: 0 8px 22px rgba(14, 51, 111, .35); transition: transform .2s, box-shadow .2s;
}
.float-message:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(14, 51, 111, .45); }
.float-ico { font-size: 16px; }
@media (max-width: 768px) {
  .float-message .float-txt { display: none; }      /* 手机上只保留图标 */
  .float-message { right: 14px; bottom: 14px; width: 52px; height: 52px; justify-content: center; padding: 0; border-radius: 50%; }
  .float-ico { font-size: 22px; }
}

/* ---------- 页脚 ---------- */
.site-footer { background: #10233f; color: #c6d2e4; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1.2fr 1fr; gap: 40px; padding: 54px 0 40px; }
.footer-logo .logo-mark { background: linear-gradient(135deg, var(--blue-light), #0a1d3a); }
.footer-logo .logo-text b { color: #fff; }
.footer-logo .logo-text i { color: #8ba3c8; }
.footer-desc { margin-top: 14px; font-size: 13px; line-height: 1.9; color: #8ba3c8; }
.footer-col h4 { color: #fff; font-size: 16px; margin-bottom: 16px; position: relative; padding-left: 12px; }
.footer-col h4::before { content: ""; position: absolute; left: 0; top: 6px; width: 4px; height: 14px; background: var(--accent); border-radius: 2px; }
.footer-col p { font-size: 13px; margin-bottom: 9px; color: #8ba3c8; }
.footer-col a:hover { color: #fff; }
.footer-qr img { width: 96px; height: 96px; border-radius: 6px; background: #fff; padding: 3px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 16px 0; font-size: 12px; color: #7d91b0; }
.footer-bottom .container { display: flex; gap: 26px; flex-wrap: wrap; justify-content: center; }
.footer-bottom a:hover { color: #fff; }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .header-phone { display: none; }
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed; top: 72px; left: 0; right: 0; background: #fff;
    flex-direction: column; padding: 8px 16px 16px; gap: 2px; display: none;
    box-shadow: 0 12px 22px rgba(17,60,130,.12);
  }
  .main-nav.open { display: flex; }
  .nav-link { padding: 12px 8px; border-radius: 8px; }
  .nav-link.active { background: transparent; color: var(--blue); }
  .hero-caption { align-items: flex-start; }
  .hero-caption h2 { font-size: 30px; }
  .hero-caption p { font-size: 15px; }
  .hero-arrow { display: none; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .message-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .about-img-wrap img { height: 260px; }
  .section { padding: 54px 0; }
}

/* ---------- Logo（真实图片） ---------- */
.logo-img { height: 40px; width: auto; }
.footer-logo { display: flex; align-items: center; gap: 10px; }
.footer-logo-box {
  width: 52px; height: 44px; flex: none; background: #fff; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; padding: 5px;
}
.footer-logo-box img { height: 30px; width: auto; }
.footer-logo .logo-text b { color: #fff; }
.footer-logo .logo-text i { color: #8ba3c8; }

/* ---------- 新闻类型徽标（文章/图集/视频） ---------- */
.type-badge { display: inline-block; font-size: 12px; line-height: 1.5; border-radius: 4px; padding: 0 7px; margin-right: 8px; vertical-align: 1px; }
.type-article { background: #eef1f6; color: #556; }
.type-gallery { background: #e6f6ec; color: #1a7f37; }
.type-video { background: #fdecec; color: #c0392b; }

/* ---------- 新闻详情：文章/图集/视频 ---------- */
.article-img { width: 100%; border-radius: 8px; margin: 4px 0 14px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin: 8px 0; }
.gallery-grid figure { margin: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.gallery-grid img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.gallery-grid figcaption { font-size: 12px; color: var(--text-muted); padding: 6px 10px; }
.nvideo { width: 100%; max-height: 440px; background: #000; border-radius: 8px; display: block; margin: 6px 0 12px; }
.embed-video { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 8px; background: #000; display: block; margin: 6px 0 12px; }
.video-fallback { display: inline-flex; align-items: center; gap: 8px; margin: 10px 0; }
.modal .m-block { margin-top: 4px; }
.m-empty { color: var(--text-muted); padding: 30px; text-align: center; }

/* ---------- 新闻详情：整页切换显示（替代居中小弹窗） ---------- */
.page-mask {
  position: fixed; inset: 0; z-index: 290; background: var(--bg-gray);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.page-mask[hidden] { display: none; }
.news-page { min-height: 100%; }
.np-top {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center;
  justify-content: space-between; height: 56px; padding: 0 20px;
  background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 6px rgba(17, 60, 130, .06);
}
.np-back {
  display: inline-flex; align-items: center; gap: 4px; border: 0; background: none;
  cursor: pointer; color: var(--blue); font-size: 15px; font-family: inherit;
  padding: 6px 8px; border-radius: 6px; transition: background .15s;
}
.np-back:hover { background: #eef3fb; color: var(--blue-dark); }
.np-back-ico { font-size: 26px; line-height: 1; }
.np-top-cat { font-size: 13px; color: var(--text-muted); }
.np-body {
  width: 100%; max-width: 900px; margin: 0 auto; padding: 30px 24px 80px;
  box-sizing: border-box;
}
.np-body h1.np-title { font-size: 28px; line-height: 1.45; color: var(--blue-dark); }
.np-meta {
  color: var(--text-muted); font-size: 13px; margin: 12px 0 18px;
  padding-bottom: 16px; border-bottom: 1px dashed var(--border);
}
.np-meta span { margin-right: 20px; }
.np-content { font-size: 15px; line-height: 2; }
.np-content p { margin-bottom: 16px; color: #3a3f45; text-align: justify; }
.np-content p:last-child { margin-bottom: 0; }
.np-content .article-img { margin: 6px 0 16px; border-radius: 8px; }
.np-content .gallery-grid { margin: 14px 0; }
.np-content .video-fallback { margin: 16px 0; }
@media (max-width: 768px) {
  .np-body h1.np-title { font-size: 22px; }
  .np-body { padding: 22px 16px 60px; }
  .np-meta span { display: inline-block; margin-right: 14px; }
}
