/* 
 * 云墨云网络团队新官网 - 自定义样式
 * 中文优化和品牌定制
 */

/* ========== 全局样式 ========== */
:root {
  /* 主色调 */
  --primary-blue: #4ba2fb;
  --primary-green: #4ddeb5;
  --primary-lime: #3fd93c;
  --primary-yellow: #f7c52e;
  
  /* 中性色 */
  --gray-dark: #434343;
  --gray-medium: #626262;
  --gray-light: #939393;
  --gray-bg: #f4f6f8;
  
  /* 功能色 */
  --success: #22ac38;
  --warning: #f39800;
  --danger: #fd2626;
  
  /* 文字色 */
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-muted: #999999;
}

/* 中文字体优化 */
body {
  font-family: "Microsoft YaHei", "微软雅黑", "Source Han Sans CN", "思源黑体", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text-primary);
  line-height: 1.8;
  letter-spacing: 0.5px;
  padding-top: 0; /* 移除padding，改用其他方式 */
  margin: 0;
}

/* 确保页面从顶部开始 */
html, body {
  margin: 0;
  padding: 0;
}

/* 标题字体优化 */
h1, h2, h3, h4, h5, h6 {
  font-family: "Microsoft YaHei", "微软雅黑", "Source Han Sans CN", "思源黑体", sans-serif;
  font-weight: 500;
  letter-spacing: 1px;
}

/* ========== 组件样式占位 ========== */
/* 各组件的具体样式将在对应任务中添加 */

/* Header样式 - 任务2 */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  background-color: #fff;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-area {
  padding: 15px 0;
  background-color: #fff; /* 确保背景是白色 */
}

.navbar-brand img {
  max-height: 50px;
}

.navbar-nav .nav-item {
  margin: 0 15px;
}

.navbar-nav .nav-item a {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  padding: 10px 0 12px 0; /* 增加底部padding，为下划线留足空间 */
  position: relative;
  transition: color 0.3s ease-in-out;
  display: inline-block;
}

.navbar-nav .nav-item a:hover,
.navbar-nav .nav-item a.active {
  color: var(--primary-blue);
}

/* 禁用main.css中的::before伪元素 */
.navbar-nav .nav-item a::before {
  display: none !important;
}

/* 使用::after伪元素作为下划线 */
.navbar-nav .nav-item a::after {
  content: '';
  position: absolute;
  bottom: 8px; /* 调整位置，确保在padding范围内 */
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-blue);
  transition: width 0.3s ease-in-out;
}

.navbar-nav .nav-item a:hover::after,
.navbar-nav .nav-item a.active::after {
  width: 100%;
}

/* 汉堡菜单按钮 */
.navbar-toggler {
  border: none;
  padding: 0;
}

.navbar-toggler:focus {
  box-shadow: none;
}

.toggler-icon {
  display: block;
  width: 30px;
  height: 3px;
  background-color: var(--text-primary);
  margin: 6px 0;
  transition: all 0.3s ease-in-out;
}

/* 响应式样式 */
@media (max-width: 991px) {
  .navbar-collapse {
    background-color: #fff;
    padding: 20px;
    margin-top: 15px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  }
  
  .navbar-nav .nav-item {
    margin: 10px 0;
  }
  
  .navbar-nav .nav-item a {
    display: block;
    padding: 10px 15px;
  }
  
  .navbar-nav .nav-item a::after {
    display: none;
  }
}

/* Hero轮播图样式 - 任务3 */
.hero-section {
  padding-top: 0; /* 移除padding */
  margin-top: 0;
  position: relative;
  overflow: hidden;
  background-color: #fff;
}

/* 轮播图容器添加上边距 */
.hero-slider-wrapper {
  position: relative;
  width: 100%;
  margin-top: 80px; /* 为header留出空间 */
}

@media (max-width: 768px) {
  .hero-slider-wrapper {
    margin-top: 70px;
  }
}

.hero-slider-wrapper {
  position: relative;
  width: 100%;
}

.hero-slider {
  position: relative;
}

.hero-slide {
  position: relative;
  width: 100%;
  height: 600px;
  overflow: hidden;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* 半透明遮罩层 - 降低透明度 */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(75, 162, 251, 0.3) 0%, rgba(77, 222, 181, 0.2) 100%);
  z-index: 1;
}

/* 文字内容 */
.hero-content {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  transform: translateY(-50%);
  z-index: 2;
  color: #fff;
}

.hero-subtitle {
  display: block;
  font-size: 18px;
  font-weight: 400;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.hero-title {
  font-size: 56px;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero-description {
  font-size: 20px;
  margin-bottom: 30px;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-buttons .main-btn {
  padding: 15px 35px;
  font-size: 16px;
  font-weight: 500;
  border-radius: 50px;
  transition: all 0.3s ease-in-out;
}

.hero-buttons .btn-outline {
  background-color: transparent;
  border: 2px solid #fff;
  color: #fff;
}

.hero-buttons .btn-outline:hover {
  background-color: #fff;
  color: var(--primary-blue);
}

/* Tiny Slider控制按钮 */
.tns-controls {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  transform: translateY(-50%);
  z-index: 3;
  display: flex;
  justify-content: space-between;
  padding: 0 30px;
  pointer-events: none;
}

.tns-controls button {
  width: 50px;
  height: 50px;
  background-color: rgba(255, 255, 255, 0.3);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  pointer-events: all;
}

.tns-controls button:hover {
  background-color: rgba(255, 255, 255, 0.8);
  color: var(--primary-blue);
}

/* Tiny Slider指示器 */
.tns-nav {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 10px;
}

.tns-nav button {
  width: 12px;
  height: 12px;
  background-color: rgba(255, 255, 255, 0.5);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
}

.tns-nav button.tns-nav-active {
  background-color: #fff;
  width: 30px;
  border-radius: 6px;
}

/* 响应式样式 */
@media (max-width: 768px) {
  .hero-slide {
    height: 400px;
  }
  
  .hero-title {
    font-size: 36px;
  }
  
  .hero-subtitle {
    font-size: 14px;
  }
  
  .hero-description {
    font-size: 16px;
  }
  
  .hero-buttons .main-btn {
    padding: 12px 25px;
    font-size: 14px;
  }
  
  .tns-controls {
    padding: 0 15px;
  }
  
  .tns-controls button {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
}

@media (max-width: 576px) {
  .hero-title {
    font-size: 28px;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .hero-buttons .main-btn {
    width: 100%;
    max-width: 250px;
  }
}

/* About关于我们样式 - 任务4 */
.about-section {
  background-color: var(--gray-bg);
}

.about-section .section-title {
  text-align: center !important;
}

.about-section .section-title h2 {
  text-align: center !important;
}

.about-section .section-title p {
  text-align: center !important;
}

.about-section .row.align-items-stretch {
  display: flex;
  flex-wrap: wrap;
}

.about-section .row.align-items-stretch > [class*='col-'] {
  display: flex;
}

.section-title {
  text-align: center;
}

.section-title h2 {
  font-size: 36px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
}

.section-title p {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.8;
  text-align: center;
}

.single-advantage {
  padding: 40px 30px;
  background-color: #fff;
  border-radius: 10px;
  margin-bottom: 30px;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  width: 100%; /* 确保卡片填满列宽 */
  display: flex;
  flex-direction: column;
}

.single-advantage:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.advantage-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 25px;
  transition: all 0.3s ease-in-out;
}

.advantage-icon i {
  font-size: 36px;
  color: #fff;
}

.advantage-icon.color-1 {
  background-color: var(--primary-blue);
}

.advantage-icon.color-2 {
  background-color: var(--primary-green);
}

.advantage-icon.color-3 {
  background-color: var(--primary-lime);
}

.single-advantage:hover .advantage-icon {
  transform: scale(1.1) rotate(5deg);
}

.advantage-content h3 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--text-primary);
}

.advantage-content p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 0;
  flex: 1; /* 让文字区域自动填充剩余空间 */
}

/* 响应式样式 */
@media (max-width: 768px) {
  .section-title h2 {
    font-size: 28px;
  }
  
  .section-title p {
    font-size: 16px;
  }
  
  .single-advantage {
    padding: 30px 20px;
  }
  
  .advantage-content h3 {
    font-size: 20px;
  }
}

/* Services服务项目样式 - 任务5 */
.service-section {
  background-color: #fff;
}

/* 强制服务项目标题居中 */
#services .section-title,
#services .section-title h2,
#services .section-title p {
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.service-section .section-title {
  text-align: center !important;
}

.service-section .section-title h2 {
  text-align: center !important;
}

.service-section .section-title p {
  text-align: center !important;
}

.service-section .row {
  display: flex;
  flex-wrap: wrap;
}

.service-section .row > [class*='col-'] {
  display: flex;
}

.single-service {
  position: relative;
  padding: 40px 25px;
  background-color: #fff;
  border-radius: 15px;
  margin-bottom: 30px;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  width: 100%; /* 确保卡片填满列宽 */
  display: flex;
  flex-direction: column;
  align-items: center; /* 居中对齐所有内容 */
  text-align: center;
  min-height: 300px; /* 设置最小高度确保统一 */
}

.single-service:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.service-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

.service-badge.color-1 {
  background-color: var(--primary-blue);
}

.service-badge.color-2 {
  background-color: var(--primary-green);
}

.service-badge.color-3 {
  background-color: var(--primary-lime);
}

.service-badge.color-4 {
  background-color: var(--primary-yellow);
}

.service-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px; /* 居中显示 */
  transition: all 0.3s ease-in-out;
}

.service-icon i {
  font-size: 32px;
  color: #fff;
}

.service-icon.color-1 {
  background-color: var(--primary-blue);
}

.service-icon.color-2 {
  background-color: var(--primary-green);
}

.service-icon.color-3 {
  background-color: var(--primary-lime);
}

.service-icon.color-4 {
  background-color: var(--primary-yellow);
}

.single-service:hover .service-icon {
  transform: scale(1.1) rotate(10deg);
}

.service-content {
  width: 100%;
  text-align: center;
}

.service-content h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--text-primary);
  text-align: center;
}

.service-content p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
  min-height: 50px;
  text-align: center;
}

.service-btn {
  display: inline-block;
  padding: 10px 25px;
  background-color: var(--gray-bg);
  color: var(--text-primary);
  border-radius: 25px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease-in-out;
  text-decoration: none;
}

.single-service.wow:nth-child(1) .service-btn:hover {
  background-color: var(--primary-blue);
  color: #fff;
}

.single-service.wow:nth-child(2) .service-btn:hover {
  background-color: var(--primary-green);
  color: #fff;
}

.single-service.wow:nth-child(3) .service-btn:hover {
  background-color: var(--primary-lime);
  color: #fff;
}

.single-service.wow:nth-child(4) .service-btn:hover {
  background-color: var(--primary-yellow);
  color: #fff;
}

/* 响应式样式 */
@media (max-width: 1199px) {
  .single-service {
    padding: 35px 20px;
  }
}

@media (max-width: 991px) {
  .service-content h3 {
    font-size: 18px;
  }
  
  .service-content p {
    font-size: 14px;
    min-height: auto;
  }
}

@media (max-width: 767px) {
  .single-service {
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Team团队成员样式 - 任务6 */
.team-section {
  background-color: var(--gray-bg);
}

.team-section .section-title {
  text-align: center !important;
}

.team-section .section-title h2 {
  text-align: center !important;
}

.team-section .section-title p {
  text-align: center !important;
}

.single-team {
  padding: 40px 25px;
  background-color: #fff;
  border-radius: 15px;
  margin-bottom: 30px;
  text-align: center;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.single-team:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.team-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 25px;
  padding: 5px;
  transition: all 0.6s ease-in-out;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f0f0f0;
}

.team-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.team-avatar.color-1 {
  border: 4px solid var(--primary-blue);
}

.team-avatar.color-2 {
  border: 4px solid var(--primary-green);
}

.team-avatar.color-3 {
  border: 4px solid var(--primary-lime);
}

.team-avatar.color-4 {
  border: 4px solid var(--primary-yellow);
}

.single-team:hover .team-avatar {
  transform: rotateY(360deg);
}

.team-content h3 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.team-role {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 10px;
  min-height: 48px;
}

.team-contact {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* 响应式样式 */
@media (max-width: 1199px) {
  .single-team {
    padding: 35px 20px;
  }
  
  .team-avatar {
    width: 100px;
    height: 100px;
  }
}

@media (max-width: 991px) {
  .team-content h3 {
    font-size: 20px;
  }
  
  .team-role {
    font-size: 14px;
    min-height: auto;
  }
}

@media (max-width: 767px) {
  .single-team {
    max-width: 350px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Certificates资质荣誉样式 */
.certificates-section {
  background-color: #fff;
}

.certificates-section .section-title {
  text-align: center !important;
}

.certificates-section .section-title h2 {
  text-align: center !important;
}

.certificates-section .section-title p {
  text-align: center !important;
}

.certificate-card {
  background-color: #fff;
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease-in-out;
  overflow: hidden;
}

.certificate-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.certificate-image {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 10px;
  background-color: var(--gray-bg);
}

.certificate-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease-in-out;
}

.certificate-card:hover .certificate-image img {
  transform: scale(1.05);
}

/* 响应式样式 */
@media (max-width: 991px) {
  .certificate-card {
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 767px) {
  .certificates-section {
    padding-top: 80px;
    padding-bottom: 50px;
  }
  
  .certificate-card {
    padding: 15px;
  }
}

/* Contact联系我们样式 - 任务7 */
.contact-section {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-green) 100%);
  color: #fff;
}

.contact-content h2 {
  font-size: 42px;
  font-weight: 700;
  color: #fff;
}

.contact-description {
  font-size: 18px;
  line-height: 1.8;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.95);
}

.contact-info-box {
  background-color: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: 40px 30px;
  border-radius: 15px;
  margin-bottom: 30px;
  text-align: center;
  transition: all 0.3s ease-in-out;
  border: 1px solid rgba(255, 255, 255, 0.2);
  min-height: 220px; /* 统一卡片高度 */
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.contact-info-box:hover {
  background-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-5px);
}

.contact-icon {
  width: 70px;
  height: 70px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  transition: all 0.3s ease-in-out;
}

.contact-icon i {
  font-size: 32px;
  color: #fff;
}

.contact-info-box:hover .contact-icon {
  background-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.contact-info-box h4 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 15px;
  color: #fff;
}

.contact-info-box p {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.9);
}

/* 移除旧的二维码占位样式 */
.qrcode-placeholder {
  display: none;
}

/* 悬停显示二维码 */
.qrcode-hover {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 10px;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 10px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease-in-out;
  z-index: 10;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.contact-wechat-box:hover .qrcode-hover {
  opacity: 1;
  visibility: visible;
  margin-top: 15px;
}

.qrcode-hover img {
  width: 150px;
  height: 150px;
  display: block;
  margin: 0 auto 10px;
  border-radius: 5px;
}

.qrcode-hover .qrcode-text {
  font-size: 14px;
  color: var(--text-primary);
  margin: 0;
}

.contact-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.contact-buttons .main-btn {
  padding: 15px 40px;
  font-size: 18px;
  font-weight: 600;
  background-color: #fff;
  color: var(--primary-blue);
  border-radius: 50px;
  transition: all 0.3s ease-in-out;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.contact-buttons .main-btn i {
  font-size: 24px;
}

.contact-buttons .main-btn:hover {
  background-color: var(--primary-yellow);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* 响应式样式 */
@media (max-width: 768px) {
  .contact-content h2 {
    font-size: 32px;
  }
  
  .contact-description {
    font-size: 16px;
  }
  
  .contact-info-box {
    padding: 30px 20px;
  }
  
  .contact-info-box h4 {
    font-size: 20px;
  }
  
  .contact-buttons .main-btn {
    padding: 12px 30px;
    font-size: 16px;
  }
  
  /* 手机端二维码向上显示，避免被按钮遮挡 */
  .qrcode-hover {
    top: auto;
    bottom: 100%;
    margin-top: 0;
    margin-bottom: 10px;
  }
  
  .contact-wechat-box:hover .qrcode-hover {
    margin-top: 0;
    margin-bottom: 15px;
  }
}

/* Footer页脚样式 - 任务8 */
.footer {
  background-color: #eee;
  padding: 30px 0;
}

.footer-content {
  text-align: center;
}

.copyright {
  font-size: 14px;
  color: var(--gray-dark);
  line-height: 30px;
  margin-bottom: 10px;
}

.icp {
  font-size: 14px;
  line-height: 30px;
}

.icp a {
  color: var(--gray-light);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.3s ease-in-out;
}

.icp a:hover {
  color: var(--primary-blue);
}

.icp img {
  width: 16px;
  height: 16px;
  vertical-align: middle;
}

/* 响应式样式 */
@media (max-width: 768px) {
  .footer {
    padding: 20px 0;
  }
  
  .copyright,
  .icp {
    font-size: 12px;
    line-height: 24px;
  }
}

/* 回到顶部按钮样式 - 任务13 */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--primary-blue);
  color: #fff;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  z-index: 998;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.scroll-top:hover {
  background-color: var(--primary-green);
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
  .scroll-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 20px;
  }
}
