/* index.css: page-specific styles (shared nav/footer live in ../site.css) */

/*影片手機板位移*/
@media (max-width: 768px) {
  .video-top-spacing {
    margin-top: 110px; /* 根據你的 header 高度調整 */
  }
}


.highlight-section {
  max-width: 1200px;
  margin: 80px auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.highlight-row {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
  width: 100%;
}

.highlight-row.reverse {
  flex-direction: row-reverse !important;
  flex-wrap: wrap !important;
}

.highlight-image,
.highlight-text {
  flex: 1 1 50%;
  max-width: 50%;
}

.highlight-image img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}

.highlight-image:hover {
  transform: scale(1.03);
}

.highlight-text {
  flex: 1 1 50%;
  color: rgb(0, 0, 0);
  display: flex;
  flex-direction: column;
  justify-content: center; /* 文字垂直置中 */
  text-align: left; /* 文字靠左 */
}

.highlight-text h2 {
  color: rgb(216, 48, 140);
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.highlight-text p {
  font-size: 1.1rem;
  line-height: 1.6;
}

.highlight-row.reverse .highlight-text {
  text-align: right; /* 如果反轉，文字靠右 */
  flex: 0 0 48%; /* 給每個區塊不超過一半 */
}

@media (max-width: 768px) {
  .highlight-row,
  .highlight-row.reverse {
    flex-direction: column !important;
  }

  .highlight-image,
  .highlight-text {
    max-width: 100%;
  }
}

.banner-strip {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  background-color: #ffbacc;
  height: 500px;
  overflow: hidden;
}

.banner-image {
  flex: 1;
  max-width: 50%;
  overflow: hidden;
}

.banner-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 10%;
  display: block;
}

.banner-content {
  flex: 1;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: rgb(255, 255, 255);
}

.text-block h2 {
  color: rgb(255, 255, 255);
  margin: 0 0 10px;
  font-size: 48px;
  margin-top: 24px;
}

.text-block p {
  color: rgb(255, 255, 255);
  margin: 0;
  font-size: 36px;
}

.banner-button {
  align-self: flex-start;
  padding: 10px 20px;
  background-color: #ffffff;
  color: rgb(216, 48, 140);
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.2s;
  margin-bottom: 32px;
}

.banner-button:hover {
  background-color: #dddddd;
  color: #ffffff;
}

@media (max-width: 768px) {
  .banner-strip {
    flex-direction: column;
    height: auto;
  }

  .banner-image {
    width: 100%;
    max-width: 100%;
    height: 200px;
  }

  .banner-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 10%;
  }

  .banner-content {
    padding: 32px 24px;
    margin-top: 16px; /* 圖片和內容之間的距離 */
  }

  .text-block h2 {
    font-size: 28px;
    margin-bottom: 24px; /* 標題和段落的距離 */
  }

  .text-block p {
    font-size: 18px;
    margin-bottom: 24px; /* 段落和按鈕的距離 */
    line-height: 1.6;
  }

  .banner-button {
    font-size: 16px;
    padding: 10px 20px;
    margin-bottom: 36px; /* 按鈕和底部的距離 */
  }
}

/* 特色產品區塊調整 */
section.bg-light {
    padding-top: 0px;
    padding-bottom: 60px;
}

/* 區塊標題 */
.section-title {
    color: rgb(216, 48, 140);
    margin-top: 40px;
    margin-bottom: 80px;
    font-weight: 500 !important;
}

/* 卡片圖片包裹層 */
.card-img-top-wrapper {
    position: relative;
    width: 100%;
    height: 300px; /* 可調整 */
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.card-img-top-wrapper::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0);
    pointer-events: none;
    z-index: 1;
}

.card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: relative;
    z-index: 0;
    border-radius: 8px 8px 0 0;
}

/* 卡片固定大小與排版 */
.card.h-100 {
    height: 100%;
    min-height: 500px; /* 卡片總高度可依需求調整 */
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
}

.card-body {
    flex-grow: 0;            /* 取消撐滿空間 */
    height: 100px;           /* 固定高度，依需求調整 */
    overflow: hidden;        /* 隱藏超出文字 */
    text-overflow: ellipsis; /* 超出用省略號 */
    display: -webkit-box;    /* 多行截斷的基礎 */
    -webkit-box-orient: vertical;
    text-align: center;
    padding: 20px;
}

.card-body a.h2 {
    display: block;
    margin-top: 15px;
    margin-bottom: 10px;
}

.card-body p.card-text {
    margin-bottom: 20px;
}

.card-img-top-wrapper {
    overflow: hidden; /* 重要！防止放大時圖片超出邊界 */
}

.card:hover .card-img-top {
    transform: scale(1.05);
    transition: transform 0.3s ease; /* 添加平滑過渡效果 */
}

/* 每張卡片左右留白，控制間距 */
.carousel-item .col-md-4 {
    padding-left: 10px;
    padding-right: 10px;
}

/* 自訂箭頭按鈕 */
.carousel-custom-arrow {
    background-color: #ffffff;
    color: #000;
    border-radius: 50%;
    font-size: 24px;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    transition: background-color 0.3s ease;
    border: none;
}

/* 移除按鈕預設外框 */
.carousel-control-prev,
.carousel-control-next {
    width: auto;
    padding: 0;
    background: none;
    border: none;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.carousel-control-prev {
    left: -55px;
}

.carousel-control-next {
    right: -55px;
}

.carousel-control-prev:focus,
.carousel-control-next:focus {
    outline: none;
    box-shadow: none;
}

/* 響應式設定 */
/* 桌機：每次顯示三張卡片 */

@media (max-width: 991px) {
    .carousel-control-prev {
        left: -25px;
    }

    .carousel-control-next {
        right: -25px;
    }
}

@media (max-width: 767px) {
  /* 先隱藏所有卡片 */
  .carousel-item .col-md-4 {
    display: none !important;
  }

  /* 顯示被加上 active-card 的那張 */
  .carousel-item .col-md-4.active-card {
    display: block !important;
  }
}
