/* ============================================================
   首页专属样式
   ============================================================ */

/* ---------- Homepage Navbar Override (white text on transparent) ---------- */
.navbar {
  background: transparent;
  backdrop-filter: none; -webkit-backdrop-filter: none;
  box-shadow: none;
}
.navbar .nav-logo { color: #fff; }
.navbar .nav-links a { color: #fff; }
.navbar .nav-links a:hover,
.navbar .nav-links a.active {
  color: #fff; background: transparent;
}
.navbar .nav-links a.active::after { background: var(--accent); }
.navbar .lang-switch { background: rgba(255,255,255,.15); }
.navbar .lang-switch button { color: #fff; }
.navbar .lang-switch button.active {
  background: #fff; color: var(--primary);
}
.navbar .nav-toggle span { background: #fff; }
/* Scrolled state: restore white bg + dark text */
.navbar.scrolled {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(42,108,182,.1);
}
.navbar.scrolled .nav-logo { color: var(--primary); }
.navbar.scrolled .nav-links a { color: #555; }
.navbar.scrolled .nav-links a:hover,
.navbar.scrolled .nav-links a.active {
  color: var(--accent); background: rgba(74,158,255,.08);
}
.navbar.scrolled .nav-links a.active::after { background: var(--accent); }
.navbar.scrolled .lang-switch { background: rgba(74,158,255,.1); }
.navbar.scrolled .lang-switch button { color: #666; }
.navbar.scrolled .lang-switch button.active { background: var(--accent); color: #fff; }
.navbar.scrolled .nav-toggle span { background: #555; }

/* ---------- Hero Banner ---------- */
.hero {
  position: relative; width: 100%; height: 100vh; overflow: hidden;
  background: linear-gradient(135deg, #e8f2ff 0%, #d0e6ff 100%);
}
.hero-video {
  position: absolute; inset: 0; z-index: 1;
  opacity: 1; visibility: visible;
  transition: opacity .6s ease, visibility .6s ease;
}
.hero-video video {
  width: 100%; height: 100%; object-fit: cover;
}
/* CSS Fade Carousel */
.hero-carousel {
  position: absolute; inset: 0; z-index: 2;
  opacity: 0; visibility: hidden;
  transition: opacity .6s ease, visibility .6s ease;
}
.carousel-slide {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity 1.2s ease;
}
.carousel-slide.active {
  opacity: 1;
}
.hero-overlay {
  position: absolute; inset: 0; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 0 20px;
}
.hero-content { max-width: 900px; }
.hero-content h1 {
  font-size: 3.5rem; color: #fff; font-weight: 800;
  margin-bottom: 20px; letter-spacing: 2px;
  text-shadow: 0 2px 20px rgba(0,0,0,.25);
}
.hero-content p {
  font-size: 1.25rem; color: #fff;
  margin-bottom: 40px; line-height: 1.8;
}
.hero-btns { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }

/* Banner mode toggle */
.banner-mode {
  position: absolute; bottom: 40px; right: 40px; z-index: 20;
  display: flex; gap: 8px;
}
.banner-mode button {
  padding: 8px 16px; background: rgba(255,255,255,.6);
  border: 1px solid rgba(74,158,255,.2); border-radius: 20px;
  color: #555; font-size: .85rem; cursor: pointer;
  transition: all var(--transition); backdrop-filter: blur(4px);
}
.banner-mode button.active {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.banner-mode button:hover { background: rgba(255,255,255,.8); }

/* Scroll indicator */
.scroll-indicator {
  position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
  z-index: 20; display: flex; flex-direction: column; align-items: center;
  gap: 8px; color: #fff; font-size: .8rem; opacity: .6;
}
.scroll-indicator .mouse {
  width: 24px; height: 38px; border: 2px solid #fff;
  border-radius: 12px; position: relative;
}
.scroll-indicator .mouse::after {
  content: ''; position: absolute; top: 8px; left: 50%;
  transform: translateX(-50%); width: 3px; height: 8px;
  background: #fff; border-radius: 2px;
  animation: scrollDown 1.5s ease-in-out infinite;
}
@keyframes scrollDown {
  0% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(12px); }
}

/* ---------- Products Overview ---------- */
.products-overview { background: var(--bg-light); }
.products-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 28px; margin-bottom: 48px;
}
.product-card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: all var(--transition); cursor: pointer;
}
.product-card:hover {
  transform: translateY(-8px); box-shadow: var(--shadow-lg);
}
.product-card-img {
  height: 240px; overflow: hidden; position: relative;
}
.product-card-img .placeholder-img {
  transition: transform .5s ease;
}
.product-card:hover .product-card-img .placeholder-img {
  transform: scale(1.08);
}
.product-card-body { padding: 24px; }
.product-card-body h3 {
  font-size: 1.25rem; color: var(--primary); margin-bottom: 10px;
}
.product-card-body p {
  font-size: .95rem; color: var(--text-light); line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-card-body .card-link {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 14px; color: var(--accent); font-size: .95rem; font-weight: 600;
  transition: gap var(--transition);
}
.product-card:hover .card-link { gap: 10px; }
.products-cta { text-align: center; }

/* ---------- Honors Section ---------- */
.honors-section { background: #fff; }
.honors-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
.honor-card {
  background: var(--bg-light); border-radius: var(--radius);
  padding: 32px 20px; text-align: center;
  transition: all var(--transition); border: 1px solid var(--border);
}
.honor-card:hover {
  transform: translateY(-4px); box-shadow: var(--shadow);
  border-color: var(--accent);
}
.honor-icon {
  width: 64px; height: 64px; margin: 0 auto 16px;
  background: var(--accent-gradient); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: #fff;
}
.honor-card h4 { font-size: 1rem; color: var(--primary); margin-bottom: 8px; }
.honor-card p { font-size: .85rem; color: var(--text-light); }

/* ---------- About Section ---------- */
.about-section { background: var(--bg-light); }
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
}
.about-img {
  height: 400px; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow);
}
.about-text h3 {
  font-size: 1.8rem; color: var(--primary); margin-bottom: 20px;
}
.about-text p {
  font-size: 1.05rem; color: var(--text-light); line-height: 1.9; margin-bottom: 24px;
}
.about-text .btn { margin-top: 8px; }

/* ---------- Stats Section ---------- */
.stats-section {
  background: linear-gradient(135deg, #e8f2ff 0%, #d0e6ff 100%); position: relative; overflow: hidden;
}
.stats-section::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(74,158,255,.06) 0%, transparent 60%);
}
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px;
  position: relative; z-index: 1;
}
.stat-item { text-align: center; }
.stat-number {
  font-size: 3rem; font-weight: 800; color: var(--accent);
  margin-bottom: 8px; font-variant-numeric: tabular-nums;
}
.stat-label {
  font-size: 1rem; color: #555; letter-spacing: 1px;
}

/* ---------- News Section ---------- */
.news-section { background: #fff; }
.news-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
  margin-bottom: 48px;
}
.news-card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: all var(--transition); cursor: pointer;
}
.news-card:hover {
  transform: translateY(-6px); box-shadow: var(--shadow-lg);
}
.news-card-img { height: 240px; overflow: hidden; }
.news-card-img .placeholder-img { transition: transform .5s ease; }
.news-card:hover .news-card-img .placeholder-img { transform: scale(1.05); }
.news-card-body { padding: 28px; }
.news-card-date {
  font-size: .9rem; color: var(--accent); font-weight: 600; margin-bottom: 10px;
}
.news-card-body h3 {
  font-size: 1.25rem; color: var(--primary); margin-bottom: 12px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card-body p {
  font-size: .95rem; color: var(--text-light); line-height: 1.8;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card-summary {
  font-size: .95rem; color: var(--text-light); line-height: 1.8;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card-summary p {
  margin: 0;
}
.news-cta { text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .honors-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-img { height: 300px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .hero-content h1 { font-size: 2.2rem; }
  .hero-content p { font-size: 1rem; }
  .products-grid { grid-template-columns: 1fr; }
  .honors-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .stat-number { font-size: 2.2rem; }
  .news-grid { grid-template-columns: 1fr; }
  .banner-mode { bottom: 20px; right: 20px; }
  .scroll-indicator { display: none; }
}
@media (max-width: 480px) {
  .hero-content h1 { font-size: 1.8rem; }
  .hero-btns { flex-direction: column; align-items: center; }
  .honors-grid { grid-template-columns: 1fr; }
}
