/* === Global reset & typography === */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  background-color: var(--bg-body, #f5f5f5);
  color: var(--text-main, #333333);
  line-height: 1.5;
}

/* Links */
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: none;
}

/* === Color tokens (brand palette) === */
:root {
  --brand-orange: #f5821f;
  --brand-orange-dark: #d86f15;

  --brand-blue: #2069b1;
  --brand-blue-dark: #1b5a99;

  --brand-green: #77c1a0;

  --bg-body: #f5f5f5;
  --bg-card: #ffffff;

  --border-soft: #e0e0e0;

  --text-main: #333333;
  --text-muted: #666666;
}

/* === Layout helpers === */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-main {
  flex: 1 0 auto;
  max-width: 1120px;
  margin: 16px auto 24px;
  padding: 0 12px 40px;
}

/* == Cards (for admin / booking panels, etc.) == */
.app-card {
  background-color: var(--bg-card);
  border-radius: 6px;
  border: 1px solid var(--border-soft);
  padding: 16px 16px 20px;
}

/* Informational highlight (policy note) */
.policy-note {
  margin: 12px 0;
  padding: 12px 14px;
  background: linear-gradient(135deg, #fffdf9 0%, #fff7ed 100%);
  color: #4a3327;
  border: 1px solid #f1e2d6;
  border-left: 4px solid var(--brand-orange);
  border-radius: 10px;
  line-height: 1.6;
  box-shadow: 0 6px 18px rgba(245, 130, 31, 0.08);
}

/* === Shared buttons (non-Bootstrap pages, or custom CTAs) === */
.btn-primary-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: none;
  background: var(--brand-orange);
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(245, 130, 31, 0.35);
  transition:
    background 0.2s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.btn-primary-main:hover {
  background: var(--brand-orange-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 130, 31, 0.45);
}

.btn-primary-main:active {
  background: var(--brand-orange-dark);
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(245, 130, 31, 0.3);
}

.text-muted {
  color: var(--text-muted);
}

/* === RWD Header (site-wide) === */

.site-header {
  background: var(--brand-orange);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.site-header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Brand block */
.site-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: inherit;
}

.site-brand-main {
  font-size: 18px;
  font-weight: 700;
}

.site-brand-sub {
  font-size: 12px;
  opacity: 0.9;
}

/* Navigation */
.site-nav {
  display: flex;
  align-items: center;
}

.site-nav ul {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 16px;
  font-size: 14px;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 500;
  white-space: nowrap;
}

.site-nav a:hover {
  background-color: rgba(255, 255, 255, 0.16);
}

.site-nav a.is-active {
  background-color: rgba(255, 255, 255, 0.22);
}

/* Divider */
.site-nav .nav-divider {
  width: 1px;
  height: 22px;
  background-color: rgba(255, 255, 255, 0.4);
}

/* Hamburger */
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 0;
  padding: 0;
  background: rgba(0, 0, 0, 0.08);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background-color: #ffffff;
  transition: transform 0.2s ease, opacity 0.2s ease;
  position: relative;
}

.nav-toggle-bar::before {
  position: absolute;
  top: -5px;
}

.nav-toggle-bar::after {
  position: absolute;
  top: 5px;
}

/* open state */
.nav-toggle[aria-expanded="true"] .nav-toggle-bar {
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before {
  transform: rotate(-90deg);
  top: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after {
  opacity: 0;
}

/* === Header RWD === */
@media (max-width: 768px) {
  .site-header-inner {
    padding: 10px 12px;
  }

  .site-brand-main {
    font-size: 16px;
  }

  .site-brand-sub {
    font-size: 11px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--brand-orange);
    display: none;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 12px 10px;
  }

  .site-nav a {
    justify-content: flex-start;
    padding: 8px 10px;
    border-radius: 8px;
  }

  .site-nav .nav-divider {
    display: none;
  }
}

/* Desktop: keep nav inline, hide toggle */
@media (min-width: 769px) {
  .site-nav {
    position: static;
  }
}

/* === Shared Footer === */
.site-footer {
  margin-top: 32px;
  background: #f0f0f0;
  border-top: 1px solid var(--border-soft);
  padding: 16px 12px 24px;
  font-size: 13px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.site-footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.site-footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 40px;
}

.footer-col h4 {
  font-size: 14px;
  margin: 0 0 6px;
  color: var(--text-main);
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li + li {
  margin-top: 4px;
}

.footer-col a {
  text-decoration: none;
}
.footer-col a:hover {
  text-decoration: underline;
}

.site-footer-bottom {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  text-align: center;
}

.site-footer-bottom p {
  margin: 0;
}

/* Footer RWD */
@media (max-width: 600px) {
  .site-footer {
    padding: 16px 12px 20px;
  }
}
