/* 全局样式 */
:root {
  --facebook-color: #1877f2;
  --primary-bg: #f5f3ee;
  --secondary-bg: #9e9e9e;
  --primary-color: #2563eb;
  --accent-color: #2563eb;
  --text-color: #333333;
  --text-muted: #5a5a5a;
  --light-bg: #f8f9fa;
  --dark-bg: #6c6c6c;
  --darker-bg: #4a4a4a;
  --gray-bg: #9e9e9e;
  --silver-bg: #c0c4c8;
}

body {
  font-family: 'Microsoft YaHei', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  background-color: var(--primary-bg);
}

.bg-light {
  background-color: var(--primary-bg) !important;
}

.bg-dark {
  background-color: var(--darker-bg) !important;
}

/* 导航栏样式 - 高度 100px，固定于顶部浮于轮播图之上 */
#navbar-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
}

/* 非首页：内容区预留导航栏高度，避免被固定导航遮挡 */
body.has-fixed-nav {
  padding-top: 100px;
}

.navbar,
.navbar-transparent,
.navbar.bg-primary {
  background-color: rgba(0, 0, 0, 0.35) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  min-height: 100px;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.navbar .container {
  min-height: 100px;
  align-items: center;
  display: flex;
  flex-wrap: wrap;
}

.navbar-brand {
  font-weight: bold;
}

.navbar-brand img {
  max-height: 56px;
  width: auto;
}

.navbar .nav-link.active {
  color: var(--accent-color) !important;
  font-weight: 600;
}

/* 导航栏居中与右侧功能区 */
.navbar .container-fluid {
  min-height: 100px;
  align-items: center;
}

.navbar-center {
  gap: 1.5rem;
}

.navbar-right {
  gap: 1rem;
}

.navbar-search .input-group {
  background: rgba(255,255,255,0.15);
  border-radius: 20px;
  overflow: hidden;
}

.navbar-search .form-control {
  background: transparent;
  border: none;
  color: #fff;
  padding: 0.4rem 1rem;
  width: 160px;
  font-size: 0.9rem;
}

.navbar-search .form-control::placeholder {
  color: rgba(255,255,255,0.7);
}

.navbar-search .form-control:focus {
  background: rgba(255,255,255,0.2);
  box-shadow: none;
  outline: none;
}

.navbar-search .btn-search {
  background: transparent;
  border: none;
  color: #fff;
  padding: 0.4rem 0.75rem;
}

.navbar-search .btn-search:hover {
  color: var(--accent-color);
}

.navbar-phone {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.4rem 0.75rem;
  border-radius: 20px;
  background: rgba(255,255,255,0.1);
  transition: all 0.2s ease;
}

.navbar-phone:hover {
  background: rgba(255,255,255,0.2);
  color: var(--accent-color);
}

.navbar-phone svg {
  flex-shrink: 0;
}

@media (max-width: 991px) {
  .navbar-right {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .navbar-search .form-control {
    width: 200px;
  }
}

/* 首页幻灯图样式 - 卡片式横向滚动，留白/阴影/景深/左对齐 */
.section-carousel {
  padding: 48px 0;
}

/* 留白（Gutter）：区块左右留白 32px，不贴边 */
.section-carousel .container-fluid {
  padding-left: 32px !important;
  padding-right: 32px !important;
}

.carousel-wrapper {
  margin: 0 auto;
  overflow: hidden;
  border-radius: 16px;
  position: relative;
  padding: 0 4px;
}

.carousel-1280x600 {
  width: 1280px;
  max-width: 100%;
  height: 600px;
}

.section-carousel .carousel-wrapper {
  max-width: 1280px;
}

/* 分离式侧边栏布局：左文右图，中间分隔线 + 左对齐 */
.carousel-sidebar-layout .carousel-item {
  width: 100%;
  min-width: 100%;
  flex: 0 0 100%;
  display: flex;
  align-items: stretch;
  height: 600px;
}

.carousel-sidebar-layout .carousel-caption {
  position: static;
  width: 40%;
  min-width: 40%;
  flex-shrink: 0;
  background: rgba(0,0,0,0.25);
  padding: 50px 45px;
  border-radius: 12px 0 0 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
  order: 1;
  transform: none;
  border-right: 3px solid rgba(255,255,255,0.2);
  box-sizing: border-box;
}

.carousel-sidebar-layout .carousel-caption h3,
.carousel-sidebar-layout .carousel-caption p {
  text-align: left;
}

.carousel-sidebar-layout .carousel-item img {
  width: 60%;
  min-width: 60%;
  height: 600px;
  object-fit: cover;
  order: 2;
  flex-shrink: 0;
  border-radius: 0 12px 12px 0;
}

/* 区块标题：左上角，黑色文字 */
.carousel-section-title {
  position: absolute;
  top: 28px;
  left: 40px;
  z-index: 10;
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a1a1a;
}

/* 确保轮播可滑动：inner 为 flex，每项占满宽度 */
.carousel-1280x600 .carousel-inner {
  display: flex;
  flex-wrap: nowrap;
}

/* 卡片式：每张为卡片，阴影 + 景深（未选中略透明，选中高亮） */
.carousel-1280x600 .carousel-item {
  height: 600px;
  width: 100%;
  min-width: 100%;
  flex: 0 0 100%;
  display: flex;
  align-items: stretch;
  transition: opacity 0.4s ease, box-shadow 0.4s ease;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  overflow: hidden;
}

.carousel-1280x600 .carousel-item:not(.active) {
  opacity: 0.78;
}

.carousel-1280x600 .carousel-item.active {
  opacity: 1;
  box-shadow: 0 12px 40px rgba(0,0,0,0.22);
  z-index: 1;
}

.carousel-1280x600 .carousel-item img {
  width: 60%;
  height: 600px;
  object-fit: cover;
  order: 2;
}

/* 对齐方式：左对齐；浅色背景以配合黑色文字 */
.carousel-1280x600 .carousel-caption {
  position: static;
  width: 40%;
  background: rgba(255,255,255,0.92);
  padding: 50px 45px;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
  order: 1;
  transform: none;
  left: auto;
  right: auto;
  bottom: auto;
  max-width: none;
}

/* 分离式侧边栏：浅色背景 + 黑色文字，与整体统一 */
.carousel-sidebar-layout.carousel-1280x600 .carousel-caption {
  background: rgba(255,255,255,0.92);
  border-radius: 12px 0 0 12px;
  border-right: 3px solid rgba(0,0,0,0.08);
}

.carousel-sidebar-layout.carousel-1280x600 .carousel-caption h3,
.carousel-sidebar-layout.carousel-1280x600 .carousel-caption p {
  color: #1a1a1a;
}

.carousel-sidebar-layout.carousel-1280x600 .carousel-caption p {
  color: #333;
}

.carousel-sidebar-layout.carousel-1280x600 .carousel-item img {
  border-radius: 0 12px 12px 0;
}

/* 产品展示等轮播：滑动按键移到下方，样式为 <> */
.carousel-wrapper.carousel-1280x600 {
  position: relative;
}

.carousel-1280x600 .carousel-control-prev,
.carousel-1280x600 .carousel-control-next {
  position: absolute;
  top: auto;
  bottom: 12px;
  left: 50%;
  right: auto;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border-radius: 8px;
  background-color: var(--accent-color);
  border: none;
  opacity: 0.9;
  z-index: 15;
  transform: none;
}

.carousel-1280x600 .carousel-control-prev {
  margin-left: -52px;
}

.carousel-1280x600 .carousel-control-next {
  margin-left: 8px;
}

.carousel-1280x600 .carousel-control-prev:hover,
.carousel-1280x600 .carousel-control-next:hover {
  opacity: 1;
  background-color: var(--accent-color);
}

.carousel-1280x600 .carousel-control-prev-icon,
.carousel-1280x600 .carousel-control-next-icon {
  display: none;
}

.carousel-1280x600 .carousel-control-prev::after {
  content: '<';
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.carousel-1280x600 .carousel-control-next::after {
  content: '>';
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

/* 幻燈區塊文字改為黑色 */
.carousel-1280x600 .carousel-caption h3 {
  font-size: 2rem;
  margin-bottom: 18px;
  color: #1a1a1a;
  font-weight: 700;
  line-height: 1.3;
  text-align: left;
}

.carousel-1280x600 .carousel-caption p {
  font-size: 1.1rem;
  margin-bottom: 0;
  color: #333;
  line-height: 1.7;
  text-align: left;
}

/* 查看更多按钮：文字区域左下方 */
.carousel-1280x600 .carousel-caption .carousel-caption-btn {
  margin-top: auto;
  margin-bottom: 0;
  padding: 0.5rem 1.25rem;
  font-weight: 600;
}

/* ========== 新聞動態 / 工程案例 1380×600，左文40%右圖60%，標題在圖片左上角 ========== */
.carousel-1380x600 {
  width: 1380px;
  max-width: 100%;
  height: 600px;
}

.section-carousel .carousel-wrapper.carousel-1380x600 {
  max-width: 1380px;
  position: relative;
}

.carousel-1380x600 .carousel-inner {
  display: flex;
  flex-wrap: nowrap;
  height: 100%;
}

.carousel-1380x600 .carousel-item {
  height: 600px;
  width: 100%;
  min-width: 100%;
  flex: 0 0 100%;
  display: flex;
  align-items: stretch;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
  overflow: hidden;
}

.carousel-1380x600 .carousel-caption {
  display: none;
}

.carousel-1380x600 .carousel-caption h3,
.carousel-1380x600 .carousel-caption p {
  color: #1a1a1a;
  text-align: left;
}

.carousel-1380x600 .carousel-caption h3 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.carousel-1380x600 .carousel-caption p {
  font-size: 1.05rem;
  color: #555;
  margin-bottom: 0;
  line-height: 1.6;
}

.carousel-1380x600 .carousel-item img {
  width: 100%;
  min-width: 100%;
  height: 600px;
  object-fit: cover;
  order: 1;
  flex-shrink: 0;
}

.carousel-1380x600 .carousel-control-prev,
.carousel-1380x600 .carousel-control-next {
  position: absolute;
  top: auto;
  bottom: 16px;
  left: 50%;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border-radius: 8px;
  background-color: var(--accent-color);
  border: none;
  opacity: 0.9;
  z-index: 15;
  transform: none;
}

.carousel-1380x600 .carousel-control-prev {
  margin-left: -52px;
}

.carousel-1380x600 .carousel-control-next {
  margin-left: 8px;
}

.carousel-1380x600 .carousel-control-prev-icon,
.carousel-1380x600 .carousel-control-next-icon {
  display: none;
}

.carousel-1380x600 .carousel-control-prev::after {
  content: '<';
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.carousel-1380x600 .carousel-control-next::after {
  content: '>';
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

/* 1380x600 轮播标题定位在图片区域左上角 */
.carousel-1380x600 .carousel-section-title {
  left: 40%;
}

@media (max-width: 1380px) {
  .carousel-1380x600 {
    height: 500px;
  }

  .carousel-1380x600 .carousel-item,
  .carousel-1380x600 .carousel-item img {
    height: 500px;
  }
}

@media (max-width: 768px) {
  .carousel-1380x600 {
    height: auto;
  }

  .carousel-1380x600 .carousel-item {
    flex-direction: column;
  }

  .carousel-1380x600 .carousel-item img {
    width: 100%;
    height: 240px;
  }

  .carousel-section-title.carousel-title-on-image {
    left: 16px;
    top: 16px;
    font-size: 1.35rem;
  }
}

/* ========== 新聞動態 / 工程案例 1680×600，左文35%右圖65%，標題在圖片左上角 ========== */
.carousel-1680x600 {
  width: 1680px;
  max-width: 100%;
  height: 600px;
}

.section-carousel .carousel-wrapper.carousel-1680x600 {
  max-width: 1680px;
  position: relative;
}

.carousel-1680x600 .carousel-inner {
  display: flex;
  flex-wrap: nowrap;
  height: 100%;
}

.carousel-1680x600 .carousel-item {
  height: 600px;
  width: 100%;
  min-width: 100%;
  flex: 0 0 100%;
  display: flex;
  align-items: stretch;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
  overflow: hidden;
}

.carousel-1680x600 .carousel-caption {
  position: static;
  width: 42%;
  min-width: 42%;
  background: rgba(255,255,255,0.95);
  padding: 2rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
  order: 1;
  border-right: 2px solid rgba(0,0,0,0.06);
  flex-shrink: 0;
}

.carousel-1680x600 .carousel-caption h3,
.carousel-1680x600 .carousel-caption p {
  color: #1a1a1a;
  text-align: left;
}

.carousel-1680x600 .carousel-caption h3 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.carousel-1680x600 .carousel-caption p {
  font-size: 1.05rem;
  color: #555;
  margin-bottom: 0;
  line-height: 1.6;
}

.carousel-1680x600 .carousel-item img {
  width: 58%;
  min-width: 58%;
  height: 600px;
  object-fit: cover;
  order: 2;
  flex-shrink: 0;
}

.carousel-1680x600 .carousel-control-prev,
.carousel-1680x600 .carousel-control-next {
  position: absolute;
  top: auto;
  bottom: 16px;
  left: 50%;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border-radius: 8px;
  background-color: var(--accent-color);
  border: none;
  opacity: 0.9;
  z-index: 15;
  transform: none;
}

.carousel-1680x600 .carousel-control-prev {
  margin-left: -52px;
}

.carousel-1680x600 .carousel-control-next {
  margin-left: 8px;
}

.carousel-1680x600 .carousel-control-prev-icon,
.carousel-1680x600 .carousel-control-next-icon {
  display: none;
}

.carousel-1680x600 .carousel-control-prev::after {
  content: '<';
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.carousel-1680x600 .carousel-control-next::after {
  content: '>';
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

@media (max-width: 1680px) {
  .carousel-1680x600 {
    height: 500px;
  }

  .carousel-1680x600 .carousel-item,
  .carousel-1680x600 .carousel-item img {
    height: 500px;
  }
}

@media (max-width: 768px) {
  .carousel-1680x600 {
    height: auto;
  }

  .carousel-1680x600 .carousel-item {
    flex-direction: column;
    height: auto;
  }

  .carousel-1680x600 .carousel-caption {
    width: 100%;
    order: 2;
    padding: 1.25rem 1.5rem;
    border-right: none;
    border-bottom: 2px solid rgba(0,0,0,0.06);
  }

  .carousel-1680x600 .carousel-item img {
    width: 100%;
    order: 1;
    height: 240px;
  }

  .carousel-section-title.carousel-title-on-image {
    left: 16px;
    top: 16px;
    font-size: 1.35rem;
  }

  .product-collapse-section-title.product-title-on-image {
    left: 16px;
    top: 16px;
    font-size: 1.35rem;
  }
}

@media (max-width: 1280px) {
  .carousel-1280x600 {
    width: 100%;
    height: 500px;
  }

  .carousel-1280x600 .carousel-item,
  .carousel-1280x600 .carousel-item img {
    height: 500px;
  }
}

@media (max-width: 768px) {
  .section-carousel .container-fluid {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .carousel-1280x600 {
    height: auto;
  }

  .carousel-section-title {
    top: 16px;
    left: 20px;
    font-size: 1.35rem;
  }

  .carousel-1280x600 .carousel-item {
    flex-direction: column;
    height: auto;
  }

  .carousel-1280x600 .carousel-item img {
    width: 100%;
    height: 280px;
    order: 1;
  }

  .carousel-1280x600 .carousel-caption {
    width: 100%;
    order: 2;
    padding: 28px 22px;
  }

  .carousel-sidebar-layout.carousel-1280x600 .carousel-item img {
    border-radius: 12px 12px 0 0;
  }

  .carousel-sidebar-layout.carousel-1280x600 .carousel-caption {
    border-radius: 0 0 12px 12px;
    border-right: none;
  }

  .carousel-1280x600 .carousel-caption h3 {
    font-size: 1.4rem;
  }

  .carousel-1280x600 .carousel-caption p {
    font-size: 1rem;
  }
}

/* ========== 產品展示 1680×600 單張滑動，左文35%右圖65%，叠层只显示1张 ========== */
.section-product-collapse {
  padding: 2rem 0;
}

.section-product-collapse .container-fluid {
  padding-left: 32px !important;
  padding-right: 32px !important;
}

/* 區塊標題：在圖片左上角（圖片為右側 65%，故 left: 35%） */
.product-collapse-section-title.product-title-on-image,
.carousel-section-title.carousel-title-on-image {
  position: absolute;
  top: 20px;
  left: 35%;
  z-index: 10;
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a1a1a;
  text-shadow: 0 1px 2px rgba(255,255,255,0.9);
  pointer-events: none;
}

.product-collapse-viewport .product-collapse-section-title {
  margin: 0;
}

.product-collapse-viewport {
  width: 1680px;
  max-width: 100%;
  height: 600px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
}

.product-collapse-viewport:active {
  cursor: grabbing;
}

.product-collapse-track {
  display: flex;
  flex-wrap: nowrap;
  height: 100%;
  transition: transform 0.4s ease;
  will-change: transform;
}

/* 每張 1680×600，叠层只显示 1 张：一次只顯示一張 */
.product-collapse-panel {
  flex: 0 0 1680px;
  width: 1680px;
  height: 600px;
  overflow: hidden;
  min-width: 0;
}

.product-collapse-panel-inner {
  display: flex;
  align-items: stretch;
  height: 100%;
  width: 100%;
  background: #fff;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

.product-collapse-text {
  width: 35%;
  min-width: 35%;
  padding: 2rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(255,255,255,0.98);
  border-right: 2px solid rgba(0,0,0,0.06);
  flex-shrink: 0;
  position: relative;
}

.product-label {
  position: absolute;
  top: 1rem;
  left: 1.5rem;
  background: var(--accent-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 2;
}

.product-collapse-text h3 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.product-collapse-text p {
  font-size: 1.05rem;
  color: #555;
  margin-bottom: 0;
  line-height: 1.6;
}

.product-collapse-image {
  width: 65%;
  min-width: 65%;
  flex-shrink: 0;
  overflow: hidden;
}

.product-collapse-image img {
  width: 100%;
  height: 100%;
  min-height: 600px;
  object-fit: cover;
  display: block;
}

/* 切換按鈕 */
.product-collapse-prev,
.product-collapse-next {
  position: absolute;
  bottom: 16px;
  left: 50%;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 8px;
  background-color: var(--accent-color);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  opacity: 0.9;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
  pointer-events: auto;
}

.product-collapse-prev {
  transform: translate(-52px, 0);
}

.product-collapse-next {
  transform: translate(8px, 0);
}

.product-collapse-prev:hover,
.product-collapse-next:hover {
  opacity: 1;
}

.product-collapse-prev:disabled,
.product-collapse-next:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

@media (max-width: 1680px) {
  .product-collapse-viewport {
    height: 500px;
  }

  .product-collapse-panel {
    flex: 0 0 100%;
    width: 100%;
    height: 500px;
  }

  .product-collapse-image img {
    min-height: 500px;
  }
}

@media (max-width: 768px) {
  .product-collapse-viewport {
    height: auto;
    min-height: 380px;
  }

  .product-collapse-panel {
    flex: 0 0 100%;
    width: 100%;
    height: auto;
  }

  .product-collapse-panel-inner {
    flex-direction: column;
  }

  .product-collapse-text {
    width: 100%;
    min-width: 100%;
    padding: 1.25rem 1.5rem;
    border-right: none;
    border-bottom: 2px solid rgba(0,0,0,0.06);
  }

  .product-collapse-image {
    width: 100%;
    min-width: 100%;
  }

  .product-collapse-image img {
    min-height: 220px;
  }

  .product-collapse-prev,
  .product-collapse-next {
    bottom: 12px;
  }
}

/* ========== 首頁新聞動態與工程案例 图集模式 ========== */
.section-news-gallery, .section-cases-gallery {
  padding: 3rem 0;
}

.section-news-gallery .container-fluid,
.section-cases-gallery .container-fluid {
  padding-left: 32px !important;
  padding-right: 32px !important;
}

.news-gallery-title, .cases-gallery-title {
  position: absolute;
  top: 20px;
  left: 32px;
  z-index: 10;
  font-size: 2rem;
  font-weight: 800;
  color: #1a1a1a;
  margin: 0;
  background: rgba(255,255,255,0.95);
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  border: 2px solid rgba(0,0,0,0.05);
}

.news-gallery-grid, .cases-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 4rem;
  position: relative;
}

.news-gallery-item, .cases-gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.news-gallery-item:hover, .cases-gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.news-gallery-item img, .cases-gallery-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

.news-gallery-overlay, .cases-gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  color: white;
  padding: 2rem 1.5rem 1.5rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.news-gallery-item:hover .news-gallery-overlay,
.cases-gallery-item:hover .cases-gallery-overlay {
  transform: translateY(0);
}

.news-gallery-overlay h3, .cases-gallery-overlay h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  line-height: 1.3;
}

.news-gallery-overlay p, .cases-gallery-overlay p {
  font-size: 0.9rem;
  margin: 0 0 1rem 0;
  line-height: 1.4;
  opacity: 0.9;
}

.news-gallery-overlay .btn, .cases-gallery-overlay .btn {
  font-size: 0.8rem;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
}

@media (max-width: 768px) {
  .news-gallery-grid, .cases-gallery-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 3rem;
  }

  .news-gallery-item img, .cases-gallery-item img {
    height: 200px;
  }

  .news-gallery-title, .cases-gallery-title {
    position: static;
    margin-bottom: 1.5rem;
    background: rgba(255,255,255,0.9);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 1.5rem;
  }

  .news-gallery-overlay, .cases-gallery-overlay {
    transform: translateY(0);
    background: rgba(0,0,0,0.7);
    padding: 1.5rem 1rem 1rem;
  }
}

/* ========== 首頁新聞動態與工程案例 堆疊視圖 ========== */
.section-news-stack, .section-cases-stack {
  padding: 3rem 0;
}

.news-stack-section-title, .cases-stack-section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 1.5rem;
  padding-left: 0.25rem;
}

.news-stack-viewport, .cases-stack-viewport {
  width: 1680px;
  max-width: 100%;
  height: 600px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

.news-stack-track, .cases-stack-track {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  justify-content: center;
  align-items: stretch;
  list-style: none;
  padding: 0;
  margin: 0 -12px;
}

.news-stack-card, .cases-stack-card {
  flex: 1 1 320px;
  max-width: 400px;
  margin-left: -20px;
  margin-right: 0;
  transition: transform 0.25s ease, z-index 0.2s;
  z-index: 0;
}

.news-stack-card:first-child, .cases-stack-card:first-child {
  margin-left: 0;
}

.news-stack-card:hover, .cases-stack-card:hover {
  transform: translateY(-6px);
  z-index: 2;
}

.news-stack-content, .cases-stack-content {
  display: flex;
  align-items: stretch;
  min-height: 280px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1), 0 2px 8px rgba(0,0,0,0.06);
  overflow: hidden;
  transition: box-shadow 0.25s ease;
}

.news-stack-card:hover .news-stack-content, .cases-stack-card:hover .cases-stack-content {
  box-shadow: 0 12px 36px rgba(0,0,0,0.15), 0 6px 16px rgba(0,0,0,0.08);
}

.news-stack-text, .cases-stack-text {
  width: 42%;
  min-width: 42%;
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(255,255,255,0.96);
  border-right: 2px solid rgba(0,0,0,0.06);
}

.news-stack-text h3, .cases-stack-text h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.news-stack-text p, .cases-stack-text p {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 0;
  line-height: 1.5;
}

.news-stack-text .btn, .cases-stack-text .btn {
  align-self: flex-start;
}

.news-stack-image, .cases-stack-image {
  width: 58%;
  min-width: 58%;
  overflow: hidden;
}

.news-stack-image img, .cases-stack-image img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  display: block;
}

@media (max-width: 992px) {
  .news-stack-card, .cases-stack-card {
    flex: 1 1 280px;
    max-width: 100%;
    margin-left: 0;
    margin-bottom: 1rem;
  }

  .news-stack-track, .cases-stack-track {
    margin: 0;
    gap: 1rem;
  }
}

@media (max-width: 576px) {
  .section-news-stack, .section-cases-stack {
    padding: 2rem 0;
  }

  .news-stack-card, .cases-stack-card {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .news-stack-content, .cases-stack-content {
    flex-direction: column;
    min-height: auto;
  }

  .news-stack-text, .cases-stack-text {
    width: 100%;
    min-width: 100%;
    padding: 1rem 1rem 1.25rem;
    border-right: none;
    border-bottom: 2px solid rgba(0,0,0,0.06);
  }

  .news-stack-image, .cases-stack-image {
    width: 100%;
    min-width: 100%;
  }

  .news-stack-image img, .cases-stack-image img {
    min-height: 200px;
  }
}

/* ========== 產品展示 1680×600 卡片堆疊（僅顯示 3 張，第二張起 10% 邊緣） ========== */
.section-product-showcase-stack {
  padding: 2rem 0;
}

.section-product-showcase-stack .container-fluid {
  padding-left: 32px !important;
  padding-right: 32px !important;
}

.product-stack-section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 1rem 0;
  padding-left: 0.25rem;
}

.product-stack-viewport {
  width: 1680px;
  max-width: 100%;
  height: 600px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

.product-stack-track {
  display: flex;
  flex-wrap: nowrap;
  height: 100%;
  transition: transform 0.4s ease;
  will-change: transform;
}

/* 每張卡片 1680×600，左文 40% 右圖 60%；第二張起向左重疊只保留 10% 邊緣 */
.product-stack-card {
  flex: 0 0 1680px;
  width: 1680px;
  height: 600px;
  margin-left: -1512px; /* 重疊 90%，只露 10% = 168px */
  position: relative;
  z-index: 0;
}

.product-stack-card:first-child {
  margin-left: 0;
}

.product-stack-card-inner {
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 100%;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12), 0 2px 10px rgba(0,0,0,0.06);
  overflow: hidden;
}

.product-stack-card .product-stack-text {
  width: 40%;
  min-width: 40%;
  padding: 2rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(255,255,255,0.98);
  border-right: 2px solid rgba(0,0,0,0.06);
}

.product-stack-card .product-stack-text h3 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.product-stack-card .product-stack-text p {
  font-size: 1.05rem;
  color: #555;
  margin-bottom: 0;
  line-height: 1.6;
}

.product-stack-card .product-stack-image {
  width: 60%;
  min-width: 60%;
  overflow: hidden;
}

.product-stack-card .product-stack-image img {
  width: 100%;
  height: 100%;
  min-height: 600px;
  object-fit: cover;
  display: block;
}

/* 切換按鈕：區塊下方中央，藍色 <> */
.product-stack-prev,
.product-stack-next {
  position: absolute;
  bottom: 16px;
  left: 50%;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 8px;
  background-color: var(--accent-color);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  opacity: 0.9;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.product-stack-prev {
  transform: translate(-52px, 0);
}

.product-stack-next {
  transform: translate(8px, 0);
}

.product-stack-prev:hover,
.product-stack-next:hover {
  opacity: 1;
}

.product-stack-prev:disabled,
.product-stack-next:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

@media (max-width: 1680px) {
  .product-stack-viewport {
    height: 500px;
  }

  .product-stack-card {
    flex: 0 0 100%;
    width: 100%;
    height: 500px;
    margin-left: -90%;
  }

  .product-stack-card .product-stack-image img {
    min-height: 500px;
  }
}

@media (max-width: 768px) {
  .product-stack-viewport {
    height: auto;
    min-height: 400px;
  }

  .product-stack-card {
    flex: 0 0 100%;
    width: 100%;
    height: auto;
    margin-left: 0;
    margin-bottom: 0;
  }

  .product-stack-card-inner {
    flex-direction: column;
  }

  .product-stack-card .product-stack-text {
    width: 100%;
    min-width: 100%;
    padding: 1.25rem 1.5rem;
    border-right: none;
    border-bottom: 2px solid rgba(0,0,0,0.06);
  }

  .product-stack-card .product-stack-image {
    width: 100%;
    min-width: 100%;
  }

  .product-stack-card .product-stack-image img {
    min-height: 240px;
  }

  .product-stack-prev,
  .product-stack-next {
    bottom: 12px;
  }
}

/* ========== 首頁卡片堆疊視圖 (Card Stack) ========== */
.section-card-stack {
  padding: 3rem 0;
}

.card-stack-section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 1.5rem;
  padding-left: 0.25rem;
}

.card-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  justify-content: center;
  align-items: stretch;
  list-style: none;
  padding: 0;
  margin: 0 -12px;
}

.card-stack-item {
  flex: 1 1 320px;
  max-width: 400px;
  margin-left: -20px;
  margin-right: 0;
  transition: transform 0.25s ease, z-index 0.2s;
  z-index: 0;
}

.card-stack-item:first-child {
  margin-left: 0;
}

.card-stack-item:hover {
  transform: translateY(-6px);
  z-index: 2;
}

.card-stack-content {
  display: flex;
  align-items: stretch;
  min-height: 280px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1), 0 2px 8px rgba(0,0,0,0.06);
  overflow: hidden;
  transition: box-shadow 0.25s ease;
}

.card-stack-item:hover .card-stack-content {
  box-shadow: 0 12px 36px rgba(0,0,0,0.15), 0 6px 16px rgba(0,0,0,0.08);
}

.card-stack-text {
  width: 42%;
  min-width: 42%;
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(255,255,255,0.96);
  border-right: 2px solid rgba(0,0,0,0.06);
}

.card-stack-text h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.card-stack-text p {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 0;
  line-height: 1.5;
}

.card-stack-text .btn {
  align-self: flex-start;
}

.card-stack-image {
  width: 58%;
  min-width: 58%;
  overflow: hidden;
}

.card-stack-image img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  display: block;
}

@media (max-width: 992px) {
  .card-stack-item {
    flex: 1 1 280px;
    max-width: 100%;
    margin-left: 0;
    margin-bottom: 1rem;
  }

  .card-stack {
    margin: 0;
    gap: 1rem;
  }
}

@media (max-width: 576px) {
  .section-card-stack {
    padding: 2rem 0;
  }

  .card-stack-item {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .card-stack-content {
    flex-direction: column;
    min-height: auto;
  }

  .card-stack-text {
    width: 100%;
    min-width: 100%;
    padding: 1rem 1rem 1.25rem;
    border-right: none;
    border-bottom: 2px solid rgba(0,0,0,0.06);
  }

  .card-stack-image {
    width: 100%;
    min-width: 100%;
  }

  .card-stack-image img {
    min-height: 200px;
  }
}

/* 首页产品展示 - 5 张可滑动图片（无导航按钮） */
.section-products-slider {
  padding: 40px 0;
}

.products-slider-wrapper {
  max-width: 1280px;
  margin: 0 auto;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.products-slider-wrapper::-webkit-scrollbar {
  height: 8px;
}

.products-slider-wrapper::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.1);
  border-radius: 4px;
}

.products-slider-wrapper::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.3);
  border-radius: 4px;
}

.products-slider-track {
  display: flex;
  gap: 0;
  width: max-content;
  min-width: 100%;
}

.products-slider-item {
  flex: 0 0 256px;
  min-width: 256px;
  height: 256px;
  position: relative;
  overflow: hidden;
}

.products-slider-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.products-slider-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  color: #fff;
}

.products-slider-caption h3 {
  font-size: 1rem;
  margin: 0 0 4px 0;
  font-weight: 600;
}

.products-slider-caption p {
  font-size: 0.8rem;
  margin: 0;
  opacity: 0.95;
}

@media (max-width: 768px) {
  .products-slider-item {
    flex: 0 0 200px;
    min-width: 200px;
    height: 200px;
  }
}

/* 轮播图样式 - 占满一般显示器 */
#mainCarousel {
  height: 100vh;
  min-height: 600px;
  width: 100%;
  position: relative;
  overflow: hidden;
}

#mainCarousel .carousel-inner,
#mainCarousel .carousel-item {
  height: 100%;
}

#mainCarousel .carousel-item img {
  object-fit: cover;
  width: 100%;
  height: 100%;
  min-height: 600px;
}

.carousel-caption {
  background-color: rgba(0, 0, 0, 0.7);
  padding: 30px;
  border-radius: 10px;
  bottom: 20%;
  left: 50%;
  transform: translateX(-50%);
  max-width: 600px;
}

.carousel-caption h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: #fff;
}

.carousel-caption p {
  font-size: 1.2rem;
  margin-bottom: 0;
  color: #f8f9fa;
}

/* 标题样式 */
.section-title {
  position: relative;
  margin-bottom: 30px;
  padding-bottom: 15px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background-color: var(--primary-color);
}

.text-center .section-title::after {
  left: 50%;
  transform: translateX(-50%);
}

/* 首页产品服务区 - 米白背景 */
.section-products-service {
  background-color: var(--primary-bg) !important;
  color: #2c3034;
}

.section-products-service .section-title {
  color: #2c3034;
}

.section-products-service .section-title::after {
  background-color: #495057;
}

.section-products-service .card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
}

.section-products-service .card-title,
.section-products-service .card-text {
  color: #333;
}

.section-products-service .btn-primary {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
}

.section-products-service .btn-primary:hover {
  background-color: #1d4ed8;
  border-color: #1d4ed8;
}

/* 卡片样式 */
.card {
  transition: transform 0.3s, box-shadow 0.3s;
  border: none;
  border-radius: 8px;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* 按钮样式 */
.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: #1d4ed8;
  border-color: #1d4ed8;
}

/* 页脚样式 */
footer {
  background-color: var(--darker-bg);
  border-top: 1px solid rgba(0,0,0,0.1);
}

footer,
footer .text-white {
  color: #e9ecef !important;
}

footer a.text-white:hover {
  color: var(--accent-color) !important;
}

footer a {
  text-decoration: none;
}

.social-facebook {
  color: var(--facebook-color) !important;
}

.social-facebook:hover {
  color: #0d65d9 !important;
}

.footer-social-label {
  color: rgba(255, 255, 255, 0.75);
}

.footer-wechat-qr {
  max-width: 120px;
  border-radius: 8px;
}

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

/* 产品展示样式 */
.products-showcase {
  padding: 60px 0;
  background-color: var(--darker-bg);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.product-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

.product-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-item:hover .product-image {
  transform: scale(1.05);
}

.product-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  padding: 20px;
  color: white;
}

.product-overlay h4 {
  margin: 0 0 5px 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.product-overlay p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.9;
}

/* 工程案例样式 */
.cases-showcase {
  padding: 60px 0;
  background-color: var(--gray-bg);
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.case-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.case-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

.case-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.case-item:hover .case-image {
  transform: scale(1.05);
}

.case-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  padding: 25px;
  color: white;
}

.case-overlay h4 {
  margin: 0 0 10px 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.case-overlay p {
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.9;
  line-height: 1.4;
}

/* 修改标题样式 */
.section-title {
  color: var(--text-color);
  text-align: center;
}

.section-title::after {
  background-color: var(--accent-color);
}

/* 页面标题样式 - 高度 500px，可加入背景图片 (style="background-image: url('...')") */
.page-header {
  background-color: transparent !important;
  background-size: cover;
  background-position: center;
  min-height: 500px;
  padding: 100px 1rem 60px 1rem;
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-header.has-bg-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 0;
}

.page-header.has-bg-image .container {
  position: relative;
  z-index: 1;
  color: #fff;
}

.page-header.has-bg-image .page-title {
  color: #fff;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.page-header.has-bg-image .page-subtitle {
  color: rgba(255,255,255,0.95);
}

/* 页面标题内嵌图片（将 img.page-header-bg 放于标题内即可） */
.page-header img.page-header-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.page-header:has(img.page-header-bg)::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 1;
}

.page-header:has(img.page-header-bg) .container {
  position: relative;
  z-index: 2;
}

.page-header:has(img.page-header-bg) .page-title {
  color: #fff;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.page-header:has(img.page-header-bg) .page-subtitle {
  color: rgba(255,255,255,0.95);
}

.page-title {
  color: var(--text-color);
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 1.3rem;
  opacity: 0.9;
  margin-bottom: 0;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .carousel-item {
    height: 100vh;
  }

  .carousel-caption {
    padding: 20px;
    bottom: 15%;
  }

  .carousel-caption h2 {
    font-size: 2rem;
  }

  .carousel-caption p {
    font-size: 1rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
  }

  .cases-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* 产品服务页 - 图库区（米白背景、5 行 x 3 列矩阵） */
.gallery-section {
  background-color: var(--primary-bg);
  padding: 3rem 0 4rem;
  min-height: 60vh;
}

.category-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding: 0.5rem 0;
}

.category-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
  min-width: 120px;
  padding: 0 1.5rem;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--text-color);
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: none;
  outline: none;
}

.category-btn:hover {
  background: rgba(0,0,0,0.04);
  color: var(--accent-color);
}

.category-btn.active {
  background: transparent;
  color: var(--accent-color);
  font-weight: 600;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  max-width: 1400px;
  margin: 0 auto 2rem;
}

.gallery-item {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  background: transparent;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: visible;
}

.gallery-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.18);
}

.gallery-image {
  width: 100%;
  min-height: 320px;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
  border-radius: 12px;
}

.gallery-item:hover .gallery-image {
  transform: scale(1.02);
}

/* 标题与链接在图片下方，透明背景，与图片分离 */
.gallery-overlay {
  position: static;
  padding: 1rem 0 0;
  background: transparent;
  color: var(--text-color);
  opacity: 1;
  transform: none;
  transition: color 0.2s ease;
  border-radius: 0;
}

.gallery-overlay h4 {
  margin: 0 0 0.4rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-color);
  transition: color 0.2s ease;
}

.gallery-item:hover .gallery-overlay h4 {
  color: var(--accent-color);
}

.gallery-link {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.9rem;
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.gallery-link:hover,
.gallery-item:hover .gallery-link {
  color: var(--accent-color);
  text-decoration: underline;
}

/* 产品图库：点击整张卡片为灯箱效果 */
.gallery-item {
  cursor: pointer;
}

/* 灯箱样式（背景提亮） */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(175, 175, 175, 0.781);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.gallery-lightbox.gallery-lightbox-open {
  opacity: 1;
  visibility: visible;
}

.gallery-lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(255,255,255,0.2);
  color: #333;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
}

.gallery-lightbox-close:hover {
  background: rgba(255,255,255,0.4);
  color: #000;
}

/* 灯箱：1280×600 左图右文布局 */
.gallery-lightbox-content {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 1280px;
  max-width: 95vw;
  height: 600px;
  max-height: 90vh;
  background: #1a1a1a;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 16px 60px rgba(0,0,0,0.5);
}

.gallery-lightbox-left {
  flex: 0 0 70%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(245,245,245,0.95);
}

.gallery-lightbox-left img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
}

.gallery-lightbox-right {
  flex: 0 0 30%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 2rem 2rem;
  min-width: 0;
  overflow-y: auto;
  background: rgba(245,245,245,0.95);
}

.gallery-lightbox-title {
  color: #000;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  line-height: 1.4;
  text-align: left;
}

/* 灯箱产品简介（标题下方） */
.gallery-lightbox-intro {
  color: #000;
  font-size: 0.95rem;
  line-height: 1.6;
  text-align: left;
}

.gallery-lightbox-intro-list {
  margin: 0;
  padding-left: 1.25rem;
  list-style: disc;
}

.gallery-lightbox-intro-list li {
  margin-bottom: 0.4rem;
}

/* 灯箱：产品简介下方尺寸说明图 */
.gallery-lightbox-size-img {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.2);
}

.gallery-lightbox-size-label {
  color: #000;
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  text-align: left;
}

.gallery-lightbox-size-img-inner {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  background: rgba(255,255,255,0.06);
}

@media (max-width: 1320px) {
  .gallery-lightbox-content {
    width: 95vw;
    height: auto;
    min-height: 400px;
    max-height: 90vh;
  }
}

@media (max-width: 768px) {
  .gallery-lightbox-content {
    flex-direction: column;
    width: 95vw;
    height: auto;
    max-height: 90vh;
  }

  .gallery-lightbox-left {
    flex: 0 0 auto;
    max-height: 45vh;
  }

  .gallery-lightbox-right {
    flex: 0 0 auto;
    padding: 1.5rem 1.25rem;
    background: rgba(245,245,245,0.95);
  }

  .gallery-lightbox-title {
    font-size: 1.25rem;
    text-align: center;
    color: #000;
  }

  .gallery-lightbox-intro,
  .gallery-lightbox-intro-list {
    text-align: left;
    color: #000;
  }

  .gallery-lightbox-size-img {
    margin-top: 1rem;
    padding-top: 0.75rem;
  }

  .gallery-lightbox-size-img-inner {
    max-width: 100%;
  }
}

.pagination-container {
  margin-top: 1.5rem;
  padding: 0.5rem 0;
}

.pagination-container .pagination {
  gap: 0.35rem;
}

.pagination-container .page-link {
  color: #2c3034;
  border-radius: 6px;
  padding: 0.5rem 0.85rem;
  font-weight: 500;
}

.pagination-container .page-item.active .page-link {
  background-color: var(--dark-bg);
  border-color: var(--dark-bg);
  color: #fff;
}

.pagination-container .page-item.disabled .page-link {
  color: #868e96;
}

.gallery-section .pagination-container .text-muted,
.gallery-section .gallery-empty {
  color: #5a6268 !important;
}

@media (max-width: 992px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 576px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .category-btn {
    height: 80px;
    min-width: 100px;
    padding: 0 1rem;
    font-size: 0.9rem;
  }
} 