/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:   #1A2B4C;
  --gold:   #E8A020;
  --orange: #FF8C42;
  --cream:  #FFFCF5;
  --light:  #F5F0E8;
  --text:   #2C3E50;
  --muted:  #6B7A8D;
  --white:  #FFFFFF;
  --sidebar-bg: #FFF4D6;
  --sidebar-w: 220px;
  --radius: 14px;
  --shadow: 0 4px 24px rgba(26,43,76,0.10);
  --shadow-lg: 0 8px 40px rgba(26,43,76,0.16);
}

html { scroll-behavior: smooth; font-size: 18px; overflow-x: hidden; }

body {
  display: flex;
  min-height: 100vh;
  background: var(--cream);
  color: var(--text);
  font-family: "PingFang TC","Microsoft JhengHei","微軟正黑體",sans-serif;
  line-height: 1.8;
  letter-spacing: 0.04em;
}

/* ── Sidebar ── */
#sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  z-index: 100;
  box-shadow: 4px 0 20px rgba(0,0,0,0.10);
  overflow-y: auto;
}
.sidebar-logo {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(26,43,76,0.10);
  text-align: center;
}
.sidebar-logo img {
  width: 100%;
  max-width: 107px;
  height: auto;
  display: block;
  margin: 0 auto;
}
.sidebar-logo .logo-title {
  color: var(--gold);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.4;
  font-family: "BiauKai", "DFKai-SB", "標楷體", serif;
}
.sidebar-logo .logo-sub {
  color: rgba(26,43,76,0.60);
  font-size: 13px;
  margin-top: 6px;
  line-height: 1.5;
}
nav { flex: 1; padding: 16px 0; }
nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 22px;
  color: rgba(26,43,76,0.78);
  text-decoration: none;
  font-size: 16.5px;
  font-weight: 500;
  letter-spacing: 0.05em;
  border-left: 3px solid transparent;
  transition: all 0.22s ease;
}
nav a .nav-icon { font-size: 20px; flex-shrink: 0; }
nav a:hover, nav a.active {
  color: var(--navy);
  background: rgba(232,160,32,0.16);
  border-left-color: var(--orange);
}
nav .nav-group-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 22px;
  color: rgba(26,43,76,0.85);
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  user-select: none;
  border-left: 3px solid transparent;
}
nav .nav-group-label .nav-caret {
  margin-left: auto;
  font-size: 12px;
  transition: transform 0.25s ease;
  opacity: 0.6;
}
nav .nav-group-label.open .nav-caret { transform: rotate(180deg); }
nav .nav-group-label.active {
  color: var(--navy);
  background: rgba(232,160,32,0.16);
  border-left-color: var(--orange);
}
nav .nav-sub {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 600px;
  transition: max-height 0.3s ease;
}
nav .nav-sub.collapsed { max-height: 0; }
nav .nav-sub a {
  padding: 7px 22px 7px 44px;
  font-size: 15px;
  color: rgba(26,43,76,0.65);
}
.sidebar-contact {
  padding: 18px 20px;
  border-top: 1px solid rgba(26,43,76,0.10);
  color: rgba(26,43,76,0.55);
  font-size: 14px;
  text-align: center;
  line-height: 1.8;
}

/* ── Main ── */
#main { margin-left: var(--sidebar-w); flex: 1; min-height: 100vh; }

/* ── Section Base ── */
.section {
  padding: 64px 56px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-bottom: 1px solid rgba(26,43,76,0.07);
  position: relative;
  overflow: hidden;
}
.section:last-child { border-bottom: none; }
.section { scroll-margin-top: 16px; }
.section:nth-child(even) { background: var(--light); }
.section:nth-child(odd)  { background: var(--cream); }

/* ════════════════════════════════════
   HERO SLIDESHOW
   ════════════════════════════════════ */
#hero {
  padding: 0 !important;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  display: block !important;
  background: var(--navy) !important;
}

/* 每張投影片 */
.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease;
  z-index: 1;
}
.slide.active { opacity: 1; z-index: 2; }

/* 深色遮罩，確保文字可讀 */
#hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10,18,40,0.55) 0%,
    rgba(10,18,40,0.45) 20%,
    rgba(10,18,40,0.70) 50%
  );
  z-index: 3;
  pointer-events: none;
}

/* 文字內容浮在遮罩上 */
.hero-content {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 100vh;
  padding: 64px 56px;
}
.hero-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--navy);
  font-size: 15px;
  font-weight: 700;
  padding: 5px 16px;
  border-radius: 20px;
  letter-spacing: 0.10em;
  margin-bottom: 20px;
}
.hero-content h1 {
  font-size: clamp(40px, 5vw, 70px);
  font-weight: 800;
  color: var(--white);
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
  font-family: "BiauKai", "DFKai-SB", "標楷體", serif;
}
.hero-content h1 span { color: var(--gold); }
.mobile-break { display: none; }
.hero-sub {
  font-size: 19px;
  color: rgba(255,255,255,0.85);
  margin-top: 14px;
  letter-spacing: 0.06em;
  text-shadow: 0 1px 8px rgba(0,0,0,0.4);
}
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
}
.hero-tags .htag {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.92);
  padding: 7px 20px;
  border-radius: 30px;
  font-size: 16px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
  backdrop-filter: blur(4px);
}
.hero-tags .htag:hover {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}
.hero-addr {
  margin-top: 28px;
  font-size: 15px;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.08em;
}

/* 投影片指示點 */
.slide-dots {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  gap: 10px;
}
.slide-dots .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
  border: none;
}
.slide-dots .dot.active {
  background: var(--gold);
  transform: scale(1.25);
}

/* ════════════════════════════════════
   SECTION DECORATIVE BACKGROUNDS
   各 section 角落輕量裝飾，吸引小朋友但不影響閱讀
   ════════════════════════════════════ */

/* 共用：右下角大型半透明裝飾字 */
.sec-deco {
  position: absolute;
  right: -10px;
  bottom: -20px;
  font-size: 142px;
  line-height: 1;
  opacity: 0.30;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  filter: blur(0.9px);
}
/* 左上角小裝飾 */
.sec-deco-tl {
  position: absolute;
  left: 12px;
  top: 16px;
  font-size: 54px;
  line-height: 1;
  opacity: 0.30;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
/* section 內容要在裝飾上層，並在大螢幕/4K 上限制最大寬度置中，避免內容被拉得過寬 */
.section > *:not(.sec-deco):not(.sec-deco-tl) {
  position: relative;
  z-index: 1;
  max-width: 1300px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

/* ── Section Headers ── */
.sec-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.sec-label::before {
  content: '';
  display: inline-block;
  width: 28px; height: 3px;
  background: var(--gold);
  border-radius: 2px;
}
.sec-title {
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 800;
  color: var(--navy);
  letter-spacing: 0.06em;
  line-height: 1.25;
  margin-bottom: 8px;
}
.sec-desc {
  font-size: 17.5px;
  color: var(--muted);
  line-height: 1.9;
  max-width: 720px;
  margin-bottom: 32px;
}

/* ── Chips ── */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 28px; }
.chip {
  background: var(--navy);
  color: var(--white);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 15px;
  font-weight: 500;
}
.chip.gold   { background: var(--gold);   color: var(--navy); }
.chip.orange { background: var(--orange); color: var(--white); }

/* ── Price Badge ── */
.price-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  background: linear-gradient(135deg,#FF8C42,#E8A020);
  color: white;
  padding: 12px 28px;
  border-radius: 50px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.06em;
  box-shadow: 0 4px 16px rgba(232,160,32,0.35);
  margin: 16px 0;
}
.price-badge .unit { font-size: 17px; font-weight: 500; opacity: 0.85; }

/* ── Cards & Grid ── */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card img   { width: 100%; display: block; object-fit: cover; }
.img-4-3    { aspect-ratio: 4/3; object-fit: cover; }

/* ── Info Box ── */
.info-box {
  background: var(--white);
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px;
  box-shadow: var(--shadow);
  margin: 24px 0;
}
.info-box p { font-size: 17px; color: var(--text); line-height: 2; }
.info-box .feat-list li { color: white; }
.info-box .feat-list li::before { color: var(--gold); }

/* ── Layout ── */
.two-col       { display: grid; grid-template-columns: 1fr 1fr;  gap: 40px; align-items: start; }
.two-col-wide  { display: grid; grid-template-columns: 3fr 2fr;  gap: 40px; align-items: start; }

/* ── Sub-section ── */
.sub-sec { margin-top: 44px; padding-top: 36px; border-top: 1px solid rgba(26,43,76,0.08); }
.sub-title {
  font-size: 21px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.06em;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sub-title .num {
  background: var(--navy);
  color: var(--gold);
  width: 30px; height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  flex-shrink: 0;
}

/* ── Feature List ── */
.feat-list { list-style: none; display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.feat-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 17px;
  color: var(--text);
  line-height: 1.7;
}
.feat-list li::before {
  content: '✦';
  color: var(--gold);
  flex-shrink: 0;
  margin-top: 2px;
  font-size: 14px;
}

/* ── Contact / Line ── */
#line-sec { background: linear-gradient(135deg, #1A2B4C 0%, #0F1C33 100%) !important; }
#line-sec .sec-title { color: var(--white); }
#line-sec .sec-desc  { color: rgba(255,255,255,0.65); margin-bottom: 28px; }
#line-sec .sec-label::before { background: var(--gold); }
#line-sec .sec-label { color: rgba(255,255,255,0.6); }

.qr-wrap { background: white; border-radius: 20px; padding: 18px; display: inline-block; box-shadow: 0 8px 40px rgba(0,0,0,0.3); box-sizing: border-box; width: min(236px, 62vw); }
.qr-wrap img { width: 100%; height: auto; aspect-ratio: 1/1; display: block; }
.line-url { margin-top: 8px; font-size: 17px; color: var(--gold); letter-spacing: 0.06em; }
.tel-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  color: white;
  padding: 10px 24px;
  border-radius: 40px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.10em;
  margin-top: 12px;
}

/* ── Social links ── */
.social-row {
  display: flex;
  gap: 12px;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
}
.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: transform 0.2s, box-shadow 0.2s;
}
.social-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.3); }
.social-btn.line { background: #06C755; color: white; }
.social-btn.fb   { background: #1877F2; color: white; }

/* ── Google Map ── */
.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  width: 100%; height: 300px;
  border: none;
  display: block;
}
.map-wrap-sm {
  width: min(236px, 62vw);
  aspect-ratio: 1/1;
  height: auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: none;
  display: block;
}
.contact-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.map-info-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}
.map-info-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  color: rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  gap: 8px;
}
.map-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold);
  color: var(--navy);
  font-size: 17px;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 40px;
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(232,160,32,0.4);
  margin-top: 14px;
}
.map-nav-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(232,160,32,0.5); }

/* ── Lightbox ── */
#lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.90);
  display: none;
  align-items: center; justify-content: center;
  z-index: 9999;
  padding: 24px;
  cursor: zoom-out;
  backdrop-filter: blur(4px);
}
#lightbox img {
  max-width: 92%; max-height: 90vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 80px rgba(0,0,0,0.6);
}
#lightbox .lb-close {
  position: absolute; top: 20px; right: 24px;
  color: white; font-size: 34px; cursor: pointer;
  opacity: 0.75; transition: opacity 0.2s; line-height: 1;
}
#lightbox .lb-close:hover { opacity: 1; }

/* ── Scroll fade-in ── */
.fade-in { opacity: 0; transform: translateY(24px); transition: opacity 0.55s ease, transform 0.55s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── Responsive ── */
/* ── Mobile menu button (must precede responsive overrides below) ── */
#menu-btn {
  display: none;
  position: fixed;
  top: 14px; left: 14px;
  z-index: 200;
  background: var(--navy);
  color: var(--gold);
  border: none;
  border-radius: 10px;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  font-size: 24px;
  cursor: pointer;
  box-shadow: var(--shadow);
}

@media (max-width: 1024px) {
  :root { --sidebar-w: 190px; }
  .section { padding: 52px 36px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  :root { --sidebar-w: 0px; }
  #sidebar { transform: translateX(-220px); width: 220px; transition: transform 0.3s ease; }
  #sidebar.open { transform: translateX(0); }
  #main { margin-left: 0; }
  .section { padding: 44px 24px; min-height: auto; }
  .two-col, .two-col-wide { grid-template-columns: 1fr; gap: 24px; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  #menu-btn { display: flex; }
  .map-info-bar { grid-template-columns: 1fr 1fr; }
  .map-wrap { height: 220px; }
  .map-wrap-sm { width: min(236px, 68vw); }
  .qr-wrap { width: min(236px, 68vw); }
  .sec-deco { font-size: 92px; }
}
@media (max-width: 520px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero-content { padding: 40px 24px; }
  .hero-badge { font-size: 14px; padding: 5px 14px; }
  .hero-content h1 { font-size: clamp(34px, 9vw, 46px); letter-spacing: 0.08em; }
  .mobile-break { display: block; content: ""; }
  .hero-sub { font-size: 17px; }
  .hero-tags { gap: 8px; margin-top: 24px; }
  .hero-tags .htag { padding: 6px 14px; font-size: 15px; }
  .hero-addr { font-size: 14px; }
}

/* ── Site footer (multi-page) ── */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.55);
  font-size: 14px;
  text-align: center;
  padding: 22px 24px;
}

/* ── Home quick-links grid ── */
.quicklink-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 16px;
  text-decoration: none;
  color: var(--navy);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  text-align: center;
}
.quicklink-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.quicklink-card .ql-icon { font-size: 40px; }
.quicklink-card .ql-title { font-size: 17px; font-weight: 700; letter-spacing: 0.05em; }
.quicklink-card .ql-desc { font-size: 14px; color: var(--muted); }

/* ══════════════ 網站內容編輯器（登入才啟用） ══════════════ */
#editor-login-btn {
  position: fixed;
  right: 18px;
  top: 18px;
  z-index: 500;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(26,43,76,0.55);
  color: #fff;
  font-size: 17px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  transition: background 0.2s, transform 0.2s;
}
#editor-login-btn:hover { background: rgba(26,43,76,0.85); transform: scale(1.06); }

#editor-admin-link {
  position: fixed;
  right: 18px;
  top: 18px;
  z-index: 500;
  display: none;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 24px;
  border: none;
  background: var(--orange);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  transition: transform 0.2s, box-shadow 0.2s;
}
#editor-admin-link.show { display: inline-flex; }
#editor-admin-link:hover { transform: scale(1.04); box-shadow: 0 6px 18px rgba(0,0,0,0.3); }

#editor-login-modal {
  position: fixed; inset: 0;
  background: rgba(15,20,35,0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 600;
}
#editor-login-modal.show { display: flex; }
.editor-modal-box {
  background: #fff;
  border-radius: 16px;
  padding: 28px 26px;
  width: min(320px, 88vw);
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}
.editor-modal-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 16px;
  text-align: center;
}
.editor-modal-box input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  margin-bottom: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
}
.editor-modal-err {
  color: #d33;
  font-size: 13px;
  min-height: 18px;
  margin-bottom: 4px;
}
.editor-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 8px;
}
.editor-btn {
  border: none;
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
}
.editor-btn-primary { background: var(--orange); color: #fff; }
.editor-btn-ghost { background: #eee; color: #444; }

#editor-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 550;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #1A2B4C;
  color: #fff;
  padding: 12px 20px;
  font-size: 14.5px;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
  flex-wrap: wrap;
}
#editor-bar.show { display: flex; }
.editor-bar-actions { display: flex; gap: 10px; }

body.editor-editing { padding-bottom: 58px; }

.editor-editable-text {
  outline: 1.5px dashed rgba(232,160,32,0.6);
  outline-offset: 3px;
  cursor: text;
  border-radius: 4px;
}
.editor-editable-text:hover,
.editor-editable-text:focus {
  outline: 1.5px solid var(--orange);
  background: rgba(232,160,32,0.08);
}

.editor-editable-img {
  cursor: pointer;
  position: relative;
  outline: 2px dashed rgba(232,160,32,0.6);
  outline-offset: -2px;
}
.editor-editable-img:hover { outline: 2px solid var(--orange); }
