/* 全局样式 */
:root {
  --primary-color: #0078d4;
  --secondary-color: #005a9e;
  --accent-color: #ffb900;
  --text-color: #333333;
  --light-gray: #f5f5f5;
  --medium-gray: #e0e0e0;
  --dark-gray: #666666;
  --white: #ffffff;
  --max-width: 1200px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
  color: var(--text-color);
  line-height: 1.6;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--secondary-color);
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* 头部样式 */
header {
  background-color: var(--white);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 50px;
}

.logo h1 {
  margin-left: 10px;
  font-size: 1.8rem;
  color: var(--primary-color);
}

/* 导航样式 */
nav ul {
  display: flex;
  list-style: none;
}

nav ul li {
  margin-left: 30px;
}

nav ul li a {
  font-size: 1.1rem;
  font-weight: 500;
}

.nav-active {
  color: var(--secondary-color);
  border-bottom: 2px solid var(--secondary-color);
}

.mobile-menu-btn {
  display: none;
  font-size: 1.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--primary-color);
}

/* 页面主体 */
main {
  margin-top: 80px;
  min-height: calc(100vh - 180px);
}

/* 横幅 */
.banner {
  position: relative;
  height: 500px;
  overflow: hidden;
}

.banner-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.banner-slide.active {
  opacity: 1;
}

.banner-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: var(--white);
  width: 80%;
  max-width: 800px;
}

.banner-content h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.banner-content p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.btn {
  display: inline-block;
  padding: 12px 25px;
  background-color: var(--primary-color);
  color: var(--white);
  border-radius: 4px;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.btn:hover {
  background-color: var(--secondary-color);
  color: var(--white);
}

/* 部分样式 */
.section {
  padding: 60px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 40px;
}

.section-title h2 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.section-title p {
  color: var(--dark-gray);
  max-width: 800px;
  margin: 0 auto;
}

/* 关于我们 */
.about-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
}

.about-card {
  flex: 1;
  min-width: 250px;
  background-color: var(--white);
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  padding: 30px;
  transition: transform 0.3s ease;
}

.about-card:hover {
  transform: translateY(-10px);
}

.about-card .icon {
  margin-bottom: 20px;
}

.about-card .icon img {
  width: 70px;
  height: 70px;
}

.about-card i {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.about-card h3 {
  margin-bottom: 15px;
}

/* 产品服务 */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.product-card {
  background-color: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  position: relative;
}

.product-card:hover {
  transform: translateY(-5px);
}

.product-img {
  height: 200px;
  overflow: hidden;
}

.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .product-img img {
  transform: scale(1.05);
}

.product-content {
  padding: 20px;
}

.product-content h3 {
  margin-bottom: 10px;
}

.product-content p {
  color: var(--dark-gray);
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  line-clamp: 4;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 30px;
}

.product-content a{
  position: absolute;
  bottom: 10px;
  right: 10px;
}

/* 新闻动态 */
.news-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.news-card {
  background-color: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  position: relative;
}

.news-card:hover {
  transform: translateY(-5px);
}

.news-img {
  height: 180px;
  overflow: hidden;
}

.news-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.news-card:hover .news-img img {
  transform: scale(1.05);
}

.news-content {
  padding: 20px;
}

.news-date {
  color: var(--dark-gray);
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.news-content h3 {
  margin-bottom: 10px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  line-clamp: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.news-content p {
  color: var(--dark-gray);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  line-clamp: 4;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 30px;
}

.news-content a{
  position: absolute;
  bottom: 10px;
  right: 10px;
}

.news-meta{
  padding: 20px 0;
}

/* 联系我们 */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

.contact-info {
  display: flex;
  flex-direction: column;
}

.info-item {
  display: flex;
  margin-bottom: 25px;
}

.info-item i {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-right: 15px;
}

.info-text h3 {
  margin-bottom: 5px;
}

.contact-form form {
  display: flex;
  flex-direction: column;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--medium-gray);
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* 底部 */
footer {
  background-color: #2c3e50;
  color: var(--white);
  padding: 60px 0 30px;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.footer-column h3 {
  font-size: 1.3rem;
  margin-bottom: 20px;
  color: var(--white);
}

.footer-column ul {
  list-style: none;
}

.footer-column ul li {
  margin-bottom: 10px;
}

.footer-column ul li a {
  color: #b3b3b3;
  transition: color 0.3s ease;
}

.footer-column ul li a:hover {
  color: var(--white);
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-links a {
  display: inline-block;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  text-align: center;
  line-height: 40px;
  color: var(--white);
  transition: background-color 0.3s ease;
}

.social-links a:hover {
  background-color: var(--primary-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 回到顶部按钮 */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background-color: var(--primary-color);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--secondary-color);
}

.page-header {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 60px 0;
  text-align: center;
}

.page-header h1 {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.breadcrumb {
  display: flex;
  justify-content: center;
  list-style: none;
}

.breadcrumb li {
  display: flex;
  align-items: center;
}

.breadcrumb li:not(:last-child)::after {
  content: '/';
  margin: 0 10px;
  color: rgba(255, 255, 255, 0.7);
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.7);
}

.breadcrumb a:hover {
  color: var(--white);
}

.breadcrumb .active {
  color: var(--white);
}