/* ==========================================================================
   Pixel Intelligence (像素智能) - Core Stylesheet
   ========================================================================== */

/* Design Tokens & Theme Variables */
:root {
  --primary-color: #289048;       /* VI Green */
  --primary-dark: #1e7037;        /* VI Green Hover */
  --primary-light: #e9f6ed;       /* VI Green Tint */
  --primary-glow: rgba(40, 144, 72, 0.15);
  
  --dark-color: #111418;          /* Charcoal Black */
  --dark-light: #1c2026;          /* Secondary Dark */
  --text-color: #333a42;          /* Body text color */
  --text-light: #6c7784;          /* Secondary text color */
  --bg-light: #f7f9fa;            /* Light gray bg */
  --bg-white: #ffffff;
  
  --border-color: #e6e9ed;
  --border-focus: #289048;
  
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
  
  --header-height-large: 90px;
  --header-height-small: 65px;
  
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.04);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.06);
  --shadow-lg: 0 16px 40px rgba(0,0,0,0.1);
  --shadow-hover: 0 20px 48px rgba(40, 144, 72, 0.12);
  
  --border-radius-sm: 6px;
  --border-radius-md: 12px;
  --border-radius-lg: 20px;
  --border-radius-xl: 30px;
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-white);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
  padding-top: var(--header-height-large);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  outline: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

/* Typography Utility */
h1, h2, h3, h4, h5, h6 {
  color: var(--dark-color);
  font-weight: 700;
  line-height: 1.25;
}

/* Section Title Utility */
.section-title-container {
  text-align: center;
  margin-bottom: 50px;
}
.section-title {
  font-size: 2.2rem;
  color: var(--dark-color);
  margin-bottom: 10px;
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background-color: var(--primary-color);
  border-radius: 2px;
}
.section-subtitle {
  font-size: 1rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Layout Grid Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

.grid {
  display: grid;
  gap: 30px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Common Layout Sections */
section {
  padding: 80px 0;
}
.bg-light-sec {
  background-color: var(--bg-light);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  transition: all var(--transition-normal);
  gap: 8px;
}
.btn-primary {
  background-color: var(--primary-color);
  color: var(--bg-white);
  box-shadow: 0 4px 14px rgba(40, 144, 72, 0.3);
}
.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(40, 144, 72, 0.4);
}
.btn-secondary {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}
.btn-secondary:hover {
  background-color: var(--primary-light);
  transform: translateY(-2px);
}
.slider-section .btn-secondary:hover {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: #ffffff !important;
  transform: translateY(-2px);
}
.btn-white {
  background-color: var(--bg-white);
  color: var(--primary-color);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}
.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

/* Header & Navigation Styles */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height-large);
  background-color: #222222;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 1000;
  transition: height var(--transition-normal), background-color var(--transition-normal), box-shadow var(--transition-normal);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
}
.logo img {
  max-height: 44px;
  width: auto;
  display: block;
  transition: max-height var(--transition-normal);
}

nav {
  display: flex;
  align-items: center;
  gap: 40px;
}
.nav-link {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  position: relative;
  padding: 8px 0;
}
.nav-link:hover {
  color: var(--primary-color);
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width var(--transition-normal);
}
.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}
.nav-link.active {
  color: var(--primary-color);
  font-weight: 600;
}

/* Scroll-driven Shrinking Header (CSS Native) */
@supports ((animation-timeline: scroll()) and (animation-range: 0% 100%)) {
  @keyframes shrink-header {
    to {
      height: var(--header-height-small);
      background-color: #222222;
      box-shadow: var(--shadow-sm);
    }
  }
  @keyframes shrink-logo {
    to {
      max-height: 34px;
    }
  }
  header {
    animation: shrink-header auto linear both;
    animation-timeline: scroll(block root);
    animation-range: 0px 100px;
  }
  .logo img {
    animation: shrink-logo auto linear both;
    animation-timeline: scroll(block root);
    animation-range: 0px 100px;
  }
}

/* Non-support JS Class Hook for shrinking */
header.scrolled {
  height: var(--header-height-small);
  background-color: #222222;
  box-shadow: var(--shadow-sm);
}
header.scrolled .logo img {
  max-height: 34px;
}

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  z-index: 1100;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: #ffffff;
  border-radius: 1px;
  transition: all var(--transition-normal);
}

/* Interactive Overlay / Menu for Mobile */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 320px;
  height: 100vh;
  background-color: var(--bg-white);
  box-shadow: -10px 0 30px rgba(0,0,0,0.1);
  padding: 100px 40px 40px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  z-index: 999;
  transition: right var(--transition-normal);
}
.mobile-nav-overlay.active {
  right: 0;
}
.mobile-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
}
.mobile-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* Mobile overlay menu: 白底必须用深色文字，否则菜单项看不见 */
.mobile-nav-overlay .nav-link {
  color: var(--dark-color);
  font-size: 1.1rem;
  font-weight: 500;
  padding: 14px 4px;
  border-bottom: 1px solid var(--border-color);
}
.mobile-nav-overlay .nav-link::after {
  display: none; /* 手机端不显示下划线动画 */
}
.mobile-nav-overlay .nav-link:hover,
.mobile-nav-overlay .nav-link.active {
  color: var(--primary-color);
}

/* Page Sub-banners */
.sub-banner {
  height: 320px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  display: flex;
  align-items: center;
  color: var(--bg-white);
}
.sub-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(40, 144, 72, 0.85) 0%, rgba(20, 30, 25, 0.7) 100%);
}
.sub-banner-content {
  position: relative;
  z-index: 10;
  text-align: center;
  width: 100%;
}
.sub-banner-title {
  font-size: 2.8rem;
  color: var(--bg-white);
  margin-bottom: 12px;
  letter-spacing: 2px;
}
.sub-banner-desc {
  font-size: 1.1rem;
  opacity: 0.9;
  font-weight: 300;
  max-width: 600px;
  margin: 0 auto;
}

/* Footer Section */
footer {
  background-color: var(--dark-color);
  color: rgba(255, 255, 255, 0.7);
  padding: 60px 0 30px;
  font-size: 0.95rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 50px;
}
.footer-logo {
  margin-bottom: 20px;
}
.footer-logo .logo-text-p2 {
  color: var(--bg-white);
}
.footer-desc {
  margin-bottom: 25px;
  line-height: 1.7;
}
.footer-socials {
  display: flex;
  gap: 15px;
}
.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}
.social-icon:hover {
  background-color: var(--primary-color);
  color: var(--bg-white);
  transform: translateY(-3px);
}
.footer-title {
  font-size: 1.1rem;
  color: var(--bg-white);
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}
.footer-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background-color: var(--primary-color);
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-link:hover {
  color: var(--primary-color);
  padding-left: 5px;
}
.footer-contact-item {
  display: flex;
  gap: 12px;
  margin-bottom: 15px;
}
.footer-contact-icon {
  width: 18px;
  height: 18px;
  fill: var(--primary-color);
  flex-shrink: 0;
  margin-top: 3px;
}
.footer-qr-container {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.footer-qr {
  width: 120px;
  height: 120px;
  padding: 8px;
  background-color: var(--bg-white);
  border-radius: var(--border-radius-sm);
  margin-bottom: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.footer-qr img {
  width: 100%;
  height: 100%;
}
.footer-qr-text {
  font-size: 0.8rem;
  text-align: center;
  width: 120px;
  opacity: 0.8;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 25px;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.6;
}

/* Call to Action Bar (Shared Green Banner) */
.cta-banner {
  background: linear-gradient(135deg, var(--primary-color) 0%, #1c7234 100%);
  color: var(--bg-white);
  padding: 60px 0;
  text-align: center;
}
.cta-title {
  font-size: 2.2rem;
  color: var(--bg-white);
  margin-bottom: 15px;
  font-weight: 700;
}
.cta-phone {
  font-size: 1.5rem;
  margin-bottom: 30px;
  font-weight: 300;
}
.cta-phone strong {
  font-weight: 700;
}

/* Form Styling */
.form-group {
  margin-bottom: 20px;
  text-align: left;
}
.form-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 8px;
}
.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-white);
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-fast);
  color: var(--text-color);
}
.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

/* Page Specific Animations (Scroll Reveal) */
.hp-field {
  display: none !important;
}
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* 无动画偏好或 JS 禁用时，禁止隐藏 reveal 内容 */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal.active {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
  .footer-qr-container {
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  body {
    padding-top: var(--header-height-small);
  }
  header {
    height: var(--header-height-small);
  }
  nav {
    display: none;
  }
  .nav-toggle {
    display: flex;
  }
  
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  .sub-banner {
    height: 240px;
  }
  .sub-banner-title {
    font-size: 2rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  /* Hamburger active state */
  .nav-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}

/* Home Page Hero Slider Styles */
.hero-slider {
  width: 100%;
  position: relative;
  overflow: hidden;
  background-color: #222222;
  margin-top: 0px;
  padding: 0;
}
.hero-track {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  z-index: 1;
}
.hero-slide.active {
  opacity: 1;
  z-index: 2;
}
.hero-slide-img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
}
.hero-slide-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 5;
  cursor: pointer;
}
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.4);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.hero-arrow:hover {
  background-color: var(--primary-color);
  transform: translateY(-50%) scale(1.08);
}
.hero-arrow-prev {
  left: 30px;
}
.hero-arrow-next {
  right: 30px;
}
.hero-arrow svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}
.hero-dots {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 10;
}
.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.hero-dot.active {
  background-color: var(--primary-color);
  transform: scale(1.2);
}
@media (max-width: 768px) {
  .hero-arrow {
    width: 36px;
    height: 36px;
  }
  .hero-arrow-prev { left: 15px; }
  .hero-arrow-next { right: 15px; }
}

/* SEO: sr-only —— 视觉隐藏、爬虫/读屏可见（替代无 h1 问题） */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* GEO: FAQ 区块样式 */
.faq-section {
  background: var(--bg-light, #f6f8f7);
  border-top: 1px solid var(--border-color, #dfe6ea);
  border-bottom: 1px solid var(--border-color, #dfe6ea);
}
.faq-list {
  max-width: 860px;
  margin: 0 auto;
}
.faq-item {
  background: var(--card-bg, #fff);
  border: 1px solid var(--border-color, #e4e9ec);
  border-radius: 10px;
  padding: 6px 22px;
  margin-bottom: 12px;
}
.faq-item summary {
  cursor: pointer;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--dark-color, #111418);
  padding: 12px 0;
  list-style: none;
  position: relative;
  padding-right: 28px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 10px;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--primary-color, #289048);
  transition: transform .2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-a {
  color: var(--text-light, #4a5a68);
  font-size: 0.95rem;
  line-height: 1.75;
  padding: 0 0 16px;
}

/* ===== Footer dual QR codes (2026-09-08 新增) ===== */
.footer-qr-row {
  display: flex;
  gap: 14px;
}
.footer-qr-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.footer-qr-item .footer-qr {
  width: 104px;
  height: 104px;
}
.footer-qr-item .footer-qr-text {
  width: 104px;
}
.footer-qr-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s ease;
}
.footer-qr-link:hover {
  opacity: 0.9;
}
.footer-qr-link:hover .footer-qr {
  box-shadow: 0 4px 14px rgba(40, 144, 72, 0.35);
}
@media (max-width: 768px) {
  .footer-qr-row { gap: 10px; }
  .footer-qr-item .footer-qr { width: 92px; height: 92px; }
  .footer-qr-item .footer-qr-text { width: 92px; }
}
