/* Chùa Tịnh Lâm — giao diện chung */
:root {
  --forest-900: #15261d;
  --forest-800: #1d3427;
  --forest-700: #26432f;
  --forest-500: #3d6b4f;
  --moss: #8aa985;
  --gold: #c49a3a;
  --gold-deep: #9c7623;
  --gold-soft: #ecdcab;
  --paper: #f7f2e7;
  --paper-2: #efe6d3;
  --card: #fffdf8;
  --ink: #1f2721;
  --ink-2: #4b564d;
  --ink-3: #7a8279;
  --line: #ddd2bb;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(21, 38, 29, .06), 0 8px 24px rgba(21, 38, 29, .08);
  --serif: "Noto Serif", Georgia, serif;
  --sans: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--sans); font-size: 17px; line-height: 1.7;
  color: var(--ink); background: var(--paper); overflow-x: hidden;
}
img, svg, iframe { display: block; max-width: 100%; }
a { color: var(--forest-500); text-decoration: none; }
a:hover { color: var(--gold-deep); }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.3; color: var(--forest-800); margin: 0 0 .5em; font-weight: 600; text-wrap: balance; }
p { margin: 0 0 1em; }
.container { width: min(1140px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(780px, 100% - 32px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Bản nháp ---------- */
.draft-bar {
  background: var(--gold-soft); color: #5b4512; font-size: 14px; text-align: center;
  padding: 6px 16px; border-bottom: 1px solid #d9c48a;
}

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(21, 38, 29, .96); backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(236, 220, 171, .15);
}
.header .container { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; }
.brand:hover { color: #fff; }
.brand svg { width: 36px; height: 36px; flex: none; }
.brand b { font-family: var(--serif); font-size: 20px; font-weight: 600; letter-spacing: .2px; }
.brand small { display: block; font-size: 12px; color: var(--gold-soft); opacity: .85; line-height: 1.2; }
.nav { display: flex; gap: 4px; }
.nav a { color: #e9efe9; font-size: 15px; padding: 8px 12px; border-radius: 8px; }
.nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav a.active { color: var(--gold-soft); box-shadow: inset 0 -2px 0 var(--gold); border-radius: 0; }
.menu-btn { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.menu-btn span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; transition: .25s; }

@media (max-width: 820px) {
  .menu-btn { display: block; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; gap: 0;
    background: var(--forest-900); padding: 8px 16px 16px; transform: translateY(-12px);
    opacity: 0; visibility: hidden; transition: transform .25s ease, opacity .25s ease, visibility .25s;
    box-shadow: 0 12px 24px rgba(0,0,0,.25);
  }
  .nav.open { transform: none; opacity: 1; visibility: visible; }
  .hero-art { object-position: 50% 50%; }
  .nav a { padding: 14px 8px; border-bottom: 1px solid rgba(255,255,255,.07); border-radius: 0; }
  .nav a.active { box-shadow: none; }
  .menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-btn.open span:nth-child(2) { opacity: 0; }
  .menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- Hero ---------- */
.hero { position: relative; min-height: min(86vh, 760px); display: grid; place-items: center; overflow: hidden; color: #fff; }
.hero-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14,26,20,.55) 0%, rgba(14,26,20,.35) 50%, rgba(14,26,20,.65) 100%); }
.hero-inner { position: relative; z-index: 1; text-align: center; padding: 48px 16px 120px; }
.hero .eyebrow { font-size: 14px; letter-spacing: 3px; text-transform: uppercase; color: var(--gold-soft); margin-bottom: 10px; }
.hero h1 { color: #fff; font-size: clamp(40px, 8vw, 76px); margin: 0; text-shadow: 0 2px 24px rgba(0,0,0,.35); }
.hero .lead { font-size: clamp(16px, 2.4vw, 20px); color: #f1f4ef; margin: 14px 0 28px; }
.btn-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px;
  font-weight: 600; font-size: 16px; border: 1.5px solid transparent; transition: .2s; cursor: pointer;
}
.btn svg { width: 18px; height: 18px; }
.btn-gold { background: var(--gold); color: #1b1407; }
.btn-gold:hover { background: #d4ab4b; color: #1b1407; }
.btn-ghost { border-color: rgba(255,255,255,.6); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; }
.btn-green { background: var(--forest-700); color: #fff; }
.btn-green:hover { background: var(--forest-500); color: #fff; }
.btn-line { border-color: var(--forest-500); color: var(--forest-700); }
.btn-line:hover { background: var(--forest-700); color: #fff; }

/* ---------- Thẻ thông tin nhanh ---------- */
.quick { position: relative; z-index: 2; margin-top: -72px; }
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.qcard { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 22px 20px; display: flex; gap: 14px; align-items: flex-start; border-top: 3px solid var(--gold); }
.qcard .ic { flex: none; width: 44px; height: 44px; border-radius: 12px; background: #e8efe6; color: var(--forest-500); display: grid; place-items: center; }
.qcard .ic svg { width: 22px; height: 22px; }
.qcard h3 { font-family: var(--sans); font-size: 13px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ink-3); margin: 2px 0 4px; font-weight: 600; }
.qcard p { margin: 0; font-weight: 600; color: var(--ink); line-height: 1.45; }
.qcard p a { color: var(--forest-700); }
.qcard .note { font-weight: 400; font-size: 13px; color: var(--ink-3); margin-top: 4px; }
@media (max-width: 820px) { .quick-grid { grid-template-columns: 1fr; } .quick { margin-top: -56px; } }

/* ---------- Section ---------- */
.section { padding: 80px 0; }
.section.alt { background: var(--paper-2); }
.section.dark { background: var(--forest-800); color: #e6ece5; }
.section.dark h2 { color: #fff; }
.sec-head { text-align: center; max-width: 680px; margin: 0 auto 44px; }
.sec-head .kicker { color: var(--gold-deep); font-size: 13px; letter-spacing: 2.5px; text-transform: uppercase; font-weight: 600; margin-bottom: 6px; }
.section.dark .sec-head .kicker { color: var(--gold-soft); }
.sec-head h2 { font-size: clamp(28px, 4vw, 38px); margin-bottom: 10px; }
.sec-head p { color: var(--ink-2); margin: 0; }
.section.dark .sec-head p { color: #c8d3c7; }
.ornament { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--gold); margin: 10px auto 14px; }
.ornament::before, .ornament::after { content: ""; width: 48px; height: 1px; background: currentColor; opacity: .7; }
.ornament svg { width: 18px; height: 18px; }
@media (max-width: 640px) { .section { padding: 56px 0; } }

/* ---------- Hai cột ---------- */
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.split .text h2 { font-size: clamp(26px, 3.6vw, 34px); }
.split .text p { color: var(--ink-2); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- Ô chờ bổ sung ---------- */
.cho {
  border: 2px dashed #cfb46a; background: repeating-linear-gradient(135deg, #fffaf0 0 14px, #fdf5e2 14px 28px);
  border-radius: var(--radius); padding: 20px 22px; color: #5b4512;
}
.cho .tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; background: #f2e2b2; color: #6b5212; padding: 3px 10px; border-radius: 999px; margin-bottom: 8px; }
.cho h3 { font-family: var(--sans); font-size: 18px; color: #4a3a10; margin: 0 0 6px; }
.cho ul { margin: 6px 0 0; padding-left: 20px; }
.cho li { margin: 3px 0; }
.cho p { margin: 0; }
.photo-slot { aspect-ratio: 4 / 3; display: grid; place-items: center; text-align: center; }
.photo-slot svg { width: 44px; height: 44px; margin: 0 auto 8px; color: #b8963d; }

/* ---------- Lịch sinh hoạt ---------- */
.sched-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.sched { background: rgba(255,255,255,.05); border: 1px solid rgba(236,220,171,.18); border-radius: var(--radius); padding: 24px; }
.sched .ic { color: var(--gold-soft); width: 34px; height: 34px; margin-bottom: 10px; }
.sched h3 { color: #fff; font-size: 20px; margin-bottom: 6px; }
.sched p { color: #c8d3c7; margin: 0 0 12px; font-size: 15px; }
.sched .pending { display: inline-block; font-size: 13px; color: #2d2408; background: var(--gold-soft); padding: 3px 10px; border-radius: 999px; font-weight: 600; }
@media (max-width: 860px) { .sched-grid { grid-template-columns: 1fr; } }

/* ---------- Thẻ bài viết ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
  display: flex; flex-direction: column; color: var(--ink); transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(21,38,29,.06), 0 16px 32px rgba(21,38,29,.12); color: var(--ink); }
.card .thumb { aspect-ratio: 16 / 9; }
.card .thumb svg { width: 100%; height: 100%; }
.card .body { padding: 18px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.card h3 { font-size: 19px; margin-bottom: 8px; }
.card p { color: var(--ink-2); font-size: 15px; margin: 0 0 14px; flex: 1; }
.card .more { font-weight: 600; font-size: 14px; color: var(--forest-500); }
@media (max-width: 960px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .cards { grid-template-columns: 1fr; } }

/* ---------- Trang con ---------- */
.page-hero { background: var(--forest-800); color: #fff; padding: 56px 0 48px; position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; right: -60px; bottom: -80px; width: 320px; height: 320px; border-radius: 50%; border: 1px solid rgba(236,220,171,.16); box-shadow: 0 0 0 40px rgba(236,220,171,.04), 0 0 0 80px rgba(236,220,171,.03); }
.page-hero h1 { color: #fff; font-size: clamp(30px, 5vw, 44px); margin: 0; }
.page-hero p { color: #c8d3c7; margin: 8px 0 0; max-width: 640px; }
.crumbs { font-size: 14px; color: var(--gold-soft); margin-bottom: 10px; }
.crumbs a { color: var(--gold-soft); }
.crumbs a:hover { color: #fff; }

.prose { font-size: 18px; }
.prose h2 { font-size: 26px; margin: 1.8em 0 .6em; }
.prose h3 { font-size: 20px; margin: 1.4em 0 .4em; color: var(--forest-500); }
.prose p { color: #2c352e; }
.article-thumb { border-radius: var(--radius); overflow: hidden; margin: 0 0 28px; box-shadow: var(--shadow); aspect-ratio: 21 / 9; }
.article-thumb svg { width: 100%; height: 100%; }
.article-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.article-nav a { display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); }
.article-nav a:hover { border-color: var(--gold); }
.article-nav small { display: block; color: var(--ink-3); font-size: 13px; }
.article-nav .next { text-align: right; }
@media (max-width: 620px) { .article-nav { grid-template-columns: 1fr; } .article-nav .next { text-align: left; } }

.stack > * + * { margin-top: 20px; }
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.info-list li:last-child { border-bottom: 0; }
.info-list .ic { flex: none; width: 40px; height: 40px; border-radius: 10px; background: #e8efe6; color: var(--forest-500); display: grid; place-items: center; }
.info-list .ic svg { width: 20px; height: 20px; }
.info-list b { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-3); font-weight: 600; }
.info-list span { font-weight: 600; }
.map { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #dfe6dc; aspect-ratio: 4 / 3; }
.map iframe { width: 100%; height: 100%; border: 0; }
.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }

.tips { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; counter-reset: tip; }
.tip { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px 16px 56px; position: relative; color: var(--ink-2); font-size: 16px; }
.tip::before { counter-increment: tip; content: counter(tip); position: absolute; left: 16px; top: 15px; width: 28px; height: 28px; border-radius: 50%; background: var(--forest-700); color: var(--gold-soft); font-weight: 700; display: grid; place-items: center; font-size: 14px; }
.tip b { color: var(--ink); display: block; }
@media (max-width: 700px) { .tips { grid-template-columns: 1fr; } }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; cursor: zoom-in; }
.gallery figcaption { font-size: 14px; color: var(--ink-3); margin-top: 6px; }
@media (max-width: 860px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .gallery { grid-template-columns: 1fr; } }
.lightbox { position: fixed; inset: 0; background: rgba(8,14,10,.92); display: none; place-items: center; z-index: 100; padding: 16px; }
.lightbox.open { display: grid; }
.lightbox img { max-height: 88vh; border-radius: 8px; }
.lightbox button { position: absolute; top: 14px; right: 16px; background: none; border: 0; color: #fff; font-size: 32px; cursor: pointer; }

/* ---------- Footer ---------- */
.footer { background: var(--forest-900); color: #b9c6b8; padding: 56px 0 24px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer h4 { color: var(--gold-soft); font-family: var(--sans); font-size: 13px; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 12px; }
.footer a { color: #dfe7de; }
.footer a:hover { color: var(--gold-soft); }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin: 6px 0; }
.footer .brand { margin-bottom: 12px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: 36px; padding-top: 18px; font-size: 13px; color: #8c9a8b; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 24px; } }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- Tranh minh hoạ ---------- */
.illus { margin: 0; }
.illus img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.illus figcaption, .gallery figcaption { font-size: 14px; color: var(--ink-3); margin-top: 8px; font-style: italic; }
.hero-note { position: absolute; right: 12px; top: 10px; z-index: 1; font-size: 12px; color: rgba(255,255,255,.75); background: rgba(0,0,0,.35); padding: 2px 8px; border-radius: 6px; }
