:root {
  --navy: #1a3a6b;
  --blue: #1e5fa8;
  --blue-light: #2d7dd2;
  --accent: #e8a020;
  --white: #ffffff;
  --off-white: #f4f7fc;
  --gray-100: #eef1f7;
  --gray-400: #8a9ab5;
  --gray-700: #3d4f6a;
  --text: #1c2b45;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans TC', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
}

/* ── SKIP LINK (Accessibility + SEO) ── */
.skip-link {
  position: absolute; top: -100px; left: 1rem;
  background: var(--navy); color: #fff;
  padding: .5rem 1rem; border-radius: 4px;
  font-size: .85rem; z-index: 999;
  transition: top .2s;
}
.skip-link:focus { top: 1rem; }

/* ── NAV ── */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(255,255,255,.97); backdrop-filter: blur(12px);
  border-bottom: 1px solid #eef1f6;
  box-shadow: 0 1px 16px rgba(26,58,107,.07);
}
.main-nav {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: .75rem 1.5rem;
}
.nav-logo img { height: 44px; width: auto; display: block; }
.nav-links {
    display: flex;
    gap: 0;
    list-style: none;
    font-size: .82rem;
    font-weight: 600;
    margin-bottom:0px
}
.nav-links > li { position: relative; }
.nav-links a {
  color: #2d3748; padding: .45rem .9rem; border-radius: 6px;
  text-decoration: none; display: block; white-space: nowrap;
  transition: color .18s, background .18s;
}
.nav-links a:hover, .nav-links a.active { color: #1e5fa8; background: #f0f5fb; }
.nav-cta { background: #1e5fa8 !important; color: #fff !important; border-radius: 6px !important; font-weight: 700; margin-left: .4rem; box-shadow: 0 3px 12px rgba(30,95,168,.28); }
.nav-cta:hover { background: #1a3a6b !important; }

/* Dropdown arrow */
.nav-links > li.has-drop > a::after { content: ' ▾'; font-size: .65rem; opacity: .65; }
/* Dropdown panel */
.nav-dropdown {
  display: none; position: absolute; top: 100%; left: 0;
  background: #fff; border-radius: 10px; min-width: 210px;
  box-shadow: 0 8px 32px rgba(26,58,107,.14); border: 1px solid #eef1f6;
  padding: .9rem 0 .4rem; z-index: 400;
}
.has-drop:hover .nav-dropdown { display: block; }
.nav-dropdown a {
  display: block; padding: .5rem 1.1rem; font-size: .82rem; font-weight: 600;
  color: #2d3748; background: none; border-radius: 0;
  transition: background .12s, color .12s;
}
.nav-dropdown a:hover { background: #f0f5fb; color: #1e5fa8; }
.nav-dropdown .drop-divider { border: none; border-top: 1px solid #eef1f6; margin: .3rem 0; }
.nav-dropdown .drop-label {
  display: block; font-size: .68rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: #7a8699; padding: .5rem 1.1rem .2rem;
}

.lang-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 1rem;
  flex-shrink: 0;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 10px 0 8px;
  background: #fff;
  border: 1.5px solid #c2cfe0;
  border-radius: 6px;
  color: var(--navy);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(26,58,107,.08);
  transition: border-color .15s, background .15s, box-shadow .15s;
  user-select: none;
}

.lang-btn:hover {
  border-color: var(--blue);
  background: #f0f5fb;
  box-shadow: 0 2px 8px rgba(26,58,107,.13);
}

.globe-icon {
  flex-shrink: 0;
  color: var(--blue);
}

header.header-transparent .lang-btn {
  background: rgba(255,255,255,.15);
  border: 1.5px solid rgba(255,255,255,.4);
  color: #fff;
  box-shadow: none;
}

header.header-transparent .lang-btn:hover {
  background: rgba(255,255,255,.25);
  border-color: rgba(255,255,255,.6);
}

header.header-transparent .globe-icon {
  color: #fff;
}

header.header-transparent .lang-chevron {
  border-right-color: rgba(255,255,255,.7);
  border-bottom-color: rgba(255,255,255,.7);
}

header.header-scrolled .lang-btn {
  background: #fff;
  border-color: #c2cfe0;
  color: var(--navy);
  box-shadow: 0 1px 3px rgba(26,58,107,.08);
}

header.header-scrolled .lang-btn:hover {
  border-color: var(--blue);
  background: #f0f5fb;
}

header.header-scrolled .globe-icon {
  color: var(--blue);
}

header.header-scrolled .lang-chevron {
  border-right-color: #5a7a9a;
  border-bottom-color: #5a7a9a;
}

.lang-chevron {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid #5a7a9a;
  border-bottom: 1.5px solid #5a7a9a;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .2s;
  flex-shrink: 0;
  margin-left: 1px;
}

.lang-switch.lang-open .lang-chevron {
  transform: rotate(-135deg) translateY(-2px);
}

.lang-switch.lang-open .lang-btn {
  border-color: var(--blue);
  background: #f0f5fb;
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  min-width: 156px;
  background: #fff;
  border: 1.5px solid #c2cfe0;
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(26,58,107,.15);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity .18s, transform .18s;
  z-index: 9999;
}

.lang-switch.lang-open .lang-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.lang-dropdown a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background .1s;
}

.lang-dropdown a + a {
  border-top: 1px solid #eef1f7;
}

.lang-dropdown a:hover {
  background: #f0f5fb;
}

.lang-dropdown a.lang-active {
  background: #fdf5e6;
  color: var(--navy);
  font-weight: 700;
  border-left: 3px solid var(--accent);
  padding-left: 11px;
  pointer-events: none;
}

.lang-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 19px;
  padding: 0 4px;
  background: #e8f0fb;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: .05em;
  flex-shrink: 0;
}

.lang-dropdown a.lang-active .lang-badge {
  background: var(--accent);
  color: #fff;
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .lang-switch { margin-left: auto; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
}
footer {
  background: var(--navy); color: rgba(255,255,255,.65);
  padding: 3rem 1.5rem 1.5rem;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem;
}
.footer-logo { margin-bottom: 1rem; }
.footer-logo img { height: 72px; width: auto; display: block; }
.footer-desc { font-size: .85rem; line-height: 1.8; }
.footer-h { color: #fff; font-weight: 700; font-size: .88rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1rem; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: .5rem; padding-left: 0; margin: 0; }
.footer-links a { color: rgba(255,255,255,.6); text-decoration: none; font-size: .85rem; transition: color .2s; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  max-width: 1200px; margin: 2rem auto 0;
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 1.2rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem;
  font-size: .8rem; color: rgba(255,255,255,.4);
}
.footer-bottom a { color: rgba(255,255,255,.5); text-decoration: none; }
.footer-bottom a:hover { color: rgba(255,255,255,.8); }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .lang-switch { gap: .8rem; }
  .lang-switch a { font-size: .8rem; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
}
