/* 山东望兴晨电子 公司官网样式。电脑、平板、手机共用一份，窄屏规则在文件末尾。 */

:root {
  --blue: #1f96f9;
  --blue-dark: #0b7fde;
  --navy: #011a30;
  --text: #2b2f36;
  --muted: #5d6470;
  --gray-1: #f5f5f5;
  --gray-2: #e8e8e8;
  --footer: #2f2f38;
  --footer-bottom: #0b0b0b;
  --header-h: 96px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans CJK SC", "Source Han Sans SC", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: #fff;
}

img {
  max-width: 100%;
}

a {
  color: var(--blue);
}

h1,
h2,
h3,
h4,
p,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

.wrap {
  width: min(1160px, 100% - 48px);
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ───────── 顶部导航（压在大图上） ───────── */

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.28);
  background: linear-gradient(rgba(3, 14, 28, 0.5), rgba(3, 14, 28, 0));
}

.header-inner {
  display: flex;
  align-items: center;
  width: min(1280px, 100% - 48px);
  height: var(--header-h);
  margin-inline: auto;
}

/* 标志是深蓝色，压在深色大图上看不清，垫一块白底 */
.logo {
  display: block;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.logo img {
  display: block;
  width: auto;
  height: 52px;
}

.nav {
  display: flex;
  align-self: stretch;
  margin-left: auto;
}

.nav a {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 20px;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1.5px;
  height: 3px;
  background: var(--blue);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

.nav a.active::after {
  transform: scaleX(1);
}

/* 手机上点过的链接会一直处于悬停状态，只在有鼠标的设备上显示悬停下划线 */
@media (hover: hover) {
  .nav a:hover::after {
    transform: scaleX(1);
  }
}

.lang-switch {
  margin-left: 16px;
  padding: 3px 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

.lang-switch:hover {
  background: #fff;
  color: var(--navy);
}

/* ───────── 大图 ───────── */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  height: clamp(420px, 50vw, 820px);
  padding: var(--header-h) 0 6vw;
  overflow: hidden;
  background: #0f2236;
  color: #fff;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(3, 14, 28, 0.42), rgba(3, 14, 28, 0.12) 45%, rgba(3, 14, 28, 0) 70%);
}

.hero-text {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(28px, 2.3vw, 40px);
  font-weight: 700;
  line-height: 1.3;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero p {
  max-width: 540px;
  margin-top: 24px;
  font-size: 16px;
  line-height: 1.8;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

/* ───────── 通用区块 ───────── */

.section {
  padding: 80px 0;
}

.section-tight {
  padding-top: 16px;
}

.section-gray {
  background: var(--gray-1);
}

.section-light {
  background: #f7f8fa;
}

.section-fields {
  background: var(--gray-2);
}

.section-title {
  margin-bottom: 48px;
  color: var(--navy);
  font-size: clamp(26px, 2.4vw, 38px);
  font-weight: 700;
  text-align: center;
}

.section-lead {
  margin: -16px 0 48px;
  font-size: 20px;
  text-align: center;
}

.section-intro {
  max-width: 760px;
  margin: -20px auto 40px;
  color: var(--muted);
  font-size: 14px;
  line-height: 2;
  text-align: center;
}

.sub-title {
  margin-bottom: 32px;
  color: var(--navy);
  font-size: 26px;
  font-weight: 600;
}

.btn {
  display: inline-block;
  min-width: 165px;
  padding: 12px 28px;
  border: 1.5px solid var(--blue);
  border-radius: 6px;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: center;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.btn:hover {
  border-color: var(--blue-dark);
  background: var(--blue-dark);
}

.btn-outline {
  background: #fff;
  color: var(--blue);
}

.btn-outline:hover {
  color: #fff;
}

.more {
  margin-top: 40px;
  text-align: center;
}

/* 滚动到时淡入（只对首屏以下的内容生效，由 site.js 控制） */
.reveal {
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.pending {
  opacity: 0;
  transform: translateY(18px) scale(0.98);
}

/* ───────── 品牌 / 产品 / 应用领域 ───────── */

.brand-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px 24px;
  max-width: 1120px;
  margin-inline: auto;
}

.brand-grid li {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 250 / 168;
  background: #fff;
}

.brand-grid img {
  width: 72%;
  height: 64%;
  object-fit: contain;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 28px 20px;
}

.product-img {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 209 / 147;
  padding: 8px;
  border: 1px solid #eceff2;
  background: #fff;
}

.product-img img {
  max-height: 100%;
  object-fit: contain;
}

.product-model {
  margin-top: 14px;
  color: #05132b;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  overflow-wrap: anywhere;
}

.field-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px 48px;
  max-width: 1120px;
  margin-inline: auto;
}

.field-grid li {
  width: calc((100% - 96px) / 3);
  aspect-ratio: 336 / 188;
}

.field-grid img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 产品页：左边标题，右边应用领域图片 */
.fields-side {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  align-items: center;
}

.fields-side-text h2 {
  margin-bottom: 20px;
  color: var(--blue);
  font-size: 29px;
  font-weight: 700;
}

.fields-side-text p {
  color: var(--muted);
  line-height: 1.8;
}

.fields-side .field-grid {
  justify-content: flex-start;
  gap: 16px 24px;
  margin: 0;
}

.fields-side .field-grid li {
  width: calc((100% - 48px) / 3);
}

/* ───────── 关于我们 / 服务：左文右图 ───────── */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 480px);
  gap: 64px;
  align-items: center;
}

.split-text h2 {
  margin-bottom: 20px;
  color: var(--navy);
  font-size: 22px;
  font-weight: 700;
}

.split-text p {
  margin-bottom: 12px;
  line-height: 2;
}

.split-media img {
  display: block;
  width: 100%;
  height: auto;
}

.service {
  grid-template-columns: minmax(0, 1fr) minmax(0, 540px);
}

.service .split-text h2 {
  font-size: 29px;
}

.service-list {
  margin-top: 32px;
}

.service-list li + li {
  margin-top: 26px;
}

.service-list h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 20px;
  font-weight: 600;
}

.service-list .num {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 15px;
}

.service-list p {
  padding-left: 38px;
  color: var(--muted);
  line-height: 1.8;
}

.logistics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 1120px;
  margin-inline: auto;
}

.logistics-grid li {
  padding: 13px 13px 20px;
  border-radius: 8px;
  background: #fff;
}

.logistics-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 334 / 198;
  border-radius: 8px;
  object-fit: cover;
}

.logistics-grid p {
  margin-top: 16px;
  font-size: 19px;
  font-weight: 700;
  text-align: center;
}

/* ───────── 联系我们 ───────── */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 660px);
  gap: 48px;
  align-items: start;
}

.contact-intro h2 {
  margin-bottom: 24px;
  color: var(--navy);
  font-size: clamp(28px, 2.4vw, 38px);
  font-weight: 700;
  line-height: 1.25;
}

.contact-intro p {
  line-height: 1.8;
}

.contact-card {
  padding: 28px 32px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 14px rgba(1, 26, 48, 0.05);
}

.contact-card h3 {
  margin-bottom: 4px;
  font-size: 24px;
  font-weight: 700;
}

.person {
  padding-top: 18px;
}

.person + .person {
  margin-top: 18px;
  border-top: 1px solid #edf0f3;
}

.person h4 {
  margin-bottom: 6px;
  font-size: 20px;
  font-weight: 700;
}

.person p {
  line-height: 1.9;
  overflow-wrap: anywhere;
}

.person span {
  color: var(--muted);
}

.person a {
  text-decoration: none;
}

.person a:hover {
  text-decoration: underline;
}

.map {
  height: 400px;
  border: 1px solid #dfe5eb;
  border-radius: 8px;
  overflow: hidden;
}

.map-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  background-color: #eef4fa;
  background-image: linear-gradient(rgba(31, 150, 249, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 150, 249, 0.09) 1px, transparent 1px),
    linear-gradient(118deg, transparent 46%, rgba(255, 255, 255, 0.95) 46%, rgba(255, 255, 255, 0.95) 49%, transparent 49%),
    linear-gradient(28deg, transparent 60%, rgba(255, 255, 255, 0.95) 60%, rgba(255, 255, 255, 0.95) 62%, transparent 62%);
  background-size: 40px 40px, 40px 40px, 100% 100%, 100% 100%;
  text-align: center;
}

.map-pin {
  width: 52px;
  height: 52px;
  fill: var(--blue);
  filter: drop-shadow(0 4px 6px rgba(31, 150, 249, 0.35));
}

.map-company {
  margin-top: 12px;
  color: var(--navy);
  font-size: 20px;
  font-weight: 700;
}

.map-address {
  max-width: 640px;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.7;
}

.map-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.map-actions .btn {
  min-width: 140px;
}

/* ───────── 页脚 ───────── */

.site-footer {
  background: var(--footer);
  color: #fff;
}

.footer-inner {
  padding: 28px 0 34px;
}

.site-footer h2 {
  margin-bottom: 14px;
  font-size: 19px;
  font-weight: 400;
}

.site-footer h3 {
  font-size: 13px;
  font-weight: 400;
}

.site-footer p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  line-height: 2;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.filing {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 20px;
  padding: 14px 16px;
  background: var(--footer-bottom);
  color: #837f87;
  font-size: 13px;
  line-height: 1.6;
}

/* ───────── 窄屏 ───────── */

@media (max-width: 1100px) {
  .nav a {
    padding: 0 13px;
    font-size: 17px;
  }

  .nav a::after {
    left: 8px;
    right: 8px;
  }
}

@media (max-width: 900px) {
  :root {
    --header-h: 104px;
  }

  .wrap {
    width: calc(100% - 32px);
  }

  .header-inner {
    flex-wrap: wrap;
    width: calc(100% - 32px);
    height: auto;
    padding-top: 10px;
  }

  .logo {
    padding: 3px 8px;
    border-radius: 6px;
  }

  .logo img {
    height: 38px;
  }

  .lang-switch {
    margin-left: auto;
  }

  .nav {
    order: 3;
    flex-wrap: wrap;
    width: 100%;
    margin: 4px 0 0;
    justify-content: space-between;
  }

  .nav a {
    padding: 12px 6px;
    font-size: 15px;
  }

  .nav a::after {
    left: 6px;
    right: 6px;
  }

  .hero {
    height: auto;
    min-height: 340px;
    padding: calc(var(--header-h) + 40px) 0 48px;
  }

  .page-home .hero {
    min-height: 460px;
  }

  .hero::after {
    background: linear-gradient(90deg, rgba(3, 14, 28, 0.55), rgba(3, 14, 28, 0.25));
  }

  .hero h1 {
    font-size: 26px;
  }

  .hero p {
    margin-top: 16px;
    font-size: 15px;
  }

  .section {
    padding: 48px 0;
  }

  .section-tight {
    padding-top: 8px;
  }

  .section-title {
    margin-bottom: 28px;
  }

  .section-lead {
    margin: -12px 0 28px;
    font-size: 16px;
  }

  .section-intro {
    margin: -12px auto 28px;
    text-align: left;
  }

  .sub-title {
    margin-bottom: 20px;
    font-size: 22px;
  }

  .brand-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 12px;
  }

  .product-model {
    margin-top: 8px;
    font-size: 14px;
  }

  .field-grid,
  .fields-side .field-grid {
    justify-content: center;
    gap: 16px;
  }

  .field-grid li,
  .fields-side .field-grid li {
    width: calc((100% - 16px) / 2);
  }

  .fields-side {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .fields-side-text {
    text-align: center;
  }

  .fields-side-text h2 {
    margin-bottom: 12px;
    font-size: 24px;
  }

  .split,
  .service {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .split-media {
    width: min(100%, 420px);
    margin-inline: auto;
  }

  .service .split-text h2 {
    font-size: 24px;
  }

  .service-list {
    margin-top: 20px;
  }

  .service-list h3 {
    font-size: 18px;
  }

  .logistics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .logistics-grid li {
    padding: 8px 8px 12px;
  }

  .logistics-grid p {
    margin-top: 10px;
    font-size: 15px;
  }

  .contact {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .contact-intro h2 {
    margin-bottom: 12px;
  }

  .contact-card {
    padding: 20px;
  }

  .contact-card h3 {
    font-size: 20px;
  }

  .person h4 {
    font-size: 18px;
  }

  .map {
    height: 340px;
  }
}

@media (max-width: 560px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 英文菜单较长，很窄的手机上折成两行 */
@media (max-width: 380px) {
  .nav {
    justify-content: center;
    column-gap: 6px;
  }

  .nav a {
    padding: 10px 4px;
    font-size: 14px;
  }

  .page-home .hero,
  .hero {
    padding-top: calc(var(--header-h) + 64px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .nav a::after,
  .btn {
    transition: none;
  }
}
