/* ============================================
   小马拉大车 - 全站 CSS
   原创设计 | 响应式 | 性能优化
   ============================================ */

/* 1. 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f8f9fa;
}

/* 2. 头部导航 */
header {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  color: white;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: #ff6b35;
  text-decoration: none;
  letter-spacing: 2px;
}

.logo:hover {
  color: #ff8c5a;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
}

nav a {
  color: white;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

nav a:hover {
  color: #ff6b35;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: #ff6b35;
  transition: width 0.3s ease;
}

nav a:hover::after {
  width: 100%;
}

/* 3. 搜索框 */
.search-container {
  display: flex;
  gap: 10px;
  margin: 15px 0;
}

.search-box {
  flex: 1;
  max-width: 400px;
  display: flex;
  gap: 8px;
}

.search-box input {
  flex: 1;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.search-box input:focus {
  outline: none;
  border-color: #ff6b35;
  box-shadow: 0 0 8px rgba(255, 107, 53, 0.2);
}

.search-box button {
  padding: 12px 25px;
  background: #ff6b35;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s ease;
}

.search-box button:hover {
  background: #ff8c5a;
}

/* 4. Banner 区域 */
.banner {
  position: relative;
  height: 500px;
  background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), 
              url('https://d2xsxph8kpxj0f.cloudfront.net/310519663660853663/Nw2e8XTJjwjDZ2gHBVazeh/banner-hero-6duovRSHyLeJyreP87Q72R.webp') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  overflow: hidden;
}

.banner-content {
  z-index: 2;
  animation: fadeInUp 0.8s ease-out;
}

.banner h1 {
  font-size: 48px;
  font-weight: bold;
  margin-bottom: 15px;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
  letter-spacing: 1px;
}

.banner p {
  font-size: 20px;
  margin-bottom: 30px;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
}

.banner-cta {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 14px 35px;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: #ff6b35;
  color: white;
}

.btn-primary:hover {
  background: #ff8c5a;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
}

.btn-secondary {
  background: white;
  color: #ff6b35;
  border: 2px solid white;
}

.btn-secondary:hover {
  background: transparent;
  color: white;
  transform: translateY(-2px);
}

/* 5. 内容区域 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 60px 0;
  border-bottom: 1px solid #eee;
}

.section:last-child {
  border-bottom: none;
}

.section-title {
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 40px;
  text-align: center;
  color: #1a1a1a;
  position: relative;
  padding-bottom: 20px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: #ff6b35;
  border-radius: 2px;
}

/* 6. 卡片网格 */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

.card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  cursor: pointer;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.card-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: white;
  position: relative;
  overflow: hidden;
}

.card-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.3s ease;
}

.card:hover .card-image::before {
  background: rgba(0, 0, 0, 0.2);
}

.card-content {
  padding: 20px;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #1a1a1a;
}

.card-desc {
  font-size: 14px;
  color: #666;
  line-height: 1.5;
  margin-bottom: 15px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #999;
}

/* 7. 视频卡片 */
.video-card {
  position: relative;
  background: linear-gradient(135deg, #ff6b35 0%, #ff8c5a 100%);
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 9/16;
}

.video-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-card:hover .video-overlay {
  opacity: 1;
}

.play-button {
  width: 60px;
  height: 60px;
  background: rgba(255, 107, 53, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.play-button:hover {
  background: #ff6b35;
  transform: scale(1.1);
}

.video-stats {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: white;
  padding: 30px 15px 15px;
  font-size: 12px;
  display: flex;
  justify-content: space-around;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-weight: bold;
  font-size: 14px;
}

/* 8. 专家卡片 */
.expert-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  padding: 30px 20px;
}

.expert-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.expert-avatar {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: white;
}

.expert-name {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 5px;
}

.expert-title {
  font-size: 14px;
  color: #ff6b35;
  margin-bottom: 15px;
}

.expert-bio {
  font-size: 13px;
  color: #666;
  line-height: 1.5;
  margin-bottom: 15px;
}

.expert-creds {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 15px;
}

.cred-badge {
  background: #f0f0f0;
  color: #333;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
}

.expert-social {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 15px;
}

.social-icon {
  width: 32px;
  height: 32px;
  background: #f0f0f0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background: #ff6b35;
  color: white;
}

.expert-cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.expert-cta a {
  flex: 1;
  min-width: 120px;
  padding: 10px 15px;
  background: #f0f0f0;
  color: #333;
  text-decoration: none;
  border-radius: 4px;
  font-size: 12px;
  text-align: center;
  transition: all 0.3s ease;
}

.expert-cta a:hover {
  background: #ff6b35;
  color: white;
}

/* 9. FAQ 区域 */
.faq-container {
  max-width: 600px;
  margin: 0 auto;
}

.faq-item {
  background: white;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.faq-question {
  padding: 20px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9fa;
  transition: background 0.3s ease;
  font-weight: 600;
  color: #1a1a1a;
}

.faq-question:hover {
  background: #f0f0f0;
}

.faq-toggle {
  font-size: 20px;
  transition: transform 0.3s ease;
}

.faq-item.active .faq-toggle {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  color: #666;
  line-height: 1.6;
}

.faq-item.active .faq-answer {
  padding: 20px;
  max-height: 500px;
}

/* 10. 评论区域 */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.review-card {
  background: white;
  border-radius: 8px;
  padding: 25px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.review-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.review-header {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

.review-avatar {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
  flex-shrink: 0;
}

.review-info {
  flex: 1;
}

.review-name {
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 5px;
}

.review-rating {
  color: #ff6b35;
  font-size: 14px;
}

.review-content {
  color: #666;
  line-height: 1.6;
  margin-bottom: 15px;
  font-size: 14px;
}

.review-footer {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #999;
}

/* 11. 品牌 Logo 墙 */
.brands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 20px;
}

.brand-item {
  background: white;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  cursor: pointer;
}

.brand-item:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.brand-logo {
  font-size: 48px;
  margin-bottom: 10px;
}

.brand-name {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 5px;
}

.brand-desc {
  font-size: 12px;
  color: #999;
}

/* 12. 底部 */
footer {
  background: #1a1a1a;
  color: white;
  padding: 40px 0 20px;
  margin-top: 60px;
}

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

.footer-section h3 {
  font-size: 16px;
  margin-bottom: 15px;
  color: #ff6b35;
}

.footer-section p,
.footer-section a {
  font-size: 14px;
  color: #ccc;
  text-decoration: none;
  line-height: 1.8;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: #ff6b35;
}

.footer-qr {
  display: flex;
  gap: 20px;
  margin-top: 15px;
}

.qr-code {
  width: 100px;
  height: 100px;
  background: white;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #333;
}

.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 20px;
  text-align: center;
  color: #999;
  font-size: 14px;
}

.footer-bottom p {
  margin: 5px 0;
}

/* 13. 面包屑导航 */
.breadcrumb {
  background: #f8f9fa;
  padding: 15px 0;
  font-size: 14px;
  color: #666;
  border-bottom: 1px solid #eee;
}

.breadcrumb a {
  color: #ff6b35;
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb a:hover {
  color: #ff8c5a;
}

.breadcrumb span {
  margin: 0 8px;
  color: #999;
}

/* 14. 动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* 15. 响应式设计 */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    gap: 15px;
  }

  nav ul {
    gap: 15px;
    justify-content: center;
  }

  .banner {
    height: 350px;
  }

  .banner h1 {
    font-size: 32px;
  }

  .banner p {
    font-size: 16px;
  }

  .section-title {
    font-size: 24px;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .search-box {
    flex-direction: column;
  }

  .search-box input,
  .search-box button {
    width: 100%;
  }

  .expert-cta {
    flex-direction: column;
  }

  .expert-cta a {
    min-width: auto;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .reviews-grid {
    grid-template-columns: 1fr;
  }

  .brands-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  .logo {
    font-size: 22px;
  }

  nav ul {
    gap: 10px;
  }

  nav a {
    font-size: 12px;
  }

  .banner {
    height: 250px;
  }

  .banner h1 {
    font-size: 24px;
  }

  .banner p {
    font-size: 14px;
  }

  .btn {
    padding: 12px 25px;
    font-size: 14px;
  }

  .section {
    padding: 40px 0;
  }

  .section-title {
    font-size: 20px;
  }

  .cards-grid {
    gap: 15px;
  }

  .card-image {
    height: 150px;
  }

  .brands-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 16. 性能优化 */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

video {
  max-width: 100%;
  height: auto;
}

/* 懒加载占位符 */
.lazy {
  background: #f0f0f0;
}

/* 无障碍访问 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.logo {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 48px;
  width: auto;
  display: block;
}

@media (max-width: 768px) {
  .logo-img {
    height: 40px;
  }
}
