/* 全局布局优化 */
*, *::before, *::after {
  box-sizing: border-box;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

/* 修复滚动后顶栏错位 */
header.scrolled {
  margin-right: 0 !important;
  width: 100% !important;
}

/* 产品中心响应式网格 */
.index-product-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1em;
  width: 100%;
}

/* 下拉菜单适配 */
.products-overlay {
  display: none;
  position: absolute;
  width: min(1200px, calc(100vw - 2rem));
  max-width: calc(100vw - 2rem);
  left: 50%;
  transform: translateX(-50%);
}

.nav-products:hover .products-overlay,
.products-overlay.show {
  display: flex;
  flex-wrap: wrap;
}

.solutions-overlay {
  display: none;
  position: absolute;
  width: min(900px, calc(100vw - 2rem));
  max-width: calc(100vw - 2rem);
  left: 0;
}

.products-list {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

/* 轮播控制按钮不溢出 */
.news-controls,
.cases-controls {
  left: 8px;
  right: 8px;
}

.cases-carousel .case-item {
  flex: 0 0 calc(25% - 1.5em);
  min-width: 160px;
}

.case-img-wrap {
  height: 420px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.case-img-wrap img {
  border-radius: 8px;
}

/* 首页区块间距 */
.products-center-section,
.solutions-section,
.cases-section,
.news-section {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  box-sizing: border-box;
}

.solutions-list {
  max-width: 1200px;
}

.solutions-section h2,
.section-heading {
  font-size: 2.2em;
  color: var(--primary);
  margin-bottom: 0.5em;
  font-weight: bold;
}

/* 新闻页与首页样式隔离 */
.news-page .news-list-section .news-list {
  display: flex !important;
  flex-wrap: wrap !important;
  transform: none !important;
  grid-template-columns: unset !important;
  gap: 24px 16px;
  will-change: auto;
}

.news-page .news-list-section .news-item {
  width: calc(25% - 12px);
  padding: 0;
  background: #f7f8fa;
}

/* 解决方案内页 */
.solution-page-banner {
  width: 100%;
  height: 380px;
  object-fit: cover;
  display: block;
  margin-top: 0;
}

.solution-page .banner {
  overflow: hidden;
  line-height: 0;
  background: #e8eef5;
}

.solution-page .industry-intro {
  max-width: 900px;
  margin: 48px auto 32px;
  padding: 0 16px;
}

.solution-page .solutions-section {
  max-width: 1200px;
  margin: 0 auto 48px;
  padding: 0 16px 48px;
}

.solution-page .solutions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.solution-page .solution-card {
  width: 100%;
  height: auto;
  min-height: 280px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}

.solution-page .solution-card:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
}

.solution-page .solution-img {
  height: 200px;
  width: 100%;
  object-fit: cover;
  display: block;
}

.solution-page .solution-name {
  padding: 16px;
  font-size: 1.05em;
  font-weight: bold;
  color: var(--primary);
}

/* 关于我们页 Banner */
.introduce-page .main-banner {
  margin-top: 0;
  height: 420px;
  overflow: hidden;
  background: #e8eef5;
}

.introduce-page .main-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.introduce-page .industry-banner {
  height: 320px;
  background-color: #e8eef5;
}

/* 产品页 */
.product-page .product-container {
  margin-top: 80px;
  padding-top: 24px;
}

.product-page .product-sidebar {
  top: 80px;
  max-height: calc(100vh - 100px);
}

/* 页脚增强 */
footer {
  margin-top: 2em;
}

footer p {
  margin: 0;
  font-size: 0.95em;
  opacity: 0.95;
}

@media (max-width: 1200px) {
  .main-nav ul {
    gap: 2em;
  }

  .cases-carousel .case-item {
    flex: 0 0 calc(33.333% - 1em);
  }

  .news-page .news-list-section .news-item {
    width: calc(33.333% - 11px);
  }
}

@media (max-width: 992px) {
  .solutions-list {
    grid-template-columns: 1fr;
    width: 95%;
  }

  .news-section .news-list {
    grid-template-columns: 1fr;
  }

  .news-carousel {
    min-height: auto;
  }

  .news-img-wrap {
    height: 280px;
  }

  .cases-carousel .case-item {
    flex: 0 0 calc(50% - 0.75em);
  }

  .case-img-wrap {
    height: 320px;
  }

  .products-overlay,
  .solutions-overlay {
    position: fixed;
    left: 1rem;
    right: 1rem;
    width: auto;
    max-width: none;
    transform: none;
    top: 72px;
    max-height: calc(100vh - 90px);
    overflow-y: auto;
  }

  .nav-products:hover .products-overlay {
    display: none;
  }

  .products-overlay.show,
  .solutions-overlay.show {
    display: flex !important;
  }
}

@media (max-width: 768px) {
  .banner,
  .banner-item,
  .banner-item img,
  .banner-images img {
    height: 280px !important;
  }

  .products-center-title {
    font-size: 1.8em;
  }

  .cases-carousel .case-item {
    flex: 0 0 75%;
  }

  .case-img-wrap {
    height: 260px;
  }

  .news-page .news-list-section .news-item {
    width: calc(50% - 8px);
  }

  .category-header {
    flex-direction: column;
    text-align: center;
  }

  .category-header-img {
    margin-right: 0 !important;
    margin-bottom: 20px;
  }
}

@media (max-width: 480px) {
  .news-page .news-list-section .news-item {
    width: 100%;
  }

  .solution-page .solutions-grid {
    grid-template-columns: 1fr;
  }
}

/* ── 通用页头 Banner（无背景图样式） ── */
.page-banner {
  position: relative;
  width: 100%;
  height: 320px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary) 0%, #1a4d7a 100%);
}

.page-banner-overlay {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-banner-content {
  text-align: center;
  color: #fff;
  padding: 0 20px;
}

.page-banner-title {
  font-size: 2.8em;
  font-weight: 700;
  margin: 0 0 12px 0;
  letter-spacing: 0.08em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.page-banner-subtitle {
  font-size: 1.15em;
  margin: 0;
  opacity: 0.95;
  font-weight: 400;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  max-width: 600px;
  line-height: 1.8;
}

@media (max-width: 992px) {
  .page-banner { height: 220px; }
  .page-banner-title { font-size: 2em; }
  .page-banner-subtitle { font-size: 0.95em; }
}
