@import url("https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@200;300;400;700&family=Noto+Sans+TC:wght@300;400;500;700&display=swap");

:root {
  --color-primary: #1a5cad;
  --color-primary-dark: #0f3d75;
  --color-nav: #1f5fae;
  --color-text: #333;
  --color-muted: #666;
  --color-bg: #f4f4f4;
  --color-surface: #fff;
  --color-border: #d8d8d8;
  --color-footer: #d5d5d5;
  --max-width: 1200px;
  --home-grid-max-width: 1400px;
  --side-banner-width: 328px;
  --side-banner-height: 600px;
  --header-height: 72px;
  --radius: 6px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --font-sans: "Roboto Condensed", "Noto Sans TC", sans-serif;
  --site-header-height: 118px;
  --site-footer-height: 54px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

body::before {
  content: "";
  position: fixed;
  left: 0;
  top: var(--site-header-height);
  width: min(370px, 40vw);
  aspect-ratio: 370.108 / 641.037;
  background: url("../../images/graphic/bg1.svg") no-repeat left top / 100% auto;
  pointer-events: none;
  z-index: 0;
}

body:not([data-page="home"])::after {
  content: "";
  position: fixed;
  right: 0;
  bottom: 0;
  width: 100%;
  aspect-ratio: 1778.227 / 726;
  background: url("../../images/graphic/bg.svg") no-repeat right bottom / 100% auto;
  pointer-events: none;
  z-index: 0;
}

.site-header,
main {
  position: relative;
  z-index: 1;
}

main {
  flex: 1 1 auto;
  width: 100%;
  padding-bottom: var(--site-footer-height);
}

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

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

.site-width,
.site-align-inner {
  width: 100%;
  max-width: var(--home-grid-max-width);
  margin-inline: auto;
}

.site-align-outer {
  width: 100%;
  padding-inline: 1rem;
}

/* ── Header ── */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  padding: 0.75rem 0;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 0.55rem;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
}
.brand:hover { text-decoration: none; }

.brand__logo {
  height: 52px;
  width: auto;
  max-width: min(220px, 45vw);
}

.brand__campus {
  display: block;
  margin: 0;
  color: rgba(0, 0, 0, 0.6);
  font-family: "Roboto Condensed", sans-serif;
  font-weight: 400;
  font-size: 0.72rem;
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transform: translateY(0.18em);
}

.header-dept {
  margin-left: auto;
  text-align: right;
  line-height: 1.35;
}

.brand__dept { font-weight: 700; font-size: 0.95rem; color: #707070; }
.brand__dept-chi { font-size: 0.85rem; color: #707070; }

.nav-toggle {
  display: none;
  position: relative;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  background: var(--color-primary);
  color: transparent;
  border: none;
  padding: 0;
  border-radius: var(--radius);
  font-size: 0;
  cursor: pointer;
  line-height: 0;
}

.nav-toggle::before {
  content: "";
  display: block;
  width: 1.15rem;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  box-shadow: 0 -6px 0 #fff, 0 6px 0 #fff;
}

.nav-toggle[aria-expanded="true"]::before {
  box-shadow: none;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"]::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1.15rem;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  transform: translate(-50%, -50%) rotate(-45deg);
}

.site-nav { background: var(--color-nav); }

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
}

.nav-list > li {
  position: relative;
  display: flex;
  align-items: stretch;
}

.nav-list > li > a,
.nav-list > li > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1rem;
  color: #fff;
  font-size: 0.78rem;
  font-family: "Roboto Condensed", sans-serif;
  font-weight: 200;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  -webkit-appearance: none;
  appearance: none;
}

.nav-list > li > a:hover,
.nav-list > li > button:hover,
.nav-list > li.is-active > a {
  background: rgba(255, 255, 255, 0.15);
  text-decoration: none;
}

.nav-list > li.has-dropdown > button::after {
  content: "▾";
  font-size: 0.65rem;
  margin-left: 0.25rem;
  line-height: 1;
  transform: translateY(1px);
}

.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #fff;
  box-shadow: var(--shadow);
  border-radius: 0 0 var(--radius) var(--radius);
  z-index: 50;
  list-style: none;
  margin: 0;
  padding: 0.35rem 0;
}

.nav-list > li.has-dropdown:hover .nav-dropdown,
.nav-list > li.has-dropdown.is-open .nav-dropdown {
  display: block;
}

.nav-dropdown a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--color-text);
  font-size: 0.85rem;
  text-transform: none;
  font-weight: normal;
}

.nav-dropdown a:hover {
  background: #eef4fb;
  text-decoration: none;
}

/* ── Hero ── */
.hero {
  position: relative;
  overflow: hidden;
  background: #1a1a1a;
  --hero-height: clamp(264px, 50.4vw, 480px);
  --hero-photo-shift: 0px;
  --hero-title-shift: 0px;
}

.hero__slides {
  position: relative;
  min-height: var(--hero-height);
}

.hero__slide {
  display: block;
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  text-decoration: none;
  color: inherit;
  z-index: 0;
}

.hero__slide:hover { text-decoration: none; color: inherit; }

.hero__slide.is-active {
  opacity: 1;
  z-index: 1;
}

.hero__banner-label {
  position: absolute;
  z-index: 2;
  left: max(1.25rem, 3vw);
  top: 50%;
  transform: translateY(calc(-50% + 5rem - var(--hero-title-shift)));
  margin: 0;
  color: #fff;
  font-family: "Roboto Condensed", sans-serif;
  font-weight: 200;
  font-size: clamp(2.6rem, 4.8vw, 4.25rem);
  line-height: 1.05;
  text-shadow:
    0.04em 0.08em 0.14em rgba(0, 0, 0, 0.7),
    0.05em 0.1em 0.38em rgba(0, 0, 0, 0.7);
  pointer-events: none;
}

.hero__banner-label--top-right {
  left: auto;
  right: max(1.25rem, 3vw);
  top: max(0.85rem, 2.2vw);
  transform: translateY(calc(var(--hero-title-shift) * -0.28));
  text-align: right;
}

.hero__banner-label span {
  display: block;
  white-space: nowrap;
}

.hero__slide.is-active .hero__banner-label span {
  animation: hero-label-in 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero__slide.is-active .hero__banner-label--top-right span {
  animation-name: hero-label-in-right;
}

.hero__slide.is-active .hero__banner-label span:nth-child(2) {
  animation-delay: 0.12s;
}

.hero__slide.is-active .hero__banner-label span:nth-child(3) {
  animation-delay: 0.24s;
}

@keyframes hero-label-in {
  from {
    opacity: 0;
    transform: translate3d(-0.45em, 0.4em, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes hero-label-in-right {
  from {
    opacity: 0;
    transform: translate3d(0.45em, 0.28em, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__slide.is-active .hero__banner-label span,
  .hero__slide img,
  .home-grid--motion > .home-reveal {
    animation: none;
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.hero__banner-label span:first-child {
  font-size: 0.7em;
}

@media (max-width: 800px) {
  .hero__banner-label {
    font-size: clamp(1.2rem, 6.2vw, 2.25rem);
    transform: translateY(calc(-50% + 2.75rem - var(--hero-title-shift)));
  }

  .hero__banner-label--top-right {
    top: 0.7rem;
    right: 0.85rem;
    transform: translateY(calc(var(--hero-title-shift) * -0.28));
  }
}

.hero__slide img {
  width: 100%;
  height: var(--hero-height);
  object-fit: cover;
  display: block;
  transform: translate3d(0, var(--hero-photo-shift), 0) scale(1.08);
  transform-origin: center center;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.15) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem;
  color: #fff;
  pointer-events: none;
}

.hero__title { font-size: clamp(1.4rem, 4vw, 2rem); font-weight: 400; margin: 0; }
.hero__subtitle { font-size: clamp(1rem, 2.5vw, 1.35rem); margin: 0.25rem 0 0; opacity: 0.9; }

.hero__cta-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  text-align: center;
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  z-index: 2;
  pointer-events: none;
}

.hero__dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.4rem;
  z-index: 3;
}

.hero__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.hero__dot.is-active { background: #fff; }

/* ── Home grid ── */
.home-grid-outer {
  width: 100%;
  padding: 0.5rem 1rem 1.5rem;
}

.home-grid {
  display: grid;
  gap: 0.5rem;
  width: min(100%, var(--home-grid-max-width));
  max-width: var(--home-grid-max-width);
  margin-inline: auto;
  grid-template-columns: 1fr;
  justify-content: center;
}

.home-grid--motion > .home-reveal {
  opacity: 0;
  transform: translateY(1.75rem);
}

.home-grid--motion > .home-reveal.is-in {
  animation: home-col-in 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.home-grid--motion > .home-reveal.is-in:nth-child(2) {
  animation-delay: 0.1s;
}

.home-grid--motion > .home-reveal.is-in:nth-child(3) {
  animation-delay: 0.2s;
}

@keyframes home-col-in {
  from {
    opacity: 0;
    transform: translateY(1.75rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (min-width: 768px) {
  .home-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) var(--side-banner-width);
    align-items: stretch;
  }

  .home-grid > .card-panel,
  .home-grid > .side-banner {
    height: var(--side-banner-height);
    box-sizing: border-box;
  }

  .home-facebook,
  .home-instagram {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .home-facebook__embed,
  .home-instagram__embed {
    flex: 1;
    min-height: 0;
  }

  .home-facebook__fallback,
  .home-instagram__fallback {
    flex-shrink: 0;
    padding: 0.3rem 0.5rem 0.4rem;
    font-size: 0.78rem;
  }
}

.home-grid__left.home-facebook {
  width: 100%;
  max-width: min(100%, 500px);
  justify-self: center;
  margin-inline: auto;
  border-radius: 0;
  overflow: hidden;
}

.home-grid__center.home-instagram {
  width: 100%;
  justify-self: stretch;
  border-radius: 0;
  overflow: hidden;
}

.home-facebook__embed {
  width: 100%;
  padding: 0;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  border-radius: 0;
}

.home-facebook__embed .fb-page {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-inline: auto !important;
  overflow: hidden !important;
  border-radius: 0 !important;
}

.home-facebook__embed .fb-page > span {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-inline: auto !important;
  overflow: hidden !important;
  border-radius: 0 !important;
}

.home-facebook__embed .fb-page,
.home-facebook__embed .fb-page > span,
.home-facebook__embed iframe {
  max-width: 100% !important;
  margin-inline: auto !important;
  border-radius: 0 !important;
}

.home-facebook__embed iframe {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  border-radius: 0 !important;
}

.home-facebook__embed * {
  border-radius: 0 !important;
}

.home-facebook__fallback {
  margin: 0;
  padding: 0.5rem 0.75rem 0.75rem;
  text-align: center;
  font-size: 0.85rem;
}

.home-instagram__embed {
  width: 100%;
  padding: 0;
  overflow: hidden;
  display: flex;
  justify-content: center;
}

.home-instagram__embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0 !important;
  display: block;
  margin-inline: auto;
  clip-path: inset(0 round 0);
}

.home-instagram__fallback {
  margin: 0;
  padding: 0.5rem 0.75rem 0.75rem;
  text-align: center;
  font-size: 0.85rem;
}

.home-featured__grid {
  display: grid;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .home-featured__grid { grid-template-columns: 1fr 1fr; }
}

.home-featured__item {
  display: block;
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--color-border);
  overflow: hidden;
  border-radius: var(--radius);
}
.home-featured__item:hover { text-decoration: none; color: inherit; }

.home-featured__item img {
  width: 100%;
  aspect-ratio: 308 / 180;
  object-fit: cover;
}

.home-featured__caption {
  padding: 0.65rem 0.75rem;
  font-size: 0.82rem;
  line-height: 1.4;
}
.home-featured__caption strong {
  display: block;
  color: var(--color-primary);
  font-size: 0.88rem;
  margin-bottom: 0.2rem;
}
.home-featured__caption span { color: var(--color-muted); }

.home-featured__more {
  padding: 0 0.75rem 0.75rem;
  text-align: right;
  font-size: 0.85rem;
}

.card-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  overflow: hidden;
}

.card-panel__head {
  color: var(--color-primary);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  padding: 0.65rem 0.75rem 0;
}

.news-card {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem 2.5rem;
  position: relative;
  min-height: 120px;
}

.news-card__thumb img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 2px;
}

.news-card__title { color: var(--color-primary); font-weight: 700; font-size: 0.9rem; }
.news-card__text { font-size: 0.82rem; line-height: 1.45; color: var(--color-text); }

.news-card__more {
  position: absolute;
  right: 0.35rem;
  bottom: 0.35rem;
  width: 44px;
  height: 44px;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  clip-path: polygon(15% 25%, 100% 0, 100% 100%, 0 100%);
  padding-left: 6px;
  text-decoration: none;
}
.news-card__more:hover { background: var(--color-primary-dark); text-decoration: none; color: #fff; }

.banner-card img {
  width: 100%;
  aspect-ratio: 308 / 180;
  object-fit: cover;
}

.side-banner {
  display: block;
  width: var(--side-banner-width);
  max-width: 100%;
  margin-inline: auto;
  text-decoration: none;
  padding: 0;
}
.side-banner:hover { text-decoration: none; }

.side-banner img {
  width: var(--side-banner-width);
  max-width: 100%;
  height: auto;
  display: block;
}

@media (min-width: 768px) {
  .home-grid > .side-banner {
    overflow: hidden;
  }

  .home-grid > .side-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

.programme-banner {
  display: flex;
  flex-direction: column;
  background: #2a2a2a;
  color: #fff;
  text-align: center;
  min-height: 200px;
  position: relative;
  text-decoration: none;
}
.programme-banner:hover { text-decoration: none; color: #fff; }
.programme-banner__title {
  padding: 1rem 0.75rem 0;
  font-size: clamp(0.85rem, 2vw, 1rem);
  font-weight: 400;
  line-height: 1.35;
  text-transform: uppercase;
}
.programme-banner__img { margin-top: auto; }
.programme-banner__img img { width: 100%; aspect-ratio: 328/260; object-fit: cover; }

/* ── Page sections ── */
.page-hero {
  background: transparent;
  color: var(--color-primary);
  padding: 2rem 0 1rem;
  margin-bottom: 0.5rem;
}
.page-hero h1 {
  margin: 0;
  font-family: "Roboto Condensed", sans-serif;
  font-size: clamp(3.375rem, 9vw, 4.5rem);
  font-weight: 200;
  color: var(--color-primary);
}
.page-hero p {
  margin: 0.5rem 0 0;
  color: var(--color-muted);
}

.page-content {
  width: 70%;
  margin-inline: auto;
  margin-bottom: 2rem;
}

.page-content h2 { color: var(--color-primary); font-size: 1.15rem; margin: 1.5rem 0 0.75rem; }
.page-content h2:first-child { margin-top: 0; }
.page-content p { margin: 0 0 1rem; }
.page-content ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}
.page-content li {
  margin-bottom: 0.5rem;
  line-height: 1.55;
}

#higher-diploma,
#full-time,
#part-time {
  scroll-margin-top: calc(var(--site-header-height) + 0.75rem);
}

/* ── Programme catalog ── */
.programmes-catalog {
  width: 100%;
  margin: 0 0 2.5rem;
}

.programme-group__title {
  margin: 0 0 1.15rem;
  color: var(--color-primary-dark);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.programme-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.programme-list li {
  border-bottom: 1px solid var(--color-border);
}

.programme-list li:last-child {
  border-bottom: none;
}

.programme-row {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.75rem 0.7rem;
  align-items: baseline;
  padding: 0.35rem 0;
  color: inherit;
  text-decoration: none;
}

.programme-row:hover,
.programme-row:hover .programme-row__code,
.programme-row:hover .programme-row__title {
  text-decoration: none;
}

.programme-row__code {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--color-primary);
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.programme-row__title {
  color: #6b6b6b;
}

.programme-row:hover .programme-row__title {
  color: var(--color-primary);
}

.programme-row__sf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  height: 1.15rem;
  padding: 0 0.22rem;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
}

.programme-divider {
  border: 0;
  border-top: 1px solid #d0d0d0;
  margin: 1.75rem 0;
}

.programme-note {
  margin: 1.75rem 0 0;
  color: #8a8a8a;
  font-size: 0.82rem;
  line-height: 1.55;
}

.programme-note .nowrap {
  white-space: nowrap;
}

@media (min-width: 1080px) {
  .programme-note {
    white-space: nowrap;
  }
}

@media (max-width: 640px) {
  .programme-row {
    grid-template-columns: 1fr;
    gap: 0.15rem;
    padding: 0.55rem 0;
  }
}

/* ── Top Up Degree ── */
.topup-page {
  width: min(100%, 52rem);
  padding: 2rem 0 2.5rem;
  color: #555;
}

.topup-page__title {
  margin: 0 0 0.4rem;
  color: var(--color-primary-dark);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.topup-page__programme {
  margin: 0 0 1.15rem;
  color: #4a4a4a;
  font-size: 1.35rem;
  font-weight: 400;
}

.topup-page__divider {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: 0 0 1.5rem;
}

.topup-label {
  color: var(--color-primary);
  font-weight: 700;
}

.topup-block {
  margin: 0 0 1.4rem;
}

.topup-block p {
  margin: 0.25rem 0 0;
  line-height: 1.6;
}

.topup-page__desc {
  margin: 0 0 1.4rem;
  line-height: 1.7;
}

.topup-contact {
  margin: 0.9rem 0 0;
}

.topup-contact__role {
  margin: 0 0 0.2rem;
  color: #4a4a4a;
  font-weight: 500;
}

.topup-page a {
  color: inherit;
  text-decoration: none;
}

.topup-page a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

/* ── Decorative page backgrounds ── */
@keyframes page-bg-enter {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes page-bg-enter-mobile {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 0.35;
    transform: translateX(0);
  }
}

.about-page,
.industry-page {
  position: relative;
  isolation: isolate;
}

.about-page::before,
.industry-page::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(48vw, 620px);
  height: min(90vh, 960px);
  pointer-events: none;
  z-index: 0;
  animation: page-bg-enter 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.about-page::before {
  background: url("../../images/graphic/bg_image_01.png") no-repeat right bottom / contain;
}

.industry-page::before {
  background: url("../../images/graphic/bg_image_02.png?v=2026062245") no-repeat right bottom / contain;
}

.about-page.page-bg-replay::before,
.industry-page.page-bg-replay::before {
  animation: page-bg-enter 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.about-page > * {
  position: relative;
  z-index: 1;
}

.industry-page > * {
  position: relative;
  z-index: 1;
}

.about-page .page-hero h1 {
  line-height: 0.88;
}

@media (max-width: 767px) {
  .about-page::before,
  .industry-page::before,
  .about-page.page-bg-replay::before,
  .industry-page.page-bg-replay::before {
    width: min(70vw, 360px);
    height: min(50vh, 480px);
    animation-name: page-bg-enter-mobile;
  }
}

@media (prefers-reduced-motion: reduce) {
  .about-page::before,
  .industry-page::before,
  .about-page.page-bg-replay::before,
  .industry-page.page-bg-replay::before {
    animation: none;
  }
}

/* ── Cards grid ── */
.cards-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  margin-bottom: 2rem;
}

.info-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}
.info-card:hover { transform: translateY(-2px); }

.info-card__img img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.info-card__body { padding: 1rem; }
.info-card__title { font-size: 1rem; font-weight: 700; margin: 0 0 0.35rem; color: var(--color-primary); }
.info-card__chi { font-size: 0.85rem; color: var(--color-muted); margin-bottom: 0.5rem; }
.info-card__text { font-size: 0.88rem; margin: 0; }

/* ── Gallery YouTube ── */
.gallery-youtube {
  margin-bottom: 2rem;
  width: 100%;
}

.gallery-youtube__layout {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .gallery-youtube__layout {
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    align-items: start;
  }
}

.gallery-youtube__player iframe {
  width: 100%;
  height: min(56vw, 500px);
  min-height: 280px;
  border: 0;
  border-radius: 0;
  display: block;
  background: #111;
}

@media (min-width: 900px) {
  .gallery-youtube__player iframe {
    height: min(50vh, 520px);
    min-height: 360px;
  }
}

.gallery-youtube__list-wrap {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  overflow: hidden;
}

.gallery-youtube__list-title {
  margin: 0;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-primary);
  border-bottom: 1px solid var(--color-border);
}

.gallery-video-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: min(56vw, 500px);
  overflow-y: auto;
}

@media (min-width: 900px) {
  .gallery-video-list {
    max-height: min(50vh, 520px);
    min-height: 360px;
  }
}

.gallery-video-list__item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0.65rem;
  width: 100%;
  padding: 0.65rem;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.gallery-video-list__item:hover,
.gallery-video-list__item.is-active {
  background: #eef4fb;
}

.gallery-video-list__item.is-active .gallery-video-list__title {
  color: var(--color-primary);
}

.gallery-video-list__thumb {
  width: 120px;
  height: 68px;
  object-fit: cover;
  display: block;
  background: #ddd;
}

.gallery-video-list__meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.gallery-video-list__title {
  font-size: 0.82rem;
  line-height: 1.35;
  font-weight: 600;
  color: var(--color-text);
}

.gallery-video-list__date {
  font-size: 0.75rem;
  color: var(--color-muted);
}

.gallery-youtube__fallback,
.gallery-youtube__error {
  margin: 0.75rem 0 0;
  text-align: center;
  font-size: 0.85rem;
}

/* ── News list ── */
.news-list { list-style: none; margin: 0; padding: 0; }
.news-list__item {
  display: grid;
  gap: 1rem;
  grid-template-columns: 90px 1fr;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--color-border);
}
.news-list__item:last-child { border-bottom: none; }
.news-list__thumb img { width: 90px; height: 90px; object-fit: cover; border-radius: 2px; }
.news-list__date { font-size: 0.8rem; color: var(--color-muted); }
.news-list__title { font-weight: 700; color: var(--color-primary); margin: 0.15rem 0; }

/* ── Contact ── */
.contact-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .contact-grid { grid-template-columns: 1fr 1fr; }
}

.contact-block h3 { color: var(--color-primary); margin: 0 0 0.5rem; }

.contact-page .page-content {
  width: min(100%, 42rem);
}

main.contact-page {
  padding-bottom: 8rem;
}

.contact-org {
  margin: 0 0 1.25rem;
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.45;
}

.contact-details {
  margin: 0.5rem 0 0;
}

.contact-details div {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.35rem 1rem;
  align-items: baseline;
  padding: 0.9rem 0;
  border-top: 1px solid var(--color-border);
}

.contact-details div:last-child {
  border-bottom: 1px solid var(--color-border);
}

.contact-details dt {
  margin: 0;
  font-weight: 700;
  color: var(--color-primary);
}

.contact-details dd {
  margin: 0;
}

@media (max-width: 640px) {
  .contact-details div {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li { padding: 0.35rem 0; border-bottom: 1px solid var(--color-border); }
.link-list li:last-child { border-bottom: none; }

/* ── Footer ── */
.site-footer {
  flex-shrink: 0;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  width: 100%;
  margin-top: 0;
  background: var(--color-footer);
  border-top: 1px solid var(--color-border);
  padding: 1rem 0;
  font-size: 0.82rem;
  color: var(--color-muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.footer-copy {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
  width: 100%;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  flex-shrink: 0;
}
.footer-links a { color: var(--color-muted); }

@media (min-width: 768px) {
  .footer-inner {
    flex-wrap: nowrap;
  }

  .footer-copy {
    text-align: left;
  }

  .footer-links {
    margin-left: auto;
    justify-content: flex-end;
  }
}

@media (max-width: 767px) {
  .footer-inner {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
  }

  .footer-copy {
    text-align: left;
  }

  .footer-links {
    justify-content: center;
  }
}

/* ── Mobile nav ── */
@media (max-width: 900px) {
  .header-top {
    position: relative;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .brand {
    display: inline-flex;
    margin-inline: auto;
    flex-direction: column;
    align-items: flex-start;
    width: max-content;
    gap: 0.2rem;
  }

  .brand__campus {
    align-self: stretch;
    box-sizing: border-box;
    margin: 0;
    padding-left: calc(70 / 252 * 100%);
    text-align: left;
    transform: none;
  }

  .header-dept {
    margin-left: 0;
    max-width: 100%;
    text-align: center;
  }

  .brand__dept { font-size: 0.82rem; color: #707070; }
  .brand__dept-chi { font-size: 0.78rem; color: #707070; }

  .nav-toggle {
    display: flex;
    position: absolute;
    top: 0.75rem;
    right: 0;
    margin: 0;
  }

  .site-nav {
    display: none;
    border-top: 1px solid rgba(255,255,255,.2);
  }
  .site-nav.is-open { display: block; }

  .nav-list {
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
  }

  .nav-list > li {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-list > li > a,
  .nav-list > li > button {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .nav-dropdown {
    position: static;
    box-shadow: none;
    background: rgba(0,0,0,.15);
    border-radius: 0;
    display: none;
  }
  .nav-dropdown a {
    color: #fff;
    padding-left: 1rem;
    padding-right: 1rem;
    text-align: center;
  }
  .nav-dropdown a:hover { background: rgba(255,255,255,.1); }

  .nav-list > li.has-dropdown.is-open .nav-dropdown { display: block; }

  .news-card { grid-template-columns: 64px 1fr; }
  .news-card__thumb img { width: 64px; height: 64px; }

  .news-list__item { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  .home-grid__side-right { order: 10; }

  .home-facebook__embed {
    height: 720px;
    min-height: 720px;
  }

  .home-instagram__embed {
    height: 460px;
    min-height: 460px;
  }

  .home-facebook__embed iframe {
    height: 720px !important;
  }

  .home-instagram__embed iframe {
    height: 460px !important;
  }
}
