@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@100..900&family=Noto+Sans+TC:wght@100..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", "Noto Sans TC", "Noto Sans SC", sans-serif !important;
  hyphens: none;
}
html {
  scrollbar-gutter: stable;
}
html.modal-open,
body.modal-open {
  overflow: hidden !important;
  height: 100%;
  overscroll-behavior: none;
}
body div.frame-container {
  background-image: linear-gradient(to bottom, #ffdfbf, #ffc983);
  color: #000000;
  justify-content: center;
}
.container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
}
.cmp-container {
  width: 100%;
}
.hero-section {
  background: linear-gradient(to bottom, #dbeafe, #e0f2fe);
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}
.top-nav {
  width: 100%;
  max-width: 1200px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
}
.logos {
  font-weight: bold;
  color: #1e3a8a;
  font-size: 1.2rem;
}
.dept-info {
  color: #3b82f6;
  text-align: right;
  font-size: 0.9rem;
  font-weight: 500;
}
.hero-text {
  margin-top: 40px;
}
.hero-text h1 {
  color: #3b82f6;
  font-size: 3rem;
  line-height: 1.3;
}
.hero-graphic {
  margin-top: 30px;
  padding: 100px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 15px;
}

/* --- Hero Image Fixes --- */
.hero-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}
.dialog-hero .hero-image {
  height: 100%;
}

.welcome-card {
  background-color: #ffffff;
  border-radius: 15px;
  padding: 50px;
  max-width: 1000px;
  width: 90%;
  margin: -80px auto 60px auto;
  position: relative;
  z-index: 10;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}
.welcome-card h1 {
  margin-bottom: 20px;
  font-size: 2.4rem;
  color: #fdad06;
}
.welcome-card p {
  color: #fdad06;
  line-height: 1.6;
  margin-bottom: 30px;
}
.nav-tabs {
  display: flex;
  gap: 20px;
  margin-bottom: 50px;
  border: 0px;
}
.nav-tabs button {
  background: transparent;
  border: 1.5px solid #3b82f6;
  padding: 10px 40px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  width: 80%;
}
.nav-tabs button.purple {
  background: #ffffff;
  border: 0px;
  color: #8a17e8;
}
.nav-tabs button.purple:hover {
  background: #8a17e8;
  color: #ffffff;
  box-shadow: 0 0 8px #888888;
}
.nav-tabs button.yellow {
  background: #ffffff;
  border: 0px;
  color: #fdad06;
}
.nav-tabs button.yellow:hover {
  background: #fdad06;
  color: #ffffff;
  box-shadow: 0 0 8px #888888;
}
.nav-tabs button.blue {
  background: #ffffff;
  border: 0px;
  color: #1fa6fa;
}
.nav-tabs button.blue:hover {
  background: #1fa6fa;
  color: #ffffff;
  box-shadow: 0 0 8px #888888;
}
.event-section {
  width: 100%;
  background-color: transparent;
  padding: 0px 20px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-items: center;
  gap: 20px;
  margin: 20px auto;
  max-width: 1200px;
}
.event-row {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}
.event-text {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 24px;
  padding-bottom: 50px;
  border-radius: 16px;
  background-color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.event-image {
  flex: 1;
  width: 100%;
  height: 250px;
  border-radius: 15px;
  display: flex;
  object-fit: cover;
  object-position: center;
  color: #9ca3af;
}
.section-title {
  font-size: 2.45rem;
  color: #f3992b;
  font-weight: bold;
  letter-spacing: 1px;
  text-align: center;
}
.tag {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 16px;
  color: #ffffff;
  font-weight: bold;
  font-size: 0.95rem;
  border-radius: 20px;
  margin-bottom: 0;
}
.tag.blue {
  background-color: #3594c0;
}
.tag.orange {
  background-color: #f8a847;
}
.tag.purple {
  background-color: #c577b3;
}
.tag.green {
  background-color: #3d9954;
}
.tag.pink {
  background-color: #fc5d5d;
}

.event-text p {
  color: #000000;
  line-height: 1.6;
  text-align: left;
}
.tour-information {
  background-color: #ffffff;
  border-radius: 15px;
  padding: 50px;
  max-width: 1000px;
  width: 90%;
  margin: 60px auto;
  position: relative;
  z-index: 10;
  text-align: left;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}
.tour-information h1 {
  margin-bottom: 20px;
  font-size: 2.4rem;
  color: #f3992b;
  text-align: center;
}
.tour-information ul {
  padding: 0 0 20px 20px;
  text-align: left;
}
.tour-information small {
  color: #666;
  font-style: italic;
  text-align: left;
}
/* --- Calendar Layout --- */
.calendar-section {
  max-width: 1400px;
  margin: 60px auto 0;
  padding: 0 20px;
}
.calendar-header {
  text-align: center;
  margin-bottom: 40px;
}
.calendar-header .section-subtitle {
  color: #666;
  font-size: 0.9rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.calendar-header h2 {
  font-size: 2.2rem;
  margin: 10px 0;
  color: #1a1a1a;
}
/* --- Legend --- */
.calendar-legend {
  background-color: #f8f9fa;
  padding: 24px;
  border-radius: 12px;
  margin-bottom: 30px;
}
.legend-items {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0;
}

/* --- Tag Colors (Based on Canva) --- */
.cal-tag {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #333;
}
.tag-a {
  background-color: #3594c0;
} /* Pastel Teal */
.tag-b {
  background-color: #3d9954;
} /* Pastel Green */
.tag-c {
  background-color: #fc5d5d;
} /* Pastel Pink/Red */
.tag-d {
  background-color: #c577b3;
} /* Pastel Purple */
.tag-homecoming {
  background-color: goldenrod;
} /* Homecoming Gold */

/* --- Calendar Grid --- */
.calendar-grid-wrapper {
  overflow-x: auto;
  padding-bottom: 20px;
}
.calendar-grid-wrapper h3 {
  margin-bottom: 16px;
  font-size: 1.2rem;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  min-width: 600px;
  border-top: 1px solid #e0e0e0;
  border-left: 1px solid #e0e0e0;
}
.day-name {
  background-color: #f8f9fa;
  padding: 12px;
  text-align: center;
  font-weight: bold;
  font-size: 0.85rem;
  color: #555;
  border-right: 1px solid #e0e0e0;
  border-bottom: 1px solid #e0e0e0;
}
.day {
  background-color: #ffffff;
  min-height: 180px;
  padding: 10px;
  border-right: 1px solid #e0e0e0;
  border-bottom: 1px solid #e0e0e0;
  font-size: 0.95rem;
  color: #333;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.day.empty {
  background-color: #fafafa;
  color: #aaa;
}
.event {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.3;
  transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}
/* 1. The Highlighted State (Filter Match) */
.event.highlighted {
  opacity: 1; /* Ensures it overrides any previous dulled state */
  border: 2px solid #f3992b; /* Replace with your site's brand/accent color */
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15); /* Subtle glow matching the border */
  transform: translateY(-2px); /* Gives a tactile "lifted" effect */
  z-index: 2; /* Ensures the border and shadow overlap neighboring elements cleanly */
}

/* 2. The Full State (Fully Booked / Unclickable) */
.event.full {
  /* Diagonal stripes are a standard UI pattern for "unavailable" */
  background: repeating-linear-gradient(
    45deg,
    #f9f9f9,
    #f9f9f9 10px,
    #eaeaea 10px,
    #eaeaea 20px
  );
  color: #999; /* Mutes the text */
  border: 1px solid #ddd;
  cursor: not-allowed; /* Visually reinforces your JavaScript e.preventDefault() */
}

/* Optional: Dull the full state slightly when a filter is active, but keep it distinct from standard dulled items */
.event.dulled {
  opacity: 0.2;
}
/* Style the legend buttons to look clickable */
.filter-btn {
  cursor: pointer;
  transition: opacity 0.2s ease;
  display: inline-block;
}
/* The class to dull unselected legend items */
.filter-btn.inactive {
  opacity: 0.4;
}
.cta-section {
  text-align: center;
  padding: 12.5vh 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cta-text {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 25px;
  line-height: 1.5;
  color: #111827;
}
.btn-register {
  background-color: #f3992b;
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 14px 36px;
  border: none;
  border-radius: 15px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(245, 164, 75, 0.4);
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.btn-register:hover {
  transform: translateY(-2px);
}
.close-btn.top {
  position: fixed;
  top: 20px;
  right: 25px;
  background-color: rgb(28, 90, 133, 0.7);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 5px 10px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  z-index: 500;
  height: 30px;
}
.close-btn.top:hover {
  background-color: #0f2f46;
}
.close-btn.btn-register {
  background-color: #1c5a85;
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 14px 36px;
  border: none;
  border-radius: 15px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(45, 170, 218, 0.4);
  transition: transform 0.2s ease, background-color 0.2s ease;
  margin-top: 32px;
}
.close-btn.btn-register:hover {
  background-color: #0f2f46;
  transform: translateY(-2px);
}
dialog.activity-dialog {
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  border: none;
  background-color: #ffffff;
  overflow-y: auto;
  z-index: 500;
  overscroll-behavior: contain;
}
dialog.activity-dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.6);
}
.dialog-content {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: 60px 20px 40px;
  box-sizing: border-box;
}
.open-btn {
  cursor: pointer;
}
.dialog-container {
  position: relative;
  width: 100%;
  height: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
}
.dialog-scroll-content {
  overflow-y: auto;
  max-height: 100%;
  width: 100%;
  scroll-behavior: smooth;
}
.dialog-scroll-content::-webkit-scrollbar {
  width: 8px;
}
.dialog-scroll-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}
.dialog-scroll-content::-webkit-scrollbar-thumb {
  background: rgba(43, 164, 216, 0.5);
  border-radius: 4px;
}
.dialog-scroll-content::-webkit-scrollbar-thumb:hover {
  background: rgba(43, 164, 216, 0.8);
}
.hkbu-hanging-header {
  position: absolute;
  top: 20px;
  right: 145px;
  display: flex;
  align-items: flex-end;
  gap: 16px;
  z-index: 2;
}
[lang="zh-HK"] .hkbu-hanging-header {
  right: 100px;
}
[lang="zh-CN"] .hkbu-hanging-header {
  right: 100px;
}

.hkbu-lang-expand-wrapper {
  display: inline-flex;
  align-items: center;
  height: 30px;
  background-color: rgb(28, 90, 133, 0.7);
  border: none;
  border-bottom: none;
  border-radius: 5px;
  box-shadow: 0 -3px 6px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  cursor: pointer;
  transition: background-color 1s ease, box-shadow 1s ease;
}
.hkbu-lang-expand-wrapper:hover,
.hkbu-lang-expand-wrapper:focus-within {
  background-color: rgb(28, 90, 133, 0.7);
}
.hkbu-lang-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: #404951;
  background: transparent;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.5s ease;
}
.hkbu-lang-expand-wrapper:hover .hkbu-lang-icon-btn {
  color: #000000;
}
.hkbu-lang-horizontal-menu {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  white-space: nowrap;
  max-width: 0;
  opacity: 0;
  transform: translateX(12px);
  transition: max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s ease-in-out, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.3s ease-in-out;
}
.hkbu-lang-expand-wrapper:hover .hkbu-lang-horizontal-menu,
.hkbu-lang-expand-wrapper:focus-within .hkbu-lang-horizontal-menu {
  max-width: 160px;
  opacity: 1;
  padding-right: 8px;
  transform: translateX(0);
}
.hkbu-lang-horizontal-menu .toolbar-menu-item {
  display: inline-block;
  padding: 4px 8px;
  font-size: 13px;
  font-weight: 600;
  color: #404951;
  background: transparent;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
  color: white;
}
.hkbu-lang-horizontal-menu .toolbar-menu-item:hover {
  background-color: #404951;
  color: #ffffff;
}
.hkbu-lang-horizontal-menu .toolbar-menu-item li {
  color: white;
}
.hkbu-lang-horizontal-menu .toolbar-menu-item.active {
  color: #b5eee9;
  font-weight: 700;
}
.dialog-hero {
  position: relative;
  width: 100%;
  height: 50vh;
  flex-shrink: 0;
  overflow: hidden;
  background: rgb(224, 247, 255);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-title {
  color: #ffffff;
  font-size: 2.2rem;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  text-align: center;
  margin: 0;
  padding: 0 20px;
}
.dialog-body-orange {
  background: linear-gradient(180deg, #ffdfb6 0%, #ffdfb6, #ffbe6a 100%);
  padding: 40px 30px;
}
.dialog-white-card {
  background-color: #ffffff;
  border-radius: 15px;
  padding: 40px 40px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  max-width: 800px;
  margin: 5vh auto;
}

/* --- Added Missing Modal Typography styles --- */
.modal-header {
  font-size: 1.1rem;
  color: #333;
  line-height: 1.6;
  margin-bottom: 20px;
}
.modal-body {
  padding: 40px 0;
}

.timeline {
  position: relative;
  max-width: 100%;
  margin: 20px auto 40px auto;
}
/* The vertical orange line from the design */
.timeline::after {
  content: "";
  position: absolute;
  width: 2px;
  background-color: #f89e19;
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -1px;
}
.timeline-item {
  padding: 10px 30px;
  position: relative;
  width: 50%;
  box-sizing: border-box;
}
.timeline-item.left {
  left: 0;
}
.timeline-item.right {
  left: 50%;
}

/* Timeline anchor dots */
.timeline-item::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  background-color: white;
  border: 3px solid #f89e19;
  border-radius: 50%;
  top: 40px;
  z-index: 1;
}
.timeline-item.left::after {
  right: -5px;
}
.timeline-item.right::after {
  left: -5px;
}
.timeline-card {
  text-align: center;
}
.location-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}
.timeline-item:not(:first-child) {
  margin-top: -100px;
}
.timeline .timeline-item:last-child .timeline-card ul {
  margin-bottom: 0px;
}
.timeline-card h4 {
  margin: 0;
  font-size: 13px;
  color: #444;
  font-weight: 600;
  line-height: 1.3;
}
/* Styling for nested sub-points (e.g. Studios inside Academies) */
.timeline-card ul {
  text-align: left;
  margin: 10px 0 -40px 0;
  padding-left: 20px;
  font-size: 13px;
  color: #666;
  line-height: 1.4;
}
.timeline-card ul li {
  margin-bottom: 6px;
}
.remarks-wrapper {
  clear: both; /* Prevents floating timeline cards from overlapping */
  margin-top: 24px; /* Pushes the remarks down away from the timeline */
  margin-bottom: 16px; /* Optional spacing before the Tour Schedule */
}
/* --- Other Routes (Links) --- */
.other-routes {
  margin-top: 32px;
}
.other-routes ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.other-routes li {
  margin-bottom: 12px;
}
.route-link {
  text-decoration: none;
  color: #333;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background-color: rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  transition: background-color 0.2s, transform 0.1s;
}
.route-link:hover {
  background-color: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
}
/* Colors for the Other Route links */
.icon-circle {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.icon-circle.a {
  background-color: #3594c0;
}
.icon-circle.b {
  background-color: #3d9954;
}
.icon-circle.c {
  background-color: #fc5d5d;
}
.icon-circle.d {
  background-color: #c577b3;
}

/* --- CTA Section --- */
.modal-footer {
  text-align: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}
.cta-btn {
  background-color: #1a1a1a;
  color: white;
  border: none;
  padding: 14px 40px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: background-color 0.2s;
}
.cta-btn:hover {
  background-color: #333;
}
.dialog-cta {
  text-align: center;
  margin-top: 40px;
}
.dialog-cta .cta-text {
  color: #000000;
  font-weight: 600;
  margin-bottom: 20px;
  line-height: 1.5;
}
.feature-list {
  line-height: 1.6;
  padding-left: 20px;
  margin-bottom: 40px;
}
.feature-list.custom-bullet {
  list-style-image: url("list-icon.png");
  padding-left: 20px;
}
.carnival-section {
  margin-bottom: 40px;
}
.carnival-section:last-child {
  margin-bottom: 0px;
}
.carnival-section ul.feature-list {
  margin-bottom: 0px;
}
.exhibit-img {
  width: 100%;
  border-radius: 15px;
  margin-top: 20px;
}
.photo-collage-container {
  margin: 20px 0;
  width: 100%;
}
.photo-collage-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}
.collage-item {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.collage-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-container {
  position: relative;
  width: 100%;
  height: 200px; /* Adjust to match your current image height */
  overflow: hidden;
  cursor: pointer; /* Indicates it's clickable */
  margin-bottom: 8px;
}

.gallery-container .location-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0; /* Hide by default */
  transition: opacity 0.5s ease-in-out; /* Smooth fade effect */
  z-index: 1;
}

.gallery-container .location-img.active {
  opacity: 1; /* Show the active image */
  z-index: 2;
}

/* --- Responsive Adjustments for Mobile --- */
@media screen and (max-width: 768px) {
  .event-section {
    padding: 0px 30px;
    gap: 20px;
    grid-template-columns: repeat(1, 1fr);
  }
  .event-row,
  .event-row.reverse {
    flex-direction: column-reverse;
    background-color: #ffffff;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    gap: 20px;
  }
  .event-row .event-text .tag {
    margin: 20px 0 0;
  }
  .event-image {
    width: 100%;
    height: 200px;
  }
  .dialog-white-card {
    padding: 24px;
    margin: 5vh auto;
  }
  .dialog-hero {
    height: 25vh;
  }
  .calendar-section {
    padding: 0 30px;
  }
  .timeline::after {
    left: 20px;
  }
  .timeline-item {
    width: 100%;
    padding-left: 50px;
    padding-right: 0;
  }
  .timeline-item.right {
    left: 0;
  }
  .timeline-item.left::after,
  .timeline-item.right::after {
    left: 15px;
  }
  .timeline-card {
    text-align: center;
  }
  .timeline-item:not(:first-child) {
    margin-top: 40px;
  }
}