/* 广西天网电线电缆有限公司 - 站点样式（响应式） */
:root {
  --primary: #3366cc;
  --text: #2f2d2d;
  --muted: #999;
  --border: #e5e5e5;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "Microsoft YaHei", "微软雅黑", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  font-size: 14px;
  line-height: 1.8;
  background: #fff;
}
a { color: inherit; text-decoration: none; transition: all .3s; }
img { max-width: 100%; vertical-align: middle; border: 0; }
ul, ol { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* ===== 页头（与原站一致：白底 87px、logo 87px 比例、导航 16px/3.47em） ===== */
.tw-header { background: #fff; position: relative; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 87px; }
.logo img { height: 60px; display: block; }
.main-nav > ul { display: flex; }
.main-nav > ul > li { position: relative; }
.main-nav > ul > li > a { display: block; padding: 0 24px; font-size: 16px; line-height: 87px; color: #040404; }
.main-nav > ul > li > a:hover, .main-nav > ul > li.active > a { color: var(--primary); }
/* 下拉：单列整行（还原原站 z-nav-sub） */
.main-nav .sub { position: absolute; top: 100%; left: 50%; display: block; min-width: 120px; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.1); opacity: 0; visibility: hidden; transform: translate(-50%, 10px); transition: all .3s; z-index: 99; }
.main-nav > ul > li:hover .sub { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.main-nav .sub li a { display: block; padding: 12px 26px; text-align: center; font-size: 14px; line-height: 1.6; color: #333; white-space: nowrap; }
.main-nav .sub li a:hover { color: var(--primary); }

/* 移动端导航 */
.nav-btn { display: none; width: 44px; height: 34px; cursor: pointer; padding: 8px 10px; }
.nav-btn span { display: block; height: 2px; background: #1f1e1e; margin: 5px 0; transition: all .3s; }
.nav-toggle { display: none; }

/* ===== 内页横幅（原站：白底 + 72px Impact 英文 + 16px 标语） ===== */
.page-banner { background: #fff; text-align: center; padding: 132px 0 0; }
.page-banner .en { font-family: Impact, Charcoal, sans-serif; font-size: 72px; line-height: 1.1; letter-spacing: 4px; color: #2f2d2d; text-transform: uppercase; font-weight: normal; }
.page-banner .slogan { font-size: 16px; line-height: 1.6; color: #333; letter-spacing: 2px; margin-top: 20px; }
/* 蓝底横幅（原站：rgb(51,102,204) 白字，标语带 2px 白边框） */
.page-banner.blue { background: var(--primary); padding: 132px 0 140px; }
.page-banner.blue .en, .page-banner.blue .slogan { color: #fff; }
.page-banner.blue .slogan { display: inline-block; border: 2px solid #fff; padding: 10px 28px; margin-top: 20px; color: rgba(255,255,255,.95); }
/* 单页正文配图（原站：正文下方全宽图片） */
.page-img { margin-top: 44px; }
.page-img img { display: block; width: 100%; height: auto; }

/* 工厂文化图片墙（原站：4列卡片网格，悬停蓝色半透明遮罩+中心图标） */
.culture-gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.culture-item { position: relative; display: block; background: #fafafa; border: 1px solid #ddd; padding: 20px; }
.culture-item > img { display: block; width: 100%; height: auto; }
.culture-item .overlay { position: absolute; inset: 0; background: rgba(51,102,204,.5); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .3s; }
.culture-item:hover .overlay { opacity: 1; }
.culture-item .overlay img { width: 30px; height: auto; }
/* 3 列变体（产品结构页，原站 num3） */
.culture-gallery.cols-3 { grid-template-columns: repeat(3, 1fr); }
.culture-item { cursor: pointer; }

/* 图片预览弹层（原站点击图片弹出大图，layer.photos 效果） */
.img-lightbox { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.85); z-index: 9999; align-items: center; justify-content: center; cursor: zoom-out; }
.img-lightbox.active { display: flex; }
.img-lightbox img { max-width: 88%; max-height: 88%; box-shadow: 0 8px 40px rgba(0,0,0,.5); }
.img-lightbox .close { position: absolute; top: 16px; right: 28px; font-size: 44px; color: #fff; line-height: 1; opacity: .8; }
.img-lightbox .close:hover { opacity: 1; }

/* 联系我们（原站：左侧公司名+分隔线+联系方式列表，右侧高德地图） */
.contact-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact-name { font-size: 18px; font-weight: bold; color: #333; line-height: 1.5; }
.contact-line { border: 0; border-top: 1px solid #ccc; margin: 18px 0 26px; }
.contact-list li { margin-bottom: 20px; font-size: 16px; line-height: 1.5; color: #333; font-family: 'Microsoft YaHei', sans-serif; }
.contact-list a { color: #333; }
.contact-list a:hover { border-bottom: 1px solid #333; }
.contact-map { position: relative; min-height: 320px; background: #f4f4f4; }
.contact-map .map-inner { position: absolute; inset: 0; }
.map-fallback { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: #666; text-align: center; padding: 20px; }
.map-fallback a { color: var(--primary); }

/* 分享行（原站详情页：顶部 1px 分隔线 + 分享链接，图标圆角） */
.share-row { border-top: 1px solid #eee; padding-top: 16px; margin-top: 26px; display: flex; align-items: center; gap: 10px; color: #434748; font-size: 16px; }
.share-row a { display: inline-block; padding: 4px 14px; border: 1px solid #ddd; border-radius: 20px; font-size: 13px; color: #555; transition: all .3s; }
.share-row a:hover { border-color: var(--primary); color: var(--primary); }

/* 子导航（原站：居中横向 tab，项间竖线，active/hover 蓝底白字） */
.sub-nav { text-align: center; padding: 34px 0 0; }
.sub-nav ul { display: inline-flex; flex-wrap: wrap; justify-content: center; }
.sub-nav li { position: relative; }
.sub-nav li + li::before { content: ""; position: absolute; top: 12px; left: 0; height: 20px; width: 1px; background: #cbcbcb; }
.sub-nav a span { display: block; padding: 10px 20px; font-size: 16px; color: #333; transition: all .3s; }
.sub-nav li.active a span, .sub-nav a:hover span { background: var(--primary); color: #fff; }

/* ===== 首页横幅（视频） ===== */
.home-banner { position: relative; height: 66.88vw; max-height: 660px; min-height: 320px; overflow: hidden; }
.home-banner video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.home-banner::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.26); z-index: 1; }
.banner-slogans { position: absolute; inset: 0; z-index: 2; }
.banner-slogans li { font-size: clamp(20px, 3.4vw, 40px); color: #fff; font-weight: 600; letter-spacing: 6px; text-align: center; position: absolute; left: 0; right: 0; top: 46%; opacity: 0; animation: sloganFade 9s infinite; white-space: nowrap; }
.banner-slogans li:nth-child(1) { animation-delay: 0s; }
.banner-slogans li:nth-child(2) { animation-delay: 3s; }
.banner-slogans li:nth-child(3) { animation-delay: 6s; }
@keyframes sloganFade { 0% {opacity:0; transform: translateY(14px);} 8% {opacity:1; transform: translateY(0);} 28% {opacity:1;} 36% {opacity:0; transform: translateY(-14px);} 100% {opacity:0;} }

/* ===== 通用板块 ===== */
.section { padding: 60px 0; }
.section.gray { background: #f9f9ff; }
.sec-head { text-align: center; margin-bottom: 40px; }
.sec-head h2 { font-size: 26px; font-weight: 500; color: var(--text); letter-spacing: 2px; }
.sec-head .bar { display: block; width: 46px; height: 3px; background: var(--primary); margin: 14px auto 10px; }
.sec-head p { color: var(--muted); letter-spacing: 3px; font-size: 13px; }

/* 公司简介（首页） */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.about-grid .pic img { width: 100%; display: block; }
.about-text .slogan { font-size: 20px; color: var(--primary); letter-spacing: 4px; margin-bottom: 16px; }
.about-text p { color: #555; text-align: justify; margin-bottom: 12px; }
.btn { display: inline-block; padding: 10px 35px; font-size: 15px; border: 2px solid var(--primary); color: #fff; background: var(--primary); transition: all .3s; }
.btn:hover { color: var(--primary); background: transparent; }

/* 产品展示（首页） */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.product-card { border: 1px solid #666; padding: 10px; text-align: center; background: #fff; transition: all .3s; }
.product-card:hover { border-color: var(--primary); transform: translateY(-20px); }
.product-card .pic { padding-top: 76.92%; position: relative; overflow: hidden; }
.product-card .pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.product-card .pic::after { content: ''; position: absolute; inset: 20px; background: rgba(51,102,204,.6) url('/uploads/site/3917_izkow0zg_915958283.png') center no-repeat; background-size: auto; opacity: 0; transition: all .3s; z-index: 2; pointer-events: none; }
.product-card:hover .pic::after { opacity: 1; }
.product-card h3 { font-size: 18px; font-weight: 400; line-height: 1.5; padding: 10px 0 6px; }
.product-card h3 a:hover { color: var(--primary); }
.sec-more { text-align: center; margin-top: 36px; }

/* 工程案例（首页） */
.case-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.case-card { position: relative; overflow: hidden; }
.case-card .pic { padding-top: 70.92%; position: relative; }
.case-card .pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.case-card:hover img { transform: scale(1.06); }
.case-card .cap { position: absolute; inset: 0; background: rgba(51,102,204,.6); opacity: 0; transition: all .3s; display: flex; align-items: center; justify-content: center; padding: 0 16px; }
.case-card:hover .cap { opacity: 1; }
.case-card .cap .t { color: #fff; font-size: 15px; text-align: center; }

/* ===== 页脚（与原站一致：白底三等分、18px 标题、14px #999 列表、灰底版权条） ===== */
.tw-footer { background: #fff; color: #999; padding: 0; font-size: 14px; border-top: 1px solid #d6d3d3; }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; padding: 46px 0 40px; }
.footer-grid h4 { color: #333; font-size: 18px; margin-bottom: 22px; font-weight: bold; line-height: 1; }
.foot-contact li { margin-bottom: 6px; color: #999; font-size: 14px; line-height: 1.6; }
.foot-contact b, .foot-nav b { display: none; }
.foot-nav { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 12px; }
.foot-nav li { color: #999; font-size: 14px; line-height: 1.6; }
.foot-nav a { color: #999; }
.foot-nav a:hover { color: var(--primary); }
/* 友情链接（原站：三张图片一排，hover 阴影） */
.friend-links { display: flex; gap: 8px; }
.friend-links a { flex: 1; display: block; transition: all .3s; }
.friend-links a:hover { box-shadow: 0 0 14px rgba(0,0,0,.15); }
.friend-links img { display: block; width: 100%; height: auto; }
.copyright { border-top: 1px solid #ecebeb; background: #f3f3f3; padding: 12px; min-height: 38px; text-align: center; font-size: 13px; line-height: 1.6; color: #666; }
.copyright a { color: #666; display: inline-block; }
.copyright a:hover { color: #000; }

/* ===== 内页正文（原站：16px #333、行高 2、两端对齐） ===== */
.page-body { padding: 34px 0 70px; }
.article-content { color: #333; font-size: 16px; }
.article-content p { line-height: 2; text-align: justify; text-indent: 2em; margin-bottom: 18px; }
.article-content img { max-width: 100%; height: auto; }
.about-page { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: start; }

/* 列表页（原站：案例 4 列图 85% 宽 + 18px 居中标题；产品为单列文字卡片） */
.list-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.pagination { text-align: center; margin-top: 46px; }
.pagination ul { display: inline-flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.pagination li a, .pagination li span { display: block; padding: 7px 14px; border: 1px solid var(--border); color: #555; }
.pagination li.active span, .pagination li a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* 产品展示列表（原站：单列文字卡片，1px 边框 hover 变蓝，16px 加粗宋体标题） */
.product-list { padding: 26px 0 0; }
.product-list li { margin-bottom: 22px; }
.product-list a { display: block; padding: 30px; border: 1px solid #ddd; font-family: SimSun, '宋体', serif; font-weight: bold; font-size: 16px; line-height: 1.5; color: #666; transition: all .3s; }
.product-list a:hover { border-color: var(--primary); color: var(--primary); }

/* 详情页（原站：面包屑 + 左对齐标题 + 发布时间 + 正文） */
/* 案例列表卡片（原站：图片占 85% 宽、比例 76.9%、标题 18px 居中） */
.case-list .case-card { text-align: center; }
.case-list .case-card .pic { width: 85%; margin: 0 auto; padding-top: 76.92%; position: relative; overflow: hidden; }
.case-list .case-card .pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.case-list .case-card:hover img { transform: scale(1.06); }
.case-list .case-card .cap { position: static; inset: auto; padding: 12px 0 0; background: none; opacity: 1; display: block; }
.case-list .case-card .cap .t { font-size: 18px; line-height: 1.5; color: #666; transition: color .3s; }
.case-list .case-card a:hover .cap .t { color: var(--primary); }

/* 系列页产品网格（原站：4 列图卡、图比例 76.92%、标题居中灰字） */
.series-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.series-list .case-card { text-align: center; }
.series-list .case-card .pic { width: 100%; padding-top: 76.92%; position: relative; overflow: hidden; background: #f7f7f7; }
.series-list .case-card .pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.series-list .case-card:hover img { transform: scale(1.06); }
.series-list .case-card .cap { position: static; inset: auto; padding: 12px 0 0; background: none; opacity: 1; display: block; }
.series-list .case-card .cap .t { font-size: 16px; line-height: 1.5; color: #666; transition: color .3s; }
.series-list .case-card a:hover .cap .t { color: var(--primary); }
.detail-wrap { max-width: 1200px; margin: 0 auto; }
.crumb { margin-bottom: 20px; font-size: 13px; color: #999; }
.crumb a { color: #999; }
.crumb a:hover { color: var(--primary); }
.crumb li { display: inline-block; }
.crumb li + li::before { content: "/"; margin: 0 6px; color: #ccc; }
.detail-title { margin-bottom: 8px; font-size: 24px; font-weight: bold; color: #333; line-height: 1.5; }
.detail-meta { color: var(--muted); font-size: 13px; padding-bottom: 14px; margin-bottom: 24px; border-bottom: 1px solid #ecebeb; }
.spec-table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.spec-table td { border: 1px solid var(--border); padding: 10px 14px; }
.spec-table td:first-child { width: 130px; background: #f7f9ff; color: #333; font-weight: 500; }
.back-btn { margin-top: 30px; }

/* 留言表单（原站：窄栏 col-8 居中，label 左置） */
.msg-form { max-width: 800px; margin: 0 auto; }
.form-row { display: flex; margin-bottom: 16px; }
.form-row label { width: 110px; flex: none; text-align: right; padding-right: 14px; line-height: 40px; color: #333; }
/* 验证码行（后台登录同款布局） */
.msg-form .captcha-line { display: flex; gap: 10px; align-items: center; }
.msg-form .captcha-line input { width: 200px; }
.msg-form .captcha-line img { height: 40px; cursor: pointer; border-radius: 2px; }
.form-row label em { color: #e33; font-style: normal; }
.form-row input, .form-row textarea { flex: 1; min-width: 0; padding: 9px 12px; border: 1px solid #ccc; font-size: 14px; font-family: inherit; outline: none; transition: border .3s; }
.form-row input:focus, .form-row textarea:focus { border-color: var(--primary); }
.form-row textarea { min-height: 120px; resize: vertical; }
.form-row .btn { flex: 1; padding: 12px; background: var(--primary); border: 0; color: #fff; font-size: 16px; cursor: pointer; transition: opacity .3s; }
.form-row .btn:hover { opacity: .85; }
.form-msg { display: none; margin-top: 16px; padding: 10px 14px; border-radius: 3px; font-size: 14px; }
.form-msg.ok { display: block; background: #eef7ee; color: #390; border: 1px solid #bfe3bf; }
.form-msg.err { display: block; background: #fff2f2; color: #e33; border: 1px solid #f3c1c1; }

/* 联系方式块 */
.contact-list li { margin-bottom: 14px; font-size: 15px; color: #444; }
.contact-list b { color: var(--text); font-weight: 500; }

/* ===== 响应式（手机端） ===== */
@media (max-width: 860px) {
  /* 头部固定顶部（含返回顶部滚动时始终可见），body 预留等高空间 */
  .tw-header { position: fixed; top: 0; left: 0; right: 0; }
  body { padding-top: 60px; }
  .header-inner { height: 60px; }
  .logo img { height: 34px; }
  .nav-btn { display: block; }
  .main-nav { position: fixed; top: 0; right: -260px; width: 260px; height: 100vh; background: #fff; transition: right .3s; z-index: 200; box-shadow: -4px 0 12px rgba(0,0,0,.12); overflow-y: auto; }
  .nav-toggle:checked ~ .main-nav { right: 0; }
  .main-nav ul { display: block; padding: 20px 0; }
  .main-nav > ul > li > a { line-height: 2.8; padding: 0 26px; border-bottom: 1px solid #f0f0f0; }
  .main-nav .sub { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; display: none; background: #f7f7f7; }
  .main-nav li:hover .sub { display: block; }
  .main-nav .sub li a { width: auto; padding: 0 40px; line-height: 2.6; text-align: left; }
  .main-nav li.has-sub > a::after { content: "+"; float: right; color: #999; }
  .nav-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 150; }
  .nav-toggle:checked ~ .nav-mask { display: block; }

  .home-banner { min-height: 240px; }
  .banner-slogans li { letter-spacing: 3px; font-size: 22px; white-space: normal; padding: 0 20px; }
  .section { padding: 40px 0; }
  .about-grid, .about-page { grid-template-columns: 1fr; gap: 24px; }
  .product-grid, .case-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .list-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .series-list { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .sec-head h2 { font-size: 21px; }
  .page-banner { padding: 66px 0 0; }
  .page-banner .en { font-size: 44px; letter-spacing: 2px; }
  .page-banner .slogan { font-size: 14px; letter-spacing: 1px; margin-top: 14px; }
  .page-banner.blue { padding: 66px 0 60px; }
  .product-list { padding: 16px 0 0; }
  .product-list li { margin-bottom: 14px; }
  .product-list a { padding: 18px 16px; font-size: 14px; }
  .form-row { display: block; }
  .form-row label { width: auto; text-align: left; line-height: 1.6; padding: 0 0 6px; display: block; }
  .sub-nav { padding: 22px 0 0; }
  .sub-nav a span { padding: 8px 16px; font-size: 15px; }
  .page-body { padding: 24px 0 50px; }
  .contact-wrap { grid-template-columns: 1fr; gap: 26px; }
  .contact-map { min-height: 240px; }
  .culture-gallery { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .culture-item { padding: 10px; }
}
@media (max-width: 420px) {
  .product-grid, .case-grid { grid-template-columns: 1fr; }
  /* 工程案例列表：原站手机端保持 2 列（data-phoneRows=2），标题单行小字 */
  .list-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .series-list { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .series-list .case-card .cap .t { font-size: 14px; }
  .case-list .case-card .pic { width: 100%; }
  .case-list .case-card .cap .t { font-size: 14px; }
}
