*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --maincolor: #1e7b82;
  --footer-green: #98bb1d;
  --copyright-green: #006937;
  --header-yellow: #fff9c4;
  --accent-red: #e53935;
  --btn-cyan: #4db8d9;
  --btn-cyan-hover: #3aa5c6;
}

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "微軟正黑體", "Microsoft JhengHei", "Microsoft YaHei", sans-serif;
  font-size: 1.1em;
  color: #333;
  background-color: #eaf0eb;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
  pointer-events: none;
  cursor: default;
}

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== Header（純展示，無連結） ===== */
header {
  position: relative;
  z-index: 10;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.brand img.logo-lg {
  display: block;
  max-height: 2.5rem;
  width: auto;
}

.brand img.logo-sm {
  display: none;
  max-height: 2.5rem;
  width: auto;
}

.brand h1 {
  margin: 0;
  font-size: clamp(0.85rem, 1.8vw, 1.35rem);
  font-weight: 700;
  line-height: 1.25;
  color: #222;
  white-space: nowrap;
}

.brand h1 span {
  color: var(--maincolor);
}

.nav-display {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem 1.25rem;
  font-size: 1.05rem;
  color: #333;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-display li {
  white-space: nowrap;
}

/* ===== 首頁大圖 ===== */
.hero {
  width: 100%;
  background: #eaf0eb;
  line-height: 0;
}

.hero img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 52vh;
  object-fit: cover;
  object-position: center top;
}

/* ===== Footer（純展示） ===== */
footer {
  margin-top: auto;
  font-size: 1rem;
  font-weight: 700;
  background: var(--footer-green);
  width: 100%;
}

.footer-info {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.75rem 1.5rem;
  flex-wrap: wrap;
}

.footer-info img {
  height: 72px;
  width: auto;
}

.foot-contact {
  list-style: none;
  margin: 0;
  padding: 0;
  color: #222;
  line-height: 1.6;
}

.copyright {
  background: var(--copyright-green);
  color: #fff;
  text-align: center;
  padding: 12px 16px;
}

/* ===== 導轉遮罩與視窗 ===== */
.redirect-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.redirect-modal {
  width: 90%;
  max-width: 600px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  border: 1px solid #ddd;
}

.redirect-modal__header {
  background: var(--header-yellow);
  text-align: center;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid #e0e0e0;
}

.redirect-modal__header h2 {
  margin: 0;
  color: var(--accent-red);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.redirect-modal__body {
  padding: 1.25rem 1.5rem 0.75rem;
  line-height: 1.75;
  color: #333;
  font-size: 1.05rem;
}

.redirect-modal__body p {
  margin: 0 0 1rem;
}

.highlight-date {
  color: var(--accent-red);
  font-weight: 700;
}

.new-url {
  word-break: break-all;
}

.countdown-line {
  margin-top: 0.5rem !important;
}

.countdown-num {
  display: inline-block;
  color: var(--accent-red);
  font-weight: 700;
  font-size: 1.75rem;
  min-width: 1.5em;
  text-align: center;
  vertical-align: baseline;
  line-height: 1;
}

.redirect-modal__footer {
  display: flex;
  justify-content: flex-end;
  padding: 0.75rem 1.25rem 1.1rem;
  border-top: 1px solid #eee;
}

.btn-go {
  appearance: none;
  border: none;
  background: var(--btn-cyan);
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  font-family: inherit;
  padding: 0.55rem 1.35rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-go:hover {
  background: var(--btn-cyan-hover);
}

.btn-go:focus-visible {
  outline: 2px solid #1e7b82;
  outline-offset: 2px;
}

@media (max-width: 991.98px) {
  .brand img.logo-lg {
    display: none;
  }

  .brand img.logo-sm {
    display: block;
  }

  .nav-display {
    display: none;
  }

  .site-header {
    justify-content: flex-start;
  }
}

@media (max-width: 575.98px) {
  .redirect-modal__header h2 {
    font-size: 1.15rem;
  }

  .redirect-modal__body {
    padding: 1rem 1.1rem 0.5rem;
    font-size: 0.98rem;
  }

  .countdown-num {
    font-size: 1.5rem;
  }

  .footer-info {
    padding: 0.75rem 1rem;
  }

  .footer-info img {
    height: 56px;
  }
}
