/* ===================================================
   Mt. Calvary Baptist Church — Global Stylesheet
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Source+Sans+3:wght@300;400;600;700&display=swap');

/* --- Variables --- */
:root {
  --navy:      #1c2d4f;
  --navy-dark: #131f38;
  --burgundy:  #7a1e2e;
  --burgundy-light: #9b2538;
  --white:     #ffffff;
  --off-white: #f7f6f3;
  --gray-light: #e8e6e1;
  --gray-mid:  #b0aaa0;
  --gray-text: #5a5550;
  --black:     #1a1815;

  --font-head: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;

  --max-width: 1100px;
  --section-pad: 80px 20px;
}

/* --- Reset / Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  color: var(--black);
  background: var(--white);
}

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

a { color: var(--burgundy); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Utility --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section-label {
  display: block;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--burgundy);
  margin-bottom: 10px;
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 18px;
}

.section-title.light { color: var(--white); }

.lead {
  font-size: 1.1rem;
  color: var(--gray-text);
  max-width: 680px;
  margin-bottom: 40px;
}

.lead.light { color: rgba(255,255,255,0.82); }

.divider {
  width: 56px;
  height: 3px;
  background: var(--burgundy);
  margin: 18px 0 32px;
}

.divider.center { margin-left: auto; margin-right: auto; }
.divider.light { background: rgba(255,255,255,0.5); }

.btn {
  display: inline-block;
  padding: 13px 32px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--burgundy);
  color: var(--white);
  border: 2px solid var(--burgundy);
}
.btn-primary:hover {
  background: var(--burgundy-light);
  border-color: var(--burgundy-light);
  text-decoration: none;
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.7);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--white);
  text-decoration: none;
  color: var(--white);
}

.btn-outline-navy {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
}
.btn-outline-navy:hover {
  background: var(--navy);
  color: var(--white);
  text-decoration: none;
}

/* --- Top Bar --- */
.top-bar {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  padding: 7px 24px;
}
.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.top-bar a { color: rgba(255,255,255,0.7); }
.top-bar a:hover { color: var(--white); text-decoration: none; }
.top-bar .sep { margin: 0 10px; opacity: 0.4; }

/* --- Header / Navigation --- */
.site-header {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.logo-mark {
  width: 50px;
  height: 50px;
  background: var(--burgundy);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-mark svg {
  width: 28px;
  height: 28px;
  fill: var(--white);
}

.logo-text { line-height: 1.2; }
.logo-text .name {
  display: block;
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.01em;
}
.logo-text .tagline {
  display: block;
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.04em;
  font-weight: 300;
}

/* Nav */
.primary-nav { display: flex; gap: 0; list-style: none; align-items: center; }
.primary-nav li { position: relative; }
.primary-nav > li > a {
  display: block;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.80);
  text-decoration: none;
  transition: color 0.15s;
}
.primary-nav > li > a:hover,
.primary-nav > li > a.active { color: var(--white); }
.primary-nav > li > a.active::after {
  content: '';
  display: block;
  height: 2px;
  background: var(--burgundy);
  margin-top: 4px;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--white);
  transition: 0.2s;
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  background: var(--navy-dark);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--navy-dark) 0%, #2a4070 50%, var(--navy-dark) 100%);
  opacity: 1;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.025'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 100px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

.hero-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 16px;
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
  max-width: 700px;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.75);
  max-width: 560px;
  margin-bottom: 38px;
  font-weight: 300;
  line-height: 1.8;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* Image placeholder */
.img-placeholder {
  background: var(--gray-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--gray-mid);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 2px dashed var(--gray-mid);
  border-radius: 2px;
  gap: 10px;
}
.img-placeholder svg { opacity: 0.45; }

/* --- Service Times Banner --- */
.service-bar {
  background: var(--burgundy);
  padding: 0;
}
.service-bar .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.service-item {
  padding: 24px 20px;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.15);
}
.service-item:last-child { border-right: none; }
.service-item .day {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  margin-bottom: 4px;
}
.service-item .service-name {
  font-family: var(--font-head);
  font-size: 1.05rem;
  color: var(--white);
  font-weight: 600;
}
.service-item .time {
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  margin-top: 3px;
}

/* --- Welcome Section --- */
.section-welcome {
  padding: var(--section-pad);
  background: var(--white);
}
.welcome-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

/* --- Scripture Band --- */
.scripture-band {
  background: var(--navy);
  padding: 60px 24px;
  text-align: center;
}
.scripture-band blockquote {
  max-width: 760px;
  margin: 0 auto;
}
.scripture-text {
  font-family: var(--font-head);
  font-size: clamp(1.3rem, 2.5vw, 1.9rem);
  font-style: italic;
  color: var(--white);
  line-height: 1.55;
  margin-bottom: 16px;
}
.scripture-ref {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}

/* --- Gospel Section --- */
.section-gospel {
  padding: var(--section-pad);
  background: var(--off-white);
}
.gospel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 44px;
}
.gospel-card {
  background: var(--white);
  border-top: 4px solid var(--burgundy);
  padding: 36px 28px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}
.gospel-card .card-num {
  font-family: var(--font-head);
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--gray-light);
  line-height: 1;
  margin-bottom: 12px;
}
.gospel-card h3 {
  font-family: var(--font-head);
  font-size: 1.25rem;
  color: var(--navy);
  margin-bottom: 14px;
}
.gospel-card p {
  font-size: 15px;
  color: var(--gray-text);
  line-height: 1.7;
}
.gospel-card .verse-ref {
  display: block;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--burgundy);
  letter-spacing: 0.04em;
}

/* --- Pastor Preview --- */
.section-pastor-preview {
  padding: var(--section-pad);
  background: var(--white);
}
.pastor-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 64px;
  align-items: center;
}
.pastor-photo-wrap {
  position: relative;
}
.pastor-photo-wrap .img-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  font-size: 13px;
}
.pastor-photo-wrap::after {
  content: '';
  position: absolute;
  bottom: -14px;
  right: -14px;
  width: 80%;
  height: 80%;
  border: 3px solid var(--burgundy);
  z-index: -1;
}

/* --- Location / Visit --- */
.section-visit {
  padding: var(--section-pad);
  background: var(--navy);
}
.visit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.visit-info { color: rgba(255,255,255,0.85); }
.visit-info h3 {
  font-family: var(--font-head);
  font-size: 1.2rem;
  color: var(--white);
  margin: 28px 0 10px;
}
.visit-info h3:first-child { margin-top: 0; }
.visit-info p, .visit-info address {
  font-style: normal;
  font-size: 15px;
  color: rgba(255,255,255,0.7);
  line-height: 1.7;
}
.visit-info a { color: rgba(255,255,255,0.75); }
.visit-info a:hover { color: var(--white); }
.map-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: rgba(255,255,255,0.08);
  border: 2px dashed rgba(255,255,255,0.2);
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.4);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  gap: 10px;
}

/* --- Facebook / Donate Strip --- */
.cta-strip {
  background: var(--off-white);
  border-top: 1px solid var(--gray-light);
  border-bottom: 1px solid var(--gray-light);
  padding: 40px 24px;
}
.cta-strip .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}
.cta-item {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--navy);
  font-weight: 600;
  font-size: 15px;
  transition: color 0.15s;
}
.cta-item:hover { color: var(--burgundy); text-decoration: none; }
.cta-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cta-icon.fb  { background: #1877f2; }
.cta-icon.don { background: var(--burgundy); }
.cta-icon svg { fill: white; width: 22px; height: 22px; }
.cta-sep {
  width: 1px;
  height: 40px;
  background: var(--gray-light);
}

/* --- Footer --- */
.site-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.6);
  font-size: 14px;
}
.footer-main {
  padding: 60px 24px 40px;
}
.footer-main .container {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}
.footer-brand .name {
  font-family: var(--font-head);
  font-size: 1.2rem;
  color: var(--white);
  margin-bottom: 6px;
}
.footer-brand .tagline {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 18px;
  line-height: 1.5;
}
.footer-brand p {
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255,255,255,0.5);
  max-width: 280px;
}
.footer-col h4 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a {
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.15s;
}
.footer-col ul li a:hover { color: var(--white); }
.footer-col address {
  font-style: normal;
  line-height: 1.8;
  font-size: 14px;
}
.footer-col address a { color: rgba(255,255,255,0.6); }
.footer-col address a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 24px;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.3);
}

/* --- Inner Page Hero --- */
.page-hero {
  background: var(--navy);
  padding: 64px 24px 56px;
  border-bottom: 4px solid var(--burgundy);
}
.page-hero .section-label { color: rgba(255,255,255,0.5); }
.page-hero .section-title { color: var(--white); margin-bottom: 0; }

/* --- Content grids (image + text pairs) --- */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.values-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.articles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

/* --- About Page --- */
.section-standard {
  padding: var(--section-pad);
  background: var(--white);
}
.section-standard.alt { background: var(--off-white); }

.about-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 44px;
}
.about-card {
  padding: 36px 28px;
  border: 1px solid var(--gray-light);
  background: var(--white);
  text-align: center;
  transition: box-shadow 0.2s;
}
.about-card:hover { box-shadow: 0 4px 24px rgba(0,0,0,0.08); }
.about-card .card-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.about-card .card-icon svg { fill: white; width: 26px; height: 26px; }
.about-card h3 {
  font-family: var(--font-head);
  font-size: 1.2rem;
  color: var(--navy);
  margin-bottom: 12px;
}
.about-card p { font-size: 15px; color: var(--gray-text); line-height: 1.7; }

/* --- Belief List --- */
.belief-list { list-style: none; margin-top: 24px; }
.belief-list li {
  padding: 18px 0;
  border-bottom: 1px solid var(--gray-light);
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.belief-list li:last-child { border-bottom: none; }
.belief-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--burgundy);
  margin-top: 8px;
  flex-shrink: 0;
}
.belief-list li .belief-title {
  font-family: var(--font-head);
  font-size: 1.05rem;
  color: var(--navy);
  font-weight: 600;
  margin-bottom: 4px;
}
.belief-list li p { font-size: 15px; color: var(--gray-text); line-height: 1.7; margin: 0; }

/* --- Contact Page --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.contact-detail {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 32px;
}
.contact-detail-icon {
  width: 46px;
  height: 46px;
  background: var(--navy);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-detail-icon svg { fill: white; width: 22px; height: 22px; }
.contact-detail-text h4 {
  font-family: var(--font-head);
  font-size: 1rem;
  color: var(--navy);
  font-weight: 700;
  margin-bottom: 4px;
}
.contact-detail-text p,
.contact-detail-text a {
  font-size: 15px;
  color: var(--gray-text);
  line-height: 1.7;
  text-decoration: none;
}
.contact-detail-text a:hover { color: var(--burgundy); }

/* --- Responsive --- */
@media (max-width: 900px) {
  .welcome-grid,
  .pastor-grid,
  .visit-grid,
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }

  .content-grid { grid-template-columns: 1fr; gap: 40px; }
  .values-grid { grid-template-columns: 1fr; }
  .articles-grid { grid-template-columns: 1fr; }

  .gospel-grid,
  .about-cards { grid-template-columns: 1fr 1fr; }

  .footer-main .container { grid-template-columns: 1fr 1fr; gap: 36px; }

  .service-bar .container { grid-template-columns: 1fr 1fr; }
  .service-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.15); }
  .service-item:nth-child(even) { border-right: none; }
  .service-item:last-child { border-bottom: none; }

  .pastor-photo-wrap::after { display: none; }

  /* Bring image to top when it's the second child (text-left/image-right layouts) */
  .content-grid.img-right > div:last-child { order: -1; }
}

@media (max-width: 640px) {
  :root { --section-pad: 56px 20px; }

  .top-bar .container { justify-content: center; text-align: center; }

  /* Nav toggle: keep logo and toggle on one row, no wrapping */
  .site-header .container { position: relative; flex-wrap: nowrap; }

  .primary-nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--navy-dark);
    padding: 16px 0;
    gap: 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    z-index: 999;
  }
  .primary-nav.open { display: flex; }
  .primary-nav > li > a { padding: 12px 24px; font-size: 13px; }

  .nav-toggle { display: flex; flex-shrink: 0; margin-left: auto; }

  .gospel-grid,
  .about-cards { grid-template-columns: 1fr; }

  .footer-main .container { grid-template-columns: 1fr; gap: 32px; }

  .service-bar .container { grid-template-columns: 1fr 1fr; }

  .hero-content { padding: 72px 20px; }

  .hero-actions { justify-content: center; }

  /* CTA strip: stack buttons vertically, centered */
  .cta-strip .container { flex-direction: column; gap: 20px; }
  .cta-sep { width: 60px; height: 1px; }

  /* Center "Our History & Mission" button on mobile */
  .mobile-center-btn { display: block; text-align: center; }

  /* Pastor photo: center and prevent overflow */
  .pastor-photo-wrap { max-width: 300px; margin: 0 auto; overflow: visible; }
  .pastor-grid { overflow: hidden; }
}
