/* Zion Celebration Church — site styles */

:root {
  --accent: #3857F1;
  --accent-dark: #26399e;
  --heading-accent: #c0392b;
  --scripture-color: #2255cc;
  --text: #2b2b2b;
  --text-muted: #5a5a5a;
  --bg: #ffffff;
  --bg-alt: #f5f6f8;
  --border: #e3e5ea;
  --max-width: 1200px;
  --header-max-width: 1600px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 18px;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

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

a:hover,
a:focus {
  text-decoration: underline;
}

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

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  z-index: 100;
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--border);
  padding: 0 1.25rem;
}

.site-header__inner {
  max-width: var(--header-max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

.site-title {
  margin: 0;
  padding: 1rem 0;
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.site-title a {
  color: var(--text);
}

.site-title a:hover {
  text-decoration: none;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 1.5rem;
}

.site-nav a {
  display: inline-block;
  padding: 1rem 0;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a:focus,
.site-nav a[aria-current="page"] {
  text-decoration: none;
  border-bottom-color: var(--accent);
  color: var(--accent);
}

.site-search-icon {
  display: inline-flex;
  align-items: center;
  color: var(--text);
  opacity: 0.7;
}

.site-search-icon svg {
  width: 20px;
  height: 20px;
}

/* Main content */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.75rem 1.25rem 3.5rem;
}

h1 {
  font-size: 2.3rem;
  margin-top: 0;
}

.lead-intro h2 {
  font-size: 1.1rem;
  text-transform: none;
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.homepage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
  margin-top: 2.5rem;
}

.hero-image img {
  width: 100%;
}

.needs-callout p {
  margin: 0 0 1.25rem;
}

.give-link {
  display: inline-block;
}

.give-link img {
  max-width: 260px;
}

@media (max-width: 700px) {
  .homepage-grid {
    grid-template-columns: 1fr;
  }
}

/* Placeholder image blocks used until real images are added */

.placeholder-image {
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(
    45deg,
    var(--bg-alt),
    var(--bg-alt) 10px,
    #ececf1 10px,
    #ececf1 20px
  );
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 1rem;
  width: 100%;
  aspect-ratio: 4 / 5;
  border: 1px dashed #c7cad2;
  border-radius: 4px;
}

/* Simple page placeholder content (used on stub pages) */

.page-placeholder {
  padding: 2rem;
  background: var(--bg-alt);
  border-radius: 4px;
  color: var(--text-muted);
}

/* Page content — headings, tables, quotes (used on inner pages) */

.page-intro p {
  margin: 0 0 1.25rem;
}

.page-image {
  margin: 2rem 0;
}

.page-image img {
  width: 100%;
  max-width: 500px;
}

.page-image .placeholder-image {
  max-width: 500px;
  aspect-ratio: 4 / 3;
}

.page-image figcaption {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-style: italic;
}

h2.section-heading {
  font-size: 1.25rem;
  margin: 2.25rem 0 0.75rem;
}

.values-list {
  margin: 0.5rem 0 1.5rem;
  padding-left: 1.25rem;
}

.values-list li {
  margin-bottom: 0.35rem;
}

.page-centered {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.page-centered p {
  margin: 0 0 1.25rem;
}

h2.section-heading-accent {
  font-size: 1.1rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--heading-accent);
  margin: 2rem 0 0.5rem;
}

.values-list-plain {
  list-style: none;
  margin: 0.5rem 0 1.5rem;
  padding: 0;
}

.values-list-plain li {
  margin-bottom: 0.35rem;
}

.values-list-plain li::before {
  content: "* ";
}

blockquote.scripture {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--accent);
  color: var(--scripture-color);
}

.page-centered blockquote.scripture {
  border-left: none;
  padding: 0;
  text-align: center;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0 2rem;
  font-size: 0.95rem;
}

table.data-table caption {
  text-align: left;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

table.data-table th,
table.data-table td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

table.data-table th {
  background: var(--bg-alt);
  font-weight: 600;
}

.table-scroll {
  overflow-x: auto;
  margin: 1rem 0 2rem;
}

.gallery-grid {
  margin-top: 1.5rem;
}

.gallery-row {
  display: flex;
  margin-bottom: 4px;
}

.gallery-group {
  display: flex;
  flex-direction: column;
  margin-right: 4px;
}

.gallery-group:last-child {
  margin-right: 0;
}

.gallery-item {
  position: relative;
  display: block;
  padding: 0;
  margin: 0 0 4px;
  border: none;
  overflow: hidden;
  cursor: pointer;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
}

.gallery-item:last-child {
  margin-bottom: 0;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-item .placeholder-image {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 0;
}

.gallery-item.is-missing {
  border: 2px dashed #d9822b;
}

.placeholder-image.missing {
  background: #fff6ec;
  color: #7a4a12;
  font-size: 0.8rem;
  line-height: 1.4;
  padding: 0.75rem;
}

.placeholder-image.missing strong {
  display: block;
  color: #b5560a;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}

.gallery-caption-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 0.85rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.gallery-item:hover .gallery-caption-overlay,
.gallery-item:focus .gallery-caption-overlay {
  opacity: 1;
}

/* Lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
}

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

.lightbox-content {
  position: relative;
  max-width: min(90vw, 900px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-image-wrap {
  position: relative;
  max-height: 78vh;
  display: flex;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  display: block;
}

.lightbox-nav-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}

.lightbox-nav-zone.prev { left: 0; }
.lightbox-nav-zone.next { right: 0; }

.lightbox-caption {
  color: #fff;
  text-align: center;
  margin-top: 0.75rem;
  font-size: 0.95rem;
}

.lightbox-counter {
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

.lightbox-close {
  position: absolute;
  top: -2.5rem;
  right: -0.5rem;
  background: transparent;
  border: none;
  padding: 0.5rem;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 600px) {
  .lightbox-close {
    top: -3rem;
    right: 0;
  }
}

.contact-block {
  margin: 1.5rem 0;
}

.contact-block p {
  margin: 0 0 0.75rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 1.25rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.site-footer a {
  color: var(--text-muted);
}

/* Responsive */

@media (max-width: 600px) {
  .site-nav ul {
    gap: 0.25rem 1rem;
  }

  h1 {
    font-size: 1.5rem;
  }
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}


/* Header: single line on desktop, menu button on smaller screens */

.site-header__inner {
  flex-wrap: nowrap;
  gap: 0.25rem 1.25rem;
}

.site-title {
  font-size: 1.35rem;
  white-space: nowrap;
}

.site-nav ul {
  flex-wrap: nowrap;
  gap: 0 1.15rem;
}

.site-nav a {
  font-size: 0.92rem;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.45rem 0.75rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 1100px) {
  .site-header__inner {
    flex-wrap: wrap;
  }

  .site-title {
    font-size: 1.3rem;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    width: 100%;
    border-top: 1px solid var(--border);
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav a {
    display: block;
    padding: 0.75rem 0;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 480px) {
  .site-header {
    padding: 0 0.9rem;
  }

  .site-header__inner {
    gap: 0.25rem 0.5rem;
  }

  .site-title {
    font-size: clamp(0.78rem, 4.4vw, 1.05rem);
  }

  .nav-toggle__label {
    display: none;
  }
}
