/* ==========================================================================
   全域設定
   包含：變數定義、Body 基礎樣式、Container、連結與按鈕重置
   ========================================================================== */
:root {
  --primary-yellow: #eec21a;
  --primary-blue: #003d5b;
  --text-white: #ffffff;
  --text-dark: #595959;
  --text-grey: #535353;
}

body {
  font-family: "Noto Sans TC", "Inter", sans-serif;
  margin: 0;
  padding: 0;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  background-color: #fff;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
}

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.absolute-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

@media (max-width: 1024px) {
  .container {
    padding: 0 20px;
  }
}

a {
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.8;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

/* ==========================================================================
   頁首導航 (Header) - 所有頁面共用
   包含：Logo、導航選單 (Nav)、漢堡選單 (Hamburger)、捲動變色效果
   ========================================================================== */
#section-header {
  position: fixed;
  width: 100%;
  z-index: 100;
  padding: 20px 10px 0 10px;
  transition: all 0.3s ease;
}

#section-header.scrolled {
  background-color: rgba(0, 61, 91, 0.9);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  padding: 10px 20px;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  position: relative;
}

.logo {
  width: 200px;
  transition: width 0.3s ease;
}

.logo img {
  width: 100%;
  height: auto;
}

#section-header.scrolled .logo {
  width: 180px;
}

.hamburger-btn {
  display: none;
  font-size: 28px;
  color: #fff;
  z-index: 102;
  padding: 5px;
}

.main-nav {
  display: flex;
  gap: 10px;
  align-items: center;
  transition: all 0.3s ease;
}
.nav-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.nav-links a {
  text-decoration: none;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.auth-links {
  font-size: 14px;
  color: #fff;
  display: flex;
  gap: 15px;
}
.auth-links a {
  color: #fff;
  text-decoration: none;
}

.auth-links::before {
  content: "|";
  color: #fff;
  margin-left: 10px;
  margin-right: 10px;
  opacity: 0.7;
}

@media (min-width: 1100px) and (max-width: 1400px) {
  .nav-links {
    gap: 10px;
  }
  .nav-links a {
    font-size: 15px;
  }
}

/* Header RWD */
@media (max-width: 1100px) {
  #section-header {
    background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.6) 0%,
      rgba(0, 0, 0, 0) 100%
    );
    padding-bottom: 20px;
  }

  .header-container {
    justify-content: space-between;
    gap: 0;
  }

  .hamburger-btn {
    display: block;
  }

  /* 手機版導航選單樣式 */
  .main-nav {
    display: none;
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: 116%;
    left: 0;
    background-color: rgba(0, 61, 91, 0.95);
    padding: 20px 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    max-height: 80vh;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .main-nav.active {
    display: flex;
  }

  .nav-links {
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
  }

  .auth-links {
    margin-top: 20px;
    justify-content: center;
    width: 100%;
  }
  .auth-links::before {
    display: none;
  }

  .nav-links a {
    font-size: 17px;
    display: block;
    padding: 5px;
  }
}

.top {
  position: fixed;
  bottom: 40%;
  right: 30px;
  width: 50px;
  height: 50px;
  z-index: 1000;
  cursor: pointer;
}

/* ==========================================================================
   下拉選單樣式 (Dropdown Menu)
   ========================================================================== */

.dropdown {
  position: relative;
}

.dropdown-toggle i {
  font-size: 12px;
  margin-left: 5px;
  transition: transform 0.3s ease;
}

.dropdown-toggle::after {
  display: none;
}

.dropdown-menu {
  display: block;
  visibility: hidden;
  opacity: 0;
  position: absolute;
  top: 150%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background-color: rgba(0, 61, 91, 0.95);
  min-width: 220px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  padding: 10px 0;
  border-radius: 4px;
  list-style: none;
  z-index: 1000;
  transition: all 0.3s ease;
}

.dropdown-menu li {
  width: 100%;
}

.dropdown-menu a {
  display: block;
  padding: 10px 20px;
  color: #fff;
  font-size: 15px;
  white-space: nowrap;
  text-decoration: none;
  text-shadow: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-menu li:last-child a {
  border-bottom: none;
}

.dropdown-menu a:hover {
  background-color: rgba(238, 194, 26, 0.1);
  color: var(--primary-yellow);
}

@media (min-width: 993px) {
  .dropdown:hover .dropdown-menu {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  .dropdown:hover .dropdown-toggle i {
    transform: rotate(180deg);
  }
}

@media (max-width: 992px) {
  .dropdown {
    width: 100%;
    text-align: center;
  }

  .dropdown-toggle {
    display: flex !important;
    justify-content: center;
    align-items: center;
  }

  .dropdown-menu {
    position: static;
    transform: none;
    visibility: visible;
    opacity: 1;
    display: none;
    background-color: rgba(0, 0, 0, 0.2);
    box-shadow: none;
    width: 100%;
    padding: 0;
    margin-top: 10px;
  }

  .dropdown-menu.show {
    display: block;
  }

  .dropdown-menu a {
    font-size: 16px;
    padding: 12px 20px;
    color: #ddd;
  }

  .dropdown-toggle.active i {
    transform: rotate(180deg);
  }
}

/* ==========================================================================
   首頁專用樣式 (Home Page)
   ========================================================================== */
/* Hero Banner (首頁大圖) */

#section-hero {
  position: relative;
  width: 100%;
  height: 60vw;
  max-height: 900px;
  min-height: 500px;
  overflow: hidden;
}

.hero-bg,
#section-hero .carousel,
#section-hero .carousel-inner,
#section-hero .carousel-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

#section-hero .carousel-item a {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-image-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-deco {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: auto;
  opacity: 0.8;
  z-index: 2;
  pointer-events: none;
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 60px;
  z-index: 5;
  pointer-events: none;
}

.hero-text-group {
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  padding: 0 20px;
  pointer-events: auto;
}

.hero-title {
  display: flex;
  flex-direction: column;
}

.hero-title-zh {
  font-size: 24px;
  letter-spacing: 30px;
  text-indent: 15px;
  margin-bottom: 10px;
}

.hero-title-en {
  font-size: 12px;
  letter-spacing: 1.6px;
  text-align: center;
}

@media (min-width: 768px) {
  .hero-title-en {
    text-align: left;
  }
}

.hero-subtitle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.brand-name {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: 8.8px;
}

.divider {
  width: 3px;
  height: 46px;
  background-color: var(--primary-yellow);
}

@media (max-width: 768px) {
  .hero-title-zh {
    letter-spacing: 10px;
  }
}

@media (max-width: 992px) {
  .hero-subtitle {
    flex-direction: column;
  }
  .divider {
    display: none;
  }
}

/* SubNav (首頁黃色次導覽列) */
#section-subnav {
  position: relative;
  z-index: 20;
  overflow: hidden;
}
@media (min-width: 992px) {
  #section-subnav {
    margin-top: -114px;
  }
  .subnav-bar {
    opacity: 0.9;
  }
}

.subnav-bar {
  background-color: var(--primary-yellow);
  padding: 24px 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  font-weight: 700;
}
.subnav-bar::after {
  content: "";
  position: absolute;
  bottom: -19px;
  left: 0;
  right: 0;
  margin: auto;
  display: block;
  width: 0;
  height: 0;
  border-top: 20px solid var(--primary-yellow);
  border-right: 20px solid transparent;
  border-left: 20px solid transparent;
}
.subnav-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  flex-wrap: nowrap;
}
.subnav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex: 1 1 0;
  min-height: 66px;
  max-width: 520px;
  text-decoration: none;
  color: var(--primary-blue);
  font-size: 24px;
  letter-spacing: 0.5px;
  text-align: center;
  transition: opacity 0.3s;
}
.subnav-item:hover {
  opacity: 0.8;
}
.subnav-item:hover > i {
  transition: transform 0.3s;
}
.subnav-item:first-child:hover > i {
  transform: translateX(-10px);
}
.subnav-item:last-child:hover > i {
  transform: translateX(10px);
}
.subnav-item:first-child {
  justify-content: flex-end;
}
.subnav-item:last-child {
  justify-content: flex-start;
}
.arrow-icon {
  font-size: 30px;
  color: #fff;
  flex-shrink: 0;
}
.subnav-divider {
  width: 1px;
  height: 56px;
  background-color: rgba(0, 62, 91, 0.3);
}

@media (max-width: 992px) {
  .subnav-container {
    flex-direction: column;
    gap: 16px;
    flex-wrap: wrap;
  }
  .subnav-divider {
    width: 80%;
    height: 1px;
  }
  .subnav-item {
    width: 100%;
    max-width: 100%;
    min-height: 56px;
    font-size: 20px;
    padding: 4px 8px;
    justify-content: center;
  }
  .subnav-item:first-child,
  .subnav-item:last-child {
    justify-content: center;
  }
}

/* Features (特色圓形圖示區) */
#section-features {
  position: relative;
  background-color: var(--primary-blue);
  padding: 70px 0 50px 0;
  color: #fff;
  overflow: hidden;
}
.features-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.1;
  pointer-events: none;
}
.features-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.features-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  text-align: center;
  position: relative;
  z-index: 2;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.feature-item:hover i {
  transform: translateY(10px);
  transition: transform 0.3s;
}
.feature-icon-wrapper {
  position: relative;
  width: 229px;
  height: 229px;
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.feature-circle {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.feature-icon-img {
  position: relative;
  width: 60%;
  height: auto;
}
.feature-title {
  color: var(--primary-yellow);
  font-size: 30px;
  margin: 8px 0 0 0;
  font-weight: 400;
}
.feature-desc {
  font-size: 20px;
  margin: 5px 0;
}
.feature-arrow {
  font-size: 40px;
}

@media (max-width: 992px) {
  .features-container {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 576px) {
  .features-container {
    grid-template-columns: 1fr;
  }
  .feature-icon-wrapper {
    max-width: 100%;
    height: auto;
    aspect-ratio: 1/1;
  }
}

/* About (關於我們區塊) */
#section-about {
  background-color: #fff;
  overflow: hidden;
}
.about-container {
  display: flex;
  align-items: center;
  gap: 150px;
  padding: 100px 0;
}

.about-content {
  flex: 1;
  position: relative;
}
.bg-text {
  position: absolute;
  top: -44px;
  right: 0;
  font-size: 131px;
  font-weight: 900;
  pointer-events: none;
  color: transparent;
  -webkit-text-stroke: 1px var(--primary-blue);
}
.section-title {
  position: absolute;
  top: 80px;
  right: -30px;
  font-size: 21px;
  color: var(--primary-blue);
  letter-spacing: 1.05px;
  margin: 0;
  font-weight: 500;
}
.about-text {
  line-height: 1.4;
  color: var(--text-dark);
  letter-spacing: 1.19px;
}
.about-text p {
  font-size: 14px;
  margin-bottom: 20px;
}
.about-text strong {
  font-size: 24px;
  font-weight: 500;
  color: var(--primary-blue);
}

@media (max-width: 992px) {
  .about-container {
    flex-direction: column;
    text-align: center;
    gap: 60px;
  }
  .bg-text {
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    text-align: center;
    top: -60px;
  }
  .section-title {
    right: 30%;
  }
}

/* Courses Slider (首頁課程輪播) */
#section-courses {
  background-color: #e1e1e1;
  overflow: hidden;
}
.courses-container {
  padding: 170px 25px 20px 25px;
}
.courses-bg-text {
  -webkit-text-stroke: 1px #fff;
}
.featured-course-link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.course-card .card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 7;
  overflow: hidden;
}
.course-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: 6px solid #fff;
  border-radius: 2rem;
}
.slider-arrow {
  width: auto;
  opacity: 1;
  position: absolute;
  top: 47%;
  transform: translateY(-50%);
  z-index: 10;
}
.slider-arrow-icon {
  color: var(--primary-blue);
  font-size: 40px;
}
.prev {
  left: -60px;
}
.next {
  right: -60px;
}

@media (max-width: 1300px) {
  .prev {
    left: 10px;
  }
  .next {
    right: 10px;
  }
}

.slider-dots {
  margin-top: 2rem;
}
.slider-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #ccc;
  border: none;
  margin: 0 5px;
  transition: background-color 0.3s;
}
.slider-dots .dot.active {
  background-color: #6c757d;
}

/* News (最新消息/公告) */
#section-news {
  position: relative;
  background-color: var(--primary-yellow);
  overflow: hidden;
}

.hot-bg-text {
  -webkit-text-stroke: 1px #fff;
}
.news-container {
  position: relative;
  padding: 130px 0 80px 0;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}
.news-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.news-item {
  display: flex;
  align-items: center;
  border-radius: 5px;
  gap: 30px;
  transition: transform 0.2s;
}
.news-item:hover {
  transform: translateX(10px);
}

.news-date {
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  line-height: 1;
  user-select: none;
}

.news-date .year {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  font-size: 18px;
  margin-right: 26px;
  letter-spacing: 3.5px;
  position: relative;
}

.news-date .month {
  font-size: 22px;
  margin-top: 2px;
}

.news-date .year::after {
  content: "";
  display: block;
  position: absolute;
  right: -16px;
  top: 50%;
  transform: translateY(-50%) rotate(20deg);
  width: 1.5px;
  height: 110%;
  background-color: rgba(255, 255, 255, 0.5);
}

.news-date .day {
  font-size: 60px;
  margin-left: 5px;
  width: 60px;
  text-align: center;
  font-weight: 300;
}

.news-content {
  flex: 1;
  font-weight: bold;
  overflow: hidden;
}
.news-tag {
  color: var(--primary-blue);
  font-size: 24px;
  margin-bottom: 5px;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  width: 100%;
  max-width: 660px;
}
.news-info {
  color: var(--text-grey);
  font-size: 17px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.news-arrow img {
  width: 20px;
}

.news-code-tag {
  font-size: 20px;
  color: #9b9b9b;
  font-weight: 400;
}

@media (max-width: 768px) {
  .news-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    margin: 0 30px;
  }
  .news-date {
    flex-direction: row;
    gap: 10px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    width: 100%;
    padding-bottom: 10px;
    justify-content: flex-start;
    box-sizing: border-box;
  }
  .news-date .year::after {
    display: none;
  }
  .news-content {
    width: 100%;
  }
  .news-tag {
    white-space: normal;
  }
  .news-arrow {
    display: none;
  }
  .course-card {
    border: 1px solid #eee;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  }
}

/* Video (首頁影片區) */
#section-video {
  position: relative;
  height: 400px;
  overflow: hidden;
  background-color: #3a3a3a;
}
.video-bg-text {
  -webkit-text-stroke: 1px var(--primary-yellow);
}
.video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.video-bg-back {
  width: 100%;
  height: 100%;
  background: #000000;
  position: absolute;
  top: 0;
  opacity: 0.6;
}
.video-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-container {
  position: relative;
  height: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
.video-content {
  display: flex;
  align-items: center;
  gap: 30px;
  color: #fff;
  padding-right: 100px;
  z-index: 0;
  margin-top: 100px;
}
.play-button-wrapper {
  color: var(--primary-yellow);
  font-size: 50px;
  cursor: pointer;
  transition: transform 0.3s;
}
.play-button-wrapper:hover {
  transform: scale(1.1);
}
.video-text {
  text-align: right;
}
.video-text p {
  font-size: 24px;
  margin: 0;
  font-weight: 300;
}
.video-text h3 {
  font-size: 48px;
  margin: 0;
  font-weight: 500;
}

@media (max-width: 992px) {
  .video-container {
    justify-content: center;
  }
  .video-content {
    flex-direction: column-reverse;
    text-align: center;
    padding-right: 0;
    justify-content: center;
    width: 100%;
  }
  .video-text {
    text-align: center;
  }
  .video-text p {
    font-size: 20px;
    margin: 10px 0;
  }
  .video-text h3 {
    font-size: 32px;
  }
}

/* ==========================================================================
   頁尾 (Footer) - 所有頁面共用
   包含：Logo、聯絡資訊、社群圖示、版權宣告
   ========================================================================== */

#section-footer {
  position: relative;
  background-color: var(--primary-blue);
  padding: 20px 0 60px 0;
  color: #fff;
  overflow: hidden;
}

.footer-container {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 40px;
}
.footer-logo {
  max-width: 500px;
}
.footer-info {
  margin-top: 50px;
  font-size: 14px;
  line-height: 1.8;
  text-align: right;
  letter-spacing: 1.1px;
  max-width: 620px;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.contact-details p {
  margin: 5px 0;
}
.contact-details span {
  color: var(--primary-yellow);
}
.contact-details span::after {
  content: "|";
  color: #fff;
  margin: 0 8px;
}
.footer-bottom {
  margin-left: 50px;
}
.social-icons {
  font-size: 40px;
}
.copyright {
  font-size: 12px;
  opacity: 0.6;
  color: #fff;
  margin-top: 20px;
  letter-spacing: 1px;
}

@media (max-width: 786px) {
  .logo {
    width: 250px;
  }
  .brand-name {
    font-size: 32px;
  }
  .hero-title-zh {
    font-size: 20px;
  }
  .hero-title-en {
    font-size: 10px;
  }
  .video-text p {
    font-size: 16px;
  }
  .video-text h3 {
    font-size: 24px;
  }
}

/* ==========================================================================
   內頁共用 Hero (Inner Page Hero)
   包含：年度課程、選課指南、學分認抵等頁面的頂部大圖與標題
   ========================================================================== */
#section-courses-hero {
  position: relative;
  width: 100%;
  height: 450px;
  overflow: hidden;
}

.hero-bottom-deco {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 12px;
  background-color: rgba(255, 255, 255, 0.25);
  display: flex;
  justify-content: center;
  align-items: flex-end;
  z-index: 10;
  backdrop-filter: blur(2px);
}

.deco-blue-block {
  width: 260px;
  height: 100%;
  background-color: var(--primary-blue);
}

@media (max-width: 768px) {
  .hero-bottom-deco {
    height: 10px;
  }
  .deco-blue-block {
    width: 180px;
  }
}

.title-block {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #fff;
}

.main-title {
  font-size: 61px;
  font-weight: 700;
  margin: 0;
  letter-spacing: 2px;
  margin-top: 140px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.sub-title-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sub-title {
  font-size: 20px;
  opacity: 0.9;
}

/* ==========================================================================
   年度課程頁 (Courses) - course.html
   ========================================================================== */
.filter-section {
  background-color: #f0f0f0;
  padding: 15px 20px;
  border-radius: 4px;
}

.filter-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.form-control {
  height: 36px;
  padding: 0 30px 0 10px;
  border: 1px solid #ddd;
  background-color: #fff;
  color: var(--primary-blue);
  font-size: 14px;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  min-width: 100px;
}

.form-control:focus {
  border-color: #0056b3;
}

.select-wrapper {
  position: relative;
}

.select-wrapper::after {
  content: "▼";
  font-size: 8px;
  color: #888;
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  padding-right: 35px;
  min-width: 150px;
}

.search-btn {
  position: absolute;
  right: 5px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 5px;
}

.view-toggles {
  display: flex;
  gap: 10px;
  align-items: center;
}

.view-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: opacity 0.2s;
}

.view-btn:hover {
  opacity: 0.7;
}

::placeholder {
  color: #003366;
  opacity: 1;
}

/* CSS for section section:CourseList */
.course-list-section {
  padding: 40px 0;
  background-color: #fff;
}

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  font-size: 14px;
  color: #3f3f3f;
  letter-spacing: 1.2px;
}

.breadcrumb-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  font-size: 14px;
}

.breadcrumb-item a {
  color: var(--primary-blue);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.breadcrumb-item a:hover {
  color: #00405d;
  text-decoration: underline;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: ">";
  color: #888;
  padding: 0 8px;
  font-weight: normal;
}

.breadcrumb-item.active {
  color: #888;
  cursor: default;
}

.course-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  transition: transform 0.2s;
  border-radius: 10px;
  overflow: hidden;
  padding: 10px;
}

.course-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.card-thumb {
  width: 100%;
  position: relative;
  background: #f0f0f0;
  overflow: hidden;
  border-radius: 10px;
  border: 5px solid #efefef;
}

.thumb-wrapper {
  position: relative;
  width: 100%;
  /* 9:5 比例計算: 5 / 9 * 100 = 55.55% */
  padding-top: 55.55%;
  height: 0;
  overflow: hidden;
  background-color: #fff;
}

.thumb-wrapper img,
.thumb-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
}

.card-content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
}

.card-header-row {
  display: flex;
  align-items: baseline;
  margin-bottom: 5px;
}

.course-title-zh {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary-blue);
  margin: 0;
}

.course-code {
  margin-left: 16px;
  font-size: 21px;
  color: #9b9b9b;
}

.course-title-en {
  font-size: 20px;
  color: #000;
  margin: 0 0 15px 0;
  font-weight: 400;
}

.card-divider {
  width: 100%;
  height: 1px;
  background-color: #e0e0e0;
  margin-bottom: 15px;
  position: relative;
}

.course-info p {
  margin: 5px 0;
  font-size: 17px;
  color: #3f3f3f;
  line-height: 1.6;
}

.course-info span {
  color: #9b9b9b;
}

.card-footer {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
  padding-top: 15px;
}

.read-more-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #3f3f3f;
}

.read-more-btn span {
  letter-spacing: 2.75px;
}

.icon-arrow {
  font-size: 22px;
  color: var(--primary-yellow);
  background-color: var(--primary-blue);
  border-radius: 50%;
  padding: 10px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .course-card {
    flex-direction: row;
    min-height: 260px;
    gap: 40px;
  }
  .card-thumb {
    width: 37%;
    flex-shrink: 0;
    align-self: flex-start;
  }
  .card-content {
    padding: 0 30px;
  }
  .card-divider::before {
    left: -30px;
    height: 100%;
    top: -25px;
    width: 1px;
    background: linear-gradient(to bottom, #eec21a 30%, transparent 30%);
    background-size: 1px 10px;
    background: #e0e0e0;
  }
  .card-content::before {
    content: "";
    position: absolute;
    left: 0;
    top: 30px;
    bottom: 0;
    width: 1px;
    background: #eee;
  }
  .card-content::after {
    content: "";
    position: absolute;
    left: 0;
    height: 60px;
    width: 4px;
    background: var(--primary-blue);
  }
  .card-divider {
    display: none;
  }
}

@media (max-width: 1200px) {
  .footer-container {
    flex-direction: column;
    align-items: center;
  }
  .footer-logo {
    width: 100%;
    text-align: center;
  }
  .footer-logo img {
    margin: 0 auto;
    max-width: 80%;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 20px;
    align-items: center;
    margin-left: 0;
  }
  .footer-info {
    text-align: center;
    width: 100%;
  }
  .contact-details span {
    display: block;
    font-weight: 700;
  }
  .contact-details span::after {
    display: none;
  }
}

.table-scroll-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 10px;
}

.course-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1000px;
  background-color: #fff;
}

.course-table thead th {
  background-color: #f0edde;
  text-align: center;
  font-weight: bold;
  padding: 15px;
  border-top: 3px solid var(--primary-blue);
  white-space: nowrap;
}

.course-table tbody td {
  padding: 20px 15px;
  border-bottom: 1px solid #eee;
  color: #333;
  font-size: 15px;
  vertical-align: middle;
}

.course-table tbody tr:hover {
  background-color: #f9f9f9;
}

.td-title {
  min-width: 300px;
}
.table-course-zh {
  font-size: 20px;
  font-weight: 500;
  color: var(--primary-blue);
}
.table-course-en {
  font-size: 14px;
  color: var(--text-dark);
}

.td-date,
.td-school,
.td-field,
.td-location {
  white-space: nowrap;
}

.td-action {
  text-align: right;
  width: 100px;
}

.course-grid-view {
  display: flex;
  flex-direction: column;
  gap: 30px;
}
@media (min-width: 768px) {
  .course-grid-view .course-card {
    flex-direction: row;
  }
}

/* ==========================================================================
   課程內容詳情頁 (Course Content) - course_content.html
   ========================================================================== */
.course-detail-layout {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 40px;
  padding-bottom: 60px;
}

.detail-sidebar {
  padding-top: 10px;
}

.sidebar-title {
  font-size: 24px;
  color: #838383;
  margin: 0;
  letter-spacing: 1px;
}

.course-detail-layout::after {
  content: "";
  position: absolute;
  top: -40px;
  left: 150px;
  width: 1px;
  height: 130px;
  background-color: #e0e0e0;
}

.detail-content {
  min-height: 400px;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
}

.course-name {
  font-size: 36px;
  font-weight: 700;
  color: var(--primary-blue);
  margin: 0 0 5px 0;
}

.course-code-tag {
  font-size: 20px;
  color: #9b9b9b;
  font-weight: 400;
  margin-left: 10px;
}

.course-name-en {
  font-size: 18px;
  color: #333;
  font-weight: 400;
  margin: 0;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border: 1px solid #999;
  border-radius: 50px;
  color: #555;
  font-size: 15px;
  text-decoration: none;
  transition: all 0.3s;
}

.btn-download i {
  color: var(--primary-blue);
  background-color: var(--primary-yellow);
  font-size: 14px;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  line-height: 22px;
}

.btn-download:hover {
  background-color: #f5f5f5;
  border-color: #666;
}

.content-divider {
  height: 1px;
  background-color: #e0e0e0;
  margin: 25px 0;
}

.course-description p {
  font-size: 16px;
  line-height: 1.8;
  color: #1d1d1d;
  margin-bottom: 15px;
}

.info-media-wrapper {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  margin-top: 30px;
}

.info-list {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
}

.info-list li {
  font-size: 16px;
  color: #333;
  margin-bottom: 12px;
  line-height: 1.6;
}

.info-list .label {
  color: #666;
  font-weight: 500;
  display: inline-block;
  min-width: 85px;
}

.info-list .sub-item {
  padding-left: 85px;
  color: #555;
  font-size: 15px;
  overflow-wrap: break-word;
  word-break: break-word;
}

@media (max-width: 768px) {
  .info-list .sub-item {
    padding-left: 12px;
    margin-left: 0;
    border-left: 3px solid #e8e8e8;
    box-sizing: border-box;
  }
}

/* 課程時間：多筆時段以巢狀清單呈現，避免與外層 info-list 樣式衝突 */
.info-list .course-time-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 8px;
  row-gap: 4px;
  align-items: start;
}

.info-list .course-time-item > .label {
  grid-column: 1;
  padding-top: 2px;
}

.info-list .course-time-sublist {
  grid-column: 2;
  margin: 0;
  padding-left: 1.25em;
  list-style: disc;
}

.info-list .course-time-sublist > li {
  margin-bottom: 8px;
  overflow-wrap: break-word;
  word-break: break-word;
}

.info-list .course-time-sublist > li:last-child {
  margin-bottom: 0;
}

@media (max-width: 520px) {
  .info-list .course-time-item {
    grid-template-columns: 1fr;
  }

  .info-list .course-time-sublist {
    grid-column: 1;
    padding-left: 1.25em;
  }
}

.media-box {
  width: 450px;
  flex-shrink: 0;
}

.media-placeholder {
  position: relative;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  aspect-ratio: 16/9;
}

.media-placeholder img,
.media-placeholder iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.media-placeholder img {
  object-fit: cover;
  z-index: 1;
}

.media-placeholder iframe {
  border: 0;
  z-index: 2;
}

.action-bar-section {
  width: 100%;
  min-height: 65px;
  background-color: #f8f8f8;
  padding: 20px 0;
  margin-top: 0;
}

.action-bar-container {
  display: flex;
  justify-content: flex-end;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #3f3f3f;
  font-size: 17px;
  text-decoration: none;
}

.btn-back i {
  transform: rotate(180deg);
}

@media (max-width: 992px) {
  .course-detail-layout {
    display: block;
    padding-bottom: 20px;
  }

  .course-detail-layout::after {
    display: none;
  }

  .detail-sidebar {
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
    padding-bottom: 10px;
  }

  .action-bar-section {
    padding: 15px 0;
  }

  .detail-content {
    padding-left: 0;
  }

  .info-media-wrapper {
    flex-direction: column-reverse;
    gap: 30px;
  }

  .media-box {
    width: 100%;
    max-width: 100%;
  }

  .course-name {
    font-size: 28px;
  }

  .header-titles {
    width: 100%;
  }

  .btn-download {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   選課指南頁 (Selection Guide) - course_select.html
   ========================================================================== */
.guide-bottom-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 10px;
}

.guide-bottom-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-bottom: 50px;
}

.guide-card {
  display: flex;
  align-items: center;
  background-color: #fff;
  border: 1px solid var(--primary-blue);
  border-radius: 50px;
  padding: 15px 30px;
  width: 360px;
  min-height: 90px;
  box-sizing: border-box;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

.guide-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 61, 91, 0.15);
  border-color: var(--primary-yellow);
}

.guide-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.guide-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-blue);
  margin: 0 0 5px 0;
  letter-spacing: 1px;
}

.guide-date {
  font-size: 12px;
  color: #999;
  font-weight: 400;
  letter-spacing: 0.5px;
}

@media (max-width: 992px) {
  .guide-links-container {
    gap: 20px;
  }
  .guide-card {
    width: 45%;
  }
}

@media (max-width: 768px) {
  .guide-card {
    width: 100%;
    border-radius: 15px;
    padding: 20px;
  }

  .guide-title {
    font-size: 18px;
  }
}

/* ==========================================================================
   學分認抵資訊頁 (Credit Transfer) - credit.html
   ========================================================================== */
.page-main-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary-blue);
  margin-top: 10px;
  margin-bottom: 40px;
  letter-spacing: 1.5px;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 20px;
}

.section-heading {
  font-size: 18px;
  font-weight: 700;
  color: #000;
  margin-top: 40px;
  margin-bottom: 20px;
  letter-spacing: 1px;
}

.credit-notice-section {
  margin-bottom: 40px;
}

.notice-list {
  padding-left: 25px;
  margin: 0;
}

.notice-list li {
  font-size: 15px;
  line-height: 1.8;
  color: #444;
  margin-bottom: 10px;
  text-align: justify;
}

.region-tabs {
  display: flex;
  background-color: #fcfcfc;
  border-top: 1px solid #e0e0e0;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tab-item {
  flex: 1;
  min-width: 100px;
  padding: 15px 0;
  border: none;
  background: transparent;
  font-size: 16px;
  color: #777;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  letter-spacing: 2px;
  position: relative;
}

.tab-item.active::after {
  content: "";
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 12px 12px 0 12px;
  border-color: var(--primary-yellow) transparent transparent transparent;
  z-index: 2;
}

.tab-item:hover {
  background-color: #f0f0f0;
  color: #333;
}

.tab-item.active {
  background-color: var(--primary-yellow);
  color: var(--primary-blue);
  font-weight: 700;
}

.school-count {
  font-size: 14px;
  color: #272727;
  margin-bottom: 30px;
}

.school-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 60px;
}

.school-card {
  display: flex;
  align-items: center;
  gap: 25px;
  padding: 10px;
  text-decoration: none;
  background-color: #fff;
  transition: transform 0.2s;
}

.school-card:hover {
  transform: translateY(-3px);
}

.school-logo {
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.school-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.school-info {
  border-left: 1px solid #e0e0e0;
  padding-left: 25px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.school-info::before {
  content: "";
  position: absolute;
  top: 0;
  left: -2px;
  width: 3px;
  height: 50%;
  background-color: var(--primary-blue);
}

.school-name {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-blue);
  margin: 0 0 8px 0;
  letter-spacing: 1px;
}

.update-time {
  font-size: 14px;
  color: var(--text-grey);
  margin: 6px 0;
  font-weight: 400;
}

@media (max-width: 992px) {
  .school-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .school-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .region-tabs {
    border: 1px solid #eee;
  }
  .tab-item {
    min-width: 25%;
    padding: 10px 0;
    font-size: 14px;
  }

  .tab-item.active::after {
    display: none;
  }
}

/* ==========================================================================
   夥伴學校詳情頁 (Credit Content) - credit_content.html
   ========================================================================== */
.school-header-block {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.school-logo-large {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

.school-logo-large img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.content-section {
  margin-bottom: 40px;
}

.content-heading {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 15px;
  letter-spacing: 1px;
}

.instruction-list {
  padding-left: 20px;
  margin: 0;
}

.instruction-list li {
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 8px;
}

.status-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.status-table th,
.status-table td {
  border: 1px solid #ddd;
  padding: 12px 15px;
  text-align: left;
  line-height: 1.6;
}

.status-table th {
  background-color: #f0edde;
  width: 180px;
  font-weight: 700;
  white-space: nowrap;
}

.status-table tr:first-child {
  border-top: 3px solid var(--primary-blue);
}

.status-table td {
  background-color: #fff;
  color: #444;
}

.text-link {
  color: var(--primary-blue);
  text-decoration: underline;
  word-break: break-all;
  overflow-wrap: break-word;
  display: inline-block;
  max-width: 100%;
}

.contact-info-box p {
  margin: 5px 0;
}

.credit-course-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.credit-course-table thead th {
  background-color: #f0edde;
  font-weight: 700;
  padding: 12px 10px;
  border-top: 3px solid var(--primary-blue);
  border-bottom: 1px solid #ccc;
  text-align: center;
  white-space: nowrap;
}

.credit-course-table tbody td {
  padding: 15px 10px;
  border-bottom: 1px solid #eee;
  line-height: 1.5;
}

.course-link {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary-blue);
  text-decoration: none;
}
.course-link:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .school-header-block {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .school-logo-large {
    width: 60px;
    height: 60px;
  }

  .status-table,
  .status-table tbody,
  .status-table tr,
  .status-table th,
  .status-table td {
    display: block;
    width: 100%;
  }

  .status-table th {
    border-bottom: none;
  }

  .status-table td {
    border-top: none;
    padding-top: 5px;
    margin-bottom: 10px;
  }
}

.course-detail-layout.school-mode {
  grid-template-areas:
    "sidebar header"
    "content content";
  row-gap: 20px;
}

.course-detail-layout.school-mode .school-header-block {
  margin-bottom: 0;
}

.course-detail-layout.school-mode .detail-content {
  grid-area: content;
  padding-left: 0;
  min-height: auto;
}

@media (max-width: 992px) {
  .course-detail-layout.school-mode {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .course-detail-layout.school-mode .school-header-block {
    padding-left: 0;
    margin-left: 0;
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================================
   自行上稿頁面 (Article Page) - article.html
   ========================================================================== */

.page-article {
  padding-top: 140px;
  min-height: 80vh;
}

.article-title {
  font-size: 36px;
  font-weight: 700;
  color: var(--primary-blue);
  margin-bottom: 30px;
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
}

@media (max-width: 768px) {
  .page-article {
    padding-top: 120px;
  }

  .article-title {
    font-size: 28px;
  }
}

/* 編輯器內容的基本排版保護，避免後台亂貼語法跑版 */
.editor-content {
  line-height: 1.8;
  color: #333;
  font-size: 16px;
  margin-bottom: 30px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.editor-content img {
  max-width: 100%;
  height: auto;
  margin: 20px 0;
}
.editor-content h2 {
  font-size: 24px;
  color: var(--primary-blue);
  margin-top: 30px;
  margin-bottom: 15px;
}

/* news.html */
.news-grid-layout {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
  margin-top: 20px;
}

.custom-news-card {
  align-items: center;
  background: #ffffff;
  border: 1px solid #f0f0f0;
  border-radius: 12px;
  padding: 15px 25px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.custom-card {
  display: none;
}

.custom-card.show {
  display: flex; /* 當加上 .show 類別時才顯示 */
}

.custom-news-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.custom-news-card .news-date {
  color: #9e9e9e;
  padding: 0;
}

.custom-news-card .news-date .year::after {
  background-color: rgb(158 158 158 / 50%);
}

.custom-news-card .news-date .day {
  font-size: 48px;
}

.card-body {
  flex: 1;
  padding: 0 25px;
}

.category-tag {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 5px;
}

.custom-news-card .title {
  font-size: 18px;
  color: var(--primary-blue);
  margin: 0;
  line-height: 1.5;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.arrow-icon-yellow {
  color: var(--primary-yellow);
  font-size: 20px;
}

.pagination-container {
  display: flex;
  justify-content: center;
  margin-top: 60px;
}

.pagination-list {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
  padding: 0;
}

.pagination-list .icon-arrow {
  cursor: pointer;
}

.pagination-list .icon-arrow.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-list .icon-arrow.prev i {
  transform: rotate(180deg);
}

.page-divider {
  width: 1px;
  height: 20px;
  background-color: #ddd;
  margin: 0 5px;
}

.page-num {
  font-size: 18px;
  color: #999;
  cursor: pointer;
}

.page-num.active {
  color: #333;
  font-weight: bold;
}

.page-dots {
  color: #999;
  cursor: default;
}

.filter-label {
  color: var(--primary-blue);
}

.news-filter-group {
  width: 100%;
}

.native-datepicker {
  background-color: #fff !important;
  border: none !important;
  height: 40px;
  border-radius: 0;
  padding: 0 10px;
  color: var(--primary-blue);
  font-family: inherit;
  cursor: pointer;
}

.date-input-wrapper {
  width: 170px;
}

.filter-right-group {
  margin-left: auto;
  display: flex;
  gap: 15px;
}

.custom-news-card .news-date {
  flex-shrink: 0;
}

/* 響應式調整：手機版改為單欄 */
@media (max-width: 992px) {
  .news-grid-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .custom-news-card {
    flex-direction: row;
    align-items: flex-start;
    padding: 15px;
    gap: 15px;
  }

  .custom-news-card .news-date {
    flex-direction: column;
    border-bottom: none !important;
    width: 60px !important;
    padding: 0 !important;
    text-align: center;
  }

  .custom-news-card .news-date .year::after {
    display: none !important;
  }

  .custom-news-card .news-date .year {
    font-size: 14px;
    margin-right: 0;
    letter-spacing: 1px;
    align-items: center;
  }

  .custom-news-card .news-date .month {
    font-size: 14px;
  }

  .custom-news-card .news-date .day {
    font-size: 28px;
    width: auto;
    margin-left: 0;
    line-height: 1.2;
  }

  .custom-news-card .card-body {
    padding: 0;
  }

  .custom-news-card .title {
    font-size: 16px;
    -webkit-line-clamp: 3;
  }

  .custom-news-card .category-tag {
    font-size: 12px;
  }

  .pagination-list {
    gap: 10px;
  }

  .page-num {
    font-size: 16px;
  }
}

/* ==========================================================================
   影片專區 (Video Gallery) 樣式
   ========================================================================== */
.video-grid-layout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 30px;
  margin-top: 60px;
}

.video-card {
  flex-direction: column;
}

/* 影片嵌入容器 - 保持 16:9 比例 */
.video-embed-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 比例 (9/16 = 0.5625) */
  border-radius: 10px;
  overflow: hidden;
  background-color: #000;
}

.video-embed-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* 調整影片卡片間距 */
.video-card {
  margin-bottom: 20px;
}

/* 響應式：平板與手機縮小標題字體 */

/* 影片資訊 (觀看次數/時間) */
.video-meta {
  display: flex;
  gap: 15px;
  margin: 12px 0 8px 0;
  font-size: 14px;
  color: #999;
}

.video-meta i {
  margin-right: 4px;
}

.video-title {
  font-size: 18px;
  font-weight: 500;
  color: var(--primary-blue);
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* RWD 響應式調整 */
@media (max-width: 992px) {
  .video-grid-layout {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .video-title {
    font-size: 16px;
    margin-top: 10px;
  }
}

@media (max-width: 576px) {
  .video-grid-layout {
    grid-template-columns: 1fr;
  }
  .tab-item {
    min-width: 100px;
    font-size: 14px;
  }
}

.album-thumb-wrapper {
  border-radius: 12px;
  background-color: #f0f0f0;
}

/* FAQ  */
.faq-container {
  margin: 60px 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.faq-item {
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  background-color: #fff;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-question {
  padding: 20px 30px;
  display: flex;
  align-items: center;
  cursor: pointer;
  gap: 15px;
}

.arrow-toggle {
  font-size: 20px;
}

.arrow-toggle i {
  transition: transform 0.3s ease;
  color: var(--primary-yellow);
}

.faq-question:not(.collapsed) .q-icon {
  background-color: var(--primary-yellow);
  color: #fff;
}

.faq-question:not(.collapsed) .arrow-toggle i {
  transform: rotate(180deg);
}

.collapse.show .faq-answer {
  border-top: 2px dotted #e0e0e0;
}

.q-icon {
  width: 32px;
  height: 32px;
  background-color: var(--primary-blue);
  color: var(--primary-yellow);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 700;
  flex-shrink: 0;
}

.question-text {
  font-size: 20px;
  color: var(--primary-blue);
  margin: 0;
  flex: 1;
}

.a-wrapper {
  padding: 25px 30px;
  display: flex;
  gap: 15px;
}

.a-label {
  font-weight: 900;
  color: var(--primary-blue);
  font-size: 20px;
  flex-shrink: 0;
}

.answer-text {
  font-size: 16px;
  color: #666;
  line-height: 1.8;
  margin: 0;
}

.album-img {
  display: inline-block;
  height: 180px;
  width: 100%;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 20px;
}

/* 照片牆網格設定 */
.album-photo-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr); /* 預設 6 欄 */
  gap: 15px;
  margin-top: 20px;
}

.photo-item a {
  display: block;
  text-decoration: none;
}

.photo-wrapper {
  position: relative;
  width: 100%;
  padding-top: 100%; /* 正方形比例，與您原本 width/height 180px 一致 */
  border-radius: 8px;
  overflow: hidden;
  background-color: #f0f0f0;
}

.photo-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* 確保圖片不變形 */
}

/* 響應式調整 */
@media (max-width: 1200px) {
  .album-photo-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 768px) {
  .album-photo-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 576px) {
  .album-photo-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .album-photo-grid { grid-template-columns: repeat(1, 1fr); }
}

