/* =========================================================
   江陵城发集团 - 导航 & Banner 仿写样式
   配色还原自原站：--c:#d01129（红）、主题红 #e60012
   ========================================================= */
:root {
  --c: #d01129;          /* 主色（红） */
  --c-dark: #c11a21;    /* 深红（hover） */
  --theme: #e60012;      /* 主题红 */
  --info-bg: rgba(46, 143, 186, .6); /* Banner 信息框底色（原站） */
  --header-h: 90px;      /* PC 端导航高度 */
}

* { margin: 0; padding: 0; box-sizing: border-box; }
ul { list-style: none; }
a { text-decoration: none; color: inherit; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }
img { display: block; max-width: 100%; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Microsoft YaHei UI", "Source Han Sans CN", -apple-system, "Segoe UI", Arial, sans-serif;
  color: #333;
  background: #fff;
}

/* ============ 顶部导航 ============ */
.site-header {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 9999;
  background: transparent;
  transition: background .5s ease, box-shadow .5s ease;
}
/* 滚动后：白底 + 阴影（原站 .active 状态） */
.site-header.scrolled {
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 5px 10px rgba(0, 0, 0, .1);
}
.header-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 3%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.header-logo {
  flex: 0 0 auto;
  max-width: 219px;
  padding: 12px 0;
}
.header-logo img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* ---------- PC 端导航 ---------- */
.pc-nav { display: flex; }
.nav-list { display: flex; align-items: center; }

.nav-item { position: relative; }
.nav-item > a {
  position: relative;
  z-index: 2;
  display: block;
  line-height: var(--header-h);
  padding: 0 1vw;
  font-size: 20px;
  color: #fff;                 /* 顶部透明时白色文字 */
  white-space: nowrap;
  transition: color .3s ease;
}
/* 当前栏目：红色底色 */
.nav-item.active > a,
.nav-item.active > a::after {
  background: linear-gradient(91deg, var(--c), var(--c));
}
/* hover 时底部红色填充上移（原站 :after 动画） */
.nav-item > a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 0;
  background: linear-gradient(91deg, var(--c), var(--c));
  z-index: -1;
  transition: height .3s ease;
}
.nav-item:hover > a::after,
.nav-item.active > a::after { height: 100%; }
.nav-item:hover > a { color: #fff; }

/* 下拉子菜单（与一级菜单背景左对齐，原站为黑色半透明底） */
.nav-sub {
  position: absolute;
  left: 0;                       /* 左边缘与一级菜单背景对齐 */
  top: 100%;
  width: 200px;
  background: rgba(0, 0, 0, .6);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}
/* 最右侧菜单项：改为右对齐，避免面板超出屏幕 */
.nav-item:last-child .nav-sub { left: auto; right: 0; }
.nav-item:hover .nav-sub {
  opacity: 1;
  visibility: visible;
}
.nav-sub a {
  display: flex;
  align-items: center;           /* 行内上下居中 */
  justify-content: space-between;
  padding: 10px 20px;
  font-size: 16px;
  line-height: 2;
  color: #fff;
  border-top: 1px solid rgba(255, 255, 255, .3);
  transition: background .3s ease;
}
/* 右侧箭头图标（靠右、上下居中，风格同参考站） */
.nav-sub a::after {
  content: '';
  width: 8px;
  height: 8px;
  margin-left: 14px;
  border-top: 2px solid rgba(255, 255, 255, .85);
  border-right: 2px solid rgba(255, 255, 255, .85);
  transform: rotate(45deg);      /* 右向箭头 */
  flex: 0 0 auto;
  transition: transform .3s ease;
}
.nav-sub a:hover { background: linear-gradient(91deg, var(--c), var(--c)); }
.nav-sub a:hover::after { transform: rotate(45deg) translate(2px, -2px); }

/* 滚动后：白底黑字 */
.site-header.scrolled .nav-item > a { color: #333; }
.site-header.scrolled .nav-item.active > a { color: #fff; }
.site-header.scrolled .nav-item:hover > a { color: #fff; }
.site-header.scrolled .nav-sub a { color: #fff; }

/* ---------- 移动端汉堡按钮 ---------- */
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  position: relative;
  flex: 0 0 auto;
}
.nav-toggle .line {
  display: block;
  width: 25px;
  height: 2px;
  border-radius: 2px;
  background: #222;
  position: absolute;
  left: 50%;
  margin-left: -12.5px;
  transition: all .5s ease;
}
.nav-toggle .line1 { top: 12px; transform-origin: 2px 0; }
.nav-toggle .line2 { top: 19px; }
.nav-toggle .line3 { bottom: 12px; transform-origin: 0 center; }
/* 打开状态：三条线变 X */
.nav-toggle.open .line1 { top: 19px; transform: rotate(45deg); margin-left: -10px; }
.nav-toggle.open .line2 { opacity: 0; }
.nav-toggle.open .line3 { bottom: 19px; transform: rotate(-45deg); margin-left: -10px; }

/* ---------- 移动端抽屉菜单 ---------- */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: #f2f2f2;
  z-index: 9998;
  overflow-y: auto;
  padding: 70px 20px 40px;
}
.mobile-nav.open { display: block; }

.m-item { border-bottom: 1px solid rgba(0, 0, 0, .05); }
.m-item > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  line-height: 50px;
  font-size: 18px;
  color: #333;
}
.m-arrow {
  width: 12px; height: 12px;
  border-right: 2px solid #999;
  border-bottom: 2px solid #999;
  transform: rotate(45deg);
  transition: transform .3s ease;
  margin-right: 6px;
}
.m-item.open > a .m-arrow { transform: rotate(-135deg); }

.m-sub {
  display: none;
  padding-left: 30px;
}
.m-item.open > .m-sub { display: block; }
.m-sub a {
  display: block;
  line-height: 40px;
  font-size: 16px;
  color: #666;
}
.m-sub a:active { color: var(--c); }

/* ============ Banner 轮播 ============ */
.banner {
  position: relative;
  width: 100%;
  height: 100vh;
  max-height: 970px;
  overflow: hidden;
  background: #dadada;
}

.banner-track {
  display: flex;
  height: 100%;
  transition: transform .8s ease;
}

.banner-slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #fff;
}

/* 图片 + 缩放动效（Ken Burns：激活时 1.1 → 1） */
.slide-img {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.slide-img img {
  position: absolute;
  left: 50%; top: 50%;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: translate(-50%, -50%) scale(1.15);
  transition: transform 2s ease;
}
.banner-slide.active .slide-img img { transform: translate(-50%, -50%) scale(1); }

/* 信息区 */
.banner-info {
  position: absolute;
  top: 55%;
  left: 50%;
  width: 94%;
  max-width: 1600px;
  transform: translate(-50%, -50%);
  z-index: 22;
}
.info-box {
  display: inline-block;
  text-align: left;
  border-radius: 0 50px;
  background: var(--info-bg);
  padding: 3vw;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.8s ease, transform 1.8s ease;
}
.banner-slide.active .info-box {
  opacity: 1;
  transform: translateY(0);
}

.banner-title {
  color: #fff;
  font-size: clamp(30px, 2.5vw, 48px);
  font-weight: bold;
  line-height: 1.2;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, .71);
  transition: opacity 2s ease .7s, transform 2s ease .7s;
}

.banner-btn {
  display: inline-block;
  margin-top: 40px;
  max-width: 180px;
  width: 100%;
  padding: 10px 15px;
  border: 2px solid #fff;
  border-radius: 30px;
  color: #fff;
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  opacity: 0;
  transform: translateY(126%);
  transition: transform 1.2s cubic-bezier(.165, .84, .44, 1), opacity .8s ease .9s, background .3s ease, color .3s ease;
}
.banner-slide.active .banner-btn {
  opacity: 1;
  transform: translateY(0);
}
.banner-btn:hover { background: #fff; color: var(--c); }

/* 分页圆点（左下，激活变长条胶囊） */
.banner-pagination {
  position: absolute;
  left: 6%;
  bottom: 4%;
  display: flex;
  align-items: center;
  z-index: 10;
}
.banner-pagination .dot {
  width: 10px; height: 10px;
  margin: 3px 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .4);
  cursor: pointer;
  transition: all .3s ease;
}
.banner-pagination .dot.active {
  width: 30px;
  border-radius: 15px;
  background: #fff;
}
.banner-pagination .dot:hover { background: #fff; }

/* 左右箭头（右下，虚线圆） */
.banner-arrows {
  position: absolute;
  right: 6%;
  bottom: 4%;
  display: flex;
  z-index: 10;
}
.banner-arrow {
  width: 50px; height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(255, 255, 255, .8);
  border-radius: 50%;
  color: #fff;
  transition: all .3s ease;
}
.banner-arrow.prev { margin-right: 20px; }
.banner-arrow:hover { background: var(--c); border: 1px solid var(--c); }

/* 向下滚动指示（鼠标造型 + 文字） */
.banner-scroll {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 4%;
  width: 90px;
  text-align: center;
  color: #fff;
  z-index: 10;
}
.banner-scroll .mouse {
  display: block;
  width: 20px; height: 30px;
  margin: 0 auto;
  border: 2px solid #fff;
  border-radius: 12px;
  position: relative;
}
.banner-scroll .mouse::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 3px;
  width: 4px; height: 10px;
  border-radius: 2px;
  background: #fff;
  transform: translate(-50%, 0);
  animation: scrollmouse 2s linear infinite;
}
.banner-scroll span {
  display: block;
  margin-top: 12px;
  font-family: Arial, sans-serif;
  font-size: 12px;
  line-height: 20px;
  text-transform: uppercase;
}
@keyframes scrollmouse {
  from { transform: translate(-50%, 0); opacity: 1; }
  to   { transform: translate(-50%, 10px); opacity: 0; }
}

/* ============ 下方占位内容（演示滚动效果用，可删） ============ */
.page-body { padding: 60px 3%; background: #f7f8fa; }
.page-body .container { max-width: 1200px; margin: 0 auto; }
.page-body h1 { font-size: 24px; margin-bottom: 12px; color: #222; }
.page-body p { color: #888; margin-bottom: 24px; font-size: 14px; line-height: 1.8; }
.placeholder-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.ph-block {
  height: 160px;
  border-radius: 8px;
  background: linear-gradient(135deg, #e9ecf1, #f3f5f8);
}

/* =========================================================
   响应式
   ========================================================= */

/* 平板（769px - 1024px） */
@media screen and (max-width: 1024px) and (min-width: 769px) {
  .nav-item > a { font-size: 14px; }
  .nav-sub { width: 170px; }
  .nav-sub a { font-size: 13px; }
  .banner { max-height: 500px; }
  .banner-btn { display: none; }
}

/* 手机端（<= 768px，原站断点） */
@media screen and (max-width: 768px) {
  :root { --header-h: 70px; }

  /* 头部固定白底 */
  .site-header {
    background: #fff;
    box-shadow: 0 0 20px rgba(0, 0, 0, .1);
  }
  .site-header.scrolled { box-shadow: 0 5px 10px rgba(0, 0, 0, .1); }

  .header-inner { height: var(--header-h); padding: 0 3%; }

  .header-logo { max-width: 120px; padding: 0; }

  /* 隐藏 PC 导航，显示汉堡按钮 */
  .pc-nav { display: none; }
  .nav-toggle { display: block; }

  /* Banner 移动端：34vh，上下留白 */
  .banner {
    height: 34vh;
    max-height: none;
    margin-top: var(--header-h);
  }
  .banner-info { top: 60%; width: 90%; padding: 0 10px; }
  .info-box { padding: 20px; border-radius: 0 25px; }
  .banner-title { font-size: 18px; line-height: 1.5; margin-top: 5px; }
  .banner-btn { display: none; }

  /* 分页：居中底部，缩小 */
  .banner-pagination {
    left: auto;
    right: auto;
    bottom: 15px;
    width: 100%;
    justify-content: center;
  }
  .banner-pagination .dot { width: 6px; height: 6px; margin: 3px; }
  .banner-pagination .dot.active { width: 20px; }

  /* 隐藏箭头与滚动指示 */
  .banner-arrows { display: none; }
  .banner-scroll { display: none; }

  .placeholder-grid { grid-template-columns: repeat(2, 1fr); }
}
