/* ============================================================
   Thai Amulet Observer — Front-end Theme
   Color palette: gold-brown + warm white (inspired by Thai temple)
   ============================================================ */
:root {
    --gold:        #B08A4A;
    --gold-dark:   #8A6A2E;
    --gold-light:  #D4AA6A;
    --gold-bg:     #F5EDD8;
    --paper:       #FAF7F2;
    --paper-2:     #F0EAE0;
    --ink:         #3D2E1A;
    --ink-2:       #5A4433;
    --muted:       #8A7A6A;
    --line:        #E0D5C0;
    --line-strong: #C0AA88;
    --max:         1180px;
    /* legacy vars used by article.css */
    --border:      #E0D5C0;
    --bg-panel:    #FAF7F2;
    --shadow-soft: 0 2px 8px rgba(61,46,26,.08);
    --text-soft:   #8A7A6A;
}

* { box-sizing: border-box; }
html, body {
    background: var(--paper);
    color: var(--ink);
    font-family: "Noto Sans TC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--gold-dark); }
.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ── HEADER ── */
.site-header {
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 100;
    box-shadow: 0 2px 8px rgba(61,46,26,.06);
}
.site-header .navbar { padding: 0; }
.site-nav-wrap {
    max-width: var(--max); margin: 0 auto; padding: 0 20px;
    width: 100%; display: flex; align-items: center;
    flex-wrap: nowrap; /* desktop: single row always */
}
/* Brand takes available space; nav sits right beside it */
.site-brand { flex: 0 0 auto; margin-right: auto; }
/* Toggler hidden on desktop, visible on mobile */
.navbar-toggler { flex-shrink: 0; }
/* On mobile: wrap so collapse drops below brand+toggler row */
@media(max-width:991px){
    .site-nav-wrap { flex-wrap: wrap; }
    .site-brand    { flex: 1 1 auto; order: 1; }
    .navbar-toggler{ order: 2; }
    .navbar-collapse{ order: 3; width: 100%; }
    /* prevent Bootstrap collapse animation flash */
    .navbar-collapse:not(.show):not(.collapsing) { display: none !important; }
    .navbar-collapse.show .navbar-nav {
        flex-direction: column;
        padding: 8px 0 12px;
        border-top: 1px solid var(--line);
        margin-left: 0 !important;
    }
    .navbar-collapse.show .nav-link {
        padding: 12px 4px !important;
        border-bottom: none;
        border-left: 3px solid transparent;
    }
    .navbar-collapse.show .nav-link:hover,
    .navbar-collapse.show .nav-link.active {
        border-left-color: var(--gold);
        padding-left: 12px !important;
    }
}
.site-brand {
    display: flex; align-items: center; gap: 10px;
    color: var(--ink) !important; padding: 14px 0; text-decoration: none;
}
.brand-icon {
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
}
.brand-icon img { width: 38px; height: 38px; object-fit: contain; }
.brand-icon-text {
    width: 38px; height: 38px;
    background: var(--gold);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 900; font-size: 20px; border-radius: 50%;
}
.site-brand strong { font-size: 18px; font-weight: 800; color: var(--ink); }
.site-brand small { display: block; font-size: 11px; color: var(--muted); letter-spacing: 1px; }

.navbar-toggler {
    border: 1px solid var(--line-strong) !important;
    padding: 6px 10px !important;
    background: transparent !important;
    border-radius: 4px;
}
.navbar-toggler:focus { box-shadow: none !important; }
.navbar-nav { margin-left: auto; }
.navbar-nav .nav-link {
    color: var(--ink-2) !important;
    font-weight: 600; font-size: 15px;
    padding: 20px 14px !important;
    position: relative;
    border-bottom: 3px solid transparent;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--gold-dark) !important;
    border-bottom-color: var(--gold);
}
.navbar-nav .nav-item-search { display: flex; align-items: center; padding: 0 8px; }
.nav-search-icon {
    background: none; border: none; cursor: pointer;
    color: var(--ink-2); padding: 6px;
    font-size: 18px; line-height: 1;
}
.nav-search-icon:hover { color: var(--gold); }

/* NAV search form (top bar) */
.nav-search-form {
    display: flex; align-items: center; gap: 0;
    border: 1.5px solid var(--line-strong);
    background: var(--paper); height: 36px;
}
.nav-search-input {
    border: 0; outline: 0; padding: 0 10px;
    font-size: 14px; width: 180px; background: transparent; height: 100%;
    color: var(--ink);
}
.nav-search-btn {
    border: 0; background: var(--gold); color: #fff;
    padding: 0 14px; font-weight: 700; font-size: 13px;
    cursor: pointer; height: 100%;
}
.nav-search-btn:hover { background: var(--gold-dark); }

/* ── HERO ── */
.hero-section {
    background: var(--paper);
    padding: 56px 0 48px;
    border-bottom: 1px solid var(--line);
}
.hero-inner {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 48px;
    align-items: center;
}
@media (max-width: 900px) {
    .hero-inner { grid-template-columns: 1fr; }
    .hero-right { display: none; }
}
.hero-left {}
.hero-label {
    display: inline-block;
    font-size: 12px; letter-spacing: 2px; font-weight: 700;
    color: var(--gold); margin-bottom: 16px;
    text-transform: uppercase;
}
.hero-title {
    font-size: clamp(28px, 3.5vw, 44px);
    font-weight: 900; line-height: 1.3;
    color: var(--ink); margin: 0 0 14px;
}
.hero-sub {
    font-size: 16px; color: var(--ink-2);
    line-height: 1.8; margin-bottom: 28px; max-width: 520px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-gold {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--gold); color: #fff;
    padding: 12px 24px; font-weight: 700; font-size: 15px;
    border: 2px solid var(--gold);
    cursor: pointer; transition: background .15s;
    text-decoration: none;
}
.btn-gold:hover { background: var(--gold-dark); border-color: var(--gold-dark); color: #fff; }
.btn-outline-gold {
    display: inline-flex; align-items: center; gap: 8px;
    background: transparent; color: var(--gold-dark);
    padding: 12px 24px; font-weight: 700; font-size: 15px;
    border: 2px solid var(--gold);
    cursor: pointer; transition: background .15s;
    text-decoration: none;
}
.btn-outline-gold:hover { background: var(--gold-bg); color: var(--gold-dark); }

.hero-right { position: relative; border-radius: 4px; overflow: hidden; }
.hero-right img {
    width: 100%; height: 300px; object-fit: cover;
    display: block; border: 1px solid var(--line);
}

/* ── NOTICE BANNER ── */
.notice-banner {
    background: var(--paper-2);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 22px 0;
}
.notice-inner {
    display: flex; align-items: flex-start; gap: 20px;
}
.notice-icon {
    flex-shrink: 0;
    width: 56px; height: 56px;
    border: 2px solid var(--gold);
    display: flex; align-items: center; justify-content: center;
    color: var(--gold); font-size: 24px;
}
.notice-text strong { display: block; font-size: 17px; font-weight: 800; color: var(--ink); margin-bottom: 4px; }
.notice-text p { font-size: 14px; color: var(--ink-2); margin: 0; line-height: 1.65; }

/* ── SECTIONS ── */
.page-section { padding: 48px 0; }
.section-heading {
    display: flex; align-items: flex-end; justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gold);
    margin-bottom: 28px;
}
.section-title {
    font-size: 22px; font-weight: 900; margin: 0;
    color: var(--ink);
}
.link-more { font-size: 13px; font-weight: 700; color: var(--gold-dark); white-space: nowrap; }
.link-more:hover { color: var(--gold); }

/* ── FEATURED CARDS ── */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
@media (max-width: 860px) { .featured-grid { grid-template-columns: 1fr; } }

.featured-card {
    display: grid; grid-template-columns: 120px 1fr;
    gap: 14px; align-items: start;
    padding: 16px;
    border: 1px solid var(--line);
    background: var(--paper);
    transition: box-shadow .15s, border-color .15s;
}
.featured-card:hover {
    border-color: var(--gold);
    box-shadow: 0 4px 16px rgba(176,138,74,.12);
}
.featured-card .f-img {
    width: 120px; aspect-ratio: 1;
    overflow: hidden; flex-shrink: 0;
}
.featured-card .f-img img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.featured-card .f-body { min-width: 0; }
.f-cat {
    font-size: 11px; font-weight: 700; letter-spacing: 1px;
    color: var(--gold); text-transform: uppercase; margin-bottom: 6px;
    display: block;
}
.f-title {
    font-size: 15px; font-weight: 800; line-height: 1.45;
    color: var(--ink); margin: 0 0 8px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.f-title a { color: var(--ink); }
.f-title a:hover { color: var(--gold-dark); }
.f-summary {
    font-size: 13px; color: var(--muted); margin: 0 0 10px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.f-meta { font-size: 12px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; }
.f-meta span { display: flex; align-items: center; gap: 4px; }

/* ── LATEST + SIDEBAR GRID ── */
.home-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: start;
}
@media (max-width: 860px) { .home-bottom-grid { grid-template-columns: 1fr; } }

/* Latest list */
.latest-list { display: flex; flex-direction: column; }
.list-row {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 14px; align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}
.list-row:first-child { padding-top: 0; }
.list-row .row-img {
    width: 100px; aspect-ratio: 4/3;
    overflow: hidden; flex-shrink: 0;
}
.list-row .row-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.list-row-body { min-width: 0; }
.list-row-body .l-title {
    font-size: 15px; font-weight: 700; color: var(--ink);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    margin: 0 0 6px;
}
.list-row-body .l-title a { color: var(--ink); }
.list-row-body .l-title a:hover { color: var(--gold-dark); }
.list-row-meta { font-size: 12px; color: var(--muted); white-space: nowrap; text-align: right; }
.list-row-meta span { display: block; }

.view-all-wrap { text-align: center; padding: 22px 0 0; }
.btn-outline-gold-sm {
    display: inline-block;
    border: 2px solid var(--gold); color: var(--gold-dark);
    padding: 8px 24px; font-weight: 700; font-size: 14px;
    background: transparent; cursor: pointer; text-decoration: none;
}
.btn-outline-gold-sm:hover { background: var(--gold-bg); color: var(--gold-dark); }

/* Sidebar */
.sidebar {}
.sidebar-block { margin-bottom: 32px; }
.sidebar-title {
    font-size: 16px; font-weight: 900; color: var(--ink);
    border-bottom: 2px solid var(--gold);
    padding-bottom: 8px; margin-bottom: 16px;
}
.category-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-chip {
    display: inline-block;
    border: 1.5px solid var(--line-strong); color: var(--ink-2);
    padding: 6px 14px; font-size: 13px; font-weight: 600;
    background: var(--paper); cursor: pointer;
    border-radius: 2px; text-decoration: none;
}
.cat-chip:hover { border-color: var(--gold); color: var(--gold-dark); background: var(--gold-bg); }

/* ── ARTICLE LIST PAGE ── */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}
.article-card {
    background: var(--paper);
    border: 1px solid var(--line);
    transition: box-shadow .15s, border-color .15s;
    display: flex; flex-direction: column;
}
.article-card:hover { border-color: var(--gold); box-shadow: 0 4px 16px rgba(176,138,74,.12); }
.article-card .card-img-wrap {
    /* 固定高度：直圖填滿、橫圖上下留白置中 */
    height: 400px;
    overflow: hidden;
    background: var(--paper-2);
    display: flex;
    align-items: center;
    justify-content: center;
}
.article-card .card-img-wrap img {
    /* 寬度填滿卡片；高度自動，讓直圖撐高、橫圖保持比例上下留白 */
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    object-position: center center;
    display: block;
    transition: transform .3s;
}
.article-card:hover .card-img-wrap img { transform: scale(1.04); }
.article-card-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.article-tag {
    align-self: flex-start;
    font-size: 11px; font-weight: 700; letter-spacing: 1px;
    color: var(--gold); text-transform: uppercase;
}
.card-title { font-size: 16px; font-weight: 800; margin: 0; line-height: 1.45; color: var(--ink); }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--gold-dark); }
.content-muted { color: var(--muted); font-size: 14px; margin: 0; }
.meta-row { display: flex; gap: 14px; color: var(--muted); font-size: 12px; flex-wrap: wrap; }

/* ── SEARCH PAGE ── */
.search-wrap { padding: 40px 0; }
.search-box {
    display: flex; max-width: 720px; margin: 0 auto 32px;
    border: 2px solid var(--line-strong);
}
.search-box input {
    flex: 1; border: 0; outline: 0; padding: 14px 16px; font-size: 16px;
    background: var(--paper); color: var(--ink);
}
.search-box button {
    border: 0; background: var(--gold); color: #fff;
    padding: 0 24px; font-weight: 800; cursor: pointer; font-size: 15px;
}
.search-box button:hover { background: var(--gold-dark); }
.search-summary { color: var(--muted); margin-bottom: 16px; }
.search-summary b { color: var(--gold-dark); }
.search-list { display: flex; flex-direction: column; }
.search-row {
    display: grid; grid-template-columns: 160px 1fr; gap: 20px;
    padding: 18px 0; border-bottom: 1px solid var(--line);
    align-items: start;
}
@media (max-width: 600px) { .search-row { grid-template-columns: 1fr; } }
.search-row .sr-img { width: 160px; aspect-ratio: 16/10; overflow: hidden; background: var(--paper-2); }
.search-row .sr-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── ARTICLE DETAIL ── */
.article-detail { max-width: 760px; margin: 0 auto; padding: 40px 0; }
.article-detail h1 { font-size: 30px; font-weight: 900; line-height: 1.35; color: var(--ink); margin: 12px 0 8px; }
.article-detail .article-meta { color: var(--muted); font-size: 13px; margin-bottom: 24px; display: flex; gap: 16px; flex-wrap: wrap; }
.article-detail .article-main-image { width: 100%; aspect-ratio: 16/9; object-fit: cover; margin-bottom: 24px; display: block; }
.article-detail .article-summary {
    border-left: 4px solid var(--gold);
    padding: 12px 18px; background: var(--gold-bg);
    color: var(--ink-2); margin-bottom: 28px;
    font-size: 15px;
}
.article-detail .article-body { font-size: 17px; line-height: 1.9; }
.article-detail .article-body img { max-width: 100%; height: auto; margin: 16px 0; }
.article-detail .article-body p { margin-bottom: 1em; }
.article-detail .source-block {
    margin-top: 32px; padding: 16px 18px;
    border: 1px solid var(--line); background: var(--paper-2);
    font-size: 14px;
}
.article-detail .source-block b { color: var(--gold-dark); }

/* ── CHIPS ── */
.chip-list { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-chip {
    display: inline-flex; align-items: center; gap: 8px;
    border: 1.5px solid var(--line-strong); padding: 6px 14px;
    font-weight: 700; font-size: 14px; color: var(--ink-2);
    background: var(--paper); text-decoration: none;
}
.tag-chip span { color: var(--gold-dark); font-weight: 900; }
.tag-chip:hover { background: var(--gold-bg); border-color: var(--gold); color: var(--gold-dark); }

/* ── FOOTER ── */
.site-footer {
    background: var(--ink);
    color: #c9b99a;
    padding: 40px 0 24px;
    margin-top: 60px;
    border-top: 4px solid var(--gold);
}
.footer-top {
    max-width: var(--max); margin: 0 auto; padding: 0 20px 28px;
    border-bottom: 1px solid rgba(255,255,255,.1);
    display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 16px;
}
.footer-brand { color: #fff; font-weight: 900; font-size: 18px; margin-bottom: 6px; }
.footer-desc { font-size: 13px; color: #c9b99a; max-width: 320px; }
.footer-bottom {
    max-width: var(--max); margin: 0 auto; padding: 16px 20px 0;
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 12px; font-size: 13px; color: #907a5a;
}
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: #907a5a; font-size: 13px; }
.footer-links a:hover { color: var(--gold-light); }

/* ── MISC ── */
.eyebrow { font-size: 12px; letter-spacing: 2px; color: var(--gold); font-weight: 700; display: block; margin-bottom: 8px; }
.section-description { color: var(--muted); margin-bottom: 24px; }

/* ── ARTICLE DETAIL (new layout) ── */
.detail-breadcrumb { display:flex; gap:8px; align-items:center; font-size:13px; color:var(--muted); padding-bottom:4px; }
.detail-breadcrumb a { color:var(--muted); }
.detail-breadcrumb a:hover { color:var(--gold-dark); }

.detail-layout {
    display:grid;
    grid-template-columns: 1fr 320px;
    gap:40px;
    padding-top:24px;
    padding-bottom:60px;
    align-items:start;
}
@media(max-width:900px){ .detail-layout{ grid-template-columns:1fr; } .detail-sidebar{ display:none; } }

.detail-main {}
.detail-cat-badge {
    display:inline-block;
    background:var(--gold); color:#fff;
    font-size:12px; font-weight:700; letter-spacing:1px;
    padding:4px 12px; margin-bottom:14px;
}
.detail-title { font-size:clamp(24px,3vw,36px); font-weight:900; line-height:1.3; color:var(--ink); margin:0 0 12px; }
.detail-lead { font-size:16px; color:var(--ink-2); margin-bottom:16px; }
.detail-meta { display:flex; flex-wrap:wrap; gap:16px; font-size:13px; color:var(--muted); margin-bottom:20px; }
.detail-meta span { display:flex; align-items:center; gap:4px; }

.detail-hero-img { max-width:100%; max-height:80vh; width:auto; height:auto; display:block; margin:0 auto 20px; border-radius:12px; background:var(--bg-panel,#0b1118); }

.detail-notice {
    background:var(--paper-2); border:1px solid var(--line);
    padding:12px 16px; font-size:13px; color:var(--ink-2);
    display:flex; gap:10px; align-items:flex-start; margin-bottom:24px;
}
.detail-notice-icon { font-size:16px; flex-shrink:0; margin-top:1px; }

.detail-block {
    background:var(--gold-bg);
    border-left:4px solid var(--gold);
    padding:16px 20px; margin-bottom:24px;
}
.detail-block-title { font-size:15px; font-weight:800; color:var(--gold-dark); margin-bottom:10px; }
.detail-bullets { margin:0; padding-left:20px; }
.detail-bullets li { font-size:14px; color:var(--ink-2); margin-bottom:6px; line-height:1.6; }

.detail-body { font-size:17px; line-height:1.9; color:var(--ink); margin-bottom:32px; }
.detail-body p { margin-bottom:1em; }
.detail-body img { max-width:100%; height:auto; margin:16px 0; }
.detail-body h2,.detail-body h3 { font-weight:800; color:var(--ink); margin:1.6em 0 0.6em; }

.detail-source-card {
    border:1px solid var(--line); background:var(--paper-2);
    padding:16px 20px; display:flex; justify-content:space-between; align-items:center;
    gap:16px; flex-wrap:wrap; margin-bottom:28px;
}
.detail-source-left { display:flex; gap:12px; align-items:center; }
.detail-source-globe { font-size:22px; }
.detail-source-site { font-size:11px; font-weight:700; letter-spacing:1px; color:var(--gold); text-transform:uppercase; margin-bottom:2px; }
.detail-source-name { font-size:14px; font-weight:600; color:var(--ink); }

.detail-nav {
    display:grid; grid-template-columns:1fr 1fr; gap:1px;
    border:1px solid var(--line); margin-bottom:36px; background:var(--line);
}
.detail-nav-prev, .detail-nav-next {
    background:var(--paper); padding:16px 20px;
}
.detail-nav-next { text-align:right; }
.detail-nav-label { display:block; font-size:11px; font-weight:700; color:var(--gold); letter-spacing:1px; margin-bottom:4px; }
.detail-nav-prev a, .detail-nav-next a { font-size:14px; font-weight:700; color:var(--ink); }
.detail-nav-prev a:hover, .detail-nav-next a:hover { color:var(--gold-dark); }

.detail-related { margin-bottom:24px; }
.related-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
@media(max-width:700px){ .related-grid{ grid-template-columns:1fr; } }
.related-card { display:grid; grid-template-columns:80px 1fr; gap:10px; border:1px solid var(--line); padding:10px; text-decoration:none; background:var(--paper); transition:border-color .15s; }
.related-card:hover { border-color:var(--gold); }
.related-img { width:80px; aspect-ratio:1; overflow:hidden; }
.related-img img { width:100%; height:100%; object-fit:cover; }
.related-title { font-size:13px; font-weight:700; color:var(--ink); line-height:1.4; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }

/* Sidebar latest */
.sidebar-latest { display:flex; flex-direction:column; gap:12px; }
.sidebar-latest-row { display:grid; grid-template-columns:60px 1fr; gap:10px; text-decoration:none; align-items:center; }
.sl-img { width:60px; aspect-ratio:4/3; overflow:hidden; }
.sl-img img { width:100%; height:100%; object-fit:cover; }
.sl-title { font-size:13px; font-weight:700; color:var(--ink); line-height:1.4; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; margin-bottom:4px; }
.sl-date { font-size:11px; color:var(--muted); }
.sidebar-latest-row:hover .sl-title { color:var(--gold-dark); }
.cat-chip.active { background:var(--gold-bg); border-color:var(--gold); color:var(--gold-dark); }

/* Article gallery thumbnails */
.detail-gallery { padding:16px 20px; }
.gallery-grid {
    display:grid;
    grid-template-columns:repeat(auto-fill, minmax(160px, 1fr));
    gap:10px;
    margin-top:8px;
}
.gallery-item {
    display:block; overflow:hidden; border-radius:6px;
    border:1px solid var(--line); aspect-ratio:4/3;
    background:none; padding:0; cursor:pointer;
    transition:box-shadow .2s, transform .2s;
}
.gallery-item:hover { box-shadow:0 4px 16px rgba(176,138,74,.35); transform:scale(1.02); }
.gallery-item img { width:100%; height:100%; object-fit:contain; background:var(--paper-2,#0f1720); pointer-events:none; }
@media(max-width:600px){ .gallery-grid{ grid-template-columns:repeat(2,1fr); } }

/* Lightbox overlay */
.glb-overlay {
    display:none; position:fixed; inset:0; z-index:9000;
    background:rgba(0,0,0,.88);
    align-items:center; justify-content:center;
    flex-direction:row;
}
.glb-overlay.active { display:flex; }
.glb-content {
    display:flex; flex-direction:column; align-items:center;
    max-width:calc(100vw - 120px); max-height:100vh;
}
.glb-content img {
    max-width:100%; max-height:calc(100vh - 64px);
    object-fit:contain; border-radius:4px;
    display:block; user-select:none;
}
.glb-counter {
    color:#ccc; font-size:13px; margin-top:10px; letter-spacing:.05em;
}
.glb-nav {
    background:none; border:none; color:#fff; font-size:32px;
    padding:16px 18px; cursor:pointer; opacity:.7; line-height:1;
    transition:opacity .15s; user-select:none; flex-shrink:0;
    -webkit-tap-highlight-color:transparent;
}
.glb-nav:hover { opacity:1; }
.glb-close {
    position:absolute; top:16px; right:20px;
    background:none; border:none; color:#fff; font-size:22px;
    cursor:pointer; opacity:.7; padding:8px; line-height:1;
    transition:opacity .15s; z-index:1;
}
.glb-close:hover { opacity:1; }
@media(max-width:600px){
    .glb-content { max-width:calc(100vw - 80px); }
    .glb-nav { font-size:24px; padding:12px 10px; }
    .glb-content img { max-height:calc(100vh - 80px); }
}

/* ── Buddha SVG Hero Animation ── */
.buddha-anim {
    display:flex; align-items:center; justify-content:center;
    width:100%; height:100%; min-height:320px;
}
.buddha-svg {
    width:min(420px, 90vw); height:auto;
    animation: buddhaHue 8s linear infinite;
    filter: drop-shadow(0 0 24px rgba(176,138,74,0.55));
}
@keyframes buddhaHue {
    0%   { filter: drop-shadow(0 0 24px rgba(176,138,74,0.55)) hue-rotate(0deg); }
    25%  { filter: drop-shadow(0 0 32px rgba(200,160,60,0.7))  hue-rotate(20deg); }
    50%  { filter: drop-shadow(0 0 28px rgba(220,180,80,0.65)) hue-rotate(0deg); }
    75%  { filter: drop-shadow(0 0 32px rgba(180,120,40,0.7))  hue-rotate(-20deg); }
    100% { filter: drop-shadow(0 0 24px rgba(176,138,74,0.55)) hue-rotate(0deg); }
}
.buddha-svg .ring {
    stroke: #B08A4A; opacity:0.35;
    animation: ringPulse 4s ease-in-out infinite;
}
.buddha-svg .r3 { animation-delay:0s; }
.buddha-svg .r4 { animation-delay:.5s; }
.buddha-svg .r5 { animation-delay:1s; }
.buddha-svg .r6 { animation-delay:1.5s; }
@keyframes ringPulse {
    0%,100% { opacity:.2; stroke-width:1.5; }
    50%      { opacity:.6; stroke-width:2.5; }
}
.buddha-svg .petals ellipse {
    fill: #B08A4A; opacity:0.22;
    animation: petalGlow 6s ease-in-out infinite;
}
.buddha-svg .inner-petals ellipse {
    fill: #D4A855; opacity:0.3;
    animation: petalGlow 6s ease-in-out infinite reverse;
}
@keyframes petalGlow {
    0%,100% { opacity:.18; }
    50%      { opacity:.42; }
}
.buddha-svg .centre-disc {
    fill: rgba(176,138,74,0.12);
    animation: centreBreath 5s ease-in-out infinite;
}
@keyframes centreBreath {
    0%,100% { fill: rgba(176,138,74,0.10); }
    50%      { fill: rgba(212,168,85,0.22); }
}
.buddha-svg .buddha       { fill: #8B6A28; }
.buddha-svg .buddha-hands { fill: #C9A84C; opacity:.85; }
.buddha-svg .halo {
    stroke: #D4A855; opacity:.55;
    animation: haloFlicker 3s ease-in-out infinite;
}
@keyframes haloFlicker {
    0%,100% { opacity:.4; }
    50%      { opacity:.85; }
}

/* ── PAGINATION ── */
.pagination-nav {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.pagination-list {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}
.pagination-list li { display: flex; }
.page-link {
    display: inline-block;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-2);
    background: var(--paper);
    border: 1.5px solid var(--line);
    border-radius: 2px;
    text-decoration: none;
    transition: border-color .15s, color .15s, background .15s;
}
.page-link:hover { border-color: var(--gold); color: var(--gold-dark); background: var(--gold-bg); }
.page-link.active {
    background: var(--gold);
    border-color: var(--gold);
    color: #1a1410;
    font-weight: 700;
    pointer-events: none;
}
.page-ellipsis {
    padding: 6px 6px;
    font-size: 13px;
    color: var(--ink-3);
    line-height: 1.8;
}
.pagination-info {
    font-size: 12px;
    color: var(--ink-3);
    margin: 0;
}
