/* Strasburg Church of Christ - Modern Elegant Stylesheet */

:root {
  --navy: #1a365d;
  --navy-dark: #0f2440;
  --gold: #c9a227;
  --gold-light: #e8d48b;
  --cream: #faf8f5;
  --white: #ffffff;
  --text: #2d3748;
  --text-light: #4a5568;
  --border: #e2e8f0;
  --shadow: 0 4px 20px rgba(26, 54, 93, 0.08);
  --shadow-lg: 0 10px 40px rgba(26, 54, 93, 0.12);
  --radius: 12px;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 8.5rem;
}

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--cream);
  line-height: 1.7;
  font-size: 17px;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--navy);
  font-weight: 600;
  line-height: 1.25;
}

h1 { font-size: 2.75rem; }
h2 { font-size: 2.1rem; margin-bottom: 1rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }

a {
  color: var(--navy);
  text-decoration: none;
  transition: color 0.2s;
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

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

/* Header / Nav */
.site-header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-link img {
  height: 52px;
  width: auto;
}

.logo-text {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--navy);
  font-weight: 600;
  line-height: 1.2;
}

.logo-text span {
  display: block;
  font-size: 0.75rem;
  color: var(--gold);
  font-family: var(--font-sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.main-nav a {
  padding: 0.5rem 1rem;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text);
  border-radius: 6px;
  transition: all 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
  background: rgba(26, 54, 93, 0.06);
  color: var(--navy);
}

.nav-cta {
  background: var(--navy) !important;
  color: white !important;
  margin-left: 0.5rem;
}

.nav-cta:hover {
  background: var(--navy-dark) !important;
  color: white !important;
}

.mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  padding: 0.45rem 0.75rem;
}

.visit-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 1.25rem;
  padding: 0.45rem 1rem;
  background: var(--navy);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.92rem;
  text-align: center;
}

.visit-bar a {
  color: var(--gold-light);
  font-weight: 600;
}

.visit-bar a:hover {
  color: white;
}

/* Hero */
.hero {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
  color: white;
  overflow: hidden;
}

.hero-bg,
.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 36, 64, 0.78) 0%, rgba(15, 36, 64, 0.45) 48%, rgba(15, 36, 64, 0.22) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
  z-index: 2;
}

.hero h1 {
  color: white;
  font-size: 3.25rem;
  margin-bottom: 1rem;
  max-width: 700px;
}

.hero p {
  font-size: 1.25rem;
  opacity: 0.95;
  max-width: 560px;
  margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--gold);
  color: var(--navy-dark);
}

.btn-primary:hover {
  background: var(--gold-light);
  color: var(--navy-dark);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: white;
  border: 2px solid rgba(255,255,255,0.7);
}

.btn-outline:hover {
  background: white;
  color: var(--navy);
  border-color: white;
}

/* Sections */
.section {
  padding: 4.5rem 1.5rem;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header p {
  color: var(--text-light);
  max-width: 600px;
  margin: 0.75rem auto 0;
}

.section-alt {
  background: var(--white);
}

/* Service Times Card */
.times-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.time-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  text-align: center;
  border-top: 4px solid var(--gold);
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.time-card .icon {
  display: none;
}

.sunday-line {
  text-align: center;
  color: var(--navy);
  font-weight: 600;
  margin: -0.5rem 0 1.25rem;
}

.time-card h3 {
  margin-bottom: 0.5rem;
}

.time-card .time {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  font-family: var(--font-serif);
}

.time-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-top: 0.5rem;
}

/* About / Beliefs */
.beliefs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
}

.belief-card {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 1.75rem;
  border-left: 4px solid var(--navy);
}

.belief-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.belief-card p {
  color: var(--text-light);
  font-size: 0.98rem;
}

/* Articles */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.article-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

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

.article-card-image,
.article-card-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: var(--navy);
  color: white;
  text-align: center;
  font-family: var(--font-serif);
  line-height: 1.3;
  text-decoration: none;
}

.article-card-placeholder span {
  color: white;
  font-size: 1.15rem;
}

.article-card-placeholder:hover span {
  color: var(--gold-light);
}

.article-card-body {
  padding: 1.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-meta {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

.article-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.article-card h3 a:hover {
  color: var(--gold);
}

.article-card p {
  color: var(--text-light);
  font-size: 0.98rem;
  flex: 1;
}

.read-more {
  margin-top: 1.25rem;
  font-weight: 600;
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-info h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.contact-info p, .contact-info a {
  color: var(--text-light);
}

.map-embed {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  height: 360px;
  background: #e2e8f0;
}

.map-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Footer */
.site-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.85);
  padding: 3.5rem 1.5rem 2rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
}

.footer-brand img {
  height: 52px;
  width: auto;
  margin-bottom: 1rem;
  background: #fff;
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
}

.footer-brand p {
  font-size: 0.95rem;
  opacity: 0.8;
  max-width: 320px;
}

.footer-col h4 {
  color: white;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer-col a {
  display: block;
  color: rgba(255,255,255,0.75);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.footer-col a:hover {
  color: var(--gold-light);
}

.footer-bottom {
  max-width: 1200px;
  margin: 2.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.15);
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.7;
}

/* Article Page */
.article-header {
  background: var(--navy);
  color: white;
  padding: 3.5rem 1.5rem 2.5rem;
}

.article-header .section-inner {
  max-width: 800px;
}

.article-header h1 {
  color: white;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.article-header .meta {
  opacity: 0.85;
  font-size: 0.95rem;
}

.article-body {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
  background: var(--white);
  box-shadow: var(--shadow);
  border-radius: 0 0 var(--radius) var(--radius);
}

.article-featured-image {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 2rem;
  display: block;
}

.article-body p {
  margin-bottom: 1.25rem;
}

.article-body ol, .article-body ul {
  margin: 1.25rem 0 1.25rem 1.5rem;
}

.article-body li {
  margin-bottom: 0.75rem;
}

.article-body blockquote {
  border-left: 4px solid var(--gold);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--text-light);
}

.article-body h2,
.article-content h2 {
  margin-top: 2rem;
  scroll-margin-top: 8.5rem;
}

.article-content .scripture,
.article-body .scripture {
  margin: 1.35rem 0;
  padding: 0.15rem 0 0.15rem 1rem;
  border-left: 3px solid var(--gold);
  color: var(--navy-dark);
}

.article-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin: 0 0 1.5rem;
}

.topic-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.5rem;
}

.topic-chip {
  border: 1px solid var(--border);
  background: white;
  color: var(--navy);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.topic-chip.active {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}

.article-search {
  width: min(420px, 100%);
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}

.contact-form {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}

.form-note {
  font-size: 0.92rem;
  color: var(--text-light);
}

.hp-field {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}

.related-studies {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.related-list {
  display: grid;
  gap: 0.65rem;
}

.related-link {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.related-link small {
  color: var(--text-light);
  white-space: nowrap;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
  font-size: 0.82rem;
  opacity: 0.8;
  margin-bottom: 0.35rem;
}

.directions-note {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  margin-top: 1.5rem;
}

h1, h2, h3, .section-header {
  scroll-margin-top: 8.5rem;
}

@media print {
  .site-header,
  .visit-bar,
  .site-footer,
  .related-studies,
  .fn-popover,
  .article-tools {
    display: none !important;
  }
  body {
    background: white;
  }
  .article-body {
    box-shadow: none;
    max-width: none;
  }
}

/* Footnotes / endnotes from Word paste */
sup.fn-ref,
.fn-ref {
  font-size: 0.55em;
  line-height: 0;
  vertical-align: super;
  margin-left: 0.05em;
}
sup.fn-ref a,
a.fn-link {
  color: var(--navy);
  font-weight: 600;
  font-size: 1em;
  text-decoration: none;
  padding: 0;
  border-bottom: none;
  cursor: pointer;
}
sup.fn-ref a:hover,
a.fn-link:hover {
  color: var(--gold);
}
.article-content .footnotes,
.article-body .footnotes {
  margin-top: 2.75rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--border);
  font-size: 0.92rem;
  color: var(--text-light);
}
.article-content .footnotes h3,
.article-body .footnotes h3 {
  font-size: 1.2rem;
  margin-bottom: 0.85rem;
}
.fn-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.fn-list li {
  scroll-margin-top: 8.5rem;
  margin-bottom: 0.85rem;
  padding-left: 0;
  line-height: 1.55;
}
.fn-marker {
  font-weight: 700;
  color: var(--navy);
  margin-right: 0.35rem;
}
.fn-back {
  margin-left: 0.4rem;
  color: var(--navy);
  text-decoration: none;
  font-size: 0.95em;
}
.fn-back:hover { color: var(--gold); }
.fn-body a { word-break: break-word; }

.fn-popover {
  position: absolute;
  z-index: 4000;
  width: min(340px, calc(100vw - 1.5rem));
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  padding: 0.7rem 0.85rem;
  font-size: 0.86rem;
  line-height: 1.5;
  pointer-events: auto;
}
.fn-popover-label {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--navy);
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
  padding-right: 1.5rem;
}
.fn-popover-body { color: var(--text); }
.fn-popover-body a { word-break: break-word; }
.fn-popover-jump {
  display: inline-block;
  margin-top: 0.65rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
}
.fn-popover-close {
  position: absolute;
  top: 0.35rem;
  right: 0.45rem;
  border: none;
  background: transparent;
  font-size: 1.25rem;
  line-height: 1;
  color: #718096;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
}
.fn-popover-close:hover { color: var(--navy); }

/* Page hero (non-home) */
.page-hero {
  background: linear-gradient(135deg, var(--navy-dark), var(--navy));
  color: white;
  padding: 3rem 1.5rem;
  text-align: center;
}

.page-hero h1 {
  color: white;
  margin-bottom: 0.5rem;
}

.page-hero p {
  opacity: 0.9;
  max-width: 560px;
  margin: 0 auto;
}

/* Utility */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }

/* Responsive */
@media (max-width: 900px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .hero h1 {
    font-size: 2.4rem;
  }
}

@media (max-width: 768px) {
  .mobile-toggle {
    display: block;
  }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 1rem;
    box-shadow: var(--shadow-lg);
  }
  .main-nav.open {
    display: flex;
  }
  .main-nav a {
    width: 100%;
    padding: 0.85rem 1rem;
  }
  .nav-cta {
    margin-left: 0;
    text-align: center;
  }
  .logo-text {
    font-size: 1.1rem;
  }
  h1 { font-size: 2.1rem; }
  .hero {
    min-height: 420px;
  }
  .footer-inner {
    grid-template-columns: 1fr;
  }
}

/* Admin specific will be in its own styles if needed */
