﻿/* ========== Home Page Styles ========== */
/* 首页独有样式：Hero Banner、Products Grid、Lab Banner、News Section、Banner Page/Next */

/* ========== Hero Banner ========== */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  display: flex;
  align-items: center;
  animation: heroFadeIn 1.2s ease-out both;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-color: #0d1b2a;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  transform: scale(1.05);
  animation: heroBgZoom 8s ease-out 0s forwards;
}
/* 首屏第一张背景（正常由内联 style 提供，此处为兜底） */
.carousel-slide:first-child .hero-bg {
  background-image: url('../assets/reinwind_images/pic/flash/banner-4.jpg');
}
@keyframes heroBgZoom {
  to { transform: scale(1); }
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding: 0 var(--wrap-pad-x);
  width: 100%;
}
.hero-title {
  font-family: var(--font-body);
  font-weight: var(--fw-title);
  font-size: 52px;
  line-height: 1.2;
  color: #fff;
  margin-bottom: 8px;
}
.hero-title .accent-line {
  display: block;
  width: 32px;
  height: 4px;
  background: var(--color-primary);
  margin-bottom: 16px;
}
.hero-subtitle {
  font-family: var(--font-body);
  font-weight: var(--fw-desc);
  font-size: 16px;
  color: rgba(255,255,255,0.8);
  margin-bottom: 36px;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  padding: 14px 32px;
  border-radius: 40px;
  transition: background 0.3s, transform 0.2s;
}
.hero-cta:hover { background: #0E4BDB; transform: translateY(-1px); }
.hero-cta svg { width: 16px; height: 16px; }

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ========== Products Grid ========== */
.products-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
}
.product-card {
  position: relative;
  min-height: 320px;
  padding: 50px var(--wrap-pad-x);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--color-gray-light);
  border: 1px solid #eee;
  transition: background 0.3s;
  overflow: hidden;
}
.product-card:hover { background: #fff; }
.product-card .en-label {
  font-family: var(--font-en);
  font-size: 13px;
  color: var(--color-gray-mid);
  font-weight: 400; /* Regular */
  margin-bottom: 8px;
}
.product-card .cn-title {
  font-family: var(--font-body);
  font-weight: var(--fw-title);
  font-size: 28px;
  color: var(--color-black);
}
.product-card .product-img {
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  width: 300px;
  max-height: 200px;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.4s;
}
.product-card:hover .product-img { opacity: 1; }
.product-card.has-img {
  background: #fff;
}
.product-card.has-img .product-img {
  opacity: 1;
}

/* ========== Lab Banner ========== */
.lab-section {
  position: relative;
  width: 100%;
  height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.lab-bg {
  position: absolute;
  inset: 0;
  background: url('../assets/reinwind_images/pic/flash/banner-2.jpg') center center / cover no-repeat;
}
.lab-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
}
.lab-content {
  position: relative;
  z-index: 2;
  text-align: center;
}
.lab-content h2 {
  font-family: var(--font-body);
  font-weight: var(--fw-title);
  font-size: 36px;
  color: #fff;
  margin-bottom: 16px;
}
.lab-content p {
  font-family: var(--font-body);
  font-weight: var(--fw-desc);
  font-size: 16px;
  color: rgba(255,255,255,0.8);
  margin-bottom: 36px;
}
.lab-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  padding: 14px 32px;
  border-radius: 40px;
  transition: background 0.3s, transform 0.2s;
}
.lab-cta:hover { background: #0E4BDB; transform: translateY(-1px); }
.lab-cta svg { width: 16px; height: 16px; }

/* ========== News Section ========== */
.news-section {
  padding: 80px var(--wrap-pad-x);
  max-width: var(--wrap-max);
  margin: 0 auto;
}
.news-header {
  text-align: center;
  margin-bottom: 50px;
}
.news-header .section-label {
  font-family: var(--font-en);
  font-size: 14px;
  color: var(--color-gray-mid);
  font-weight: 400; /* Regular */
  margin-bottom: 8px;
}
.news-header h2 {
  font-family: var(--font-body);
  font-weight: var(--fw-title);
  font-size: 32px;
  color: var(--color-black);
}
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.news-card {
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 4px;
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.2s;
}
.news-card:hover {
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}
.news-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.news-card-body {
  padding: 24px;
}
.news-card-tag {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--color-primary);
  margin-bottom: 10px;
}
.news-card-title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-black);
  margin-bottom: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.news-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.news-card-date {
  font-family: var(--font-body);
  font-weight: var(--fw-desc);
  font-size: 12px;
  color: var(--color-gray-mid);
}
.news-card-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  transition: background 0.3s, color 0.3s;
}
.news-card-arrow:hover {
  background: var(--color-primary);
  color: #fff;
}
.news-card-arrow svg { width: 14px; height: 14px; }

/* News Card Image Zoom */
.news-card-img-wrap {
  overflow: hidden;
  position: relative;
}
.news-card:hover .news-card-img {
  transform: scale(1.08);
}
.news-card-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.3) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
}
.news-card:hover .news-card-img-wrap::after {
  opacity: 1;
}

/* News Arrow Rotate */
.news-card-arrow svg {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.news-card:hover .news-card-arrow svg {
  transform: rotate(45deg);
}

/* Lab Parallax */
.lab-bg {
  transition: transform 0.1s linear;
}

/* ========== Hero Entrance Animations (Carousel) ========== */
.carousel {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
}
.carousel-slide.active {
  opacity: 1;
  z-index: 1;
}
.carousel-slide .hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  transition: transform 6s ease-out;
}
.carousel-slide.active .hero-bg {
  transform: scale(1);
}
.carousel-slide .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
  z-index: 1;
}
.carousel-slide .hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding: 0 var(--wrap-pad-x);
  width: 100%;
}
.carousel-slide .hero-title {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s;
}
.carousel-slide.active .hero-title {
  opacity: 1;
  transform: translateY(0);
}
.carousel-slide .hero-subtitle {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s;
}
.carousel-slide.active .hero-subtitle {
  opacity: 1;
  transform: translateY(0);
}
.carousel-slide .hero-cta {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.6s, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.6s;
}
.carousel-slide.active .hero-cta {
  opacity: 1;
  transform: translateY(0);
}

/* Hero Parallax */
.carousel-slide.active .hero-bg {
  transform: scale(1);
}

/* ========== Banner Page (right side tabs) ========== */
.banner_page {
  position: absolute;
  z-index: 2;
}
@media (min-width: 992px) {
  .banner_page {
    transform: translateY(-50%);
    top: 50%;
    right: 0;
    text-align: right;
    padding-right: 16px;
  }
}
@media (max-width: 991px) {
  .banner_page {
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    width: 100%;
  }
}
.banner_page div {
  margin-bottom: 30px;
  transition: all 0.3s linear;
}
@media (max-width: 1440px) { .banner_page div { margin-bottom: 26px; } }
@media (max-width: 1199px) { .banner_page div { margin-bottom: 20px; } }
@media (max-width: 991px) { .banner_page div { margin-bottom: 0; margin: 0 15px; padding-bottom: 10px; } }
@media (max-width: 767px) { .banner_page div { padding-bottom: 5px; } }
.banner_page span {
  font-size: 12px;
  opacity: 0.5;
  position: relative;
  color: #fff;
  cursor: pointer;
  width: 100%;
  display: inline-block;
}
@media (max-width: 991px) { .banner_page span { padding-bottom: 10px; } }
@media (max-width: 767px) { .banner_page span { padding-bottom: 5px; } }
.banner_page span:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #fff;
  transition: width 0.3s linear;
}
.banner_page .on { padding-bottom: 17px; }
@media (max-width: 1440px) { .banner_page .on { padding-bottom: 14px; } }
@media (max-width: 1199px) { .banner_page .on { padding-bottom: 10px; } }
@media (max-width: 991px) { .banner_page .on { padding-bottom: 0; } }
.banner_page .on span {
  opacity: 1;
  padding-bottom: 17px;
}
@media (max-width: 1440px) { .banner_page .on span { padding-bottom: 14px; } }
@media (max-width: 991px) { .banner_page .on span { padding-bottom: 10px; } }
@media (max-width: 767px) { .banner_page .on span { padding-bottom: 5px; } }
.banner_page .on span:after {
  width: 100%;
  background-color: var(--color-primary);
  animation: indProgress 5s linear;
}

/* ========== Banner Next (scroll down indicator) ========== */
.banner_next {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: #ffffff;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  cursor: pointer;
}
@media (max-width: 991px) { .banner_next { display: none; } }
.banner_next i {
  display: block;
  height: 50px;
  width: 1px;
  background-color: #fff;
  opacity: 0.2;
  margin-top: 20px;
}
@media (max-width: 1440px) { .banner_next i { height: 40px; margin-top: 10px; } }
@media (max-width: 1199px) { .banner_next i { margin-top: 30px; } }
.banner_next span {
  animation: bannerNextFloat 2.8s ease-in-out infinite;
}
@keyframes bannerNextFloat {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(-8px); opacity: 1; }
}

/* ========== Home Page Responsive ========== */
@media (max-width: 1024px) {
  .hero-title { font-size: 40px; }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
}
/* 移动端 / 平板竖屏：产品品牌卡片一屏一卡片 */
@media (max-width: 991px) {
  .products-section { grid-template-columns: 1fr !important; }
  .product-card {
    min-height: auto;
    padding: 32px var(--wrap-pad-x);
    justify-content: flex-start;
  }
  .product-card .cn-title { font-size: 22px; }
  .product-card .product-img {
    position: static;
    transform: none;
    width: 100%;
    max-width: 300px;
    max-height: 200px;
    margin: 16px auto 0;
  }
  .products-more {
    grid-column: 1 !important;
    justify-content: flex-start;
    padding: 24px var(--wrap-pad-x) 8px;
  }
}
@media (max-width: 768px) {
  .hero-title { font-size: 32px; }
  .news-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .product-card { padding: 28px 20px; }
  .product-card .cn-title { font-size: 20px; }
}
@media print {
  .hero { height: auto; min-height: 300px; }
}
