/* ── shared.css — บทสวดมนต์ ─────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Sarabun:ital,wght@0,300;0,400;0,600;0,700;1,400&family=Kanit:wght@400;600;700;800&display=swap');

:root {
  --gold:        #c8960a;
  --gold-light:  #f5d87a;
  --gold-dim:    #a07808;
  --brown:       #3d1f00;
  --brown-mid:   #6b3a0e;
  --cream:       #fdf6e3;
  --cream-dark:  #f0e4c4;
  --orange:      #e07020;
  --red:         #b02020;
  --bg:          #1a0a00;
  --text:        #2d1500;
  --text-light:  #5c3a10;
  --white:       #fff;
  --shadow:      0 4px 24px rgba(100,50,0,.18);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Sarabun', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ── BOTTOM NAV BAR ───────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 64px;
  background: linear-gradient(135deg, #2a0d00 0%, #4a1e00 50%, #2a0d00 100%);
  border-top: 1px solid rgba(197,150,10,.4);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
  box-shadow: 0 -4px 24px rgba(0,0,0,.5);
  padding: 0 8px;
}
.bottom-nav a {
  color: var(--gold-light);
  text-decoration: none;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 0.7rem;
  font-family: 'Kanit', sans-serif;
  padding: 8px 16px;
  border-radius: 12px;
  transition: background .2s;
  min-width: 64px;
  text-align: center;
  line-height: 1.3;
}
.bottom-nav a:hover, .bottom-nav a:active {
  background: rgba(197,150,10,.18);
}
.bottom-nav a .nav-icon { font-size: 1.3rem; }
.bottom-nav a.home-btn {
  background: rgba(197,150,10,.12);
  border: 1px solid rgba(197,150,10,.3);
}
.bottom-nav .nav-label {
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}
/* push page content above bottom nav */
body { padding-bottom: 72px; }

/* ── PAGE SHELL ───────────────────────────────────── */
.page-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 16px 64px;
}

/* ── CARD ─────────────────────────────────────────── */
.card {
  background: var(--cream);
  border-radius: 20px;
  padding: 32px 28px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(197,150,10,.25);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold-light), var(--orange), var(--gold-light), var(--gold-dim));
}

.card-title {
  font-family: 'Kanit', sans-serif;
  font-weight: 700;
  font-size: clamp(1.4rem, 4vw, 2rem);
  color: var(--brown);
  text-align: center;
  margin-bottom: 24px;
  line-height: 1.35;
}
.card-title .lotus { font-size: 1.3em; margin: 0 6px; }

/* ── AUDIO PLAYER ─────────────────────────────────── */
.audio-wrap {
  background: linear-gradient(135deg, #3d1f00 0%, #6b3a0e 100%);
  border-radius: 14px;
  padding: 24px 20px;
  text-align: center;
  margin-bottom: 20px;
}
.audio-label {
  font-family: 'Kanit', sans-serif;
  font-size: 0.85rem;
  color: var(--gold-light);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: block;
}
audio {
  width: 100%;
  max-width: 480px;
  border-radius: 8px;
  outline: none;
  filter: sepia(0.3) brightness(1.05);
}

/* ── DIVIDER ──────────────────────────────────────── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 24px 0;
  border: none;
}

/* ── NAV GRID (used on _index) ────────────────────── */
.nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 8px;
}
.nav-item {
  background: linear-gradient(135deg, #fff8e6, #fdf0cc);
  border: 1px solid rgba(197,150,10,.35);
  border-radius: 12px;
  padding: 14px 16px;
  text-decoration: none;
  color: var(--brown);
  font-family: 'Sarabun', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex; align-items: center; gap: 10px;
  transition: transform .2s, box-shadow .2s, background .2s;
  line-height: 1.4;
}
.nav-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(100,50,0,.18);
  background: linear-gradient(135deg, #fff2c8, #ffe8a0);
}
.nav-item .num {
  background: var(--brown);
  color: var(--gold-light);
  font-family: 'Kanit', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ── SECTION HEADER ───────────────────────────────── */
.section-head {
  font-family: 'Kanit', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 12px;
  margin-top: 28px;
  display: flex; align-items: center; gap: 8px;
}
.section-head::after {
  content: '';
  flex: 1; height: 1px;
  background: linear-gradient(90deg, rgba(197,150,10,.4), transparent);
}

/* ── BUDDHA QUOTE TEXT ────────────────────────────── */
.quote-body {
  font-size: 1rem;
  line-height: 2;
  color: var(--text);
}
.quote-body br { display: block; content: ''; }
.highlight-line {
  color: var(--brown-mid);
  font-weight: 600;
}
.asterisk-line {
  text-align: center;
  color: var(--gold-dim);
  margin: 12px 0;
  letter-spacing: 0.3em;
  font-size: 1.1rem;
}
.closing-quote {
  background: linear-gradient(135deg, rgba(200,150,10,.1), rgba(200,150,10,.04));
  border-left: 4px solid var(--gold);
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  margin-top: 24px;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--brown-mid);
  font-weight: 600;
}

/* ── HERO IMAGE ───────────────────────────────────── */
.hero-img-wrap {
  text-align: center;
  margin: 20px 0;
}
.hero-img-wrap img {
  max-width: 200px;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
  border: 3px solid rgba(197,150,10,.4);
}

/* ── FOOTER NOTE ──────────────────────────────────── */
.foot-note {
  text-align: center;
  font-size: 0.78rem;
  color: rgba(61,31,0,.4);
  margin-top: 32px;
  line-height: 1.8;
}

/* ── PAGE HEADER ───────────────────────────────────── */
.page-header {
  text-align: center;
  padding: 40px 16px 28px;
}
.page-header .lotus-row {
  font-size: 2.2rem;
  letter-spacing: 0.2em;
  margin-bottom: 10px;
}
.page-header h1 {
  font-family: 'Kanit', sans-serif;
  font-weight: 800;
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  color: var(--gold-light);
  text-shadow: 0 2px 16px rgba(0,0,0,.6);
  line-height: 1.2;
}
.page-header p {
  color: rgba(253,246,227,.65);
  font-size: 1rem;
  margin-top: 8px;
}

@media (max-width: 480px) {
  .card { padding: 22px 16px; }
  .nav-grid { grid-template-columns: 1fr 1fr; }
}
