/* ==========================================
   蔚蓝 钢结构框架组件样式
   sectionClassName: weilan-custom-structure
   ========================================== */

.weilan-custom-structure {
  position: relative;
  width: 100%;
  min-height: 67.5rem;
  padding-top: 6.25rem;
}

.weilan-custom-structure > .container {
  transform: translateY(-6.25rem);
}

/* 背景线条图案 */
.weilan-custom-structure-bg-pattern {
  position: absolute;
  top: 0;
  left: 0;
  /* right: 0; */
  /* bottom: 0; */
  width: 100%;
  height: 100%;
  object-position: top;
  object-fit: cover;
}

.weilan-custom-structure .container {
  position: relative;
  z-index: 1;
  padding: 0 var(--container-spacing, 1rem);
}

/* ==========================================
   标题
   ========================================== */

.weilan-custom-structure-title {
  text-align: center;
  line-height: 1.3;
  color: var(--title-text-color);
  margin-bottom: 3rem;
}

/* ==========================================
   卡片网格布局：第一行3张，第二行4张
   ========================================== */

.weilan-custom-structure-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  /* flex-wrap: wrap-reverse; */
  justify-content: center;
  text-align: center;
  column-gap: 1.875rem;
  row-gap: 3.125rem;
  margin-bottom: 4.3125rem;
}

.weilan-custom-structure-card {
  position: relative;
  background: #fff;
  border-radius: 0.625rem;
  width: 100%;
  /* max-width: 25%; */
  min-width: 0px;
  border-radius: 15px;
  overflow: hidden;
  flex: 1;
  padding: var(--spacing-3xl, 1.875rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 16.25rem;
}

.weilan-custom-structure-card:nth-of-type(1),
.weilan-custom-structure-card:nth-of-type(2),
.weilan-custom-structure-card:nth-of-type(3) {
  transform: translate(50%, 0px);
}

.weilan-custom-structure-card:nth-of-type(4) {
  grid-row: 2;
  grid-column: 1;
}

.weilan-custom-structure-card:nth-of-type(5) {
  grid-row: 2;
  grid-column: 2;
}
.weilan-custom-structure-card:nth-of-type(6) {
  grid-row: 2;
  grid-column: 3;
}
.weilan-custom-structure-card:nth-of-type(7) {
  grid-row: 2;
  grid-column: 4;
}

/* 卡片内容 */
.weilan-custom-structure-card-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  z-index: 1;
}

.weilan-custom-structure-card-icon {
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  margin-bottom: 1.3125rem;
}

.weilan-custom-structure-card-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 默认与 hover 图标切换 */
.weilan-custom-structure-card-icon-default {
  display: block;
  transition: opacity 0.3s ease;
}

.weilan-custom-structure-card-icon-active {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.weilan-custom-structure-card:hover .weilan-custom-structure-card-icon-default {
  opacity: 0;
}

.weilan-custom-structure-card:hover .weilan-custom-structure-card-icon-active {
  opacity: 1;
}

.weilan-custom-structure-card::before {
  content: '';
  position: absolute;
  left: 0px;
  top: 0px;
  width: 100%;
  height: 100%;
  opacity: 0;
  background: linear-gradient(180deg, #54dbcc 0%, #0b62c1 100%);
  box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.1);
  visibility: hidden;
  transition: all 0.3s;
  z-index: 0;
}

.weilan-custom-structure-card:hover::before {
  opacity: 1;
  visibility: visible;
}

.weilan-custom-structure-card:hover * {
  color: #fff;
}

.weilan-custom-structure-card-title {
  line-height: 1.4;
  color: var(--title-text-color);
  margin: 0;
  text-align: left;
}

.weilan-custom-structure-card--highlighted .weilan-custom-structure-card-title {
  color: #fff;
}

.weilan-custom-structure-card-description {
  font-family: var(--font-family);
  font-weight: 400;
  text-align: left;
  font-size: var(--font-size-lg);
  line-height: 1.666;
  color: var(--text-color);
  margin: 0;
}

.weilan-custom-structure-card--highlighted
  .weilan-custom-structure-card-description {
  color: rgba(255, 255, 255, 0.95);
}

/* ==========================================
   底部 CTA 区域
   ========================================== */

.weilan-custom-structure-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.weilan-custom-structure-cta-title {
  line-height: 1.4;
  color: var(--text-color-light);
  margin-bottom: 0.5625rem;
}

.weilan-custom-structure-cta-description {
  font-size: var(--font-size-lg);
  line-height: 1.66;
  color: var(--text-color-light);
  margin: 0;
  margin-bottom: 2rem;
}

.weilan-custom-structure-cta-button {
}

/* ==========================================
   响应式设计
   ========================================== */

@media screen and (max-width: 1200px) {
  .weilan-custom-structure-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    row-gap: 1.25rem;
  }

  .weilan-custom-structure > .container {
    transform: none;
  }

  .weilan-custom-structure {
    padding: 4rem 0px;
  }

  .weilan-custom-structure-card {
    max-width: 100%;
    min-width: 0px;
    min-height: 200px;

    transform: none !important;
    grid-column: auto !important;
    grid-row: auto !important;
  }
}

@media screen and (max-width: 768px) {
  .weilan-custom-structure-grid {
    display: grid;
    grid-template-columns: 1fr;
  }
  .weilan-custom-structure {
    min-height: 0px;
  }

  .weilan-custom-structure-card {
    max-width: 100%;
    min-width: 0px;
    min-height: 0px;

    transform: none !important;
    grid-column: auto !important;
    grid-row: auto !important;
  }
}

/* ==================== 移动端 Swiper 样式 ==================== */
.weilan-custom-structure-swiper-wrapper {
  display: none;
}

@media screen and (max-width: 768px) {
  .weilan-custom-structure-grid {
    display: none !important;
  }

  .weilan-custom-structure-swiper-wrapper {
    display: block;
    margin-bottom: 4.3125rem;
  }

  .weilan-custom-structure-swiper .swiper-slide {
    height: auto;
  }

  .weilan-custom-structure-swiper .weilan-custom-structure-card {
    transform: none;
    min-height: 16.25rem;
  }

  .weilan-custom-structure-swiper .swiper-scrollbar {
    position: relative;
    margin-top: 1.5rem;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
  }

  .weilan-custom-structure-swiper .swiper-scrollbar-drag {
    background: var(--color-primary);
    border-radius: 2px;
  }
}
