/*
Theme Name: hope-philly-kadence
Theme URI: https://www.kadencewp.com/kadence-theme/
Template: kadence
Author: Hope Philly
Author URI: https://hopephilly.org
Description: Hope Philly child theme for Kadence. Preserves the full design system from the original Hope Philly Archive theme.
Version: 1.0.0
Text Domain: hope-philly-kadence
*/

/* ==========================================================================
   GOOGLE FONTS IMPORT
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Lato:wght@300;400;700&display=swap');


/* ==========================================================================
   DESIGN SYSTEM — Hope Philly
   ========================================================================== */

:root {
  /* Brand colours */
  --color-navy:        #1e3a4a;
  --color-navy-light:  #2a4f63;
  --color-slate:       #2d5f78;
  --color-slate-light: #3d7590;
  --color-coral:       #e8614e;
  --color-coral-light: #f07262;
  --color-cream:       #faebd7;
  --color-cream-dark:  #f0dcc0;
  --color-charcoal:    #2d2d2d;
  --color-muted:       #607280;
  --color-white:       #ffffff;
  --color-border:      #ddd0b8;

  /* Aliases */
  --color-gold:        var(--color-coral);
  --color-gold-light:  var(--color-coral-light);

  /* Typography */
  --font-heading:      'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:         'Lato', 'Helvetica Neue', Arial, sans-serif;
  --font-accent:       'Lato', sans-serif;

  /* Sizing */
  --max-width:         1100px;
  --section-padding:   80px 0;
  --border-radius:     6px;

  /* Shadows */
  --shadow-sm:         0 2px 8px  rgba(30, 58, 74, 0.08);
  --shadow-md:         0 4px 20px rgba(30, 58, 74, 0.14);
  --shadow-lg:         0 8px 40px rgba(30, 58, 74, 0.20);

  /* Transitions */
  --transition:        all 0.25s ease;
}


/* ==========================================================================
   BASE & RESET
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  background-color: var(--color-cream);
  color: var(--color-charcoal);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-navy);
  line-height: 1.3;
  margin-top: 0;
  margin-bottom: 0.75em;
  text-wrap: balance; /* prevents single-word orphans on headings */
}

h1 { font-size: clamp(2.75rem, 6.25vw, 4.75rem); font-weight: 700; line-height: 1.1; }
h2 { font-size: clamp(2rem, 4.4vw, 3.2rem);     font-weight: 600; line-height: 1.2; }
h3 { font-size: clamp(1.4rem, 2.5vw, 1.9rem);   font-weight: 600; line-height: 1.3; }
h4 { font-size: 1.4rem; font-weight: 600; line-height: 1.4; }

p {
  margin-top: 0;
  margin-bottom: 1.25em;
  overflow-wrap: break-word;
}

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

a:hover {
  color: var(--color-slate-light);
  text-decoration: underline;
}

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

html { scroll-behavior: smooth; }


/* ==========================================================================
   LAYOUT UTILITIES
   ========================================================================== */

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

.section-padding {
  padding: var(--section-padding);
}

.text-center { text-align: center; }
.text-left   { text-align: left; }

.bg-navy        { background-color: var(--color-navy); color: var(--color-white); }
.bg-cream       { background-color: var(--color-cream); }
.bg-cream-dark  { background-color: var(--color-cream-dark); }
.bg-white       { background-color: var(--color-white); }

.text-gold  { color: var(--color-gold); }
.text-navy  { color: var(--color-navy); }
.text-muted { color: var(--color-muted); }
.text-white { color: var(--color-white); }


/* ==========================================================================
   SECTION LABELS / EYEBROWS
   ========================================================================== */

.hp-eyebrow {
  display: inline-block;
  font-family: var(--font-accent);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-coral);
  margin-bottom: 0.75rem;
}

.hp-eyebrow::before,
.hp-eyebrow::after {
  content: '—';
  margin: 0 0.4em;
  opacity: 0.5;
}


/* ==========================================================================
   BUTTONS
   ========================================================================== */

.hp-btn {
  display: inline-block;
  padding: 14px 36px;
  border-radius: var(--border-radius);
  font-family: var(--font-accent);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
}

.hp-btn-primary {
  background-color: var(--color-slate);
  color: var(--color-white);
  border: 2px solid var(--color-slate);
}

.hp-btn-primary:hover {
  background-color: var(--color-slate-light);
  border-color: var(--color-slate-light);
  color: var(--color-white);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.hp-btn-outline {
  background-color: transparent;
  color: var(--color-white);
  border: 2px solid rgba(255,255,255,0.6);
}

.hp-btn-outline:hover {
  background-color: rgba(255,255,255,0.1);
  border-color: var(--color-white);
  color: var(--color-white);
  text-decoration: none;
}

.hp-btn-navy {
  background-color: var(--color-navy);
  color: var(--color-white);
  border: 2px solid var(--color-navy);
}

.hp-btn-navy:hover {
  background-color: var(--color-navy-light);
  border-color: var(--color-navy-light);
  color: var(--color-white);
  text-decoration: none;
  transform: translateY(-1px);
}


/* ==========================================================================
   HERO SECTION  (.hp-hero applied directly on the Cover block)
   The Cover block IS the hero — no Group wrapper needed.
   Cover handles min-height, flex centering, and the dim overlay natively.
   ========================================================================== */

.wp-block-cover.hp-hero {
  background-color: var(--color-navy); /* fallback before image loads */
  overflow: hidden;
  /* min-height and flex centering handled natively by Cover block */
}

/* Inner container: constrain text width and add padding */
.wp-block-cover.hp-hero .wp-block-cover__inner-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 24px;
  text-align: center;
}

.hp-hero__content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 40px 24px;
  color: var(--color-white);
}

.hp-hero__years {
  font-family: var(--font-accent);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-cream);
  margin-bottom: 1.5rem;
}

.hp-hero__title {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 700;
  color: var(--color-white);
  margin: 0 0 0.25em;
  line-height: 1.05;
}

.hp-hero__title em {
  font-style: italic;
  color: var(--color-cream);
}

.hp-hero__subtitle {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: rgba(255,255,255,0.8);
  font-weight: 300;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
  max-width: 600px;
}

.hp-hero__divider {
  width: 60px;
  height: 3px;
  background: var(--color-cream);
  margin: 1.5rem auto;
  border-radius: 2px;
}

.hp-hero__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Scroll indicator */
.hp-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: rgba(255,255,255,0.4);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: fadeInUp 1s ease 1s both;
}

.hp-scroll-hint::after {
  content: '';
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.3);
  animation: scrollPulse 1.5s ease infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 0.8; transform: scaleY(1.2); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}


/* ==========================================================================
   MISSION / INTRO SECTION
   ========================================================================== */

.hp-mission {
  padding: 80px clamp(40px, 8vw, 120px) !important;
  text-align: center;
  background-color: var(--color-white);
}

.hp-mission__quote {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  font-style: italic;
  color: var(--color-navy);
  max-width: 780px;
  margin: 0 auto 1.5rem;
  line-height: 1.45;
}

.hp-mission__source {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.hp-mission__body {
  max-width: 640px;
  margin: 2rem auto 0;
  font-size: 1.05rem;
  color: var(--color-charcoal);
  line-height: 1.85;
  text-wrap: pretty; /* reduces paragraph widows */
}


/* ==========================================================================
   STATS / LEGACY NUMBERS
   ========================================================================== */

.hp-stats {
  background-color: var(--color-slate);
  padding: 80px clamp(40px, 8vw, 120px) !important;
}

.hp-stats__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 48px;
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

/* Gutenberg Columns block inside .hp-stats */
.hp-stats .wp-block-columns {
  max-width: var(--max-width);
  margin: 0 auto;
  gap: 40px !important;     /* override Gutenberg's default 2em which can be uneven */
  align-items: center;
}

.hp-stats .wp-block-column {
  text-align: center;
  padding: 0 8px;           /* breathing room between stat items */
}

/* Divider between stats on desktop */
.hp-stats .wp-block-column + .wp-block-column {
  border-left: 1px solid rgba(255,255,255,0.12);
}

@media (max-width: 600px) {
  .hp-stats .wp-block-column + .wp-block-column {
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.12);
    padding-top: 32px;
  }
}

.hp-stat__number {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--color-cream);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.hp-stat__label {
  font-family: var(--font-accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}

.hp-stat__desc {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.45);
  margin-top: 0.5rem;
}

/* Override Kadence/Gutenberg heading colours inside .hp-stats */
.hp-stats h2,
.hp-stats h3,
.hp-stats p {
  color: var(--color-white);
}


/* ==========================================================================
   MEMORIES / PHOTO GRID
   ========================================================================== */

.hp-memories {
  padding: 80px clamp(40px, 8vw, 120px) !important;
  background-color: var(--color-cream-dark);
}

.hp-memories__header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 56px;
}

.hp-memories__header h2 {
  margin-bottom: 0.5em;
}

.hp-memories__header p {
  font-size: 0.95rem;
  color: var(--color-muted);
  margin-bottom: 0;
}

/* Gutenberg columns row for memory cards */
.hp-memories .wp-block-columns {
  gap: 20px !important;
  margin-bottom: 20px !important;
  align-items: stretch;     /* equal-height rows */
}

.hp-memories .wp-block-columns:last-child {
  margin-bottom: 0 !important;
}

/* Each column fills its flex space so all cards in a row are same height */
.hp-memories .wp-block-column {
  display: flex;
  flex-direction: column;
}

.hp-memory-card {
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  /* fills the column so cards in a row are equal height */
  display: flex;
  flex-direction: column;
  height: 100%;
}

.hp-memory-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

/* Image fills top portion; aspect-ratio locks proportions */
.hp-memory-card .wp-block-image {
  flex-shrink: 0;
  margin: 0;
}

.hp-memory-card .wp-block-image img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  border-radius: 0;          /* no radius on image — card handles it */
}

/* Caption is always flush under the image, no gap */
.hp-memory-card__caption {
  padding: 14px 18px 18px;
  font-size: 0.875rem;
  color: var(--color-muted);
  font-style: italic;
  line-height: 1.5;
  margin: 0;
  /* pushes to bottom if card is taller than its siblings */
  margin-top: auto;
}


/* ==========================================================================
   SCRIPTURE / QUOTE BLOCK
   ========================================================================== */

.hp-scripture {
  background-color: var(--color-slate);
  padding: 80px clamp(40px, 8vw, 120px) !important;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hp-scripture::before {
  content: '\201C';
  position: absolute;
  top: -0.2em;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-heading);
  font-size: 20rem;
  color: rgba(201, 162, 39, 0.06);
  line-height: 1;
  pointer-events: none;
}

.hp-scripture__text {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-style: italic;
  color: var(--color-white);
  max-width: 720px;
  margin: 0 auto 1.25rem;
  line-height: 1.5;
  position: relative;
  text-wrap: balance;
}

.hp-scripture__reference {
  font-family: var(--font-accent);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-cream);
  opacity: 0.75;
}

/* Gutenberg headings/paragraphs inside .hp-scripture */
.hp-scripture h1,
.hp-scripture h2,
.hp-scripture h3,
.hp-scripture p {
  color: var(--color-white);
}


/* ==========================================================================
   ABOUT PAGE — STORY SECTION
   ========================================================================== */

.hp-story {
  padding: 80px clamp(40px, 8vw, 120px) !important;
  background-color: var(--color-white);
}

/* Gutenberg Columns inside .hp-story */
.hp-story .wp-block-columns {
  max-width: var(--max-width);
  margin: 0 auto;
  gap: 64px !important;
  align-items: center;      /* vertically center text beside image */
}

.hp-story .wp-block-column > h2,
.hp-story .wp-block-column > .hp-eyebrow {
  margin-top: 0;
}

.hp-story .wp-block-column > p {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--color-charcoal);
  text-wrap: pretty;
}

.hp-story .wp-block-column > p:last-child {
  margin-bottom: 0;
}

.hp-story__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hp-story__inner.reverse {
  direction: rtl;
}

.hp-story__inner.reverse > * {
  direction: ltr;
}

.hp-story__text h2 {
  margin-bottom: 1rem;
}

.hp-story__text p {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--color-charcoal);
}

.hp-story__image {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hp-story__image img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

@media (max-width: 768px) {
  .hp-story__inner,
  .hp-story__inner.reverse {
    grid-template-columns: 1fr;
    direction: ltr;
    gap: 40px;
  }
}


/* ==========================================================================
   CONVICTIONS / 3-COLUMN SECTION
   ========================================================================== */

.hp-convictions {
  padding: 80px clamp(40px, 8vw, 120px) !important;
  background-color: var(--color-cream);
}

.hp-convictions__header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}

/* Equal-height card row */
.hp-convictions .wp-block-columns {
  max-width: var(--max-width);
  margin: 0 auto;
  gap: 24px !important;
  align-items: stretch;     /* all columns the same height */
}

/* Each column = card, flex column so body text fills space */
.hp-convictions .wp-block-column {
  display: flex;
  flex-direction: column;
  text-align: center;
  padding: 36px;            /* equal padding all sides */
  background: var(--color-white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

/* Last paragraph in card pushes to bottom edge */
.hp-convictions .wp-block-column > *:last-child {
  margin-bottom: 0;
}

.hp-conviction__icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--color-slate);
}

.hp-conviction__title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-navy);
  margin-bottom: 0.6rem;
}

.hp-conviction__text {
  font-size: 0.95rem;
  color: var(--color-muted);
  line-height: 1.75;
  text-wrap: pretty;
}


/* ==========================================================================
   LEGACY / WHAT CONTINUES SECTION
   ========================================================================== */

.hp-legacy {
  padding: 80px clamp(40px, 8vw, 120px) !important;
  background-color: var(--color-cream);
}

.hp-legacy__header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}

/* Equal-height card row — the key fix */
.hp-legacy .wp-block-columns {
  max-width: var(--max-width);
  margin: 0 auto;
  gap: 24px !important;
  align-items: stretch;     /* force all three columns to the same height */
}

/* Card: flex column so the body paragraph fills remaining space */
.hp-legacy .wp-block-column {
  display: flex;
  flex-direction: column;
  padding: 36px;            /* consistent 36px all sides */
  background: var(--color-white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

/* H3 inside cards — tighter bottom margin */
.hp-legacy .wp-block-column h3 {
  margin-bottom: 0.6rem;
  font-size: 1.25rem;
  color: var(--color-navy);
}

/* Body text fills remaining card height; no orphan bottom margin */
.hp-legacy .wp-block-column > p {
  flex: 1;
  font-size: 0.95rem;
  color: var(--color-muted);
  line-height: 1.75;
  margin-bottom: 0;
  text-wrap: pretty;
}

.hp-legacy-item__title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-navy);
  margin-bottom: 0.6rem;
}

.hp-legacy-item__text {
  font-size: 0.95rem;
  color: var(--color-muted);
  line-height: 1.75;
}


/* ==========================================================================
   TIMELINE
   ========================================================================== */

.hp-timeline {
  padding: 80px clamp(40px, 8vw, 120px) !important;
  background-color: var(--color-cream-dark);
}

.hp-timeline__inner {
  max-width: 680px;
  margin: 0 auto;
  position: relative;
}

/* Continuous vertical line — aligned with the dot center (gap between year col and content) */
.hp-timeline__inner::before {
  content: '';
  position: absolute;
  left: 106px; /* center of dot: 98px + 8px half-dot */
  top: 90px;
  bottom: 24px;
  width: 2px;
  background: linear-gradient(to bottom, var(--color-slate) 85%, transparent 100%);
  z-index: 0;
}

.hp-timeline__title {
  text-align: center;
  margin-bottom: 56px;
  position: relative;
  z-index: 1;
}

/* Each item: no grid — Columns block handles the layout */
.hp-timeline__item {
  position: relative;
  z-index: 1;
  margin-bottom: 0;
}

/* Dot on each item — sits in the gap between year col and content card */
.hp-timeline__item::after {
  content: '';
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-slate);
  position: absolute;
  left: 98px; /* right edge of 96px year col + half gap (10px) - half dot (8px) */
  top: 8px;
  border: 3px solid var(--color-cream-dark);
  box-shadow: 0 0 0 4px rgba(45, 95, 120, 0.15);
  z-index: 2;
}

/* Remove the old per-item line (::before) — replaced by container line */
.hp-timeline__item::before {
  display: none;
}

/* Force Columns block to stay horizontal at all widths */
.hp-timeline__item .wp-block-columns {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 20px !important;
  align-items: flex-start;
  padding-bottom: 40px;
}

.hp-timeline__item:last-child .wp-block-columns {
  padding-bottom: 0;
}

/* Year column: fixed width, year text centered */
.hp-timeline__item .wp-block-column:first-child {
  flex: 0 0 96px !important;
  min-width: 96px !important;
  max-width: 96px !important;
  padding-top: 4px;
}

/* Content column: card with left accent border */
.hp-timeline__item .wp-block-column:last-child {
  flex: 1 1 auto !important;
  background: var(--color-white);
  border-radius: var(--border-radius);
  border-left: 3px solid var(--color-slate);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
}

.hp-timeline__year {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-slate);
  text-align: right; /* year sits to the LEFT of the dot */
  line-height: 1.2;
  padding-right: 4px;
}

/* h4 and p inside content card */
.hp-timeline__item .wp-block-column:last-child h4 {
  margin-bottom: 0.35em;
  color: var(--color-navy);
  font-size: 1.15rem;
}

.hp-timeline__item .wp-block-column:last-child p {
  font-size: 0.95rem;
  color: var(--color-muted);
  margin-bottom: 0;
  line-height: 1.7;
}


/* ==========================================================================
   ADAM DAWES MEMORIAL  (.hp-memorial)
   ========================================================================== */

.hp-memorial {
  padding: 80px clamp(40px, 8vw, 120px) !important;
  background-color: var(--color-navy);
  text-align: center;
  color: var(--color-white);
}

.hp-memorial h1,
.hp-memorial h2,
.hp-memorial h3,
.hp-memorial p {
  color: var(--color-white);
}

.hp-memorial__photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 28px;
  border: 4px solid rgba(255,255,255,0.2);
  box-shadow: var(--shadow-lg);
}

/* Gutenberg Image block inside .hp-memorial — make it circular */
.hp-memorial .wp-block-image img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 28px;
  border: 4px solid rgba(255,255,255,0.2);
}

.hp-memorial__name {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 0.25em;
}

.hp-memorial__dates {
  font-family: var(--font-accent);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.hp-memorial__tribute {
  max-width: 680px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.85;
  color: rgba(255,255,255,0.75);
}


/* ==========================================================================
   TEAM / LEADERSHIP
   ========================================================================== */

.hp-team {
  padding: 80px clamp(40px, 8vw, 120px) !important;
  background-color: var(--color-white);
  text-align: center;
}

.hp-team__header {
  max-width: 600px;
  margin: 0 auto 56px;
}

/* Team columns — equal height, top-aligned */
.hp-team .wp-block-columns {
  max-width: var(--max-width);
  margin: 0 auto 32px;
  gap: 32px !important;
  align-items: start;       /* top-align people cards (variable bio length) */
}

.hp-team .wp-block-columns:last-child {
  margin-bottom: 0;
}

.hp-team .wp-block-column {
  text-align: center;
}

.hp-team__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 40px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hp-person {
  text-align: center;
}

.hp-person__photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 20px;
  border: 4px solid var(--color-cream-dark);
  box-shadow: var(--shadow-sm);
}

/* Gutenberg Image inside .hp-person — circular crop */
.hp-person .wp-block-image img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 20px;
  border: 4px solid var(--color-cream-dark);
}

.hp-person__name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-navy);
  margin-bottom: 0.2em;
}

.hp-person__role {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-slate);
  margin-bottom: 0.75rem;
}

.hp-person__bio {
  font-size: 0.9rem;
  color: var(--color-muted);
  line-height: 1.75;
  text-wrap: pretty;
}


/* ==========================================================================
   CLOSING / FAREWELL SECTION
   ========================================================================== */

.hp-farewell {
  padding: 80px clamp(40px, 8vw, 120px) !important;
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-slate) 100%);
  text-align: center;
  color: var(--color-white);
}

.hp-farewell h1,
.hp-farewell h2,
.hp-farewell h3,
.hp-farewell p {
  color: var(--color-white);
}

.hp-farewell__cross {
  font-size: 3rem;
  color: var(--color-cream);
  margin-bottom: 1.5rem;
  opacity: 0.8;
}

.hp-farewell__title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: var(--color-white);
  margin-bottom: 1rem;
}

.hp-farewell__text {
  max-width: 580px;
  margin: 0 auto 2.5rem;
  font-size: 1rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.85;
  text-wrap: pretty;
}


/* ==========================================================================
   PAGE HERO (inner pages — About, etc.)
   ========================================================================== */

.hp-page-hero {
  background-color: var(--color-navy);
  padding: 100px 24px 80px;
  text-align: center;
  color: var(--color-white);
}

.hp-page-hero h1,
.hp-page-hero h2 {
  color: var(--color-white);
}

.hp-page-hero__sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.7);
  max-width: 560px;
  margin: 0 auto;
}


/* ==========================================================================
   KADENCE THEME OVERRIDES
   ========================================================================== */

/* Site header — cream background matching logo */
.site-header,
.site-header.sticky-header {
  background-color: var(--color-cream) !important;
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 2px 12px rgba(30, 58, 74, 0.08);
}

/* Nav links */
.main-navigation a,
.site-header .kadence-navigation a {
  color: var(--color-navy);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 0.85rem;
  text-transform: uppercase;
}

.main-navigation a:hover,
.site-header .kadence-navigation a:hover {
  color: var(--color-slate-light);
  text-decoration: none;
}

/* Site footer */
.site-footer {
  background-color: var(--color-navy) !important;
  color: rgba(255,255,255,0.5);
}

.site-footer a {
  color: rgba(255,255,255,0.5);
}

.site-footer a:hover {
  color: var(--color-cream);
  text-decoration: none;
}

/* ==========================================================================
   KADENCE FULL-WIDTH LAYOUT
   Target only Kadence's three wrapper divs — NOT the block content itself.
   _kad_post_layout=fullwidth, _kad_post_content_style=unboxed,
   _kad_post_vertical_padding=hide are set via post meta.
   ========================================================================== */

/* 1. Remove the 5rem top/bottom gap Kadence puts around the content area */
#primary.content-area {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* 2. Remove the 1290px max-width container so alignfull blocks reach the edge */
.content-container.site-container {
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* 3. Remove the 2rem padding inside the article entry wrapper */
.entry-content-wrap {
  padding: 0 !important;
}

/* 4a. Remove Kadence's article card shadow (looks odd with full-width sections) */
.entry.single-entry {
  box-shadow: none !important;
}

/* 4. Stack section blocks flush — no default Gutenberg block gap between them */
.entry-content > .wp-block-group,
.entry-content > .wp-block-cover {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* 5. Constrain inner wide blocks (columns, etc.) to design max-width */
.entry-content .alignwide {
  max-width: min(var(--max-width), calc(100% - 48px));
  margin-left: auto !important;
  margin-right: auto !important;
}


/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

/* Tablet — 781px and below (Gutenberg's built-in breakpoint for columns) */
@media (max-width: 781px) {

  /* Section padding — reduce on tablet/mobile */
  .hp-mission,
  .hp-stats,
  .hp-memories,
  .hp-scripture,
  .hp-legacy,
  .hp-convictions,
  .hp-story,
  .hp-timeline,
  .hp-memorial,
  .hp-team,
  .hp-farewell,
  .hp-page-hero {
    padding-top: 64px;
    padding-bottom: 64px;
    padding-left: 24px;
    padding-right: 24px;
  }

  /* Stats: 2×2 grid on tablet */
  .hp-stats .wp-block-columns {
    flex-wrap: wrap;
  }

  .hp-stats .wp-block-column {
    flex-basis: calc(50% - 20px) !important;
    border-left: none !important;
  }

  /* Legacy/Convictions: stack to single column on tablet */
  .hp-legacy .wp-block-columns,
  .hp-convictions .wp-block-columns {
    flex-direction: column;
  }

  .hp-legacy .wp-block-column,
  .hp-convictions .wp-block-column {
    flex-basis: 100% !important;
    width: 100%;
  }

  /* Story columns: stack image below text */
  .hp-story .wp-block-columns {
    flex-direction: column;
    gap: 40px !important;
  }

  .hp-story .wp-block-column {
    flex-basis: 100% !important;
    width: 100%;
  }

  /* Memory cards: 2 per row on tablet */
  .hp-memories .wp-block-columns {
    flex-wrap: wrap;
    gap: 16px !important;
  }

  .hp-memories .wp-block-column {
    flex-basis: calc(50% - 8px) !important;
    min-width: 0;
  }

  /* Timeline: shrink year column on tablet */
  .hp-timeline__item .wp-block-column:first-child {
    flex: 0 0 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
  }
  .hp-timeline__item::after { left: 74px; } /* 72px col + 10px half-gap - 8px half-dot */
  .hp-timeline__inner::before { left: 82px; }
}

/* Mobile — 480px and below */
@media (max-width: 480px) {

  .hp-mission,
  .hp-stats,
  .hp-memories,
  .hp-scripture,
  .hp-legacy,
  .hp-convictions,
  .hp-story,
  .hp-timeline,
  .hp-memorial,
  .hp-team,
  .hp-farewell,
  .hp-page-hero {
    padding-top: 52px;
    padding-bottom: 52px;
  }

  /* Memory cards: single column on small phones */
  .hp-memories .wp-block-column {
    flex-basis: 100% !important;
  }

  /* Ensure caption is flush to its image — no extra gap */
  .hp-memory-card {
    margin-bottom: 0;
  }

  .hp-memory-card .wp-block-image {
    margin-bottom: 0;
  }

  .hp-memory-card__caption {
    padding: 12px 16px 16px;
  }

  /* Hero buttons: stack vertically */
  .hp-hero .wp-block-buttons {
    flex-direction: column;
    align-items: center;
  }

  /* Stats: 1 per row on small phones */
  .hp-stats .wp-block-column {
    flex-basis: 100% !important;
    border-left: none !important;
    border-top: 1px solid rgba(255,255,255,0.12);
    padding-top: 28px;
  }

  .hp-stats .wp-block-column:first-child {
    border-top: none;
    padding-top: 0;
  }

  /* Team: 2 per row on mobile */
  .hp-team .wp-block-columns {
    flex-wrap: wrap;
  }

  .hp-team .wp-block-column {
    flex-basis: calc(50% - 16px) !important;
  }
}


/* ==========================================================================
   GUTENBERG BLOCK POLISH
   Neutralise default margins/padding that cause uneven spacing between
   full-width section blocks.
   ========================================================================== */

/* Section-level Group blocks: no default margin */
.entry-content > .wp-block-group {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* Gutenberg adds var(--wp--style--block-gap) between columns — override per section */
.wp-block-columns.is-layout-flex {
  gap: var(--hp-col-gap, 24px);
}

/* Widen the inner content on full-width pages */
.entry-content .alignwide {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

/* Prevent Kadence from adding extra top padding to the first block */
.site-content .entry-content > *:first-child {
  margin-top: 0;
}

/* Buttons — tighten Gutenberg's default button margin */
.wp-block-buttons {
  gap: 16px;
}

/* Separator used as divider line in hero */
.wp-block-separator.is-style-wide {
  border-color: var(--color-cream);
  opacity: 0.4;
}

/* Images inside story sections — rounded corners + shadow */
.hp-story .wp-block-image img,
.hp-story .hp-story__image img {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

/* Quote block used in mission section — remove default left border */
.hp-mission .wp-block-quote {
  border-left: none;
  padding-left: 0;
  margin: 0 auto;
}

.hp-mission .wp-block-quote p {
  margin-bottom: 0;
  font-family: var(--font-heading);
  font-style: italic;
  color: var(--color-navy);
  font-size: clamp(1.3rem, 2.8vw, 2rem);
  line-height: 1.5;
  text-wrap: balance;
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
  .hp-hero { min-height: auto; }
  .hp-scroll-hint { display: none; }
  * { box-shadow: none !important; }
}
