/* ==========================================================================
   Mainland — Colleges & Schools page styles
   Applies to: node--colleges-and-schools--full.html.twig and its paragraphs
   ========================================================================== */

/* ------------------------------------------------------------------
   0. BREADCRUMB
   ------------------------------------------------------------------ */
body.is-mainland-page .node--type-colleges-and-schools nav[aria-label="breadcrumb"] .container-xxl {
  padding-top: 16px;
  padding-bottom: 16px;
}

body.is-mainland-page .node--type-colleges-and-schools nav[aria-label="breadcrumb"] .breadcrumb {
  margin-bottom: 0;
  padding: 0;
}

/* All breadcrumb items: black regular */
body.is-mainland-page .node--type-colleges-and-schools nav[aria-label="breadcrumb"] .breadcrumb-item,
body.is-mainland-page .node--type-colleges-and-schools nav[aria-label="breadcrumb"] .breadcrumb-item a {
  color: #000;
  font-weight: 400;
}

/* Last breadcrumb item (current page): black bold */
body.is-mainland-page .node--type-colleges-and-schools nav[aria-label="breadcrumb"] .breadcrumb-item:last-child {
  color: #000;
  font-weight: 700;
}

/* Replace SVG arrow separator with "/" */
body.is-mainland-page .node--type-colleges-and-schools nav[aria-label="breadcrumb"] .breadcrumb-item + .breadcrumb-item::before {
  background-image: none;
  content: '/';
  width: auto;
  height: auto;
  padding-right: 8px;
}

/* ------------------------------------------------------------------
   1. ABOUT SECTION
   ------------------------------------------------------------------ */
.ml-colleges-about {
  padding: 60px 0;
}

.ml-colleges-about__heading {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.4;
  word-break: break-word;
  background: linear-gradient(90deg, #DF7433 0%, #DA562B 31.87%, #CC103C 73.65%, #9F0D43 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.ml-colleges-about__body {
  color: #333;
  font-size: 1rem;
  line-height: 1.8;
}

@media (max-width: 767.98px) {
  .ml-colleges-about {
    padding: 40px 0;
  }
  .ml-colleges-about__heading {
    font-size: 1.5rem;
    margin-bottom: 24px;
  }
}

/* ------------------------------------------------------------------
   2. DEPARTMENT CARDS SECTION
   ------------------------------------------------------------------ */
.ml-colleges-dept {
  padding: 60px 0;
}

.ml-colleges-dept__title {
  font-size: 36px;
  font-weight: 600;
  color: #222;
  margin-bottom: 40px;
}

.ml-colleges-dept__swiper-wrap {
  position: relative;
  /* extra bottom padding to make room for the arrow buttons below the slides */
  padding: 0 0 72px;
}

.ml-colleges-dept__swiper {
  /* overflow managed by Swiper internally */
}

/* Equal-height slides */
.ml-colleges-dept__swiper .swiper-wrapper {
  align-items: stretch;
}

.ml-colleges-dept__swiper .swiper-slide {
  height: auto;
  display: flex;
  flex-direction: column;
}

.ml-colleges-dept__swiper .swiper-slide > * {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Arrows positioned below the slides — circle style */
.ml-colleges-dept__swiper-wrap .swiper-button-prev,
.ml-colleges-dept__swiper-wrap .swiper-button-next {
  top: auto;
  bottom: 0;
  width: 48px;
  height: 48px;
  margin-top: 0;
  border-radius: 50%;
  border: 1px solid #e0e0e0;
  background: #fff;
  box-shadow: none;
}

.ml-colleges-dept__swiper-wrap .swiper-button-prev {
  left: 50%;
  transform: translateX(calc(-100% - 8px));
}

.ml-colleges-dept__swiper-wrap .swiper-button-next {
  left: 50%;
  right: auto;
  transform: translateX(8px);
}

.ml-colleges-dept__swiper-wrap .swiper-button-prev::after,
.ml-colleges-dept__swiper-wrap .swiper-button-next::after {
  font-size: 0;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  content: '';
  width: 12px;
  height: 20px;
  margin: 0;
}

.ml-colleges-dept__swiper-wrap .swiper-button-prev::after {
  background-image: url('../image/icon/swiper-button-prev-black.svg');
  margin-right: 2px;
}

.ml-colleges-dept__swiper-wrap .swiper-button-next::after {
  background-image: url('../image/icon/swiper-button-next-black.svg');
  margin-left: 2px;
}

/* --- Department card --- */
.dept-card {
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: 0px 4px 8px 0px #00000026;
  position: relative;
}

/* Gradient bottom border via pseudo-element */
.dept-card::after {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, #DF7433 0%, #DA562B 50%, #CC103C 100%);
  flex-shrink: 0;
}

.dept-card__image {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  line-height: 0;
}

.dept-card__image .field,
.dept-card__image .field__items,
.dept-card__image .field__item,
.dept-card__image figure {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}

.dept-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
}

.dept-card__body {
  padding: 16px 24px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.dept-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: #222;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.dept-card__text {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.6;
  flex: 1;
}

.dept-card__link {
  margin-top: auto;
  padding-top: 14px;
}

.dept-card__link a {
  color: #DA562B;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dept-card__link a::after {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  background: url('../image/icon/alink-external-link-orange.svg') center center / contain no-repeat;
  flex-shrink: 0;
}

@media (max-width: 767.98px) {
  .ml-colleges-dept {
    padding: 40px 0;
  }
  .ml-colleges-dept__swiper-wrap {
    padding: 0 0 72px;
  }
}

/* ------------------------------------------------------------------
   3. SPOTLIGHT SECTION
   ------------------------------------------------------------------ */
.ml-colleges-spotlight-section {
  /* Outer section wrapper if needed */
}

.ml-spotlight {
  position: relative;
  min-height: 440px;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.ml-spotlight::before {
  content: '';
  position: absolute;
  left: 0;
  top: 100px;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #FFBCA2 15.42%, #ffd5a200 84.17%);

  z-index: 0;
}

@media screen and (max-width: 991.98px) {
}

.ml-spotlight__image-col {
  position: absolute;
  left: 0;
  top: 0;
  width: 56%;
  height: 100%;
  overflow: hidden;
}

.ml-spotlight__image-col .field,
.ml-spotlight__image-col .field__items,
.ml-spotlight__image-col .field__item,
.ml-spotlight__image-col figure {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}

.ml-spotlight__image-col img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  clip-path: polygon(0 0, 100% 0, 98% 90%, 0 100%);
}

.ml-spotlight__container {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: 15%;
  padding-bottom: 5%;
}

.ml-spotlight__card {
  background: rgba(255, 255, 255, 0.96);
  padding: 40px 36px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
  border-bottom: 5px solid;
  border-image: linear-gradient(to right, #DF7433, #DA562B, #CC103C) 1;
}

.ml-spotlight__text {
  font-size: 0.95rem;
  line-height: 1.85;
  color: #333;
  margin-bottom: 28px;
}

.ml-spotlight__text p {
  margin-bottom: 0.75em;
}

.ml-spotlight__cta {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.ml-spotlight__btn {
  display: inline-block;
  min-width: 150px;
  padding: 9px 30px;
  border-radius: 100px;
  font-size: 18px;
  font-weight: 400;
  line-height: normal;
  text-align: center;
  text-decoration: none;
  transition: opacity 0.2s;
}

.ml-spotlight__btn--hollow {
  border: 1px solid transparent;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(90deg, #DF7433 0%, #DA562B 31.87%, #CC103C 73.65%, #9F0D43 100%) border-box;
  color: #DA562B !important;
}

.ml-spotlight__btn--hollow::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 12px;
  margin-left: 10px;
  margin-bottom: 0px;
  background: url('../image/icon/apply-btn-after-arrow-orange.svg') center center / contain no-repeat;
  vertical-align: middle;
}

.ml-spotlight__btn--hollow:hover {
  opacity: 0.85;
  color: #DA562B;
  text-decoration: none;
}

.ml-spotlight__btn--filled {
  background: linear-gradient(90deg, #DF7433 0%, #DA562B 31.87%, #CC103C 73.65%, #9F0D43 100%);
  color: #fff !important;
}

.ml-spotlight__btn--filled:hover {
  opacity: 0.9;
  color: #fff;
  text-decoration: none;
}

.ml-spotlight__btn--filled::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 12px;
  margin-left: 10px;
  margin-bottom: 0px;
  background: url('../image/icon/apply-btn-after-arrow.svg') center center / contain no-repeat;
  vertical-align: middle;
}

@media (max-width: 767.98px) {
  .ml-spotlight {
    min-height: auto;
    flex-direction: column;
    align-items: stretch;
    background: linear-gradient(to bottom, #FFD5A2 calc(35% + 100px), #FFBCA2 100%);
  }

  .ml-spotlight__image-col {
    position: static;
    width: 100%;
    height: 360px;
  }

  .ml-spotlight__container {
    padding-top: 30px;
    padding-bottom: 30px;
    margin-top: -120px;
    max-width: 600px;
  }

  .ml-spotlight__card {
    padding: 28px 20px;
    box-shadow: none;
    border-top: 4px solid #DA562B;
  }
}

@media (max-width: 575.98px) {
  .ml-spotlight__container {
    padding-top: 30px;
    padding-bottom: 30px;
    margin-top: -150px;
  }
}

/* ------------------------------------------------------------------
   4. PROGRAMME INTRODUCTION SECTION
   ------------------------------------------------------------------ */
.ml-colleges-progs {
  padding: 60px 0 80px;
  background: #fff;
}

/* Sidebar */
.ml-colleges-progs__sidebar {
  padding-right: 20px;
  border-right: 1px solid #eee;
}

.ml-colleges-progs__sidebar-heading {
  font-size: 40px;
  font-weight: 700;
  margin-bottom: 24px;
  background: linear-gradient(90deg, #DF7433 0%, #DA562B 31.87%, #CC103C 73.65%, #9F0D43 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.ml-dept-nav {
  margin: 0;
  padding: 0;
  list-style: none;
}


.ml-dept-nav__item {
  padding: 12px 0;
  cursor: pointer;
  font-family: "Microsoft JhengHei", sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  color: #000;
  transition: color 0.15s;
  display: flex;
  align-items: center;
}

/* Dim non-hovered, non-active items when nav is hovered */

.ml-dept-nav:hover .ml-dept-nav__item:not(:hover):not(.active) {
  opacity: 0.5;
}


/* Remove color change on hover, keep only dimming effect above */


.ml-dept-nav__item.active {
  color: #DA562B;
  font-weight: 600;
  position: relative;
}

/* Prefix orange arrow icon for active item */
.ml-dept-nav__item.active::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  background: url('../image/icon/apply-btn-after-arrow-orange.svg') center center / contain no-repeat;
  vertical-align: middle;
}


/* Remove .ml-dept-nav__arrow, now handled by ::before on active item */

/* Programme list */
.ml-colleges-progs__list {
  padding-left: 30px;
}

.ml-prog-card {
  position: relative;
  background: #F9F9F9;
  border-right: 5px solid;
  border-bottom: 5px solid;
  border-image: linear-gradient(to bottom, #DF7433, #DA562B, #CC103C) 1;
  overflow: hidden;
  box-sizing: border-box;
  margin-bottom: 20px;
  transition: box-shadow 0.2s;
}

.ml-prog-card:hover {
  box-shadow: 0 4px 18px rgba(218, 86, 43, 0.1);
}

.ml-prog-card__link {
  display: block;
  padding: 28px;
  text-decoration: none;
  color: inherit;
}

.ml-prog-card__inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.ml-prog-card__body {
  flex: 1;
  min-width: 0;
}

.ml-prog-card__title {
  font-size: 28px;
  font-weight: 700;
  color: #DA562B;
  margin-bottom: 6px;
  line-height: 1.4;
}

.ml-prog-card__subtitle {
  font-size: 0.9rem;
  color: #000;
  font-weight: 400;
  line-height: 1.5;
  margin: 2px 0 16px;
}

.ml-prog-card__meta {
  font-size: 0.875rem;
  color: #000;
  margin: 4px 0 0;
  line-height: 1.5;
}

.ml-prog-card__meta-label {
  font-weight: 700;
  color: #000;
  margin-right: 4px;
}

.ml-prog-card__icon {
  color: #DA562B;
  flex-shrink: 0;
  margin-top: 2px;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.ml-prog-card:hover .ml-prog-card__icon {
  opacity: 1;
}

@media (max-width: 767.98px) {
  .ml-colleges-progs {
    padding: 40px 0 60px;
  }

  .ml-colleges-progs__sidebar {
    border-right: none;
    border-bottom: 1px solid #eee;
    padding-right: 0;
    margin-bottom: 28px;
    padding-bottom: 20px;
  }

  .ml-colleges-progs__list {
    padding-left: 0;
  }

  .ml-dept-nav__item {
    display: inline-flex;
    margin-right: 12px;
    border-bottom: none;
    padding: 6px 0;
    font-size: 0.875rem;
  }
}
