/* ================================
   Leadership Section Wrapper
   ================================ */
.section-wrapper {
  max-width: 175ch;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) 1.5rem;
  background: #f9fafb;              /* light neutral background */
  border-radius: 12px;              /* soft rounded corners */
  box-shadow: 0 6px 20px rgba(0,0,0,0.08); /* subtle depth */
  overflow: hidden;                 /* clean edges */
}

/* ================================
   Officer Heading
   ================================ */
.officer-heading {
  background: linear-gradient(
    135deg,
    var(--primary-green) 0%,
    #2f4f4f 100%
  );
  color: #fff;
  text-align: center;
  padding: clamp(3rem, 6vw, 5rem) 2rem;
  border-radius: 10px;
  margin-bottom: 2.5rem;
}

.officer-heading__content {
  max-width: 65ch; /* narrower width */
  margin: 0 auto;
}

.officer-heading__title {
  font-size: clamp(2.25rem, 4vw, 3rem);
  font-family: var(--font-serif-primary);
  margin-bottom: 1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff; /* force white text */
  text-shadow: 0 0 0 rgba(0,0,0,0); /* start with no shadow */
  animation: shadowPulse 2s ease-out forwards; /* run once on load */
}

/* Keyframes for animated shadow */
@keyframes shadowPulse {
  0% {
    text-shadow: 0 0 0 rgba(0,0,0,0);
    opacity: 0.8;
  }
  40% {
    text-shadow: 0 4px 12px rgba(0,0,0,0.4);
    opacity: 1;
  }
  70% {
    text-shadow: 0 6px 18px rgba(0,0,0,0.6);
  }
  100% {
    text-shadow: 0 3px 8px rgba(0,0,0,0.35); /* settle into subtle shadow */
  }
}

.officer-heading__subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-family: var(--font-sans-primary);
  opacity: 0.95;
  margin: 0 auto;
  line-height: 1.2;
  max-width: fit-content;
  color: white;
}

/* Buttons */
.officer-heading__buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.2s ease;
}

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

.btn-primary:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-2px);
}
/* ============================================
   Officer Intro Section
   ============================================ */
.officer-intro {
  margin: 0 auto 3rem auto;
  font-size: 1.05rem;
  line-height: 1.8;
  color: #222;
}

.officer-intro p {
  margin-bottom: 1.5rem;
  text-align: left;
}

.officer-heading + .officer-intro {
  border-top: 1px solid rgba(0,0,0,0.08);
  margin-top: 2rem;
  padding-top: 2rem;
}

/* ============================================
   Inline Citations
   ============================================ */
.citation-group {
  display: inline;
}

/* BCO & Bible citations - unified style */
.citation-bco,
.citation-bible {
  font-style: italic;
  color: var(--primary-green);
  cursor: pointer;
  margin: 0 0.25rem;
  padding: 0;
  background: none !important;
  border: none !important;
  display: inline;
  text-decoration: none; /* default, underline on hover */
  transition: color 0.2s ease, text-decoration-thickness 0.2s ease;
}

.citation-bco:hover,
.citation-bible:hover {
  color: #1a3d3d;
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

/* ============================================
   Citation Lightbox System
   ============================================ */

/* Dark overlay behind lightbox */
.citation-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 900;
}

/* Centered lightbox container */
.citation-lightbox {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  padding: 2.5rem 2rem 2rem 2rem; /* top/right padding leaves space for close X */
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  width: 700px;
  max-width: calc(100vw - 2rem);
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-in-out, transform 0.25s ease;
  z-index: 901;
}

/* Activated overlay & lightbox */
.citation-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.citation-lightbox.active {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

/* Close button inside lightbox */
.citation-lightbox .close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.4rem;      /* smaller, subtle */
  font-weight: 300;
  opacity: 0.55;          /* subtle */
  cursor: pointer;
  background: none;
  border: none;
  color: #333;
  line-height: 1;
  padding: 0;
  z-index: 10;
  transition: opacity 0.2s ease-in-out;
}

.citation-lightbox .close-btn:hover {
  opacity: 0.9;
}

/* Content padding inside lightbox to avoid close button overlap */
.citation-lightbox .citation-content {
  padding-top: 1rem;       /* ensures content doesn't sit under the X */
}





/* ================================
   Elders Section Wrapper
   ================================ */
.elders-section {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  padding: 2.5rem;
  margin-bottom: 3rem;
}

/* ================================
   Elders Header
   ================================ */
.elders-header {
  text-align: center;
  margin-bottom: 2rem;
}

.elders-title {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-family: var(--font-serif-primary);
  font-weight: 700;
  color: var(--primary-green);
  margin-bottom: 0.75rem;
}

.elders-intro {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #444;
  max-width: 70ch;
  margin: 0 auto;
}

/* ================================
   Elders Grid
   ================================ */
.elders-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.elders-item {
  background: #f9fafb;
  border-radius: 8px;
  padding: 1.25rem;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.elders-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* ================================
   Portraits & Names
   ================================ */
.elders-portrait {
  width: 100%;
  max-width: 140px;
  height: 140px;
  border-radius: 50%;
  margin: 0 auto;
  display: block;
  object-fit: cover;              /* ensures missing.png scales nicely */
  background: #e5e7eb;            /* neutral placeholder behind image */
}

.elders-name {
  display: block;
  margin-top: 0.75rem;
  font-weight: 600;
  color: #222;
  font-size: 1rem;
}

/* ================================
   Deacons Section Wrapper
   ================================ */
.deacons-section {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  padding: 2.5rem;
  margin-bottom: 3rem;
}

/* ================================
   Deacons Header
   ================================ */
.deacons-header {
  text-align: center;
  margin-bottom: 2rem;
}

.deacons-title {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-family: var(--font-serif-primary);
  font-weight: 700;
  color: var(--primary-green);
  margin-bottom: 0.75rem;
}

.deacons-intro {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #444;
  max-width: 70ch;
  margin: 0 auto;
}

/* ================================
   Deacons Grid
   ================================ */
.deacons-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.deacons-item {
  background: #f9fafb;
  border-radius: 8px;
  padding: 1.25rem;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.deacons-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* ================================
   Portraits & Names
   ================================ */
.deacons-portrait {
  width: 100%;
  max-width: 140px;
  height: 140px;
  border-radius: 50%;
  margin: 0 auto;
  display: block;
  object-fit: cover;              /* ensures missing.png scales nicely */
  background: #e5e7eb;            /* neutral placeholder behind image */
}

.deacons-name {
  display: block;
  margin-top: 0.75rem;
  font-weight: 600;
  color: #222;
  font-size: 1rem;
}
