/* 基本 navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  font-size: 0.95rem;
  white-space: nowrap;
  background-color: #000 !important;
}

/* LOGO */
.navbar-brand {
  font-family: 'Noto Sans TC', sans-serif !important;
  font-size: 28px !important;
  font-weight: 600 !important;
  letter-spacing: 0.5em !important;
  margin-left: 20px !important;
  display: flex;
  align-items: center;
  white-space: nowrap; /* 防止換行 */
  flex-shrink: 0; /* 不縮小 */
}

/* LOGO 圖片 */
.navbar-brand img {
  height: 40px;
  margin-right: 20px;
  flex-shrink: 0;
}

/* 導覽內容容器 */
#templatemo_main_nav > div.container.d-flex.align-items-center.flex-nowrap.justify-content-between {
  width: 100%;
  overflow: visible !important;
  min-height: 64px; /* 固定橫幅高度 */
}

/* 導覽內容第二層容器 */
#templatemo_main_nav > div.container > div.d-flex.flex-column.flex-lg-row.align-items-lg-center.gap-4.ms-auto.text-end {
  flex-direction: row !important; /* 在大螢幕是排成一排 */
  flex-wrap: nowrap !important;
  justify-content: flex-end;
  align-items: center;
  gap: 1.5rem;
}

/* 導覽選單 */
#templatemo_main_nav ul.navbar-nav {
  flex-direction: row !important;
  gap: 1.5rem;
  padding-left: 0px;
  margin-bottom: 0;
  white-space: nowrap;
  list-style: none;
  margin-right: 4rem; /* 導覽選單和社群按鈕間距 */
}

/* nav-link 顏色與 hover */
.navbar-nav .nav-link {
  color: white;
  text-decoration: none;
  white-space: nowrap;
}

.navbar-nav .nav-link:hover {
  color: rgb(216, 48, 140) !important;
}

/* 社群按鈕容器 */
#templatemo_main_nav .d-flex.gap-3.justify-content-end {
  justify-content: flex-end;
  white-space: nowrap;
  flex-shrink: 0;
  margin-right: 2rem;
}

/* 社群按鈕圖示 */
#templatemo_main_nav .d-flex.gap-3.justify-content-end a i {
  color: white;
  transition: color 0.3s ease;
  font-size: 1.5rem;
}

#templatemo_main_nav .d-flex.gap-3.justify-content-end a:hover i {
  color: rgb(216, 48, 140) !important;
}

/* 語言切換按鈕容器 */
#language-switcher {
  font-weight: 600;
  user-select: none;
  color: white;
  white-space: nowrap;
  flex-shrink: 0;
  margin-right: 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* 語言按鈕 */
#language-switcher .lang-btn {
  color: white;
  cursor: pointer;
  transition: color 0.3s ease;
  text-decoration: none;
  padding: 0;
  margin: 0 0.3rem;
  white-space: nowrap;
  background: none;
  border: none;
}

/* 語言按鈕 hover */
#language-switcher .lang-btn:hover {
  color: rgb(216, 48, 140) !important;
}

/* 選中語言 */
#language-switcher .active-lang {
  color: rgb(216, 48, 140);
  cursor: default;
  text-decoration: none;
}

/* container 調整 */
.container.d-flex.align-items-center {
  max-width: 100% !important;
  padding-left: 1rem;
  padding-right: 1rem;
  position: relative;
  display: flex;
  align-items: center;
}

/* 移除 margin-left 過大 */
.button-margin-left {
  margin-left: 0 !important;
  max-width: none;
}

/* 下拉選單的父元素要相對定位 */
.navbar-nav li.nav-item.dropdown {
  position: relative;
}

/* 下拉選單容器，初始隱藏 */
.navbar-nav ul.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #000;
  padding: 0.5rem 0;
  margin: 0;
  list-style: none;
  min-width: 160px;
  border-radius: 4px;
  box-shadow: 0 0 8px rgba(0,0,0,0.3);
  z-index: 10000;
  /* 移除 opacity 與 visibility */
}

.navbar-nav li.nav-item.dropdown:hover > ul.dropdown-menu {
  display: block;
}


/* 下拉選單裡的連結樣式 */
.navbar-nav ul.dropdown-menu li a.dropdown-item {
  display: block;
  padding: 0.5rem 1.5rem;
  color: rgb(255, 255, 255);
  text-decoration: none;
  white-space: nowrap;
}

/* 下拉選單連結 hover */
.navbar-nav ul.dropdown-menu li a.dropdown-item:hover {
  background-color: rgb(216, 48, 140);
  color: white;
}

/* 手機板特化 */
/* 最大寬度 991.98px以下 */
@media (max-width: 991.98px) {
  .navbar-brand {
   font-size: 30px !important;
   letter-spacing: 0.3em !important;
   text-align: left;
 }
  /* 導覽容器保持一排不換行 */
  #templatemo_main_nav > div.container > div.d-flex.flex-column.flex-lg-row.align-items-lg-center.gap-4.ms-auto.text-end {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow: hidden !important;
  }

  /* 導覽選單隱藏 */
  #templatemo_main_nav ul.navbar-nav {
    display: none !important;
  }

  /* 社群按鈕隱藏 */
  #templatemo_main_nav .d-flex.gap-3.justify-content-end {
    display: none !important;
  }

  /* 語言切換按鈕隱藏 */
  #language-switcher {
    display: none !important;
  }
}

/*影片手機板位移*/
@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;
  }
}

#custom_footer {
    padding-top: 0px;
    padding-bottom: 60px;
    background-color: #111827;
    color: #dcdde1;
}

#custom_footer .container {
    padding-left: 15px;
    padding-right: 15px;
    max-width: 1140px;
    margin: 0 auto;
}

#custom_footer h5 {
    margin-bottom: 20px;
    color: white;
    font-weight: 500;
}

#custom_footer ul.custom-footer-link-list li {
    padding-top: 10px;
}

#custom_footer a {
    color: #dcdde1;
    text-decoration: none;
}

#custom_footer a:hover {
    color: rgb(216, 48, 140);
}

#custom_footer .copyright-area {
    display: flex;
    justify-content: center; /* 水平置中 */
    align-items: center;     /* 垂直置中 */
    height: 50px;            /* 高度可自行調整 */
    margin-top: 10px;
}

#custom_footer .border-light {
    border-color: #ffffff !important;
}

#custom_footer .bg-black {
    background-color: #474747 !important;
}

#custom_footer .pt-5 {
    padding-top: 3rem;
}

#custom_footer ul.footer-icons li {
    margin-right: 10px;
}

#custom_footer .col-md-4 {
    padding-bottom: 2rem;
}

#custom_footer p,
#custom_footer li,
#custom_footer a {
    font-size: 16px;
    line-height: 1.6;
}
