/* style.css 基础样式与通用组件 */

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

body {
  font-family: 'Segoe UI', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #222;
  background: #f6faff;
  transition: background 0.3s;
}

img {
  max-width: 100%;
  height: auto;
  object-fit: cover;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

/* ========== 内容 ========== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

.container-lg {
  padding: 80px 20px;
}

.container-sm {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ========== 通用模块 ========== */
.section {
  padding: 0;
  padding-top: 70px;
  position: relative;
}

.section + .section {
  padding-top: 0;
}

.section:last-child {
  padding-bottom: 100px;
}

.section-title {
  text-align: center;
  margin: 0 auto 50px;
  max-width: 800px;
}

.section-title h1,
.section-title h2 {
  color: #1565c0;
  font-size: 2.4em;
  margin-bottom: 16px;
  font-weight: 700;
}

.section-title p {
  color: #333;
  font-size: 1.1em;
  line-height: 1.6;
}

/* ========== 通用卡片 ========== */
.card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(21, 101, 192, 0.1);
  transition: all 0.4s ease;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 40px rgba(21, 101, 192, 0.18);
}

/* ========== 滚动渐显 ========== */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 1s ease, transform 0.8s ease;
  will-change: opacity, transform;
}

.revealed {
  opacity: 1;
  transform: none;
}

/* ========== Header ========== */
.header {
  background: rgba(21, 101, 192);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 70px;
  box-shadow: 0 2px 8px rgba(21, 101, 192, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.header.scrolled {
  background: rgba(21, 101, 192, 0.95);
  backdrop-filter: blur(10px);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.3em;
  font-weight: bold;
}

.logo img {
  height: 96px;
  width: 96px;
  object-fit: contain;
}

.nav {
  display: flex;
  gap: 35px;
}

.nav a {
  color: #fff;
  font-size: 1.1em;
  padding: 8px 16px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.nav a.active,
.nav a:hover {
  background: #fff;
  color: #1565c0;
}

/* ========== Footer ========== */
.footer {
  background: #1565c0;
  color: #fff;
  text-align: center;
  padding: 24px 0;
  margin-top: 80px;
  font-size: 0.95em;
}

#backToTop {
  position: fixed;
  right: 32px;
  bottom: 48px;
  width: 48px;
  height: 48px;
  background: #1565c0;
  color: #fff;
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(21, 101, 192, 0.2);
  font-size: 1.6em;
  cursor: pointer;
  z-index: 999;
  display: none;
  transition: all 0.3s ease;
}

#backToTop:hover {
  background: #003c8f;
  transform: scale(1.1);
}

/* ========== 下拉菜单 ========== */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  color: #fff;
  font-size: 1.1em;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: rgba(0, 0, 0, 0.3);
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 156px;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 999;
}

.dropdown-menu li {
  padding: 0;
}

.dropdown-menu a {
  display: block;
  padding: 10px 16px;
  color: #fff;
  font-size: 1em;
}

.dropdown-menu a:hover {
  background: #fff;
  color: #1565c0;
}

.dropdown:hover .dropdown-menu,
.dropdown-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ========== 灯箱Lightbox ========== */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.3s ease;
  cursor: zoom-out;
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox-img {
  max-width: 600px;
  max-height: 600px;
  border-radius: 8px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}

.lightbox-img:hover {
  transform: scale(1.02);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 3em;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
  transition: transform 0.2s ease;
}

.lightbox-close:hover {
  transform: rotate(90deg);
}

/* ========== 通用按钮 ========== */
.btn {
  display: inline-block;
  background: #1565c0;
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 1em;
  font-weight: bold;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.btn:hover {
  background: #003c8f;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(21, 101, 192, 0.2);
}

.e-button {
  display: inline-block;
  padding: 12px 28px;
  background: transparent;
  color: #1565c0;
  border: 2px solid #1565c0;
  border-radius: 30px;
  font-size: 1em;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.e-button:hover {
  background: #1565c0;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(21, 101, 192, 0.2);
}

/* ========== 通用网格 ========== */
.grid {
  display: grid;
  gap: 32px;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid-auto-fit {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-auto-fill {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* ========== 英雄区域 ========== */
.hero-section {
  background: linear-gradient(135deg, #1565c0, #1e88e5);
  color: #fff;
  padding: 100px 0;
  text-align: center;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hero-section h1 {
  font-size: 2.4em;
  font-weight: bold;
  margin-bottom: 16px;
}

.hero-section p {
  font-size: 1.1em;
  max-width: 600px;
  margin: 0 auto;
  opacity: 0.9;
}

.section-hero {
  background: linear-gradient(135deg, rgba(15, 65, 128, 0.4), rgba(21, 101, 192, 0.5));
  color: white;
  text-align: center;
  padding: 100px 0;
  min-height: 500px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.section-hero h1 {
  color: white;
  font-size: 2.4em;
  margin-bottom: 16px;
  font-weight: 700;
}

.section-hero p {
  color: white;
  font-size: 1.1em;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ========== 通用卡片 ========== */
.product-card,
.trend-card,
.benefit-card,
.advantage-item,
.scenario-item {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(21, 101, 192, 0.1);
  transition: all 0.4s ease;
  overflow: hidden;
}

.product-card:hover,
.trend-card:hover,
.benefit-card:hover,
.advantage-item:hover,
.scenario-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 16px 40px rgba(21, 101, 192, 0.18);
}

/* ========== 移动菜单栏 ========== */
.mobile-menu-btn {
  display: none;
}

/* ========== 响应式设计 ========== */
/* 超大尺寸 (1600px+) */
@media (min-width: 1600px) {
  .container {
    max-width: 1400px;
  }
}
/* 大尺寸 (1200px+) */
@media (min-width: 1200px) {
  .container {
    max-width: 1200px;
  }
}

/* 中尺寸 (768px - 1199px) */
@media (max-width: 1199px) and (min-width: 768px) {
  .container {
    padding: 0 16px;
  }
  
  .section {
    padding: 60px 0;
  }
  
  .section-title h1 {
    font-size: 2.2em;
  }
  
  .header {
    padding: 0 20px;
  }
  
  .nav {
    gap: 25px;
    font-size: 16px;
  }
  
  .grid-4 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 小尺寸平板 (768px - 991px) */
@media (max-width: 991px) and (min-width: 768px) {
  .container {
    padding: 0 20px;
  }

  .section-title h1 {
    font-size: 2.2em;
  }

  .header {
    padding: 0 24px;
  }

  .nav {
    gap: 15px;
  }

  .nav a {
    padding: 8px 12px;
    font-size: 1em;
  }

  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-section,
  .section-hero {
    min-height: 450px;
    padding: 90px 0;
  }

  .dropdown-menu {
    min-width: 140px;
  }
}

/* 大手机/小平板 (600px - 767px) */
@media (max-width: 767px) and (min-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .section-title h1 {
    font-size: 2em;
  }

  .logo img {
    height: 85px;
    width: 85px;
  }


  .grid-3 {
    grid-template-columns: 1fr;
  }

  .hero-section h1,
  .section-hero h1 {
    font-size: 2em;
  }

  /* 移动菜单按钮 */
  .mobile-menu-btn {
    display: block;
    position: absolute;
    top: 18px;
    right: 20px;
    z-index: 1001;
    background: none;
    border: none;
    width: 30px;
    height: 24px;
    cursor: pointer;
  }

  .mobile-menu-btn span {
    position: relative;
    display: block;
    height: 2px;
    background: #fff;
    transition: all 0.3s;
  }

  .mobile-menu-btn span::before,
  .mobile-menu-btn span::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: #fff;
    transition: transform 0.3s ease;
  }

  .mobile-menu-btn span::before {
    top: -8px;
  }

  .mobile-menu-btn span::after {
    bottom: -8px;
  }

  .mobile-menu-btn.active span {
    background: transparent;
  }

  .mobile-menu-btn.active span::before {
    transform: rotate(45deg);
    top: 0;
  }

  .mobile-menu-btn.active span::after {
    transform: rotate(-45deg);
    bottom: 0;
  }

  /* 导航菜单 */
  .nav {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    gap:20px;
    background: rgba(21, 101, 192, 0.98);
    flex-direction: column;
    /*padding: 10px 0;*/
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    z-index: 1000;
  }

  .nav.active {
    max-height: 100vh;
    overflow-y: auto;
  }

  .nav a {
    /*padding: 5px 5px;*/
    font-size: 1.05em;
    width: 100%;
  }

  /* 下拉菜单调整 */
  .dropdown {
    width: 100%;
  }

  .dropdown-toggle {
    width: 100%;
    justify-content: flex-start;
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: rgba(0, 0, 0, 0.2);
    box-shadow: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .dropdown.active .dropdown-menu {
    max-height: 500px;
  }

  .dropdown-menu li {
    padding: 0;
  }

  .dropdown-menu a {
    padding-left: 32px;
  }
}


/* ========== 响应式设计 - 小屏幕 (320px-479px) ========== */
@media (max-width: 479px) {
  /* 基础调整 */
  .container {
    padding: 0 12px;
  }

  .container-lg {
    padding: 40px 12px;
  }

  .section {
    padding-top: 50px;
  }

  .section:last-child {
    padding-bottom: 60px;
  }

  /* 标题调整 */
  .section-title h1,
  .section-title h2 {
    font-size: 1.8em;
  }

  /* 网格布局调整 */
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  /* 英雄区域 */
  .hero-section,
  .section-hero {
    min-height: 300px;
    padding:60px 0;
  }

  .hero-section h1,
  .section-hero h1 {
    font-size: 1.8em;
  }

  /* 头部导航 */
  .header {
    height: 70px;
  }

  .logo img {
    height: 70px;
    width: 70px;
  }

  /* 移动菜单按钮 */
  .mobile-menu-btn {
    display: block;
    position: absolute;
    top: 18px;
    right: 20px;
    z-index: 1001;
    background: none;
    border: none;
    width: 30px;
    height: 24px;
    cursor: pointer;
  }

  .mobile-menu-btn span {
    position: relative;
    display: block;
    height: 2px;
    background: #fff;
    transition: all 0.3s;
  }

  .mobile-menu-btn span::before,
  .mobile-menu-btn span::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: #fff;
    transition: transform 0.3s ease;
  }

  .mobile-menu-btn span::before {
    top: -8px;
  }

  .mobile-menu-btn span::after {
    bottom: -8px;
  }

  .mobile-menu-btn.active span {
    background: transparent;
  }

  .mobile-menu-btn.active span::before {
    transform: rotate(45deg);
    top: 0;
  }

  .mobile-menu-btn.active span::after {
    transform: rotate(-45deg);
    bottom: 0;
  }

  /* 导航菜单 */
  .nav {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(21, 101, 192, 0.98);
    flex-direction: column;
    /*padding: 10px 0;*/
    gap: 10px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    z-index: 1000;
  }

  .nav.active {
    max-height: 100vh;
    overflow-y: auto;
  }

  .nav a {
    padding: 12px 20px;
    font-size: 1em;
    width: 100%;
  }

  /* 下拉菜单调整 */
  .dropdown {
    width: 100%;
  }

  .dropdown-toggle {
    width: 100%;
    justify-content: flex-start;
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: rgba(0, 0, 0, 0.2);
    box-shadow: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .dropdown.active .dropdown-menu {
    max-height: 500px;
  }

  .dropdown-menu li {
    padding: 0;
  }

  .dropdown-menu a {
    padding-left: 32px;
  }

  /* 返回顶部按钮 */
  #backToTop {
    right: 20px;
    bottom: 30px;
    width: 40px;
    height: 40px;
    font-size: 1.4em;
  }

  /* 文字显示优化 */
  .visible-mobile {
    display: inline;
  }

  .hidden-mobile {
    display: none;
  }
}

/* ========== 打印 ========== */
@media print {
  .header,
  .footer,
  #backToTop,
  .mobile-menu-btn {
    display: none !important;
  }
  
  .section {
    padding: 20px 0 !important;
  }
  
  .card {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
  }
}




