/* ============================================
   91修车改装视频社区 - 全局样式表
   原创设计 | 修车改装主题 | SEO友好
   ============================================ */

/* 重置与基础 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Segoe UI', 'Microsoft YaHei', 'SimHei', sans-serif;
  line-height: 1.6;
  color: #2c3e50;
  background-color: #f8f9fa;
  overflow-x: hidden;
}

/* 颜色系统 */
:root {
  --primary-color: #d32f2f;
  --primary-dark: #b71c1c;
  --primary-light: #ef5350;
  --secondary-color: #1a237e;
  --secondary-light: #3f51b5;
  --accent-color: #ff6f00;
  --accent-light: #ffb74d;
  --text-dark: #1a1a1a;
  --text-light: #666666;
  --border-color: #e0e0e0;
  --bg-light: #f5f5f5;
  --bg-white: #ffffff;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.2);
}

/* 排版系统 */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

h1 {
  font-size: 2.5rem;
  letter-spacing: -0.5px;
}

h2 {
  font-size: 2rem;
  letter-spacing: -0.3px;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.1rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--primary-dark);
}

/* 容器与布局 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: -10px;
}

.col {
  flex: 1;
  min-width: 250px;
  padding: 10px;
}

.col-2 {
  flex: 0 0 calc(50% - 20px);
}

.col-3 {
  flex: 0 0 calc(33.333% - 20px);
}

.col-4 {
  flex: 0 0 calc(25% - 20px);
}

/* 头部导航 */
header {
  background-color: var(--bg-white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-color);
}

.logo {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img {
  height: 40px;
  width: auto;
}

.search-box {
  flex: 1;
  max-width: 400px;
  margin: 0 30px;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.95rem;
  transition: border-color 0.3s ease;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}

.search-box button {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  font-size: 1.1rem;
}

/* 导航菜单 */
nav {
  display: flex;
  gap: 0;
  overflow-x: auto;
  padding: 0 20px;
}

nav a {
  padding: 15px 20px;
  color: var(--text-dark);
  font-weight: 500;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
  white-space: nowrap;
}

nav a:hover,
nav a.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

/* Banner区域 */
.banner {
  position: relative;
  height: 500px;
  background: linear-gradient(135deg, #1a237e 0%, #d32f2f 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
}

.banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="1200" height="600" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
}

.banner-bg-image {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.4;
  z-index: 1;
}

.banner-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.banner h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
  color: white;
}

.banner p {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  text-shadow: 0 1px 5px rgba(0,0,0,0.3);
  color: rgba(255,255,255,0.95);
}

.banner-btn {
  display: inline-block;
  padding: 12px 30px;
  background-color: var(--accent-color);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
}

.banner-btn:hover {
  background-color: #e65100;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* 内容区块 */
section {
  padding: 60px 20px;
}

section h2 {
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  padding-bottom: 20px;
}

section h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

/* 卡片样式 */
.card {
  background-color: var(--bg-white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

.card-image {
  width: 100%;
  height: 200px;
  background-color: var(--bg-light);
  overflow: hidden;
  position: relative;
}

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

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

.card-body {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-dark);
}

.card-text {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 15px;
  flex-grow: 1;
}

.card-meta {
  display: flex;
  gap: 15px;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 15px;
}

.card-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* 视频卡片 */
.video-card {
  position: relative;
  background-color: #000;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

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

.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background-color: rgba(211, 47, 47, 0.9);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 10;
}

.video-card:hover .video-play-btn {
  opacity: 1;
  background-color: var(--primary-color);
}

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

/* 按钮样式 */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  text-decoration: none;
}

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

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

.btn-secondary:hover {
  background-color: #0d1b5e;
}

.btn-outline {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

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

/* 标签 */
.tag {
  display: inline-block;
  padding: 4px 12px;
  background-color: var(--bg-light);
  color: var(--text-dark);
  border-radius: 20px;
  font-size: 0.8rem;
  margin-right: 8px;
  margin-bottom: 8px;
}

.tag-primary {
  background-color: rgba(211, 47, 47, 0.1);
  color: var(--primary-color);
}

/* FAQ区块 */
.faq-item {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

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

.faq-question:hover {
  background-color: var(--bg-light);
}

.faq-toggle {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-weight: bold;
  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: var(--text-light);
}

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

/* 用户评价 */
.review {
  background-color: var(--bg-white);
  padding: 25px;
  border-radius: 8px;
  border-left: 4px solid var(--primary-color);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

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

.review-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
}

.review-info h4 {
  margin: 0;
  font-size: 1rem;
}

.review-rating {
  color: #ffc107;
  font-size: 0.9rem;
}

.review-text {
  color: var(--text-light);
  line-height: 1.8;
  font-style: italic;
}

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

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

.expert-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 20px;
  background-color: var(--bg-light);
  overflow: hidden;
}

.expert-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.expert-name {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 5px;
}

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

.expert-bio {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

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

/* 合作品牌 */
.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100px;
  background-color: var(--bg-white);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.brand-logo:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

.brand-logo img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
}

/* 页脚 */
footer {
  background-color: var(--secondary-color);
  color: white;
  padding: 40px 20px 20px;
  margin-top: 60px;
}

footer h3 {
  color: white;
  margin-bottom: 15px;
}

footer a {
  color: rgba(255, 255, 255, 0.8);
}

footer a:hover {
  color: white;
}

.footer-section {
  margin-bottom: 30px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links a {
  display: block;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.qr-codes {
  display: flex;
  gap: 30px;
  justify-content: center;
  margin: 20px 0;
  flex-wrap: wrap;
}

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

.qr-item img {
  width: 120px;
  height: 120px;
  border: 2px solid white;
  border-radius: 4px;
}

.qr-label {
  margin-top: 10px;
  font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .banner {
    height: 350px;
  }

  .banner h1 {
    font-size: 1.8rem;
  }

  .banner p {
    font-size: 1rem;
  }

  .col-2,
  .col-3,
  .col-4 {
    flex: 0 0 calc(100% - 20px) !important;
  }

  nav {
    overflow-x: auto;
  }

  nav a {
    padding: 12px 15px;
    font-size: 0.9rem;
  }

  .search-box {
    max-width: 100%;
    margin: 10px 0;
  }

  .header-top {
    flex-direction: column;
    gap: 15px;
  }

  section {
    padding: 40px 15px;
  }

  .expert-card {
    padding: 20px;
  }

  .qr-codes {
    gap: 15px;
  }

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

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  .banner {
    height: 250px;
  }

  .banner h1 {
    font-size: 1.5rem;
  }

  .banner p {
    font-size: 0.9rem;
  }

  nav a {
    padding: 10px 12px;
    font-size: 0.85rem;
  }

  .card-meta {
    flex-direction: column;
    gap: 5px;
  }

  .btn {
    width: 100%;
  }

  .row {
    margin: -5px;
  }

  .col {
    padding: 5px;
  }
}

/* 动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

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

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

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

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.pt-1 { padding-top: 0.5rem; }
.pt-2 { padding-top: 1rem; }
.pt-3 { padding-top: 1.5rem; }
.pt-4 { padding-top: 2rem; }

.pb-1 { padding-bottom: 0.5rem; }
.pb-2 { padding-bottom: 1rem; }
.pb-3 { padding-bottom: 1.5rem; }
.pb-4 { padding-bottom: 2rem; }

.hidden {
  display: none;
}

.visible {
  display: block;
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.grid {
  display: grid;
}

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }
