:root {
  --bg: #f6f1e8;
  --surface: #fffdfa;
  --surface-alt: #f2ebe0;
  --text: #231f20;
  --muted: #6f655d;
  --primary: #6f1d2c;
  --primary-strong: #531420;
  --secondary: #b58b45;
  --secondary-soft: #d7bf8e;
  --accent: #1f3447;
  --accent-soft: #d7e0e9;
  --border: rgba(35, 31, 32, 0.1);
  --shadow: 0 18px 40px rgba(31, 52, 71, 0.12);
  --shadow-soft: 0 8px 24px rgba(31, 52, 71, 0.08);
  --radius: 20px;
  --radius-sm: 14px;
  --nav-height: 84px;
  --content-width: 1180px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(180deg, #faf7f2 0%, #f4ede4 100%);
  color: var(--text);
  line-height: 1.65;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button,
input {
  font: inherit;
}

main {
  min-height: calc(100vh - 320px);
}

.page-shell {
  width: min(calc(100% - 2rem), var(--content-width));
  margin: 0 auto;
}

.section {
  padding: 5.5rem 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(255,255,255,0.65), rgba(255,255,255,0.25));
}

.section-heading {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 2.5rem;
}

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 0.8rem;
}

.section-heading h2,
.page-hero h1,
.hero-copy h1,
.markdown-heading h1,
.office-header h1,
.sermon-title,
.archive-header h1,
.blog-hero h1,
.gallery-hero h1 {
  font-family: Georgia, 'Times New Roman', serif;
}

.section-heading h2,
.page-hero h1,
.hero-copy h1,
.markdown-heading h1,
.office-header h1,
.archive-header h1,
.blog-hero h1,
.gallery-hero h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.12;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section-heading p,
.hero-copy p,
.page-hero p,
.blog-hero p,
.gallery-hero p,
.archive-header p,
.markdown-intro {
  color: var(--muted);
  font-size: 1.05rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1200;
  backdrop-filter: blur(16px);
  background: rgba(246, 241, 232, 0.92);
  border-bottom: 1px solid rgba(111, 29, 44, 0.08);
}

.navbar {
  min-height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  flex-shrink: 0;
}

.brand-copy {
  min-width: 0;
}

.brand-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.2rem;
  color: var(--accent);
  font-weight: 700;
  line-height: 1.1;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--border);
  background: var(--surface);
  width: 48px;
  height: 48px;
  border-radius: 14px;
  color: var(--accent);
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.nav-panel {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.nav-links > li {
  position: relative;
}

.nav-links a,
.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.85rem 1rem;
  border-radius: 999px;
  color: var(--accent);
  font-weight: 600;
  transition: 0.22s ease;
}

.dropdown-toggle {
  border: none;
  background: transparent;
  cursor: pointer;
}

.nav-links a:hover,
.nav-links a.active,
.dropdown-toggle:hover,
.has-submenu.open > .dropdown-toggle {
  color: var(--primary);
  background: rgba(111, 29, 44, 0.08);
}

.has-submenu .submenu {
  position: absolute;
  top: calc(100% + 0.6rem);
  right: 0;
  min-width: 240px;
  background: rgba(255, 253, 250, 0.98);
  border: 1px solid rgba(111, 29, 44, 0.12);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 0.55rem;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.22s ease;
}

.has-submenu:hover .submenu,
.has-submenu:focus-within .submenu,
.has-submenu.open .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.submenu a {
  display: block;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  color: var(--accent);
}

.submenu a:hover {
  background: rgba(181, 139, 69, 0.15);
  color: var(--primary);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  padding: 0.88rem 1.25rem;
  font-weight: 700;
  box-shadow: var(--shadow-soft);
}

.nav-cta:hover,
.button-primary:hover,
.cta-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  padding: 4rem 0 5rem;
  background:
    linear-gradient(110deg, rgba(17, 24, 39, 0.78), rgba(111, 29, 44, 0.58)),
    url('./images/RAWCA HERO2.png') center/cover no-repeat;
}

.hero::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 120px;
  background: linear-gradient(180deg, transparent, rgba(246, 241, 232, 0.95));
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 2rem;
  align-items: end;
}

.hero-copy {
  color: #fff;
  max-width: 720px;
}

.hero-copy h1 {
  font-size: clamp(2.7rem, 6vw, 5rem);
  color: #fff;
  margin-bottom: 1rem;
}

.hero-copy p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.12rem;
  max-width: 60ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.button-primary,
.button-secondary,
.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.95rem 1.4rem;
  border-radius: 999px;
  border: none;
  font-weight: 700;
  transition: transform 0.22s ease, filter 0.22s ease, background 0.22s ease;
}

.button-primary,
.cta-button {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: var(--shadow-soft);
}

.button-secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-card {
  background: rgba(255, 253, 250, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 26px;
  padding: 1.4rem;
  box-shadow: var(--shadow);
}

.hero-card img {
  width: 78px;
  margin-bottom: 1rem;
}

.hero-card h2 {
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--accent);
  font-size: 1.55rem;
  margin-bottom: 0.6rem;
}

.hero-card p {
  color: var(--muted);
}

.hero-highlights {
  display: grid;
  gap: 1rem;
  margin-top: 1.2rem;
}

.hero-highlight {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}

.hero-highlight i {
  color: var(--primary);
  margin-top: 0.15rem;
}

.card-grid,
.pastors-grid,
.services-grid,
.blog-grid,
.gallery-grid,
.quick-links,
.office-grid,
.stats-grid {
  display: grid;
  gap: 1.5rem;
}

.pastors-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.services-grid,
.blog-grid,
.gallery-grid,
.quick-links,
.office-grid,
.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.panel,
.pastor-card,
.service-card,
.blog-card,
.gallery-card,
.quick-link-card,
.office-card,
.stat-card,
.archive-panel,
.player-card,
.markdown-shell,
.contact-card {
  background: rgba(255, 253, 250, 0.95);
  border: 1px solid rgba(111, 29, 44, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.pastor-card,
.service-card,
.blog-card,
.gallery-card,
.quick-link-card,
.office-card,
.contact-card,
.stat-card {
  overflow: hidden;
}

.pastor-link {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.pastor-image-wrap {
  padding: 1.4rem 1.4rem 0;
}

.pastor-image {
  width: 100%;
  aspect-ratio: 1 / 1.05;
  object-fit: cover;
  border-radius: 22px;
  border: 4px solid rgba(181, 139, 69, 0.16);
}

.pastor-copy,
.service-card,
.blog-card,
.gallery-copy,
.quick-link-card,
.office-card,
.contact-card,
.stat-card {
  padding: 1.4rem;
}

.pastor-copy h3,
.service-card h3,
.blog-card h3,
.quick-link-card h3,
.office-card h3,
.contact-card h3,
.stat-card h3 {
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--accent);
  font-size: 1.32rem;
  margin-bottom: 0.45rem;
}

.pastor-copy p,
.service-card p,
.blog-card p,
.gallery-copy p,
.quick-link-card p,
.office-card p,
.contact-card p,
.stat-card p,
.archive-summary,
.player-summary {
  color: var(--muted);
}

.link-arrow {
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--primary);
  font-weight: 700;
}

.service-icon,
.stat-icon,
.quick-link-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(111, 29, 44, 0.1), rgba(181, 139, 69, 0.22));
  color: var(--primary);
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.split-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);
  gap: 1.5rem;
  align-items: stretch;
}

.feature-panel {
  padding: 1.8rem;
}

.feature-panel h3 {
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--accent);
  font-size: 1.8rem;
  margin-bottom: 0.8rem;
}

.feature-list {
  list-style: none;
  display: grid;
  gap: 0.85rem;
  margin-top: 1.2rem;
}

.feature-list li {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
}

.feature-list i {
  color: var(--secondary);
  margin-top: 0.2rem;
}

.image-panel {
  min-height: 100%;
  background: linear-gradient(135deg, rgba(31, 52, 71, 0.7), rgba(111, 29, 44, 0.45)), url('./images/RAWCA HERO2.png') center/cover no-repeat;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.9fr);
  gap: 1.5rem;
}

.contact-card ul,
.schedule-list,
.office-list,
.meta-list {
  list-style: none;
  display: grid;
  gap: 0.75rem;
}

.contact-card li,
.schedule-list li,
.office-list li,
.meta-list li {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  color: var(--muted);
}

.contact-card i,
.schedule-list i,
.office-list i,
.meta-list i {
  color: var(--primary);
  margin-top: 0.18rem;
}

.page-hero,
.blog-hero,
.gallery-hero,
.archive-hero,
.office-header,
.markdown-hero {
  padding: 4.2rem 0 2rem;
}

.page-hero .page-shell,
.blog-hero .page-shell,
.gallery-hero .page-shell,
.archive-hero .page-shell,
.office-header .page-shell,
.markdown-hero .page-shell {
  background: linear-gradient(135deg, rgba(31, 52, 71, 0.95), rgba(111, 29, 44, 0.92));
  color: #fff;
  border-radius: 30px;
  padding: 2.3rem;
  box-shadow: var(--shadow);
}

.page-hero h1,
.blog-hero h1,
.gallery-hero h1,
.archive-header h1,
.office-header h1,
.markdown-heading h1 {
  color: #fff;
}

.page-hero p,
.blog-hero p,
.gallery-hero p,
.archive-header p,
.office-header p,
.markdown-intro {
  color: rgba(255,255,255,0.88);
}

.page-breadcrumbs,
.meta-pill-row,
.markdown-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}

.meta-pill,
.markdown-meta span,
.blog-tag,
.gallery-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.92);
  font-size: 0.92rem;
}

.blog-listing,
.gallery-listing,
.office-content,
.markdown-page,
.archive-page,
.player-page {
  padding: 2rem 0 5rem;
}

.blog-card .blog-cover,
.gallery-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.blog-card .blog-cover {
  border-bottom: 1px solid var(--border);
}

.blog-card .blog-content {
  padding: 1.35rem;
}

.blog-card .blog-meta,
.archive-meta,
.gallery-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 0.85rem;
}

.gallery-card {
  display: flex;
  flex-direction: column;
}

.gallery-copy {
  display: grid;
  gap: 0.75rem;
}

.gallery-actions,
.archive-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1rem;
}

.gallery-actions a,
.archive-actions a,
.secondary-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--secondary-soft);
  font-weight: 700;
}

.office-layout {
  display: grid;
  grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.office-index {
  position: sticky;
  top: calc(var(--nav-height) + 1rem);
  padding: 1.4rem;
}

.office-index h2,
.markdown-side h2,
.archive-panel h2,
.player-panel h2 {
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--accent);
  font-size: 1.45rem;
  margin-bottom: 0.95rem;
}

.office-index ul {
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.office-index a {
  display: block;
  padding: 0.78rem 0.95rem;
  border-radius: 14px;
  color: var(--accent);
  font-weight: 600;
}

.office-index a:hover {
  background: rgba(111, 29, 44, 0.08);
  color: var(--primary);
}

.office-stack {
  display: grid;
  gap: 1.2rem;
}

.office-card {
  scroll-margin-top: calc(var(--nav-height) + 1rem);
}

.office-card p + p {
  margin-top: 0.8rem;
}

.office-signature {
  margin-top: 1rem;
  color: var(--primary);
  font-weight: 700;
}

.markdown-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: 1.5rem;
  align-items: start;
}

.markdown-shell {
  overflow: hidden;
}

.markdown-heading {
  padding: 2rem 2rem 1rem;
  background: linear-gradient(135deg, rgba(31, 52, 71, 0.97), rgba(111, 29, 44, 0.94));
}

.markdown-body {
  padding: 2rem;
  color: #332d2a;
}

.markdown-body > * + * {
  margin-top: 1rem;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--accent);
  margin-top: 1.4rem;
}

.markdown-body h1 { font-size: 2rem; }
.markdown-body h2 { font-size: 1.6rem; }
.markdown-body h3 { font-size: 1.3rem; }

.markdown-body ul,
.markdown-body ol {
  padding-left: 1.25rem;
}

.markdown-body blockquote {
  border-left: 4px solid var(--secondary);
  padding-left: 1rem;
  color: var(--muted);
  font-style: italic;
}

.markdown-body img {
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

.markdown-body a {
  color: var(--primary);
  text-decoration: underline;
}

.markdown-side {
  padding: 1.4rem;
  position: sticky;
  top: calc(var(--nav-height) + 1rem);
}

.markdown-status {
  color: var(--muted);
}

.markdown-status.error {
  color: #8a1b1b;
}

.archive-layout,
.player-layout {
  display: grid;
  gap: 1.5rem;
}

.archive-header,
.player-header-copy {
  padding: 2rem;
}

.archive-summary,
.player-summary {
  margin-top: 0.6rem;
}

.search-container {
  margin-top: -1.6rem;
  position: relative;
  z-index: 2;
}

.search-wrapper {
  background: rgba(255, 253, 250, 0.98);
  border: 1px solid rgba(111, 29, 44, 0.08);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  padding: 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: min(760px, 100%);
  margin: 0 auto;
}

.search-icon {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: rgba(111, 29, 44, 0.08);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.search-input {
  width: 100%;
  border: none;
  background: transparent;
  padding: 0.75rem 0.4rem;
  color: var(--accent);
}

.search-input:focus {
  outline: none;
}

.featured-sermons,
.player-panel {
  padding: 1.4rem;
}

.featured-sermons h2 {
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--accent);
  font-size: 1.65rem;
  margin-bottom: 1rem;
}

.featured-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
}

.sermon-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem;
  border-radius: 18px;
  background: rgba(242, 235, 224, 0.65);
  border: 1px solid rgba(111, 29, 44, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sermon-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.sermon-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(111, 29, 44, 0.14), rgba(31, 52, 71, 0.14));
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sermon-info h4,
.sermon-info h3 {
  color: var(--accent);
}

.sermon-info h4 {
  font-size: 1rem;
  margin-bottom: 0.15rem;
}

.sermon-info h3 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.18rem;
  margin-bottom: 0.6rem;
}

.sermon-meta,
.sermon-stats-archive,
.sermon-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1rem;
  font-size: 0.93rem;
  color: var(--muted);
}

.no-results {
  padding: 1.5rem;
  text-align: center;
  color: var(--muted);
}

.player-card {
  overflow: hidden;
}

.player-header {
  background: linear-gradient(135deg, rgba(31, 52, 71, 0.98), rgba(111, 29, 44, 0.92));
  color: #fff;
  padding: 2rem;
  position: relative;
}

.back-button,
.back-home-btn,
.home-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  color: #fff;
  font-weight: 700;
}

.back-button:hover,
.back-home-btn:hover,
.home-button:hover {
  background: rgba(255,255,255,0.22);
}

.sermon-title {
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  color: #fff;
  margin-top: 1rem;
}

.sermon-details {
  color: rgba(255,255,255,0.88);
  margin-top: 0.6rem;
}

.player-controls {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}

.progress-container {
  position: relative;
  background: rgba(31, 52, 71, 0.12);
  height: 8px;
  border-radius: 999px;
  cursor: pointer;
  overflow: hidden;
}

.progress-bar {
  background: linear-gradient(90deg, var(--secondary), var(--primary));
  height: 100%;
  width: 0;
}

.time-display {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.95rem;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.control-button {
  border: none;
  background: rgba(111, 29, 44, 0.08);
  color: var(--accent);
  min-width: 52px;
  min-height: 52px;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease;
}

.control-button:hover {
  transform: translateY(-1px);
  background: rgba(111, 29, 44, 0.14);
}

.play-pause {
  min-width: 68px;
  min-height: 68px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
}

.like-button.liked {
  color: var(--primary);
  background: rgba(111, 29, 44, 0.12);
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.volume-slider {
  width: 100%;
  accent-color: var(--primary);
}

.sermon-info {
  padding: 2rem;
  background: rgba(242, 235, 224, 0.45);
  border-top: 1px solid rgba(111, 29, 44, 0.08);
}

.scripture-box {
  margin-top: 1rem;
  background: rgba(255, 253, 250, 0.96);
  border-radius: 18px;
  border: 1px solid rgba(111, 29, 44, 0.08);
  padding: 1.4rem;
}

.scripture-reference {
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--primary);
  font-size: 1.15rem;
  margin-bottom: 0.45rem;
}

.site-footer {
  margin-top: 2rem;
  background: linear-gradient(135deg, #13212e, #3c1520);
  color: rgba(255,255,255,0.92);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  padding: 3rem 0;
}

.footer-panel h3 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.35rem;
  margin-bottom: 0.95rem;
}

.footer-panel p,
.footer-panel li,
.footer-panel a {
  color: rgba(255,255,255,0.8);
}

.footer-panel ul {
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.footer-panel a:hover,
.social-links a:hover {
  color: #fff;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1rem;
}

.social-links a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 1.15rem 0 1.4rem;
  color: rgba(255,255,255,0.7);
  font-size: 0.94rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 980px) {
  .hero-grid,
  .split-panel,
  .contact-layout,
  .office-layout,
  .markdown-layout {
    grid-template-columns: 1fr;
  }

  .office-index,
  .markdown-side {
    position: static;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-panel {
    position: fixed;
    top: calc(var(--nav-height) + 0.35rem);
    left: 1rem;
    right: 1rem;
    background: rgba(255, 253, 250, 0.98);
    border: 1px solid rgba(111, 29, 44, 0.08);
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: 1rem;
    flex-direction: column;
    align-items: stretch;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: 0.22s ease;
  }

  .nav-panel.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
  }

  .nav-links a,
  .dropdown-toggle {
    justify-content: space-between;
    border-radius: 16px;
  }

  .has-submenu .submenu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    min-width: 0;
    margin-top: 0.3rem;
    box-shadow: none;
    border-radius: 16px;
    background: rgba(111, 29, 44, 0.04);
  }

  .has-submenu.open .submenu {
    display: grid;
  }

  .nav-cta {
    justify-content: center;
  }
}

@media (max-width: 720px) {
  :root {
    --nav-height: 78px;
  }

  .section {
    padding: 4rem 0;
  }

  .page-shell {
    width: min(calc(100% - 1.2rem), var(--content-width));
  }

  .hero {
    padding: 3rem 0 4rem;
    min-height: auto;
  }

  .hero-copy h1 {
    font-size: clamp(2.3rem, 10vw, 3.5rem);
  }

  .hero-actions,
  .archive-actions,
  .gallery-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button-primary,
  .button-secondary,
  .cta-button,
  .nav-cta {
    width: 100%;
    justify-content: center;
  }

  .featured-list {
    grid-template-columns: 1fr;
  }

  .sermon-item {
    flex-direction: column;
  }

  .player-controls,
  .sermon-info,
  .markdown-body,
  .markdown-heading,
  .player-header,
  .archive-header,
  .feature-panel,
  .office-card,
  .contact-card,
  .stat-card,
  .blog-card .blog-content,
  .gallery-copy {
    padding: 1.2rem;
  }
}

/* Gallery album layout */
.gallery-browser-layout {
  display: grid;
  gap: 1.5rem;
}

.gallery-toolbar {
  padding: 1.4rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.gallery-toolbar h2,
.album-card h3,
.album-section-header h2,
.empty-state h3 {
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--accent);
}

.gallery-toolbar p,
.album-card p,
.album-section-header p,
.photo-card-body p,
.empty-state p {
  color: var(--muted);
}

.gallery-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.album-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.album-cover {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
}

.album-card-body {
  padding: 1.35rem;
  display: grid;
  gap: 0.85rem;
  height: 100%;
}

.album-card-body h3 {
  font-size: 1.4rem;
}

.album-card-meta,
.album-mini-meta,
.album-section-meta,
.photo-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.album-card-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-top: auto;
}

.album-card-footer .secondary-link {
  white-space: nowrap;
}

.album-sections {
  display: grid;
  gap: 1.5rem;
}

.album-section {
  padding: 1.5rem;
  scroll-margin-top: calc(var(--nav-height) + 1rem);
}

.album-section-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem 1.5rem;
  margin-bottom: 1.25rem;
}

.album-section-header > div:first-child {
  flex: 1 1 420px;
}

.album-section-header > div:last-child {
  flex: 0 1 auto;
}

.album-section-header h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  margin-bottom: 0.55rem;
}

.album-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.photo-card {
  border: 1px solid rgba(111, 29, 44, 0.08);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(242, 235, 224, 0.5);
  box-shadow: var(--shadow-soft);
}

.photo-button {
  display: block;
  width: 100%;
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.photo-button img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.photo-card-body {
  padding: 1rem;
  display: grid;
  gap: 0.75rem;
}

.empty-state {
  padding: 1.6rem;
  text-align: center;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(13, 18, 24, 0.88);
}

.gallery-lightbox.open {
  display: flex;
}

.lightbox-inner {
  max-width: min(1024px, 100%);
  max-height: 100%;
  display: grid;
  gap: 1rem;
  justify-items: center;
}

.lightbox-inner img {
  width: auto;
  max-width: 100%;
  max-height: 80vh;
  border-radius: 22px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

.lightbox-inner p {
  color: #fff;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-50%) scale(1.05);
}

.lightbox-prev {
  left: 1rem;
}

.lightbox-next {
  right: 1rem;
}

body.lightbox-open {
  overflow: hidden;
}

@media (max-width: 720px) {
  .gallery-toolbar,
  .album-section-header,
  .album-card-footer {
    align-items: stretch;
  }

  .gallery-filter-bar,
  .album-card-footer,
  .photo-card-actions,
  .album-mini-meta,
  .album-section-meta {
    flex-direction: column;
  }

  .album-grid,
  .album-photo-grid {
    grid-template-columns: 1fr;
  }
}

/* Blog and content reader polish */
.blog-browser {
  display: grid;
  grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.blog-sidebar,
.blog-toolbar,
.sidebar-block,
.panel-soft {
  padding: 1.4rem;
}

.blog-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 1rem);
}

.blog-sidebar h2,
.blog-toolbar h2,
.sidebar-block h3,
.content-nav-card strong,
.category-group summary {
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--accent);
}

.blog-toolbar h2 {
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  margin-bottom: 0.45rem;
}

.blog-main {
  display: grid;
  gap: 1rem;
}

.sidebar-copy,
.sidebar-empty,
.content-nav-meta,
.content-nav-label,
.scripture-text {
  color: var(--muted);
}

.sidebar-link-list {
  display: grid;
  gap: 0.7rem;
  list-style: none;
  margin-top: 1rem;
}

.sidebar-link-list.compact {
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.sidebar-link-list li {
  list-style: none;
}

.sidebar-link-list li a,
.sidebar-category-link {
  display: grid;
  gap: 0.2rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(111, 29, 44, 0.08);
  background: rgba(242, 235, 224, 0.45);
  color: var(--accent);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.sidebar-link-list li a:hover,
.sidebar-category-link:hover,
.sidebar-link-list li a.active,
.sidebar-category-link.active {
  transform: translateY(-1px);
  background: rgba(111, 29, 44, 0.08);
  border-color: rgba(111, 29, 44, 0.18);
  color: var(--primary);
}

.sidebar-category-link {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.sidebar-category-link small,
.sidebar-link-list li a span {
  font-size: 0.9rem;
  color: var(--muted);
}

.filter-chip-row,
.gallery-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.filter-chip {
  border: 1px solid rgba(111, 29, 44, 0.08);
  background: rgba(255, 253, 250, 0.95);
  color: var(--accent);
  padding: 0.75rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  box-shadow: var(--shadow-soft);
}

.filter-chip:hover,
.filter-chip.active {
  transform: translateY(-1px);
  background: linear-gradient(135deg, rgba(111, 29, 44, 0.95), rgba(31, 52, 71, 0.95));
  color: #fff;
  border-color: transparent;
}

.category-group-stack {
  display: grid;
  gap: 0.85rem;
}

.category-group {
  border: 1px solid rgba(111, 29, 44, 0.08);
  border-radius: 18px;
  background: rgba(242, 235, 224, 0.35);
  overflow: hidden;
}

.category-group summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
  cursor: pointer;
  list-style: none;
}

.category-group summary::-webkit-details-marker {
  display: none;
}

.category-group summary small {
  min-width: 1.8rem;
  min-height: 1.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(111, 29, 44, 0.08);
  color: var(--primary);
  font-size: 0.8rem;
}

.category-group .sidebar-link-list {
  padding: 0 0.85rem 0.85rem;
  margin-top: 0;
}

.content-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding: 0 2rem 2rem;
}

.content-nav-card {
  display: grid;
  gap: 0.35rem;
  padding: 1.1rem 1.2rem;
  border-radius: 20px;
  background: rgba(242, 235, 224, 0.5);
  border: 1px solid rgba(111, 29, 44, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.content-nav-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
  background: rgba(255, 253, 250, 0.98);
}

.content-nav-label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 700;
}

.content-nav-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
}

.sidebar-block + .sidebar-block {
  margin-top: 1.2rem;
}

/* Gallery upgrades */
.gallery-manage {
  max-width: 370px;
  border: 1px dashed rgba(111, 29, 44, 0.18);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(242, 235, 224, 0.9), rgba(255, 253, 250, 0.98));
  box-shadow: var(--shadow-soft);
}

.gallery-manage-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 0.7rem;
}

.album-card-media {
  position: relative;
  overflow: hidden;
}

.album-cover,
.photo-button img,
.gallery-card img,
.blog-card .blog-cover,
.pastor-image {
  transition: transform 0.35s ease;
}

.album-card:hover .album-cover,
.photo-card:hover .photo-button img,
.gallery-card:hover img,
.blog-card:hover .blog-cover,
.pastor-card:hover .pastor-image {
  transform: scale(1.03);
}

.album-overlay {
  position: absolute;
  inset: auto 0 0;
  padding: 1rem;
  display: flex;
  justify-content: flex-end;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.4));
}

.album-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 700;
}

.photo-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.photo-card:hover,
.album-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.photo-card-actions {
  align-items: center;
}

@media (max-width: 980px) {
  .blog-browser {
    grid-template-columns: 1fr;
  }

  .blog-sidebar {
    position: static;
  }
}

@media (max-width: 720px) {
  .content-nav {
    grid-template-columns: 1fr;
    padding: 0 1.2rem 1.2rem;
  }

  .gallery-manage {
    max-width: none;
  }
}
