/* ============================================
   睿科仪表 - 首页样式
   ============================================ */

/* ===== 顶部栏 ===== */
.top-bar {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.8);
  font-size: 13px;
  padding: 8px 0;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar a {
  color: rgba(255,255,255,0.8);
}

.top-bar a:hover {
  color: #fff;
}

.top-bar-right {
  display: flex;
  gap: 20px;
}

/* ===== 头部 ===== */
.header {
  height: var(--header-height);
  background: var(--bg);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--header-height);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
}

.logo-icon {
  width: 50px;
  height: 40px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

/* ===== 导航 ===== */
.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav a {
  padding: 8px 16px;
  font-size: 15px;
  color: var(--text);
  border-radius: 4px;
  position: relative;
}

.nav a:hover,
.nav a.active {
  color: var(--primary);
  background: var(--primary-light);
}

/* 移动端菜单按钮 */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: var(--transition);
}

/* ===== Banner 轮播 ===== */
.banner {
  position: relative;
  height: 560px;
  overflow: hidden;
  background: var(--bg-dark);
}

.swiper-slide {
  position: relative;
  width: 100%;
  height: 100%;
}
.swiper-slide .banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,21,41,0.85) 0%, rgba(24,144,255,0.4) 100%);
  z-index: 1;
}
.swiper-slide > a,
.swiper-slide > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner-slide.active {
  opacity: 1;
}

.banner-slide .banner-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.banner-slide .banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,21,41,0.85) 0%, rgba(24,144,255,0.4) 100%);
}

.banner-content {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  color: #fff;
  max-width: var(--max-width);
  width: 100%;
  padding: 0 20px;
  text-align: center;
}

.banner-content h1 {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.2;
}

.banner-content p {
  font-size: 18px;
  opacity: 0.9;
  margin-bottom: 30px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

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

.banner-dots span {
  width: 12px;
  height: 3px;
  background: rgba(255,255,255,0.5);
  border-radius: 2px;
  cursor: pointer;
  transition: var(--transition);
}

.banner-dots span.active {
  width: 32px;
  background: #fff;
}

/* ===== 产品展示 ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.product-card {
  text-align: left;
  padding: 0 0 24px;
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
}

.product-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-6px);
}

.product-image {
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius) var(--radius) 0 0;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: var(--transition);
}

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

.product-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--text);
}

.product-card h4 {
  font-size: 16px;
  margin: 14px 16px 6px;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card h4 a {
  color: var(--text);
}

.product-card h4 a:hover {
  color: var(--primary);
}

.product-card p {
  font-size: 14px;
  color: var(--text-light);
  padding: 0 16px 16px;
}

/* ===== 产品分类分组 (首页) ===== */
.product-category {
  margin-bottom: 48px;
}

.product-category:last-child {
  margin-bottom: 0;
}

.category-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 20px;
  padding-left: 15px;
  border-left: 4px solid var(--primary);
  line-height: 1.4;
}

.category-title a {
  color: var(--text);
}

.category-title a:hover {
  color: var(--primary);
}

/* ===== 产品分类标签页 (首页) ===== */
.product-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
}

.news-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
}

.tab-btn {
  padding: 10px 24px;
  border: 2px solid var(--border);
  border-radius: 4px;
  font-size: 15px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.tab-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.tab-btn.active {
  border-color: var(--primary);
  color: #fff;
  background: var(--primary);
}

.news-panel {
  display: none;
}

/* ===== 关于我们 ===== */
.about-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-image {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-hover);
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 64px;
}

.about-text h2 {
  font-size: 32px;
  margin-bottom: 20px;
}

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

.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 24px 0;
}

.about-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--text);
}

.about-feature .check {
  width: 20px;
  height: 20px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  flex-shrink: 0;
}

/* ===== 数据展示 ===== */
.stats {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 60px 0;
}

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

.stat-item h3 {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 8px;
}

.stat-item p {
  font-size: 15px;
  opacity: 0.85;
}

/* ===== 优势 ===== */
.advantages-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.advantage-card {
  text-align: center;
  padding: 40px 30px;
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.advantage-card:hover {
  box-shadow: var(--shadow-hover);
}

.advantage-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 20px;
  background: var(--primary-light);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--primary);
}

.advantage-card h3 {
  font-size: 18px;
  margin-bottom: 12px;
}

.advantage-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ===== 案例 ===== */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.case-card {
  display: block;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16/10;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.case-card:nth-child(2) {
  /* background removed - using image instead */
}

.case-card:nth-child(3) {
  /* background removed - using image instead */
}

.case-card:nth-child(4) {
  /* background removed - using image instead */
}

.case-card .case-image {
  position: absolute;
  inset: 0;
  background: #fff;
}
.case-card .case-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.case-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  color: #fff;
  opacity: 0;
  transition: var(--transition);
}

.case-card:hover .case-overlay {
  opacity: 1;
}

.case-overlay h3 {
  font-size: 18px;
  margin-bottom: 6px;
}

.case-overlay p {
  font-size: 14px;
  opacity: 0.85;
}

/* ===== 新闻 ===== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.news-card {
  background: var(--bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.news-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.news-image {
  height: 200px;
  overflow: hidden;
  background: #fff;
}
.news-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.news-body {
  padding: 24px;
}

.news-date {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 8px;
}

.news-body h3 {
  font-size: 17px;
  margin-bottom: 10px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-body p {
  font-size: 14px;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-link {
  display: inline-block;
  margin-top: 12px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 500;
}

.news-link:hover {
  color: var(--primary-dark);
}

/* ===== 联系入口 ===== */
.cta-section {
  background: linear-gradient(135deg, var(--bg-dark) 0%, #003a8c 100%);
  color: #fff;
  text-align: center;
  padding: 80px 0;
}

.cta-section h2 {
  font-size: 32px;
  margin-bottom: 16px;
}

.cta-section p {
  font-size: 16px;
  opacity: 0.85;
  margin-bottom: 30px;
}

.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-phone {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 8px;
}

/* ===== 底部 ===== */
.footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.7);
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer h4 {
  color: #fff;
  font-size: 16px;
  margin-bottom: 20px;
}

.footer-about p {
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 16px;
}

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

.footer-links a {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
}

.footer-links a:hover {
  color: #fff;
}

.footer-contact li {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 14px;
}

.footer-bottom {
  text-align: center;
  padding: 20px 0;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}

/* ===== 回到顶部 ===== */
.back-to-top {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: var(--shadow-hover);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 999;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .advantages-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .top-bar {
    display: none;
  }
  
  .menu-toggle {
    display: flex;
  }
  
  .nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 20px;
    box-shadow: var(--shadow-hover);
    transform: translateY(-120%);
    transition: var(--transition);
    z-index: 999;
    gap: 0;
  }
  
  .nav.open {
    transform: translateY(0);
  }
  
  .nav a {
    padding: 12px 16px;
    width: 100%;
    border-bottom: 1px solid var(--border);
  }
  
  .banner {
    height: 400px;
  }
  
  .banner-content h1 {
    font-size: 28px;
  }
  
  .banner-content p {
    font-size: 15px;
  }
  
  .about-section {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  
  .product-card {
    padding: 0 0 20px;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .stat-item h3 {
    font-size: 36px;
  }
  
  .advantages-grid {
    grid-template-columns: 1fr;
  }
  
  .cases-grid {
    grid-template-columns: 1fr;
  }
  
  .news-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .cta-phone {
    font-size: 28px;
  }
}

.product-panel {
  display: none;
}
