/* 全站頁首 — 與 footer 共用金黃色系語彙 */
:root {
  --site-gold: #ebaa2e;
  --site-gold-2: #f4c430;
  --site-gold-dark: #d99718;
  --site-ink: #3a2d08;
  --site-muted: #5c5345;
  --site-cream: #fff6e4;
  --site-cream-2: #fffaf0;
  --site-line: #f0d9a0;
  --site-radius: 8px;
}

.site-header {
  background: #fff;
  border-bottom: 1px solid rgba(235, 170, 46, 0.2);
  box-shadow: 0 2px 12px rgba(120, 80, 0, 0.06);
  margin-bottom: 32px;
}

.site-header--home {
  margin-bottom: 0;
}

/* Logo 列 */
.site-topbar.navigation-clean-button {
  padding: 14px 0;
  background: #fff;
  border-bottom: none;
  margin: 0;
}

.site-topbar .container-fluid {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px 16px;
}

.site-topbar .navbar-brand {
  padding: 0;
  margin: 0;
  flex: 0 1 auto;
  min-width: 0;
}

.site-topbar .navbar-brand img {
  max-width: 320px !important;
  height: auto;
  display: block;
}

.site-topbar-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}

.site-search {
  display: flex;
  margin: 0;
}

.site-search-group {
  display: flex;
  align-items: stretch;
  height: 36px;
  border: 1px solid var(--site-line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--site-cream-2);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.site-search-group:focus-within {
  border-color: var(--site-gold);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(235, 170, 46, 0.16);
}

.site-search-input {
  width: 168px;
  height: 100%;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 14px;
  font-size: 0.875rem;
  color: var(--site-ink);
  background: transparent;
}

.site-search-input::placeholder {
  color: #9a9080;
}

.site-search-btn {
  width: 40px;
  height: 100%;
  padding: 0 !important;
  border: 0 !important;
  border-left: 1px solid var(--site-line) !important;
  border-radius: 0 !important;
  background: linear-gradient(135deg, var(--site-gold) 0%, var(--site-gold-2) 100%) !important;
  color: var(--site-ink) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.site-search-btn:hover,
.site-search-btn:focus {
  background: linear-gradient(135deg, var(--site-gold-dark) 0%, var(--site-gold) 100%) !important;
}

.site-topbar-access {
  position: absolute;
  left: -9999px;
}

.site-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--site-line);
  background: #fff;
  color: var(--site-muted) !important;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.site-chip .fa,
.site-chip .fas {
  color: var(--site-gold-dark);
  font-size: 0.9rem;
}

.site-chip:hover {
  background: var(--site-cream);
  border-color: var(--site-gold);
  color: var(--site-ink) !important;
}

.site-chip--solid {
  background: var(--site-cream);
  border-color: var(--site-line);
  color: var(--site-ink) !important;
}

.site-chip--solid:hover {
  background: #ffefc8;
  border-color: var(--site-gold);
}

.site-drawer-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  border: 1px solid var(--site-line);
  border-radius: 10px;
  background: linear-gradient(135deg, var(--site-gold) 0%, var(--site-gold-2) 100%);
  color: var(--site-ink);
  box-shadow: none;
  cursor: pointer;
}

.site-drawer-toggle:hover,
.site-drawer-toggle:focus {
  background: linear-gradient(135deg, var(--site-gold-dark) 0%, var(--site-gold) 100%);
  outline: none;
}

.site-drawer-toggle-bars {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 18px;
}

.site-drawer-toggle-bars span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--site-ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-header.is-drawer-open .site-drawer-toggle-bars span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header.is-drawer-open .site-drawer-toggle-bars span:nth-child(2) {
  opacity: 0;
}

.site-header.is-drawer-open .site-drawer-toggle-bars span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* 主選單列（桌機） */
.site-menubar {
  background: linear-gradient(135deg, var(--site-gold) 0%, var(--site-gold-2) 100%) !important;
  box-shadow: none;
  border-bottom: none;
  padding: 0;
  min-height: 0;
}

.site-menubar .container-fluid {
  padding-top: 0;
  padding-bottom: 0;
}

.site-menubar .navbar-nav {
  width: 100%;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  margin: 0;
}

.site-menubar .nav-item {
  flex: 1 1 0;
  min-width: 0;
}

.site-menubar .nav-link {
  display: flex !important;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 52px;
  padding: 10px 6px !important;
  margin: 0 !important;
  color: var(--site-ink) !important;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.3;
  border-radius: 0;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.site-menubar .nav-link:hover,
.site-menubar .nav-link:focus,
.site-menubar .nav-item.active .nav-link,
.site-menubar .nav-link.active {
  background: rgba(255, 255, 255, 0.22) !important;
  color: #ffffff !important;
}

/* 側邊抽屜 */
.site-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1040;
  background: rgba(40, 30, 10, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.site-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1050;
  width: min(86vw, 340px);
  height: 100%;
  background: #fff;
  box-shadow: -8px 0 28px rgba(0, 0, 0, 0.18);
  transform: translateX(105%);
  transition: transform 0.28s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.site-header.is-drawer-open .site-drawer-backdrop {
  opacity: 1;
  visibility: visible;
}

.site-header.is-drawer-open .site-drawer {
  transform: translateX(0);
}

.site-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  background: linear-gradient(135deg, var(--site-gold) 0%, var(--site-gold-2) 100%);
  color: var(--site-ink);
}

.site-drawer-head-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
}

.site-drawer-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.35);
  color: var(--site-ink);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.site-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  -webkit-overflow-scrolling: touch;
}

.site-drawer-search {
  margin-bottom: 14px;
}

.site-drawer-search .site-search-group {
  width: 100%;
  height: 42px;
}

.site-drawer-search .site-search-input {
  flex: 1;
  width: auto;
  font-size: 0.95rem;
}

.site-drawer-utils {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0ebe0;
}

.site-drawer-utils .site-chip {
  justify-content: center;
  height: 40px;
  font-size: 0.875rem;
}

.site-drawer-utils .site-chip--wide {
  grid-column: 1 / -1;
}

.site-drawer-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-drawer-nav a {
  display: block;
  padding: 12px 10px;
  border-radius: 8px;
  color: var(--site-ink);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease;
}

.site-drawer-nav a:hover,
.site-drawer-nav a:focus {
  background: var(--site-cream);
  color: var(--site-ink);
  text-decoration: none;
}

.site-drawer-label {
  margin: 0 0 8px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #9a9080;
  text-transform: uppercase;
}

.site-header-noscript {
  padding: 8px 16px;
  background: #fff3cd;
  color: #856404;
  font-size: 0.875rem;
}

body.site-drawer-lock {
  overflow: hidden;
}

@media (max-width: 1199px) {
  .site-topbar-tools--desktop,
  .site-menubar--desktop {
    display: none !important;
  }

  .site-drawer-toggle {
    display: inline-flex;
  }

  .site-topbar .navbar-brand img {
    max-width: 240px !important;
  }
}

@media (min-width: 1200px) {
  .site-drawer,
  .site-drawer-backdrop,
  .site-drawer-toggle {
    display: none !important;
  }
}

@media print {
  .site-topbar-tools,
  .site-menubar,
  .site-drawer,
  .site-drawer-backdrop,
  .site-drawer-toggle {
    display: none !important;
  }
}
