/* 天行体育 - 完整样式表 */

/* ===== CSS变量 (亮色模式) ===== */
:root {
  --primary: #0b2b5e;
  --primary-light: #1a4a8a;
  --primary-dark: #061a3a;
  --accent: #e63946;
  --accent-light: #ff6b6b;
  --secondary: #2a9d8f;
  --secondary-light: #3fc1b0;
  --bg: #ffffff;
  --bg-alt: #f5f7fa;
  --bg-card: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.6);
  --text: #1a1a2e;
  --text-muted: #4a4a6a;
  --text-light: #8888aa;
  --border: #e0e4ec;
  --shadow: rgba(11, 43, 94, 0.08);
  --shadow-hover: rgba(11, 43, 94, 0.15);
  --radius: 16px;
  --radius-sm: 8px;
  --radius-lg: 24px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  --max-width: 1200px;
  --header-height: 72px;
}

/* ===== 暗色模式 ===== */
body.dark-mode {
  --primary: #1a4a8a;
  --primary-light: #2a6ab0;
  --primary-dark: #0b2b5e;
  --accent: #ff6b6b;
  --accent-light: #ff8a8a;
  --secondary: #3fc1b0;
  --secondary-light: #5dd4c4;
  --bg: #0f0f23;
  --bg-alt: #1a1a35;
  --bg-card: #1e1e3a;
  --bg-glass: rgba(30, 30, 58, 0.7);
  --text: #e8e8f0;
  --text-muted: #a0a0c0;
  --text-light: #707090;
  --border: #2a2a50;
  --shadow: rgba(0, 0, 0, 0.3);
  --shadow-hover: rgba(0, 0, 0, 0.5);
}

/* ===== 基础重置 ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color var(--transition);
}

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

img, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  font-weight: 700;
}

h2 {
  font-size: 2.2rem;
  margin-bottom: 2rem;
  text-align: center;
  position: relative;
  padding-bottom: 1rem;
}

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

section {
  padding: 5rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ===== 按钮 ===== */
.btn-primary {
  display: inline-block;
  padding: 0.9rem 2.2rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 15px var(--shadow);
  text-decoration: none;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px var(--shadow-hover);
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: #fff;
}

/* ===== 头部导航 ===== */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
  transition: background var(--transition), border-color var(--transition);
}

nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.brand-icon {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.nav-links a {
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  transition: all var(--transition);
  position: relative;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: var(--primary);
  color: #fff;
}

.search-toggle,
.dark-mode-toggle {
  background: none;
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--text);
  transition: all var(--transition);
  font-family: var(--font);
}

.search-toggle:hover,
.dark-mode-toggle:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ===== Hero Banner ===== */
#hero {
  padding: 0;
  max-width: 100%;
  margin-top: var(--header-height);
}

.hero-banner {
  position: relative;
  height: 85vh;
  min-height: 500px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary), var(--primary-light));
}

.slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  opacity: 0;
  transition: opacity 0.8s ease;
  color: #fff;
}

.slide.active {
  opacity: 1;
}

.slide h1 {
  font-size: clamp(2rem, 6vw, 4rem);
  margin-bottom: 1rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
  animation: fadeInUp 0.8s ease;
}

.slide p {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  margin-bottom: 2rem;
  opacity: 0.9;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.slide .btn-primary {
  animation: fadeInUp 0.8s ease 0.4s both;
  background: #fff;
  color: var(--primary);
  font-weight: 700;
}

.slide .btn-primary:hover {
  background: var(--accent);
  color: #fff;
}

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

.banner-controls {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.8rem;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
}

.dot.active {
  background: #fff;
  border-color: var(--accent);
  transform: scale(1.2);
}

.dot:hover {
  background: rgba(255,255,255,0.8);
}

/* ===== 关于我们 ===== */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.about-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 4px 20px var(--shadow);
  border: 1px solid var(--border);
  transition: all var(--transition);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.about-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px var(--shadow-hover);
  border-color: var(--primary-light);
}

.about-card h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.about-card p {
  color: var(--text-muted);
  line-height: 1.8;
}

/* ===== 产品中心 ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 4px 20px var(--shadow);
  border: 1px solid var(--border);
  transition: all var(--transition);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.product-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 40px var(--shadow-hover);
}

.product-image {
  margin-bottom: 1.2rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: transform var(--transition);
}

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

.product-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
  color: var(--primary);
}

.product-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ===== 解决方案 ===== */
.solutions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.solution-card {
  background: linear-gradient(135deg, var(--bg-card), var(--bg-alt));
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid var(--border);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.solution-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.solution-card:hover::before {
  transform: scaleX(1);
}

.solution-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px var(--shadow-hover);
}

.solution-card h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.solution-card p {
  color: var(--text-muted);
  line-height: 1.7;
}

/* ===== 案例展示 ===== */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.case-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 20px var(--shadow);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.case-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px var(--shadow-hover);
}

.case-image {
  overflow: hidden;
  transition: transform var(--transition);
}

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

.case-card h3 {
  padding: 1.2rem 1.5rem 0.5rem;
  font-size: 1.2rem;
  color: var(--primary);
}

.case-card p {
  padding: 0 1.5rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===== 合作伙伴 ===== */
.partner-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.partner {
  padding: 0.8rem 1.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.partner:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--shadow);
}

/* ===== 客户评价 ===== */
.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.review-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px var(--shadow);
  transition: all var(--transition);
  position: relative;
}

.review-card::before {
  content: '"';
  font-size: 4rem;
  position: absolute;
  top: 0.5rem;
  left: 1rem;
  color: var(--primary);
  opacity: 0.15;
  line-height: 1;
}

.review-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px var(--shadow-hover);
}

.review-card p {
  font-style: italic;
  margin-bottom: 1rem;
  line-height: 1.7;
  color: var(--text);
}

.review-card footer {
  color: var(--text-light);
  font-size: 0.85rem;
  font-weight: 500;
}

/* ===== 新闻资讯 ===== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.news-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px var(--shadow-hover);
  border-color: var(--primary-light);
}

.news-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
  color: var(--primary);
}

.news-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.news-card time {
  font-size: 0.8rem;
  color: var(--text-light);
}

.related-articles {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 2rem;
  margin-top: 2rem;
}

.related-articles h3 {
  margin-bottom: 1rem;
  color: var(--primary);
}

.related-articles ul li {
  margin-bottom: 0.5rem;
}

.related-articles a {
  color: var(--text-muted);
  transition: color var(--transition);
  padding: 0.3rem 0;
  display: inline-block;
}

.related-articles a:hover {
  color: var(--accent);
  padding-left: 0.5rem;
}

/* ===== FAQ ===== */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.8rem;
  overflow: hidden;
  transition: all var(--transition);
}

.faq-item:hover {
  border-color: var(--primary-light);
}

.faq-question {
  width: 100%;
  padding: 1.2rem 1.5rem;
  background: var(--bg-card);
  border: none;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  transition: all var(--transition);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font);
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  transition: transform var(--transition);
}

.faq-question[aria-expanded="true"]::after {
  transform: rotate(45deg);
}

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

.faq-answer {
  padding: 0 1.5rem 1.2rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.faq-answer[hidden] {
  display: none;
}

/* ===== HowTo ===== */
.howto-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.step {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
  text-align: center;
  transition: all var(--transition);
  position: relative;
}

.step:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px var(--shadow-hover);
}

.step h3 {
  color: var(--primary);
  margin-bottom: 0.8rem;
  font-size: 1.1rem;
}

.step p {
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===== 联系我们 ===== */
.contact-info {
  max-width: 600px;
  margin: 0 auto;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px var(--shadow);
}

.contact-info p {
  margin-bottom: 0.8rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.contact-info strong {
  color: var(--primary);
}

/* ===== 友情链接 & 网站地图 ===== */
#related-sites ul,
#sitemap ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
}

#related-sites a,
#sitemap a {
  padding: 0.5rem 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: all var(--transition);
}

#related-sites a:hover,
#sitemap a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* ===== Footer ===== */
footer {
  background: var(--primary-dark);
  color: #fff;
  padding: 3rem 1.5rem;
  margin-top: 2rem;
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.footer-brand {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #fff, var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-info p {
  margin-bottom: 0.5rem;
  opacity: 0.8;
  font-size: 0.85rem;
  line-height: 1.6;
}

.footer-info a {
  color: var(--accent-light);
  opacity: 0.9;
}

.footer-info a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* ===== 返回顶部 ===== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  font-size: 0.8rem;
  cursor: pointer;
  box-shadow: 0 4px 15px var(--shadow);
  transition: all var(--transition);
  display: none;
  z-index: 999;
  font-family: var(--font);
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px var(--shadow-hover);
  background: var(--accent);
}

/* ===== 滚动动画 (Intersection Observer 配合) ===== */
.about-card,
.product-card,
.solution-card,
.case-card,
.review-card,
.news-card,
.step {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s ease forwards;
}

.about-card:nth-child(1),
.product-card:nth-child(1),
.solution-card:nth-child(1),
.case-card:nth-child(1),
.review-card:nth-child(1),
.news-card:nth-child(1),
.step:nth-child(1) { animation-delay: 0.1s; }

.about-card:nth-child(2),
.product-card:nth-child(2),
.solution-card:nth-child(2),
.case-card:nth-child(2),
.review-card:nth-child(2),
.news-card:nth-child(2),
.step:nth-child(2) { animation-delay: 0.2s; }

.about-card:nth-child(3),
.product-card:nth-child(3),
.solution-card:nth-child(3),
.case-card:nth-child(3),
.review-card:nth-child(3),
.news-card:nth-child(3),
.step:nth-child(3) { animation-delay: 0.3s; }

.about-card:nth-child(4),
.product-card:nth-child(4),
.solution-card:nth-child(4),
.case-card:nth-child(4),
.review-card:nth-child(4),
.news-card:nth-child(4),
.step:nth-child(4) { animation-delay: 0.4s; }

/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
  section {
    padding: 4rem 1.5rem;
  }

  h2 {
    font-size: 1.8rem;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 60px;
  }

  section {
    padding: 3rem 1rem;
  }

  h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 1rem;
    gap: 0.3rem;
    transform: translateY(-100%);
    opacity: 0;
    transition: all var(--transition);
    border-bottom: 1px solid var(--border);
    pointer-events: none;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav-links a {
    width: 100%;
    text-align: center;
    padding: 0.8rem;
  }

  .search-toggle,
  .dark-mode-toggle {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }

  .hero-banner {
    height: 70vh;
    min-height: 400px;
  }

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

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

  .about-grid,
  .product-grid,
  .solutions-grid,
  .cases-grid,
  .review-grid,
  .news-grid {
    grid-template-columns: 1fr;
  }

  .partner-logos {
    gap: 0.5rem;
  }

  .partner {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }

  .contact-info {
    padding: 1.5rem;
  }

  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    font-size: 0.7rem;
  }

  .faq-question {
    font-size: 0.9rem;
    padding: 1rem;
  }

  .faq-answer {
    padding: 0 1rem 1rem;
  }

  .howto-steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero-banner {
    height: 60vh;
    min-height: 350px;
  }

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

  .slide .btn-primary {
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
  }

  .brand-icon {
    font-size: 1.2rem;
  }
}

/* ===== 暗色模式额外调整 ===== */
body.dark-mode .slide .btn-primary {
  background: var(--accent);
  color: #fff;
}

body.dark-mode .slide .btn-primary:hover {
  background: #fff;
  color: var(--primary);
}

body.dark-mode .faq-question {
  background: var(--bg-card);
}

body.dark-mode .faq-question:hover {
  background: var(--bg-alt);
}

body.dark-mode .partner {
  background: var(--bg-card);
}

body.dark-mode .partner:hover {
  background: var(--primary);
  color: #fff;
}

/* ===== 打印样式 ===== */
@media print {
  header,
  .back-to-top,
  .search-toggle,
  .dark-mode-toggle,
  .banner-controls {
    display: none !important;
  }

  section {
    padding: 2rem 0;
    page-break-inside: avoid;
  }

  .hero-banner {
    height: auto;
    min-height: auto;
    padding: 3rem 1rem;
    background: var(--primary) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .slide {
    position: relative;
    opacity: 1 !important;
  }

  .slide:not(.active) {
    display: none;
  }
}

/* ===== 性能优化：减少重排 ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== 滚动条美化 ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-alt);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}