/* ============================================================
   全局重置 & 变量
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --deep-gray: #1f1f1f;
  --accent: #c9302c;
  --accent-light: #e05a4f;
  --body-bg: #f4f2ef;
  --text-dark: #222222;
  --text-gray: #555555;
  --text-muted: #8a8a8a;
  --border-light: #e2ddd6;
  --grad-accent: linear-gradient(135deg, #c9302c 0%, #a52420 100%);
  --font-main: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

body {
  font-family: var(--font-main);
  background-color: var(--body-bg);
  color: var(--text-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

.sub-label {
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  line-height: 1.2;
}

/* ============================================================
   1. HEADER —— 顶部导航区
   ============================================================ */
.top-bar {
  background: var(--deep-gray);
  border-bottom: 2px solid var(--accent);
  box-shadow: inset 0 -4px 10px rgba(0,0,0,0.7), 0 2px 8px rgba(0,0,0,0.4);
  position: relative;
  z-index: 100;
}
.top-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,0.012) 0px, rgba(255,255,255,0.012) 2px, transparent 2px, transparent 6px);
  pointer-events: none;
}

.top-strip { border-bottom: 1px solid #333; position: relative; z-index: 2; }
.top-strip .container {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 6px; padding-top: 8px; padding-bottom: 8px;
}
.welcome-text { font-size: 13px; color: #9a9a9a; letter-spacing: 0.5px; }
.welcome-text:hover { color: #d0d0d0; }
.top-strip .contact-phone {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: #cfcfcf; transition: color 0.3s;
}
.top-strip .contact-phone:hover { color: #ffd966; }
.top-strip .contact-phone .sub-label { color: #7a7a7a; letter-spacing: 1px; margin: 0; }
.top-strip .contact-phone i { font-style: normal; font-size: 14px; color: var(--accent-light); }
.top-strip .contact-phone strong { font-weight: 600; color: #fff; }

/* 主行容器：公司区 + 导航两端对齐 */
.main-header-row { position: relative; z-index: 2; }
.main-header-row .container {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px; padding-top: 14px; padding-bottom: 14px;
}

/* 左侧包裹：Logo + 标题横向排列，垂直居中 */
.brand-wrap {
  display: flex;
  align-items: center;      /* 垂直居中 */
  gap: 14px;                /* logo 和标题之间留白 */
  flex-shrink: 0;
}

/* Logo：固定尺寸，contain 不变形 */
.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}
.brand-logo svg,
.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;      /* 关键：保证不变形 */
  display: block;
  transition: transform 0.3s ease;
}
.brand-logo:hover svg,
.brand-logo:hover img { transform: scale(1.06); }

/* 公司标题区 */
.company-brand { display: flex; flex-direction: column; line-height: 1.2; }
.company-brand .main-name {
  font-size: 26px; font-weight: 700; letter-spacing: 2px; color: #ffffff;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.8);
  transition: color 0.3s, text-shadow 0.3s; white-space: nowrap;
}
.company-brand .main-name:hover {
  color: #ffd966;
  text-shadow: 0 0 12px rgba(255,217,102,0.6), 2px 2px 0 #000;
}
.company-brand .sub-label { color: #9a9a9a; margin-top: 3px; letter-spacing: 3px; font-size: 9px; }

/* 小屏：Logo 缩小 */
@media (max-width: 768px) {
  .brand-logo { width: 42px; height: 42px; }
  .company-brand .main-name { font-size: 20px; }
}
@media (max-width: 480px) {
  .brand-logo { width: 36px; height: 36px; }
  .company-brand .main-name { font-size: 17px; }
  .brand-wrap { gap: 10px; }
}

.main-nav { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; }
.main-nav a {
  position: relative; display: inline-block; padding: 10px 20px;
  font-size: 15px; letter-spacing: 1px; color: #cfcfcf; font-weight: 500;
  transition: color 0.3s, background 0.3s; white-space: nowrap;
}
.main-nav a::after {
  content: ""; position: absolute; left: 20px; right: 20px; bottom: 4px;
  height: 2px; background: var(--accent-light);
  transform: scaleX(0); transform-origin: left; transition: transform 0.35s ease;
}
.main-nav a:hover { color: #ffffff; background: rgba(255,255,255,0.04); }
.main-nav a:hover::after { transform: scaleX(1); }
.main-nav a.active { color: #ffffff; }
.main-nav a.active::after { transform: scaleX(1); }

/* ============================================================
   2. BANNER 轮播 —— 所有图片用 <img src>
   ============================================================ */
.banner {
  position: relative;
  width: 100%;
  height: 600px;
  overflow: hidden;
  background: #000;
}
.banner-slides {
  display: flex;
  height: 100%;
  transition: transform 0.75s cubic-bezier(0.25,0.46,0.45,0.94);
  will-change: transform;
}
.banner-slide {
  flex: 0 0 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}
.banner-slide img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform 0.9s ease;
}
.banner-slide:hover img { transform: scale(1.04); }

.banner-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.35) 50%, rgba(0,0,0,0.8) 100%);
  z-index: 1;
}
.banner-content {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  text-align: center;
  max-width: 900px;
  padding: 0 20px;
  color: #fff;
  width: 100%;
}
.banner-content h2 {
  font-size: 48px; font-weight: 800; letter-spacing: 4px;
  text-shadow: 3px 3px 0 rgba(0,0,0,0.7); margin-bottom: 14px; line-height: 1.2;
}
.banner-content p {
  font-size: 18px; color: #dcdcdc; letter-spacing: 2px;
  text-shadow: 1px 1px 0 #000; margin-bottom: 24px;
}
.banner-content .btn {
  display: inline-block; padding: 12px 38px; background: var(--grad-accent); color: #fff;
  font-weight: 600; letter-spacing: 2px; border: 2px solid transparent; transition: all 0.35s;
}
.banner-content .btn:hover { background: transparent; color: #fff; border-color: #fff; }

.banner-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; background: rgba(0,0,0,0.45); border: 1px solid rgba(255,255,255,0.3);
  color: #fff; font-size: 30px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 10; transition: background 0.3s, border-color 0.3s; user-select: none;
}
.banner-arrow:hover { background: var(--accent); border-color: var(--accent); }
.banner-arrow.prev { left: 24px; }
.banner-arrow.next { right: 24px; }

.banner-dots {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 14px; z-index: 10;
}
.banner-dot {
  width: 14px; height: 14px; border-radius: 50%; background: rgba(255,255,255,0.3);
  border: 2px solid transparent; cursor: pointer; transition: all 0.3s;
}
.banner-dot.active { background: var(--accent); border-color: #fff; transform: scale(1.25); }

/* ============================================================
   3. 产品中心 —— H型布局，图片用 <a href> + <img src>
   左长图跨2行 / 中间4图2×2 / 右长图跨2行
   ============================================================ */
.products-section {
  padding: 60px 0 80px;
  background: #f0efed;
}
.section-title { text-align: center; margin-bottom: 44px; }
.section-title h3 {
  font-size: 34px; font-weight: 700; letter-spacing: 3px;
  color: #1a1a1a; display: inline-block;
  padding-bottom: 12px; position: relative;
}
.section-title h3::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 0;
  transform: translateX(-50%);
  width: 60px; height: 3px;
  background: var(--accent);
}
.section-title .sub-label {
  margin-top: 14px; letter-spacing: 8px;
  color: #9a9a9a; font-size: 11px;
}

/* 4 列 × 2 行网格 */
.products-hgrid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  grid-template-rows: 220px 220px;
  gap: 20px;
}

/* 位置锁定 */
.products-hgrid .card-pos-1 { grid-column: 1; grid-row: 1 / span 2; }
.products-hgrid .card-pos-2 { grid-column: 2; grid-row: 1; }
.products-hgrid .card-pos-3 { grid-column: 3; grid-row: 1; }
.products-hgrid .card-pos-4 { grid-column: 2; grid-row: 2; }
.products-hgrid .card-pos-5 { grid-column: 3; grid-row: 2; }
.products-hgrid .card-pos-6 { grid-column: 4; grid-row: 1 / span 2; }

/* 卡片 = 链接 */
.product-card {
  display: block;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  transition: box-shadow 0.4s, transform 0.4s;
  min-height: 0;
}
.product-card:hover {
  box-shadow: 0 12px 28px rgba(0,0,0,0.18);
  transform: translateY(-3px);
  z-index: 5;
}

.product-card .img-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #e8e8e8;
}
.product-card .img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform 0.9s ease;
}
.product-card:hover .img-wrap img { transform: scale(1.06); }

.cat-tag {
  position: absolute;
  top: 14px; left: 14px;
  background: var(--accent);
  color: #fff;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  z-index: 4;
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  line-height: 1.3;
}

.product-overlay {
  position: absolute;
  bottom: 0; left: 0; width: 100%;
  padding: 20px 16px 14px;
  background: linear-gradient(to top, rgba(15,15,15,0.96) 0%, rgba(15,15,15,0.78) 60%, transparent 100%);
  transform: translateY(100%);
  transition: transform 0.45s ease;
  z-index: 3;
  color: #fff;
}
.product-card:hover .product-overlay { transform: translateY(0); }
.product-overlay h4 { font-size: 15px; margin-bottom: 6px; color: #ffd966; letter-spacing: 1px; }
.product-overlay p { font-size: 12px; color: #d0d0d0; line-height: 1.55; max-height: 76px; overflow: hidden; }

.card-pos-1 .product-overlay h4,
.card-pos-6 .product-overlay h4 { font-size: 17px; }
.card-pos-1 .product-overlay p,
.card-pos-6 .product-overlay p { font-size: 12.5px; max-height: 88px; }

/* ============================================================
   4. 公司简介 & 无缝滚动推荐项目
   ============================================================ */
.about-section {
  padding: 70px 0;
  background: #f7f6f4;
  border-top: 1px solid var(--border-light);
}
.about-content { display: flex; gap: 44px; align-items: center; margin-bottom: 54px; }

.about-left {
  flex: 1.2;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(0,0,0,0.16);
  min-height: 320px;
  position: relative;
  cursor: pointer;
}
.about-left img {
  width: 100%; height: 100%;
  min-height: 320px;
  object-fit: cover; display: block;
  transition: transform 0.8s ease;
}
.about-left::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(201,48,44,0.25) 0%, rgba(0,0,0,0) 40%, rgba(0,0,0,0) 60%, rgba(201,48,44,0.25) 100%);
  background-size: 300% 300%;
  background-position: 0% 50%;
  transition: background-position 1s ease, opacity 0.6s ease;
  opacity: 0.6;
  pointer-events: none;
}
.about-left:hover img { transform: scale(1.05); }
.about-left:hover::after {
  background-position: 100% 50%;
  opacity: 0.9;
}

.about-right { flex: 0.95; }
.about-right h3 {
  font-size: 28px; font-weight: 700; letter-spacing: 3px; margin-bottom: 18px;
  color: var(--text-dark); border-left: 5px solid var(--accent); padding-left: 18px;
}
.about-right p { font-size: 15px; color: var(--text-gray); line-height: 1.9; margin-bottom: 16px; }

.project-scroll { margin-top: 44px; }
.project-scroll h4 {
  font-size: 20px; letter-spacing: 2px; margin-bottom: 22px;
  color: var(--text-dark); text-align: center;
}

.marquee-wrap {
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 6%, #000 94%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 6%, #000 94%, transparent 100%);
}
.marquee-track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: marquee 30s linear infinite;
}
.marquee-wrap:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.project-item {
  flex: 0 0 260px;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.4s, box-shadow 0.4s;
  cursor: pointer;
  border: 1px solid var(--border-light);
  display: block;
}
.project-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 24px rgba(201,48,44,0.16);
}
.project-item img {
  width: 100%; height: 160px;
  object-fit: cover; display: block;
  transition: transform 0.7s ease;
}
.project-item:hover img { transform: scale(1.09); }
.project-item .proj-info { padding: 14px 16px; background: #fff; }
.project-item .proj-info h5 { font-size: 16px; color: var(--text-dark); margin-bottom: 6px; }
.project-item .proj-info span { font-size: 12px; color: var(--text-muted); }

/* ============================================================
   5. 新闻中心
   ============================================================ */
.news-section { padding: 70px 0; background: #f2f1ef; }
.news-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.news-card {
  display: flex; gap: 0; background: #fff; border-radius: 6px; overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  transition: transform 0.35s, box-shadow 0.35s; cursor: pointer; border: 1px solid var(--border-light);
}
.news-card:hover { transform: translateY(-5px); box-shadow: 0 14px 26px rgba(201,48,44,0.15); }
.news-img {
  flex: 0 0 170px;
  min-height: 140px;
  overflow: hidden;
}
.news-img img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform 0.7s ease;
}
.news-card:hover .news-img img { transform: scale(1.05); }
.news-content { padding: 16px 18px; display: flex; flex-direction: column; justify-content: space-between; flex: 1; }
.news-content h4 {
  font-size: 17px; font-weight: 600; color: var(--text-dark); margin-bottom: 6px;
  line-height: 1.35; transition: color 0.3s;
}
.news-card:hover .news-content h4 { color: var(--accent); }
.news-content .news-time { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; display: block; }
.news-content p {
  font-size: 13px; color: var(--text-gray); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ============================================================
   6. FOOTER
   ============================================================ */
.footer {
  background: var(--deep-gray); border-top: 3px solid var(--accent);
  padding: 44px 0 20px; color: #aaa; box-shadow: inset 0 4px 12px rgba(0,0,0,0.5);
}
.footer-main { display: flex; gap: 50px; flex-wrap: wrap; }
.footer-left { flex: 1; min-width: 250px; }
.footer-logo {
  font-size: 24px; font-weight: 700; color: #fff; letter-spacing: 2px;
  margin-bottom: 12px; display: inline-block; border-bottom: 2px solid var(--accent); padding-bottom: 5px;
}
.footer-desc { font-size: 13px; color: #888; line-height: 1.9; margin: 12px 0; }
.footer-icp { font-size: 12px; color: #666; margin-top: 10px; }
.footer-icp a { color: #888; transition: color 0.3s; }
.footer-icp a:hover { color: var(--accent-light); }

.footer-right { flex: 2; display: flex; justify-content: flex-end; gap: 50px; flex-wrap: wrap; }
.footer-links h4 { font-size: 16px; color: #fff; margin-bottom: 16px; letter-spacing: 1px; }
.footer-links ul li { margin-bottom: 8px; }
.footer-links ul li a { font-size: 13px; color: #999; transition: color 0.3s, padding-left 0.3s; }
.footer-links ul li a:hover { color: #fff; padding-left: 5px; }

.footer-bottom {
  text-align: center; border-top: 1px solid #333;
  margin-top: 32px; padding-top: 20px; font-size: 12px; color: #666;
}

/* ============================================================
   自适应媒体查询
   ============================================================ */
@media (max-width: 1200px) {
  .products-hgrid { grid-template-rows: 200px 200px; }
}
@media (max-width: 992px) {
  .banner { height: 450px; }
  .banner-content h2 { font-size: 34px; }
  .about-content { flex-direction: column; }
  .news-grid { grid-template-columns: 1fr; }
  .footer-main { flex-direction: column; gap: 30px; }
  .footer-right { justify-content: flex-start; }
  .main-header-row .container { flex-direction: column; align-items: flex-start; gap: 6px; }

  .products-hgrid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 180px 180px 180px;
  }
  .card-pos-1 { grid-column: 1; grid-row: 1 / span 2; }
  .card-pos-2 { grid-column: 2; grid-row: 1; }
  .card-pos-3 { grid-column: 2; grid-row: 2; }
  .card-pos-4 { grid-column: 1; grid-row: 3; }
  .card-pos-5 { grid-column: 2; grid-row: 3; }
  .card-pos-6 { grid-column: 1 / span 2; grid-row: 4; }
}
@media (max-width: 768px) {
  .top-strip .container { flex-direction: column; align-items: flex-start; }
  .main-nav a { padding: 9px 14px; font-size: 14px; }
  .banner { height: 380px; }
  .banner-content h2 { font-size: 26px; letter-spacing: 2px; }
  .banner-content p { font-size: 14px; }
  .banner-arrow { width: 38px; height: 38px; font-size: 22px; }
  .products-hgrid { grid-template-columns: 1fr; grid-template-rows: auto; }
  .products-hgrid .card-pos-1,
  .products-hgrid .card-pos-2,
  .products-hgrid .card-pos-3,
  .products-hgrid .card-pos-4,
  .products-hgrid .card-pos-5,
  .products-hgrid .card-pos-6 {
    grid-column: 1;
    grid-row: auto;
    min-height: 220px;
  }
  .product-overlay { transform: translateY(0); background: linear-gradient(to top, rgba(15,15,15,0.96), rgba(15,15,15,0.6)); position: relative; }
  .news-card { flex-direction: column; }
  .news-img { flex: 0 0 180px; width: 100%; }
  .news-content { padding: 16px; }
}
@media (max-width: 480px) {
  .company-brand .main-name { font-size: 19px; }
  .banner { height: 300px; }
  .banner-content h2 { font-size: 20px; }
  .section-title h3 { font-size: 24px; }
  .project-item { flex: 0 0 220px; }
  .main-nav a { padding: 8px 10px; font-size: 13px; }
  .welcome-text { font-size: 12px; }
}