/* ============================================================
   c2expo.cn — Flash 替换组件样式
   仅负责替换原来的 meun.swf / bcastr.swf / Business01.swf / ggsj.swf
   页面其他版式仍由 css/cuanfui.css 控制，保持原样
   ============================================================ */

/* ---------- 1. 顶部导航（替代 images/meun.swf，523×44） ---------- */
.c2nav {
  height: 44px;
  width: 523px;
  background: #c52127;
  font-family: "宋体", SimSun, "Songti SC", "Microsoft YaHei", sans-serif;
  position: relative;
}
.c2nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  height: 44px;
  display: flex;
  align-items: stretch;
}
.c2nav li {
  flex: 1 1 0;
  position: relative;
  list-style: none;
}
.c2nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 1px;
  color: #ffffff;
  text-decoration: none;
  position: relative;
  transition: color .25s ease, background-color .25s ease;
}
/* 悬停：文字变黄 + 底部黄条滑入 + 轻微上浮（还原原 Flash 按钮的反馈感） */
.c2nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 0;
  height: 2px;
  background: #ffe733;
  transform: translateX(-50%);
  transition: width .28s ease;
}
.c2nav a:hover,
.c2nav a:focus-visible {
  color: #ffe733;
  background: rgba(0, 0, 0, .12);
  outline: none;
}
.c2nav a:hover::after,
.c2nav a:focus-visible::after {
  width: 42%;
}
.c2nav a.is-active {
  color: #ffe733;
}
.c2nav a.is-active::after {
  width: 42%;
}

/* ---------- 2. 首页横幅轮播（替代 bcastr.swf，950×250） ---------- */
.c2slider {
  position: relative;
  width: 950px;
  height: 250px;
  overflow: hidden;
  background: #000;
  margin: 0 auto;
}
.c2slider .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .9s ease;
  pointer-events: none;
}
.c2slider .slide.is-on {
  opacity: 1;
  pointer-events: auto;
}
.c2slider .slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
}
.c2slider .dots {
  position: absolute;
  right: 14px;
  bottom: 12px;
  display: flex;
  gap: 8px;
  z-index: 3;
}
.c2slider .dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .45);
  cursor: pointer;
  transition: background .25s ease, transform .25s ease;
}
.c2slider .dots button:hover {
  background: rgba(255, 255, 255, .8);
}
.c2slider .dots button.is-on {
  background: #ffe733;
  transform: scale(1.15);
}
.c2slider .arrow {
  position: absolute;
  top: 50%;
  margin-top: -22px;
  width: 34px;
  height: 44px;
  border: 0;
  background: rgba(0, 0, 0, .32);
  color: #fff;
  font: 22px/44px "宋体", SimSun, serif;
  cursor: pointer;
  opacity: 0;
  transition: opacity .3s ease, background .3s ease;
  z-index: 3;
}
.c2slider:hover .arrow {
  opacity: 1;
}
.c2slider .arrow:hover {
  background: rgba(197, 33, 39, .85);
}
.c2slider .arrow.prev { left: 0; }
.c2slider .arrow.next { right: 0; }
.c2slider .bar {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 0;
  background: #ffe733;
  opacity: .85;
  z-index: 3;
}
.c2slider.no-js .slide:first-child { opacity: 1; }

/* ---------- 3. 业务范围卡片（替代 images/Business01.swf，950×620） ---------- */
.c2cards {
  width: 950px;
  margin: 0 auto;
  padding: 30px 0 38px;
  display: grid;
  grid-template-columns: repeat(2, 448px);
  justify-content: center;
  gap: 22px;
  box-sizing: border-box;
}
.c2cards .card {
  background: #140607;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 4px;
  padding: 10px;
  box-sizing: border-box;
  height: 196px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* 默认可见；只有脚本正常时才从下方淡入，避免无 JS / 截图环境下内容消失 */
  opacity: 1;
  transform: none;
  transition: opacity .6s ease, transform .6s cubic-bezier(.22, .7, .3, 1),
              box-shadow .35s ease, border-color .35s ease;
}
.c2cards.anim .card {
  opacity: 0;
  transform: translateY(26px);
}
.c2cards.anim .card.is-in {
  opacity: 1;
  transform: none;
}
.c2cards .card.is-in {
  opacity: 1;
  transform: none;
}
.c2cards .card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 231, 51, .45);
  box-shadow: 0 14px 26px rgba(0, 0, 0, .55);
}
.c2cards .card img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border: 0;
}
/* 第五张卡片只有一张时居中 */
.c2cards .card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  justify-self: center;
  width: 448px;
}

/* ---------- 4. 案例画廊（替代 guanggaosheji/ggsj.swf，980×800） ---------- */
.c2gallery {
  width: 950px;
  margin: 0 auto;
  padding: 24px 0 40px;
  box-sizing: border-box;
  font-family: "宋体", SimSun, "Songti SC", "Microsoft YaHei", sans-serif;
}
.c2gallery .tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 22px;
}
.c2gallery .tabs button {
  min-width: 128px;
  height: 38px;
  padding: 0 22px;
  border: 1px solid rgba(255, 255, 255, .28);
  background: transparent;
  color: #fff;
  font: bold 14px/36px "宋体", SimSun, sans-serif;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all .28s ease;
}
.c2gallery .tabs button:hover {
  border-color: #ffe733;
  color: #ffe733;
}
.c2gallery .tabs button.is-on {
  background: #c52127;
  border-color: #c52127;
  color: #fff;
}
.c2gallery .grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
/* 子分类（广告设计下的车展/建材等） */
.c2gallery .cats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: -8px 0 20px;
}
.c2gallery .cats button {
  height: 30px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .22);
  background: transparent;
  color: #d8d8d8;
  font: 12px/28px "宋体", SimSun, sans-serif;
  letter-spacing: .5px;
  cursor: pointer;
  transition: all .25s ease;
}
.c2gallery .cats button:hover {
  border-color: #ffe733;
  color: #ffe733;
}
.c2gallery .cats button.is-on {
  background: #ffe733;
  border-color: #ffe733;
  color: #3a0a0b;
  font-weight: bold;
}
.c2gallery .cats button .n {
  opacity: .6;
  margin-left: 4px;
  font-size: 11px;
}
.c2gallery .tile {
  position: relative;
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #140607;
  border: 1px solid rgba(255, 255, 255, .1);
  cursor: pointer;
  padding: 0;
  transition: border-color .3s ease, transform .3s ease;
}
.c2gallery .tile:hover {
  border-color: #ffe733;
  transform: translateY(-4px);
}
.c2gallery .tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: 0;
  transition: transform .5s ease;
}
.c2gallery .tile:hover img {
  transform: scale(1.06);
}
.c2gallery .tile .cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 10px;
  font-size: 12px;
  color: #fff;
  text-align: left;
  background: linear-gradient(to top, rgba(0, 0, 0, .72), rgba(0, 0, 0, 0));
}
/* 没有图片时的占位格 */
.c2gallery .tile.is-empty {
  cursor: default;
  background:
    linear-gradient(135deg, rgba(197, 33, 39, .18), rgba(0, 0, 0, .55)),
    #140607;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  color: rgba(255, 255, 255, .5);
  font-size: 12px;
  letter-spacing: 1px;
}
.c2gallery .tile.is-empty span.n {
  font: 22px/1 Georgia, serif;
  color: rgba(255, 231, 51, .55);
}
.c2gallery .hint {
  margin: 20px 0 0;
  text-align: center;
  font-size: 12px;
  line-height: 22px;
  color: rgba(255, 255, 255, .55);
}
.c2gallery .hint code {
  color: #ffe733;
  font-family: Consolas, monospace;
}
.c2gallery .empty-state {
  padding: 46px 20px 40px;
  text-align: center;
  border: 1px dashed rgba(255, 255, 255, .18);
  color: rgba(255, 255, 255, .62);
  font-size: 13px;
  line-height: 26px;
}
.c2gallery .empty-state strong {
  display: block;
  margin-bottom: 8px;
  color: #fff;
  font-size: 15px;
  letter-spacing: 2px;
}

/* 灯箱 */
.c2lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .92);
  padding: 40px;
  box-sizing: border-box;
}
.c2lightbox.is-open {
  display: flex;
}
.c2lightbox img {
  max-width: 90vw;
  max-height: 84vh;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
  border: 0;
}
.c2lightbox .close,
.c2lightbox .nav {
  position: absolute;
  border: 0;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  cursor: pointer;
  transition: background .25s ease, color .25s ease;
}
.c2lightbox .close {
  top: 22px;
  right: 26px;
  width: 38px;
  height: 38px;
  font-size: 20px;
  line-height: 38px;
}
.c2lightbox .nav {
  top: 50%;
  margin-top: -30px;
  width: 46px;
  height: 60px;
  font: 24px/60px "宋体", serif;
}
.c2lightbox .nav.prev { left: 20px; }
.c2lightbox .nav.next { right: 20px; }
.c2lightbox button:hover {
  background: #c52127;
  color: #ffe733;
}

/* ---------- 6. 页脚链接（原为纯文本，现在可点击） ---------- */
.fans2 a:link,
.fans2 a:visited {
  color: #ffffff;
  text-decoration: none;
}
.fans2 a:hover {
  color: #ffe733;
  text-decoration: underline;
}
#icp a:link,
#icp a:visited {
  color: #ffffff;
  text-decoration: none;
}
#icp a:hover {
  color: #ffe733;
  text-decoration: underline;
}
/* 正文区里的链接（如网站地图页的栏目列表）统一为白色，悬停变黄 */
#mail-r a:link,
#mail-r a:visited {
  color: #ffffff;
  text-decoration: none;
}
#mail-r a:hover {
  color: #ffe733;
  text-decoration: underline;
}

/* ---------- 5. 小屏适配（桌面端外观完全不变） ---------- */
@media screen and (max-width: 1000px) {
  .top,
  .benra,
  .main,
  .main1,
  .main2,
  #botte {
    width: 100% !important;
    max-width: 950px;
    box-sizing: border-box;
    padding-left: 12px;
    padding-right: 12px;
  }
  .top { height: auto; padding-top: 12px; padding-bottom: 6px; }
  .logo { margin-top: 6px; }
  .meun {
    float: none !important;
    width: 100% !important;
    max-width: 523px;
    margin: 10px auto 0 !important;
  }
  .c2nav { width: 100% !important; }
  .c2nav a { font-size: 12px; letter-spacing: 0; }
  .benra { height: auto !important; }
  .c2slider { width: 100% !important; height: auto; aspect-ratio: 950 / 250; }
  .c2slider .slide img { position: absolute; inset: 0; }
  .c2cards {
    width: 100% !important;
    grid-template-columns: 1fr !important;
  }
  .c2cards .card,
  .c2cards .card:last-child:nth-child(odd) {
    width: auto !important;
    height: auto;
    min-height: 150px;
  }
  .c2gallery { width: 100% !important; }
  .c2gallery .grid { grid-template-columns: repeat(2, 1fr); }
  #dian {
    float: none !important;
    margin: 0 auto !important;
    width: 100% !important;
    height: auto !important;
  }
  #mail-r,
  #mail-r1 {
    float: none !important;
    width: 100% !important;
    height: auto !important;
  }
  img { max-width: 100%; height: auto; }
}
@media screen and (max-width: 640px) {
  .c2cards { grid-template-columns: 1fr; }
  .c2gallery .grid { grid-template-columns: 1fr; }
  .c2nav ul { flex-wrap: wrap; }
  .c2nav li { flex: 1 1 33.33%; }
  .c2nav, .c2nav ul { height: auto; }
  .c2nav a { height: 38px; }
  .c2lightbox { padding: 12px; }
  .c2lightbox .nav { display: none; }
}
