/* =========================
   Greater Second MBC
   styles.css (modern + photo-forward)
   ========================= */

/* ----- Reset / Base ----- */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
::selection { background: rgba(0, 0, 0, 0.25); }

/* ----- Theme Tokens ----- */
:root{
  --bg: #ffffff;
  --surface: #ffffff;
  --soft: #f4f6f8;
  --text: #006308;
  --muted: rgba(15, 23, 42, .72);
  --muted2: rgba(15, 23, 42, .55);

  --green: #0e8a42;
  --green2: #0b6f35;
  --gold: #d4af37;
  --navy: #0b1220;

  --border: #e5e7eb;
  --shadow: 0 14px 40px rgba(2, 6, 23, .10);
  --shadow2: 0 10px 26px rgba(2, 6, 23, .08);

  --radius: 18px;
  --radius2: 24px;

  --container: 1120px;
}

/* ----- Layout Helpers ----- */
.container{
  width: min(var(--container), calc(100% - 40px));
  margin: 0 auto;
}
.small { font-size: .9rem; }
.muted { color: var(--muted); }
.kicker{
  display: inline-block;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .78rem;
  color: rgba(14, 138, 66, .95);
}
.sep{
  border: 0;
  border-top: 1px solid var(--border);
  margin: 1.1rem 0;
}

/* ----- Topbar ----- */
.topbar{
  background: rgba(2, 6, 23, .88);
  color: rgba(255,255,255,.86);
  font-weight: 650;
  font-size: .9rem;
}
.topbar .row{
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: .55rem 0;
}
.topbar .links{
  display: flex;
  gap: .9rem;
}
.topbar a{
  color: rgba(255,255,255,.88);
  opacity: .95;
}
.topbar a:hover{ opacity: 1; text-decoration: underline; }

/* ----- Header / Nav ----- */
header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(229,231,235,.7);
}
.nav{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem 0;
}
.brand{
  display: flex;
  align-items: center;
  gap: .8rem;
}
.logo{
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(135deg, #d7e65f 0%, #1f6b3b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.logo img{
  width: auto;
  height: auto;
  display: block;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.22));
}
.name strong{ display: block; font-size: 1rem; }
.name span{ display: block; color: var(--muted2); font-weight: 650; font-size: .88rem; }

.nav-links{
  display: flex;
  gap: 1.1rem;
  align-items: center;
  font-weight: 750;
  color: rgba(15,23,42,.85);
}
.nav-links a{
  padding: .45rem .2rem;
  border-radius: 10px;
}
.nav-links a:hover{
  color: rgba(15,23,42,1);
  background: rgba(2,6,23,.03);
}

.nav-cta{
  display: flex;
  gap: .6rem;
  align-items: center;
}

/* Hamburger */
.hamburger{
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 14px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0;
}
.hamburger span{
  display: block;
  width: 18px;
  height: 2px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 999px;
}

/* ----- Buttons ----- */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .72rem 1rem;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 900;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
  user-select: none;
}
.btn:active{ transform: translateY(1px); }

.btn.primary{
  background: var(--green);
  color: #fff;
  box-shadow: 0 12px 26px rgba(14,138,66,.18);
}
.btn.primary:hover{ background: var(--green2); }

.btn.gold{
  background: var(--gold);
  color: #1b2333;
  box-shadow: 0 12px 26px rgba(212,175,55,.18);
}
.btn.gold:hover{ filter: brightness(.98); }

.btn.outline{
  background: transparent;
  border-color: var(--border);
  color: rgba(15,23,42,.92);
}
.btn.outline:hover{ background: rgba(2,6,23,.04); }

.iconbtn{
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 14px;
  padding: .6rem .85rem;
  font-weight: 900;
  cursor: pointer;
}
.iconbtn:hover{ background: rgba(2,6,23,.04); }

/* ----- Hero (FULL BLEED VIDEO) ----- */
.hero{
  position: relative;
  width: 100%;
  height: 85vh;
  min-height: 560px;
  overflow: hidden;
  background: var(--navy); /* fallback */
  border-bottom: 1px solid var(--border);
}

.hero-media{
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.hero-video-bg{
  position: absolute;
  inset: 0;
  width: 101%;
  height: 101%;
  object-fit: cover;
  transform: scale(1.02);
  opacity: .62;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      rgba(0, 0, 0, 0),
      rgba(0, 0, 0, 0)
    ),
    radial-gradient(
      circle at center,
      rgba(0,0,0,0.35),
      rgba(0,0,0,0.75)
    );
}

.hero-content h1 {
  color: #ffffff;
}

.hero-content h1 {
  text-shadow:
    0 3px 12px rgba(0,0,0,0.65),
    0 1px 2px rgba(0,0,0,0.85);
}

.hero-content{
  position: relative;
  z-index: 2;
  height: 100%;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  padding: 0 20px;
  color: #ffffff;
}

.hero-content h1{
  margin: .7rem 0 .6rem;
  font-size: clamp(2.05rem, 4.2vw, 3.15rem);
  line-height: 1.08;
  letter-spacing: -.02em;
  max-width: 900px;
}
.hero-content p{
  margin: 0;
  font-size: 1.05rem;
  color: rgba(255,255,255,.86);
  max-width: 720px;
  font-weight: 650;
}

.hero-actions{
  display: flex;
  gap: .7rem;
  flex-wrap: wrap;
  margin-top: 1.2rem;
  justify-content: center;
}

.hero-pills{
  display: flex;
  gap: .6rem .9rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1.25rem;
}
.pill{
  display: inline-flex;
  align-items: center;
  padding: .42rem .7rem;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.16);
  color: rgba(255,255,255,.88);
  font-weight: 750;
  font-size: .92rem;
}

/* Reduced motion: hide video */
@media (prefers-reduced-motion: reduce){
  .hero-video-bg{ display: none; }
  .hero-media{
    background: url("images/hero-poster.webp") center/cover no-repeat;
  }
}

/* ----- Page Head ----- */
.pagehead{
  padding: 3rem 0 1.6rem;
  background:
    radial-gradient(60% 60% at 10% 10%, rgba(14,138,66,.08), transparent 60%),
    linear-gradient(to bottom, #fff, #fff);
  border-bottom: 1px solid var(--border);
}
.pagehead h1{
  margin: .55rem 0 .35rem;
  font-size: clamp(1.9rem, 3.6vw, 2.55rem);
  letter-spacing: -.02em;
}
.pagehead p{
  margin: 0;
  color: var(--muted);
  font-weight: 650;
}
.crumb{
  color: rgba(6, 123, 31, 0.55);
  font-weight: 750;
  font-size: .92rem;
}

/* ----- Sections ----- */
.section{
  padding: 70px 0;
  background: var(--surface);
}
.section.alt{
  background: var(--soft);
}
.section.tight{
  padding: 52px 0;
}

/* ----- Grid / Cards ----- */
.grid{
  display: grid;
  gap: 1.2rem;
}
.grid.tiles{
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 980px){
  .grid.tiles{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px){
  .grid.tiles{ grid-template-columns: 1fr; }
}

.card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(2,6,23,.06);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover{
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(2,6,23,.10);
  border-color: rgba(229,231,235,.9);
}
/* Image container (fixes sizing issue) */
.card .img {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
  background: #f4f6f8; /* adds padding look */
}

.card .img img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* 👈 KEY FIX */
  display: block;
}

.card .img img {
  object-position: center top;
}

.card .img {
  aspect-ratio: 3 / 4; /* portrait ratio for people */
}

.card .body{
  padding: 1rem 1rem 1.15rem;
}
.card h3{
  margin: .55rem 0 .35rem;
  letter-spacing: -.01em;
}
.card p{
  margin: 0;
  color: var(--muted);
  font-weight: 650;
}

.tag{
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .28rem .6rem;
  border-radius: 999px;
  border: 1px solid rgba(14,138,66,.22);
  background: rgba(14,138,66,.08);
  color: rgba(14,138,66,.95);
  font-weight: 900;
  font-size: .78rem;
}

.card .img {
  width: 100%;
  height: 200px; /* controls box height */
  overflow: hidden;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
}

.card .img img {
  width: 100%;
  height: 100%;
object-fit: cover;
  display: block;
}

.card .img img {
  transition: transform 0.3s ease;
}

.card:hover .img img {
  transform: scale(1.05);
}

/* Announcement list */
.announcement-list {
  margin-top: 1.5rem;
  display: grid;
  gap: 1rem;
}

/* Each item */
.announcement-item {
  display: flex;
  gap: 1.2rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.95);
  align-items: flex-start;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.announcement-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(0,0,0,0.06);
}

.announcement-date {
  min-width: 130px;
  font-weight: 800;
  color: var(--green);
  flex-shrink: 0;
}

.announcement-content {
  flex: 1;
}

.announcement-content strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.announcement-content p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.announcement-item.highlight {
  border-left: 4px solid #2563eb;
  background: rgba(37, 99, 235, 0.04);
}

/* Mobile */
@media (max-width: 768px) {
  .announcement-item {
    flex-direction: column;
    gap: 0.5rem;
  }

  .announcement-date {
    min-width: auto;
  }
}

/* ----- Panels / Two Column ----- */
.panel{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 26px rgba(2,6,23,.06);
  padding: 1.2rem;
}
.twocol{
  display: grid;
  grid-template-columns: 1.25fr .9fr;
  gap: 1.2rem;
  align-items: stretch;
}
@media (max-width: 980px){
  .twocol{ grid-template-columns: 1fr; }
}

/* ----- Events List (timeline style) ----- */
.events{
  display: grid;
  gap: .75rem;
}
.event{
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: .85rem;
  align-items: center;
  padding: .85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 26px rgba(2,6,23,.05);
}
.datebox{
  width: 62px;
  height: 62px;
  border-radius: 18px;
  background:
    radial-gradient(80% 80% at 25% 25%, rgba(212,175,55,.55), transparent 60%),
    linear-gradient(135deg, rgba(14,138,66,.92), rgba(11,18,32,.92));
  color: #fff;
  display: grid;
  place-items: center;
  text-align: center;
  box-shadow: 0 12px 26px rgba(2,6,23,.14);
}
.datebox .m{
  font-weight: 900;
  letter-spacing: .12em;
  font-size: .72rem;
  opacity: .95;
}
.datebox .d{
  font-weight: 950;
  font-size: 1.25rem;
  line-height: 1;
}
.event .info strong{
  display: block;
  font-size: 1rem;
  letter-spacing: -.01em;
}
.event .info span{
  display: block;
  margin-top: .15rem;
  color: var(--muted);
  font-weight: 650;
}

/* ----- Drawer (mobile nav) ----- */
.drawer{
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(2,6,23,.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.drawer.open{
  opacity: 1;
  pointer-events: auto;
}
.drawer .panel{
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(92vw, 360px);
  border-radius: 0;
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 1rem;
}
.drawer .head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: .8rem;
  border-bottom: 1px solid var(--border);
}
.drawer nav{
  display: grid;
  gap: .35rem;
  padding: .9rem 0;
}
.drawer nav a{
  padding: .75rem .8rem;
  border-radius: 14px;
  font-weight: 900;
  color: rgba(15,23,42,.90);
}
.drawer nav a:hover{ background: rgba(2,6,23,.04); }
.drawer .actions{
  display: grid;
  gap: .65rem;
  padding-top: .6rem;
  border-top: 1px solid var(--border);
}

/* ----- Footer ----- */
footer{
  background: var(--navy);
  color: rgba(255,255,255,.86);
  padding: 60px 0 26px;
  margin-top: 0;
}
footer .grid{
  grid-template-columns: 1.2fr .9fr .9fr;
}
@media (max-width: 980px){
  footer .grid{ grid-template-columns: 1fr; }
}
footer h3{
  margin: 0 0 .6rem;
  letter-spacing: -.01em;
}
footer .muted{ color: rgba(255,255,255,.70); }
footer .btn.outline{
  border-color: rgba(255,255,255,.18);
  color: rgba(255,255,255,.92);
}
footer .btn.outline:hover{ background: rgba(255,255,255,.08); }

.bottom{
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255,255,255,.14);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.clickable-card {
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}

.clickable-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 36px rgba(0,0,0,0.08);
}

.click-hint {
  margin-top: .4rem;
  font-size: .8rem;
  color: var(--muted);
}

.bio-modal[hidden] {
  display: none !important;
}

.bio-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.bio-modal-box {
  background: #fff;
  width: min(600px, 100%);
  max-height: 80vh;
  border-radius: 16px;
  padding: 1.5rem;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0,0,0,0.18);
}

.bio-modal-img {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
}

.bio-title {
  color: var(--muted);
  margin-bottom: 1rem;
  text-align: center;
}

.bio-content {
  overflow-y: auto;
  text-align: left;
  padding-right: 8px;
}

.bio-close {
  position: absolute;
  top: 10px;
  right: 14px;
  border: none;
  background: none;
  font-size: 22px;
  cursor: pointer;
}
/* ===========================
   Custom Calendar (Events Page)
   =========================== */

.calendar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 26px rgba(2,6,23,.06);
  overflow: hidden;
}

.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: 1rem 1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(2,6,23,.02);
}

.calendar-title {
  display: grid;
  gap: .15rem;
}
.calendar-title strong {
  font-size: 1.05rem;
  letter-spacing: -.01em;
}
.calendar-title span {
  color: var(--muted);
  font-weight: 650;
  font-size: .92rem;
}

.calendar-nav {
  display: flex;
  gap: .5rem;
  align-items: center;
}
.calendar-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 12px;
  padding: .55rem .75rem;
  font-weight: 900;
  cursor: pointer;
}
.calendar-btn:hover {
  background: rgba(2,6,23,.04);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.calendar-dow {
  padding: .6rem .5rem;
  text-align: center;
  font-size: .85rem;
  font-weight: 900;
  color: rgba(15,23,42,.75);
  border-bottom: 1px solid var(--border);
  background: rgba(2,6,23,.02);
}

.calendar-cell {
  min-height: 92px;
  padding: .55rem;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  background: var(--surface);
}

.calendar-cell:nth-child(7n) {
  border-right: 0;
}

.calendar-cell.is-muted {
  background: rgba(2,6,23,.02);
}

.calendar-daynum {
  font-weight: 900;
  font-size: .9rem;
  margin-bottom: .35rem;
}

.cal-event {
  margin-top: .35rem;
  font-size: .8rem;
  font-weight: 700;
  line-height: 1.2;
  display: flex;
  gap: .35rem;
}

.cal-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  margin-top: .2rem;
  flex: 0 0 auto;
}
.cal-event {
  margin-top: .4rem;
  display: flex;
  align-items: flex-start;
  gap: .35rem;
  font-size: .84rem;
  color: rgba(15,23,42,.88);
  font-weight: 750;
  line-height: 1.2;
  cursor: pointer;
  padding: .25rem .35rem;
  border-radius: 10px;
}
.cal-event:hover {
  background: rgba(14,138,66,.08);
}

.calendar-legend {
  padding: .9rem 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  align-items: center;
  color: var(--muted);
  font-weight: 650;
}

.legend-pill {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .35rem .6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(2,6,23,.02);
  font-size: .9rem;
}

/* Event modal */
.event-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(2,6,23,.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.event-modal.open {
  opacity: 1;
  pointer-events: auto;
}
.event-modal .box {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -48%);
  width: min(92vw, 560px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
}
.event-modal .boxhead{
  display:flex;
  justify-content: space-between;
  align-items:center;
  gap: 1rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--border);
}
.event-modal .boxhead strong{
  font-size: 1.05rem;
}
.event-modal .close {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 12px;
  padding: .55rem .75rem;
  font-weight: 900;
  cursor: pointer;
}
.event-modal .close:hover{ background: rgba(2,6,23,.04); }
.event-meta {
  display:grid;
  gap:.4rem;
  margin-top: .9rem;
  color: var(--muted);
  font-weight: 650;
}
.event-meta b { color: rgba(15,23,42,.92); }

/* Pastor bio modal (about page) */
.bio-modal[hidden] {
  display: none !important;
}

.bio-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.bio-modal-box {
  background: #fff;
  width: min(600px, 100%);
  max-height: 80vh;
  border-radius: 16px;
  padding: 1.5rem;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0,0,0,0.18);
}

.bio-modal-img {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
}

.bio-title {
  color: var(--muted);
  margin-bottom: 1rem;
  text-align: center;
}

.bio-content {
  overflow-y: auto;
  text-align: left;
  padding-right: 8px;
}

.bio-close {
  position: absolute;
  top: 10px;
  right: 14px;
  border: none;
  background: none;
  font-size: 22px;
  cursor: pointer;
}

/* Limit modal height */
.bio-modal-box {
  background: #fff;
  max-width: 600px;
  width: 90%;
  max-height: 80vh; /* 👈 KEY */
  padding: 1.5rem;
  border-radius: 16px;
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Make ONLY the text scroll */
.bio-content {
  overflow-y: auto;
  margin-top: 1rem;
  padding-right: 8px;
}

/* Optional: smooth scrolling feel */
.bio-content::-webkit-scrollbar {
  width: 6px;
}

.bio-content::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.2);
  border-radius: 6px;
}

/* ----- Responsive nav collapse ----- */
@media (max-width: 980px){
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: inline-flex; }
  .topbar .row{ flex-wrap: wrap; }
}

/* ----- Forms ----- */
input, textarea{
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: .85rem 1rem;
  outline: none;
  background: var(--surface);
}
input:focus, textarea:focus{
  border-color: rgba(14,138,66,.38);
  box-shadow: 0 0 0 4px rgba(14,138,66,.12);
}

/* ----- Small tweaks ----- */
h1, h2, h3{ color: rgba(15,23,42,.98); }
.section .panel h2, .section .panel h3{ margin-top: .65rem; }

/* Slideshow (Watch page) */
.slideshow{
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(2,6,23,.04);
  min-height: 320px;
}

.slideshow .slide{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .45s ease;
}

.slideshow .slide.active{
  opacity: 1;
}

.slide-btn{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(0,0,0,.35);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.slide-btn:hover{
  background: rgba(0,0,0,.48);
}

.slide-btn.prev{ left: 10px; }
.slide-btn.next{ right: 10px; }

.slide-dots{
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
}

.slide-dots .dot{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.45);
}

.slide-dots .dot.active{
  background: rgba(255,255,255,.92);
}

html {
  scroll-behavior: smooth;
}

/* Footer layout */
.footer-grid {
  grid-template-columns: 1.2fr .9fr .9fr;
}

@media (max-width: 980px){
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* Logo */
.footer-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

/* Brand alignment */
.footer-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
}

/* Title */
.footer-title {
  color: #fff;
}

/* Headings */
.footer-heading {
  color: #fff;
  margin-bottom: .6rem;
}

.video-frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-top: 1rem;
  background: #000;
}

.pastor-video {
  width: 100%;
  display: block;
  background: #000;
}

/* =========================
   Footer Styling
   ========================= */

footer {
  background: linear-gradient(135deg, #0b1220, #0e8a42);
  color: rgba(255,255,255,0.9);
  padding: 60px 0 25px;
}

/* Layout */
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr .9fr .9fr;
  gap: 1.5rem;
}

@media (max-width: 980px){
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* Brand section */
.footer-brand {
  display: flex;
  align-items: center;
}

/* Logo box (same as header but slightly bigger) */
footer .logo {
  width: 48px;
  height: 48px;
}

/* Logo image inside box */
.logo img {
  width: 70%;
  height: 70%;
  object-fit: contain;
}

/* Make logo pop on dark background */
footer .logo img {
  filter: brightness(1.2);
}

/* Headings */
footer h3 {
  color: #fff;
  margin-bottom: 0.6rem;
}

/* Text styling */
footer .muted {
  color: rgba(255,255,255,0.75);
}

footer .small {
  font-size: 0.9rem;
}

/* Buttons in footer */
footer .btn.outline {
  border-color: rgba(255,255,255,0.2);
  color: white;
}

footer .btn.outline:hover {
  background: rgba(255,255,255,0.1);
}

/* Bottom bar */
.bottom {
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255,255,255,0.2);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
}

/* =========================
   Location Section Styling
   ========================= */

/* Layout */
.location-block {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 1.5rem;
  align-items: stretch;
}

/* Left content card */
.location-copy {
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 10px 26px rgba(2,6,23,.06);
}

/* Headings */
.location-copy h2 {
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
}

/* Text */
.location-copy p {
  color: var(--muted);
}

/* Details list */
.location-details {
  margin: 1rem 0 1.25rem;
  display: grid;
  gap: 0.35rem;
}

.location-details strong {
  color: var(--text);
}

/* Map container */
.map-container {
  
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 12px 28px rgba(0,0,0,0.06);
  background: #fff;
}

/* Map iframe */
.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Optional subtle hover effect */
.map-container:hover {
  transform: scale(1.01);
  transition: transform 0.25s ease;
}

/* Mobile responsiveness */
@media (max-width: 900px) {
  .location-block {
    grid-template-columns: 1fr;
  }

  .map-container {
    min-height: 340px;
  } }

/* =========================
   Featured Flyers (VERTICAL)
   ========================= */

.flyer-box {
  margin-top: 1rem;
  position: relative;
  width: 100%;
  max-width: 340px;
  height: 460px;
  margin-left: auto;
  margin-right: auto;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
}

.flyer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.flyer.active {
  opacity: 1;
}

.home-flyer-wrap {
  margin-top: 1rem;
  position: relative;
  width: 100%;
  max-width: 320px;
  height: 440px;
  margin-left: auto;
  margin-right: auto;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
}

.home-flyer-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.home-flyer-slide.active {
  opacity: 1;
}
/* Ministry card image box */
.card .img {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
  background: #f4f6f8;
}

/* Default image behavior */
.card .img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.event-highlight {
  border-color: rgba(37, 99, 235, 0.22);
  background: rgba(37, 99, 235, 0.05);
}

.event-highlight .datebox {
  background: linear-gradient(135deg, #2563eb, #1e3a8a);
}

/* ABOUT PAGE IMAGE FIX */
.about-page .card .img {
  height: 220px;
  overflow: hidden;
}

.about-page .card .img img {
  width: 100%;
  height: 100%;
  object-fit: cover;              /* fills the box */
  object-position: center 20%;    /* 👈 keeps faces in view */
}

.twocol {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: stretch; /* 👈 KEY */
}

.panel {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.video-frame {
  margin-top: 1rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
  height: 260px; /* 👈 controls height */
}

.pastor-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.flyer-slideshow {
  margin-top: 1rem;
  flex: 1; /* 👈 fills remaining panel height */
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  min-height: 260px; /* 👈 matches video */
  background: #f8fafc;
}

.flyer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* 👈 fills nicely */
  opacity: 0;
  transition: opacity 0.5s ease;
}

.flyer.active {
  opacity: 1;
}

.virtual-note {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: var(--radius);
  background: rgba(14,138,66,0.06);
  border: 1px solid rgba(14,138,66,0.15);
}

.virtual-note strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.virtual-note p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.virtual-note a {
  color: var(--green);
  font-weight: 700;
}

/* =========================
   Greater Second MBC
   styles.css (modern + photo-forward)
   ========================= */

/* ----- Reset / Base ----- */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
::selection { background: rgba(0, 0, 0, 0.25); }

/* ----- Theme Tokens ----- */
:root{
  --bg: #ffffff;
  --surface: #ffffff;
  --soft: #f4f6f8;
  --text: #006308;
  --muted: rgba(15, 23, 42, .72);
  --muted2: rgba(15, 23, 42, .55);

  --green: #0e8a42;
  --green2: #0b6f35;
  --gold: #d4af37;
  --navy: #0b1220;

  --border: #e5e7eb;
  --shadow: 0 14px 40px rgba(2, 6, 23, .10);
  --shadow2: 0 10px 26px rgba(2, 6, 23, .08);

  --radius: 18px;
  --radius2: 24px;

  --container: 1120px;
}

/* ----- Layout Helpers ----- */
.container{
  width: min(var(--container), calc(100% - 40px));
  margin: 0 auto;
}
.small { font-size: .9rem; }
.muted { color: var(--muted); }
.kicker{
  display: inline-block;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .78rem;
  color: rgba(14, 138, 66, .95);
}
.sep{
  border: 0;
  border-top: 1px solid var(--border);
  margin: 1.1rem 0;
}

/* ----- Topbar ----- */
.topbar{
  background: rgba(2, 6, 23, .88);
  color: rgba(255,255,255,.86);
  font-weight: 650;
  font-size: .9rem;
}
.topbar .row{
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: .55rem 0;
}
.topbar .links{
  display: flex;
  gap: .9rem;
}
.topbar a{
  color: rgba(255,255,255,.88);
  opacity: .95;
}
.topbar a:hover{ opacity: 1; text-decoration: underline; }

/* ----- Header / Nav ----- */
header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(229,231,235,.7);
}
.nav{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem 0;
}
.brand{
  display: flex;
  align-items: center;
  gap: .8rem;
}
.logo{
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(135deg, #d7e65f 0%, #1f6b3b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.logo img{
  width: auto;
  height: auto;
  display: block;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.22));
}
.name strong{ display: block; font-size: 1rem; }
.name span{ display: block; color: var(--muted2); font-weight: 650; font-size: .88rem; }

.nav-links{
  display: flex;
  gap: 1.1rem;
  align-items: center;
  font-weight: 750;
  color: rgba(15,23,42,.85);
}
.nav-links a{
  padding: .45rem .2rem;
  border-radius: 10px;
}
.nav-links a:hover{
  color: rgba(15,23,42,1);
  background: rgba(2,6,23,.03);
}

.nav-cta{
  display: flex;
  gap: .6rem;
  align-items: center;
}

/* Hamburger */
.hamburger{
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 14px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0;
}
.hamburger span{
  display: block;
  width: 18px;
  height: 2px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 999px;
}

/* ----- Buttons ----- */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .72rem 1rem;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 900;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
  user-select: none;
}
.btn:active{ transform: translateY(1px); }

.btn.primary{
  background: var(--green);
  color: #fff;
  box-shadow: 0 12px 26px rgba(14,138,66,.18);
}
.btn.primary:hover{ background: var(--green2); }

.btn.gold{
  background: var(--gold);
  color: #1b2333;
  box-shadow: 0 12px 26px rgba(212,175,55,.18);
}
.btn.gold:hover{ filter: brightness(.98); }

.btn.outline{
  background: transparent;
  border-color: var(--border);
  color: rgba(15,23,42,.92);
}
.btn.outline:hover{ background: rgba(2,6,23,.04); }

.iconbtn{
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 14px;
  padding: .6rem .85rem;
  font-weight: 900;
  cursor: pointer;
}
.iconbtn:hover{ background: rgba(2,6,23,.04); }

/* ----- Hero (FULL BLEED VIDEO) ----- */
.hero{
  position: relative;
  width: 100%;
  height: 85vh;
  min-height: 560px;
  overflow: hidden;
  background: var(--navy); /* fallback */
  border-bottom: 1px solid var(--border);
}

.hero-media{
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.hero-video-bg{
  position: absolute;
  inset: 0;
  width: 101%;
  height: 101%;
  object-fit: cover;
  transform: scale(1.02);
  opacity: .62;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      rgba(0, 0, 0, 0),
      rgba(0, 0, 0, 0)
    ),
    radial-gradient(
      circle at center,
      rgba(0,0,0,0.35),
      rgba(0,0,0,0.75)
    );
}

.hero-content h1 {
  color: #ffffff;
}

.hero-content h1 {
  text-shadow:
    0 3px 12px rgba(0,0,0,0.65),
    0 1px 2px rgba(0,0,0,0.85);
}

.hero-content{
  position: relative;
  z-index: 2;
  height: 100%;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  padding: 0 20px;
  color: #ffffff;
}

.hero-content h1{
  margin: .7rem 0 .6rem;
  font-size: clamp(2.05rem, 4.2vw, 3.15rem);
  line-height: 1.08;
  letter-spacing: -.02em;
  max-width: 900px;
}
.hero-content p{
  margin: 0;
  font-size: 1.05rem;
  color: rgba(255,255,255,.86);
  max-width: 720px;
  font-weight: 650;
}

.hero-actions{
  display: flex;
  gap: .7rem;
  flex-wrap: wrap;
  margin-top: 1.2rem;
  justify-content: center;
}

.hero-pills{
  display: flex;
  gap: .6rem .9rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1.25rem;
}
.pill{
  display: inline-flex;
  align-items: center;
  padding: .42rem .7rem;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.16);
  color: rgba(255,255,255,.88);
  font-weight: 750;
  font-size: .92rem;
}

/* Reduced motion: hide video */
@media (prefers-reduced-motion: reduce){
  .hero-video-bg{ display: none; }
  .hero-media{
    background: url("images/hero-poster.webp") center/cover no-repeat;
  }
}

/* ----- Page Head ----- */
.pagehead{
  padding: 3rem 0 1.6rem;
  background:
    radial-gradient(60% 60% at 10% 10%, rgba(14,138,66,.08), transparent 60%),
    linear-gradient(to bottom, #fff, #fff);
  border-bottom: 1px solid var(--border);
}
.pagehead h1{
  margin: .55rem 0 .35rem;
  font-size: clamp(1.9rem, 3.6vw, 2.55rem);
  letter-spacing: -.02em;
}
.pagehead p{
  margin: 0;
  color: var(--muted);
  font-weight: 650;
}
.crumb{
  color: rgba(6, 123, 31, 0.55);
  font-weight: 750;
  font-size: .92rem;
}

/* ----- Sections ----- */
.section{
  padding: 70px 0;
  background: var(--surface);
}
.section.alt{
  background: var(--soft);
}
.section.tight{
  padding: 52px 0;
}

/* ----- Grid / Cards ----- */
.grid{
  display: grid;
  gap: 1.2rem;
}
.grid.tiles{
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 980px){
  .grid.tiles{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px){
  .grid.tiles{ grid-template-columns: 1fr; }
}

.card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(2,6,23,.06);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover{
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(2,6,23,.10);
  border-color: rgba(229,231,235,.9);
}
/* Image container (fixes sizing issue) */
.card .img {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
  background: #f4f6f8; /* adds padding look */
}

.card .img img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* 👈 KEY FIX */
  display: block;
}

.card .img img {
  object-position: center top;
}

.card .img {
  aspect-ratio: 3 / 4; /* portrait ratio for people */
}

.card .body{
  padding: 1rem 1rem 1.15rem;
}
.card h3{
  margin: .55rem 0 .35rem;
  letter-spacing: -.01em;
}
.card p{
  margin: 0;
  color: var(--muted);
  font-weight: 650;
}

.tag{
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .28rem .6rem;
  border-radius: 999px;
  border: 1px solid rgba(14,138,66,.22);
  background: rgba(14,138,66,.08);
  color: rgba(14,138,66,.95);
  font-weight: 900;
  font-size: .78rem;
}

.card .img {
  width: 100%;
  height: 200px; /* controls box height */
  overflow: hidden;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
}

.card .img img {
  width: 100%;
  height: 100%;
object-fit: cover;
  display: block;
}

.card .img img {
  transition: transform 0.3s ease;
}

.card:hover .img img {
  transform: scale(1.05);
}

/* Announcement list */
.announcement-list {
  margin-top: 1.5rem;
  display: grid;
  gap: 1rem;
}

/* Each item */
.announcement-item {
  display: flex;
  gap: 1.2rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.95);
  align-items: flex-start;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.announcement-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(0,0,0,0.06);
}

.announcement-date {
  min-width: 130px;
  font-weight: 800;
  color: var(--green);
  flex-shrink: 0;
}

.announcement-content {
  flex: 1;
}

.announcement-content strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.announcement-content p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.announcement-item.highlight {
  border-left: 4px solid #2563eb;
  background: rgba(37, 99, 235, 0.04);
}

/* Mobile */
@media (max-width: 768px) {
  .announcement-item {
    flex-direction: column;
    gap: 0.5rem;
  }

  .announcement-date {
    min-width: auto;
  }
}

/* ----- Panels / Two Column ----- */
.panel{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 26px rgba(2,6,23,.06);
  padding: 1.2rem;
}
.twocol{
  display: grid;
  grid-template-columns: 1.25fr .9fr;
  gap: 1.2rem;
  align-items: stretch;
}
@media (max-width: 980px){
  .twocol{ grid-template-columns: 1fr; }
}

/* ----- Events List (timeline style) ----- */
.events{
  display: grid;
  gap: .75rem;
}
.event{
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: .85rem;
  align-items: center;
  padding: .85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 26px rgba(2,6,23,.05);
}
.datebox{
  width: 62px;
  height: 62px;
  border-radius: 18px;
  background:
    radial-gradient(80% 80% at 25% 25%, rgba(212,175,55,.55), transparent 60%),
    linear-gradient(135deg, rgba(14,138,66,.92), rgba(11,18,32,.92));
  color: #fff;
  display: grid;
  place-items: center;
  text-align: center;
  box-shadow: 0 12px 26px rgba(2,6,23,.14);
}
.datebox .m{
  font-weight: 900;
  letter-spacing: .12em;
  font-size: .72rem;
  opacity: .95;
}
.datebox .d{
  font-weight: 950;
  font-size: 1.25rem;
  line-height: 1;
}
.event .info strong{
  display: block;
  font-size: 1rem;
  letter-spacing: -.01em;
}
.event .info span{
  display: block;
  margin-top: .15rem;
  color: var(--muted);
  font-weight: 650;
}

/* ----- Drawer (mobile nav) ----- */
.drawer{
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(2,6,23,.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.drawer.open{
  opacity: 1;
  pointer-events: auto;
}
.drawer .panel{
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(92vw, 360px);
  border-radius: 0;
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 1rem;
}
.drawer .head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: .8rem;
  border-bottom: 1px solid var(--border);
}
.drawer nav{
  display: grid;
  gap: .35rem;
  padding: .9rem 0;
}
.drawer nav a{
  padding: .75rem .8rem;
  border-radius: 14px;
  font-weight: 900;
  color: rgba(15,23,42,.90);
}
.drawer nav a:hover{ background: rgba(2,6,23,.04); }
.drawer .actions{
  display: grid;
  gap: .65rem;
  padding-top: .6rem;
  border-top: 1px solid var(--border);
}

/* ----- Footer ----- */
footer{
  background: var(--navy);
  color: rgba(255,255,255,.86);
  padding: 60px 0 26px;
  margin-top: 0;
}
footer .grid{
  grid-template-columns: 1.2fr .9fr .9fr;
}
@media (max-width: 980px){
  footer .grid{ grid-template-columns: 1fr; }
}
footer h3{
  margin: 0 0 .6rem;
  letter-spacing: -.01em;
}
footer .muted{ color: rgba(255,255,255,.70); }
footer .btn.outline{
  border-color: rgba(255,255,255,.18);
  color: rgba(255,255,255,.92);
}
footer .btn.outline:hover{ background: rgba(255,255,255,.08); }

.bottom{
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255,255,255,.14);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.clickable-card {
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}

.clickable-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 36px rgba(0,0,0,0.08);
}

.click-hint {
  margin-top: .4rem;
  font-size: .8rem;
  color: var(--muted);
}

.bio-modal[hidden] {
  display: none !important;
}

.bio-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.bio-modal-box {
  background: #fff;
  width: min(600px, 100%);
  max-height: 80vh;
  border-radius: 16px;
  padding: 1.5rem;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0,0,0,0.18);
}

.bio-modal-img {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
}

.bio-title {
  color: var(--muted);
  margin-bottom: 1rem;
  text-align: center;
}

.bio-content {
  overflow-y: auto;
  text-align: left;
  padding-right: 8px;
}

.bio-close {
  position: absolute;
  top: 10px;
  right: 14px;
  border: none;
  background: none;
  font-size: 22px;
  cursor: pointer;
}
/* ===========================
   Custom Calendar (Events Page)
   =========================== */

.calendar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 26px rgba(2,6,23,.06);
  overflow: hidden;
}

.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: 1rem 1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(2,6,23,.02);
}

.calendar-title {
  display: grid;
  gap: .15rem;
}
.calendar-title strong {
  font-size: 1.05rem;
  letter-spacing: -.01em;
}
.calendar-title span {
  color: var(--muted);
  font-weight: 650;
  font-size: .92rem;
}

.calendar-nav {
  display: flex;
  gap: .5rem;
  align-items: center;
}
.calendar-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 12px;
  padding: .55rem .75rem;
  font-weight: 900;
  cursor: pointer;
}
.calendar-btn:hover {
  background: rgba(2,6,23,.04);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.calendar-dow {
  padding: .6rem .5rem;
  text-align: center;
  font-size: .85rem;
  font-weight: 900;
  color: rgba(15,23,42,.75);
  border-bottom: 1px solid var(--border);
  background: rgba(2,6,23,.02);
}

.calendar-cell {
  min-height: 92px;
  padding: .55rem;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  background: var(--surface);
}

.calendar-cell:nth-child(7n) {
  border-right: 0;
}

.calendar-cell.is-muted {
  background: rgba(2,6,23,.02);
}

.calendar-daynum {
  font-weight: 900;
  font-size: .9rem;
  margin-bottom: .35rem;
}

.cal-event {
  margin-top: .35rem;
  font-size: .8rem;
  font-weight: 700;
  line-height: 1.2;
  display: flex;
  gap: .35rem;
}

.cal-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  margin-top: .2rem;
  flex: 0 0 auto;
}
.cal-event {
  margin-top: .4rem;
  display: flex;
  align-items: flex-start;
  gap: .35rem;
  font-size: .84rem;
  color: rgba(15,23,42,.88);
  font-weight: 750;
  line-height: 1.2;
  cursor: pointer;
  padding: .25rem .35rem;
  border-radius: 10px;
}
.cal-event:hover {
  background: rgba(14,138,66,.08);
}

.calendar-legend {
  padding: .9rem 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  align-items: center;
  color: var(--muted);
  font-weight: 650;
}

.legend-pill {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .35rem .6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(2,6,23,.02);
  font-size: .9rem;
}

/* Event modal */
.event-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(2,6,23,.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.event-modal.open {
  opacity: 1;
  pointer-events: auto;
}
.event-modal .box {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -48%);
  width: min(92vw, 560px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
}
.event-modal .boxhead{
  display:flex;
  justify-content: space-between;
  align-items:center;
  gap: 1rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--border);
}
.event-modal .boxhead strong{
  font-size: 1.05rem;
}
.event-modal .close {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 12px;
  padding: .55rem .75rem;
  font-weight: 900;
  cursor: pointer;
}
.event-modal .close:hover{ background: rgba(2,6,23,.04); }
.event-meta {
  display:grid;
  gap:.4rem;
  margin-top: .9rem;
  color: var(--muted);
  font-weight: 650;
}
.event-meta b { color: rgba(15,23,42,.92); }

/* Pastor bio modal (about page) */
.bio-modal[hidden] {
  display: none !important;
}

.bio-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.bio-modal-box {
  background: #fff;
  width: min(600px, 100%);
  max-height: 80vh;
  border-radius: 16px;
  padding: 1.5rem;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0,0,0,0.18);
}

.bio-modal-img {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
}

.bio-title {
  color: var(--muted);
  margin-bottom: 1rem;
  text-align: center;
}

.bio-content {
  overflow-y: auto;
  text-align: left;
  padding-right: 8px;
}

.bio-close {
  position: absolute;
  top: 10px;
  right: 14px;
  border: none;
  background: none;
  font-size: 22px;
  cursor: pointer;
}

/* Limit modal height */
.bio-modal-box {
  background: #fff;
  max-width: 600px;
  width: 90%;
  max-height: 80vh; /* 👈 KEY */
  padding: 1.5rem;
  border-radius: 16px;
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Make ONLY the text scroll */
.bio-content {
  overflow-y: auto;
  margin-top: 1rem;
  padding-right: 8px;
}

/* Optional: smooth scrolling feel */
.bio-content::-webkit-scrollbar {
  width: 6px;
}

.bio-content::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.2);
  border-radius: 6px;
}

/* ----- Responsive nav collapse ----- */
@media (max-width: 980px){
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: inline-flex; }
  .topbar .row{ flex-wrap: wrap; }
}

/* ----- Forms ----- */
input, textarea{
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: .85rem 1rem;
  outline: none;
  background: var(--surface);
}
input:focus, textarea:focus{
  border-color: rgba(14,138,66,.38);
  box-shadow: 0 0 0 4px rgba(14,138,66,.12);
}

/* ----- Small tweaks ----- */
h1, h2, h3{ color: rgba(15,23,42,.98); }
.section .panel h2, .section .panel h3{ margin-top: .65rem; }

/* Slideshow (Watch page) */
.slideshow{
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(2,6,23,.04);
  min-height: 320px;
}

.slideshow .slide{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .45s ease;
}

.slideshow .slide.active{
  opacity: 1;
}

.slide-btn{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(0,0,0,.35);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.slide-btn:hover{
  background: rgba(0,0,0,.48);
}

.slide-btn.prev{ left: 10px; }
.slide-btn.next{ right: 10px; }

.slide-dots{
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
}

.slide-dots .dot{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.45);
}

.slide-dots .dot.active{
  background: rgba(255,255,255,.92);
}

html {
  scroll-behavior: smooth;
}

/* Footer layout */
.footer-grid {
  grid-template-columns: 1.2fr .9fr .9fr;
}

@media (max-width: 980px){
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* Logo */
.footer-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

/* Brand alignment */
.footer-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
}

/* Title */
.footer-title {
  color: #fff;
}

/* Headings */
.footer-heading {
  color: #fff;
  margin-bottom: .6rem;
}

.video-frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-top: 1rem;
  background: #000;
}

.pastor-video {
  width: 100%;
  display: block;
  background: #000;
}

/* =========================
   Footer Styling
   ========================= */

footer {
  background: linear-gradient(135deg, #0b1220, #0e8a42);
  color: rgba(255,255,255,0.9);
  padding: 60px 0 25px;
}

/* Layout */
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr .9fr .9fr;
  gap: 1.5rem;
}

@media (max-width: 980px){
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* Brand section */
.footer-brand {
  display: flex;
  align-items: center;
}

/* Logo box (same as header but slightly bigger) */
footer .logo {
  width: 48px;
  height: 48px;
}

/* Logo image inside box */
.logo img {
  width: 70%;
  height: 70%;
  object-fit: contain;
}

/* Make logo pop on dark background */
footer .logo img {
  filter: brightness(1.2);
}

/* Headings */
footer h3 {
  color: #fff;
  margin-bottom: 0.6rem;
}

/* Text styling */
footer .muted {
  color: rgba(255,255,255,0.75);
}

footer .small {
  font-size: 0.9rem;
}

/* Buttons in footer */
footer .btn.outline {
  border-color: rgba(255,255,255,0.2);
  color: white;
}

footer .btn.outline:hover {
  background: rgba(255,255,255,0.1);
}

/* Bottom bar */
.bottom {
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255,255,255,0.2);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
}

/* =========================
   Location Section Styling
   ========================= */

/* Layout */
.location-block {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 1.5rem;
  align-items: stretch;
}

/* Left content card */
.location-copy {
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 10px 26px rgba(2,6,23,.06);
}

/* Headings */
.location-copy h2 {
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
}

/* Text */
.location-copy p {
  color: var(--muted);
}

/* Details list */
.location-details {
  margin: 1rem 0 1.25rem;
  display: grid;
  gap: 0.35rem;
}

.location-details strong {
  color: var(--text);
}

/* Map container */
.map-container {
  
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 12px 28px rgba(0,0,0,0.06);
  background: #fff;
}

/* Map iframe */
.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Optional subtle hover effect */
.map-container:hover {
  transform: scale(1.01);
  transition: transform 0.25s ease;
}

/* Mobile responsiveness */
@media (max-width: 900px) {
  .location-block {
    grid-template-columns: 1fr;
  }

  .map-container {
    min-height: 340px;
  } }

/* =========================
   Featured Flyers (VERTICAL)
   ========================= */

.flyer-box {
  margin-top: 1rem;
  position: relative;
  width: 100%;
  max-width: 340px;
  height: 460px;
  margin-left: auto;
  margin-right: auto;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
}

.flyer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.flyer.active {
  opacity: 1;
}

.home-flyer-wrap {
  margin-top: 1rem;
  position: relative;
  width: 100%;
  max-width: 320px;
  height: 440px;
  margin-left: auto;
  margin-right: auto;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
}

.home-flyer-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.home-flyer-slide.active {
  opacity: 1;
}
/* Ministry card image box */
.card .img {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
  background: #f4f6f8;
}

/* Default image behavior */
.card .img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.event-highlight {
  border-color: rgba(37, 99, 235, 0.22);
  background: rgba(37, 99, 235, 0.05);
}

.event-highlight .datebox {
  background: linear-gradient(135deg, #2563eb, #1e3a8a);
}

/* ABOUT PAGE IMAGE FIX */
.about-page .card .img {
  height: 220px;
  overflow: hidden;
}

.about-page .card .img img {
  width: 100%;
  height: 100%;
  object-fit: cover;              /* fills the box */
  object-position: center 20%;    /* 👈 keeps faces in view */
}

.twocol {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: stretch; /* 👈 KEY */
}

.panel {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.video-frame {
  margin-top: 1rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
  height: 260px; /* 👈 controls height */
}

.feature-section {
  background:
    radial-gradient(circle at top right, rgba(212,175,55,.16), transparent 32%),
    linear-gradient(135deg, rgba(14,138,66,.08), #fff 55%);
}

.feature-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 1.5rem;
  align-items: stretch;
}

.feature-card {
  border-radius: var(--radius);
  border: 1px solid rgba(14,138,66,.14);
  background: rgba(255,255,255,.94);
  box-shadow: 0 14px 34px rgba(2,6,23,.08);
  padding: 1.4rem;
}

.video-card h2,
.flyer-heading h2 {
  margin: .55rem 0 .35rem;
}

.video-card p {
  color: var(--muted);
  margin-top: 0;
}

.video-frame {
  margin-top: 1rem;
  height: 320px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
}

.pastor-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.feature-actions {
  margin-top: 1rem;
  display: flex;
  gap: .7rem;
  flex-wrap: wrap;
}

.flyer-feature {
  background:
    radial-gradient(circle at top right, rgba(212,175,55,.24), transparent 35%),
    linear-gradient(160deg, rgba(14,138,66,.12), rgba(255,255,255,.96));
}

.flyer-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.home-flyer-wrap {
  position: relative;
  width: 100%;
  height: 500px;
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(14,138,66,.18);
  box-shadow: inset 0 0 0 10px rgba(255,255,255,.65), 0 14px 28px rgba(2,6,23,.10);
}

.home-flyer-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity .6s ease;
}

.home-flyer-slide.active {
  opacity: 1;
}

@media (max-width: 980px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .home-flyer-wrap {
    height: 460px;
  }

  .video-frame {
    height: 280px;
  }
}

.contact-action-panel {
  background:
    radial-gradient(circle at top right, rgba(212,175,55,.18), transparent 35%),
    linear-gradient(145deg, rgba(14,138,66,.07), #fff 60%);
}

.contact-mini {
  display: grid;
  gap: .9rem;
}

.contact-mini strong {
  display: block;
  color: var(--green);
}

.contact-mini span {
  display: block;
  color: var(--muted);
  font-weight: 700;
}

.action-stack {
  display: grid;
  gap: .65rem;
  margin-top: 1.2rem;
}

.impact-note {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: var(--radius);
  background: rgba(14,138,66,.08);
  border: 1px solid rgba(14,138,66,.16);
  text-align: center;
}

.impact-note strong {
  display: block;
  color: var(--text);
  margin-bottom: .35rem;
}

.impact-note p {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
}

.contact-action-panel {
  justify-content: space-between; /* spreads content top → bottom */
}

/* =========================
   Community Page
   ========================= */

.community-hero {
  background:
    radial-gradient(circle at top right, rgba(212,175,55,.18), transparent 35%),
    linear-gradient(135deg, rgba(14,138,66,.10), #fff 60%);
}

/* MAIN PANEL FIX */
.community-page .panel {
  height: auto;
}

/* Civic feature */
.civic-feature {
  padding: 2rem;
  background:
    radial-gradient(circle at top right, rgba(212,175,55,.22), transparent 35%),
    linear-gradient(135deg, rgba(14,138,66,.10), #fff 65%);
}

.civic-links {
  margin-top: 1rem;
  display: flex;
  gap: .7rem;
  flex-wrap: wrap;
}

/* THIS FILLS YOUR EMPTY SPACE */
.civic-actions-grid {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.civic-action {
  padding: 1rem;
  border-radius: 16px;
  background: rgba(255,255,255,.8);
  border: 1px solid var(--border);
  transition: 0.2s ease;
}

.civic-action:hover {
  transform: translateY(-4px);
}

.civic-action strong {
  display: block;
  color: var(--green);
  margin-bottom: .3rem;
}

.civic-action p {
  margin: 0;
  font-size: .9rem;
  color: var(--muted);
}

/* Updates panel */
.community-updates {
  padding: 1.6rem;
  max-width: 900px;
  margin: 0 auto;

  background:
    radial-gradient(circle at top right, rgba(14,138,66,.12), transparent 40%),
    linear-gradient(135deg, rgba(14,138,66,.06), #fff);
}

.update-list {
  display: grid;
  gap: .8rem;
  margin-top: .8rem;
}

.update-item {
  padding: .9rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--border);
}

.update-item:first-child {
  border-left: 4px solid var(--green);
  background: rgba(14,138,66,.08);
}

.update-item strong {
  display: block;
  margin-bottom: .2rem;
}

.update-item p {
  margin: 0;
  font-size: .9rem;
  color: var(--muted);
}

/* Resource cards */
.resource-card {
  padding: 1.2rem;
}

.resource-card:hover {
  transform: translateY(-5px);
}

/* Mobile */
@media (max-width: 900px) {
  .civic-actions-grid {
    grid-template-columns: 1fr;
  }
}

.logo img {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav nav {
  display: flex;
  gap: 1.2rem;
}

.nav a.active {
  color: #1e7f4f;
  font-weight: 600;
}

.glance-compact {
  padding: 1.3rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at top right, rgba(212,175,55,.12), transparent 35%),
    linear-gradient(135deg, rgba(14,138,66,.06), #fff);
}

.glance-compact h2 {
  margin: .4rem 0 1rem;
}

.glance-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .8rem;
}

.glance-row div {
  padding: .8rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--border);
}

.glance-row strong {
  display: block;
  color: var(--green);
  font-size: .9rem;
}

.glance-row span {
  display: block;
  color: var(--muted);
  font-weight: 700;
  margin-top: .2rem;
}

@media (max-width: 800px) {
  .glance-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* =========================
   HISTORY SECTION
========================= */

.history-highlight {
  background:
    radial-gradient(circle at top right, rgba(212,175,55,.12), transparent 40%),
    linear-gradient(135deg, rgba(14,138,66,.06), #fff);
  padding: 1.6rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.history-highlight h3 {
  margin-bottom: 0.5rem;
}

.history-highlight p {
  color: var(--muted);
}

/* STATS */
.history-stats {
  display: flex;
  gap: 1rem;
  margin-top: 1.2rem;
  flex-wrap: wrap;
}

.history-stats div {
  flex: 1;
  min-width: 120px;
  background: #fff;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  text-align: center;
  transition: all 0.2s ease;
}

/* Hover effect (subtle but clean) */
.history-stats div:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}

.history-stats strong {
  display: block;
  color: var(--green);
  font-size: 1.3rem;
  font-weight: 700;
}

.history-stats span {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

.about-photo-panel {
  padding: 0;
  overflow: hidden;
}

.about-photo-panel img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
}

.pastor-feature {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

.pastor-feature .card {
  max-width: 420px;
  text-align: center;
}

.leader-group {
  margin-top: 2.5rem;
}

.leader-group > h3 {
  text-align: center;
  margin-bottom: 1rem;
}

.glance-compact {
  padding: 1.3rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at top right, rgba(212,175,55,.12), transparent 35%),
    linear-gradient(135deg, rgba(14,138,66,.06), #fff);
}

.glance-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .8rem;
  margin-top: 1rem;
}

.glance-row div {
  padding: .8rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--border);
}

.glance-row strong {
  display: block;
  color: var(--green);
  font-size: .9rem;
}

.glance-row span {
  display: block;
  color: var(--muted);
  font-weight: 700;
  margin-top: .2rem;
}

.history-section {
  padding: 56px 0;
}

.history-card {
  display: grid;
  grid-template-columns: 1.4fr .8fr;
  gap: 1.4rem;
  align-items: stretch;
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at top right, rgba(212,175,55,.14), transparent 35%),
    linear-gradient(135deg, rgba(14,138,66,.06), #fff 65%);
}

.history-copy p {
  max-width: 760px;
  color: var(--muted);
  font-weight: 650;
}

.history-highlight {
  padding: 1.4rem;
  border-radius: var(--radius);
  border: 1px solid rgba(14,138,66,.14);
  background: rgba(255,255,255,.85);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.history-highlight p {
  color: var(--muted);
}

.history-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .8rem;
  margin-top: 1rem;
}

.history-stats div {
  background: #fff;
  padding: .9rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  text-align: center;
}

.history-stats strong {
  display: block;
  color: var(--green);
  font-size: 1.25rem;
}

.history-stats span {
  display: block;
  color: var(--muted);
  font-size: .85rem;
  font-weight: 700;
}

@media (max-width: 900px) {
  .glance-row,
  .history-card {
    grid-template-columns: 1fr;
  }
}

/* =========================
   COMMUNITY FEATURE
========================= */

.community-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

.community-feature-img {
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 340px;
  border: 1px solid var(--border);
}

.community-feature-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.community-feature-copy {
  background:
    radial-gradient(circle at top right, rgba(212,175,55,.12), transparent 35%),
    linear-gradient(135deg, rgba(14,138,66,.06), #fff);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.community-feature-copy h2 {
  margin: .5rem 0 .8rem;
}

.community-feature-copy p {
  color: var(--muted);
  margin-bottom: 1.2rem;
}

@media (max-width: 900px) {
  .community-feature {
    grid-template-columns: 1fr;
  }
}

.community-feature-img {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at top right, rgba(212,175,55,.10), transparent 35%),
    linear-gradient(135deg, rgba(14,138,66,.04), #fff);
  min-height: 340px;
}

.community-feature-img img {
  width: 78%;
  max-width: 320px;
  border-radius: 22px;
  object-fit: cover;
  display: block;

  box-shadow:
    0 20px 40px rgba(0,0,0,.18),
    0 6px 12px rgba(0,0,0,.08);

  transition: transform .3s ease;
}

.community-feature-img img:hover {
  transform: translateY(-4px) scale(1.02);
}

.announcement-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  margin-top: .85rem;
  padding: .7rem 1.1rem;

  background: var(--green);
  color: #fff;

  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: .92rem;

  transition: all .25s ease;
}

.announcement-link:hover {
  transform: translateY(-2px);
  opacity: .92;
}

.schedule-change {
  border-left: 5px solid #d4af37;
  background: linear-gradient(
    135deg,
    rgba(212,175,55,.10),
    rgba(255,255,255,1)
  );
}

.schedule-change .announcement-date {
  color: #8a6b00;
  font-weight: 800;
}

a[href^="tel"] {
  color: var(--green);
  font-weight: 700;
  text-decoration: none;
}

a[href^="tel"]:hover {
  text-decoration: underline;
}

.encouragement-photo {
  margin: 1.25rem 0;
  border-radius: 18px;
  overflow: hidden;
  height: 245px;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
}

.encouragement-photo img {
  width: 90%;
  height: 90%;
  object-fit: cover;
  display: block;
}

/* =========================
   GLOBAL MOBILE FIXES
========================= */
@media (max-width: 980px) {

  /* NAVIGATION */
  .nav-links,
  .nav-cta {
    display: none !important;
  }

  .hamburger {
    display: inline-flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 52px;
    height: 52px;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    flex-shrink: 0;
  }

  .hamburger span {
    width: 22px;
    height: 2px;
    background: #111827;
    border-radius: 999px;
    display: block;
  }

  .nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 84px;
  }

  .brand {
    display: flex;
    align-items: center;
    gap: .8rem;
    max-width: calc(100% - 72px);
    text-decoration: none;
  }

  .brand .logo {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
  }

  .brand .logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .brand .name strong {
    font-size: 1rem;
    line-height: 1.1;
    display: block;
  }

  .brand .name span {
    font-size: .82rem;
    display: block;
  }

  /* MOBILE DRAWER */
  .drawer .panel {
    width: min(90vw, 360px);
  }

  .drawer nav {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    margin-top: 1rem;
  }

  .drawer nav a {
    padding: .9rem 1rem;
    border-radius: 14px;
    text-decoration: none;
    color: #111827;
    font-weight: 600;
    background: rgba(0,0,0,.03);
  }

  /* LAYOUT */
  .container {
    width: min(100% - 24px, var(--container));
  }

  .twocol,
  .feature-grid,
  .footer-grid,
  .glance-row,
  .history-card {
    grid-template-columns: 1fr !important;
  }

  .section {
    padding: 44px 0;
  }

  .section.tight {
    padding: 34px 0;
  }

  .hero {
    min-height: 72vh;
  }

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

  .hero-content h1 {
    font-size: clamp(2.1rem, 8vw, 3.4rem);
    line-height: 1.02;
  }

  .hero-content p {
    font-size: 1.05rem;
  }

  .card .img {
    height: 230px;
  }

  .announcement-item {
    flex-direction: column;
    gap: .75rem;
  }

  .announcement-date {
    min-width: auto;
  }

  .topbar .row {
    flex-direction: column;
    align-items: flex-start;
    gap: .35rem;
  }

  footer {
    border-radius: 0;
  }
}

/* EXTRA SMALL DEVICES */
@media (max-width: 520px) {

  .brand .logo {
    width: 54px;
    height: 54px;
  }

  .brand .name strong {
    font-size: .95rem;
  }

  .brand .name span {
    font-size: .75rem;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .btn {
    width: auto;
  }
}

@media (max-width: 980px) {
  .nav-links,
  .nav-cta {
    display: none !important;
  }

  .hamburger {
    display: inline-flex !important;
  }

  .twocol,
  .location-block,
  .footer-grid {
    grid-template-columns: 1fr !important;
  }
}

/* FINAL MOBILE NAV FIX */
@media (max-width: 980px) {
  header .nav-links,
  header .nav-cta {
    display: none !important;
  }

  .hamburger {
    display: inline-flex !important;
  }

  .drawer.open {
    opacity: 1;
    pointer-events: auto;
  }

  .drawer .panel nav {
    display: grid !important;
    gap: .4rem;
    padding: 1rem 0;
  }

  .drawer .panel nav a {
    display: block !important;
    padding: .85rem 1rem;
    border-radius: 14px;
    font-weight: 800;
    color: #111827;
    background: rgba(2,6,23,.04);
  }

  .drawer .actions {
    display: grid !important;
    gap: .7rem;
  }
}

/* Better mobile layout */
@media (max-width: 700px) {
  .section {
    padding: 34px 0;
  }

  .grid.tiles {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: .8rem;
  }

  .card .img {
    height: 135px !important;
  }

  .card .body {
    padding: .8rem;
  }

  .card h3 {
    font-size: .95rem;
  }

  .card p {
    font-size: .82rem;
    line-height: 1.35;
  }

  .tag {
    font-size: .68rem;
    padding: .2rem .45rem;
  }

  .twocol,
  .feature-grid,
  .location-block {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }

  .panel {
    padding: 1rem;
  }

  .hero {
    min-height: 520px;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .announcement-item {
    padding: .9rem;
  }

  .video-frame,
  .map-container {
    height: 240px;
    min-height: 240px;
  }
}