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

/* Main CSS for Wat Thai Buddhagaya Website */
:root {
  --primary-color: #801818;      /* Deep Crimson */
  --primary-dark: #500a0a;       /* Darker Crimson */
  --secondary-color: #d4af37;     /* Metallic Gold */
  --secondary-light: #f4d068;    /* Saffron Gold */
  --bg-cream: #fffdf5;           /* Warm Buddhist Cream */
  --bg-white: #ffffff;
  --text-dark: #2a201c;          /* Charcoal Brown */
  --text-light: #ffffff;
  --text-muted: #7d6b63;
  --border-color: #e6dbca;
  --shadow-sm: 0 2px 8px rgba(128, 24, 24, 0.05);
  --shadow-md: 0 8px 20px rgba(128, 24, 24, 0.1);
  --shadow-lg: 0 15px 30px rgba(128, 24, 24, 0.15);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --border-radius: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Sarabun', sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-cream);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Maitree', serif;
  font-weight: 700;
  color: var(--primary-color);
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: var(--transition);
}

a:hover {
  color: var(--secondary-color);
}

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

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header & Navigation */
header {
  background-color: var(--primary-color);
  border-bottom: 3px solid var(--secondary-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.top-bar {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-bar-container {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.top-bar-info {
  display: flex;
  gap: 20px;
  color: var(--secondary-light);
  font-size: 0.9rem;
}

.top-bar-info span i {
  margin-right: 5px;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 0;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 15px;
  color: inherit;
  width: 100%;
}

.logo-link:hover {
  color: inherit;
}

.logo-section img {
  height: 65px;
  width: 65px;
  border-radius: 50%;
  border: 2px solid var(--secondary-color);
  object-fit: cover;
  background-color: white;
}

.logo-text h1 {
  color: var(--secondary-color);
  font-size: 1.8rem;
  line-height: 1.2;
}

.logo-text p {
  color: var(--text-light);
  font-size: 0.9rem;
  letter-spacing: 1px;
}

.nav-bar {
  background-color: var(--primary-dark);
  padding: 10px 0;
}

.nav-container {
  display: flex;
  align-items: center;
  width: 100%;
}

.menu-toggle {
  display: none;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 25px;
}

.nav-menu li a {
  color: var(--text-light);
  font-weight: 500;
  font-size: 1.05rem;
  padding: 8px 12px;
  border-radius: 4px;
}

.nav-menu li a:hover,
.nav-menu li.active a {
  background-color: var(--primary-color);
  color: var(--secondary-color);
}

/* Hero Section */
.hero-section {
  position: relative;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  padding: 80px 0;
  text-align: center;
  color: var(--text-light);
  overflow: hidden;
  border-bottom: 4px solid var(--secondary-color);
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(circle, rgba(212, 175, 55, 0.15) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.6;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}

.hero-content h2 {
  color: var(--secondary-color);
  font-size: 2.8rem;
  margin-bottom: 15px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.hero-content p {
  font-size: 1.2rem;
  font-weight: 300;
  color: #ffecd1;
  margin-bottom: 25px;
}

.hero-divider {
  height: 2px;
  width: 150px;
  background: linear-gradient(to right, transparent, var(--secondary-color), transparent);
  margin: 20px auto;
}

/* Main Content Grid */
.main-wrapper {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 30px;
  padding: 40px 0;
}

/* Sidebar Left (Navigation) */
.left-sidebar {
  background: var(--bg-white);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  padding: 20px;
  height: fit-content;
  box-shadow: var(--shadow-sm);
}

.sidebar-title {
  font-size: 1.15rem;
  padding-bottom: 10px;
  margin-bottom: 15px;
  border-bottom: 2px solid var(--secondary-color);
}

.category-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.category-list a {
  display: block;
  padding: 10px 15px;
  background-color: var(--bg-cream);
  border-left: 3px solid transparent;
  color: var(--text-dark);
  font-weight: 500;
  border-radius: 4px;
}

.category-list a:hover,
.category-list li.active a {
  background-color: #f7ecd4;
  border-left-color: var(--primary-color);
  color: var(--primary-color);
  padding-left: 20px;
}

/* Main Area */
.content-area {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* Merit Grid */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 10px;
  margin-bottom: 25px;
}

.section-header h3 {
  font-size: 1.8rem;
  position: relative;
}

.section-header h3::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 0;
  width: 80px;
  height: 2px;
  background-color: var(--primary-color);
}

.merit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
}

.merit-card {
  background-color: var(--bg-white);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}

.merit-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.merit-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--secondary-color);
}

.merit-card-img {
  height: 180px;
  overflow: hidden;
  background-color: #eae5db;
  position: relative;
}

.merit-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.merit-card:hover .merit-card-img img {
  transform: scale(1.08);
}

.merit-tag {
  position: absolute;
  top: 15px;
  left: 15px;
  background-color: var(--secondary-color);
  color: var(--primary-dark);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.merit-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.merit-card-body h4 {
  font-size: 1.15rem;
  margin-bottom: 10px;
  line-height: 1.4;
  color: var(--primary-color);
}

.merit-card-body p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
  flex-grow: 1;
}

.merit-card-btn {
  display: inline-block;
  text-align: center;
  background-color: var(--primary-color);
  color: var(--text-light);
  padding: 10px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid var(--primary-color);
}

.merit-card:hover .merit-card-btn {
  background-color: var(--secondary-color);
  color: var(--primary-dark);
  border-color: var(--secondary-color);
}

/* Sidebar Right (Donation Widgets) */
.right-wrapper {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 30px;
  padding: 40px 0;
}

.widget-box {
  background-color: var(--bg-white);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  padding: 20px;
  margin-bottom: 25px;
  box-shadow: var(--shadow-sm);
}

.widget-box h4 {
  font-size: 1.2rem;
  padding-bottom: 8px;
  margin-bottom: 15px;
  border-bottom: 2px solid var(--secondary-color);
}

.bank-info {
  text-align: center;
  padding: 10px 0;
}

.bank-logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: #0072c6;
  margin-bottom: 10px;
}

.bank-acc-no {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  background-color: var(--bg-cream);
  padding: 8px;
  border-radius: 6px;
  margin: 10px 0;
  letter-spacing: 1px;
}

.bank-acc-name {
  font-weight: 600;
  color: var(--text-dark);
  font-size: 1.05rem;
}

.qr-code {
  width: 180px;
  height: 180px;
  margin: 15px auto;
  border: 1px solid var(--border-color);
  padding: 8px;
  background-color: white;
}

.qr-code img {
  width: 100%;
  /*height: 100%;*/
}

.recent-donors-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.donor-item {
  display: flex;
  flex-direction: column;
  padding: 10px;
  background-color: var(--bg-cream);
  border-radius: 6px;
  border-left: 3px solid var(--secondary-color);
  font-size: 0.85rem;
}

.donor-name {
  font-weight: 600;
  color: var(--primary-color);
}

.donor-amount {
  font-weight: 700;
  color: #2e7d32;
  margin: 2px 0;
}

.donor-boon {
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Detail & Merit Submission Page */
.detail-container {
  background-color: var(--bg-white);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  padding: 30px;
  box-shadow: var(--shadow-sm);
}

.boon-title {
  font-size: 2.2rem;
  margin-bottom: 15px;
}

.boon-meta {
  display: flex;
  gap: 15px;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 25px;
}

.boon-image-gallery {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 15px;
  margin-bottom: 30px;
}

.main-boon-img {
  height: 400px;
  border-radius: 8px;
  overflow: hidden;
  background-color: #f0f0f0;
}

.main-boon-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-boon-imgs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 400px;
  overflow-y: auto;
}

.thumb-boon-img {
  height: 92px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  background-color: #f0f0f0;
}

.thumb-boon-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-boon-img.active,
.thumb-boon-img:hover {
  border-color: var(--secondary-color);
}

.boon-description {
  font-size: 1.05rem;
  color: var(--text-dark);
  margin-bottom: 40px;
}

.boon-description p {
  margin-bottom: 15px;
}

/* Form Styling */
.form-section-title {
  font-size: 1.5rem;
  border-bottom: 2px solid var(--secondary-color);
  padding-bottom: 8px;
  margin-bottom: 25px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group.full-width {
  grid-column: span 2;
}

.form-group label {
  font-weight: 600;
  color: var(--primary-color);
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 12px 15px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  font-family: inherit;
  font-size: 0.95rem;
  background-color: var(--bg-cream);
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  background-color: var(--bg-white);
  box-shadow: 0 0 0 3px rgba(128, 24, 24, 0.1);
}

.file-upload-zone {
  border: 2px dashed var(--border-color);
  border-radius: var(--border-radius);
  padding: 30px;
  text-align: center;
  background-color: var(--bg-cream);
  cursor: pointer;
  transition: var(--transition);
}

.file-upload-zone:hover,
.file-upload-zone.dragover {
  border-color: var(--primary-color);
  background-color: #fcedeb;
}

.file-upload-zone i {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.file-upload-zone p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

#slip-preview {
  max-width: 150px;
  max-height: 150px;
  margin-top: 15px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  display: none;
}

.btn-submit {
  display: block;
  width: 100%;
  background-color: var(--primary-color);
  color: var(--text-light);
  border: none;
  padding: 15px;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.btn-submit:hover {
  background-color: var(--secondary-color);
  color: var(--primary-dark);
  box-shadow: var(--shadow-md);
}

/* Success Modal Anumodhana */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(44, 37, 32, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.success-modal {
  background-color: var(--bg-white);
  border-radius: 16px;
  border: 2px solid var(--secondary-color);
  width: 90%;
  max-width: 500px;
  padding: 40px 30px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  transform: scale(0.9);
  transition: var(--transition);
}

.modal-overlay.active .success-modal {
  transform: scale(1);
}

.success-icon {
  width: 80px;
  height: 80px;
  background-color: #e8f5e9;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.success-icon svg {
  width: 45px;
  height: 45px;
  fill: #2e7d32;
}

.success-modal h3 {
  font-size: 1.8rem;
  color: #2e7d32;
  margin-bottom: 10px;
}

.success-modal p {
  font-size: 1rem;
  color: var(--text-dark);
  margin-bottom: 25px;
}

.share-card {
  background: linear-gradient(135deg, #fffcf6 0%, #f7ebd4 100%);
  border: 1px solid var(--secondary-color);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 25px;
  position: relative;
}

.share-card-title {
  font-family: 'Maitree', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 8px;
}

.share-card-desc {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
}

.share-card-amount {
  font-size: 1.4rem;
  font-weight: 700;
  color: #2e7d32;
  margin-top: 10px;
}

.btn-close-modal {
  background-color: var(--primary-color);
  color: var(--text-light);
  border: none;
  padding: 10px 25px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-close-modal:hover {
  background-color: var(--secondary-color);
  color: var(--primary-dark);
}

/* Footer Section */
footer {
  background-color: var(--primary-dark);
  border-top: 4px solid var(--secondary-color);
  color: var(--text-light);
  padding: 60px 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-column h4 {
  color: var(--secondary-color);
  font-size: 1.3rem;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  padding-bottom: 8px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  color: #e5ccb3;
}

.footer-links a:hover {
  color: var(--secondary-color);
  padding-left: 5px;
}

.footer-about p {
  color: #e5ccb3;
  font-size: 0.95rem;
  margin-bottom: 15px;
}

.footer-contact-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.95rem;
  color: #e5ccb3;
}

.footer-bottom {
  text-align: center;
  padding-top: 25px;
  border-top: 1px solid rgba(255,255,255,0.05);
  font-size: 0.85rem;
  color: #bfa895;
}

/* Static Pages styling */
.page-container {
  background-color: var(--bg-white);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  padding: 35px;
  box-shadow: var(--shadow-sm);
}

.page-container h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--secondary-color);
  padding-bottom: 10px;
}

.page-content {
  font-size: 1.05rem;
}

.page-content p {
  margin-bottom: 20px;
}

/* Blog layouts */
.blog-card {
  background-color: var(--bg-white);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  margin-bottom: 30px;
  transition: var(--transition);
}

.blog-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.blog-thumb {
  width: 250px;
  flex-shrink: 0;
  background-color: #eae5db;
}

.blog-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card-body {
  padding: 25px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.blog-card-body h4 {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.blog-card-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 15px;
}

.blog-card-body p {
  font-size: 0.95rem;
  color: var(--text-dark);
  margin-bottom: 15px;
}

.readmore-btn {
  font-weight: 600;
  display: inline-block;
  width: fit-content;
}

/* Response Message classes */
.alert {
  padding: 15px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-weight: 500;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-danger {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Mobile responsive adjustments */
@media (max-width: 991px) {
  .main-wrapper {
    grid-template-columns: 1fr;
    padding: 20px 0;
  }
  .right-wrapper {
    grid-template-columns: 1fr;
    padding: 20px 0;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-group.full-width {
    grid-column: span 1;
  }
  .blog-card {
    flex-direction: column;
  }
  .blog-thumb {
    width: 100%;
    height: 200px;
  }
}

@media (max-width: 768px) {
  /* Disable sticky header on mobile to prevent blocking viewport */
  header {
    position: relative !important;
    top: auto !important;
  }

  .container {
    padding: 0 15px;
  }

  .top-bar {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .top-bar-container {
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }

  .top-bar-info {
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
  }

  .logo-section {
    flex-direction: column;
    text-align: center;
    padding: 10px 0;
  }

  .logo-link {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }

  .logo-text h1 {
    font-size: 1.4rem;
  }

  .logo-text p {
    font-size: 0.8rem;
  }

  .nav-container {
    flex-direction: column;
    align-items: stretch;
  }

  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border: 1px solid var(--secondary-color);
    padding: 10px 15px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-bottom: 5px;
    transition: var(--transition);
  }

  .menu-toggle:hover {
    background-color: var(--primary-dark);
    color: var(--secondary-light);
  }

  .nav-menu {
    display: none; /* Collapsed by default */
    flex-direction: column;
    width: 100%;
    gap: 5px;
    margin-top: 10px;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    align-items: stretch;
  }

  .nav-menu.show {
    display: flex;
  }

  .nav-menu li {
    width: 100%;
    text-align: center;
  }

  .nav-menu li a {
    display: block;
    width: 100%;
    padding: 10px;
  }

  .hero-section {
    padding: 40px 0;
  }
  .hero-content h2 {
    font-size: 1.6rem;
  }
  .hero-content p {
    font-size: 0.95rem;
    padding: 0 10px;
  }
  
  /* Horizontal scrollable category tab-bar on mobile */
  .left-sidebar {
    padding: 15px;
    margin-bottom: 15px;
  }
  .category-list {
    flex-direction: column !important;
    overflow-x: visible !important;
    white-space: normal !important;
    padding-bottom: 0 !important;
    gap: 8px !important;
  }
  .category-list li {
    display: block !important;
    width: 100%;
  }
  .category-list a {
    display: block !important;
    padding: 12px 15px !important;
    border-left: 4px solid transparent !important;
    border-bottom: none !important;
    border-radius: 6px !important;
    background-color: var(--bg-white) !important;
    border: 1px solid var(--border-color) !important;
    font-weight: 600;
  }
  .category-list a:hover,
  .category-list li.active a {
    border-left-color: var(--primary-color) !important;
    border-bottom-color: transparent !important;
    background-color: #f7ecd4 !important;
    color: var(--primary-color) !important;
    padding-left: 15px !important;
    border-color: var(--secondary-color) !important;
  }

  /* Responsive Detail & Static page padding */
  .detail-container {
    padding: 20px 15px;
  }
  .page-container {
    padding: 20px 15px;
  }
  .boon-title {
    font-size: 1.5rem;
    line-height: 1.3;
  }
  .page-container h2 {
    font-size: 1.5rem;
    line-height: 1.3;
  }

  /* Campaign main image height adjustment */
  .main-boon-img {
    height: 220px;
  }
  .boon-image-gallery {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .thumb-boon-imgs {
    flex-direction: row;
    max-height: none;
    overflow-x: auto;
    padding-bottom: 5px;
  }
  .thumb-boon-img {
    width: 80px;
    height: 60px;
    flex-shrink: 0;
  }
  
  /* Text and description enhancements */
  .boon-description, .page-content {
    font-size: 0.98rem;
    line-height: 1.7;
  }

  .blog-card-body {
    padding: 15px !important;
  }

  /* Rich text heading scaling */
  .boon-description h1, .page-content h1 {
    font-size: 1.5rem !important;
  }
  .boon-description h2, .page-content h2 {
    font-size: 1.4rem !important;
  }
  .boon-description h3, .page-content h3 {
    font-size: 1.3rem !important;
  }

  /* Force single column layout on mobile for merit grid and blog grids */
  .merit-grid,
  .blog-card-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Rich text editor content safety (prevent mobile overflows) */
.boon-description img,
.page-content img {
  max-width: 100% !important;
  height: auto !important;
}

.boon-description table,
.page-content table {
  width: 100% !important;
  max-width: 100% !important;
  display: block;
  overflow-x: auto;
  white-space: nowrap;
  border-collapse: collapse;
  margin: 15px 0;
}

/* Gallery shortcode styles & Frontend Lightbox adjustments */
.gallery-grid-shortcode .gallery-item-shortcode:hover {
  transform: scale(1.04);
  box-shadow: var(--shadow-md);
}

#galleryLightboxModal button[onclick] {
  border: none;
  background-color: rgba(0,0,0,0.5);
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

#galleryLightboxModal button[onclick]:hover {
  background-color: var(--secondary-color);
  color: var(--primary-dark);
}

@media (max-width: 768px) {
  #galleryLightboxModal button[onclick^="prev"] {
    left: 10px !important;
  }
  #galleryLightboxModal button[onclick^="next"] {
    right: 10px !important;
  }
}

/* Homepage Blog Grid Utilities */
.blog-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-bottom: 30px;
}

.blog-card-grid .blog-card {
  flex-direction: column;
  margin-bottom: 0;
}

.blog-card-grid .blog-thumb {
  width: 100%;
  height: 200px;
}

.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  border-bottom: 2px solid var(--secondary-color);
  padding-bottom: 10px;
}

.section-header-row h3 {
  margin: 0;
  font-size: 1.8rem;
  font-family: 'Maitree', serif;
}

.view-all-link {
  font-weight: 600;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.95rem;
}

.view-all-link:hover {
  color: var(--secondary-color);
}
