body { padding-top: 64px; margin: 0; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; color: #1B3A5C; background: #fce7e0; }
a { color: #FF6B4A; text-decoration: none; }
a:hover { color: #E4552F; }
* { box-sizing: border-box; }


/* ---------- cursor ---------- */
*, *::before, *::after {
    cursor: none !important;
}

#cursor-dot {
    position: fixed;
    pointer-events: none !important;
    z-index: 99999;
    transform: translate3d(-9999px, -9999px, 0);
    will-change: transform;
    top: 0;
    left: 0;

    background-color: transparent;
    background-image: url('https://static.igem.wiki/teams/6058/wiki/mouse-pointer.avif');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 300px;
    height: 300px;
    border-radius: 0;
}

html, body, a, button {
    cursor: none !important;
}

iframe {
    pointer-events: auto !important;
    position: relative;
    z-index: 1;
}

/* Height is set from the form's igem-attribution-form message.
   A fixed height clips the last cards and leaves the footer on top of them. */
#attribution-form {
    display: block;
    width: 100%;
    height: 80vh;
    min-height: 480px;
    border: none;
}

/* ---------- page transition ---------- */
#page-transition { position: fixed; inset: 0; z-index: 99999; background: #FFFBF6; display: flex; align-items: center; justify-content: center; opacity: 1; visibility: visible; transition: opacity .4s ease, visibility .4s ease; pointer-events: none; }
#page-transition.is-idle { opacity: 0; visibility: hidden; }
#page-transition.is-active { opacity: 1; visibility: visible; pointer-events: all; }
#page-transition .pt-loader { width: min(42vw, 220px); height: auto; display: block; filter: drop-shadow(0 12px 24px rgba(27,58,92,.12)); }
@media (prefers-reduced-motion: reduce) {
  #page-transition { transition: none; }
}


/* ---------- nav ---------- */
.navbar.fg-navbar { background: #16324D !important; padding: 10px 0; box-shadow: 0 2px 16px rgba(0,0,0,.12); z-index: 1030; }
.fg-navbar .navbar-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; }
.fg-navbar .navbar-brand img { width: 36px; height: 36px; object-fit: contain; border-radius: 8px; }
.fg-navbar .navbar-brand .fg-kicker { display: block; font-size: 10px; letter-spacing: .08em; color: #9FC7DE; text-transform: uppercase; font-weight: 600; }
.fg-navbar .nav-link { color: #CFE3F0 !important; font-weight: 500; font-size: 14px; }
.fg-navbar .nav-link:hover, .fg-navbar .nav-link.active { color: #fff !important; }
@media (min-width: 992px) {
  .fg-navbar .nav-link.active { border-bottom: 2px solid #FF6B4A; }
}
@media (max-width: 991.98px) {
  .fg-navbar .nav-link.active {
    border-bottom: none;
    border-left: 3px solid #000000;
    padding-left: 10px;
  }
}

@media (max-width: 991.98px) {
  .fg-navbar .navbar-collapse,
  .fg-navbar .navbar-nav,
  .fg-navbar .nav-item,
  .fg-navbar .nav-link,
  .fg-navbar .nav-link.active {
    border-bottom: none !important;
    box-shadow: none !important;
  }

  .fg-navbar .nav-link.active {
    border-left: 4px solid #FF6B4A !important;
    padding-left: 12px !important;
    background: rgba(255, 107, 74, 0.08) !important;
  }
}

/* ---------- hero ---------- */
.fg-hero { position: relative; overflow: hidden; padding: 150px 0 80px; background: radial-gradient(ellipse at 50% 0%, #fbe3db 0%, #fbe3db 60%); }
.fg-hero-helix { position: absolute; top: 60px; left: 0; right: 0; display: flex; justify-content: center; gap: 10px; opacity: .55; pointer-events: none; }
.fg-hero-helix span { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: #FF6B4A; animation: helixDot 2.2s ease-in-out infinite; }
.fg-hero-helix span:nth-child(even) { background: #4FC3E8; }
@keyframes helixDot { 0%, 100% { transform: translateY(-9px); } 50% { transform: translateY(9px); } }
.fg-hero-logo-wrap { position: relative; width: 220px; height: 220px; margin: 0 auto 18px; }
.fg-hero-glow { position: absolute; top: 50%; left: 50%; width: 190px; height: 190px; border-radius: 50%; background: #FF6B4A; filter: blur(38px); transform: translate(-50%,-50%); animation: flameGlow 3.4s ease-in-out infinite; }
@keyframes flameGlow { 0%, 100% { opacity: .45; transform: translate(-50%,-50%) scale(1); } 50% { opacity: .8; transform: translate(-50%,-50%) scale(1.12); } }
.fg-hero-logo { position: relative; width: 100%; height: 100%; object-fit: contain; animation: heroFloat 5s ease-in-out infinite; filter: drop-shadow(0 18px 30px rgba(27,58,92,.18)); }
@keyframes heroFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
.fg-hero-kicker { font-size: 15px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #4FA9C9; margin: 0 0 18px; }
.fg-hero-title { font-size: 52px; font-weight: 800; letter-spacing: -.02em; color: #16324D; margin: 0 0 10px; }
.fg-hero-lead { max-width: 640px; margin: 0 auto; font-size: 18px; line-height: 1.6; color: rgba(27,58,92,.72) !important; }
.fg-hero--simple { padding: 130px 0 60px; }
.fg-hero--simple .fg-hero-title { font-size: 38px; }


.fg-btn { display: inline-block; font-weight: 600; font-size: 15px; padding: 14px 28px; border-radius: 30px; transition: all .15s ease; }
.fg-btn--primary { background: #FF6B4A; color: #fff; box-shadow: 0 10px 22px rgba(255,107,74,.32); }
.fg-btn--primary:hover { transform: translateY(-2px); color: #fff; }
.fg-btn--outline { background: transparent; color: #16324D; border: 2px solid #16324D; }
.fg-btn--outline:hover { background: #16324D; color: #fff; }


/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }


/* ---------- stats ---------- */
.fg-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 24px; text-align: center; padding: 50px 0; }
.fg-stat-num { font-size: 44px; font-weight: 800; color: #FF6B4A; }
.fg-stat-num.blue { color: #4FA9C9; }
.fg-stat-label { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: rgba(27,58,92,.55); margin-top: 6px; }


/* ---------- overview ---------- */
.fg-overview { display: grid; grid-template-columns: 2fr 1fr; gap: 48px; padding: 50px 0 70px; }
.fg-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(27,58,92,.5); margin-bottom: 8px; }
.fg-village-card { background: linear-gradient(135deg,#EAF6FB,#DCEEF6); border-radius: 16px; padding: 26px 22px; text-align: center; transition: transform .15s ease; }
.fg-village-card:hover { transform: translateY(-3px); }
.fg-village-icon { width: 64px; height: 64px; border-radius: 50%; background: #4FA9C9; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 26px; font-weight: 800; margin: 0 auto 14px; }
.fg-link-chip { display: flex; justify-content: space-between; align-items: center; background: #F5F1EA; border-radius: 10px; padding: 14px 16px; font-weight: 600; font-size: 14px; color: #16324D; margin-bottom: 10px; }
.fg-link-chip:hover { background: #FFEFE7; color: #FF6B4A; }


/* ---------- timeline ---------- */
.fg-timeline { max-width: 820px; margin: 0 auto; padding: 60px 0; }
.fg-timeline-list { position: relative; padding-left: 28px; border-left: 3px dashed rgba(79,169,201,.4); }
.fg-timeline-item { position: relative; margin-bottom: 34px; }
.fg-timeline-dot { position: absolute; left: -37px; top: 2px; width: 16px; height: 16px; border-radius: 50%; border: 3px solid #FFFBF6; }
.fg-timeline-date { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #4FA9C9; margin-bottom: 4px; }
.fg-timeline-title { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.fg-timeline-desc { font-size: 14px; color: rgba(27,58,92,.65); line-height: 1.5; }


/* ---------- team ---------- */
.fg-team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px,1fr)); gap: 22px; padding: 20px 0 70px; }
.fg-team-card { background: #fff; border: 1px solid rgba(27,58,92,.08); border-radius: 16px; padding: 26px 18px; text-align: center; transition: transform .18s ease, box-shadow .18s ease; }
.fg-team-card:hover { transform: translateY(-6px); box-shadow: 0 16px 30px rgba(27,58,92,.12); }
.fg-team-avatar { width: 66px; height: 66px; border-radius: 50%; margin: 0 auto 14px; background: #FF6B4A; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 20px; }
.fg-team-avatar.blue { background: #6e4fe8; }
.fg-team-name { font-weight: 700; font-size: 15px; margin-bottom: 2px; }
.fg-team-role { font-size: 12px; color: rgba(27,58,92,.55); }


/* ---------- school carousel ---------- */
.fg-school-carousel { max-width: 1128px; margin: 0 auto; padding: 10px 0 70px; transform: scale(1.3); }
.fg-school-feature { position: relative; display: grid; grid-template-columns: 300px 1fr; gap: 36px; align-items: center; background: #fff; border: 2px solid #16324D; border-radius: 26px; padding: 40px 44px; box-shadow: 0 20px 44px rgba(27,58,92,.10); }
.fg-school-feature-media { display: flex; flex-direction: column; align-items: center; text-align: center; }
.fg-school-photo { position: relative; width: 250px; height: 250px; border-radius: 15%; background: linear-gradient(135deg,#EAF6FB,#DCEEF6); display: flex; flex-direction: column; align-items: center; justify-content: center; color: rgba(27,58,92,.45); overflow: hidden; }
.fg-school-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fg-school-photo::after { content: ""; position: absolute; inset: 0; border-radius: 15%; border: 2px solid rgba(148, 146, 246, 0.5);z-index: 2; }
.fg-school-role { font-size: 15px; font-weight: 700; color: #FF6B4A; margin-bottom: 8px; }
.fg-school-tags { font-size: 13px; font-weight: 700; color: #16324D; line-height: 1.5; }
.fg-school-detail-title { font-size: 22px; font-weight: 800; color: #16324D; margin-bottom: 12px; }
.fg-school-desc { font-size: 15px; line-height: 1.65; color:rgba(27,58,92,.75); margin: 0 0 16px; }
.fg-school-fuel { font-size: 15px; color: #16324D; }
.fg-school-fuel strong { font-weight: 800; }


.fg-carousel-nav { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 30px; }
.fg-carousel-arrow { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%; border: none; background: #16324D; color: #fff; font-size: 20px; display: flex; align-items: center; justify-content: center; transition: transform .15s ease, background .15s ease; }
.fg-carousel-arrow:hover { background: #FF6B4A; transform: scale(1.08); }
.fg-carousel-thumbs { display: flex; gap: 16px; overflow-x:auto; padding: 6px 2px; scrollbar-width: none; }
.fg-carousel-thumbs::-webkit-scrollbar { display: none; }
.fg-thumb { flex: 0 0 auto; width: 78px; height: 78px; border-radius:15%; border: 3px solid transparent; padding: 0; background: linear-gradient(135deg,#EAF6FB,#DCEEF6); overflow: hidden; position: relative; opacity: .55; transition: opacity .18s ease, transform .18s ease, border-color .18s ease; display: flex; align-items: center; justify-content: center; color:rgba(27,58,92,.5); font-weight: 800; font-size: 20px;}
.fg-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fg-thumb:hover { opacity: .85; transform: translateY(-2px); }
.fg-thumb.is-active { opacity: 1; border-color: #16324D; }


/* ---------- section heading ---------- */
.fg-section-head { text-align: center; max-width: 1000px; margin: 40px auto 34px; }
.fg-section-head h2 { font-size: 30px; font-weight: 800; color: #16324D; margin-bottom: 10px; }
.fg-section-head p { font-size: 16px; color: rgba(27,58,92,.65); margin: 0; }


/* ---------- achievements ---------- */
.fg-award-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 22px; padding: 20px 0 80px; }
.fg-award-slot { border: 2px dashed rgba(255,107,74,.35); border-radius: 16px; padding: 28px 20px; text-align: center; color: rgba(27,58,92,.55); }
.fg-award-icon { font-size: 26px; margin-bottom: 10px; }
.fg-award-tag { font-family: ui-monospace, monospace; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 6px; color: rgba(27,58,92,.4); }
.fg-award-label { font-size: 15px; font-weight: 700; color: #16324D; }


/* ---------- footer ---------- */
footer.fg-footer { background: #16324D; color: #fff; padding: 60px 0 30px; }
footer.fg-footer h4 { color: #CFE3F0; font-weight: 700; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
footer.fg-footer a { color: #9FC7DE; font-weight: 500; }
footer.fg-footer a:hover { color: #fff; text-decoration: underline; }
footer.fg-footer .fg-footer-legal { margin-top: 36px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12); font-size: 12px; color: #8FB4CC; }
footer.fg-footer .fg-footer-legal a { color: #8FB4CC; }


/* ---------- callouts (kept from template) ---------- */
.bd-callout { padding:1.25rem; margin-top:1.25rem; margin-bottom:1.25rem; border:1px solid #e9ecef; border-left-width:.25rem; border-radius:.25rem }
.bd-callout h4 { margin-bottom: 1.25rem }
.bd-callout p:last-child { margin-bottom:0 }
.bd-callout code { border-radius:.25rem }
.bd-callout+.bd-callout { margin-top:-.25rem }
.bd-callout-info { border-left-color:#5bc0de }
.bd-callout-warning { border-left-color:#f0ad4e }
.bd-callout-danger { border-left-color:#d9534f }


@media (max-width: 768px) {
  .fg-overview { grid-template-columns: 1fr; }
  .fg-hero-title { font-size: 36px; }
  .fg-school-feature { grid-template-columns: 1fr; gap: 20px; padding: 32px 24px; text-align: center; }
  .fg-school-feature-media { align-items: center; }
}


.scroll-animation-track {
    height: 300vh;
    position: relative;
    width: 100%;
}


.sticky-hero-view {
    position: sticky;
    top: 70px; 
    height: calc(100vh - 70px);
    width: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #fce7e0;
}


.background-layer {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

.background-dim {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #000;
    opacity: 0;
    z-index: 1;
    pointer-events: none;
    will-change: opacity;
}


.text-layer {
    position: absolute;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    pointer-events: none;
}


.flamingone-text {
    font-size: 8vw;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 5px;
    text-shadow: 0 5px 15px rgba(0,0,0,0.6);
    margin: 0;
    will-change: transform, opacity;
}


.logo-layer {
    position: absolute;
    z-index: 3;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    will-change: opacity;
}


.final-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}


.igem-subtitle {
    color: #ffffff;
    font-size: 2.5rem;
    font-weight: bold;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    will-change: transform;
}


.final-logo {
    width: 350px;
    max-width: 80vw;
    object-fit: contain;
    will-change: transform;
}


.full-width-breakout {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.full-width-image-group {
    display: flex;
    flex-direction: column;
    gap: 0 !important;
    padding: 0 !important;
}

.full-width-img-wrapper {
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    position: relative;
    z-index: 1;
    content-visibility: auto;
    contain-intrinsic-size: 100vw 57.357vw;
}

.full-width-img-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 !important;
    border: none !important;
    aspect-ratio: 2936 / 1684;
}

.full-width-img-wrapper .overlay-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

/* ===== Back To Top  ===== */
:root {
  --progress-color: #FF6B4A; 
  --progress-bg-color: transparent;
  --progress-thickness: 6px; 
}

#backToTopBtn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  cursor: pointer;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#backToTopBtn.btt-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.progress-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg); 
  pointer-events: none;
}

.progress-ring__bg {
  fill: none;
  stroke: var(--progress-bg-color);
  stroke-width: var(--progress-thickness);
}

.progress-ring__circle {
  fill: none;
  stroke: var(--progress-color);
  stroke-width: var(--progress-thickness);
  stroke-linecap: round;
  stroke-dasharray: 263.89; 
  stroke-dashoffset: 263.89;
  transition: stroke-dashoffset 0.05s linear;
}

#progress-head-img {
  position: absolute;
  width: 22px; 
  height: 22px;
  object-fit: contain;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 10;
}

#backToTopBtn .btt-icon {
  width: 65%;
  height: 65%;
  object-fit: contain;
}

#backToTopBtn {
  background: transparent !important;
  border-radius: 50% !important;
  overflow: hidden !important;
}

#backToTopBtn svg,
.progress-ring {
  background: transparent !important;
}

.progress-ring__bg {
  fill: none !important;
  stroke: none !important;
  stroke-width: 2px !important;
}

.progress-ring__circle {
  fill: none !important;
  stroke: #FF6B4A !important;
  stroke-width: 2px !important;
  stroke-linecap: round !important;
}

/* ===== content ===== */

.content-box {
  width: 100%;              
  box-sizing: border-box;     
  padding: 24px 30px;        
  margin-bottom: 30px;     
  border-radius: 12px;       
  background-color: #e4f5ff; 
  border: 1px solid #e4f5ff; 
  border-left: 6px solid #e4f5ff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}
.content-box:hover {
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

.page-content p,
#page-content p,
.content p {
    margin: 0 !important;
    padding: 0 !important;
}

.page-container {
  display: flex;
  gap: 30px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 20px;
  align-items: flex-start;
}

.page-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  box-sizing: border-box;
}

.main-content,
.main-container {
  flex: 1;
  min-width: 0;    
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.main-content {
  flex: 1;
  min-width: 0; 
  margin-left: 0 !important;
  padding: 0 !important;
}

.custom-hr {
  width: 100%;          /* 控制寬度，避免碰邊 */
  height: 7px;         /* 控制粗細 */
  background-color: #2868a7; /* 控制顏色 */
  border: none;        /* 必須清除 hr 預設的框線邊框 */
  border-radius: 2px;  /* 圓角 */
  margin: 15px auto;   /* 上下保留邊距，左右 auto 實現居中 */
}

blockquote.expert-quote {
  margin: 16px 0 20px;
  padding: 2px 0 2px 16px;
  border-left: 3px solid #7eb6e0;
}

blockquote.expert-quote p {
  margin: 0 0 8px !important;
  font-style: italic;
}

blockquote.expert-quote .quote-attr {
  margin: 0 !important;
  font-style: normal;
}

.sidebar-container {
  position: sticky;
  top: 80px; /* stay below fixed navbar (body padding-top: 64px) */
  width: 250px;
  flex-shrink: 0;
  align-self: flex-start;
  display: flex;
  align-items: stretch;
  max-height: calc(100vh - 100px);
  z-index: 50; /* below navbar */
}

.sidebar-menu {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding-right: 10px;
  overflow-y: auto;
  scrollbar-width: none; 
}

.sidebar-menu::-webkit-scrollbar {
  display: none;
}

.sidebar-title {
  font-size: 20px;
  font-weight: 800;
  text-align: left;
  margin-bottom: 8px;
  color: #000000;
  width: 215px;
}

.sidebar-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  width: 215px;
}

.sidebar-submenu {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  width: 215px;
  padding: 8px 0 4px;
  box-sizing: border-box;
}

.sidebar-group:hover .sidebar-submenu,
.sidebar-group:focus-within .sidebar-submenu {
  display: flex;
}

.content-box[id],
h4[id] {
  scroll-margin-top: 100px;
}

.menu-item {
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
  cursor: pointer;
  background: linear-gradient(145deg, #f9e4e5, #ffd3d3); 
  color: #000000;              
  width: 215px;                 /* ★【按鈕寬度】 */
  height: auto;                 /* ★【按鈕高度】 */
  padding: 6px 14px;            /* ★【按鈕內邊距】 */
  border-style: solid;
  border-width: 2px;            /* ★【邊框寬度/粗細】 */
  border-color: #d9f3f7;        /* ★【邊框顏色】 */
  border-radius: 24px;          /* ★【圓角弧度】(數值越大越圓潤) */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08), 
              inset 0 1px 2px rgba(255, 255, 255, 0.7);
  transition: all 0.25s ease;  
}

.menu-item:hover {
  background: linear-gradient(145deg, #ffd9df, #cee0fb); 
  color: #16324D;                                         
  transform: translateY(-2px);                 
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12), 
              inset 0 1px 3px rgba(255, 255, 255, 0.9);
}

.menu-subitem {
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  text-align: center;
  font-weight: 600;
  font-size: 12px;
  line-height: 1.2;
  color: #16324D;
  background: linear-gradient(145deg, #eef6fb, #e4f0f8);
  width: 215px;
  min-height: 36px;
  padding: 6px 12px;
  border: 1.5px solid #d9f3f7;
  border-radius: 18px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.menu-subitem:hover {
  background: linear-gradient(145deg, #ffd9df, #cee0fb);
  color: #16324D;
  transform: translateY(-1px);
}

.pdf-embed {
  width: 100%;
  margin: 20px 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(27, 58, 92, 0.12);
  background: #fff;
}

.pdf-embed iframe,
.pdf-embed object {
  display: block;
  width: 100%;
  height: 720px;
  border: none;
}

.pdf-embed-actions {
  padding: 10px 14px;
  font-size: 0.9rem;
  background: #f8fafc;
  border-top: 1px solid rgba(27, 58, 92, 0.08);
}

.pdf-embed-actions a {
  color: #5466dc;
  font-weight: 600;
  text-decoration: underline;
}

.progress-bar-container {
  width: 6px;
  background-color: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  margin-left: 6px;
  flex-shrink: 0;
}

.progress-bar-fill {
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg, #9bc1d9, #94b3d9);
  border-radius: 4px;
  transition: height 0.1s linear;
}

@media (max-width: 992px) {
  .page-container { 
    flex-direction: column; 
    padding: 15px 10px;
  }

 .sidebar-container { 
    display: block !important;
    position: sticky !important;
    top: 64px !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    z-index: 900 !important;
    background: #fce7e0 !important;
    padding: 15px 10px !important;
    margin-bottom: 15px !important;
    border-bottom: 2px solid rgba(255, 107, 74, 0.2) !important;
  }

  .sidebar-title {
    display: none !important; 
  }

  .sidebar-menu {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    gap: 10px !important;
    padding: 4px 5px !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 5px;
  }

  .sidebar-group {
    flex-direction: row !important;
    flex-shrink: 0 !important;
    align-items: center !important;
  }

  .sidebar-submenu {
    display: none !important;
  }

  .menu-item {
    width: auto !important;
    flex-shrink: 0 !important;
    height: 36px !important;
    padding: 0 16px !important;
    font-size: 13px !important;
    border-radius: 18px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .progress-bar-container {
    display: none !important; 
  }

  .pdf-embed iframe,
  .pdf-embed object {
    height: 480px;
  }
}

@media (max-width: 992px) {
  .page-container { 
    display: flex !important;
    flex-direction: column !important; 
    padding: 10px !important;
    width: 100% !important;
  }
}


.stage-section {
  width: 100%;
  margin-bottom: 70px;
}

.stage-header-card {
  width: 100%;
  padding: 16px 28px;
  border-radius: 30px;
  background: linear-gradient(90deg, #c7edff 0%, #ffd7f3 60%, #f6d8fd 100%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  margin-bottom: 50px; /* 與下方小標題框的間距 */
}

.stage-header-title {
  color: #000000;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.sub-accordion {
  width: 100%;
  margin-bottom: 30px;
}

.sub-accordion:last-child {
  margin-bottom: 50px;
}

.sub-accordion-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 28px;         
  border-radius: 30px; 
  background: rgba(255, 255, 255, 0.45); 
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  cursor: pointer;
  outline: none;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.sub-accordion-header:hover {
  background: rgba(255, 255, 255, 0.65);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.sub-accordion-title {
  color: #16324D;
  font-size: 16px;           
  font-weight: 700;
}

.sub-accordion .accordion-icon {
  color: #16324D;
  font-size: 20px;
  font-weight: bold;
  line-height: 1;
}

.sub-accordion .accordion-body {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease;
}

.sub-accordion.is-open .accordion-body {
  max-height: 3000px; 
  opacity: 1;
  margin-top: 14px;
}

.qa-accordion .sub-accordion-header {
  align-items: flex-start;
  gap: 16px;
}

.qa-accordion .sub-accordion-title {
  text-align: left;
  line-height: 1.45;
  flex: 1;
}

.qa-accordion.is-open .accordion-body {
  max-height: 4000px;
}

.stage-header-card {
  display: flex;
  flex-direction: column;
  gap: 6px; 
}

.stage-header-purpose {
  font-size: 0.95rem;      
  font-weight: normal;   
  color: #333333;        
  margin: 4px 0 0 0;     
  line-height: 1.4;       
}

/* ---------- table ---------- */

.table-container {
  width: 100%;
  max-width: 100%;          
  overflow-x: auto;   
  -webkit-overflow-scrolling: touch;
  margin: 20px 0;
  border-radius: 8px;      
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  background-color: #ffffff;
  box-sizing: border-box;
}


.table-container .table,
table.table {
  width: 100%;
  min-width: 800px;        
  max-width: none !important; 
  border-collapse: collapse; 
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #333333;
  margin-bottom: 0;
}

.table thead th {
  background-color: #2c3e50; /* 沉穩深藍背景 */
  color: #ffffff;            /* 白色標題 */
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;   
  border-bottom: 2px solid #1a252f;
  white-space: nowrap;     
}

.table td {
  padding: 12px 16px;
  border-bottom: 1px solid #eef2f5; 
  vertical-align: top;  
  word-break: normal;
}

.table tbody tr:nth-child(even) {
  background-color: #f8fafc;
}

.table tbody tr:hover {
  background-color: #f1f5f9;
  transition: background-color 0.2s ease;
}

.table td:nth-child(1) {
  white-space: nowrap;
  font-weight: 600;
}

.table a {
  color: #5466dc;
  text-decoration: none;
  font-weight: 500;
}

.table a:hover {
  text-decoration: underline;
  color: #3b4cca;
}

/* ----------Interactive home page---------- */
.carousel-wrapper {
  position: relative;
  width: 100vw;
  max-width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  overflow: hidden;
  border-radius: 0; 
  box-shadow: none;  /* 移除外陰影以實現與前後圖片無縫銜接 */
  user-select: none;
}

.bg-img {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
}

.carousel-viewport {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  will-change: transform;
}

.slide {
  position: relative;
  min-width: 100%;
  height: 100%;
  flex-shrink: 0;
}

.overlay-img {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.floating-img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 100%; /* 可根據圖形大小適度調整 */
  max-height: 100%;
  object-fit: contain;
  pointer-events: none;
  /* 浮動動畫 */
  animation: floatAnimation 3.5s ease-in-out infinite;
}

/* 上下微幅浮動的 CSS Keyframes 關鍵幀動畫 */
@keyframes floatAnimation {
  0% {
    transform: translate(-50%, -50%);
  }
  50% {
    transform: translate(-50%, -53%); /* 向上微浮動 */
  }
  100% {
    transform: translate(-50%, -50%);
  }
}

.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 70px;
  height: 70px;
  background-color: rgba(47, 122, 242, 0.35); 
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%; 
  font-size: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px); /* 背景模糊效果 */
}

.nav-btn:hover {
  background-color: rgba(228, 136, 136, 0.65);
  scale: 1.08;
}

.prev-btn {
  left: 20px;
}

.next-btn {
  right: 20px;
}

/* ----------Home page image---------- */
.full-width-img-wrapper .overlay-img.fire-img {
    transform: translate(0px, 0px) scale(0.8);
}

/* ==========================================
   Wiki Pan & Zoom Container Styles
   ========================================== */
.wiki-panzoom-container {
  position: relative;
  width: 100%;
  height: 550px;
  background-color: #0d1117;
  border: 2px solid #16324D;
  border-radius: 12px;
  overflow: hidden; /* 隱藏溢出部分，實現框內移動 */
  cursor: grab;
  user-select: none;
  margin: 20px 0;
}


.wiki-panzoom-container:active {
  cursor: grabbing;
}


/* 被操控平移與縮放的內容層 */
.panzoom-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform-origin: 0 0; /* 以左上角為基準點進行 transform 計算 */
  will-change: transform;
}


/* Framer iframe 樣式 */
.panzoom-content iframe {
  width: 100%;
  height: 100%;
  border: none;
  /* 避免 mousemove 被 iframe 內部的事件攔截 */
  pointer-events: auto;
}


/* 當用戶正在拖拽時，暫時關閉 iframe 的 mouse 事件以保證平滑度 */
.wiki-panzoom-container.is-dragging .panzoom-content iframe {
  pointer-events: none;
}


/* 控制按鈕樣式 */
.panzoom-controls {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
}


.panzoom-controls button {
  width: 36px;
  height: 36px;
  background: rgba(22, 50, 77, 0.85);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  font-size: 18px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
}


.panzoom-controls button:hover {
  background: #FF6B4A;
  transform: scale(1.1);
  color: #fff;
}

/* ----------video iframe---------- */

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 長寬比 */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    border-radius: 8px;
    margin: 20px 0;
  }

  .video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
  }

/* ---------- notebook ---------- */
.nb-phase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.nb-phase-card {
  display: block;
  background: #fff;
  border: 1.5px solid #FF6B4A;
  border-radius: 12px;
  padding: 1.2rem;
  text-align: center;
  color: #16324D;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.nb-phase-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(255, 107, 74, .18);
  background: #FFF5F1;
  color: #16324D;
}
.nb-phase-card h4 {
  color: #FF6B4A;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
}
.nb-phase-card p {
  font-size: 0.95rem;
  margin: 0 !important;
  padding: 0 !important;
  color: rgba(27, 58, 92, .75);
}
.nb-achievements {
  background: rgba(255, 107, 74, .08);
  border: 1px solid #FF6B4A;
  border-radius: 8px;
  padding: 1.1rem 1.3rem;
  margin-bottom: 1.5rem;
}
.nb-achievements h4 {
  color: #FF6B4A;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
}
.nb-achievements ul,
.nb-entry ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.nb-achievements li,
.nb-entry li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.98rem;
  line-height: 1.55;
  color: #1B3A5C;
}
.nb-achievements li::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: 0.45rem;
  border-radius: 50%;
  background: #FF6B4A;
  flex-shrink: 0;
}
.nb-entry {
  border-left: 3px solid #FF6B4A;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, .55);
  border-radius: 0 8px 8px 0;
  margin-bottom: 1.1rem;
}
.nb-entry:last-child {
  margin-bottom: 0;
}
.nb-entry h4 {
  color: #FF6B4A;
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
}
.nb-meta {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: #4FA9C9;
  margin-bottom: 0.15rem;
}
.nb-entry li {
  flex-direction: column;
  gap: 0.15rem;
  padding-left: 0.85rem;
  position: relative;
}
.nb-entry li::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4FA9C9;
  opacity: .85;
}
@media (max-width: 640px) {
  .nb-phase-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- 泡泡放大縮小動畫與背景設定 ---------- */
.bubbles-pulse-wrapper {
  position: relative;
  width: 100vw;
  max-width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  overflow: hidden;
  user-select: none;
}

.bubbles-bg-img {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
}

.bubbles-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* 泡泡基礎定位 */
.bubble-item {
  position: absolute;
  top: 50%; /* 控制泡泡在背景圖上的上下位置 */
  
  /* ★【控制泡泡大小】直接使用 width 確定像素/百分比大小 */
  width: 100%; 
  max-width: 65%;
  
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  
  /* 動畫綁定 */
  animation: pulseBubble 3s ease-in-out infinite;
  will-change: transform;
}

.bubble-item img {
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.12));
}

/* ★【拉開泡泡間距】為三個泡泡設定獨立的水平位置 */
.bubble-pulse-1 {
  left: 40%; /* 左邊泡泡位置 */
  animation-delay: 0s;
}

.bubble-pulse-2 {
  left: 50%; /* 中間泡泡位置 */
  animation-delay: -1s;
}

.bubble-pulse-3 {
  left: 60%; /* 右邊泡泡位置 */
  animation-delay: -2s;
}

/* 關鍵幀動畫：居中並放大 */
@keyframes pulseBubble {
  0% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2); /* 動畫時的最大放大倍率 */
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}