/*
  ============================================================
  The MarketPlace Movement — Global Stylesheet
  File: css/style.css
  Description: All site-wide styles. Mobile-first. Custom
  properties declared in :root. Covers navigation, layout,
  typography, components, and all page sections except the
  devotional page (see devotional.css).
  Author: Bezalel (design) + Hiram (structure)
  Last updated: May 2026
  ============================================================
*/


/* ============================================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   Change colors and fonts here — they cascade everywhere.
============================================================ */
:root {
  /* Brand colors */
  --green-dark:   #1a5228;
  --green-mid:    #2d6a35;
  --green-light:  #e8f0ea;
  --gold:         #B8973A;
  --gold-light:   #D4B25A;
  --gold-pale:    #f5ead0;
  --cream:        #F9F6F0;
  --navy:         #0A1F44;
  --text-dark:    #1A1A2E;
  --text-mid:     #2C2C4A;
  --text-muted:   #5a5a72;
  --white:        #ffffff;
  --border-light: #e2ddd5;

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Lato', system-ui, sans-serif;

  /* Spacing scale */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  1.5rem;
  --space-lg:  2.5rem;
  --space-xl:  4rem;
  --space-2xl: 6rem;

  /* Layout */
  --container-max:    1200px;
  --container-narrow: 760px;
  --nav-height:       72px;
  --radius:           4px;
  --radius-md:        8px;

  /* Transitions */
  --transition: 0.2s ease;
}


/* ============================================================
   RESET & BASE
============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-dark);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--green-dark);
  text-decoration: none;
  transition: color var(--transition);
}

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

ul {
  list-style: none;
}

address {
  font-style: normal;
}


/* ============================================================
   TYPOGRAPHY
============================================================ */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-dark);
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }

p {
  margin-bottom: var(--space-sm);
}

p:last-child {
  margin-bottom: 0;
}


/* ============================================================
   LAYOUT — CONTAINERS
============================================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

.container-narrow {
  max-width: var(--container-narrow);
  margin-left: auto;
  margin-right: auto;
}


/* ============================================================
   BUTTONS
============================================================ */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.875rem 2rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition), border-color var(--transition);
  text-decoration: none;
  line-height: 1;
}

/* Primary: green fill — for light backgrounds */
.btn-primary {
  background-color: var(--green-dark);
  color: var(--white);
  border-color: var(--green-dark);
}
.btn-primary:hover {
  background-color: var(--green-mid);
  border-color: var(--green-mid);
  color: var(--white);
}

/* Secondary: outlined green — for light backgrounds */
.btn-secondary {
  background-color: transparent;
  color: var(--green-dark);
  border-color: var(--green-dark);
}
.btn-secondary:hover {
  background-color: var(--green-dark);
  color: var(--white);
}

/* Gold fill — primary CTA on dark backgrounds */
.btn-gold {
  background-color: var(--gold);
  color: var(--white);
  border-color: var(--gold);
}
.btn-gold:hover {
  background-color: var(--gold-light);
  border-color: var(--gold-light);
  color: var(--white);
}

/* Outline white — secondary CTA on dark backgrounds */
.btn-outline-white {
  background-color: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.65);
}
.btn-outline-white:hover {
  background-color: var(--white);
  color: var(--green-dark);
  border-color: var(--white);
}

/* Outline gold — tertiary CTA on dark backgrounds */
.btn-outline-gold {
  background-color: transparent;
  color: var(--gold-light);
  border-color: var(--gold);
}
.btn-outline-gold:hover {
  background-color: var(--gold);
  border-color: var(--gold);
  color: var(--white);
}

/* Legacy accent alias — kept for backward compatibility */
.btn-accent {
  background-color: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.65);
}
.btn-accent:hover {
  background-color: var(--white);
  color: var(--green-dark);
}


/* ============================================================
   GOLD RULE DIVIDER
============================================================ */
.gold-rule {
  width: 60px;
  height: 3px;
  background-color: var(--gold);
  margin: var(--space-sm) 0 var(--space-lg);
}

/* Centered variant */
.gold-rule-center {
  margin-left: auto;
  margin-right: auto;
}


/* ============================================================
   SECTION LABELS (eyebrow text above headings)
============================================================ */
.section-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-xs);
}

.section-label-light {
  color: var(--gold-light);
}

.section-label-gold {
  color: var(--gold-light);
}


/* ============================================================
   SECTION HEADINGS
============================================================ */
.section-heading {
  color: var(--text-dark);
  margin-bottom: 0;
}

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

.section-body-text {
  font-size: 1.05rem;
  color: var(--text-mid);
  margin-bottom: var(--space-lg);
  max-width: 600px;
}


/* ============================================================
   SECTION WRAPPERS — background variants
============================================================ */
.section {
  padding: var(--space-xl) 0;
}

.section-white  { background-color: var(--white); }
.section-cream  { background-color: var(--cream); }
.section-green  { background-color: var(--navy); }   /* all formerly-green dark sections now navy */
.section-navy   { background-color: var(--navy); }


/* ============================================================
   NAVIGATION
============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--navy);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
  height: var(--nav-height);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* Logo area: icon only — wordmark text is too small to read in the nav bar */
.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo-icon {
  height: 44px;
  width: auto;
}

/* Wordmark hidden everywhere — icon alone identifies the brand in the nav */
.nav-logo-wordmark {
  display: none;
}

/* Desktop nav links */
.nav-links {
  display: none; /* hidden on mobile; shown via JS toggle or media query */
  flex-direction: column;
  gap: 0;
  position: absolute;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background-color: var(--navy);
  padding: var(--space-sm) 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.45);
}

.nav-links.is-open {
  display: flex;
}

.nav-link {
  display: block;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  padding: 0.75rem var(--space-md);
  text-decoration: none;
  transition: color var(--transition), background-color var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--gold-light);
  background-color: rgba(255,255,255,0.06);
}

/* Gold accent nav item — Devotional link */
.nav-link-accent {
  color: var(--gold-light);
}
.nav-link-accent:hover {
  color: var(--white);
}

/* Hamburger button */
.nav-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.hamburger-bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--white);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* Animate hamburger to X when open */
.nav-hamburger.is-open .hamburger-bar:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.nav-hamburger.is-open .hamburger-bar:nth-child(2) {
  opacity: 0;
}
.nav-hamburger.is-open .hamburger-bar:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}


/* ============================================================
   NAV CONTACT ICONS — email + phone
   Always visible on all screen sizes. On mobile they sit
   between the logo and hamburger. On desktop they sit to the
   right of the nav links.
============================================================ */
.nav-contact {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  flex-shrink: 0;
}

.nav-contact-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  transition: color var(--transition), background-color var(--transition);
}

.nav-contact-link:hover {
  color: var(--gold-light);
  background-color: rgba(255, 255, 255, 0.08);
}


/* ============================================================
   HERO SECTION (Homepage)
   Full-viewport, dark brand background. Bold, high-impact.

   TO ADD A HERO PHOTOGRAPH:
   Replace the background-image gradient line below with:

     background-image:
       linear-gradient(rgba(10,31,68,0.68), rgba(26,82,40,0.62)),
       url(../assets/images/hero-photo.jpg);
     background-size: cover;
     background-position: center top;

   Name your photo file: assets/images/hero-photo.jpg
   Recommended: 1920x1080px minimum, JPG for file size.
============================================================ */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--navy);
  /* Hero photo with dark overlay — keeps text readable over any image */
  background-image:
    linear-gradient(
      to bottom,
      rgba(5, 10, 18, 0.48) 0%,
      rgba(5, 10, 18, 0.74) 100%
    ),
    url(../assets/images/hero-photo.jpg);
  background-size: cover;
  background-position: center 20%;
  background-attachment: scroll;
  padding: var(--space-2xl) var(--space-md);
  text-align: center;
  border-bottom: 4px solid var(--gold);
  position: relative;
}

.hero-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  position: relative;
  z-index: 1;
}

.hero-icon {
  height: 140px;
  width: auto;
  filter: drop-shadow(0 6px 24px rgba(0, 0, 0, 0.5));
}

/* Wordmark image not displayed in the hero — text heading used instead */
.hero-wordmark {
  display: none;
}

/* Large display heading: ministry name */
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 8vw, 5rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.01em;
  line-height: 1.05;
  margin: 0;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.4);
}

/* "The" appears smaller, italic, gold — above the main name */
.hero-title-the {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 0.55em;
  color: var(--gold-light);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.1em;
}

/* Thin gold rule below the title */
.hero-rule {
  width: 60px;
  height: 2px;
  background-color: var(--gold);
  margin: 0 auto;
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: clamp(0.8rem, 2.2vw, 1rem);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0;
  /* Vision statement — treated with weight, not as a subtitle */
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  align-items: center;
  width: 100%;
  max-width: 340px;
  margin-top: var(--space-xs);
}

/* Full-width buttons on mobile */
.hero-actions .btn {
  width: 100%;
  text-align: center;
}


/* ============================================================
   HERO SCRIPTURE CARD
   Absolute-positioned callout floating over the hero image.
   Hidden on mobile to keep CTAs clear; shown at 768px+.
============================================================ */
.hero-scripture-card {
  display: none;
  position: absolute;
  bottom: var(--space-xl);
  left: var(--space-md);
  max-width: 340px;
  background-color: rgba(10, 31, 68, 0.9);
  border-left: 4px solid var(--gold);
  padding: var(--space-sm) var(--space-md);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  z-index: 2;
}


/* ============================================================
   PAGE HERO (inner pages: Watch, Events, Devotional)
============================================================ */
.page-hero {
  background-color: var(--navy);
  padding: var(--space-xl) var(--space-md);
  border-bottom: 3px solid var(--gold);
}

.page-hero-heading {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--white);
  margin-bottom: var(--space-xs);
}

.page-hero-sub {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 0;
}


/* ============================================================
   ABOUT SECTION
============================================================ */
.about-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.about-text p {
  font-size: 1.05rem;
  color: var(--text-mid);
  line-height: 1.8;
}

.about-card {
  background-color: var(--navy);
  padding: var(--space-lg);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-md);
}

.about-card-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--white);
  line-height: 1.4;
  margin-bottom: var(--space-sm);
}

.about-card-ref {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--gold-light);
  margin-bottom: 0;
}


/* ============================================================
   LEADERSHIP SECTION (about.html)
============================================================ */
.leadership-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.leadership-photo-wrap {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 3px solid var(--gold);
}

.leadership-photo-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

.leadership-photo-placeholder {
  background-color: var(--cream);
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
  border: 2px dashed var(--border-light);
}

.leadership-bio p {
  font-size: 1.05rem;
  color: var(--text-mid);
  line-height: 1.8;
}


/* ============================================================
   SERVICE TIMES — Cards
============================================================ */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

.service-card {
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius-md);
  padding: var(--space-lg) var(--space-md);
  text-align: center;
}

.service-day {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: var(--space-xs);
}

.service-name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--white);
  margin-bottom: var(--space-xs);
}

.service-time {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
  margin-bottom: var(--space-sm);
}

.service-note {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 0;
}


/* ============================================================
   LOCATION SECTION
============================================================ */
.location-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.address-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: var(--space-xs);
}

.location-address address {
  font-size: 1.05rem;
  color: var(--text-mid);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.location-times {
  margin-bottom: var(--space-md);
}

.location-times p {
  font-size: 0.95rem;
  color: var(--text-mid);
  margin-bottom: 0.25rem;
}

.location-directions-btn {
  margin-top: var(--space-xs);
}

.location-map iframe {
  width: 100%;
  border-radius: var(--radius-md);
  display: block;
  border: 2px solid var(--border-light);
}


/* ============================================================
   DEVOTIONAL CTA SECTION
============================================================ -->
*/
.cta-body {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--space-lg);
  line-height: 1.8;
}


/* ============================================================
   EMBED PLACEHOLDERS
   Shown until BoxCast or PCOWidget embed codes are placed.
   Remove these elements from HTML after placing real embeds.
============================================================ */
.boxcast-wrapper,
.calendar-wrapper {
  width: 100%;
}

/* YouTube responsive wrapper — maintains 16:9 ratio at any width */
.youtube-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 2px solid var(--border-light);
}

.youtube-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.embed-placeholder {
  background-color: var(--cream);
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-xl) var(--space-md);
  text-align: center;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.embed-placeholder-inner {
  max-width: 400px;
}

.embed-placeholder-label {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--green-dark);
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.embed-placeholder-note {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0;
}


/* ============================================================
   ALTERNATIVE STREAM LINKS
============================================================ */
.alt-stream-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: flex-start;
}

.alt-stream-btn {
  min-width: 200px;
  text-align: center;
}


/* ============================================================
   FOOTER
============================================================ */
.site-footer {
  background-color: var(--text-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: var(--space-xl) 0 var(--space-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer-icon {
  height: 52px;
  width: auto;
  margin-bottom: var(--space-sm);
  /* Filter to render white on dark background */
  filter: brightness(0) invert(1);
  opacity: 0.85;
}

.footer-tagline {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: var(--space-xs);
}

.footer-address {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0;
}

.footer-nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-nav a {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  transition: color var(--transition);
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-md);
  text-align: center;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 0;
}


/* ============================================================
   RESPONSIVE — TABLET (768px and up)
============================================================ */
@media (min-width: 768px) {

  /* Nav: show links inline, hide hamburger — wordmark stays hidden (icon only) */
  .nav-hamburger {
    display: none;
  }

  .nav-links {
    display: flex;
    flex-direction: row;
    position: static;
    background: none;
    padding: 0;
    box-shadow: none;
    gap: 0.25rem;
  }

  .nav-link {
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius);
  }

  /* Hero: larger icon, row buttons */
  .hero-icon {
    height: 180px;
  }

  .hero-scripture-card {
    display: block;
  }

  .hero-actions {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 600px;
  }

  .hero-actions .btn {
    width: auto;
    min-width: 160px;
  }

  /* About grid: side by side */
  .about-grid {
    flex-direction: row;
    align-items: flex-start;
  }

  .about-text {
    flex: 1;
  }

  .about-aside {
    width: 280px;
    flex-shrink: 0;
  }

  /* Leadership: side by side */
  .leadership-grid {
    flex-direction: row;
    align-items: flex-start;
  }

  .leadership-photo-wrap {
    width: 320px;
    flex-shrink: 0;
  }

  .leadership-bio {
    flex: 1;
  }

  /* Services: two columns */
  .services-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Location: side by side */
  .location-grid {
    flex-direction: row;
    align-items: flex-start;
  }

  .location-address {
    width: 280px;
    flex-shrink: 0;
  }

  .location-map {
    flex: 1;
  }

  /* Footer: two columns */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Alt stream links: row */
  .alt-stream-links {
    flex-direction: row;
  }
}


/* ============================================================
   RESPONSIVE — DESKTOP (1024px and up)
============================================================ */
@media (min-width: 1024px) {

  .hero-icon {
    height: 120px;
  }

  .hero-wordmark {
    max-width: 520px;
  }

  .about-aside {
    width: 320px;
  }
}
