:root {
  --bg-dark: #3a1002;
  --bg-radial: radial-gradient(circle at 50% 30%, #a83f08 0%, #681f03 55%, #380d01 100%);
  --gold: #f5cf79;
  --gold-dark: #c89333;
  --gold-border: rgba(245, 207, 121, 0.45);
  --gold-glow: rgba(245, 207, 121, 0.2);
  --card-bg: linear-gradient(180deg, #fff2db 0%, #fae2bc 100%);
  --card-hover: linear-gradient(180deg, #ffffff 0%, #fde7c7 100%);
  --text-dark: #461705;
  --text-gold: #fbe2a7;
  --text-white: #ffffff;
  --sidebar-btn: linear-gradient(180deg, rgba(162, 57, 14, 0.85) 0%, rgba(105, 30, 4, 0.95) 100%);
  --sidebar-btn-active: linear-gradient(90deg, #df6418 0%, #a33b09 100%);
  --transition: all 0.25s ease-in-out;
}

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

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg-radial);
  background-attachment: fixed;
  color: #fff;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 12px;
}

/* Outer Ornate Wrapper Frame */
.page-frame {
  width: 100%;
  max-width: 1480px;
  border: 2px solid var(--gold-dark);
  outline: 4px solid #4a1302;
  box-shadow: 0 0 35px rgba(0, 0, 0, 0.8), inset 0 0 40px rgba(0, 0, 0, 0.6);
  background: rgba(43, 11, 2, 0.6);
  backdrop-filter: blur(4px);
  border-radius: 6px;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* HEADER */
.site-header {
  padding: 20px 24px 15px 24px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--gold-border);
  position: relative;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-badge {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: radial-gradient(circle, #ffebc4 10%, #d89033 70%, #752805 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px var(--gold-glow);
  color: #4b1a03;
  font-size: 2.2rem;
  flex-shrink: 0;
}

.mantra-text {
  font-family: 'Marcellus', serif;
  color: var(--text-gold);
  font-size: 0.95rem;
  line-height: 1.35;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.header-center {
  text-align: center;
}

.site-title {
  font-family: 'Cinzel', serif;
  font-size: 2.25rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 0 16px rgba(245, 207, 121, 0.3);
}

.site-subtitle {
  margin-top: 6px;
  font-family: 'Marcellus', serif;
  color: var(--gold);
  font-size: 0.95rem;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.site-subtitle::before,
.site-subtitle::after {
  content: "❖━━━";
  font-size: 0.75rem;
  opacity: 0.8;
  letter-spacing: -2px;
}

.site-subtitle::after {
  content: "━━━❖";
}

.header-right {
  text-align: right;
}

/* MAIN CONTAINER */
.main-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  padding: 20px;
  flex: 1;
}

/* SIDEBAR */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--sidebar-btn);
  border: 1px solid var(--gold-border);
  border-radius: 8px;
  padding: 10px 14px;
  color: #f7dfb9;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 3px 6px rgba(0,0,0,0.3);
  transition: var(--transition);
}

.nav-btn i {
  font-size: 1.05rem;
  width: 20px;
  text-align: center;
  color: var(--gold);
}

.nav-btn:hover,
.nav-btn.active {
  background: var(--sidebar-btn-active);
  color: #fff;
  border-color: #ffd77d;
  transform: translateX(3px);
  box-shadow: 0 0 12px rgba(235, 126, 31, 0.45);
}

.donate-btn {
  margin-top: 14px;
  background: linear-gradient(180deg, #7c2002 0%, #460f00 100%);
  border: 2px solid var(--gold);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  transition: var(--transition);
}

.donate-btn i {
  font-size: 1.8rem;
  color: var(--gold);
}

.donate-text .title {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.8px;
}

.donate-text .sub {
  font-size: 0.72rem;
  color: #e2c09c;
}

.donate-btn:hover {
  transform: scale(1.02);
  border-color: #fff;
  box-shadow: 0 0 15px rgba(245, 207, 121, 0.4);
}

/* CONTENT SECTION */
.content-area {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* HERO BANNER */
.hero-banner {
  border: 2px solid var(--gold-dark);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
  position: relative;
  background: #1e0500;
}

.hero-banner img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  display: block;
  filter: saturate(1.1) contrast(1.05);
}

/* WELCOME SECTION */
.welcome-box {
  text-align: center;
  padding: 4px 15px;
}

.welcome-heading {
  font-family: 'Cinzel', serif;
  font-size: 1.65rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

.welcome-heading span.ornament {
  color: var(--gold);
  font-size: 1.1rem;
  letter-spacing: 2px;
}

.welcome-desc {
  margin-top: 6px;
  font-size: 0.95rem;
  color: #f7e0c7;
  max-width: 800px;
  margin-inline: auto;
  line-height: 1.45;
}

/* CARD GRID */
.card-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.feature-card {
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid var(--gold);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
  transition: var(--transition);
  position: relative;
}

.feature-card:hover {
  background: var(--card-hover);
  transform: translateY(-4px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.6), 0 0 12px rgba(245, 207, 121, 0.35);
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #df5b12 0%, #872102 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 12px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255,255,255,0.4);
}

.card-title {
  font-family: 'Cinzel', serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-dark);
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  margin-bottom: 6px;
}

.card-text {
  font-size: 0.72rem;
  color: #553018;
  line-height: 1.3;
  flex-grow: 1;
  margin-bottom: 12px;
}

.card-btn {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #7c2002;
  text-decoration: none;
  border-top: 1px dashed rgba(124, 32, 2, 0.3);
  padding-top: 8px;
  width: 100%;
  display: block;
  transition: var(--transition);
}

.feature-card:hover .card-btn {
  color: #d14909;
  border-top-color: #d14909;
}

/* FOOTER */
.site-footer {
  border-top: 1px solid var(--gold-border);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-family: 'Marcellus', serif;
  color: var(--text-gold);
  font-size: 0.95rem;
  text-align: center;
  background: rgba(30, 8, 2, 0.4);
}

.site-footer i {
  color: var(--gold);
  font-size: 1.1rem;
}

/* RESPONSIVE DESIGN */
@media (max-width: 1200px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .main-layout {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column;
  }

  /* Main content appears first at the top */
  .content-area {
    order: 1;
  }

  /* Navigation menu moves below the content */
  .sidebar-nav {
    order: 2;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    margin-top: 20px; /* Adds breathing room below content */
  }

  .donate-btn {
    grid-column: span 2;
    justify-content: center;
  }

  .site-header {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .header-left, .header-right {
    justify-content: center;
    text-align: center;
  }

  .hero-banner img {
    height: 280px;
  }
}

@media (max-width: 600px) {
  body {
    padding: 4px;
  }
  .site-title {
    font-size: 1.5rem;
  }
  .sidebar-nav {
    grid-template-columns: 1fr;
  }
  .donate-btn {
    grid-column: span 1;
  }
  .card-grid {
    grid-template-columns: 1fr;
  }
  .hero-banner img {
    height: 200px;
  }
  .welcome-heading {
    font-size: 1.25rem;
    flex-direction: column;
    gap: 6px;
  }
}

/* =========================================================
   INNER PAGE COMPONENTS
   These additions inherit the ORIGINAL site theme above.
   ========================================================= */

.page-heading {
  text-align: center;
  padding: 4px 15px 2px;
}
.page-heading .eyebrow {
  color: var(--gold);
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.page-heading h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.55rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,.6);
}
.page-heading p {
  margin: 6px auto 0;
  max-width: 850px;
  color: #f7e0c7;
  font-size: .9rem;
  line-height: 1.45;
}
.page-heading .ornament {
  color: var(--gold);
  font-size: 1rem;
}

.inner-intro,
.section,
.info-box,
.card,
.book-list,
.gallery-item,
.placeholder,
.cta {
  color: #f7e0c7;
}

.inner-intro {
  padding: 15px 18px;
  text-align: center;
  border: 1px solid var(--gold-border);
  border-radius: 8px;
  background: rgba(43,11,2,.45);
  box-shadow: inset 0 0 18px rgba(0,0,0,.18);
  line-height: 1.55;
}

.info-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.info-box,
.section,
.card {
  padding: 18px;
  border: 1px solid var(--gold-border);
  border-radius: 9px;
  background: rgba(58,16,2,.48);
  box-shadow: 0 5px 14px rgba(0,0,0,.3);
}
.info-box h3,
.section h3,
.card h3 {
  margin-bottom: 8px;
  color: var(--gold);
  font-family: 'Cinzel', serif;
  font-size: 1rem;
}
.info-box p,
.section p,
.card p {
  color: #f7e0c7;
  font-size: .82rem;
  line-height: 1.55;
}

.section .placeholder,
.placeholder {
  min-height: 100px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 15px;
  border: 1px dashed var(--gold-border);
  border-radius: 7px;
  background: rgba(30,5,0,.28);
  color: #e8c99f;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.card {
  transition: var(--transition);
}
.card:hover,
.info-box:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  box-shadow: 0 8px 18px rgba(0,0,0,.45), 0 0 10px rgba(245,207,121,.15);
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  margin-bottom: 8px;
  border: 1px solid var(--gold-border);
  border-radius: 5px;
  background: rgba(162,57,14,.45);
  color: var(--gold);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.book-list {
  border: 1px solid var(--gold-border);
  border-radius: 9px;
  overflow: hidden;
  background: rgba(43,11,2,.42);
}
.book-item {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--gold-border);
}
.book-item:last-child { border-bottom: 0; }
.book-number {
  width: 54px;
  height: 62px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg,#7c2002 0%,#460f00 100%);
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: 'Cinzel', serif;
  font-size: 1.05rem;
}
.book-item h3 {
  margin-bottom: 5px;
  color: var(--gold);
  font-family: 'Cinzel', serif;
  font-size: .98rem;
}
.book-item p {
  color: #f7e0c7;
  font-size: .8rem;
  line-height: 1.5;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.gallery-item {
  min-height: 145px;
  border: 1px solid var(--gold-border);
  border-radius: 8px;
  background: rgba(43,11,2,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 15px;
  color: #e8c99f;
  font-family: 'Marcellus', serif;
  box-shadow: 0 5px 12px rgba(0,0,0,.3);
}

.cta {
  padding: 20px;
  text-align: center;
  border: 1px solid var(--gold);
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(124,32,2,.9), rgba(70,15,0,.92));
  box-shadow: 0 6px 16px rgba(0,0,0,.4);
}
.cta h3 {
  margin-bottom: 6px;
  color: var(--gold);
  font-family: 'Cinzel', serif;
}
.cta p { margin-bottom: 12px; }
.button {
  display: inline-block;
  padding: 9px 16px;
  border: 1px solid var(--gold);
  border-radius: 6px;
  background: var(--gold);
  color: #461705;
  text-decoration: none;
  font-family: 'Cinzel', serif;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .6px;
}
.button:hover {
  background: #ffe5a6;
}

@media (max-width: 1200px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .info-row, .gallery-grid, .grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .book-item { grid-template-columns: 54px 1fr; gap: 12px; }
  .book-number { width: 48px; height: 58px; }
}
