@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+TC:wght@400;500;600&family=Playfair+Display:ital,wght@0,400;0,500;1,400&display=swap');

.ext svg,
.mailto svg,
.tel svg {
  display: none !important;
}

/* Useful Materials：大圖標題 + 卡片 Swiper 疊在底緣 */
.paragraph--type--useful-materials.useful-materials {
  position: relative;
  padding-top: 3rem;
  padding-bottom: 3.5rem;
  background: #eef3f8;
  box-shadow: 0 0 0 100vmax #eef3f8;
  clip-path: inset(0 -100vmax);
}

.paragraph--type--useful-materials .useful-materials__inner {
  position: relative;
}

.paragraph--type--useful-materials .useful-materials__hero {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  background: #0e335f;
}

.paragraph--type--useful-materials .useful-materials__media {
  line-height: 0;
}

.paragraph--type--useful-materials .useful-materials__media img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 220px;
  max-height: 420px;
  object-fit: cover;
  object-position: center;
}

.paragraph--type--useful-materials .useful-materials__hero-bar {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 1.5rem 1.5rem;
  background: linear-gradient(180deg, rgba(14, 51, 95, 0) 0%, rgba(14, 51, 95, 0.72) 100%);
}

.paragraph--type--useful-materials .field--name-field-header {
  margin: 0;
  color: #fff;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 400;
  line-height: 1.15;
}

.paragraph--type--useful-materials .useful-materials__nav {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
}

.paragraph--type--useful-materials .useful-materials__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 0;
  border: 1px solid #cdc5b4;
  background: #fff;
  color: #bcaa8b;
  cursor: pointer;
}

.paragraph--type--useful-materials .useful-materials__button--next {
  border-color: #bcaa8b;
  background: #bcaa8b;
  color: #fff;
}

.paragraph--type--useful-materials .useful-materials__button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.paragraph--type--useful-materials .useful-materials__button:hover,
.paragraph--type--useful-materials .useful-materials__button:focus {
  border-color: #bcaa8b;
  background: #faf6ef;
  color: #a89878;
}

.paragraph--type--useful-materials .useful-materials__button--next:hover,
.paragraph--type--useful-materials .useful-materials__button--next:focus {
  border-color: #a89878;
  background: #a89878;
  color: #fff;
}

.paragraph--type--useful-materials .useful-materials__button.swiper-button-prev,
.paragraph--type--useful-materials .useful-materials__button.swiper-button-next {
  position: static;
  width: 42px;
  height: 42px;
  margin: 0;
}

.paragraph--type--useful-materials .useful-materials__button.swiper-button-prev::after,
.paragraph--type--useful-materials .useful-materials__button.swiper-button-next::after {
  content: none;
}

.paragraph--type--useful-materials .useful-materials__button.swiper-button-disabled {
  opacity: 0.4;
  cursor: default;
}

.paragraph--type--useful-materials .useful-materials__button:focus-visible {
  outline: 3px solid var(--theme-color-orange);
  outline-offset: 5px;
}

.paragraph--type--useful-materials .useful-materials__slider {
  position: relative;
  z-index: 2;
  margin: -4.5rem 0 0;
  padding: 0;
}

.paragraph--type--useful-materials .useful-materials__swiper {
  width: 100%;
  overflow: visible;
}

.paragraph--type--useful-materials .useful-materials__swiper .swiper-slide {
  display: flex;
  height: auto;
}

.paragraph--type--useful-materials .useful-materials-card.card-link {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 168px;
  margin: 0;
  padding: 1.35rem 1.35rem 1.15rem;
  background: #fff;
  border: 0;
  box-shadow: 0 10px 28px rgba(14, 51, 95, 0.12);
  color: #0e335f;
  text-decoration: none;
}

.paragraph--type--useful-materials a.useful-materials-card.card-link:hover,
.paragraph--type--useful-materials a.useful-materials-card.card-link:focus,
.paragraph--type--useful-materials a.useful-materials-card.card-link:active {
  color: #0e335f;
  text-decoration: none;
}

.paragraph--type--useful-materials a.useful-materials-card.card-link:focus-visible {
  outline: 3px solid var(--theme-color-orange);
  outline-offset: 5px;
}

.paragraph--type--useful-materials .useful-materials-card__title {
  margin: 0;
  color: #0e335f;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.45;
}

.paragraph--type--useful-materials .useful-materials-card .card-link__arrow {
  width: 36px;
  height: 36px;
  margin-top: auto;
  align-self: flex-end;
  flex: 0 0 auto;
  background-color: #f26522;
  -webkit-mask-image: url("../images/icon/link-arrow-mask.svg");
  mask-image: url("../images/icon/link-arrow-mask.svg");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

@media (max-width: 767.98px) {
  .paragraph--type--useful-materials.useful-materials {
    padding-top: 2.25rem;
    padding-bottom: 2.5rem;
  }

  .paragraph--type--useful-materials .useful-materials__hero-bar {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1rem 1.25rem;
  }

  .paragraph--type--useful-materials .useful-materials__slider {
    margin-top: -3rem;
  }

  .paragraph--type--useful-materials .useful-materials-card.card-link {
    min-height: 150px;
    padding: 1.15rem 1.15rem 1rem;
  }

  .paragraph--type--useful-materials .useful-materials-card__title {
    font-size: 1rem;
  }
}

/* Chatbot：浮在視窗右側（fixed）。若用 absolute，父層須有 position: relative，否則會以最近定位祖先或整份文件為準，看起來像「定位失敗」。 */
a.chatbot-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 54px;
  height: 54px;
  margin: 0;
  padding: 0;
  z-index: 99;
  background-color: #F26522;
  position: fixed;
  top: 30%;
  right: 0;
}

/* 選修課文字篩選列：對齊 container 寬度，金線底、橙色 Apply、深藍重設。 */
.electives-courses-filter-section {
  box-sizing: border-box;
  width: 100%;
  margin: 0 auto 1.25rem;
  padding-right: calc(var(--bs-gutter-x, 60px) * 0.5);
  padding-left: calc(var(--bs-gutter-x, 60px) * 0.5);
}

@media (min-width: 1540px) {
  .electives-courses-filter-section {
    max-width: 1540px;
  }
}

.electives-courses-filter-section .electives-courses-filter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 22px 40px;
  min-height: 92px;
  margin: 0;
  padding: 18px 4px 16px;
  background: #fff;
  border-bottom: 3px solid var(--theme-color-gold);
}

.electives-courses-filter-section .electives-courses-filter__field {
  flex: 1 1 420px;
  max-width: 480px;
  min-width: 260px;
}

.electives-courses-filter-section .electives-courses-filter__input {
  display: block;
  width: 100%;
  margin: 0;
  padding: 8px 2px;
  border: 0;
  border-bottom: 1px solid #2a2a2a;
  border-radius: 0;
  background: transparent;
  color: #222;
  font-family: "Noto Sans TC", "Noto Sans SC", Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  box-shadow: none;
  appearance: none;
}

.electives-courses-filter-section .electives-courses-filter__input::placeholder {
  color: #6b6b6b;
  opacity: 1;
}

.electives-courses-filter-section .electives-courses-filter__input:focus-visible {  
  outline: 3px solid var(--theme-color-orange);
  outline-offset: 5px;
}

.electives-courses-filter-section .electives-courses-filter__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.electives-courses-filter-section .electives-courses-filter__apply,
.electives-courses-filter-section .electives-courses-filter__reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 42px;
  margin: 0;
  border: 0;
  border-radius: 2px;
  color: #fff;
  font-family: "Noto Sans TC", "Noto Sans SC", Arial, sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.electives-courses-filter-section .electives-courses-filter__apply {
  gap: 8px;
  padding: 0 16px;
  background: var(--theme-color-orange);
}

.electives-courses-filter-section .electives-courses-filter__apply:hover {
  background: #de5818;
}

.electives-courses-filter-section .electives-courses-filter__reset {
  width: 42px;
  padding: 0;
  background: var(--theme-color-blue);
}

.electives-courses-filter-section .electives-courses-filter__reset:hover {
  background: #0a2748;
}

.electives-courses-filter-section .electives-courses-filter__apply:focus-visible,
.electives-courses-filter-section .electives-courses-filter__reset:focus-visible {
  outline: 3px solid var(--theme-color-orange);
  outline-offset: 5px;
}

.electives-courses-filter-section .electives-courses-filter__icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.paragraph--type--electives-courses .electives-courses__table tbody tr.is-filtered-out {
  display: none;
}

.paragraph--type--electives-courses .electives-courses__empty {
  margin: 12px 0 0;
  color: #444;
  font-family: "Noto Sans TC", "Noto Sans SC", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

@media (max-width: 767.98px) {
  .electives-courses-filter-section .electives-courses-filter {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    min-height: 0;
  }

  .electives-courses-filter-section .electives-courses-filter__field {
    flex-basis: auto;
    max-width: none;
    min-width: 0;
  }

  .electives-courses-filter-section .electives-courses-filter__actions {
    margin-left: 0;
    justify-content: flex-end;
  }
}

/* Header 全螢幕搜尋 overlay */
html.search-overlay-open {
  overflow: hidden;
}

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 0;
  background: color-mix(in srgb, var(--theme-color-light-blue, #e0edf4) 72%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.search-overlay[hidden] {
  display: none !important;
}

.search-overlay__close {
  position: absolute;
  top: clamp(1rem, 3vw, 2.5rem);
  right: clamp(1rem, 3vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--theme-color-gold, #bcaa8b);
  cursor: pointer;
  text-decoration: none;
}

.search-overlay__close::before,
.search-overlay__close::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 2px;
  border-radius: 1px;
  background: var(--theme-color-blue, #0e335f);
}

.search-overlay__close::before {
  transform: rotate(45deg);
}

.search-overlay__close::after {
  transform: rotate(-45deg);
}

.search-overlay__close:hover,
.search-overlay__close:focus {
  background: color-mix(in srgb, var(--theme-color-gold, #bcaa8b) 88%, #fff);
}

.search-overlay__close:focus {
  outline: 2px solid var(--theme-color-blue, #0e335f);
  outline-offset: 3px;
}

.search-overlay__panel {
  width: min(100%, 720px);
  text-align: center;
}

.search-overlay__title {
  margin: 0 0 clamp(1.25rem, 3vw, 2rem);
  color: var(--theme-color-blue, #0e335f);
  font-family: var(--ssps-header-font, 'Noto Sans TC', 'Noto Sans SC', Arial, sans-serif);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
}

.search-overlay__form {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  padding: 0.5rem clamp(20px, 3vw, 25px);
  border: 1px solid color-mix(in srgb, var(--theme-color-blue, #0e335f) 18%, #fff);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 8px 32px color-mix(in srgb, var(--theme-color-blue, #0e335f) 8%, transparent);
}

.search-overlay__form input[type='text'],
.search-overlay__form input[type='search'] {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0.85rem 0;
  border: 0;
  background: transparent;
  color: var(--theme-color-blue, #0e335f);
  font-family: var(--ssps-header-font, 'Noto Sans TC', 'Noto Sans SC', Arial, sans-serif);
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  line-height: 1.35;
}

.search-overlay__form input::placeholder {
  color: color-mix(in srgb, var(--theme-color-blue, #0e335f) 42%, #fff);
  opacity: 1;
}

.search-overlay__form input:focus {
  outline: none;
}

.search-overlay__form .search-overlay__submit {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--theme-color-gold, #bcaa8b);
  cursor: pointer;
  position: relative;
}

.search-overlay__form .search-overlay__submit::before {
  background: url(../images/icon/search-gold.svg) center no-repeat;
  content: '';
  opacity: 0;
  position: absolute;
  inset: 0;
  transition: all 0.2s ease;
}

.search-overlay__form .search-overlay__submit img {
  display: block;
  width: 22px;
  height: 22px;
  transition: all 0.2s ease;
}

.search-overlay__form .search-overlay__submit:is(:hover, :focus-visible)::before {
  opacity: 1;  
}

.search-overlay__form .search-overlay__submit:is(:hover, :focus-visible) img {
  opacity: 0;
}

.search-overlay__form .search-overlay__submit:focus {
  outline: 2px solid var(--theme-color-blue, #0e335f);
  outline-offset: 2px;
}

/* 搜尋結果：有圖、沒圖各一個 list */
.search-result-view .search-result-list {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
}

.search-result-view .search-result-list--media+.search-result-list--text {
  margin-top: 2rem;
}

.search-result-view .search-result-item {
  border-bottom: 1px solid color-mix(in srgb, var(--theme-color-blue, #0e335f) 12%, #fff);
}

.search-result-view .search-result-item__link {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.25rem 0;
  color: inherit;
  text-decoration: none;
}

.search-result-view .search-result-item--text .search-result-item__link {
  align-items: flex-start;
  gap: 0.85rem;
}

.search-result-view .search-result-item--text .search-result-item__link::before {
  content: "";
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  margin-top: 0.55rem;
  background: var(--theme-color-gold, #bcaa8b);
}

.search-result-view .search-result-item--text .search-result-item__body {
  min-width: 0;
}

.search-result-view .search-result-item__media {
  flex: 0 0 200px;
  overflow: hidden;
  background: var(--theme-color-gray, #f4f4f4);
}

.search-result-view .search-result-item__media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform 350ms ease;
}

.search-result-view a.search-result-item__link:is(:hover, :focus-visible) .search-result-item__media img {
  transform: scale(1.06);
}

.search-result-view .search-result-item__body {
  display: block;
  min-width: 0;
  flex: 1 1 auto;
}

.search-result-view .search-result-item__tag {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--theme-color-text-gold, #a7916c);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
}

.search-result-view .search-result-item__title {
  display: block;
  color: var(--theme-color-blue, #0e335f);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.4;
}

.search-result-view a.search-result-item__link:is(:hover, :focus-visible) .search-result-item__title {
  color: var(--theme-color-orange, #f26522);
}

.search-result-view a.search-result-item__link:focus-visible {
  outline: 3px solid var(--theme-color-orange);
  outline-offset: 5px;
}

.search-result-view .search-result-item__meta,
.search-result-view .search-result-item__desc {
  display: block;
  margin-top: 0.35rem;
  color: #4a4a4a;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.search-result-view .search-result-item__desc {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

@media (max-width: 767px) {
  .search-result-view .search-result-item--media .search-result-item__link {
    flex-direction: column;
  }

  .search-result-view .search-result-item__media {
    flex-basis: auto;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .search-result-view .search-result-item__media img {
    transition: none;
  }

  .search-result-view a.search-result-item__link:is(:hover, :focus-visible) .search-result-item__media img {
    transform: none;
  }
}