/* =========================================================================
   Pusat Injil Kelana Jaya — Borneo-themed stylesheet
   -------------------------------------------------------------------------
   CUSTOMISE THE WHOLE LOOK FROM HERE.
   Change the values in :root below to re-theme the entire site at once.
   Theme: rainforest greens, river teal, dawn amber — inspired by East
   Malaysia / Borneo, the heartland of our church family.
   ========================================================================= */

:root {
  /* Brand colours ------------------------------------------------------- */
  --c-jungle:       #14543f;   /* deep rainforest green (primary)          */
  --c-jungle-dark:  #0d3b2c;   /* darker green (header solid, footer)      */
  --c-river:        #1f8a8c;   /* river / sea teal (secondary)            */
  --c-river-light:  #7fd1cf;   /* light teal accent                        */
  --c-sun:          #e08a32;   /* dawn / Gawai amber (call-to-action)      */
  --c-sun-light:    #f3b85f;   /* light amber                              */
  --c-sand:         #faf6ee;   /* warm cream page background                */
  --c-surface:      #ffffff;   /* cards                                     */
  --c-ink:          #1d2a25;   /* body text                                */
  --c-muted:        #5c6b64;   /* secondary text                           */
  --c-border:       #e6e0d3;   /* dividers / borders                       */

  /* Typography ---------------------------------------------------------- */
  --font-body:    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Layout -------------------------------------------------------------- */
  --max-width: 1140px;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(13, 59, 44, 0.10);
  --shadow-lg: 0 18px 50px rgba(13, 59, 44, 0.18);
  --header-h: 76px;
}

/* --- Reset / base --------------------------------------------------------*/
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--c-ink);
  background: var(--c-sand);
  line-height: 1.7;
  font-size: 17px;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--c-river); text-decoration: none; }
a:hover { color: var(--c-jungle); }
h1, h2, h3, h4 { font-family: var(--font-heading); line-height: 1.2; color: var(--c-jungle-dark); margin: 0 0 0.5em; }

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

/* --- Buttons -------------------------------------------------------------*/
.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.3px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.btn:hover { transform: translateY(-3px); }
.btn-primary { background: var(--c-sun); color: #fff; box-shadow: 0 8px 20px rgba(224, 138, 50, 0.35); }
.btn-primary:hover { background: #c9772a; color: #fff; }
.btn-ghost { background: var(--c-jungle); color: #fff; }
.btn-ghost:hover { background: var(--c-jungle-dark); color: #fff; }

/* =========================================================================
   HEADER + NAVIGATION  (sticky, transparent over hero, solid on scroll)
   ========================================================================= */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center;
  transition: background 0.3s ease, box-shadow 0.3s ease, height 0.3s ease;
  background: transparent;
}
.site-header.scrolled {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.08);
  height: 64px;
}
.header-inner {
  width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 22px;
  display: flex; align-items: center; gap: 14px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand .logo { height: 44px; width: auto; }
.site-title {
  font-size: 1.25rem; font-weight: 800; letter-spacing: 0.5px; line-height: 1.1;
  color: #fff;
}
.site-header.scrolled .site-title { color: var(--c-jungle-dark); }

.nav-links { list-style: none; margin: 0 0 0 auto; padding: 0; display: flex; align-items: center; gap: 4px; }
.nav-links a {
  display: block; padding: 10px 14px; border-radius: 8px;
  color: #fff; font-weight: 600; font-size: 0.95rem;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-links a:hover, .nav-links a.active { background: rgba(255, 255, 255, 0.18); color: #fff; }
.site-header.scrolled .nav-links a { color: var(--c-jungle-dark); }
.site-header.scrolled .nav-links a:hover,
.site-header.scrolled .nav-links a.active { background: var(--c-river); color: #fff; }
/* Members tab — make it stand out as a pill */
.nav-links a.nav-members { background: var(--c-sun); color: #fff; margin-left: 6px; }
.nav-links a.nav-members:hover { background: #c9772a; color: #fff; }

.nav-toggle {
  display: none; margin-left: auto; background: none; border: 0;
  color: #fff; font-size: 1.7rem; padding: 8px; cursor: pointer; line-height: 1;
}
.site-header.scrolled .nav-toggle { color: var(--c-jungle-dark); }

/* =========================================================================
   HERO  (full-screen, Borneo scene + animated hornbill)
   ========================================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center;
  color: #fff;
  background: url("../images/borneo-hero.svg") center/cover no-repeat;
  overflow: hidden;
}
.hero::after { /* darkening + green tint for text contrast */
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(8, 40, 30, 0.90) 0%, rgba(9, 44, 33, 0.70) 48%, rgba(9, 44, 33, 0.40) 100%),
    linear-gradient(180deg, rgba(8, 40, 30, 0.35) 0%, rgba(8, 40, 30, 0) 35%);
}
.hero-hornbill {
  position: absolute; top: 22%; right: 8%; width: 220px; z-index: 1;
  opacity: 0.9; filter: drop-shadow(0 8px 14px rgba(0,0,0,0.25));
  animation: soar 9s ease-in-out infinite;
}
@keyframes soar {
  0%, 100% { transform: translate(0, 0) rotate(-2deg); }
  50%      { transform: translate(-30px, -22px) rotate(2deg); }
}
.hero-content { position: relative; z-index: 2; max-width: 720px; }
.hero .eyebrow {
  text-transform: uppercase; letter-spacing: 4px; font-weight: 700;
  font-size: 0.85rem; color: var(--c-sun-light); margin-bottom: 14px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
}
.hero h1 {
  color: #fff; font-size: clamp(2.2rem, 5.5vw, 4rem); margin-bottom: 0.35em;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.45);
}
.hero p.lead {
  color: #fff; font-size: clamp(1.05rem, 2vw, 1.3rem); max-width: 600px;
  margin-bottom: 1.8em; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* Hero entrance animations */
.hero-content > * { opacity: 0; transform: translateY(24px); animation: rise 0.9s ease forwards; }
.hero-content > *:nth-child(1) { animation-delay: 0.15s; }
.hero-content > *:nth-child(2) { animation-delay: 0.30s; }
.hero-content > *:nth-child(3) { animation-delay: 0.45s; }
.hero-content > *:nth-child(4) { animation-delay: 0.60s; }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

/* Scroll cue */
.scroll-cue {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  z-index: 2; color: #fff; font-size: 1.8rem; opacity: 0.8;
  animation: bob 1.8s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 10px); } }

/* =========================================================================
   PAGE BANNER  (shorter hero for sub-pages)
   ========================================================================= */
.page-banner {
  position: relative;
  padding: calc(var(--header-h) + 60px) 0 60px;
  color: #fff; text-align: center;
  background: url("../images/borneo-hero.svg") center 30%/cover no-repeat;
}
.page-banner::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(13,59,44,0.75), rgba(31,138,140,0.55));
}
.page-banner .container { position: relative; z-index: 1; }
.page-banner h1 { color: #fff; font-size: clamp(2rem, 4vw, 3rem); margin: 0; }
.page-banner p { margin: 10px 0 0; font-size: 1.15rem; opacity: 0.95; }

/* =========================================================================
   SECTIONS
   ========================================================================= */
.section { padding: 84px 0; }
.section-alt { background: var(--c-surface); }
.section-green { background: var(--c-jungle-dark); color: #f3efe4; }
.section-green h2, .section-green h3 { color: #fff; }

.section-head { text-align: center; max-width: 720px; margin: 0 auto 50px; }
.section-head .eyebrow {
  text-transform: uppercase; letter-spacing: 3px; font-weight: 700;
  font-size: 0.8rem; color: var(--c-sun); margin-bottom: 10px;
}
.section-head h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); }
.section-head p { color: var(--c-muted); font-size: 1.1rem; }
.section-green .section-head p { color: #cfe3da; }

/* Borneo-inspired geometric divider (abstract, not a specific motif) */
.motif-divider {
  height: 16px;
  background:
    repeating-linear-gradient(135deg, var(--c-sun) 0 10px, transparent 10px 20px),
    repeating-linear-gradient(45deg, var(--c-river) 0 10px, transparent 10px 20px);
  opacity: 0.85;
}

/* =========================================================================
   VALUE CARDS  (Care · Share · Serve)
   ========================================================================= */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.value-card {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 36px 28px; text-align: center;
  box-shadow: var(--shadow); transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.value-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.value-card .icon {
  width: 70px; height: 70px; margin: 0 auto 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: #fff; background: linear-gradient(135deg, var(--c-river), var(--c-jungle));
}
.value-card h3 { font-size: 1.3rem; }
.value-card p { color: var(--c-muted); margin: 0; }

/* =========================================================================
   SERVICE SCHEDULE
   ========================================================================= */
.schedule { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.schedule .day {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-top: 4px solid var(--c-river); border-radius: var(--radius);
  padding: 22px 24px; box-shadow: var(--shadow);
}
.schedule .day h3 { margin: 0 0 12px; text-transform: uppercase; letter-spacing: 1px; font-size: 1.05rem; color: var(--c-jungle); }
.schedule .day ul { list-style: none; margin: 0; padding: 0; }
.schedule .day li { padding: 8px 0; border-bottom: 1px dashed var(--c-border); }
.schedule .day li:last-child { border-bottom: 0; }
.schedule .time { font-weight: 800; color: var(--c-river); display: block; }

/* =========================================================================
   HERITAGE / SPLIT SECTION
   ========================================================================= */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 46px; align-items: center; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; }
.split .text h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }

/* =========================================================================
   PRAYER / QUOTE
   ========================================================================= */
.prayer {
  max-width: 760px; margin: 0 auto; text-align: center;
  font-style: italic; font-size: 1.2rem; line-height: 1.9;
}
.section-green .prayer { color: #f3efe4; }
.prayer p { margin: 0 0 1.1em; }
.prayer p:last-child { margin-bottom: 0; }

/* =========================================================================
   EXPLORE / LINK CARDS
   ========================================================================= */
.link-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.link-card {
  display: block; background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 30px 26px; box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease; color: var(--c-ink);
}
.link-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); color: var(--c-ink); }
.link-card .icon { font-size: 1.9rem; margin-bottom: 12px; }
.link-card h3 { font-size: 1.2rem; margin-bottom: 6px; }
.link-card p { color: var(--c-muted); margin: 0; font-size: 0.98rem; }
.link-card .arrow { color: var(--c-sun); font-weight: 800; }

/* =========================================================================
   GENERIC CONTENT (sub-pages)
   ========================================================================= */
.prose { max-width: 820px; margin: 0 auto; }
.section-heading { font-size: 1.5rem; border-left: 5px solid var(--c-sun); padding-left: 14px; margin-bottom: 0.6em; }
.lead { font-size: 1.2rem; color: var(--c-muted); }
.card {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 26px 30px; box-shadow: var(--shadow);
}

/* Doctrine list */
.doctrine-list { counter-reset: doctrine; list-style: none; padding: 0; margin: 0; }
.doctrine-list li {
  position: relative; background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 18px 22px 18px 66px; margin-bottom: 14px; box-shadow: var(--shadow);
}
.doctrine-list li::before {
  counter-increment: doctrine; content: counter(doctrine);
  position: absolute; left: 18px; top: 18px; width: 34px; height: 34px;
  background: var(--c-river); color: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0 0 0 24px; border-left: 3px solid var(--c-river-light); }
.timeline li { position: relative; padding: 0 0 24px 24px; }
.timeline li::before {
  content: ""; position: absolute; left: -34px; top: 4px; width: 14px; height: 14px;
  border-radius: 50%; background: var(--c-sun); border: 3px solid var(--c-sand);
}
.timeline .date { font-weight: 800; color: var(--c-jungle); display: block; }


/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.contact-grid iframe { width: 100%; min-height: 360px; border: 0; border-radius: var(--radius); box-shadow: var(--shadow); }


/* =========================================================================
   MEMBERS AREA
   ========================================================================= */
.members-gate { max-width: 460px; margin: 0 auto; text-align: center; }
.members-gate .lock-icon { font-size: 2.8rem; }
.members-gate form { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.members-gate input[type="text"],
.members-gate input[type="password"] { width: 100%; padding: 13px 18px; font-size: 1rem; font-family: inherit; border: 1px solid var(--c-border); border-radius: 999px; background: #fff; }
.members-gate input[type="text"]:focus,
.members-gate input[type="password"]:focus { outline: none; border-color: var(--c-river); box-shadow: 0 0 0 3px rgba(31,138,140,0.15); }
.members-error { color: #c0392b; min-height: 1.2em; font-size: 0.95rem; }

/* Members file browser (Supabase) */
.members-bar {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 14px; margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--c-border);
}
.members-bar .who { color: var(--c-muted); font-size: 0.95rem; }
.members-msg { color: var(--c-muted); padding: 20px 0; }
.members-msg.error { color: #c0392b; }
.spinner {
  width: 26px; height: 26px; border: 3px solid var(--c-border);
  border-top-color: var(--c-river); border-radius: 50%; margin: 24px auto;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Role badge */
.role-badge {
  display: inline-block; margin-left: 6px; padding: 2px 9px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase;
  background: var(--c-sun); color: #fff; vertical-align: middle;
}
.role-badge.user { background: var(--c-river); }

/* Directory layout: sidebar + main */
.members-layout { display: grid; grid-template-columns: 250px 1fr; gap: 26px; align-items: start; }
.members-layout > * { min-width: 0; }  /* prevent grid children from overflowing */
.members-sidebar ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.section-link {
  width: 100%; text-align: left; cursor: pointer; font: inherit;
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 12px;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 2px;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.section-link:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.section-link.active { border-color: var(--c-river); background: #eef7f7; }
.section-link .sl-label { font-weight: 700; color: var(--c-jungle-dark); }
.section-link .sl-cadence { font-size: 0.82rem; color: var(--c-muted); }

/* Section header + list */
.section-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.section-top h3 { margin: 0; font-size: 1.5rem; }
.cadence-tag { display: inline-block; background: var(--c-accent, #eef7f7); color: var(--c-river); border: 1px solid var(--c-river-light); border-radius: 999px; padding: 2px 12px; font-size: 0.8rem; font-weight: 600; }
.btn-upload { padding: 10px 20px; font-size: 0.95rem; }

.item-grid { display: grid; gap: 14px; }
.item-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow); transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.item-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.item-card .ic-icon { font-size: 1.9rem; min-width: 34px; text-align: center; }
.item-card .ic-body { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.item-card .ic-badge { font-weight: 700; color: var(--c-river); font-size: 0.92rem; }
.item-card .ic-title { color: var(--c-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-card .ic-size { color: var(--c-muted); font-size: 0.8rem; }
.item-card .ic-actions { display: flex; align-items: center; gap: 8px; }
.item-card .open-btn { padding: 8px 18px; font-size: 0.9rem; }
.del-btn { background: none; border: 0; cursor: pointer; font-size: 1.1rem; opacity: 0.6; padding: 6px; border-radius: 8px; }
.del-btn:hover { opacity: 1; background: #fdecec; }


@media (max-width: 820px) {
  .members-layout { grid-template-columns: 1fr; gap: 18px; }
  /* sections become a horizontal scroller that stays inside the viewport */
  .members-sidebar { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .members-sidebar ul { grid-auto-flow: column; grid-auto-columns: 150px; width: max-content; }
  .section-link { padding: 12px 14px; }
  /* file rows: let the title wrap/ellipsis and keep the View button on the right */
  .item-card { padding: 14px; gap: 12px; }
  .item-card .ic-icon { font-size: 1.5rem; min-width: 26px; }
  .item-card .open-btn { padding: 8px 14px; }
  .members-bar { gap: 10px; }
}
@media (max-width: 420px) {
  .item-card { flex-wrap: wrap; }
  .item-card .ic-actions { margin-left: auto; }
}

/* =========================================================================
   PDF MODAL VIEWER
   ========================================================================= */
.pdfm-backdrop {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0, 0, 0, 0.78);
  display: none; align-items: center; justify-content: center; padding: 18px;
}
.pdfm-backdrop.open { display: flex; }
.pdfm-dialog {
  background: #fff; border-radius: 14px; overflow: hidden;
  width: min(1000px, 100%); max-height: 94vh; display: flex; flex-direction: column;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}
.pdfm-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px; border-bottom: 1px solid var(--c-border);
}
.pdfm-title { font-weight: 700; color: var(--c-jungle-dark); flex: 1; min-width: 120px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdfm-tools { display: flex; align-items: center; gap: 6px; }
.pdfm-zoomgroup { display: flex; align-items: center; gap: 4px; margin-right: 4px; }
.pdfm-zoom { font-size: 0.85rem; color: var(--c-muted); min-width: 44px; text-align: center; }
.pdfm-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 10px; cursor: pointer;
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 8px;
  font: inherit; font-size: 1rem; color: var(--c-ink); text-decoration: none; line-height: 1;
}
.pdfm-btn:hover { background: #eef7f7; border-color: var(--c-river); color: var(--c-jungle-dark); }
.pdfm-x { font-size: 1.4rem; }
.pdfm-fallbackmode .pdfm-zoomgroup { display: none; }

.pdfm-body { flex: 1; overflow: auto; background: #525659; padding: 16px; }
.pdfm-canvaswrap { width: fit-content; margin: 0 auto; }
.pdfm-canvaswrap canvas { display: block; background: #fff; box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45); border-radius: 2px; }
.pdfm-iframe { width: 100%; height: 80vh; border: 0; background: #fff; }
.pdfm-body .spinner { border-color: rgba(255,255,255,0.3); border-top-color: #fff; }

.pdfm-foot {
  display: flex; align-items: center; justify-content: center; gap: 20px;
  padding: 10px; border-top: 1px solid var(--c-border);
}
.pdfm-nav {
  cursor: pointer; font: inherit; font-weight: 700; color: #fff;
  background: var(--c-river); border: 0; border-radius: 999px; padding: 9px 22px;
}
.pdfm-nav:hover { background: var(--c-jungle); }
.pdfm-nav:disabled { background: var(--c-border); color: var(--c-muted); cursor: not-allowed; }
.pdfm-pageinfo { font-weight: 600; color: var(--c-ink); min-width: 110px; text-align: center; }

@media (max-width: 600px) {
  .pdfm-backdrop { padding: 0; }
  .pdfm-dialog { max-height: 100vh; height: 100vh; border-radius: 0; width: 100%; }
  .pdfm-title { width: 100%; flex-basis: 100%; }
}

/* =========================================================================
   EVENTS PAGE
   ========================================================================= */
.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.event-card {
  position: relative; display: flex; align-items: stretch; gap: 0;
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.event-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.event-card.past .ev-open {
  display: flex; align-items: stretch; gap: 0; width: 100%;
  background: none; border: 0; padding: 0; cursor: pointer; text-align: left; font: inherit; color: inherit;
}
.ev-date {
  flex: 0 0 86px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--c-river), var(--c-jungle)); color: #fff; padding: 16px 8px;
}
.ev-date .db-day { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.ev-date .db-mon { text-transform: uppercase; letter-spacing: 1px; font-weight: 700; font-size: 0.85rem; }
.ev-date .db-yr { font-size: 0.75rem; opacity: 0.85; margin-top: 2px; }
.ev-info { padding: 16px 18px; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.ev-info h3 { margin: 0; font-size: 1.15rem; }
.ev-info p { margin: 0; color: var(--c-muted); font-size: 0.95rem; }
.ev-cta { color: var(--c-sun); font-weight: 700; font-size: 0.9rem; }


/* Paywall (past events, logged-out) */
.paywall-wrap { position: relative; }
.paywall-ghosts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; filter: blur(6px); opacity: 0.5; pointer-events: none; user-select: none; }
.event-card.ghost { box-shadow: none; }
.paywall-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; }
.paywall-card {
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 30px 28px; text-align: center; max-width: 380px; width: 100%;
}
.paywall-card .lock-icon { font-size: 2.4rem; }
.paywall-card h3 { margin: 6px 0; }
.paywall-card p { color: var(--c-muted); margin: 0 0 16px; }
.paywall-card form { display: flex; flex-direction: column; gap: 10px; }
.paywall-card input { padding: 12px 16px; font-size: 1rem; font-family: inherit; border: 1px solid var(--c-border); border-radius: 999px; }
.paywall-card input:focus { outline: none; border-color: var(--c-river); box-shadow: 0 0 0 3px rgba(31,138,140,0.15); }

/* Generic events modal (forms + detail) */
.ev-modal-backdrop { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,0.7); display: none; align-items: center; justify-content: center; padding: 18px; }
.ev-modal-backdrop.open { display: flex; }
.ev-modal { background: #fff; border-radius: 14px; width: min(640px, 100%); max-height: 92vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 24px 70px rgba(0,0,0,0.5); }
.ev-modal-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--c-border); }
.ev-modal-title { font-weight: 700; color: var(--c-jungle-dark); flex: 1; font-size: 1.15rem; }
.ev-modal-x { background: none; border: 0; font-size: 1.5rem; cursor: pointer; color: var(--c-muted); line-height: 1; }
.ev-modal-body { padding: 18px; overflow-y: auto; }
.ev-modal-body label { display: block; font-weight: 600; margin-bottom: 14px; color: var(--c-jungle-dark); }
.ev-modal-body .hint { font-weight: 400; color: var(--c-muted); font-size: 0.85rem; }
.ev-modal-body input, .ev-modal-body textarea { width: 100%; margin-top: 6px; padding: 10px 12px; font: inherit; border: 1px solid var(--c-border); border-radius: 8px; }
.ev-modal-body input:focus, .ev-modal-body textarea:focus { outline: none; border-color: var(--c-river); box-shadow: 0 0 0 3px rgba(31,138,140,0.15); }
.ev-modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--c-border); }
.ev-modal-foot .btn { padding: 10px 22px; }

.detail-date { font-weight: 700; color: var(--c-river); margin: 0 0 8px; }
.detail-desc { color: var(--c-ink); margin: 0 0 16px; }
.detail-admin { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.photos-head { margin: 0 0 12px; border-top: 1px solid var(--c-border); padding-top: 16px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.photo-item { position: relative; margin: 0; border-radius: 10px; overflow: hidden; background: var(--c-surface); aspect-ratio: 1; }
.photo-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.photo-item:hover img { transform: scale(1.05); }
.photo-del { position: absolute; top: 6px; right: 6px; background: rgba(255,255,255,0.9); border: 0; border-radius: 6px; width: 28px; height: 28px; cursor: pointer; }
.photo-item img { cursor: zoom-in; }

/* Image lightbox (event photos) */
.lightbox {
  position: fixed; inset: 0; z-index: 1100; display: none;
  align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.9); padding: 40px 16px;
}
.lightbox.open { display: flex; }
.lightbox .lb-img { max-width: 92vw; max-height: 88vh; border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,0.6); }
.lightbox .lb-close {
  position: absolute; top: 14px; right: 18px; background: none; border: 0;
  color: #fff; font-size: 2.4rem; line-height: 1; cursor: pointer;
}
.lightbox .lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.15); border: 0; color: #fff;
  font-size: 2.2rem; width: 52px; height: 52px; border-radius: 50%; cursor: pointer;
}
.lightbox .lb-nav:hover { background: rgba(255,255,255,0.3); }
.lightbox .lb-prev { left: 14px; }
.lightbox .lb-next { right: 14px; }
.lightbox .lb-counter { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: #fff; font-size: 0.95rem; }
@media (max-width: 600px) {
  .lightbox .lb-nav { width: 42px; height: 42px; font-size: 1.8rem; }
}

/* Contact form (Netlify) */
.contact-form { max-width: 640px; }
.contact-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form label { display: block; font-weight: 600; color: var(--c-jungle-dark); margin-bottom: 16px; }
.contact-form input, .contact-form textarea {
  width: 100%; margin-top: 6px; padding: 12px 14px; font: inherit;
  border: 1px solid var(--c-border); border-radius: 10px; background: #fff;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--c-river); box-shadow: 0 0 0 3px rgba(31,138,140,0.15);
}
.contact-form button[type=submit] { margin-top: 4px; }
.form-status { margin-top: 14px; font-weight: 600; min-height: 1.2em; }
.form-status.ok { color: var(--c-jungle); }
.form-status.error { color: #c0392b; }
@media (max-width: 560px) {
  .contact-form .form-row { grid-template-columns: 1fr; gap: 0; }
}

/* =========================================================================
   FLOATING "ASK US" BUTTON  (links to Google Form)
   ========================================================================= */
.floating-contact {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  display: flex; align-items: center; gap: 0;
  background: var(--c-river); color: #fff; border-radius: 999px;
  padding: 0; height: 60px; width: 60px; overflow: hidden;
  box-shadow: 0 10px 26px rgba(13, 59, 44, 0.35);
  transition: width 0.3s ease, background 0.2s ease;
  white-space: nowrap;
}
.floating-contact .fc-icon {
  min-width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; font-size: 1.6rem;
}
.floating-contact .fc-label { opacity: 0; padding-right: 0; font-weight: 700; transition: opacity 0.2s ease, padding 0.3s ease; }
.floating-contact:hover { width: 210px; background: var(--c-jungle); color: #fff; }
.floating-contact:hover .fc-label { opacity: 1; padding-right: 22px; }
.floating-contact::before { /* gentle attention pulse */
  content: ""; position: absolute; inset: 0; border-radius: 999px;
  box-shadow: 0 0 0 0 rgba(31, 138, 140, 0.5); animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(31, 138, 140, 0.5); }
  70%  { box-shadow: 0 0 0 16px rgba(31, 138, 140, 0); }
  100% { box-shadow: 0 0 0 0 rgba(31, 138, 140, 0); }
}

/* =========================================================================
   SMALL UTILITIES  (replacing former inline styles)
   ========================================================================= */
.gap-top-md { margin-top: 46px; }
.gap-top-lg { margin-top: 54px; }
.heritage-photo { aspect-ratio: 4 / 3; object-fit: cover; }
.prayer-note { font-style: normal; font-size: 1rem; color: var(--c-muted); }
.split .text .btn { margin-top: 10px; }
.section-green .eyebrow { color: var(--c-sun-light); }
.section-top .section-heading { border: 0; padding: 0; }
.members-bar h2 { margin: 0; }
.members-gate .lead { font-size: 1rem; }
.members-msg.inline { padding: 0; }
.pdfm-body .members-msg.error { color: #fff; }

/* =========================================================================
   FOOTER
   ========================================================================= */
.site-footer { background: var(--c-jungle-dark); color: #d8e6df; padding: 50px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; margin-bottom: 30px; }
.site-footer h4 { color: #fff; margin-bottom: 14px; font-size: 1.05rem; letter-spacing: 0.5px; }
.footer-alias { font-style: italic; opacity: 0.85; margin-top: -8px; font-size: 0.92rem; }
.site-footer a { color: var(--c-river-light); }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 18px; font-size: 0.9rem; color: #9fb8ad; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* =========================================================================
   SCROLL-REVEAL ANIMATION  (added/removed by js/main.js)
   ========================================================================= */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal.delay-1 { transition-delay: 0.12s; }
.reveal.delay-2 { transition-delay: 0.24s; }
.reveal.delay-3 { transition-delay: 0.36s; }

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 880px) {
  .cards-3 { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; top: 0; right: 0; height: 100vh; width: min(78vw, 320px);
    margin: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--c-jungle-dark); padding: 90px 18px 30px;
    transform: translateX(100%); transition: transform 0.32s ease;
    box-shadow: -10px 0 40px rgba(0,0,0,0.3);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a, .site-header.scrolled .nav-links a { color: #fff; padding: 15px 14px; border-radius: 10px; }
  .nav-links a:hover, .nav-links a.active { background: rgba(255,255,255,0.14); }
  .nav-links a.nav-members { background: var(--c-sun); margin-top: 8px; text-align: center; }
  .hero-hornbill { width: 130px; right: 4%; top: 16%; }
  .section { padding: 60px 0; }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .hero-content > * { opacity: 1; transform: none; }
}
