/* ==========================================================
   首頁專用樣式
   對應 index_html.tpl：Hero / 最新消息 / 產品介紹 / 關於我們
   （由 main.css 拆出；共用的 .section / .btn-outline-more 仍在 main.css）
========================================================== */

/* ==========================================================
   Hero
========================================================== */
.hero {
  background: #fff;
  border-radius: 60px 60px 0 0;
  position: relative;
  z-index: 10;
}

.hero-pad {
  padding: 0;
}

.hero-swiper {
  border-radius: 60px 60px 0 0;
  background: linear-gradient(135deg, #0b1730, #12213f);
  padding-bottom: 6rem;
}

.hero-slide {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-slide::before {
  content: '';
  display: block;
  padding-bottom: 38%;
}

.hero-media {
  position: relative;
  display: inline-block;
}

.hero .swiper-pagination {
  padding-bottom: 9rem;
}

.hero .swiper-pagination-bullet {
  background: rgba(255, 255, 255, .4);
  opacity: 1;
}

.hero .swiper-pagination-bullet-active {
  background: var(--brand-gold);
}

/* ==========================================================
   News
========================================================== */
.news-section {
  background: #fff;
  border-radius: 70px 70px 0 0;
  margin-top: -9rem;
  padding-bottom: 9rem;
  position: relative;
  z-index: 20;
}

.news-card-box {
  padding: 20px 0;
}

.news-card {
  display: block;
  background: #E3E4EA;
  border-radius: 30px;
  overflow: hidden;
  height: 100%;
  transition: transform .25s ease, box-shadow .25s ease;
  padding: 1.4rem;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.news-card:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .08);
}

.news-card__img {
  background: #dcdae2;
  background-size: cover;
  background-repeat: no-repeat;
  border-radius: 10px;
  aspect-ratio: 16 / 9;
}

.news-card__body {
  padding-top: 1rem;
  position: relative;
}

.news-group {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 10px;
}

.tag-handson {
    background: #8EC31F;
}

.tag-webinar {
    background: #9F9FA0;
}

.tag-exhibition {
    background: #00A1E9;
}

.news-tag {
  display: inline-block;
  position: relative;
  top: 0;
  padding: 2px 10px;
  border-radius: 7px;
  font-size: 16px;
  font-weight: 400;
  color: #fff;
}

.news-card__body time {
  display: block;
  font-size: 16px;
  color: #4d4a49;
  margin-bottom: 6px;
  margin-top: 16px;
}

.news-card__body h3 {
  font-size: 22px;
  font-weight: 800;
  color: #4d4a49;
  margin: 0 0 12px;
  line-height: 1.4;
}

.news-card__body p {
  font-size: 16px;
  line-height: 1.8;
  color: #87888e;
  margin: 0 0 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 80px;
}

.read-more {
  color: var(--ink);
  font-weight: 300;
  font-size: 15px;
  text-decoration: none;
}

.news-swiper .swiper-slide {
    height: auto;
    padding-bottom: 2rem;
    padding-top: 1rem;
}

.news-swiper .news-card__body {
  padding-bottom: 0;
}

.news-footer-controls {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.news-card-nav {
  display: flex;
  justify-content: flex-end;
}

.card-nav-group {
  display: flex;
  border-radius: 8px;
  overflow: hidden;
}

.card-nav-group button {
  width: 44px;
  height: 32px;
  border: none;
  background: var(--nav-dark);
  color: #fff;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.card-nav-group button:first-child {
  border-right: 1px solid rgba(255, 255, 255, .2);
}

/* ==========================================================
   Products
========================================================== */
.products-section {
  background: var(--products-bg);
  margin-top: -3rem;
  padding-bottom: 9rem;
  position: relative;
  z-index: 30;
  border-radius: 60px 60px 0 0;
}

.products-card {
  background: var(--products-bg);
  border-radius: 28px;
  padding: 56px 0;
  display: flex;
  gap: 0;
  flex-direction: column;
}

.products-txt {
  height: 100%;
  display: flex;
  gap: 40px;
  align-items: stretch;
}

.products-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-top: 4px;
  align-items: flex-start;
}

.products-card h2 {
  font-size: 48px;
  font-weight: 800;
  color: var(--ink-soft);
}

.products-text p {
  font-size: 16px;
  line-height: 1.8;
  color: #4a4a4a;
  /* text-align: justify; */
  margin: 0 0 0px;
}

.products-media {
  flex: 1;
  background: #fff;
  aspect-ratio: 16 / 9;
  align-items: center;
  justify-content: center;
  border-radius: 40px;
  overflow: hidden;
}

.products-media img {
  max-width: 100%;
}

/* ==========================================================
   About
========================================================== */
.about-section {
  background: var(--white);
  border-radius: 60px;
  margin-top: -4rem;
  position: relative;
  z-index: 40;
}

.about-card {
  background: #fff;
  border-radius: 28px;
  padding: 48px 0;
}

.about-card h2 {
  font-size: 48px;
  font-weight: 800;
  color: var(--ink-soft);
  margin: 0 0 24px;
}

.about-body {
  display: flex;
  gap: 40px;
  align-items: stretch;
  flex: 1;
}

.about-img {
  border-radius: 16px;
  aspect-ratio: 16 / 9;
  flex: 1;
}

.about-img img {
  display: block;
  width: 100%;
  border-radius: 40px;
  aspect-ratio: 16 / 9;
}

.about-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: end;
  justify-content: space-between;
  padding-top: 4px;
}

.about-text p {
  font-size: 16px;
  line-height: 1.9;
  color: #4a4a4a;
  margin: 0;
}

.about-text .btn-wrap {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
  padding-top: 40px;
}

@media (max-width:991px) {
  .hero-swiper {
    border-radius: 40px;
    margin-bottom: 16px;
    overflow: hidden;
  }
  .hero-slide {
    padding: 28px 4px 40px;
    text-align: left;
  }
  .hero-title {
    font-size: 22px;
  }
  .hero-product {
    max-width: 78%;
  }
  .hero-badge {
    width: 64px;
    height: 64px;
    font-size: 11px;
  }
  .news-section {
    padding-bottom: 76px;
  }
  .news-card-box {
    padding: 0;
  }
  .news-group {
    display: flex;
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    gap: 0;
    margin-bottom: 1rem;
  }
  .news-card__body h3 {
    font-size: 20px;
  }
  .news-card__body p {
    font-size: 16px;
  }
  .news-card__body time {
    margin: 0;
  }
  .products-section {
    margin-top: -3rem;
    padding: 28px 0 75px;
  }
  .products-card {
    flex-direction: column;
    padding: 0 .75rem;
    border-radius: 20px;
  }
  .products-text {
    flex: 1;
    width: 100%;
  }
  .products-card h2 {
    font-size: 30px;
    margin-bottom: 16px;
  }
  .products-media {
    height: 170px;
    margin-bottom: 18px;
    width: 100%;
  }
  .about-section {
    background: #fff;
    margin-top: -2rem;
    padding: 30px 0.5rem 40px;
    border-radius: 30px;
  }
  .about-card {
    padding: 0;
    border-radius: 20px;
  }
  .about-card h2 {
    font-size: 30px;
    margin-bottom: 14px;
  }
  .about-body {
    flex-direction: column;
    gap: 0;
  }
  .about-img {
    flex: 1;
    width: 100%;
    margin-bottom: 16px;
  }
  .about-text {
    width: 100%;
    padding-top: 0;
    align-items: start;
  }
  .about-text .btn-wrap {
    justify-content: flex-start;
    padding-top: 0;
    margin-top: 0;
  }
}
