@charset "UTF-8";
/* =========================================================================
   HKUST UG Hall III — modern stylesheet
   Brand: HKUST blue #003366  |  Accent: #1e747c  |  Light: #f3f3f3
   ========================================================================= */

:root {
  --theme:        #003366;
  --theme-dark:   #00264d;
  --theme-light:  #1e747c;
  --accent:       #ad1457;
  --bg:           #f6f8fb;
  --surface:      #ffffff;
  --text:         #1a2230;
  --text-muted:   #5b6675;
  --border:       #e2e8f0;
  --shadow-sm:    0 1px 3px rgba(0, 51, 102, .08);
  --shadow-md:    0 6px 20px rgba(0, 51, 102, .10);
  --shadow-lg:    0 14px 40px rgba(0, 51, 102, .16);
  --radius:       16px;
  --radius-sm:    10px;
  --container:    1200px;
  --transition:   .3s cubic-bezier(.4, 0, .2, 1);
}

/* ----- Reset / base ----- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: "Ubuntu", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; color: var(--theme); }
a { color: var(--theme-light); transition: color var(--transition); }
a:hover { color: var(--theme); }

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

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 2000;
  background: var(--theme);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 8px 0;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

/* =========================================================================
   Navbar
   ========================================================================= */
.site-header .navbar {
  background: rgba(0, 51, 102, .92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  transition: background var(--transition), box-shadow var(--transition);
  padding: .65rem 0;
}
.site-header .navbar.scrolled {
  background: rgba(0, 38, 77, .97);
  box-shadow: var(--shadow-md);
}
.nav-inner { max-width: var(--container); }
.navbar-brand { padding: 0; margin: 0; margin-right: 1.2rem; line-height: 1; }
.navbar-brand img { height: 36px; }

.navbar-nav {
  gap: .15rem;
  align-items: center;
}
.nav-item { position: relative; }
.nav-link {
  color: rgba(255, 255, 255, .85) !important;
  font-weight: 600;
  font-size: .9rem;
  padding: .4rem .65rem !important;
  border-radius: 999px;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}
.nav-link:hover,
.nav-link:focus-visible {
  color: #fff !important;
  background: rgba(255, 255, 255, .12);
}
.nav-link.active {
  color: #fff !important;
  background: var(--theme-light);
}

/* Toggler */
.navbar-toggler {
  border: 0;
  padding: .5rem;
  background: transparent;
}
.toggler-bar {
  display: block;
  width: 26px;
  height: 2px;
  background: #fff;
  margin: 5px 0;
  transition: transform var(--transition), opacity var(--transition);
}
.navbar-toggler[aria-expanded="true"] .toggler-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar-toggler[aria-expanded="true"] .toggler-bar:nth-child(2) { opacity: 0; }
.navbar-toggler[aria-expanded="true"] .toggler-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================================
   Layout helpers
   ========================================================================= */
main { display: block; }
.section {
  padding: 5rem 0;
  scroll-margin-top: 80px;
}
.section-alt { background: var(--surface); }
.container, .container-fluid { max-width: var(--container); }

.section-head { text-align: center; margin-bottom: 3rem; }
.section-head h2 {
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  margin: 0 0 .5rem;
  position: relative;
  display: inline-block;
}
.section-head h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: var(--theme-light);
  border-radius: 2px;
  margin: .8rem auto 0;
}
.section-head p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 640px;
  margin: .5rem auto 0;
}

/* =========================================================================
   Hero
   ========================================================================= */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  background:
    linear-gradient(rgba(0, 38, 77, .55), rgba(0, 38, 77, .55)),
    url('../../image/ughall_iii_old.jpg') center / cover no-repeat fixed;
}
@media (max-width: 768px) {
  .hero {
    background-attachment: scroll;
    min-height: 78vh;
    background-position: 30% 10%;
  }
}
.hero-inner { max-width: 880px; padding: 2rem; }
.hero .eyebrow {
  display: inline-block;
  font-size: .85rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, .12);
  padding: .4rem 1rem;
  border-radius: 999px;
  margin-bottom: 1.4rem;
}
.hero h1 {
  color: #fff;
  font-size: clamp(2.2rem, 6vw, 4rem);
  margin: 0 0 1rem;
  letter-spacing: -.01em;
}
.hero p {
  font-size: clamp(1.05rem, 2.2vw, 1.5rem);
  margin: 0;
  color: rgba(255, 255, 255, .9);
}
.hero .scroll-cue {
  margin-top: 3rem;
  font-size: 1.6rem;
  color: rgba(255, 255, 255, .75);
  animation: bob 2s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(8px); }
}

/* =========================================================================
   Useful links
   ========================================================================= */
.link-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);   /* mobile: 2 per row */
  gap: 1rem;
}
@media (min-width: 768px) {
  .link-grid { grid-template-columns: repeat(3, 1fr); }  /* tablet+: 3 per row */
}
.link-card {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: 1.1rem 1.3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.link-card i {
  font-size: 1.4rem;
  color: var(--theme-light);
  width: 28px;
  text-align: center;
}
.link-card:hover {
  color: var(--theme);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--theme-light);
}

/* =========================================================================
   Slides embed
   ========================================================================= */
.embed-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16.5 / 10;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--surface);
  border: 1px solid var(--border);
}
@media (max-width: 768px) {
  .embed-frame { aspect-ratio: 16 / 10.3; }
}
.embed-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* =========================================================================
   Team cards
   ========================================================================= */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}
.team-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem 1.4rem 1.6rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
}
.team-card:hover,
.team-card:focus-within {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--theme-light);
}
.team-card.active {
  grid-column: 1 / -1;
  border-color: var(--theme);
  box-shadow: var(--shadow-lg);
  text-align: left;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  align-items: center;
  padding: 2rem;
}
@media (max-width: 640px) {
  .team-card.active { grid-template-columns: 1fr; text-align: center; }
}
.team-avatar {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  border: 4px solid var(--bg);
  box-shadow: var(--shadow-sm);
}
.team-card.active .team-avatar {
  width: 220px;
  height: 220px;
  margin: 0;
}
@media (max-width: 640px) {
  .team-card.active .team-avatar { margin: 0 auto 2rem; }
}
.team-card h3 {
  font-size: 1.15rem;
  margin: 0 0 .25rem;
}
.team-card .role {
  color: var(--theme-light);
  font-weight: 600;
  font-size: .92rem;
  margin: 0;
}
.team-card .hint {
  font-size: .8rem;
  color: var(--text-muted);
  margin: .75rem 0 0;
  font-style: italic;
}
.team-details {
  display: none;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}
.team-card.active .team-details { display: block; }
.team-card.active .hint { display: none; }
.team-details li {
  padding: .35rem 0;
  color: var(--text-muted);
  border-bottom: 1px dashed var(--border);
  font-size: .95rem;
}
.team-details li:last-child { border-bottom: 0; }
.team-details a { font-weight: 600; }

/* =========================================================================
   Communities
   ========================================================================= */
.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.community-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.community-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.community-card .img-wrap {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.community-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.community-card:hover img { transform: scale(1.05); }
.community-card .body { padding: 1.2rem 1.3rem; }
.community-card h3 {
  font-size: 1.1rem;
  margin: 0;
}

/* =========================================================================
   Calendar / duty embeds
   ========================================================================= */
.calendar-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.calendar-wrap iframe { display: block; width: 100%; border: 0; }

/* =========================================================================
   Activity detail page
   ========================================================================= */
.activity-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}
@media (max-width: 768px) {
  .activity-layout { grid-template-columns: 1fr; }
}
.activity-info h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0 0 1.2rem;
}
.activity-info dl {
  margin: 0 0 1.5rem;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: .6rem 1.2rem;
}
.activity-info dt {
  font-weight: 700;
  color: var(--theme);
}
.activity-info dd { margin: 0; color: var(--text-muted); }
.activity-info .description { color: var(--text); }

/* Splide overrides */
.splide__slide { opacity: 1; }
.splide__pagination__page { background: var(--border); }
.splide__pagination__page.is-active { background: var(--theme); }

/* =========================================================================
   Activities table (recent activities / HLP)
   ========================================================================= */
.activity-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.activity-table thead { background: var(--theme); color: #fff; }
.activity-table th {
  padding: 1.1rem 1.2rem;
  text-align: left;
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .02em;
}
.activity-table td {
  padding: 1.1rem 1.2rem;
  border-top: 1px solid var(--border);
  vertical-align: middle;
}
.activity-table tbody tr { transition: background var(--transition); }
.activity-table tbody tr:hover { background: var(--bg); }
.activity-table .event-date {
  text-align: center;
  white-space: nowrap;
}
.activity-table .event-date .day {
  display: block;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--theme);
  line-height: 1;
}
.activity-table .event-date .month { color: var(--text-muted); font-size: .85rem; }
.activity-table .event-img img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}
.activity-table .event-name {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
  color: var(--text);
}
.activity-table .btn {
  background: var(--theme);
  border: 0;
  padding: .5rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .9rem;
}
.activity-table .btn:hover { background: var(--theme-dark); }
@media (max-width: 640px) {
  .activity-table .event-img img { width: 80px; height: 80px; }
  .activity-table th, .activity-table td { padding: .8rem; }
}

.video-block {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.video-block iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.program-block {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 3rem;
}
.program-block h2 {
  font-size: 1.7rem;
  text-align: center;
  margin: 0 0 2rem;
}

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer {
  background: var(--theme-dark);
  color: rgba(255, 255, 255, .8);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.footer-brand { display: flex; align-items: center; gap: 1rem; }
.footer-brand p { margin: 0; font-weight: 600; color: #fff; }
.footer-social { display: flex; gap: .8rem; }
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-size: 1.2rem;
  transition: background var(--transition), transform var(--transition);
}
.social-link:hover { background: var(--theme-light); color: #fff; transform: translateY(-2px); }
.footer-copy {
  text-align: center;
  margin: 1.5rem 0 0;
  font-size: .85rem;
  color: rgba(255, 255, 255, .55);
}

/* =========================================================================
   Utility
   ========================================================================= */
.text-center-center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.container-narrow { max-width: 880px; margin-left: auto; margin-right: auto; }

/* Fade-in on scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
