/* Simple, modern styles for the church site */
:root {
  --accent: #2c7a7b;
  --dark: #0b1220;
  --muted: #666;
  --container: 1100px;
  --header-height: 72px;
}
* {
  box-sizing: border-box;
}
body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  margin: 0;
  color: var(--dark);
  line-height: 1.5;
  /* Gentle off-white page background to reduce contrast */
  background: #f7f7f8;
}

/* Sticky header: keep nav visible on scroll */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
  z-index: 1000;
  border-bottom: 1px solid rgba(6, 10, 15, 0.04);
}
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1rem;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}
.brand {
  font-weight: 700;
  color: var(--dark);
  text-decoration: none;
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--dark);
  text-decoration: none;
}

/* Icon-only links in the header nav (visible icon, hidden text for screen readers) */
.nav-links a.icon-only {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
}
.nav-links a.icon-only img {
  width: 20px;
  height: 20px;
  display: block;
}
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  font-size: 1.35rem;
  padding: .25rem .6rem;
  min-width: 56px;
  text-align: center;
  border-radius: 6px;
  cursor: pointer;
}

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: static;
  left: auto;
  width: auto;
  height: auto;
  padding: .5rem 1rem;
  background: #fff;
  color: var(--dark);
  z-index: 9999;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* Focus outlines for keyboard navigation */
a:focus,
button:focus,
input:focus,
textarea:focus {
  outline: 3px solid #ffd54f;
  outline-offset: 2px;
}

.hero {
  background-image: linear-gradient(
      rgba(6, 10, 15, 0.45),
      rgba(6, 10, 15, 0.25)
    ),
    url('../images/banner.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 60vh;
  display: flex;
  align-items: center;
}
.hero-overlay {
  width: 100%;
  padding: 4rem 0;
}
.hero-content {
  color: #fff;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}
.hero-divider {
  width: 216px;
  height: 2px;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.85), rgba(255,255,255,0));
  border-radius: 999px;
  margin: 0.25rem auto 0.25rem;
  opacity: 0.9;
}
.hero-block {
  background: rgba(0, 0, 0, 0.5);
  border-radius: 14px;
  padding: 0.75rem 1rem;
  display: inline-block;
  max-width: 100%;
}
.hero-content h1 {
  font-size: clamp(2.25rem, 5vw, 4.5rem);
  margin: 0 0 0.5rem;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 800;
  text-shadow: 0 6px 24px rgba(6,10,15,0.45);
  /* Background handled by .hero-block */
  display: block;
}

/* Inner span remains unstyled; background is applied by .hero-block */
.lead {
  font-size: 1.125rem;
  margin: 0 0 1rem;
}
.btn {
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  text-decoration: none;
}

.hero-services ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0 1.25rem;
  font-size: 1.125rem;
  /* Background handled by .hero-block */
}
.hero-services li {
  margin: 0.35rem 0;
}

.service-featured {
  margin: 0.35rem 0 0.65rem;
  font-weight: 700;
}

.service-secondary {
  color: rgba(255,255,255,0.92);
  opacity: 0.95;
}


.btn-live {
  display: inline-block;
  background: transparent;
  border: 1px solid rgba(6,10,15,0.08);
  padding: 0.5rem;
  border-radius: 12px;
  min-width: 0;
  box-shadow: none;
}

.btn-live:focus {
  outline: 3px solid #ffd54f;
  outline-offset: 3px;
}
.hero-cta { margin-top: 2rem; display: block; }

@media (max-width: 640px) {
  .hero-cta { margin-top: 1rem; display: block; }
  .btn-live { padding: 0.85rem 1rem; }
}

.intro {
  padding: 2.5rem 0;
}
.highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  padding: 1.25rem 0 1rem;
}
.highlights article {
  background: #fff;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 1px 4px rgba(12, 13, 14, 0.06);
}

/* Staff grid */
.staff-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 0;
}
.staff-card {
  background: #fff;
  border-radius: 10px;
  padding: 1.25rem;
  box-shadow: 0 6px 18px rgba(10, 10, 10, 0.04);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  flex-direction: column;
  text-align: left;
}
.staff-card img {
  /* Use a fixed width for staff images and preserve aspect ratio.
     Default (mobile / narrow): 220px wide. Larger screens override to 320px. */
  width: 220px;
  height: auto;
  object-fit: contain; /* do not crop, scale within box */
  border-radius: 12px; /* rounded rectangle */
  flex: 0 0 auto;
  margin: 0 0 0.75rem 0;
}
.staff-card h3 {
  margin: 0 0 0.35rem 0;
}
.staff-card p {
  margin: 0 0 0.5rem 0;
}

.site-footer {
  background: #f7f7f8;
  color: var(--dark);
  padding: 2rem 0 1rem;
  margin-top: 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}
.footer-bottom {
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid #e6e6e6;
}
.site-footer a {
  color: var(--accent);
}

/* Small responsive map embed used in the footer contact area */
/* map-responsive styles removed (unused) */

/* Responsive */
@media (max-width: 1000px) {
  :root { --header-height: 64px; }
  .nav-toggle {
    display: inline-block;
  }
  .brand {
    margin-left: 0.5rem;
  }
  .nav-links {
    position: absolute;
    right: 1rem;
    top: 64px;
    background: #fff;
    border-radius: 8px;
    padding: 1rem;
    display: none;
    flex-direction: column;
    box-shadow: 0 6px 18px rgba(10, 10, 10, 0.08);
  }
  .nav-links.open {
    display: flex;
  }
}

@media (min-width: 880px) {
  /* On larger screens show image left and text to the right */
  .staff-card {
    flex-direction: row;
    align-items: center; /* vertically center image with bio */
  }
  .staff-card img {
    /* On wide screens use a larger fixed width */
    width: 320px;
    height: auto;
    object-fit: contain;
    margin: 0;
  }
  .staff-card > div {
    flex: 1 1 auto;
  }
}

@media (max-width: 879px) {
  .staff-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .staff-card img {
    width: 220px;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
  }
}

/* small utilities */
.text-center {
  text-align: center;
}
.muted {
  color: var(--muted);
}

/* Ministries grid: 2-up cards with big-card spanning both columns */
.ministries-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  padding: 1.25rem 0 1rem;
}
.ministries-grid article {
  background: #fff;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 1px 4px rgba(12, 13, 14, 0.06);
}
.ministries-grid .big-card {
  grid-column: span 2;
}
@media (max-width: 700px) {
  .ministries-grid {
    grid-template-columns: 1fr;
  }
  .ministries-grid .big-card {
    grid-column: auto;
  }
}

/* Smooth scrolling for in-page links */
html {
  scroll-behavior: smooth;
}

/* spacer for content so sticky nav doesn't overlap */
.content-spacer {
  height: var(--header-height);
}

/* Ensure anchored elements are not hidden under the sticky header */
main > section,
section[id] {
  scroll-margin-top: calc(var(--header-height) + 12px);
}

/* For headings inside sections, add a small offset as well */
main h2, main h3 {
  scroll-margin-top: calc(var(--header-height) + 6px);
}

/* Screen reader only (visually hidden but available to assistive tech) */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Icon helpers */
.icon-live {
  width: 20rem;
  height: auto;
  display: block;
  margin: 0 auto;
}

@media (max-width: 640px) {
  .icon-live {
    width: 10rem;
  }
}

/* When the icon is used inside .btn-live, make it smaller and centered */
.btn-live .icon-live {
  width: 14rem;
}

@media (max-width: 640px) {
  .btn-live .icon-live {
    width: 8rem;
  }
}
