/* style.css - 保定靖银商贸有限公司 */
/* 全局重置与基础 */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #1a3c5e;
  --primary-light: #2a5a7a;
  --accent: #f39c12;
  --accent-hover: #e67e22;
  --bg: #f9fafb;
  --card-bg: rgba(255,255,255,0.85);
  --text: #2c3e50;
  --text-light: #5a6b7a;
  --border: #e0e0e0;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --glass-bg: rgba(255,255,255,0.2);
  --glass-border: rgba(255,255,255,0.3);
  --glass-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

/* 暗色模式 */
@media (prefers-color-scheme: dark) {
  :root {
    --primary: #0f2a44;
    --primary-light: #1a3c5e;
    --bg: #121820;
    --card-bg: rgba(30, 40, 50, 0.85);
    --text: #e8edf2;
    --text-light: #a0b0c0;
    --border: #2a3a4a;
    --shadow: 0 4px 20px rgba(0,0,0,0.4);
    --glass-bg: rgba(30,40,50,0.25);
    --glass-border: rgba(255,255,255,0.1);
  }
}

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

body {
  font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
}

/* 导航栏 - 毛玻璃效果 */
nav {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: background var(--transition);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  height: 68px;
}

.logo {
  color: var(--primary);
  font-size: 1.5rem;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 1px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: transform var(--transition);
}

.logo:hover {
  transform: scale(1.02);
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 4px;
}

.nav-menu a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 8px 16px;
  border-radius: 30px;
  transition: all var(--transition);
  font-weight: 500;
  position: relative;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60%;
  height: 2px;
  background: var(--accent);
  transition: transform var(--transition);
}

.nav-menu a:hover {
  background: rgba(243, 156, 18, 0.1);
  color: var(--accent);
}

.nav-menu a:hover::after {
  transform: translateX(-50%) scaleX(1);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--text);
  padding: 4px;
  transition: transform var(--transition);
}

.menu-toggle:hover {
  transform: rotate(90deg);
}

/* Hero 区域 - 渐变Banner */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, #2d6a4f 100%);
  color: white;
  text-align: center;
  padding: 100px 24px 80px;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(243,156,18,0.08) 0%, transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(45,106,79,0.1) 0%, transparent 50%);
  animation: heroGlow 15s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(20px, -20px) rotate(5deg); }
}

.hero-slider {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 800px;
}

.slide {
  display: none;
  animation: slideFade 0.6s ease;
}

.slide.active {
  display: block;
}

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

.slide h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 16px;
  font-weight: 800;
  line-height: 1.2;
  text-shadow: 0 2px 20px rgba(0,0,0,0.2);
}

.slide p {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  margin-bottom: 32px;
  opacity: 0.9;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: white;
  padding: 14px 36px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  transition: all var(--transition);
  box-shadow: 0 4px 15px rgba(243,156,18,0.3);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 30px rgba(243,156,18,0.4);
}

.btn:hover::before {
  left: 100%;
}

.slider-controls {
  margin-top: 32px;
  display: flex;
  gap: 12px;
  z-index: 1;
  position: relative;
}

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

.dot.active {
  background: white;
  border-color: var(--accent);
  transform: scale(1.2);
  box-shadow: 0 0 20px rgba(243,156,18,0.4);
}

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

/* 主内容区 */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px;
}

section {
  margin-bottom: 80px;
  opacity: 0;
  transform: translateY(40px);
  animation: sectionFadeIn 0.8s ease forwards;
}

@keyframes sectionFadeIn {
  to { opacity: 1; transform: translateY(0); }
}

section:nth-child(1) { animation-delay: 0.1s; }
section:nth-child(2) { animation-delay: 0.2s; }
section:nth-child(3) { animation-delay: 0.3s; }
section:nth-child(4) { animation-delay: 0.4s; }
section:nth-child(5) { animation-delay: 0.5s; }
section:nth-child(6) { animation-delay: 0.6s; }
section:nth-child(7) { animation-delay: 0.7s; }
section:nth-child(8) { animation-delay: 0.8s; }
section:nth-child(9) { animation-delay: 0.9s; }

h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--primary);
  position: relative;
  display: inline-block;
  margin-bottom: 28px;
  padding-bottom: 8px;
  font-weight: 700;
}

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

h3 {
  font-size: 1.25rem;
  color: var(--text);
  margin-top: 24px;
  margin-bottom: 12px;
  font-weight: 600;
}

p {
  margin-bottom: 16px;
  font-size: 1rem;
  color: var(--text-light);
  line-height: 1.8;
}

ul, ol {
  margin-left: 24px;
  margin-bottom: 20px;
  color: var(--text-light);
}

li {
  margin-bottom: 8px;
}

/* 产品网格 - 圆角卡片 + 毛玻璃 */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

.product-item {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  border: 1px solid var(--glass-border);
  transform: translateY(0);
}

.product-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
  border-color: var(--accent);
}

.product-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform var(--transition);
}

.product-item:hover img {
  transform: scale(1.05);
}

.product-item h3 {
  padding: 16px 20px 4px;
  font-size: 1.2rem;
  color: var(--primary);
}

.product-item p {
  padding: 0 20px 20px;
  font-size: 0.95rem;
}

/* 案例卡片 */
.case-item {
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-sm);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--glass-border);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.case-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent), var(--accent-hover));
  opacity: 0;
  transition: opacity var(--transition);
}

.case-item:hover {
  transform: translateX(8px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.case-item:hover::before {
  opacity: 1;
}

.case-item h3 {
  margin-top: 0;
  color: var(--primary);
}

/* FAQ 区域 */
.faq-item {
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: all var(--transition);
  background: var(--card-bg);
  backdrop-filter: blur(6px);
}

.faq-item:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(243,156,18,0.1);
}

.faq-item h3 {
  cursor: pointer;
  padding: 18px 24px;
  margin: 0;
  font-size: 1rem;
  position: relative;
  padding-right: 48px;
  transition: background var(--transition);
  user-select: none;
}

.faq-item h3::after {
  content: '+';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  color: var(--accent);
  transition: transform var(--transition);
}

.faq-item.active h3::after {
  transform: translateY(-50%) rotate(45deg);
}

.faq-item h3:hover {
  background: rgba(243,156,18,0.05);
}

.faq-item p {
  display: none;
  padding: 0 24px 18px;
  margin: 0;
  animation: faqSlide 0.3s ease;
}

@keyframes faqSlide {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.faq-item.active p {
  display: block;
}

/* HowTo 区域 */
#howto h3 {
  color: var(--primary);
  border-left: 4px solid var(--accent);
  padding-left: 16px;
  margin-top: 32px;
}

#howto ol, #howto ul {
  background: var(--card-bg);
  padding: 20px 20px 20px 48px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

/* 联系我们 */
#contact p {
  font-size: 1.05rem;
  padding: 6px 0;
}

#contact strong {
  color: var(--primary);
  font-size: 1.2rem;
}

/* 页脚 */
footer {
  background: linear-gradient(135deg, var(--primary), #0f2a44);
  color: white;
  padding: 60px 24px 30px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), transparent, var(--accent));
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 80px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.footer-links div {
  min-width: 160px;
}

.footer-links h4 {
  margin-bottom: 16px;
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 600;
  position: relative;
  display: inline-block;
}

.footer-links h4::after {
  content: '';
  display: block;
  width: 30px;
  height: 2px;
  background: var(--accent);
  margin-top: 6px;
}

.footer-links ul {
  list-style: none;
  margin: 0;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: all var(--transition);
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: white;
  padding-left: 6px;
}

.copyright, .legal, .update-time {
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
}

.legal a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  margin: 0 12px;
  transition: color var(--transition);
}

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

/* 返回顶部按钮 - 毛玻璃 */
#back-to-top {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--text);
  border: 1px solid var(--glass-border);
  font-size: 1.6rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--glass-shadow);
  transition: all var(--transition);
  z-index: 999;
}

#back-to-top.show {
  display: flex;
  animation: backBtnIn 0.4s ease;
}

@keyframes backBtnIn {
  from { opacity: 0; transform: translateY(20px) scale(0.8); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

#back-to-top:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 30px rgba(243,156,18,0.3);
}

/* 响应式布局 */
@media (max-width: 1024px) {
  .nav-inner {
    padding: 0 16px;
  }
  
  .footer-links {
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
    flex-direction: column;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: absolute;
    top: 68px;
    left: 0;
    width: 100%;
    padding: 20px;
    gap: 8px;
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
  }

  .nav-menu.open {
    display: flex;
    animation: menuSlide 0.3s ease;
  }

  @keyframes menuSlide {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .nav-menu a {
    padding: 12px 20px;
    font-size: 1rem;
  }

  .menu-toggle {
    display: block;
  }

  .hero {
    padding: 60px 16px 50px;
    min-height: 400px;
  }

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

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

  main {
    padding: 40px 16px;
  }

  section {
    margin-bottom: 50px;
  }

  .product-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .product-item img {
    height: 180px;
  }

  .footer-links {
    flex-direction: column;
    gap: 32px;
    align-items: center;
  }

  #back-to-top {
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  .nav-inner {
    height: 60px;
  }

  .logo {
    font-size: 1.2rem;
  }

  .hero {
    padding: 40px 12px 36px;
    min-height: 320px;
  }

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

  .btn {
    padding: 12px 28px;
    font-size: 0.95rem;
  }

  .product-item {
    border-radius: var(--radius-sm);
  }

  .case-item {
    padding: 20px;
  }

  .faq-item h3 {
    padding: 14px 40px 14px 16px;
    font-size: 0.95rem;
  }
}

/* 滚动动画支持（IntersectionObserver 备用） */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  section {
    opacity: 1;
    transform: none;
  }
}

/* 暗色模式下的微调 */
@media (prefers-color-scheme: dark) {
  .product-item, .case-item, .faq-item, #howto ol, #howto ul {
    border-color: var(--border);
  }
  
  .btn {
    box-shadow: 0 4px 20px rgba(243,156,18,0.2);
  }
  
  .nav-menu a:hover {
    background: rgba(243,156,18,0.15);
  }
}