/* ===== Google Fonts ===== */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Sarabun:wght@300;400;500;600&display=swap');

/* ===== Design Tokens ===== */
:root {
  --glass-bg:       rgba(20, 16, 10, 0.52);
  --glass-bg-heavy: rgba(15, 12, 8, 0.65);
  --glass-border:   rgba(255, 245, 220, 0.18);
  --glass-shadow:   0 8px 32px rgba(0, 0, 0, 0.30);
  --glass-blur:     blur(20px);
  --glass-blur-sm:  blur(12px);

  --accent:    #D4AA6E;
  --accent2:   #B89060;
  --gold:      #C8964A;
  --gold-dim:  #8B6A45;
  --text:      #F0E8D0;
  --muted:     rgba(240, 232, 208, 0.75);
  --radius:    14px;
  --radius-sm: 8px;
  --max-w:     760px;
}

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

body {
  font-family: 'Sarabun', 'Noto Sans Thai', sans-serif;
  font-weight: 400;
  color: var(--text);
  background-color: #1c1610;
  background-image:
    url("./assets/monks-hike-in-deep-forest-buddha-religion-concept-2026-03-10-03-56-39-utc.jpg");
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: center center;
  min-height: 100vh;
}

/* Minimal overlay — just enough contrast, no colour cast */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.30) 0%, rgba(0,0,0,0.42) 100%);
  pointer-events: none;
  z-index: 0;
}

body > * { position: relative; z-index: 1; }

img { max-width: 100%; height: auto; }

/* ===== Glass Mixin ===== */
.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
}

/* ===== Container ===== */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 16px;
}

/* ===== Card (glass) ===== */
.card {
  background: var(--glass-bg-heavy);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
  overflow: hidden;
}

/* ===== Header ===== */
header {
  padding: 20px 0 0;
}

header .container {
  text-align: center;
  padding-left: 0;
  padding-right: 0;
}

header a img {
  max-width: 100%;
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 4px 20px rgba(0,0,0,0.6));
  transition: filter 0.3s ease;
}

header a img:hover {
  filter: drop-shadow(0 4px 30px rgba(212, 160, 58, 0.5));
}

/* Hero spacer — lets the monks background show through */
.hero-spacer {
  height: 50vh;
  min-height: 200px;
  max-height: 380px;
}

/* ===== Navigation ===== */
.main-nav {
  padding: 20px 0 12px;
}

.main-nav-heading {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 14px;
  text-align: center;
  text-shadow: 0 1px 6px rgba(0,0,0,0.8), 0 0 20px rgba(200,160,80,0.3);
}

.nav-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 7px 18px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-family: 'Sarabun', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: var(--glass-blur-sm);
  -webkit-backdrop-filter: var(--glass-blur-sm);
  transition: all 0.25s ease;
  white-space: nowrap;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.15);
}

.btn:hover {
  background: rgba(240, 192, 96, 0.22);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 4px 20px rgba(240, 192, 96, 0.25), inset 0 1px 0 rgba(255,255,255,0.2);
  transform: translateY(-1px);
}

/* ===== Radio section ===== */
.radio-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 20px 0;
  position: relative;
  overflow: hidden;
}

.radio-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,245,220,0.05) 0%, transparent 60%);
  pointer-events: none;
}

.radio-left {
  padding: 22px 24px;
  line-height: 2;
  font-size: 0.93rem;
  color: var(--text);
  border-right: 1px solid var(--glass-border);
}

.radio-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 22px 24px;
}

.radio-right audio {
  width: 100%;
  max-width: 280px;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
  border-radius: 8px;
}

/* ===== Video sections ===== */
.video-section {
  margin: 24px 0;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.video-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur-sm);
  -webkit-backdrop-filter: var(--glass-blur-sm);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.45);
}

.video-card iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
  display: block;
}

.video-card .caption {
  padding: 10px 14px;
  font-size: 0.82rem;
  text-align: center;
  color: var(--muted);
  background: rgba(0,0,0,0.15);
  border-top: 1px solid var(--glass-border);
}

/* ===== Temple / secondary nav ===== */
.temple-nav-section {
  margin: 24px 0;
  text-align: center;
  padding: 20px 24px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur-sm);
  -webkit-backdrop-filter: var(--glass-blur-sm);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
}

.temple-nav-heading {
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 14px;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 6px rgba(0,0,0,0.9), 0 0 16px rgba(200,160,80,0.3);
}

.temple-nav-sub {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  margin: 18px 0 12px;
}

.pill-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.pill-nav a {
  display: inline-block;
  padding: 7px 20px;
  border: 1px solid rgba(200, 170, 110, 0.40);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  background: rgba(200, 170, 110, 0.08);
  backdrop-filter: var(--glass-blur-sm);
  -webkit-backdrop-filter: var(--glass-blur-sm);
  transition: all 0.25s ease;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,245,220,0.10);
}

.pill-nav a:hover,
.pill-nav a.active {
  background: rgba(200, 170, 110, 0.22);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 4px 16px rgba(180, 140, 80, 0.25);
  transform: translateY(-1px);
}

/* ===== Biography section ===== */
.bio-section {
  display: grid;
  grid-template-columns: 380px 1fr;
  grid-template-rows: auto auto;
  grid-template-areas:
    "image text"
    "image video";
  gap: 0;
  margin: 24px 0;
  position: relative;
  overflow: hidden;
}

.bio-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(240,192,96,0.05) 0%, transparent 50%);
  pointer-events: none;
}

.bio-image {
  grid-area: image;
  position: relative;
}

.bio-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, transparent 75%, rgba(0,0,0,0.3));
  pointer-events: none;
}

.bio-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bio-text {
  grid-area: text;
  padding: 28px 24px 16px;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(10, 8, 5, 0.30);
}

.bio-text h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.35rem;
  color: var(--accent);
  margin-bottom: 16px;
  text-shadow: 0 0 24px rgba(240, 192, 96, 0.4);
  letter-spacing: 0.04em;
}

.bio-text p {
  line-height: 2;
  font-size: 0.9rem;
  color: var(--text);
}

.bio-teacher-video {
  grid-area: video;
  padding: 16px 24px 24px;
}

.bio-teacher-video iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
  border-radius: var(--radius-sm);
  display: block;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

/* ===== Forum banner feeds ===== */
.forum-feeds {
  margin: 24px 0;
}

.feed-entry {
  margin-bottom: 20px;
}

.feed-banner {
  display: block;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
}

.feed-banner img {
  width: 100%;
  display: block;
  transition: filter 0.3s ease;
}

.feed-banner img:hover {
  filter: brightness(1.08);
}

/* Standalone banners (not above an iframe card) */
.forum-feeds > a.feed-banner {
  border-radius: var(--radius);
  margin-bottom: 20px;
  box-shadow: var(--glass-shadow);
}

.feed-iframe-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur-sm);
  -webkit-backdrop-filter: var(--glass-blur-sm);
  border: 1px solid var(--glass-border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
  box-shadow: var(--glass-shadow);
}

/* ↓ CHANGED: 200px → 280px to show more posts */
.feed-iframe-card iframe {
  width: 100%;
  height: 280px;
  border: none;
  display: block;
}

.feed-iframe-card.tall iframe {
  height: 700px;
}

.standalone-feed {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur-sm);
  -webkit-backdrop-filter: var(--glass-blur-sm);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--glass-shadow);
  margin-bottom: 20px;
}

.standalone-feed iframe {
  width: 100%;
  height: 200px;
  border: none;
  display: block;
}

/* ===== Board showcase ===== */
.boards-showcase {
  margin: 20px 0;
}

.board-block {
  display: grid;
  grid-template-columns: 100px 1fr;
  margin-bottom: 16px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--glass-shadow);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur-sm);
  -webkit-backdrop-filter: var(--glass-blur-sm);
  border: 1px solid var(--glass-border);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.board-block:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(0,0,0,0.45);
}

.board-logo {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 10px 8px;
  background: rgba(0, 0, 0, 0.18);
  border-right: 1px solid var(--glass-border);
}

.board-logo img {
  width: 84px;
  height: auto;
}

.board-iframe {
  overflow: hidden;
}

/* ↓ CHANGED: 200px → 260px to show more posts */
.board-iframe iframe {
  width: 100%;
  height: 260px;
  border: none;
  display: block;
}

/* ===== Facebook section ===== */
.facebook-section {
  margin: 20px 0;
  display: flex;
  gap: 16px;
  align-items: stretch;
}

.facebook-banners,
.facebook-likebox {
  flex: 1 1 0%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.facebook-likebox > div {
  min-width: 0;
  width: 100%;
}

.facebook-likebox iframe,
.fb-likebox-iframe {
  display: block;
  width: 100%;
  max-width: 500px;
  height: 543px;
  margin: 0 auto;
  border: none;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 245, 220, 0.45);
  box-shadow: 0 8px 32px rgba(0,0,0,0.55);
  overflow: hidden;
}

@media (max-width: 1024px) {
  .facebook-section {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .facebook-likebox,
  .facebook-banners {
    width: 100%;
    max-width: 100%;
  }

  /* Move background image into the fixed pseudo-element so it's locked to viewport */
  body {
    background-image: none;
  }

  body::before {
    background:
      linear-gradient(180deg, rgba(0,0,0,0.30) 0%, rgba(0,0,0,0.42) 100%),
      url("./assets/monks-hike-in-deep-forest-buddha-religion-concept-2026-03-10-03-56-39-utc.jpg") top center / cover no-repeat;
    background-color: #1c1610;
  }
}


/* ===== Footer ===== */
footer {
  margin-top: 40px;
  padding: 28px 16px 40px;
  text-align: center;
  font-size: 0.88rem;
  background: rgba(10, 8, 5, 0.35);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid rgba(200, 170, 110, 0.30);
}

.footer-image {
  margin-bottom: 16px;
}

.footer-image img {
  border: 1px solid var(--glass-border);
  max-width: 100%;
  /* inset by the container horizontal padding (px-4 = 16px) so it lines up with cards */
  width: 100%;
  height: auto;
  display: block;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
}

footer p {
  margin: 6px 0;
  color: var(--muted);
}

footer a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

footer a:hover {
  color: #fff;
  text-decoration: underline;
}

/* ===== Scrollbar ===== */
/* Firefox */
* { scrollbar-width: thin; scrollbar-color: rgba(212,170,80,0.45) rgba(0,0,0,0.18); }
/* Webkit (Chrome, Safari, Edge) */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.22);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(220,175,85,0.55) 0%, rgba(180,138,55,0.35) 100%);
  border-radius: 999px;
  border: 1.5px solid rgba(0,0,0,0.18);
  transition: background 0.25s;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(232,190,100,0.85) 0%, rgba(200,158,70,0.65) 100%);
}
::-webkit-scrollbar-corner { background: transparent; }

/* ===== Responsive — 900px ===== */
@media (max-width: 900px) {
  .bio-section {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    grid-template-areas:
      "image"
      "text"
      "video";
  }

  .bio-image img {
    max-width: 100%;
    max-height: 340px;
    object-position: top;
  }

  .bio-image::after {
    background: linear-gradient(to bottom, transparent 70%, rgba(0,0,0,0.4));
  }
}

/* ===== Responsive — 640px ===== */
@media (max-width: 640px) {
  .radio-card {
    grid-template-columns: 1fr;
  }

  .radio-left {
    border-right: none;
    border-bottom: 1px solid var(--glass-border);
  }

  .video-grid {
    grid-template-columns: 1fr;
  }

  .board-block {
    grid-template-columns: 76px 1fr;
  }

  .board-logo img {
    width: 60px;
  }

  .main-nav-heading {
    font-size: 0.78rem;
  }


}
/* avatar hiding is handled by Tailwind classes in markup */

/* ===== Entrance animations ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

header,
.main-nav,
.radio-card,
.video-section,
.temple-nav-section,
.bio-section,
.forum-feeds,
.boards-showcase,
.facebook-section {
  animation: fadeUp 0.6s ease both;
}

.video-section  { animation-delay: 0.1s; }
.radio-card     { animation-delay: 0.05s; }
.bio-section    { animation-delay: 0.15s; }
.forum-feeds    { animation-delay: 0.2s; }
.boards-showcase{ animation-delay: 0.25s; }