/* ===== index.html 页面专属样式 ===== */

.side-toolbar {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.side-toolbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: var(--theme-color);
  color: #fff;
  font-size: 11px;
  text-align: center;
  transition: var(--transition);
  border-radius: 4px;
}

.side-toolbar a i {
  font-size: 18px;
  margin-bottom: 4px;
}

.side-toolbar a:hover {
  background: var(--theme-color-dark);
}

.hero {
  position: relative;
  height: 550px;
  overflow: hidden;
}

.hero-slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease;
  /* 未激活的轮播屏不接收鼠标事件，避免遮挡当前屏按钮的点击 */
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 移动端背景图默认隐藏，窄屏时切换显示 */
.hero-slide-bg-mobile {
  display: none;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0,60,100,0.6) 0%, rgba(0,137,207,0.3) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 遮罩风格（对应后台 mask_style） */
.hero-overlay.mask-blue {
  background: linear-gradient(135deg, rgba(0,80,120,0.55) 0%, rgba(0,100,160,0.35) 100%);
}

.hero-overlay.mask-teal {
  background: linear-gradient(135deg, rgba(0,110,120,0.6) 0%, rgba(0,150,140,0.3) 100%);
}

.hero-overlay.mask-dark {
  background: linear-gradient(135deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.35) 100%);
}

.hero-content {
  text-align: center;
  color: #fff;
  max-width: 700px;
  padding: 0 20px;
}

.hero-content .subtitle {
  font-size: 14px;
  letter-spacing: 4px;
  margin-bottom: 16px;
  font-weight: 500;
}

.hero-content .title {
  font-size: 38px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 20px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.hero-content .desc {
  font-size: 15px;
  opacity: 0.9;
  margin-bottom: 30px;
  line-height: 1.8;
}

.hero-dots {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.hero-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: var(--transition);
}

.hero-dots span.active {
  background: #fff;
  transform: scale(1.2);
}

.products-section {
  padding: 70px 0;
  background: var(--bg-white);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.product-card {
  display: block;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  group: true;
  text-decoration: none;
  color: inherit;
}

.product-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  padding: 40px 16px 16px;
  color: #fff;
}

.product-card-title {
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.why-section {
  padding: 70px 0;
  background: var(--bg-light);
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.why-card {
  background: #fff;
  border-radius: 10px;
  padding: 36px 24px;
  text-align: center;
  transition: var(--transition);
  border: 1px solid transparent;
}

.why-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0,137,207,0.12);
  border-color: rgba(0,137,207,0.15);
}

.why-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  background: var(--theme-color-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--theme-color);
  transition: var(--transition);
}

.why-card:hover .why-icon {
  background: var(--theme-color);
  color: #fff;
}

.why-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.why-card p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.8;
  text-align: left;
}

.why-cta {
  text-align: center;
  margin-top: 40px;
}

.about-section {
  padding: 70px 0;
  background: var(--bg-white);
}

.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.about-text h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.about-text p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 2;
  margin-bottom: 16px;
}

.about-img {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.about-img img {
  width: 100%;
  height: 380px;
  object-fit: cover;
}

.about-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 50px;
}

.about-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px;
  background: var(--bg-light);
  border-radius: 8px;
  transition: var(--transition);
}

.about-feature-item:hover {
  background: var(--theme-color-light);
}

.about-feature-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  background: var(--theme-color);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
}

.about-feature-info h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.about-feature-info p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.tech-section {
  padding: 70px 0;
  background: var(--bg-light);
}

.tech-carousel {
  position: relative;
  overflow: hidden;
}

.tech-track {
  display: flex;
  gap: 20px;
  transition: transform 0.5s ease;
}

.tech-item {
  display: block;
  min-width: calc(25% - 15px);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
}

.tech-item-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.tech-item:hover .tech-item-img {
  transform: scale(1.08);
}

.tech-item-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  padding: 30px 16px 16px;
  color: #fff;
}

.tech-item-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}

.tech-nav-btns {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 -10px;
  pointer-events: none;
}

.tech-nav-btn {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.9);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-primary);
  pointer-events: auto;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.tech-nav-btn:hover {
  background: var(--theme-color);
  color: #fff;
}

.tech-more {
  text-align: center;
  margin-top: 30px;
}

.news-section {
  padding: 70px 0;
  background: var(--bg-white);
}

.news-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.news-featured {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.news-featured:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.news-featured-img {
  width: 100%;
  height: 260px;
  object-fit: cover;
}

.news-featured-body {
  padding: 20px;
}

.news-featured-body h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.news-featured-body p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.9;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.news-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
  cursor: pointer;
}

.news-item:first-child {
  padding-top: 0;
}

.news-item:hover {
  padding-left: 8px;
}

.news-item-date {
  min-width: 80px;
  font-size: 13px;
  color: var(--theme-color);
  font-weight: 600;
}

.news-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  transition: var(--transition);
  flex: 1;
}

.news-item:hover .news-item-title {
  color: var(--theme-color);
}

.message-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: start;
}

.message-left h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.message-left .en-title {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.message-left p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.9;
}

.message-form {
  background: #fff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.form-group label .required {
  color: #e74c3c;
  margin-left: 2px;
}

.form-group input, .form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  transition: var(--transition);
  outline: none;
  background: #fafbfc;
}

.form-group input:focus, .form-group textarea:focus {
  border-color: var(--theme-color);
  box-shadow: 0 0 0 3px rgba(0,137,207,0.1);
}

.form-group textarea {
  height: 100px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.btn-outline {
  background: transparent;
  color: var(--theme-color);
  border: 1px solid var(--theme-color);
}

.btn-outline:hover {
  background: var(--theme-color);
  color: #fff;
}

.btn-white {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.4);
  backdrop-filter: blur(4px);
}

.btn-white:hover {
  background: #fff;
  color: var(--theme-color);
}

@media (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .about-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .about-features {
    grid-template-columns: repeat(2, 1fr);
  }
  .news-layout {
    grid-template-columns: 1fr;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
  .tech-item {
    min-width: calc(33.333% - 14px);
  }
  .products-section, .why-section, .about-section, .tech-section, .news-section, .message-section {
    padding: 50px 0;
  }
  .section-header {
    margin-bottom: 30px;
  }
  .about-img img {
    height: 280px;
  }
  .tech-item-img {
    height: 180px;
  }
}

@media (max-width: 768px) {
  .top-bar {
    display: none;
  }
  .side-toolbar {
    display: none;
  }
  .nav-inner {
    height: 60px;
    padding: 0 16px;
  }
  .nav-menu {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 70px 0 20px;
    box-shadow: -4px 0 20px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 100;
    overflow-y: auto;
  }
  .nav-menu.open {
    right: 0;
  }
  .nav-menu > li > a {
    padding: 12px 24px;
    line-height: normal;
    font-size: 15px;
    border-bottom: 1px solid #f0f0f0;
  }
  .nav-menu > li .submenu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    border-radius: 0;
    padding: 0 0 0 20px;
  }
  .nav-search {
    margin: 12px 24px;
  }
  .mobile-toggle {
    display: flex;
  }
  .mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
  }
  .mobile-overlay.visible {
    opacity: 1;
    visibility: visible;
  }
  .hero {
    height: 350px;
  }
  /* 窄屏切换为移动端背景图 */
  .hero-slide-bg-pc {
    display: none;
  }
  .hero-slide-bg-mobile {
    display: block;
  }
  .hero-content .title {
    font-size: 26px;
  }
  .hero-content .subtitle {
    font-size: 12px;
  }
  .hero-content .desc {
    font-size: 13px;
  }
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .why-grid {
    grid-template-columns: 1fr;
  }
  .about-features {
    grid-template-columns: 1fr;
  }
  .tech-item {
    min-width: calc(50% - 10px);
  }
  .message-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .footer-top {
    grid-template-columns: 1fr;
  }
  .section-header h2 {
    font-size: 22px;
  }
  .container {
    padding: 0 16px;
  }
  .about-text h2 {
    font-size: 22px;
  }
  .message-left h2 {
    font-size: 22px;
  }
  .products-section, .why-section, .about-section, .tech-section, .news-section, .message-section {
    padding: 40px 0;
  }
  .section-header {
    margin-bottom: 24px;
  }
  .about-img img {
    height: 220px;
  }
  .tech-item-img {
    height: 160px;
  }
  .back-to-top {
    bottom: 80px;
    right: 16px;
  }
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: 1fr;
  }
  .hero {
    height: 280px;
  }
  .hero-content .title {
    font-size: 22px;
  }
  .tech-item {
    min-width: calc(80% - 10px);
  }
  .news-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .products-section, .why-section, .about-section, .tech-section, .news-section, .message-section {
    padding: 30px 0;
  }
  .section-header {
    margin-bottom: 20px;
  }
  .tech-item-img {
    height: 140px;
  }
  .news-featured-img {
    height: 180px;
  }
}
