/* ==========================================
   วัดไทยโภคัลพุทธวิหาร - Main Stylesheet
   สีหลัก: ทอง (#C9922A), แดงเข้ม (#8B1A1A), ขาวครีม (#FDF8EE)
   ========================================== */

:root {
  --gold:        #C9922A;
  --gold-light:  #E8B84B;
  --gold-pale:   #FFF3D0;
  --red-deep:    #8B1A1A;
  --red-mid:     #A52020;
  --cream:       #FDF8EE;
  --cream-dark:  #F5EDD8;
  --brown:       #5C3A1E;
  --text-dark:   #2C1A0E;
  --text-mid:    #5A3E28;
  --sidebar-bg:  #1A0A00;
  --sidebar-w:   240px;
}

* { box-sizing: border-box; }

body {
  font-family: 'Sarabun', sans-serif;
  background: var(--cream);
  color: var(--text-dark);
  font-size: 16px;
  line-height: 1.7;
}

h1, h2, h3, .brand-th {
  font-family: 'Noto Serif Thai', serif;
}

/* ---- Utilities ---- */
.text-gold  { color: var(--gold) !important; }
.bg-gold    { background: var(--gold) !important; }
.btn-gold   { background: var(--gold); color: #fff; border: none; }
.btn-gold:hover { background: var(--gold-light); color: #fff; }
.btn-red    { background: var(--red-deep); color: #fff; border: none; }
.btn-red:hover { background: var(--red-mid); color: #fff; }

/* ---- TOP NAVBAR ---- */
.top-navbar {
  background: linear-gradient(135deg, var(--red-deep) 0%, #6B1010 50%, var(--red-deep) 100%);
  border-bottom: 3px solid var(--gold);
  padding: 0.5rem 0;
  position: sticky;
  top: 0;
  z-index: 1030;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.top-navbar .navbar-brand { text-decoration: none; }
.brand-th { font-size: 1.05rem; font-weight: 700; color: var(--gold-light); line-height: 1.2; }
.brand-en { font-size: 0.7rem; color: rgba(255,255,255,0.7); letter-spacing: 1px; }
.top-navbar .nav-link {
  color: rgba(255,255,255,0.85) !important;
  font-weight: 600;
  padding: 0.5rem 1rem !important;
  border-radius: 4px;
  transition: all 0.2s;
}
.top-navbar .nav-link:hover,
.top-navbar .nav-link.active {
  color: var(--gold-light) !important;
  background: rgba(255,255,255,0.08);
}

/* ---- LAYOUT ---- */
.site-wrapper { min-height: calc(100vh - 64px); }

/* ---- SIDEBAR ---- */
.sidebar {
  background: var(--sidebar-bg);
  min-height: calc(100vh - 64px);
  position: sticky;
  top: 64px;
  align-self: flex-start;
  height: calc(100vh - 64px);
  overflow-y: auto;
}
.sidebar-inner { padding-bottom: 2rem; }
.sidebar-logo .sidebar-title {
  color: var(--gold);
  font-family: 'Noto Serif Thai', serif;
  font-size: 0.8rem;
  letter-spacing: 2px;
}
.sidebar-menu li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.92rem;
  border-left: 3px solid transparent;
  transition: all 0.2s;
}
.sidebar-menu li a:hover,
.sidebar-menu li a.active {
  color: var(--gold-light);
  background: rgba(201,146,42,0.12);
  border-left-color: var(--gold);
}
.sidebar-menu li a i { width: 18px; text-align: center; color: var(--gold); }
.sidebar-info { color: rgba(255,255,255,0.5); font-size: 0.78rem; }
.sidebar-info .info-block { display: flex; gap: 8px; align-items: flex-start; }
.sidebar-info i { margin-top: 3px; flex-shrink: 0; }

/* ---- MAIN CONTENT ---- */
.main-content { padding: 0; background: var(--cream); }

/* ---- PAGE HERO ---- */
.page-hero {
  background: linear-gradient(135deg, var(--red-deep), #5C0F0F);
  color: #fff;
  padding: 2.5rem 2rem;
  border-bottom: 3px solid var(--gold);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '☸';
  position: absolute;
  right: -20px;
  top: -20px;
  font-size: 8rem;
  color: rgba(255,255,255,0.04);
}
.page-hero h1 {
  color: var(--gold-light);
  font-size: 1.8rem;
  margin-bottom: 0.25rem;
}
.page-hero p { color: rgba(255,255,255,0.7); margin: 0; }

/* ---- CARDS ---- */
.content-section { padding: 2rem; }

.temple-card {
  background: #fff;
  border: 1px solid #E8D9B8;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  height: 100%;
}
.temple-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(139,26,26,0.12); }
.temple-card .card-header-bar {
  background: linear-gradient(90deg, var(--red-deep), var(--red-mid));
  color: var(--gold-light);
  padding: 0.6rem 1rem;
  font-family: 'Noto Serif Thai', serif;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.temple-card .card-body { padding: 1.25rem; }

/* ---- SECTION TITLE ---- */
.section-title {
  font-family: 'Noto Serif Thai', serif;
  color: var(--red-deep);
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gold);
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title i { color: var(--gold); }

/* ---- HERO BANNER (HOME) ---- */
.hero-banner {
  background: linear-gradient(135deg, #2C0505 0%, var(--red-deep) 40%, #6B1010 70%, #2C0505 100%);
  min-height: 320px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  border-bottom: 4px solid var(--gold);
}
.hero-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 60% 50%, rgba(201,146,42,0.12) 0%, transparent 70%);
}
.hero-banner .dharma-deco {
  position: absolute;
  right: 5%;
  font-size: 12rem;
  color: rgba(201,146,42,0.06);
  line-height: 1;
}
.hero-banner .hero-content { position: relative; z-index: 2; padding: 3rem 2rem; }
.hero-banner h1 {
  font-family: 'Noto Serif Thai', serif;
  color: var(--gold-light);
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.hero-banner h2 {
  color: rgba(255,255,255,0.7);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 2px;
}
.hero-banner .hero-quote {
  color: var(--gold-pale);
  font-style: italic;
  font-size: 0.95rem;
  border-left: 3px solid var(--gold);
  padding-left: 1rem;
  margin-top: 1rem;
}

/* ---- GALLERY GRID ---- */
.gallery-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.2s, filter 0.2s;
  border: 2px solid #E8D9B8;
}
.gallery-img:hover { transform: scale(1.03); filter: brightness(1.08); }

/* ---- FORM STYLES ---- */
.form-section { background: #fff; border-radius: 8px; border: 1px solid #E8D9B8; padding: 2rem; }
.form-label { font-weight: 600; color: var(--text-mid); }
.form-control:focus, .form-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 0.2rem rgba(201,146,42,0.25);
}
.required-star { color: var(--red-deep); }

.form-c-header {
  background: linear-gradient(90deg, var(--red-deep), var(--red-mid));
  color: #fff;
  padding: 1rem 1.5rem;
  border-radius: 8px 8px 0 0;
  margin: -2rem -2rem 2rem;
}
.form-c-header h4 { color: var(--gold-light); margin: 0; font-family: 'Noto Serif Thai', serif; }

/* ---- NEWS LIST ---- */
.news-item {
  border-left: 4px solid var(--gold);
  padding: 1rem 1.25rem;
  background: #fff;
  border-radius: 0 6px 6px 0;
  margin-bottom: 1rem;
  transition: background 0.2s;
}
.news-item:hover { background: var(--gold-pale); }
.news-item .news-title { font-weight: 700; color: var(--red-deep); font-family: 'Noto Serif Thai', serif; }
.news-item .news-date { font-size: 0.8rem; color: #999; }
.news-item a { text-decoration: none; }

/* ---- CONTACT ---- */
.contact-info-box {
  background: linear-gradient(135deg, var(--red-deep), #6B1010);
  color: #fff;
  border-radius: 8px;
  padding: 1.5rem;
}
.contact-info-box h5 { color: var(--gold-light); font-family: 'Noto Serif Thai', serif; }
.contact-info-box .contact-row { display: flex; gap: 10px; margin-bottom: 0.75rem; align-items: flex-start; }
.contact-info-box i { color: var(--gold); margin-top: 3px; flex-shrink: 0; }
.contact-info-box a { color: rgba(255,255,255,0.8); text-decoration: none; }
.contact-info-box a:hover { color: var(--gold-light); }

/* ---- MAP ---- */
.map-container { border: 3px solid var(--gold); border-radius: 8px; overflow: hidden; }

/* ---- BADGES ---- */
.badge-gold { background: var(--gold); color: #fff; }
.badge-red  { background: var(--red-deep); color: #fff; }

/* ---- DHAMMA QUOTE ---- */
.dhamma-box {
  background: var(--gold-pale);
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  text-align: center;
  font-family: 'Noto Serif Thai', serif;
  color: var(--red-deep);
  font-size: 1.05rem;
}
.dhamma-box .dhamma-source { font-size: 0.8rem; color: var(--text-mid); margin-top: 0.5rem; }

/* ---- FOOTER ---- */
.site-footer {
  background: var(--sidebar-bg);
  color: rgba(255,255,255,0.7);
  padding: 3rem 0 1.5rem;
  border-top: 3px solid var(--gold);
}
.footer-heading { color: var(--gold-light); font-family: 'Noto Serif Thai', serif; margin-bottom: 1rem; }
.footer-text { font-size: 0.88rem; line-height: 1.8; }
.footer-links li { margin-bottom: 0.35rem; }
.footer-links a { color: rgba(255,255,255,0.6); text-decoration: none; font-size: 0.88rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--gold-light); }
.footer-divider { border-color: rgba(201,146,42,0.3); margin: 1.5rem 0 1rem; }
.footer-copy { color: rgba(255,255,255,0.4); }

/* ---- RESPONSIVE ---- */
@media (max-width: 767px) {
  .sidebar { position: relative; height: auto; top: 0; min-height: unset; }
  .sidebar-menu li a { padding: 10px 16px; }
  .hero-banner .dharma-deco { font-size: 6rem; }
  .content-section { padding: 1.25rem; }
  .page-hero { padding: 1.5rem 1.25rem; }
}
