/* ============================================================
   願 Aspiration 靜態站（/yuan）
   前台介面 1:1 還原原 WordPress 網站（Astra + Elementor）
   https://6cmstudio.com/aspiration/
   視覺：固定半透明 header、全屏背景 Hero、三 Tab 圖片卡片牆
   配色：暖棕系（對應原站 ast-global-color 系列）
   同時保留 SEO／CTA／追蹤需求
   ============================================================ */

/* 原站用 Roboto（Elementor 載入），中文自動退到系統字 */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700&display=swap');

:root {
  --brand: #8d7865;          /* 原站 --ast-global-color-0（accent） */
  --brand-strong: #755a41;   /* 原站 --ast-global-color-1 */
  --ink: #433a33;            /* 原站 --ast-global-color-3 */
  --ink-soft: #6b6057;       /* 原站 --ast-global-color-2 */
  --muted: #6f6a63;
  --line: #d6d6d6;           /* 原站分隔線 #D6D6D6 */
  --bg: #ffffff;             /* 原站 --ast-global-color-4 */
  --bg-soft: #f5f0eb;        /* 原站 --ast-global-color-5 */
  --dark: #111111;           /* 原站 --ast-global-color-6/8 */
  --accent: #b8873d;
  --text: #2f2f2f;           /* 原站 Elementor 內文文字色 */
  --heading: #373737;        /* 原站 Elementor primary 標題色 */
  --radius: 14px;
  --shadow: 0 1px 3px rgba(40, 30, 15, .08), 0 8px 24px rgba(40, 30, 15, .06);
  --maxw: 1200px;            /* 原站 --ast-normal-container-width */
  --font: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC",
          "Noto Sans TC", "Microsoft JhengHei", "Heiti TC", sans-serif;
  --font-hand: "Oooh Baby", "Segoe Script", "Kaiti TC", cursive;
  /* 原站 Hero 與卡片背景圖 */
  --hero-bg: url("/aspiration/assets/ext/aspiration-wp-content-uploads-2026-01-IMG_9238-1-scaled.jpg");
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: #000000;      /* 原站 elementor canvas 全頁黑底 */
  line-height: 1.65;
  font-size: 16px;
}
a { color: var(--brand-strong); text-decoration: none; }
a:hover { text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ============================================================
   固定 header（原站 .site-header fixed + .ast-primary-header-bar #0c0d0ead）
   ============================================================ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 99;
  width: 100%;
  background: #0c0d0ead;    /* 原站 ast-primary-header-bar 半透明黑 */
  backdrop-filter: saturate(120%) blur(6px);
}
.site-header .wrap,
.site-header .header-inner {
  display: flex; align-items: center; gap: 14px;
  min-height: 64px;
}
.brand {
  display: inline-flex; align-items: baseline; gap: 8px;
  font-size: 20px; font-weight: 700; letter-spacing: .02em; color: #ffffff;
}
.brand:hover { text-decoration: none; color: #ffffff; }
.brand .brand-name { color: #ffffff; }
.brand small { display: block; font-size: 11px; color: rgba(255,255,255,.78); font-weight: 500; letter-spacing: .14em; }
.brand .logo--text { display: none; }  /* 原站 header 用純文字 logo，無色塊 */
.main-nav { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.main-nav a,
.main-nav .nav-link {
  padding: 8px 12px; border-radius: 8px; color: #ffffff;
  font-size: 15px; white-space: nowrap;
}
.main-nav a:hover { background: rgba(255,255,255,.12); color: #ffffff; text-decoration: none; }
.nav-toggle { display: none; margin-left: auto; background: transparent; border: 1px solid rgba(255,255,255,.4); color: #fff; }

/* ---------- 下拉選單（原站 Astra 下拉：hover 展開，選項深色底） ---------- */
.nav-item { position: relative; }
.nav-item .nav-link {
  display: inline-flex; align-items: center; gap: 4px;
  background: transparent; border: 0; font-family: var(--font); cursor: pointer;
}
.nav-item .nav-link:hover { background: rgba(255,255,255,.12); }
.drop {
  display: none; position: absolute; top: calc(100% + 6px); left: 0;
  min-width: 176px; padding: 6px;
  background: #0c0d0e; border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
}
.nav-item:hover .drop,
.nav-item:focus-within .drop { display: block; }
.drop a {
  display: block; padding: 8px 12px; border-radius: 6px;
  color: #ffffff; font-size: 14px; white-space: normal;
}
.drop a:hover { background: #e2dbd5; color: #3a322a; }

/* ============================================================
   首頁 Hero（原站 e0e92ba：全屏背景圖 + 黑 overlay 0.33 + 中央白字）
   ============================================================ */
.hero {
  position: relative;
  min-height: 522px;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: 120px 20px;
  background-color: #000000;
  background-image: var(--hero-bg);
  background-position: center; background-size: cover;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-color: rgba(0,0,0,.33);  /* 原站 overlay-opacity 0.33 */
}
.hero-inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.hero-logo { width: 71px; height: 71px; margin: 0 auto; object-fit: contain; }
.hero-slogan {
  margin: 0;
  font-family: Arial, var(--font);
  font-size: 26px; font-weight: 400; letter-spacing: 2.2px; color: #ffffff;
}
.hero-en {
  margin: 0;
  font-family: var(--font-hand);
  font-size: 22px; font-weight: 400; color: #ffffff;
}

/* ============================================================
   三 Tab 分類（原站 nested-tabs：tab 選中背景 accent，卡片牆圖片背景）
   ============================================================ */
.tabs { margin-top: -56px; position: relative; z-index: 2; padding: 0 20px 20px; }
.tabs-heading {
  display: flex; flex-wrap: wrap; gap: 0; justify-content: center;
  margin: 0 0 5px;
}
.tab-title {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  padding: 12px 24px;
  font-family: var(--font); font-size: 16px; font-weight: 500; color: #ffffff;
  border-radius: 6px 6px 0 0;
  transition: background .18s ease;
}
.tab-title:hover { background: rgba(141,120,101,.5); }
.tab-title.is-active,
.tab-title[aria-selected="true"] { background: var(--brand); color: #ffffff; }
.tab-panel[hidden] { display: none; }

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;                 /* 原站卡片間 5px 縫隙露黑底 */
}
.card {
  position: relative;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  min-height: 191px;
  gap: 5px; text-align: center;
  padding: 24px 16px;
  background-color: #000000;
  background-position: center center; background-size: cover;
  overflow: hidden;
  color: #ffffff;
}
.card::before {
  content: ""; position: absolute; inset: 0;
  background-color: rgba(0,0,0,.5);  /* 原站 overlay-opacity 0.5 */
}
.card:hover { text-decoration: none; }
.card h3 {
  position: relative; z-index: 1; margin: 0;
  font-family: Arial, var(--font); font-size: 38px; font-weight: 700;
  color: #ffffff; line-height: 1.2;
}
.card p {
  position: relative; z-index: 1; margin: 0;
  font-family: Arial, var(--font); font-size: 16px; font-weight: 400;
  letter-spacing: 2.2px; color: #ffffff;
}

/* ---------- 按鈕 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px;
  font-size: 15px; font-weight: 600; border: 1px solid transparent;
  cursor: pointer; transition: .18s ease;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-strong); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--brand-strong); border-color: var(--brand); }
.btn-ghost:hover { border-color: var(--brand-strong); text-decoration: none; }

/* ---------- 頁尾（原站 ast-footer-copyright：白底 + 上邊框） ---------- */
.site-footer { margin-top: 0; }
.footer-copyright {
  background-color: #ffffff;
  min-height: 60px;
  border-top: 1px solid #D1D5DB;
  padding: 20px 0;
  text-align: center;
  color: var(--ink-soft);
  font-size: 14px;
}
.footer-cta {
  background: #ffffff; color: var(--ink);
  text-align: center; padding: 24px 20px 40px;
  border-top: 1px solid var(--line);
}
.footer-cta p { margin: 0 0 14px; color: var(--ink-soft); }
.footer-cta .btn { margin: 4px; }

/* ---------- 返回頂端（原站 ast-scroll-top 棕色） ---------- */
.back-top {
  position: fixed; right: 30px; bottom: 30px; z-index: 90;
  width: 44px; height: 44px; border-radius: 2px;
  border: 0; background: #8d7865; color: #ffffff;
  font-size: 20px; cursor: pointer; box-shadow: var(--shadow);
  display: none; align-items: center; justify-content: center;
}
.back-top.show { display: flex; }

/* ============================================================
   詳情頁（文章頁）樣式：白底文章，沿用暖棕配色
   原站詳情頁是 Astra 標準文章版型（白底）
   ============================================================ */
body.page-article,
body:has(article) { background: #ffffff; }

/* ---------- 文章 Hero 大圖（原站 b189bc0：全幅背景圖 + H1 + 副標，標題靠下） ---------- */
.page-hero {
  position: relative;
  min-height: 400px;
  display: flex;
  align-items: flex-end;
  background-color: #000000;
  background-position: center;
  background-size: cover;
  padding: 120px 20px 60px;
}
.page-hero::before {
  content: ""; position: absolute; inset: 0;
  background-color: rgba(0,0,0,.5);  /* 原站 b189bc0 overlay-opacity 0.5 */
}
.page-hero .hero-wrap { position: relative; z-index: 1; width: 100%; max-width: var(--maxw); margin: 0 auto; }
.page-hero h1 {
  margin: 0 0 10px;
  font-family: Roboto, var(--font);
  font-size: 40px; font-weight: 400; line-height: 1.25;
  color: #ffffff; letter-spacing: .01em;
}
.page-hero .hero-sub {
  margin: 0; max-width: 760px;
  font-family: Roboto, var(--font);
  font-size: 17px; font-weight: 400; line-height: 30px;
  color: #ffffff;
}

/* ---------- 內文 ---------- */
article { padding: 10px 0 40px; }
article > .lead { color: var(--text); font-size: 16px; margin: 0 0 22px; }
.anchors { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.anchors a {
  font-size: 13px; padding: 5px 12px; border-radius: 999px;
  background: var(--bg-soft); color: var(--brand-strong); border: 1px solid var(--line);
}
.anchors a:hover { text-decoration: none; border-color: var(--brand); }

section.sec { margin: 30px 0; }
section.sec.deity-row { margin: 0; }

/* ---------- 殿宇雙欄區塊（原站：左 33% 殿名＋菩薩名＋祈願，右 67% 內文，之間分隔線） ---------- */
.deity-row {
  display: grid;
  grid-template-columns: 33.33% 66.67%;
  gap: 28px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}
.deity-row:first-of-type { border-top: 0; padding-top: 6px; }
.deity-row .deity-head { min-width: 0; }
.deity-row .deity-head h3 {
  margin: 0 0 6px;
  font-size: 16px; font-weight: 600; letter-spacing: .04em;
  color: var(--brand);           /* 殿名 accent 色 */
}
.deity-row .deity-head h2 {
  margin: 0 0 10px;
  font-size: 27px; font-weight: 400; line-height: 1.35;
  color: var(--heading);          /* 菩薩名 primary 色 */
}
.deity-row .deity-head .pray { margin: 0; color: var(--text); font-size: 15px; line-height: 1.7; }
.deity-row .deity-body { min-width: 0; }
.deity-row .deity-body > :first-child { margin-top: 0; }

/* ---------- 內文基本字型（原站 Roboto 400 / line-height 30 / 文字 #2F2F2F） ---------- */
article p { margin: 0 0 16px; color: var(--text); font-size: 16px; line-height: 30px; }
article h2 { font-size: 27px; font-weight: 400; line-height: 1.35; color: var(--heading); margin: 26px 0 12px; }
article h3 { font-size: 18px; margin: 20px 0 8px; color: var(--heading); }
article h4 { font-size: 16px; margin: 16px 0 6px; color: var(--heading); }
article ul, article ol { margin: 0 0 16px; padding-left: 1.4em; }
article li { margin: 5px 0; color: var(--text); line-height: 30px; }
article strong { color: var(--ink); }

.note {
  background: var(--bg-soft); border-left: 3px solid var(--accent);
  border-radius: 8px; padding: 12px 16px; margin: 14px 0; font-size: 14.5px; color: var(--text); line-height: 1.8;
}
.note.warn { border-left-color: #c0553b; background: #fdf6f2; }

/* ---------- 結尾傳說區塊（原站 a645dc6：淺灰底 #EBEBEB） ---------- */
.legend {
  background: #ebebeb; padding: 50px 20px; margin: 30px 0 0;
  border-radius: 8px; color: var(--text); font-size: 15px; line-height: 1.9;
}
.legend h2 { color: var(--heading); margin-top: 0; }
.legend .disclaimer { font-style: italic; color: var(--muted); margin-top: 14px; }

table.data { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14.5px; }
table.data th, table.data td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
table.data th { background: var(--bg-soft); font-weight: 600; color: var(--ink); }
table.data td { color: #3c3831; }

/* ---------- CTA 區塊 ---------- */
.cta-box {
  margin: 30px 0; padding: 24px; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--bg-soft), #f3ece1);
  border: 1px solid var(--line);
}
.cta-box h2 { margin: 0 0 6px; font-size: 20px; color: var(--heading); }
.cta-box p { margin: 0 0 16px; color: var(--muted); }
.cta-box .row { display: flex; gap: 12px; flex-wrap: wrap; }

.related { margin: 30px 0; }
.related h2 { font-size: 19px; margin: 0 0 14px; color: var(--heading); }
.related .cards { grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* 詳情頁內文的「相關推薦」沿用白底卡片（非首頁圖片牆） */
.related .card {
  position: relative; display: flex; flex-direction: column;
  justify-content: flex-start; align-items: stretch;
  min-height: 0; text-align: left; gap: 0; padding: 0;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); color: inherit;
  transition: transform .18s ease, box-shadow .18s ease;
}
.related .card::before { display: none; }
.related .card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(40,30,15,.12); }
.related .card .thumb {
  display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover;
  background: linear-gradient(135deg, #f3ece1, #e9dcc7);
  color: var(--accent); font-size: 40px;
}
.related .card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.related .card .cat { font-size: 11px; letter-spacing: .12em; color: var(--accent); font-weight: 600; }
.related .card h3 { margin: 0; font-size: 18px; line-height: 1.4; color: var(--heading); }
.related .card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }

/* ---------- 詳情頁頁尾（白底，對應原站 ast-footer-copyright） ---------- */
body.page-article .site-footer,
body:has(article) .site-footer {
  background: #ffffff;
  border-top: 1px solid #D1D5DB;
  color: var(--ink-soft);
  text-align: center;
  padding: 20px 0 40px;
  font-size: 14px;
}
.site-footer .brand-line { font-size: 16px; color: var(--ink); font-weight: 600; margin-bottom: 6px; }
.site-footer .ig { display: inline-flex; align-items: center; gap: 6px; margin: 10px 0 4px; color: var(--brand-strong); }
.site-footer .fine { font-size: 12.5px; margin: 8px 0 0; color: var(--muted); }

/* ---------- 手機底部追蹤欄（詳情頁，白底） ---------- */
.sticky-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: none; gap: 10px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.97); border-top: 1px solid var(--line);
}
.sticky-bar .btn { flex: 1; justify-content: center; }

/* ---------- 響應式 ---------- */
@media (max-width: 860px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .related .cards { grid-template-columns: repeat(2, 1fr); }
  .main-nav { display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; background: #0c0d0e; border-bottom: 1px solid rgba(255,255,255,.12); padding: 10px 16px 16px; }
  .main-nav.open { display: flex; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 8px; cursor: pointer; }
  .nav-item { width: 100%; }
  .nav-item .nav-link { width: 100%; justify-content: space-between; }
  .drop { display: block; position: static; background: transparent; box-shadow: none; min-width: 0; padding: 0 0 6px 14px; }
  .drop a:hover { background: rgba(255,255,255,.12); color: #ffffff; }
  .hero { min-height: 420px; padding: 90px 20px; }
  .card h3 { font-size: 26px; }
  .card p { letter-spacing: 1.4px; font-size: 14px; }
  .sticky-bar { display: flex; }
  .deity-row { grid-template-columns: 1fr; gap: 8px; }
  .page-hero h1 { font-size: 32px; }
}
@media (max-width: 520px) {
  .cards { grid-template-columns: 1fr; }
  .related .cards { grid-template-columns: 1fr; }
  .hero { min-height: 360px; padding-top: 80px; }
  .hero-slogan { font-size: 22px; }
  .card { min-height: 160px; }
  .tab-title { padding: 10px 14px; font-size: 14px; }
  .page-hero { min-height: 320px; padding: 96px 20px 44px; }
  .page-hero h1 { font-size: 27px; }
  .page-hero .hero-sub { font-size: 15px; line-height: 26px; }
}
