/* ============================================================
   Comparative Religion — Scholarly Reference Site
   Warm ivory / deep forest green / illuminated manuscript gold
   ============================================================ */

:root {
  --primary: #2d4a3e;
  --primary-light: #3d6154;
  --primary-dark: #1e3329;
  --gold: #c9a84c;
  --gold-light: #e0c06a;
  --gold-subtle: #f5ecd5;
  --bg: #faf8f3;
  --card-bg: #ffffff;
  --text: #2c2c2c;
  --text-muted: #5a5a5a;
  --border: #e8e0d0;
  --border-light: #f0ebe0;
  --heading-font: 'Crimson Pro', Georgia, 'Times New Roman', serif;
  --body-font: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  font-family: var(--body-font);
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 0;
}

/* Subtle parchment texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(ellipse at 20% 20%, rgba(201,168,76,0.04) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(45,74,62,0.03) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

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

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--heading-font);
  color: var(--primary-dark);
  line-height: 1.25;
  font-weight: 600;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-top: 2.5rem; margin-bottom: 1rem; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); margin-top: 2rem; margin-bottom: 0.75rem; }

p { margin-bottom: 1.2rem; }

a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 3px;
  transition: color 0.2s;
}

a:hover { color: var(--primary-light); }

/* Section headings with gold underline */
h2.section-heading {
  border-bottom: 2px solid var(--gold);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  display: inline-block;
}

/* ---- Navigation ---- */
#mainNav {
  background: var(--primary) !important;
  border-bottom: 2px solid rgba(201,168,76,0.25);
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
  transition: background 0.3s, box-shadow 0.3s;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

#mainNav.scrolled {
  background: var(--primary-dark) !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.navbar-brand {
  font-family: var(--heading-font);
  font-size: 1.4rem;
  font-weight: 700;
  color: #f5f0e8 !important;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.brand-symbol {
  color: var(--gold);
  margin-right: 0.4rem;
  font-size: 1.5rem;
}

#mainNav .nav-link {
  color: #e8e3d8 !important;
  font-family: var(--body-font);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0.85rem !important;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
  text-decoration: none;
}

#mainNav .nav-link:hover,
#mainNav .nav-link:focus {
  color: var(--gold) !important;
  background: rgba(255,255,255,0.07);
}

#mainNav .dropdown-menu {
  background: var(--primary-dark);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 6px;
  padding: 0.5rem 0;
  margin-top: 0.3rem;
  min-width: 220px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

#mainNav .dropdown-item {
  color: #d8d3c8 !important;
  padding: 0.55rem 1.25rem;
  font-size: 0.92rem;
  transition: background 0.15s, color 0.15s;
}

#mainNav .dropdown-item:hover {
  background: rgba(201,168,76,0.15) !important;
  color: var(--gold) !important;
}

.navbar-toggler {
  border-color: rgba(201,168,76,0.4);
}
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28201%2C168%2C76%2C0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ---- Hero Section ---- */
.hero-section {
  background: var(--primary);
  background-image: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  position: relative;
  overflow: hidden;
  padding: 5rem 0;
  min-height: 480px;
  display: flex;
  align-items: center;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse 60% 80% at 70% 50%, rgba(201,168,76,0.12) 0%, transparent 70%);
}

.hero-section .hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.22;
  filter: grayscale(0.3) sepia(0.2);
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-section h1 {
  font-family: var(--heading-font);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 700;
  color: #f5f0e8;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.hero-section h1 em {
  color: var(--gold);
  font-style: normal;
}

.hero-section .lead {
  font-size: 1.2rem;
  color: rgba(245,240,232,0.88);
  margin-bottom: 2rem;
  max-width: 640px;
  line-height: 1.6;
}

.hero-divider {
  width: 64px;
  height: 3px;
  background: var(--gold);
  margin: 1.5rem 0;
}

.btn-hero-primary {
  background: var(--gold);
  color: var(--primary-dark) !important;
  border: none;
  font-weight: 600;
  padding: 0.8rem 2rem;
  border-radius: 4px;
  font-size: 1rem;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s, transform 0.15s;
}

.btn-hero-primary:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
}

.btn-hero-outline {
  background: transparent;
  color: #f5f0e8 !important;
  border: 1px solid rgba(245,240,232,0.5);
  font-weight: 500;
  padding: 0.8rem 2rem;
  border-radius: 4px;
  font-size: 1rem;
  text-decoration: none;
  display: inline-block;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.btn-hero-outline:hover {
  border-color: var(--gold);
  background: rgba(201,168,76,0.1);
  transform: translateY(-2px);
}

/* ---- Page Banner (inner pages) ---- */
.page-banner {
  background: var(--primary);
  background-image: linear-gradient(to right, var(--primary-dark) 0%, var(--primary) 100%);
  color: #f5f0e8;
  padding: 2.5rem 0;
  border-bottom: 2px solid rgba(201,168,76,0.3);
}

.page-banner h1 {
  color: #f5f0e8;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  margin: 0;
  text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.page-banner .page-banner-sub {
  color: rgba(245,240,232,0.75);
  font-size: 1rem;
  margin-top: 0.4rem;
  margin-bottom: 0;
}

/* ---- Breadcrumb ---- */
.breadcrumb-section {
  background: #f0ece2;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}

.breadcrumb {
  margin: 0;
  padding: 0;
  background: transparent;
  font-size: 0.88rem;
}

.breadcrumb-item a {
  color: var(--primary);
  text-decoration: none;
}

.breadcrumb-item a:hover { color: var(--gold); }

.breadcrumb-item.active { color: var(--text-muted); }

.breadcrumb-item + .breadcrumb-item::before {
  color: var(--text-muted);
}

/* ---- Feature Strips (homepage) ---- */
.features-strip {
  padding: 3.5rem 0;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
}

.feature-item {
  text-align: center;
  padding: 1.5rem;
}

.feature-icon {
  width: 64px;
  height: 64px;
  background: var(--gold-subtle);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  font-size: 1.6rem;
  color: var(--gold);
  border: 2px solid var(--gold);
}

.feature-item h4 {
  font-family: var(--heading-font);
  font-size: 1.25rem;
  color: var(--primary);
  margin-bottom: 0.6rem;
}

.feature-item p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

/* ---- Religion Cards ---- */
.religions-section {
  padding: 4rem 0;
  background: var(--bg);
}

.religion-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s;
  height: 100%;
  text-decoration: none !important;
  display: block;
  color: var(--text);
}

.religion-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(45,74,62,0.15);
  border-color: var(--gold);
  color: var(--text);
}

.religion-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.religion-card-img-placeholder {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: rgba(245,240,232,0.6);
}

.religion-card-body {
  padding: 1.25rem 1.4rem 1.5rem;
}

.religion-card-body h5 {
  font-family: var(--heading-font);
  font-size: 1.25rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.religion-card-body p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0;
  line-height: 1.55;
}

.religion-card-body .card-arrow {
  color: var(--gold);
  margin-top: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-block;
}

/* ---- Section divider ---- */
.section-divider {
  width: 72px;
  height: 3px;
  background: var(--gold);
  margin: 0 0 1.5rem;
}

/* ---- Content Page Layout ---- */
.page-content {
  padding: 3rem 0 4rem;
}

.page-hero-img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 2.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.inline-img {
  width: 100%;
  border-radius: 6px;
  margin: 1.5rem 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

/* Content body styling */
.content-body h2 {
  font-family: var(--heading-font);
  color: var(--primary);
  border-left: 4px solid var(--gold);
  padding-left: 0.85rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.content-body h3 {
  font-family: var(--heading-font);
  color: var(--primary-dark);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.content-body h3 a {
  color: inherit;
  text-decoration-color: var(--gold);
}

.content-body ul,
.content-body ol {
  padding-left: 1.75rem;
  margin-bottom: 1.2rem;
}

.content-body li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.content-body strong { color: var(--primary-dark); }

/* Outbound links in content */
.content-body a[target="_blank"]::after {
  content: ' \2197';
  font-size: 0.75em;
  color: var(--gold);
  vertical-align: super;
}

/* ---- Sidebar / Related Links ---- */
.related-sidebar {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold);
  border-radius: 8px;
  padding: 1.5rem;
  position: sticky;
  top: 90px;
}

.related-sidebar h5 {
  font-family: var(--heading-font);
  font-size: 1.15rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.related-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.related-sidebar ul li {
  margin-bottom: 0.55rem;
}

.related-sidebar ul li a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.15s;
}

.related-sidebar ul li a::before {
  content: '→';
  color: var(--gold);
  font-size: 0.85rem;
  flex-shrink: 0;
}

.related-sidebar ul li a:hover { color: var(--primary); }

/* ---- Info Chips ---- */
.info-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--gold-subtle);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 20px;
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 500;
  margin: 0.3rem 0.25rem;
}

.info-chip i { color: var(--gold); font-size: 0.8rem; }

.info-chips-row {
  margin: 1.25rem 0 2rem;
  display: flex;
  flex-wrap: wrap;
}

/* ---- Quote Block ---- */
.scholarly-quote {
  border-left: 4px solid var(--gold);
  background: var(--gold-subtle);
  border-radius: 0 8px 8px 0;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  font-family: var(--heading-font);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--primary-dark);
}

/* ---- About / Hub page intro box ---- */
.intro-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-top: 3px solid var(--primary);
  border-radius: 8px;
  padding: 2rem 2.25rem;
  margin-bottom: 2.5rem;
}

/* ---- What is Comparative Religion section (homepage) ---- */
.about-section {
  padding: 4rem 0;
  background: var(--card-bg);
  border-top: 1px solid var(--border);
}

/* ---- Footer ---- */
.site-footer {
  background: var(--primary-dark);
  background-image: linear-gradient(to bottom, var(--primary) 0%, var(--primary-dark) 100%);
  color: #c8c3b8;
  padding: 3.5rem 0 1.5rem;
  border-top: 3px solid var(--gold);
}

.site-footer h5 {
  font-family: var(--heading-font);
  font-size: 1.1rem;
  color: var(--gold);
  margin-bottom: 1rem;
}

.site-footer p { color: #b0ab9f; font-size: 0.9rem; }

.footer-links {
  margin: 0;
  padding: 0;
}

.footer-links li { margin-bottom: 0.5rem; }

.footer-links a {
  color: #b8b3a8 !important;
  text-decoration: none !important;
  font-size: 0.92rem;
  transition: color 0.15s;
}

.footer-links a:hover { color: var(--gold) !important; }

.footer-divider {
  border-color: rgba(201,168,76,0.2);
  margin: 2rem 0 1.25rem;
}

/* ---- 404 Page ---- */
.error-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1rem;
}

.error-page .error-code {
  font-family: var(--heading-font);
  font-size: 7rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  opacity: 0.15;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
}

.error-content { position: relative; z-index: 2; }

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

/* ---- Utilities ---- */
.text-gold { color: var(--gold); }
.text-primary-custom { color: var(--primary); }
.bg-parchment { background: var(--bg); }
.font-heading { font-family: var(--heading-font); }

/* ---- Responsive ---- */
@media (max-width: 991px) {
  .hero-section { padding: 3.5rem 0; }
  .page-content { padding: 2rem 0 3rem; }
  .related-sidebar { position: static; margin-top: 2.5rem; }
}

@media (max-width: 767px) {
  .hero-section h1 { font-size: 2rem; }
  .religion-card-img, .religion-card-img-placeholder { height: 140px; }
  .features-strip { padding: 2.5rem 0; }
  .religions-section { padding: 2.5rem 0; }
}

@media (max-width: 575px) {
  .btn-hero-primary, .btn-hero-outline {
    display: block;
    width: 100%;
    text-align: center;
    margin-bottom: 0.75rem;
  }
}
