﻿*{margin:0;padding:0;box-sizing:border-box;}
body{font-family:Arial;background:#fff;color:#333;}

.container{max-width:1200px;margin:auto;padding:20px;}



/* ===== 顶部 ===== */
.header{
  background:#fff;
  border-bottom:1px solid #eee;
  position:sticky;
  top:0;
  z-index:999;
}

.nav-wrap{
  display:flex;
  justify-content:space-between;
  align-items:center;
}

/* LOGO */
.logo img{
  height:40px;
}

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

.nav a, .nav-item span{
  text-decoration:none;
  color:#333;
  cursor:pointer;
  position:relative;
}

/* 下拉 */
.nav-item{
  position:relative;
}

.dropdown{
  position:absolute;
  top:100%;
  left:0;
  background:#fff;
  border:1px solid #eee;
  display:none;
  min-width:150px;
}

.dropdown a{
  display:block;
  padding:10px;
  white-space:nowrap;
}

/* PC hover */
.nav-item:hover .dropdown{
  display:block;
}

/* ===== 移动端 ===== */
.menu-btn{
  display:none;
  font-size:24px;
}

#menu-toggle{
  display:none;
}

/* 手机样式 */
@media(max-width:768px){

  .menu-btn{
    display:block;
  }

  .nav{
    position:absolute;
    top:60px;
    left:0;
    width:100%;
    background:#fff;
    flex-direction:column;
    display:none;
    border-top:1px solid #eee;
  }

  #menu-toggle:checked + .menu-btn + .nav{
    display:flex;
  }

  .nav a, .nav-item span{
    padding:15px;
    border-bottom:1px solid #eee;
  }

  /* 手机下拉改为展开 */
  .dropdown{
    position:static;
    display:block;
    border:none;
  }

  .dropdown a{
    padding-left:30px;
  }

}

.nav-btn{
  background:#007bff;
  color:#fff;
  padding:8px 15px;
  border-radius:4px;
}


/* Banner */
.banner{
  overflow:hidden;
  position:relative;
}

.banner-wrapper{
  display:flex;
  transition:transform 0.5s ease;
}

.slide{
  min-width:100%;
}

.slide img{
  width:100%;
  display:block;
}

/* 优势 */
.advantage{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:20px;
  text-align:center;
}

.advantage img{
  width:60px;
}

/* 产品 */

/* ===== 检测项目整体布局 ===== */
/* 检测项目整体背景 */
.product{
  background:#f5f6f7;
  padding:60px 0;
}

.product-grid{
  display:grid;
  grid-template-columns:repeat(4, 1fr); /* PC固定4列 */
  gap:18px;
}

/* ===== 卡片 ===== */
.product-card{
  position:relative;
  height:220px;
  border-radius:10px;
  overflow:hidden;

  background-size:cover;
  background-position:center;

  display:flex;
  align-items:flex-end;

  text-decoration:none;
  color:#fff;

  transition:all .3s ease;
}

/* 遮罩（提升文字可读性） */
.product-card::after{
  content:'';
  position:absolute;
  inset:0;
  background:linear-gradient(to top, rgba(0,0,0,0.6), rgba(0,0,0,0.1));
}

/* 标题 */
.product-card span{
  position:relative;
  z-index:2;
  padding:12px;
  font-size:16px;
  line-height:1.4;
}

/* hover效果（PC端） */
.product-card:hover{
  transform:translateY(-6px);
  box-shadow:0 10px 25px rgba(0,0,0,0.15);
}

/* ===== 平板（2列） ===== */
@media (max-width: 992px){
  .product-grid{
    grid-template-columns:repeat(2, 1fr);
  }

  .product-card{
    height:200px;
  }
}

/* ===== 手机（2列，推荐） ===== */
@media (max-width: 576px){
  .product-grid{
    grid-template-columns:repeat(2, 1fr);
    gap:12px;
  }

  .product-card{
    height:150px;
  }

  .product-card span{
    font-size:14px;
    padding:8px;
  }
}



/* ===== 公共标题 ===== */
section h2{
  text-align:center;
  margin-bottom:20px;
  font-size:24px;
}



/* ===== 平台简介 ===== */
.about-box{
  display:flex;
  gap:40px;
  align-items:center;
}

.about-img img{
  width:100%;
  max-width:500px;
  border-radius:6px;
}

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

.about-text p{
  line-height:1.8;
  margin-bottom:15px;
  color:#666;
}

/* 手机 */
@media(max-width:768px){
  .about-box{
    flex-direction:column;
  }
}

/* ===== news ===== */
.news{
  background:#f5f6f7;
  padding:60px 0;
}

.news-title{
  text-align:center;
  font-size:28px;
}

.news-sub{
  text-align:center;
  color:#888;
  margin-bottom:40px;
}

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

.news-card{
  background:#fff;
  padding:20px;
  border-radius:8px;
  text-decoration:none;
  color:#333;
  box-shadow:0 5px 15px rgba(0,0,0,0.05);
  transition:all .3s;
}

.news-card:hover{
  transform:translateY(-5px);
}

.news-card .date{
  font-size:14px;
  color:#999;
}

.news-card h3{
  margin:10px 0;
  font-size:18px;
}

.news-card p{
  color:#666;
  font-size:14px;
}

/* 手机 */
@media(max-width:768px){
  .news-grid{
    grid-template-columns:1fr;
  }
}


/* ===== 合作机构 ===== */
.partner-logos{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:20px;
  align-items:center;
}

.partner-logos img{
  width:100%;
  max-height:60px;
  object-fit:contain;
}

/* ===== 手机适配 ===== */
@media(max-width:768px){

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

}



/* footer */
.footer{
  text-align:center;
  padding:20px;
  background:#f5f5f5;
}
