/* 共用樣式：導覽、頁尾、轉場與全站元件 */
:root {
  --shared-blue: #84b3c5;
  --shared-blue-dark: #365d66;
  --shared-footer-bg: #f4fafb;
}

html,
body,
button,
input,
textarea,
select {
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Heiti TC", Arial, sans-serif;
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #ffffff;
  opacity: 1;
  visibility: visible;
  pointer-events: none;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

.page-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(132, 179, 197, 0.22);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}

.site-header-spacer {
  height: 77px;
}

.site-header .nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 10px;
}

.site-header .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.site-header .brand-logo {
  display: block;
  width: min(230px, 58vw);
  height: auto;
}

.site-header .nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  color: #53636b;
  font-size: 15px;
  font-weight: 600;
}

.site-header .nav-links a:hover,
.site-header .nav-links a.is-active {
  color: #2794ec;
}

.site-header .nav-review-link {
  position: relative;
  margin-left: 2px;
  padding-left: 24px;
}

.site-header .nav-review-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 18px;
  background: #d8e4ea;
  transform: translateY(-50%);
}

.site-header .menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(132, 179, 197, 0.28);
  border-radius: 12px;
  background: #ffffff;
  color: #43545c;
  cursor: pointer;
}

.site-header .menu-toggle svg {
  width: 22px;
  height: 22px;
}

.site-footer {
  padding: 44px 0 28px;
  color: #6b7c84;
  background: var(--shared-footer-bg);
  font-size: 14px;
}

.site-footer .footer-layout {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  justify-content: center;
  gap: 34px;
  margin-bottom: 18px;
}

.site-footer .footer-logo {
  width: min(320px, 80vw);
  height: auto;
}

.site-footer .footer-contact {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(2, auto);
  gap: 2px 42px;
  align-items: start;
  justify-content: start;
  color: #43545c;
  line-height: 1.8;
}

.site-footer .footer-contact div {
  white-space: nowrap;
}

.site-footer .footer-contact a,
.site-footer .footer-contact button {
  padding: 0;
  border: 0;
  color: var(--shared-blue-dark);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.site-footer .footer-contact a:hover,
.site-footer .footer-contact button:hover {
  color: var(--shared-blue);
}

.copy-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 120;
  padding: 16px 24px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(38, 64, 72, .92);
  box-shadow: 0 20px 48px rgba(20, 38, 44, .20);
  font-size: 16px;
  font-weight: 800;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -44%) scale(.96);
  transition:
    opacity .22s ease,
    transform .22s ease;
}

.copy-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.site-footer .footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 18px 0;
}

.site-footer .footer-nav a {
  padding: 7px 14px;
  border-radius: 999px;
  color: #fff;
  background: var(--shared-blue);
  font-weight: 700;
}

.site-footer .footer-keywords {
  max-width: 900px;
  margin: 16px auto 14px;
  color: #9aa9b1;
  font-size: 13px;
  line-height: 1.9;
  text-align: center;
}

.site-footer .footer-copyright {
  text-align: center;
}

.site-footer .footer-copyright a {
  margin-left: 5px;
  color: inherit;
  font-weight: 600;
}

@media (max-width: 1090px) {
  .site-header .nav {
    min-height: 76px;
  }

  .site-header .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
  }

  .site-header .nav-links {
    position: absolute;
    top: calc(100% + 10px);
    left: 14px;
    right: 14px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px;
    border: 1px solid rgba(132, 179, 197, 0.22);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 40px rgba(18, 57, 84, 0.12);
    font-size: 14px;
    overflow: hidden;
  }

  .site-header .nav-links.is-open {
    display: flex;
  }

  .site-header .nav-links a {
    padding: 12px 10px;
  }

  .site-header .nav-review-link {
    margin-left: 0;
    padding-left: 10px;
  }

  .site-header .nav-review-link::before {
    display: none;
  }

  .site-footer .footer-layout {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .site-footer .footer-contact {
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .site-header .nav {
    align-items: center;
    flex-direction: row;
    min-height: 76px;
  }

  .site-header .brand {
    align-items: center;
    min-width: 0;
  }

  .site-header .brand-logo {
    width: min(230px, 76vw);
  }

  .site-header .nav-contact-link {
    border-bottom: 1px solid #eef3f6;
  }

  .site-footer .footer-contact {
    grid-auto-flow: row;
    grid-template-rows: none;
    gap: 4px;
    justify-items: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-loader {
    transition: none;
  }
}
