/* ============================================================
   INDEX.CSS — Homepage specific styles
   ============================================================ */

/* ============================================================
   HERO CAROUSEL
   ============================================================ */
.hero-carousel {
  position: relative;
  height: 100vh;
  min-height: 600px;
  max-height: 900px;
  overflow: hidden;
  background: var(--c-dark);
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.carousel-slide {
  flex: 0 0 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* ---- 真实图片作为幻灯片背景 ---- */

/* 背景图片 — 全屏覆盖 */
.slide-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  z-index: 0;
  transition: transform 8s ease;
}
/* 轻微 Ken Burns 效果 */
.carousel-slide.active .slide-img {
  transform: scale(1.06);
}
.carousel-slide:not(.active) .slide-img {
  transform: scale(1);
}

/* 深色渐变遮罩 — 保证文字可读性 */
.slide-bg {
  position: absolute; inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* 第一张：黑色场景图，左侧遮罩较轻 */
.slide-1 .slide-bg {
  background:
    linear-gradient(90deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.15) 100%),
    linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 50%);
}
/* 第二张：户外草地，底部+左侧压暗 */
.slide-2 .slide-bg {
  background:
    linear-gradient(90deg, rgba(0,0,0,0.68) 0%, rgba(0,0,0,0.38) 55%, rgba(0,0,0,0.1) 100%),
    linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 55%);
}
/* 第三张：全景绿地，整体压暗 */
.slide-3 .slide-bg {
  background:
    linear-gradient(90deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.42) 50%, rgba(0,0,0,0.15) 100%),
    linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 50%);
}

/* 顶部渐变（衔接白色 header） */
.carousel-slide::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.35) 0%, transparent 100%);
  z-index: 1;
  pointer-events: none;
}

/* SLIDE CONTENT */
.slide-content {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
  padding-top: 96px;
  width: 100%;
}

.slide-tag {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--c-gold);
  margin-bottom: 16px;
  opacity: 0;
  animation: slideUp 0.6s 0.2s forwards;
}

.slide-content h1 {
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 700;
  color: var(--c-white);
  line-height: 1.1;
  margin-bottom: 20px;
  opacity: 0;
  animation: slideUp 0.6s 0.35s forwards;
}
.slide-content h1 span {
  color: var(--c-gold);
  display: block;
}

.slide-desc {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  color: rgba(255,255,255,0.7);
  max-width: 520px;
  margin-bottom: 36px;
  opacity: 0;
  animation: slideUp 0.6s 0.5s forwards;
}

.slide-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  opacity: 0;
  animation: slideUp 0.6s 0.65s forwards;
}

/* SLIDE VISUAL CARD */
.slide-visual {
  position: absolute;
  right: max(40px, calc((100% - 1400px)/2 + 40px));
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  opacity: 0;
  animation: fadeIn 0.8s 0.5s forwards;
}

.visual-card {
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-lg);
  padding: 32px 40px;
  text-align: center;
  color: var(--c-white);
  min-width: 180px;
}
.visual-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}
.visual-card p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}
.visual-card strong {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--c-gold);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-50%) scale(0.9); }
  to { opacity: 1; transform: translateY(-50%) scale(1); }
}

/* Reset animation on non-active slides */
.carousel-slide:not(.active) .slide-tag,
.carousel-slide:not(.active) .slide-content h1,
.carousel-slide:not(.active) .slide-desc,
.carousel-slide:not(.active) .slide-actions,
.carousel-slide:not(.active) .slide-visual {
  opacity: 0;
  animation: none;
}
.carousel-slide.active .slide-tag { animation: slideUp 0.6s 0.2s forwards; }
.carousel-slide.active .slide-content h1 { animation: slideUp 0.6s 0.35s forwards; }
.carousel-slide.active .slide-desc { animation: slideUp 0.6s 0.5s forwards; }
.carousel-slide.active .slide-actions { animation: slideUp 0.6s 0.65s forwards; }
.carousel-slide.active .slide-visual { animation: fadeIn 0.8s 0.5s forwards; }

/* CAROUSEL CONTROLS */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: var(--c-white);
  font-size: 1.2rem;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.carousel-btn:hover {
  background: var(--c-gold);
  color: var(--c-dark);
  border-color: var(--c-gold);
}
.carousel-btn.prev { left: 24px; }
.carousel-btn.next { right: 24px; }

/* DOTS */
.carousel-dots {
  position: absolute;
  bottom: 32px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}
.dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  border: 2px solid transparent;
  transition: var(--transition);
  cursor: pointer;
}
.dot.active {
  background: var(--c-gold);
  transform: scale(1.2);
}

/* PROGRESS BAR */
.carousel-progress {
  position: absolute;
  bottom: 0; left: 0;
  height: 3px;
  background: var(--c-gold);
  transition: width 0.1s linear;
  z-index: 10;
}

/* ============================================================
   STATS BAR
   ============================================================ */
.stats-bar {
  background: var(--c-dark);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 40px 0;
}
.stats-bar .container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
}

.stat-item {
  text-align: center;
  padding: 12px 48px;
  flex: 1 1 180px;
}
.stat-item strong.stat-num {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--c-gold);
  line-height: 1;
}
.stat-item > span {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--c-gold);
  vertical-align: top;
  line-height: 1.4;
}
.stat-item p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 6px;
}

.stat-divider {
  width: 1px; height: 48px;
  background: rgba(255,255,255,0.1);
  flex-shrink: 0;
}

/* ============================================================
   FEATURED PRODUCTS
   ============================================================ */
.featured-products { background: var(--c-off-white); }

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

/* 首页产品网格 - 6个产品分两排展示 */
.products-grid-home {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.product-card {
  background: var(--c-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 2px solid transparent;
  transition: var(--transition), border-color 0.3s;
  position: relative;
  cursor: pointer;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--c-gold);
}

/* 卡片图片区域 */
.card-image {
  position: relative;
  height: 200px;
  background: var(--c-gray-100);
  overflow: hidden;
}
.card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.product-card:hover .card-image img {
  transform: scale(1.05);
}

.card-badge {
  position: absolute;
  top: 12px; left: 12px;
  padding: 4px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 100px;
  z-index: 2;
}
.card-badge-15w { background: #e84d1c; color: #fff; }
.card-badge-20w { background: #e84d1c; color: #fff; }
.card-badge-60w { background: #e84d1c; color: #fff; }
.card-badge-60w80w { background: #e84d1c; color: #fff; }
.card-badge-300w { background: #e84d1c; color: #fff; }

/* 卡片内容区域 */
.card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card-category {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--c-gold-dark);
}
.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--c-dark);
  margin: 0;
  line-height: 1.3;
  text-align: center;
}
.card-footer {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.btn-view-details {
  flex: 1;
  padding: 10px 16px;
  background: var(--c-gold-dark);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius);
  text-align: center;
  transition: var(--transition);
  text-decoration: none;
}
.btn-view-details:hover {
  background: #b45309;
}

/* ============================================================
   WHY US
   ============================================================ */
.why-us { background: var(--c-white); }

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

.why-text .section-label { margin-bottom: 12px; }
.why-text h2 { font-size: clamp(2rem, 3.5vw, 2.6rem); margin-bottom: 16px; }
.why-lead {
  font-size: 1rem;
  color: var(--c-text-light);
  margin-bottom: 32px;
  line-height: 1.8;
}

.why-list {
  list-style: none;
  margin-bottom: 36px;
}
.why-list li {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}
.why-icon {
  flex-shrink: 0;
  color: var(--c-gold);
  font-size: 1.2rem;
  margin-top: 3px;
}
.why-list strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--c-dark);
}
.why-list p {
  font-size: 0.88rem;
  color: var(--c-text-light);
  line-height: 1.7;
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.cert-badge {
  background: var(--c-gray-50);
  border: 1px solid var(--c-gray-200);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  text-align: center;
  transition: var(--transition);
}
.cert-badge:hover {
  border-color: var(--c-gold);
  box-shadow: 0 4px 16px rgba(245,158,11,0.15);
}
.cert-badge.highlight {
  background: var(--c-dark);
  border-color: var(--c-gold);
}
.cert-badge span {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--c-dark);
  line-height: 1;
  margin-bottom: 6px;
}
.cert-badge.highlight span { color: var(--c-gold); }
.cert-badge p {
  font-size: 0.72rem;
  color: var(--c-text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.cert-badge.highlight p { color: rgba(255,255,255,0.5); }

/* ============================================================
   NEWS PREVIEW
   ============================================================ */
.news-preview { background: var(--c-off-white); }

/* 首页新闻列表 */
.home-news-list {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* 首页新闻条目 */
.home-news-item {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  background: var(--c-white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
}

.home-news-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.home-news-img {
  width: 160px;
  height: 100px;
  flex-shrink: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--c-gray-200);
}

.home-news-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.home-news-item:hover .home-news-img img {
  transform: scale(1.05);
}

.home-news-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.home-news-content h3 {
  font-size: 1.15rem;
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--c-dark);
  line-height: 1.4;
  margin: 0;
  transition: color 0.2s;
}

.home-news-item:hover .home-news-content h3 {
  color: var(--c-gold-dark);
}

.home-news-date time {
  font-size: 0.85rem;
  color: var(--c-text-light);
  font-weight: 500;
}

.home-news-content p {
  font-size: 0.9rem;
  color: var(--c-text-light);
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .why-layout { gap: 48px; }
}

@media (max-width: 900px) {
  .products-grid { grid-template-columns: 1fr 1fr; }
  .products-grid-home { grid-template-columns: 1fr 1fr; }
  .why-layout { grid-template-columns: 1fr; }
  .why-visual { order: -1; }
  .cert-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  .carousel-btn { display: none; }
  .products-grid { grid-template-columns: 1fr; }
  .products-grid-home { grid-template-columns: 1fr; }
  .stat-divider { display: none; }
  .stat-item { padding: 12px 24px; }
  .stats-bar .container { justify-content: space-around; }
  .home-news-item {
    flex-direction: column;
    gap: 16px;
    padding: 20px;
  }
  .home-news-img {
    width: 100%;
    height: 180px;
  }
}
