/* 導覽列、會員服務、最新公告、聯絡我們與 Footer（桌面版，設計稿寬度 1920px） */

/* ============ 導覽列 ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; height: 94px; z-index: 50; background: #fff;
}
.nav__inner { position: relative; width: 1200px; max-width: 100%; height: 100%; margin: 0 auto; }
.logo { position: relative; width: 103px; height: 32px; overflow: hidden; flex: none; display: block; }
.logo img { position: absolute; display: block; }
.logo .l1 { left: 0; top: 0; width: 27.96%; height: 100%; }
.logo .l2 { left: 18.34%; top: 21.25%; width: 9.61%; height: 78.74%; mix-blend-mode: multiply; }
.logo .l3 { left: 5.7%; top: 34.82%; width: 16.18%; height: 52.15%; }
.logo .l4 { left: 39.61%; top: 0; width: 60.06%; height: 100%; }
.nav .logo { position: absolute; left: 0; top: 31px; }
.nav__links {
  position: absolute; left: 50%; top: 23px; transform: translateX(-50%);
  display: flex; gap: 24px; align-items: center; height: 48px;
}
.nav__links a {
  position: relative; display: flex; align-items: center; justify-content: center; height: 44px;
  font: 600 16px/normal var(--font); letter-spacing: .48px; color: var(--muted); white-space: nowrap;
}
.nav__links a:hover { color: var(--primary); }
.nav__links a.is-active { font-size: 20px; letter-spacing: 0; color: var(--primary); }
.nav__links a.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px;
  background: var(--primary); border-radius: 2px;
}
.nav .btn { position: absolute; right: 0; top: 24px; width: 128px; padding: 12px 0; background: #fff; color: var(--primary); }

/* ============ Section 5 會員服務 ============ */
.member {
  height: 1043px;
  background-image: linear-gradient(168.26deg, #151c28 7.1727%, #1a577b 84.184%);
}
.member__tag { background: #45535d; color: #2aceed; }
.member__head { position: absolute; left: 360px; top: 120px; display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
.member__head h2 { font-weight: 600; font-size: 40px; color: #f1f3f9; white-space: nowrap; margin-top: 12px; }
.member__head h2 em, .member__head p em { font-style: normal; color: #2aceed; }
.member__head p { font-size: 18px; color: #fff; }
.member__grid {
  position: absolute; left: 360px; top: 333px; width: 1200px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px;
}
.mitem { display: flex; gap: 20px; align-items: flex-start; }
.mitem > b { flex: none; width: 30px; font: 600 48px/.9 var(--font); color: #2aceed; }
.mitem div { flex: 1; min-width: 0; padding-top: 4px; display: flex; flex-direction: column; gap: 12px; }
.mitem h3 { font-weight: 500; font-size: 16px; letter-spacing: .48px; color: #ccc; }
.mitem p { font-size: 14px; color: #9aacb3; }
.mpanels { position: absolute; left: 360px; top: 597px; width: 1200px; height: 240px; display: flex; gap: 12px; }
.mpanel { position: relative; flex: 0 0 160px; height: 240px; border-radius: 24px; overflow: hidden; background: #45535d; }
.mpanel--main { flex: 1 1 0; min-width: 0; }
.mpanel .shade { position: absolute; left: 0; top: 0; width: 564px; height: 240px; background: rgba(31,31,31,.8); }
.mpanel .ctr { position: absolute; transform: translate(-50%, -50%); }
.mpanel .ctr img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mcube { position: absolute; left: 24px; top: 148px; width: 60px; height: 60px; border-radius: 999px; overflow: hidden; }
.mcube img { position: absolute; }
.mcube .ic { left: 50%; top: 50%; width: 32px; height: 32px; transform: translate(-50%, -50%); }
.mpanel__text { position: absolute; left: 100px; bottom: 28px; width: 388px; display: flex; flex-direction: column; gap: 4px; }
.mpanel__text b { font-weight: 500; font-size: 18px; color: #fff; }
.mpanel__text span { font-size: 14px; color: #f1f3f9; }
.member__cta { position: absolute; left: 364px; top: 877px; width: 1196px; display: flex; align-items: center; justify-content: space-between; }
.member__cta p { display: flex; align-items: center; gap: 8px; font-size: 24px; color: rgba(255,255,255,.75); white-space: nowrap; }
.member__cta p em { font-style: normal; color: #2aceed; }
.member__cta p i { font-style: normal; color: #eff4f8; }
.member__cta p img { width: 24px; height: 24px; }

/* ============ Section 6 最新公告 ============ */
.news { height: 752px; background: #fff; }
.news__head { position: absolute; left: 360px; top: 120px; width: 1200px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.news__row { width: 100%; display: flex; align-items: center; justify-content: space-between; }
.news__row h2 { font-weight: 600; font-size: 40px; white-space: pre; }
.news__row h2 em { font-style: normal; color: var(--primary-dark); }
.news__nav { display: flex; gap: 8px; }
.news__nav button { width: 36px; height: 36px; padding: 0; border: 0; background: none; cursor: pointer; }
.news__nav button img { width: 100%; height: 100%; }
.news__nav button.prev img { transform: scaleX(-1); }
.news__nav button:disabled { cursor: default; }
.news__nav button.prev:disabled img { transform: none; }
.news__view { position: absolute; left: 360px; top: 284px; width: 1560px; height: 348px; overflow: hidden; }
.news__track { display: flex; gap: 24px; width: max-content; transition: transform .45s ease; }
.ncard { flex: none; width: 360px; background: #f1f6f7; border-radius: 24px; overflow: hidden; }
.ncard__img { position: relative; height: 200px; background: #d9d9d9; overflow: hidden; }
.ncard__img img { position: absolute; width: 100%; height: 100%; object-fit: cover; }
.ncard__body { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.ncard__body div { display: flex; flex-direction: column; gap: 6px; color: var(--text); }
.ncard__body h3 { font-weight: 500; font-size: 16px; }
.ncard__body p { font-size: 14px; line-height: 20px; }
.ncard__body time { font-weight: 600; font-size: 14px; color: #0096b4; }

/* ============ 聯絡我們 + Footer ============ */
.footer { height: 952px; background: #fff; }
.footer__img { position: absolute; left: 0; top: 0; width: 1920px; height: 621px; overflow: hidden; }
.footer__img img { position: absolute; height: 100%; left: -32.7%; top: .03%; width: 156.23%; }
.footer__info { position: absolute; left: 0; top: 621px; width: 1920px; height: 331px; }
.footer__info > img { position: absolute; inset: 0; width: 100%; height: 100%; }
.footer__info .logo { position: absolute; left: 360px; top: 60px; width: 120px; height: 37px; }
.footer__phone { position: absolute; left: 360px; top: 138px; display: flex; gap: 8px; align-items: center; font-size: 14px; line-height: 22px; color: #e1e6ef; }
.footer__phone img { width: 16px; height: 16px; }
.footer__links { position: absolute; left: 360px; top: 180px; display: flex; gap: 20px; font-size: 14px; line-height: 22px; }
.footer__links a { color: #e1e6ef; text-decoration: underline; }
.footer__copy { position: absolute; left: 360px; top: 238px; width: 314px; text-align: center; font-size: 14px; line-height: 20px; color: #9aacb3; }
.contact {
  position: absolute; left: 972px; top: 120px; width: 588px; padding: 60px 80px;
  display: flex; flex-direction: column; gap: 32px; align-items: flex-end;
  background: rgba(239,244,248,.8); backdrop-filter: blur(20px); border-radius: 24px;
  z-index: 2;
}
.contact h2 { width: 100%; font-weight: 600; font-size: 40px; color: var(--primary-dark); }
.contact form { width: 100%; display: flex; flex-direction: column; gap: 32px; align-items: flex-end; }
.fields { width: 100%; display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { display: flex; gap: 2px; align-items: center; height: 22px; font-weight: 600; font-size: 14px; color: var(--text-strong); }
.field label i { font-style: normal; font-size: 12px; color: rgba(245,47,106,.8); }
.field input, .field textarea {
  width: 100%; min-height: 46px; padding: 12px; border: 1px solid #e1e6ef; border-radius: 12px;
  background: #fff; font: 400 14px/normal var(--font); color: var(--text); outline: none;
}
.field textarea { height: 122px; resize: none; }
.field input::placeholder, .field textarea::placeholder { color: #9aacb3; }
.field input:focus, .field textarea:focus { border-color: var(--primary); }
.field .err { display: none; font-size: 12px; color: #f52f6a; }
.field.is-invalid input, .field.is-invalid textarea { border-color: #f52f6a; }
.field.is-invalid .err { display: block; }
.form__msg { width: 100%; font-size: 14px; }
.form__msg:empty { display: none; }
.form__msg.ok { color: #1a8f5a; }
.form__msg.fail { color: #f52f6a; }
.btn:disabled { opacity: .6; cursor: default; }

/* ============ 會員卡片：滑鼠移入展開（桌面版） ============ */
@media (min-width: 1280px) {
  .mpanel { flex: 0 1 160px; transition: flex-grow .45s ease; }
  .mpanel--main { flex: 1 1 160px; }
  .mpanel .shade, .mpanel .moval, .mpanel--main .mp-oval-d, .mpanel--main::after { transition: opacity .35s ease; }
  .mpanel--main::after { content: ""; position: absolute; inset: 0; background: rgba(31,31,31,.8); opacity: 0; pointer-events: none; }
  .mpanel .moval { display: block; opacity: 0; position: absolute; left: -30px; top: 65px; width: 498px; height: 249px; transform: rotate(180deg); pointer-events: none; }
  .mpanel .moval img { position: absolute; left: -30.12%; top: -60.24%; width: 160.24%; height: 220.48%; }
  .mpanel__text, .mcube { z-index: 2; }
  .mpanel { cursor: pointer; }

  /* 其他卡片被移入：該卡片展開，主卡收合 */
  .mpanels:has(.mpanel:not(.mpanel--main):hover) .mpanel--main { flex-grow: 0; }
  .mpanels:has(.mpanel:not(.mpanel--main):hover) .mpanel--main::after { opacity: 1; }
  .mpanels:has(.mpanel:not(.mpanel--main):hover) .mpanel--main .mp-oval-d { opacity: 0; }
  .mpanel:not(.mpanel--main):hover { flex-grow: 1; }
  .mpanel:not(.mpanel--main):hover .shade { opacity: 0; }
  .mpanel:not(.mpanel--main):hover .moval { opacity: 1; }
}

/* 收合狀態只顯示圖示（置中），展開時圖示移到左下並顯示文字 */
@media (min-width: 1280px) {
  .mcube { transition: left .45s ease; }
  .mpanel__text { transition: opacity .3s ease; }
  .mpanel:not(.mpanel--main) .mcube { left: calc(50% - 30px); }
  .mpanel:not(.mpanel--main) .mpanel__text { opacity: 0; pointer-events: none; }
  .mpanel:not(.mpanel--main):hover .mcube { left: 24px; }
  .mpanel:not(.mpanel--main):hover .mpanel__text { opacity: 1; transition-delay: .15s; }
  .mpanels:has(.mpanel:not(.mpanel--main):hover) .mpanel--main .mcube { left: calc(80px - 30px); }
  .mpanels:has(.mpanel:not(.mpanel--main):hover) .mpanel--main .mpanel__text { opacity: 0; }
}

/* ============ 彈窗 ============ */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(31,31,31,.6); }
.modal__box {
  position: relative; width: 1080px; max-width: 100%; max-height: 100%; display: flex; flex-direction: column;
  background: #fff; border-radius: 24px; box-shadow: 0 24px 64px rgba(0,0,0,.25); overflow: hidden;
}
.modal__head { display: flex; align-items: center; justify-content: space-between; padding: 32px 40px 24px; gap: 16px; }
.modal__head h2 { font-weight: 600; font-size: 24px; color: var(--text); }
.modal__close { width: 40px; height: 40px; flex: none; padding: 8px; border: 0; background: none; cursor: pointer; border-radius: 50%; }
.modal__close:hover { background: #eff4f8; }
.modal__body { padding: 0 40px; overflow: auto; }
.modal__foot { display: flex; justify-content: flex-end; padding: 32px 40px 40px; }
.ftable { width: 100%; border-collapse: collapse; font-size: 14px; color: var(--text); }
.ftable th { background: var(--primary-dark); color: #fff; font-weight: 500; text-align: left; padding: 14px 16px; white-space: nowrap; }
.ftable td { padding: 16px; border-bottom: 1px solid #eff4f8; vertical-align: top; }
.ftable td:first-child { color: var(--primary-dark); font-weight: 500; width: 80px; }
.ftable td:nth-child(2) { width: 36%; font-weight: 500; }
@media (max-width: 767px) {
  .modal { padding: 12px; }
  .modal__head { padding: 20px 20px 16px; }
  .modal__head h2 { font-size: 18px; }
  .modal__body { padding: 0 20px; }
  .modal__foot { padding: 20px; }
  .ftable td:first-child { width: 48px; } .ftable td:nth-child(2) { width: auto; }
  .ftable th, .ftable td { padding: 12px 8px; }
}

.modal__close:focus { outline: none; }
.modal__close:focus-visible { outline: 2px solid var(--primary); }
.modal--doc .modal__box { width: 720px; height: min(864px, 100%); border-radius: 24px; }
.modal--doc .modal__head { padding: 0 20px; height: 72px; border-bottom: 1px solid #eff4f8; flex: none; }
.modal--doc .modal__head h2 { font-size: 16px; font-weight: 600; }
.modal--doc .modal__doc { flex: 1; padding: 20px; font-size: 14px; line-height: 20px; color: var(--text); white-space: pre-line; }
