/* 首页轮播图 */
#showcase {
	height: 600px;
	color: #fff;
	position: relative;
	overflow: hidden;
}

/* 轮播容器 */
.carousel-container {
	position: relative;
	width: 100%;
}

/* 轮播图片容器 */
.carousel-slides {
	position: relative;
	height: 100%;
	width: 100%;
}

/* 轮播图片 */
.carousel-slide {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	transition: opacity 1s ease-in-out;
	z-index: 1;
}

.carousel-slide.active {
	opacity: 1;
	z-index: 2;
}

.carousel-slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	position: absolute;
	top: 0;
	left: 0;
}

#showcase .overlay {
	background-color: rgba(0, 0, 0, 0.6);
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 3;
}

#showcase .showcase-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	height: 100%;
	padding: 0 2rem;
	position: relative;
	z-index: 10;
}

#showcase .showcase-content h1 {
	font-size: 3.5rem;
	margin-bottom: 1rem;
	animation: fadeInDown 1s ease-out;
}

#showcase .showcase-content p {
	font-size: 1.5rem;
	margin-bottom: 2rem;
	max-width: 600px;
	animation: fadeInUp 1s ease-out;
}

/* 轮播控制按钮 */
.carousel-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(0, 0, 0, 0.5);
	color: #fff;
	border: none;
	width: 50px;
	height: 50px;
	border-radius: 50%;
	font-size: 1.5rem;
	cursor: pointer;
	z-index: 20;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
}

.carousel-btn:hover {
	background: rgba(0, 0, 0, 0.8);
}

.carousel-btn.prev {
	left: 20px;
}

.carousel-btn.next {
	right: 20px;
}

/* 轮播指示器 */
.carousel-indicators {
	position: absolute;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 10px;
	z-index: 20;
}

.carousel-indicators .indicator {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.5);
	border: none;
	cursor: pointer;
	transition: all 0.3s ease;
}

.carousel-indicators .indicator.active {
	background: #fff;
	transform: scale(1.2);
}

/* 轮播动画 */
@keyframes fadeInDown {
	from {
		opacity: 0;
		transform: translateY(-30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* 轮播图响应式样式 */
@media screen and (max-width: 1200px) {
	#showcase .showcase-content h1 {
		font-size: 3rem;
	}

	#showcase .showcase-content p {
		font-size: 1.3rem;
	}
}

@media screen and (max-width: 992px) {
	#showcase {
		height: 500px;
	}

	#showcase .showcase-content h1 {
		font-size: 2.5rem;
	}

	#showcase .showcase-content p {
		font-size: 1.2rem;
		max-width: 500px;
	}

	.carousel-btn {
		width: 40px;
		height: 40px;
		font-size: 1.2rem;
	}
}

@media screen and (max-width: 768px) {
	#showcase {
		height: 400px;
	}

	#showcase .showcase-content h1 {
		font-size: 2rem;
		margin-bottom: 0.5rem;
	}

	#showcase .showcase-content p {
		font-size: 1rem;
		margin-bottom: 1.5rem;
		max-width: 400px;
	}

	.carousel-btn {
		width: 35px;
		height: 35px;
		font-size: 1rem;
	}

	.carousel-btn.prev {
		left: 10px;
	}

	.carousel-btn.next {
		right: 10px;
	}

	.carousel-indicators {
		bottom: 10px;
	}

	.carousel-indicators .indicator {
		width: 10px;
		height: 10px;
	}
}

@media screen and (max-width: 576px) {
	#showcase {
		height: 350px;
	}

	#showcase .showcase-content {
		padding: 0 1rem;
	}

	#showcase .showcase-content h1 {
		font-size: 1.8rem;
	}

	#showcase .showcase-content p {
		font-size: 0.9rem;
		max-width: 300px;
	}

	.carousel-btn {
		width: 30px;
		height: 30px;
		font-size: 0.8rem;
	}

	.carousel-indicators .indicator {
		width: 8px;
		height: 8px;
	}
}

/* 首页产品展示 */
#products {
	padding: 4rem 0;
}

#products .product-items {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 2rem;
}

#products .product-item {
	background: #fff;
	border-radius: 5px;
	overflow: hidden;
	box-shadow: var(--box-shadow);
	transition: transform 0.3s;
	display: flex;
	flex-direction: column;
}

#products .product-item:hover {
	transform: translateY(-10px);
}

#products .product-image {
	height: 200px;
	overflow: hidden;
}

#products .product-image img {
	height: 100%;
	width: 100%;
	object-fit: cover;
	transition: transform 0.5s;
}

#products .product-item:hover .product-image img {
	transform: scale(1.1);
}

#products .product-text {
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	flex: 1;
}

#products .product-text h3 {
	font-size: 1.2rem;
	margin-bottom: 1rem;
	height: 2.8em;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

#products .product-text p {
	color: #666;
	font-size: 0.95rem;
	margin-bottom: 1.5rem;
	flex: 1;
	min-height: 70px;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}

#products .price-action-container {
	margin-top: auto;
}

#products .product-text .price {
	color: var(--primary-color);
	font-weight: bold;
	font-size: 1.2rem;
	margin-bottom: 1rem;
	display: block;
}

#products .product-text .btn {
	width: 100%;
	text-align: center;
	padding: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.5px;
}

/* 客户评价 */
#testimonials {
	background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://picsum.photos/id/1059/1920/600') no-repeat center center/cover;
	padding: 4rem 0;
	color: #fff;
}

#testimonials .testimonial-items {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2rem;
}

#testimonials .testimonial-item {
	background: rgba(255, 255, 255, 0.1);
	padding: 2rem;
	border-radius: 5px;
	text-align: center;
}

#testimonials .testimonial-image {
	width: 100px;
	height: 100px;
	border-radius: 50%;
	overflow: hidden;
	margin: 0 auto 1rem auto;
	border: 3px solid var(--primary-color);
}

#testimonials .testimonial-text p {
	font-style: italic;
	margin-bottom: 1rem;
}

#testimonials .testimonial-text h3 {
	color: var(--primary-color);
}

/* 博客推荐 */
#blog {
	padding: 4rem 0;
}

#blog .blog-items {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2rem;
}

#blog .blog-item {
	background: #fff;
	border-radius: 5px;
	overflow: hidden;
	box-shadow: var(--box-shadow);
}

#blog .blog-image {
	height: 200px;
	overflow: hidden;
}

#blog .blog-image img {
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s;
}

#blog .blog-item:hover .blog-image img {
	transform: scale(1.1);
}

#blog .blog-text {
	padding: 1.5rem;
}

#blog .blog-text span {
	color: var(--primary-color);
}

#blog .blog-text h3 {
	margin: 0.5rem 0;
}

#blog .blog-text a {
	color: var(--primary-color);
	font-weight: bold;
}

#blog .blog-text a:hover {
	text-decoration: underline;
}

/* 服务内容 */
#services {
	background: var(--light-color);
	padding: 4rem 0;
}

#services .service-items {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2rem;
}

#services .service-item {
	background: #fff;
	text-align: center;
	padding: 2rem;
	border-radius: 5px;
	box-shadow: var(--box-shadow);
	transition: transform 0.3s;
}

#services .service-item:hover {
	transform: translateY(-10px);
}

#services .service-item i {
  color: var(--primary-color);
  font-size: 3rem;
  margin-bottom: 1.5rem;
}

#services .service-item h3 {
  margin-bottom: 0.5rem;
}

/* 首页移动端布局优化 */
@media (max-width: 768px) {
  /* 将区块改为单栏布局 */
  #products .product-items,
  #testimonials .testimonial-items,
  #blog .blog-items,
  #services .service-items {
    grid-template-columns: 1fr;
  }

  /* 增加项目垂直间距 */
  #products .product-item,
  #testimonials .testimonial-item,
  #blog .blog-item,
  #services .service-item {
    margin-bottom: 2rem;
  }

  /* 优化按钮显示 */
  #products .product-text .btn {
    width: 100%;
    text-align: center;
    padding: 12px 20px;
    font-size: 1rem;
  }
}
