:root {
  --brand: #00a9c7;
  --brand-dark: #087d92;
  --ink: #17202a;
  --muted: #5f6b76;
  --surface: #ffffff;
  --surface-soft: #f5f8fa;
  --line: #dfe6ea;
  --shadow: 0 18px 45px rgba(25, 55, 68, 0.12);
  --radius: 18px;
  --nav-height: 80px;
  --content-width: 1320px;
  --section-space: clamp(64px, 7vw, 108px);
  --card-height: 440px;
  --card-media-height: 200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-height); }
body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: "Microsoft JhengHei", "PingFang TC", system-ui, -apple-system, sans-serif;
  line-height: 1.65;
  overflow-x: clip;
}
body.modal-open, body.nav-open { overflow: hidden; }
img, video { display: block; max-width: 100%; }
button, a { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 2000;
  padding: 10px 16px;
  color: #fff;
  background: var(--brand-dark);
  border-radius: 8px;
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

/* Navigation */
#navbar-container {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 2000;
  height: var(--nav-height);
  isolation: isolate;
}
#navbar {
  position: relative;
  z-index: 1;
  min-height: var(--nav-height);
  padding: 0 clamp(18px, 4vw, 56px);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(223, 230, 234, 0.75);
  box-shadow: 0 4px 20px rgba(20, 46, 58, 0.05);
  backdrop-filter: blur(14px);
}
#navbar .navbar-brand { flex: 0 0 auto; margin-right: 28px; padding: 0; }
#navbar .title-image { width: clamp(155px, 14vw, 205px); height: auto; }
#navbar .navbar-collapse { display: flex; flex: 1 1 auto; justify-content: flex-end; }
#navbar .navbar-nav { display: flex; align-items: center; gap: clamp(4px, .7vw, 14px); margin: 0; padding: 0; list-style: none; }
#navbar .nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 10px 8px;
  color: #36424b;
  background: none;
  border: 0;
  font-size: clamp(.86rem, 1vw, 1rem);
  text-decoration: none;
  white-space: nowrap;
}
#navbar .nav-link::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: 5px;
  left: 8px;
  height: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .2s ease;
}
#navbar .nav-link:hover, #navbar .nav-link:focus-visible { color: var(--brand-dark); }
#navbar .nav-link:hover::after, #navbar .nav-link:focus-visible::after { transform: scaleX(1); }
.navbar-toggler, .nav-close, .nav-backdrop { display: none; }
.language-menu { position: relative; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  min-width: 150px;
  padding: 8px;
  display: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.language-menu.is-open .dropdown-menu { display: block; }
.dropdown-item { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 8px; text-decoration: none; }
.dropdown-item:hover, .dropdown-item:focus-visible { color: var(--brand-dark); background: #eef9fb; }

/* Hero */
#intro { padding-top: var(--nav-height); background: #eef6f8; }
.intro-content, .intro-image { width: 100%; }
.intro-image1, .intro-image2 { display: none; }
#heroVideo, #heroVideoMobile { width: 100%; height: calc(var(--viewport-height, 100vh) - var(--nav-height)); object-fit: cover; background: #eef6f8; }
#heroVideoMobile { display: none; }

/* Shared sections */
.section { padding: var(--section-space) clamp(16px, 4vw, 48px); }
.section:nth-of-type(odd) { background: var(--surface-soft); }
.news-layout, .inv-layout, .feature-box, #partner > :not(.partner-1), .partner-1 {
  width: min(100%, var(--content-width));
  margin-inline: auto;
}
.news-layout, .inv-layout { display: grid; grid-template-columns: minmax(220px, .6fr) minmax(0, 2.1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.news-info, .inv-info { position: sticky; top: calc(var(--nav-height) + 28px); }
.heading-title2, .inv-title, #feature-heading {
  margin: 0 0 18px;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.12;
  letter-spacing: -.025em;
}
.heading-title2::after, .inv-title::after, #feature-heading::after {
  content: "";
  display: block;
  width: 52px;
  height: 4px;
  margin-top: 18px;
  background: var(--brand);
  border-radius: 99px;
}
.heading-description, .inv-desc { margin: 0; color: var(--muted); font-size: clamp(1rem, 1.2vw, 1.12rem); }

/* Content carousels */
.news-carousel, .inv-carousel { min-width: 0; position: relative; padding-top: 54px; }
.news-carousel { --cards-per-view: 3 !important; }
.news-controls, .inv-controls { position: absolute; top: 0; right: 0; z-index: 3; }
.controls-left, .inv-controls { display: flex; gap: 10px; }
.news-nav, .inv-nav {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 1.65rem;
  line-height: 1;
  transition: color .2s, background .2s, transform .2s;
}
.news-nav:hover:not(:disabled), .inv-nav:hover:not(:disabled) { color: #fff; background: var(--brand); border-color: var(--brand); transform: translateY(-2px); }
.news-nav:disabled, .inv-nav:disabled { cursor: default; opacity: .35; }
.news-viewport, .inv-viewport { width: 100%; overflow: hidden; border-radius: var(--radius); }
.news-track, .inv-track { margin: 0; padding: 0; display: flex; gap: 20px; list-style: none; transition: transform .42s cubic-bezier(.2,.8,.2,1); will-change: transform; }
.news-card {
  flex: 0 0 100%;
  height: var(--card-height);
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 26px rgba(25, 55, 68, .07);
  transition: transform .2s ease, box-shadow .2s ease;
}
.news-card[role="button"], .news-card[role="link"] { cursor: pointer; }
.news-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.news-card:focus-visible { outline: 3px solid rgba(0, 169, 199, .35); outline-offset: 3px; }
.news-card .thumb, .inv-card .thumb { flex: 0 0 var(--card-media-height); height: var(--card-media-height); margin: 0; overflow: hidden; background: #e8eef1; }
.news-card .thumb img, .inv-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.news-card:hover .thumb img { transform: scale(1.035); }
.news-body { flex: 1; min-height: 0; padding: 20px; overflow: hidden; }
.news-title { margin: 0 0 10px; display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; font-size: clamp(1.08rem, 1.5vw, 1.3rem); line-height: 1.4; }
.news-content { margin: 0; display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 4; color: var(--muted); }
.news-dots, .inv-dots { min-height: 30px; display: flex; justify-content: center; align-items: center; gap: 7px; padding-top: 18px; }
.news-dot, .inv-dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: #cbd5da; }
.news-dot[aria-selected="true"], .inv-dot[aria-selected="true"] { width: 24px; border-radius: 99px; background: var(--brand); }

/* Investor */
.inv-track { gap: 20px; }
.inv-card { flex: 0 0 100%; height: var(--card-height); overflow: hidden; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.inv-card .body { flex: 1; min-height: 0; padding: 20px; overflow: hidden; }
.inv-card .h3 { margin: 0 0 8px; font-size: 1.25rem; }
.inv-card .p { min-height: 3.3em; margin: 0 0 18px; display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; color: var(--muted); }
.cta, .di-btn, .inv-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 15px;
  color: #fff;
  background: var(--brand-dark);
  border: 0;
  border-radius: 10px;
  text-decoration: none;
}
.cta:hover, .di-btn:hover, .inv-action:hover { color: #fff; background: #056a7c; text-decoration: none; }

/* About */
.feature-box { display: grid; grid-template-columns: minmax(280px, .85fr) minmax(0, 1.2fr); gap: clamp(30px, 6vw, 86px); align-items: start; }
.feature-img { position: sticky; top: calc(var(--nav-height) + 28px); overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow); }
.feature-img img { width: 100%; height: auto; }
.feature-content p { color: var(--muted); }
.service_verify { margin: 0 0 20px; color: var(--brand-dark); font-size: 1.06rem; }
.timeline { margin: 30px 0; padding-left: 24px; border-left: 2px solid #bce8ef; }
.timeline-item { position: relative; display: grid; grid-template-columns: 84px 1fr; gap: 14px; padding: 0 0 20px; }
.timeline-item::before { content: ""; position: absolute; top: 7px; left: -31px; width: 12px; height: 12px; background: var(--brand); border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 2px #bce8ef; }
.timeline-date { font-weight: 700; }
.timeline-content { color: var(--muted); }
.financeSuper img { width: min(100%, 380px); }

/* Partners and footer */
#partner { text-align: center; }
#partner .heading-title2::after { margin-inline: auto; }
.heading-content2 { margin: -6px auto 34px; color: var(--muted); }
.partner-1 { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.partner-item { min-height: 108px; margin: 0; padding: 14px; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.partner-item img { max-width: 100%; max-height: 72px; object-fit: contain; }
#contact { padding: 44px clamp(20px, 5vw, 72px) 24px; color: #dce8ec; background: #153642; text-align: center; }
.footer_content p { margin: 0 0 24px; }
.footer-copyright { padding-top: 20px; color: #a9bdc5; border-top: 1px solid rgba(255,255,255,.14); font-size: .9rem; }

/* Dialogs */
.di-modal, .inv-modal {
  position: fixed;
  inset: 0;
  z-index: 1500;
  padding: 18px;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(9, 25, 32, .72);
  backdrop-filter: blur(5px);
}
.di-modal.is-open, .inv-modal[aria-hidden="false"] { display: flex; }
.di-modal__panel, .inv-panel { width: min(920px, 100%); max-height: min(88svh, 900px); overflow: auto; background: #fff; border-radius: var(--radius); box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.di-modal__panel { position: relative; display: grid; grid-template-columns: minmax(240px, .8fr) minmax(0, 1.15fr); }
.di-modal__media { min-height: 280px; background: #edf2f4; }
.di-modal__media img { width: 100%; height: 100%; object-fit: cover; }
.di-modal__body { padding: clamp(26px, 5vw, 52px); }
.di-modal__title { margin: 0 0 18px; font-size: clamp(1.5rem, 3vw, 2.25rem); }
.di-modal__desc { color: var(--muted); }
.di-modal__desc img { max-width: 100%; height: auto; border-radius: 10px; }
.di-modal__close, .inv-close { width: 42px; height: 42px; display: grid; place-items: center; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 50%; font-size: 1.15rem; }
.di-modal__close { position: absolute; top: 14px; right: 14px; z-index: 2; }
.di-modal__actions { margin-top: 24px; }
.inv-hdr { position: sticky; top: 0; z-index: 2; padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; background: #fff; border-bottom: 1px solid var(--line); }
.inv-hdr-title { margin: 0; font-size: 1.35rem; }
.inv-body { padding: 22px; }
.inv-list { display: grid; gap: 10px; }
.inv-row { padding: 14px; display: grid; grid-template-columns: 30px minmax(140px, 1fr) auto; gap: 12px; align-items: center; background: var(--surface-soft); border-radius: 12px; }
.inv-col--actions { display: flex; gap: 8px; }
.inv-col--badge, .inv-divider-v { display: none; }
.inv-gallery { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.inv-gallery figure { margin: 0; }
.inv-gallery img, .inv-single img { width: 100%; max-height: 65svh; object-fit: contain; border-radius: 12px; }

@media (max-width: 1100px) {
  :root { --nav-height: 68px; }
  .news-carousel { --cards-per-view: 2 !important; }
  #navbar { padding-inline: 18px; }
  #navbar .navbar-toggler { margin-left: auto; width: 44px; height: 44px; display: grid; place-items: center; background: transparent; border: 1px solid var(--line); border-radius: 10px; }
  #navbar .navbar-toggler-icon { width: 22px; height: 16px; display: block; border-top: 2px solid; border-bottom: 2px solid; position: relative; }
  #navbar .navbar-toggler-icon::after { content: ""; position: absolute; top: 5px; left: 0; width: 100%; border-top: 2px solid; }
  #navbar .navbar-collapse { position: absolute; top: 0; right: 0; z-index: 1002; width: min(340px, 88vw); height: var(--viewport-height, 100vh); padding: 18px 20px 30px; display: none; overflow-y: auto; background: #fff; }
  body.nav-open #navbar .navbar-collapse { display: block; }
  #navbar .nav-backdrop { position: absolute; top: 0; right: 0; left: 0; z-index: 1001; display: block; width: 100vw; height: var(--viewport-height, 100vh); background: rgba(9,25,32,.5); border: 0; opacity: 0; visibility: hidden; transition: opacity .2s; }
  body.nav-open #navbar .nav-backdrop { opacity: 1; visibility: visible; }
  #navbar .nav-panel-header { display: flex; justify-content: flex-end; margin-bottom: 14px; }
  #navbar .nav-close { width: 44px; height: 44px; display: grid; place-items: center; background: transparent; border: 1px solid var(--line); border-radius: 50%; font-size: 1.6rem; }
  #navbar .navbar-nav { display: block; }
  #navbar .nav-link { width: 100%; padding: 13px 8px; font-size: 1rem; }
  #navbar .nav-link::after { display: none; }
  .dropdown-menu { position: static; margin: 4px 0 8px; box-shadow: none; }
}

@media (max-width: 900px) {
  .news-layout, .inv-layout, .feature-box { grid-template-columns: 1fr; }
  .news-info, .inv-info, .feature-img { position: static; }
  .news-info, .inv-info { max-width: 720px; }
  .news-carousel { --cards-per-view: 2 !important; }
  .partner-1 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .section { padding-block: 58px; }
  #heroVideo { display: none; }
  #heroVideoMobile { display: block; }
  .news-carousel { --cards-per-view: 1 !important; padding-top: 52px; }
  .partner-1 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .partner-item { min-height: 92px; }
  .timeline-item { grid-template-columns: 70px 1fr; gap: 10px; font-size: .92rem; }
  .di-modal, .inv-modal { padding: 8px; }
  .di-modal__panel { grid-template-columns: 1fr; max-height: calc(100svh - 16px); }
  .di-modal__media { min-height: 0; max-height: 34svh; }
  .di-modal__body { padding: 24px 20px; }
  .inv-row { grid-template-columns: 24px 1fr; }
  .inv-col--actions { grid-column: 1 / -1; flex-wrap: wrap; }
  .inv-action { flex: 1 1 130px; }
  .inv-gallery { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
