/* 主样式 */
:root {
  --primary-color: #ffc451;
  --primary-hover: #ffd584;
  --dark-bg: #151515;
  --text-color: #444444;
  --light-gray: #f0f0f0;
  --border-color: #ebebeb;
  --transition: all 0.3s ease;
}

/* 移动端触摸优化 */
@media (max-width: 768px) {
  * {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
  }

  body {
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  /* 优化触摸滚动 */
  html {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
  }

  /* 防止双击缩放 */
  button,
  a,
  input,
  textarea {
    touch-action: manipulation;
  }
}

/* 容器 */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* 栅格系统 */
.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
  align-items: center;
}

.col {
  flex: 1;
  padding: 0 15px;
}

.col-image {
  flex: 0 0 50%;
  padding: 0 15px;
}

.col-content {
  flex: 0 0 50%;
  padding: 0 15px;
}

.col-info {
  flex: 0 0 35%;
  padding: 0 15px;
}

.col-form {
  flex: 0 0 65%;
  padding: 0 15px;
}

/* 通用样式 */
.section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  color: #aaa;
  letter-spacing: 2px;
  margin-bottom: 10px;
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: "";
  width: 120px;
  height: 1px;
  background: #ffde9e;
  display: inline-block;
  margin-left: 10px;
  vertical-align: middle;
}

.section-title p {
  font-size: 36px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--dark-bg);
}

/* 按钮 */
.btn-primary {
  display: inline-block;
  padding: 10px 30px;
  background: transparent;
  color: #fff;
  border: 2px solid var(--primary-color);
  border-radius: 4px;
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition);
  cursor: pointer;
  user-select: none;
}

.btn-primary:hover {
  background: var(--primary-color);
  color: var(--dark-bg);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-submit {
  width: 100%;
  padding: 12px 30px;
  background: var(--primary-color);
  color: var(--dark-bg);
  border-radius: 4px;
  font-weight: 600;
  font-size: 16px;
  transition: var(--transition);
  cursor: pointer;
  user-select: none;
}

.btn-submit:hover {
  background: var(--primary-hover);
}

.btn-submit:active {
  transform: scale(0.98);
}

.btn-cta {
  display: inline-block;
  padding: 10px 30px;
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
  border-radius: 4px;
  font-weight: 600;
  font-size: 16px;
  transition: var(--transition);
  cursor: pointer;
  user-select: none;
}

.btn-cta:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--dark-bg);
}

.btn-cta:active {
  transform: scale(0.98);
}

/* 移动端按钮优化 */
@media (max-width: 768px) {
  /* header中的按钮保持小尺寸，其他按钮使用大尺寸 */
  .btn-cta,
  .btn-submit {
    min-height: 44px;
    padding: 14px 32px;
    font-size: 16px;
  }

  /* header外的.btn-primary使用大尺寸 */
  .hero .btn-primary,
  .about .btn-primary,
  .services .btn-primary,
  .contact .btn-primary,
  .cta .btn-primary {
    min-height: 44px;
    padding: 14px 32px;
    font-size: 16px;
  }

  .btn-primary:active,
  .btn-cta:active,
  .btn-submit:active {
    transform: scale(0.96);
  }
}

/* 返回顶部按钮 */
.back-to-top {
  position: fixed;
  right: 15px;
  bottom: 15px;
  width: 40px;
  height: 40px;
  background: var(--primary-color);
  color: var(--dark-bg);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 80;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--dark-bg);
  color: var(--primary-color);
}

.back-to-top:active {
  transform: scale(0.9);
}

/* 移动端返回顶部按钮优化 */
@media (max-width: 768px) {
  .back-to-top {
    width: 48px;
    height: 48px;
    right: 12px;
    bottom: 80px;
    font-size: 26px;
    border-radius: 50%;
    z-index: 80;
  }

  .back-to-top:active {
    transform: scale(0.85);
  }
}

/* 动画效果 */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.active {
  opacity: 1;
  transform: translateY(0);
}

/* 加载动画 */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
