/* 联系卡片样式 */

.contact-cards-section {
  padding: 60px 0;
  background: linear-gradient(180deg, #0a1a2e 0%, #162447 50%, #1a1a2e 100%);
  position: relative;
  overflow: hidden;
}

/* 背景装饰 */
.contact-cards-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

#contact-cards-container {
  position: relative;
  z-index: 1;
}

.contact-cards-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 45px 20px;
  overflow: hidden;
}

.contact-cards-track {
  display: flex;
  gap: 20px;
  transition: transform 0.5s ease;
  width: 100%;
}

/* 卡片盒子样式 */
.contact-card-group {
  display: flex;
  gap: 20px;
  flex: 0 0 100%;
  min-width: 0;
}

/* 网格模式 */
.contact-cards-wrapper:not(.carousel-mode) .contact-cards-track {
  flex-wrap: wrap;
  justify-content: center;
}

.contact-cards-wrapper:not(.carousel-mode) .contact-card-group {
  flex: 0 0 calc(50% - 10px);
  max-width: calc(50% - 10px);
}

/* 轮播模式 */
.contact-cards-wrapper.carousel-mode {
  overflow: hidden;
}

.contact-cards-wrapper.carousel-mode .contact-cards-track {
  flex-wrap: nowrap;
  will-change: transform;
}

.contact-cards-wrapper.carousel-mode .contact-card-group {
  flex: 0 0 100%;
  min-width: 0;
}

.contact-cards-wrapper.carousel-1 .contact-cards-track {
  width: calc(100% * 4);
}

.contact-cards-wrapper.carousel-1 .contact-card-group {
  flex: 0 0 calc(25% - 15px);
  min-width: 0;
}

.contact-cards-wrapper.carousel-1 .contact-card {
  flex: 0 0 100%;
  min-width: 0;
}

.contact-cards-wrapper.carousel-1 .contact-card-group:last-child {
  margin-right: 0;
}

.contact-cards-wrapper.carousel-2 .contact-cards-track {
  width: calc(100% * 2);
}

.contact-cards-wrapper.carousel-2 .contact-card-group {
  flex: 0 0 calc(50% - 10px);
  min-width: 0;
}

.contact-cards-wrapper.carousel-2 .contact-card {
  flex: 0 0 calc(50% - 10px);
  min-width: 0;
}

/* 卡片样式 */
.contact-card {
  background: rgba(255, 255, 255, 0.13);
  -webkit-backdrop-filter: blur(30px);
  backdrop-filter: blur(30px);
  border-radius: 8px;
  padding: 30px;
  min-width: 300px;
  flex: 1;
  max-width: 350px;
}

.contact-card:hover {
  transform: translateY(-5px);
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
  border-color: rgba(59, 130, 246, 0.5);
}

.card-title {
  color: #fff;
  font-size: 20px;
  font-weight: 600;
}

.card-direction {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  line-height: 21px;
  height: 58px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  text-overflow: ellipsis;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 0.5px solid rgba(217, 217, 217, 0.2);
}

.card-contact-info {
  margin-top: 20px;
}

.card-contact {
  color: rgba(255, 255, 255, 1);
  font-size: 16px;
  line-height: 24px;
  height: 24px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-contact:last-child {
  margin-bottom: 0;
}

.contact-label {
  color: rgba(255, 255, 255, 0.6);
  margin-right: 5px;
}

.card-contact a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: color 0.3s ease;
}
.card-contact span.contact_icon {
  display: block;
  float: left;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.4);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  line-height: 26px;
  font-size: 12px;
}
.card-contact span.contact_icon i {
  margin-left: 4px;
  margin-top: 4px;
}
.card-contact a:hover {
  color: #60a5fa;
}

/* 图标样式 */
.icon-phone,
.icon-email,
.icon-wechat {
  display: inline-block;
  width: 18px;
  height: 18px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  flex-shrink: 0;
}

.icon-phone {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z'/%3E%3C/svg%3E");
}

.icon-email {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z'/%3E%3C/svg%3E");
}

.icon-wechat {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M8.691 2.188C3.891 2.188 0 5.476 0 9.53c0 2.212 1.17 4.203 3.002 5.55a.59.59 0 0 1 .213.665l-.39 1.48c-.019.07-.048.141-.048.213 0 .163.13.295.29.295a.326.326 0 0 0 .167-.054l1.903-1.114a.864.864 0 0 1 .717-.098 10.16 10.16 0 0 0 2.837.403c.276 0 .543-.027.811-.05-.857-2.578.157-4.972 1.932-6.446 1.703-1.4 3.882-1.98 5.853-1.838-.576-3.583-4.196-6.348-8.608-6.348zM5.785 5.991c.642 0 1.162.529 1.162 1.18a1.17 1.17 0 0 1-1.162 1.178A1.17 1.17 0 0 1 4.623 7.17c0-.651.52-1.18 1.162-1.18zm5.813 0c.642 0 1.162.529 1.162 1.18a1.17 1.17 0 0 1-1.162 1.178c-.641 0-1.161-.527-1.161-1.178 0-.651.52-1.18 1.161-1.18zm5.34 2.68c-2.451 0-4.523 1.876-4.808 4.315-.12 1.054.242 2.051.916 2.786 1.115 1.22 2.842 1.873 4.61 1.873a5.893 5.893 0 0 0 2.113-.384.723.723 0 0 1 .6.082l1.58.924a.24.24 0 0 0 .139.044c.12 0 .216-.098.216-.22a.607.607 0 0 0-.036-.156l-.325-1.233a.458.458 0 0 1 .166-.532c1.255-.91 2.036-2.176 2.036-3.563-.002-2.577-2.18-4.666-4.807-4.666zm-2.89 2.993c.477 0 .864.388.864.866a.872.872 0 0 1-.864.867.872.872 0 0 1-.863-.867c0-.478.386-.866.863-.866zm2.89 0c.477 0 .864.388.864.866a.872.872 0 0 1-.864.867.872.872 0 0 1-.863-.867c0-.478.386-.866.863-.866z'/%3E%3C/svg%3E");
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .contact-card {
    min-width: 280px;
    max-width: 320px;
  }
  
  .contact-cards-wrapper:not(.carousel-mode) .contact-card-group {
    flex: 0 0 calc(50% - 10px);
    max-width: calc(50% - 10px);
  }
}

@media (max-width: 992px) {
  .contact-cards-section {
    padding: 40px 0;
  }
  
  .contact-card {
    min-width: 260px;
    max-width: 300px;
    padding: 25px;
  }
  
  .card-title {
    font-size: 18px;
  }
  
  .contact-cards-wrapper:not(.carousel-mode) .contact-card-group {
    flex: 0 0 calc(50% - 10px);
    max-width: calc(50% - 10px);
  }
}

@media (max-width: 768px) {
  .contact-card {
    min-width: 100%;
    max-width: 100%;
    padding: 20px;
  }
  
  .card-title {
    font-size: 16px;
  }
  
  .card-direction {
    font-size: 14px;
  }
  
  .card-contact {
    font-size: 14px;
  }
  
  /* 移动端：盒子内的卡片垂直排列 */
  .contact-card-group {
    flex-direction: column;
  }
  
  .contact-cards-wrapper:not(.carousel-mode) .contact-card-group {
    flex: 0 0 100%;
    max-width: 100%;
  }
  
  .contact-cards-wrapper.carousel-2 .contact-card {
    flex: 0 0 0;
  }
  .contact-cards-wrapper.carousel-1 .contact-card  {
    flex: 0 0 0;
  }
  .contact-cards-wrapper {
    padding: 20px;
  }
  .contact-card {
    padding: 12px;
  }
}
.contact-cards-section {
  height: 576px;
  width: 100%;
  background-image: url(../assets/img/contact.png);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
}
