/* ============================================
   仁舒网汽车影像社区 - 主样式表
   品牌色：深灰 #1a1a1a、红色 #e63946、金色 #ffd60a
   设计理念：工业感 + 现代科技感
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f8f9fa;
}

/* ============ 全局颜色变量 ============ */
:root {
  --primary: #e63946;
  --secondary: #1a1a1a;
  --accent: #ffd60a;
  --light: #f8f9fa;
  --dark: #1a1a1a;
  --text-primary: #1a1a1a;
  --text-secondary: #666;
  --border: #ddd;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
}

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

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

.logo {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 24px;
  color: white;
}

nav {
  display: flex;
  gap: 30px;
  align-items: center;
}

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

nav a:hover {
  color: var(--accent);
}

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

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

/* ============ 搜索框 ============ */
.search-container {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.1);
  border-radius: 25px;
  padding: 8px 15px;
  gap: 10px;
  transition: all 0.3s ease;
}

.search-container:hover {
  background: rgba(255,255,255,0.2);
}

.search-container input {
  background: transparent;
  border: none;
  color: white;
  width: 200px;
  font-size: 13px;
  outline: none;
}

.search-container input::placeholder {
  color: rgba(255,255,255,0.6);
}

.search-icon {
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  font-size: 16px;
}

/* ============ Banner 区域 ============ */
.banner {
  position: relative;
  height: 600px;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
}

.banner-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: white;
  max-width: 800px;
  animation: fadeInUp 0.8s ease-out;
}

.banner-content h1 {
  font-size: 56px;
  font-weight: 900;
  margin-bottom: 20px;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
  line-height: 1.2;
}

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

.banner-cta {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary) 0%, #ff5a6e 100%);
  color: white;
  padding: 15px 40px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(230,57,70,0.4);
}

.banner-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(230,57,70,0.6);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============ 容器与栅格 ============ */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
}

.section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  font-size: 42px;
  font-weight: 900;
  margin-bottom: 50px;
  color: var(--text-primary);
  position: relative;
  display: inline-block;
  width: 100%;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
}

.grid {
  display: grid;
  gap: 30px;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* ============ 卡片样式 ============ */
.card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  border: 1px solid var(--border);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.card-content {
  padding: 20px;
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.card-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============ 视频卡片（核心） ============ */
.video-card {
  position: relative;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16/9;
  cursor: pointer;
  group: 'video';
}

.video-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.video-card:hover img {
  transform: scale(1.05);
}

.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70px;
  height: 70px;
  background: rgba(230, 57, 70, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.video-card:hover .video-play-btn {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
}

.video-play-btn::after {
  content: '▶';
  color: white;
  font-size: 28px;
  margin-left: 4px;
}

.video-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.8) 100%);
  padding: 20px;
  color: white;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.video-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 5px;
}

.video-stats {
  font-size: 12px;
  color: rgba(255,255,255,0.8);
}

/* ============ 模块背景 ============ */
.section-media {
  background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 100%);
}

.section-community {
  background: white;
}

.section-ai {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  color: white;
}

.section-ai .section-title {
  color: white;
}

.section-ai .section-title::after {
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

/* ============ 按钮 ============ */
.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #ff5a6e 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(230,57,70,0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(230,57,70,0.5);
}

.btn-secondary {
  background: white;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-secondary:hover {
  background: var(--primary);
  color: white;
}

.btn-accent {
  background: var(--accent);
  color: var(--dark);
}

.btn-accent:hover {
  background: #ffc300;
}

/* ============ FAQ 区域 ============ */
.faq-item {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
}

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

.faq-question:hover {
  background: #f0f0f0;
  color: var(--primary);
}

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

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

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 20px;
  color: var(--text-secondary);
}

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

/* ============ 评论区域 ============ */
.review-item {
  background: white;
  padding: 25px;
  border-radius: 12px;
  border-left: 4px solid var(--primary);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.review-item:hover {
  box-shadow: var(--shadow-lg);
  transform: translateX(5px);
}

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

.review-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 20px;
}

.review-name {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 16px;
}

.review-role {
  font-size: 13px;
  color: var(--text-secondary);
}

.review-rating {
  color: var(--accent);
  font-size: 14px;
  margin-bottom: 10px;
}

.review-text {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 14px;
}

/* ============ 专家展示 ============ */
.expert-card {
  text-align: center;
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.expert-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.expert-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 20px;
  object-fit: cover;
  border: 4px solid var(--primary);
}

.expert-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 5px;
  color: var(--text-primary);
}

.expert-title {
  font-size: 14px;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 15px;
}

.expert-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.6;
}

.expert-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.expert-actions a {
  font-size: 12px;
  padding: 8px 16px;
  border-radius: 20px;
  text-decoration: none;
  transition: all 0.3s ease;
}

/* ============ 联系我们 ============ */
.contact-section {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  color: white;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
}

.contact-item h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--accent);
}

.contact-item p {
  font-size: 14px;
  line-height: 1.8;
  color: rgba(255,255,255,0.8);
  margin-bottom: 10px;
}

.contact-item a {
  color: var(--accent);
  text-decoration: none;
  transition: all 0.3s ease;
}

.contact-item a:hover {
  color: white;
  text-decoration: underline;
}

/* ============ 底部 ============ */
footer {
  background: #0a0a0a;
  color: rgba(255,255,255,0.7);
  padding: 40px 0 20px;
  font-size: 13px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

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

.footer-section h4 {
  color: white;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 15px;
}

.footer-section a {
  display: block;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

.footer-section a:hover {
  color: var(--accent);
  margin-left: 5px;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.qr-codes {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 20px;
}

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

.qr-item img {
  width: 100px;
  height: 100px;
  margin-bottom: 10px;
  border-radius: 8px;
}

.qr-item p {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
}

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

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

  .search-container {
    width: 100%;
    max-width: 300px;
  }

  .search-container input {
    width: 100%;
  }

  .banner {
    height: 400px;
  }

  .banner-content h1 {
    font-size: 36px;
  }

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

  .container {
    padding: 0 20px;
  }

  .section {
    padding: 50px 0;
  }

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

  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    gap: 20px;
  }

  .qr-codes {
    gap: 20px;
  }

  .qr-item img {
    width: 80px;
    height: 80px;
  }
}

@media (max-width: 480px) {
  .banner-content h1 {
    font-size: 28px;
  }

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

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

  .card-title {
    font-size: 16px;
  }

  nav {
    gap: 10px;
  }

  nav a {
    font-size: 12px;
  }
}

/* ============ 动画与过渡 ============ */
.fade-in {
  animation: fadeIn 0.6s ease-out;
}

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

.slide-in-left {
  animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-in-right {
  animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ============ 工具类 ============ */
.text-center {
  text-align: center;
}

.mt-20 {
  margin-top: 20px;
}

.mb-20 {
  margin-bottom: 20px;
}

.mt-40 {
  margin-top: 40px;
}

.mb-40 {
  margin-bottom: 40px;
}

.hidden {
  display: none !important;
}

.visible {
  display: block !important;
}
