/* ============================================================
   Huaying Machinery 华鹰机械 — 企业官网样式
   主色：工业蓝 #0b4da2 / 深灰 #1c2733 / 强调橙 #f39c12
   ============================================================ */
:root {
  --blue: #0b4da2;
  --blue-dark: #083a7d;
  --dark: #1c2733;
  --gray: #f5f7fa;
  --border: #e3e8ef;
  --accent: #f39c12;
  --text: #2b3440;
  --muted: #6b7684;
  --maxw: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.7;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- 占位提示 ---------- */
.ph {
  color: #b06a00;
  background: #fff7e6;
  border-bottom: 1px dashed #e0a030;
  padding: 0 2px;
}
.en .ph { background: transparent; border: none; color: inherit; padding: 0; }

/* ---------- 顶部栏 ---------- */
.topbar {
  background: var(--dark);
  color: #cdd6e0;
  font-size: 13px;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 36px;
}
.lang-switch a { color: #fff; padding: 2px 8px; border: 1px solid #4a5768; border-radius: 3px; }
.lang-switch a:hover { background: var(--blue); border-color: var(--blue); }

/* ---------- 导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 8px rgba(0,0,0,.06);
}
.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
}
.logo { display: flex; align-items: center; gap: 12px; font-size: 24px; font-weight: 700; color: var(--dark); }
.logo .mark {
  width: 44px; height: 44px;
  display: block; flex: none;
}
.logo small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); letter-spacing: 1px; }

.main-nav ul { display: flex; gap: 8px; }
.main-nav a {
  padding: 8px 18px;
  border-radius: 4px;
  font-size: 16px;
  color: var(--text);
  transition: .2s;
}
.main-nav a:hover, .main-nav a.active { background: var(--blue); color: #fff; }

/* 移动端汉堡菜单 */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: transform .25s, opacity .2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: #07305f;
  color: #fff;
  padding: 124px 0 96px;
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.hero.is-dragging {
  cursor: grabbing;
}
.hero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
  transition: transform .35s cubic-bezier(.22,.61,.36,1);
  will-change: transform;
}
.hero.is-dragging .hero-slides {
  transition: none;
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 65%;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}
.hero-slide.active { opacity: 1; }
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(100deg,
    rgba(5,28,62,.62) 0%,
    rgba(7,48,105,.45) 32%,
    rgba(8,58,125,.10) 68%,
    rgba(6,38,84,.35) 100%);
  pointer-events: none;
}
.hero .container {
  position: relative;
  z-index: 2;
}
.hero h1 {
  font-size: 44px;
  margin-bottom: 16px;
  letter-spacing: 2px;
  color: rgba(255,255,255,.87);
  text-shadow: 0 1px 4px rgba(0,15,40,.50), 0 4px 20px rgba(0,15,40,.42);
}
.hero p {
  font-size: 18px;
  color: rgba(214,229,247,.86);
  margin-bottom: 36px;
  max-width: 620px;
  text-shadow: 0 1px 3px rgba(0,15,40,.55), 0 2px 14px rgba(0,15,40,.45);
}
.hero .btns { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 10px;
}
.hero-dot {
  width: 28px;
  height: 4px;
  border: 0;
  border-radius: 2px;
  background: rgba(255,255,255,.4);
  cursor: pointer;
  transition: width .3s ease, background .3s ease;
  padding: 0;
}
.hero-dot:hover { background: rgba(255,255,255,.7); }
.hero-dot.active { background: #fff; width: 44px; }
.btn {
  display: inline-block;
  padding: 13px 38px;
  border-radius: 4px;
  font-size: 16px;
  transition: .2s;
  cursor: pointer;
}
.btn-primary { background: var(--accent); color: #fff; font-weight: 700; }
.btn-primary:hover { background: #e08e0b; }
.btn-ghost { border: 1px solid rgba(255,255,255,.6); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.15); }

/* ---------- 通用区块 ---------- */
.section { padding: 72px 0; }
.section.alt { background: var(--gray); }
.section-head { text-align: center; margin-bottom: 48px; }
.section-head .kicker { color: var(--blue); font-weight: 700; letter-spacing: 3px; text-transform: uppercase; font-size: 14px; }
.section-head h2 { font-size: 32px; color: var(--dark); margin-top: 8px; }
.section-head .line {
  width: 56px; height: 4px; background: var(--accent);
  margin: 16px auto 0; border-radius: 2px;
}

.grid { display: grid; gap: 28px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(11,77,162,.12); }
.card .thumb {
  height: 190px;
  padding: 14px;
  background: linear-gradient(135deg, #eaf2fb, #d3e2f2);
  display: flex; align-items: center; justify-content: center;
  color: #7b93b0; font-size: 14px;
}
/* 抠图产品图：无背景 PNG/WebP，等比完整显示并带柔和投影 */
.card .thumb img {
  max-width: 100%;
  max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 16px rgba(11,77,162,.22));
  transition: transform .35s ease;
}
.card:hover .thumb img { transform: scale(1.06); }
.card .body { padding: 20px 22px; }
.card h3 { font-size: 18px; color: var(--dark); margin-bottom: 8px; }
.card p { font-size: 14px; color: var(--muted); }

/* ---------- 实拍现场 ---------- */
.gallery { display: grid; gap: 20px; grid-template-columns: repeat(4, 1fr); }
.gallery figure {
  position: relative;
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #0f2744;
  box-shadow: 0 4px 14px rgba(8,42,88,.10);
}
.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  transition: transform .45s ease;
}
.gallery figure:hover img { transform: scale(1.06); }
.gallery figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 40px 16px 14px;
  background: linear-gradient(to top, rgba(4,20,42,.94), rgba(4,20,42,.55) 55%, rgba(4,20,42,0));
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}
.gallery figcaption small {
  display: block;
  font-weight: 400;
  font-size: 12px;
  color: #b9cde6;
  margin-top: 3px;
  letter-spacing: .3px;
}

/* ---------- 数字统计 ---------- */
.stats { background: var(--dark); color: #fff; padding: 56px 0; }
.stats .grid { text-align: center; }
.stats .num { font-size: 40px; font-weight: 800; color: var(--accent); }
.stats .label { font-size: 14px; color: #aebccd; margin-top: 4px; }

/* ---------- 关于页 ---------- */
.page-banner {
  position: relative;
  background-color: var(--blue-dark);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  text-align: center;
  padding: 72px 0;
}
.page-banner::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(6,26,54,.58), rgba(6,26,54,.70));
}
.page-banner .container { position: relative; z-index: 1; }
.banner-about { background-image: url("../img/banner-about.webp"); }
.banner-products { background-image: url("../img/banner-products.webp"); }
.banner-news { background-image: url("../img/banner-news.webp"); }
.banner-news::after { background: linear-gradient(180deg, rgba(6,26,54,.72), rgba(6,26,54,.84)); }
.banner-contact { background-image: url("../img/banner-contact-v2.webp"); }
.page-banner h1 { font-size: 34px; letter-spacing: 2px; text-shadow: 0 2px 14px rgba(0,0,0,.4); }
.page-banner .crumbs { margin-top: 10px; font-size: 14px; color: #d5e3f6; text-shadow: 0 1px 8px rgba(0,0,0,.45); }
.page-banner .crumbs a:hover { color: #fff; }

.feature-list { display: grid; gap: 24px; grid-template-columns: repeat(3, 1fr); }
.feature {
  background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 28px;
}
.feature .ico {
  width: 52px; height: 52px; border-radius: 8px;
  background: #e8f0fb; color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; margin-bottom: 16px;
}
.feature h3 { font-size: 18px; color: var(--dark); margin-bottom: 8px; }

/* ---------- 产品表 ---------- */
.spec-table { width: 100%; border-collapse: collapse; background: #fff; }
.spec-table th, .spec-table td { border: 1px solid var(--border); padding: 12px 16px; text-align: left; font-size: 14px; }
.spec-table th { background: var(--gray); color: var(--dark); }

/* ---------- 新闻 ---------- */
.news-item { display: flex; gap: 20px; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 22px; }
.news-item .date {
  min-width: 72px; text-align: center;
  background: var(--blue); color: #fff; border-radius: 6px; padding: 8px 0; align-self: flex-start;
}
.news-item .date b { display: block; font-size: 24px; }
.news-item h3 { font-size: 18px; color: var(--dark); margin-bottom: 6px; }
.news-item p { font-size: 14px; color: var(--muted); }

/* ---------- 联系表单 ---------- */
.contact-wrap { display: grid; grid-template-columns: 1fr 1.4fr; gap: 36px; }
.info-item { display: flex; gap: 14px; margin-bottom: 22px; }
.info-item .ico {
  width: 42px; height: 42px; flex: none;
  background: #e8f0fb; color: var(--blue); border-radius: 8px;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.info-item h4 { font-size: 15px; color: var(--dark); }
.info-item p { font-size: 14px; color: var(--muted); }

.form { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 32px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form label { display: block; font-size: 14px; color: var(--dark); margin-bottom: 6px; }
.form input, .form textarea, .form select {
  width: 100%; padding: 11px 14px;
  border: 1px solid var(--border); border-radius: 4px;
  font-size: 14px; font-family: inherit; background: #fbfcfe;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--blue); }
.form textarea { min-height: 130px; resize: vertical; }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--dark); color: #9db0c3; padding: 56px 0 0; font-size: 14px; }
.site-footer h4 { color: #fff; font-size: 16px; margin-bottom: 18px; }
.site-footer .grid { gap: 40px; }
.site-footer a:hover { color: #fff; }
.footer-bottom {
  margin-top: 48px; border-top: 1px solid #313e4e;
  padding: 18px 0; text-align: center; font-size: 13px; color: #7c8ea1;
}

/* ---------- 文章页（技术与经验） ---------- */
.article { max-width: 860px; margin: 0 auto; font-size: 16px; }
.article-header { text-align: center; margin-bottom: 40px; }
.article-header .kicker { color: var(--blue); font-size: 13px; font-weight: 700; letter-spacing: 3px; }
.article-header h1 { font-size: 30px; color: var(--dark); margin: 12px 0 10px; line-height: 1.4; }
.article-header .sub { color: var(--muted); font-size: 15px; margin-bottom: 12px; }
.article-header .meta { font-size: 13px; color: #93a1b3; }
.article h2 { font-size: 24px; color: var(--dark); margin: 44px 0 16px; padding-left: 12px; border-left: 4px solid var(--blue); }
.article h3 { font-size: 19px; color: var(--dark); margin: 32px 0 12px; }
.article p { margin: 0 0 16px; }
.article ul, .article ol { margin: 0 0 16px; padding-left: 26px; }
.article li { margin-bottom: 8px; }
.article ul { list-style: disc; }
.article ol { list-style: decimal; }
.article .tbl-wrap { overflow-x: auto; margin: 20px 0 24px; }
.article table { min-width: 620px; }
.article .note { font-size: 13px; color: var(--muted); background: var(--gray); border-left: 3px solid var(--accent); padding: 10px 14px; border-radius: 4px; margin: 0 0 16px; }
.article .tldr { background: #e8f0fb; border: 1px solid #c3d6ec; border-radius: 8px; padding: 22px 26px; margin: 28px 0; }
.article .tldr .tag { display: inline-block; background: var(--blue); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 3px; margin-bottom: 10px; }
.back-link { display: inline-block; margin-bottom: 24px; color: var(--blue); font-size: 14px; }
.back-link:hover { text-decoration: underline; }

/* 文章内嵌图 */
.article figure.article-figure { margin: 28px 0; padding: 0; border: 1px solid #dde5ef; border-radius: 8px; background: #fff; overflow: hidden; box-shadow: 0 2px 10px rgba(8,42,88,.05); }
.article figure.article-figure img { display: block; width: 100%; height: auto; }
.article figure.article-figure figcaption { padding: 10px 16px; font-size: 13px; color: var(--muted); background: #f5f8fc; border-top: 1px solid #e3e9f3; line-height: 1.6; }
.article figure.article-figure-right { float: right; width: 240px; max-width: 40%; margin: 4px 0 16px 24px; }
@media (max-width: 768px) {
  .article figure.article-figure-right { float: none; width: 100%; max-width: 100%; margin: 20px 0; }
}

/* ---------- 住友钨丝 TWS 系列板块 ---------- */
.tws-intro { max-width: 900px; margin: 0 auto 32px; }
.tws-intro p { font-size: 15px; line-height: 1.95; color: var(--muted); margin-bottom: 14px; text-align: justify; }
.tws-intro p:last-child { margin-bottom: 0; }
.tws-intro strong { color: var(--dark); }

.tws-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; max-width: 960px; margin: 0 auto 40px; }
.tws-kpi {
  background: #eef4fd;
  border-left: 4px solid var(--blue);
  border-radius: 6px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
}
.tws-kpi .v { font-size: 19px; font-weight: 800; color: var(--blue-dark); line-height: 1.3; }
.tws-kpi .k { font-size: 12px; color: var(--muted); letter-spacing: 1px; }

.tws-block-title {
  font-size: 19px; color: var(--dark); font-weight: 700;
  margin: 0 0 18px; padding-left: 12px; border-left: 4px solid var(--accent);
}
.tws-block { max-width: 900px; margin: 0 auto 40px; }
.tws-block:last-child { margin-bottom: 0; }

.tws-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tws-feature {
  background: #fff;
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: 8px;
  padding: 20px 20px 18px;
}
.tws-feature h3 { font-size: 16px; color: var(--dark); margin-bottom: 8px; }
.tws-feature p { font-size: 13px; color: var(--muted); line-height: 1.75; }

.tws-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.tws-chip {
  border: 1.5px solid var(--blue);
  color: var(--blue);
  border-radius: 20px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .5px;
}
.tws-chip .en { color: #93a1b3; font-weight: 400; font-size: 11px; margin-left: 4px; }

.tws-photos { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.tws-photos figure { flex: 0 0 auto; width: calc((100% - 36px) / 3); margin: 0; border-radius: 8px; overflow: hidden; background: #0f2744; box-shadow: 0 4px 14px rgba(8,42,88,.10); }
.tws-photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.tws-photos figcaption { padding: 12px 14px; background: #0f2744; color: #fff; font-size: 13px; font-weight: 600; line-height: 1.5; }
.tws-photos figcaption small { display: block; font-weight: 400; font-size: 12px; color: #b9cde6; margin-top: 3px; }

.tws-cta {
  max-width: 900px;
  margin: 0 auto;
  padding: 26px 28px;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  border-radius: 10px;
  border-left: 4px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.tws-cta .t { color: #fff; font-size: 19px; font-weight: 700; }
.tws-cta .s { color: rgba(255,255,255,.78); font-size: 13px; line-height: 1.7; margin-top: 6px; }
.tws-cta .btns { display: flex; gap: 10px; flex-wrap: wrap; }
.tws-cta a { padding: 11px 22px; border-radius: 6px; font-size: 13px; letter-spacing: 1px; }
.tws-cta a.solid { background: var(--accent); color: #fff; font-weight: 700; }
.tws-cta a.solid:hover { background: #e08e0b; }
.tws-cta a.line { border: 1.5px solid rgba(255,255,255,.6); color: #fff; font-weight: 600; }
.tws-cta a.line:hover { background: rgba(255,255,255,.15); }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .tws-kpis { grid-template-columns: repeat(2, 1fr); }
  .tws-features { grid-template-columns: repeat(2, 1fr); }
  .tws-photos figure { width: calc((100% - 18px) / 2); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .feature-list { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .contact-wrap { grid-template-columns: 1fr; }
  .hero { padding: 96px 0 80px; }
  .hero h1 { font-size: 34px; }
}
@media (max-width: 640px) {
  .grid-4, .grid-3, .grid-2, .feature-list, .form .row { grid-template-columns: 1fr; }
  .tws-kpis, .tws-features { grid-template-columns: 1fr; gap: 14px; }
  .tws-photos { gap: 14px; }
  .tws-photos figure { width: 100%; }
  .tws-kpi .v { font-size: 19px; }
  .tws-cta { padding: 22px 20px; }
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 10px 22px rgba(0,0,0,.10);
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
  }
  .main-nav.open { max-height: 340px; }
  .main-nav ul { flex-direction: column; gap: 0; padding: 8px 16px 16px; }
  .main-nav a { display: block; padding: 13px 14px; border-radius: 6px; }
  .hero { padding: 78px 0 70px; }
  .hero-overlay {
    background: linear-gradient(180deg, rgba(5,28,62,.65) 0%, rgba(7,42,92,.40) 50%, rgba(5,28,62,.65) 100%);
  }
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 16px; }
  .hero-dots { bottom: 16px; gap: 8px; }
  .hero-dot { width: 22px; }
  .hero-dot.active { width: 34px; }
  .gallery { grid-template-columns: 1fr; gap: 16px; }
}
