/* ===================================================================
   New Freedom Ministries — shared stylesheet
   Used by index.html and ministries.html. Extracted from the two pages'
   previously-separate <style> blocks (2026-08-16). Edit here once —
   changes apply to every page that links this file.
   =================================================================== */

:root {
  --flame-red: #C1272D;
  --flame-orange: #F0631D;
  --ember-orange: #B8580A;
  --header-accent: #9B4A08;
  --flame-gold: #FBB040;
  --charcoal: #241C15;
  --header-footer-bg: #F5E4CB;
  --warm-gray: #6b5d52;
  --cream: #FFFBF5;
  --card-bg: #FFFFFF;
  --border: #EDE1D3;
  --deep-wash: #F5E4CB;
  --max-width: 1100px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 130px; }

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

h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.2;
}

a { color: var(--flame-orange); }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header (shared by every page) ---------- */
header {
  background: var(--header-footer-bg);
  color: var(--charcoal);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  flex-wrap: wrap;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand:hover .brand-name { color: var(--header-accent); }

.logo-img { height: 44px; width: auto; display: block; }

.brand-name {
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: bold;
  color: var(--charcoal);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

nav a {
  color: var(--charcoal);
  text-decoration: none;
  font-size: 15px;
  opacity: 0.9;
}

nav a:hover { opacity: 1; color: var(--header-accent); }

nav a[aria-current="page"] {
  opacity: 1;
  color: var(--header-accent);
  font-weight: 600;
}

/* ---------- Hero (index.html home page) ---------- */
.hero-logo-wrap {
  display: inline-block;
  margin-bottom: 18px;
}

.hero-logo {
  height: 120px;
  width: auto;
  display: block;
  filter: drop-shadow(0 4px 14px rgba(0,0,0,0.45));
}

.hero {
  background: linear-gradient(135deg, #1F1140 0%, #33206B 55%, #4A3390 100%);
  color: #fff;
  padding: 72px 24px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(30px, 5vw, 46px);
  margin-bottom: 14px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.hero p {
  font-size: 18px;
  max-width: 620px;
  margin: 0 auto 28px;
  opacity: 0.97;
}

.btn-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Page hero (ministries.html and any future interior page) ---------- */
.page-hero {
  background: linear-gradient(135deg, #1F1140 0%, #33206B 55%, #4A3390 100%);
  color: #fff;
  padding: 56px 24px;
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(28px, 4.5vw, 42px);
  margin-bottom: 12px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.page-hero p {
  font-size: 17px;
  max-width: 640px;
  margin: 0 auto;
  opacity: 0.97;
}

/* ---------- Buttons (shared) ---------- */
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  font-size: 15px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--flame-orange);
  color: #fff;
}

.btn-light {
  background: #fff;
  color: var(--ember-orange);
}

/* ---------- Sections (shared) ---------- */
section { padding: 64px 24px; }

section .wrap { }

.section-title {
  font-size: 30px;
  margin-bottom: 8px;
  text-align: center;
}

.section-subtitle {
  text-align: center;
  color: var(--warm-gray);
  max-width: 640px;
  margin: 0 auto 40px;
  font-size: 16px;
}

.alt-bg {
  position: relative;
  background: #FFF6E8;
  border-bottom: 1px solid var(--border);
}

.alt-bg::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--flame-red), var(--flame-orange), var(--flame-gold));
}

.deep-bg {
  position: relative;
  background: var(--deep-wash);
  border-bottom: 1px solid var(--border);
}

.deep-bg::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--flame-red), var(--flame-orange), var(--flame-gold));
}

/* ---------- Service times (index.html) ---------- */
.times-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.time-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-top: 4px solid var(--flame-orange);
  border-radius: 10px;
  padding: 28px;
  text-align: center;
}

.time-card .day {
  font-family: Georgia, serif;
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 6px;
}

.time-card .time {
  font-size: 28px;
  color: var(--ember-orange);
  font-weight: bold;
  margin-bottom: 8px;
}

.location-line {
  text-align: center;
  font-size: 16px;
  color: var(--warm-gray);
}

.location-line a { font-weight: 600; }

/* ---------- What's Happening (index.html weekly/monthly gatherings) ---------- */
.group-heading {
  text-align: center;
  font-size: 20px;
  color: var(--ember-orange);
  margin: 36px 0 16px;
}

.group-heading:first-of-type { margin-top: 0; }

.ministry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.ministry-grid.single-card {
  max-width: 340px;
}

.ministry-grid.two-card {
  max-width: 620px;
}

.ministry-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px;
  text-align: center;
}

.ministry-card .ministry-day {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ember-orange);
  margin-bottom: 6px;
}

.ministry-card .ministry-name {
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 6px;
}

.ministry-card .ministry-time {
  color: var(--warm-gray);
  font-size: 15px;
}

/* ---------- About (index.html) ---------- */
.about-text {
  max-width: 720px;
  margin: 0 auto;
  font-size: 17px;
  text-align: center;
}

.about-verse {
  max-width: 720px;
  margin: 14px auto 0;
  font-size: 14px;
  font-style: italic;
  color: var(--warm-gray);
  text-align: center;
}

/* ---------- Two-column feature: Food Pantry / Give / Watch (index.html) ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 30px;
}

.feature-card h3 {
  font-size: 20px;
  margin-bottom: 10px;
  color: var(--ember-orange);
}

.feature-card p { margin-bottom: 16px; color: var(--charcoal); }

.watch-buttons { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Contact (index.html) ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 30px;
  max-width: 800px;
  margin: 0 auto;
}

.contact-item h3 {
  font-size: 20px;
  margin-bottom: 6px;
  color: var(--ember-orange);
}

/* ---------- Ministry story cards (ministries.html) ---------- */
.story-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-top: 4px solid var(--flame-orange);
  border-radius: 10px;
  padding: 30px;
  max-width: 900px;
  margin: 0 auto 40px;
}

.story-card:last-child { margin-bottom: 0; }

.story-card h3 {
  font-size: 22px;
  color: var(--ember-orange);
  margin-bottom: 4px;
}

.story-card .story-partner {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--warm-gray);
  margin-bottom: 14px;
}

.story-card p.story-text {
  font-size: 16px;
  margin-bottom: 20px;
}

/* ---------- Photo gallery grid (ministries.html) ---------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.photo-tile {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: none;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: var(--border);
}

.photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease;
}

.photo-tile:hover img { transform: scale(1.06); }

.photo-tile:focus-visible {
  outline: 3px solid var(--flame-orange);
  outline-offset: 2px;
}

/* ---------- Food Pantry cross-link card (ministries.html) ---------- */
.crosslink-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 26px 30px;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.crosslink-card h3 {
  font-size: 20px;
  color: var(--ember-orange);
  margin-bottom: 8px;
}

.crosslink-card p { margin-bottom: 14px; }

/* ---------- Lightbox (ministries.html) ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(36, 28, 21, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}

.lightbox.open { display: flex; }

.lightbox-inner {
  max-width: 900px;
  max-height: 90vh;
  width: 100%;
  text-align: center;
}

.lightbox img {
  max-width: 100%;
  max-height: 72vh;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

.lightbox-caption {
  color: #fff;
  margin-top: 14px;
  font-size: 15px;
  opacity: 0.9;
}

.lightbox-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
}

.lightbox-btn {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 6px;
  padding: 10px 18px;
  font-size: 15px;
  cursor: pointer;
}

.lightbox-btn:hover { background: rgba(255,255,255,0.22); }

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: transparent;
  color: #fff;
  border: none;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
}

/* ---------- Footer (shared by every page) ---------- */
footer {
  background: var(--header-footer-bg);
  color: var(--warm-gray);
  border-top: 1px solid var(--border);
  padding: 36px 24px;
  text-align: center;
  font-size: 14px;
}

footer a { color: var(--header-accent); }

.footer-links {
  margin-top: 10px;
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  html { scroll-padding-top: 170px; }
  .header-inner { flex-direction: column; align-items: flex-start; }
  nav ul { gap: 14px; }
  section { padding: 48px 20px; }
  .story-card { padding: 22px; }
}
