/* ============================================================
   PAMELA TUMWEBAZE MEMORIAL SITE — MAIN STYLESHEET
   ============================================================
   Color Palette:
     Primary:    #1A2C4A  (deep navy)
     Accent:     #D4A373  (memorial gold)
     Background: #FFFFFF  (white)
     Section BG: #F7F7F7  (light gray)
     Text:       #333333  (dark gray)

   Typography:
     Headings:  Playfair Display (serif)
     Body:      Lato (sans-serif)

   NOTE FOR BACKEND DEVELOPERS:
     - Data placeholders are marked with <!-- BACKEND: -->
     - Form actions should point to your PHP / Node.js endpoints
     - All dynamic sections can be replaced with server-rendered content
   ============================================================ */

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

/* ── CSS Custom Properties ── */
:root {
  --navy:     #1A2C4A;
  --gold:     #D4A373;
  --gold-dark:#b8864e;
  --white:    #FFFFFF;
  --gray-bg:  #F7F7F7;
  --text:     #333333;
  --text-light:#666666;
  --border:   #E0E0E0;
  --shadow:   0 4px 24px rgba(26,44,74,0.10);
  --shadow-hover: 0 8px 36px rgba(26,44,74,0.18);
  --radius:   10px;
  --transition: all 0.35s ease;
  --max-width: 1200px;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Lato', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
}

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

a { text-decoration: none; color: inherit; }

ul, ol { list-style: none; }

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  color: var(--navy);
  line-height: 1.25;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.75rem); }
h4 { font-size: 1.2rem; }

p { margin-bottom: 1rem; }

.section-label {
  font-family: 'Lato', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 0.5rem;
}

.section-title {
  margin-bottom: 0.75rem;
}

.section-subtitle {
  color: var(--text-light);
  font-size: 1.05rem;
  max-width: 600px;
}

/* ── Layout Utilities ── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section--gray {
  background: var(--gray-bg);
}

/* ── Biography Content (Life Story Page) ── */
.biography-content {
  max-width: 1400px;
  margin: 0 auto;
}

.biography-content .lead-paragraph {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.biography-content p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 1.25rem;
}

.biography-content .section-heading {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--navy);
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gold);
}

.biography-content .role-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 1.5rem 0;
}

.biography-content .role-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
}

.biography-content .role-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: bold;
  font-size: 1.2rem;
  line-height: 1;
}

.biography-content .closing-paragraph {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-style: italic;
  color: var(--navy);
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* Mobile responsive biography */
@media (max-width: 768px) {
  .biography-content .lead-paragraph {
    font-size: 1.05rem;
  }
  
  .biography-content .section-heading {
    font-size: 1.3rem;
    margin-top: 2rem;
  }
  
  .biography-content .closing-paragraph {
    font-size: 1.1rem;
  }
  
  .biography-content img {
    width: 140px;
    float: left;
    margin: 0 1rem 1rem 0;
  }
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header .section-subtitle {
  margin: 0 auto;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 4px;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  letter-spacing: 0.03em;
}

.btn-primary {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}

.btn-primary:hover {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212,163,115,0.4);
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}

.btn-outline:hover {
  background: var(--navy);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-outline-gold {
  background: transparent;
  color: var(--gold);
  border-color: var(--gold);
}

.btn-outline-gold:hover {
  background: var(--gold);
  color: var(--navy);
}

.btn-sm {
  padding: 0.5rem 1.2rem;
  font-size: 0.85rem;
}

/* ── Navigation ── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--navy);
  box-shadow: 0 2px 16px rgba(0,0,0,0.18);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.navbar__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--white);
}

.navbar__brand-icon {
  width: 36px;
  height: 36px;
  background: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.navbar__brand-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .navbar__brand-img {
    width: 36px;
    height: 36px;
  }
}

.navbar__brand-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1.15;
}

.navbar__brand-text span {
  display: block;
  font-family: 'Lato', sans-serif;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--gold);
  text-transform: uppercase;
}

.navbar__nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.navbar__link {
  color: rgba(255,255,255,0.82);
  font-size: 0.88rem;
  font-weight: 400;
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  transition: var(--transition);
  position: relative;
}

.navbar__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0.75rem;
  right: 0.75rem;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.navbar__link:hover,
.navbar__link.active {
  color: var(--white);
}

.navbar__link:hover::after,
.navbar__link.active::after {
  transform: scaleX(1);
}

.navbar__cta {
  background: var(--gold);
  color: var(--navy) !important;
  font-weight: 700;
  padding: 0.45rem 1rem;
}

.navbar__cta:hover {
  background: var(--gold-dark);
  color: var(--navy) !important;
}

.navbar__cta::after { display: none; }

/* Hamburger */
.navbar__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
}

.navbar__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: var(--transition);
}

/* Mobile nav */
.navbar__mobile {
  display: none;
  background: var(--navy);
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.navbar__mobile .navbar__link {
  display: block;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.navbar__mobile .navbar__link::after { display: none; }

/* ── Hero Section ── */
.hero {
  background: linear-gradient(160deg, var(--navy) 0%, #243d60 60%, #1e3555 100%);
  min-height: 92vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23D4A373' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero__content { color: var(--white); }

.hero__eyebrow {
  font-family: 'Lato', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.hero__title {
  color: var(--white);
  margin-bottom: 1.25rem;
  font-style: italic;
}

.hero__subtitle {
  color: rgba(255,255,255,0.75);
  font-size: 1.15rem;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero__dates {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  color: var(--gold);
  margin-bottom: 2rem;
  letter-spacing: 0.05em;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero__portrait {
  display: flex;
  justify-content: center;
  align-items: center;
}

.portrait-frame {
  position: relative;
  width: 380px;
  max-width: 100%;
}

.portrait-frame::before {
  content: '';
  position: absolute;
  top: -12px;
  left: -12px;
  right: 12px;
  bottom: 12px;
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  opacity: 0.5;
}

.portrait-img {
  width: 100%;
  height: 460px;
  background: linear-gradient(135deg, #243d60, #1A2C4A);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.4);
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 0.9rem;
  gap: 1rem;
  overflow: hidden;
  transition: var(--transition);
}

.portrait-img:hover { transform: scale(1.01); }

.portrait-img svg {
  width: 80px;
  height: 80px;
  opacity: 0.3;
}

/* ── Intro Section ── */
.intro { padding: 5rem 0; }

.intro__grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 4rem;
  align-items: center;
}

.intro__quote {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-style: italic;
  color: var(--navy);
  border-left: 4px solid var(--gold);
  padding-left: 1.5rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.intro__quote-author {
  font-family: 'Lato', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--text-light);
  text-transform: uppercase;
}

/* ── Cards ── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.card__img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: linear-gradient(135deg, #e8e8e8, #d0d0d0);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
  font-size: 0.85rem;
  font-style: italic;
  transition: var(--transition);
}

.card:hover .card__img { transform: scale(1.04); }

.card__body { padding: 1.5rem; }

.card__meta {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card__title {
  margin-bottom: 0.75rem;
  font-size: 1.15rem;
}

.card__text {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

/* ── Tribute Cards ── */
.tribute-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  transition: var(--transition);
  border-top: 3px solid transparent;
  position: relative;
}

.tribute-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-top-color: var(--gold);
}

.tribute-card__header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.tribute-card__avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), #243d60);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 700;
  flex-shrink: 0;
}

.tribute-card__name {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  color: var(--navy);
  margin-bottom: 0.15rem;
}

.tribute-card__date {
  font-size: 0.8rem;
  color: var(--text-light);
}

.tribute-card__message {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.7;
  font-style: italic;
  margin: 0;
  transition: max-height 0.35s ease;
}

.tribute-card__message::before { content: '\201C'; }
.tribute-card__message::after  { content: '\201D'; }

/* Message wrapper for expandable content */
.tribute-card__message-wrapper {
  display: flex;
  flex-direction: column;
  max-width: 100%;
}

/* Max-width for tribute message to prevent stretching on desktop */
@media (min-width: 1024px) {
  .tribute-card__message-wrapper {
    max-width: 500px;
  }
}

@media (min-width: 1200px) {
  .tribute-card__message-wrapper {
    max-width: 550px;
  }
}

/* Expandable tribute card styles */
.tribute-card--expandable {
  transition: transform 0.3s ease, box-shadow 0.3s ease, max-height 0.35s ease;
}

.tribute-card--expanded {
  max-height: none;
}

.tribute-card--expanded .tribute-card__message {
  max-height: none;
}

/* Read more / See less buttons */
.tribute-card__read-more,
.tribute-card__see-less {
  display: inline-block;
  background: none;
  border: none;
  padding: 0;
  margin-top: 0.5rem;
  font-family: 'Lato', sans-serif;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--text-light);
  cursor: pointer;
  transition: color 0.2s ease;
  text-align: left;
  align-self: flex-start;
}

.tribute-card__read-more:hover,
.tribute-card__see-less:hover {
  color: var(--gold);
}

.tribute-card__read-more:focus,
.tribute-card__see-less:focus {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ── Timeline ── */
.timeline {
  position: relative;
  padding: 1rem 0;
  max-width: 1000px;
  margin: 0 auto;
}

/* Center line - absolute at 50% */
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gold);
  transform: translateX(-50%);
  z-index: 1;
}

/* Each item is a flex container */
.timeline-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 3rem;
  position: relative;
}

/* All children have order 0 by default */
.timeline-item > * {
  order: 0;
}

/* Dot styling - fixed size, centered */
.timeline-dot {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 22px;
  background: var(--gold);
  border-radius: 50%;
  border: 4px solid var(--white);
  box-shadow: 0 0 0 3px var(--gold);
  margin-top: 0.3rem;
  z-index: 2;
  flex-shrink: 0;
}

/* Content blocks */
.timeline-content {
  width: calc(50% - 40px);
}

/* Odd items: content on the right side */
.timeline-item:nth-child(odd) .timeline-content {
  margin-left: auto;
  padding-left: 2.5rem;
  text-align: left;
}

/* Even items: content on the left side */
.timeline-item:nth-child(even) .timeline-content {
  margin-right: auto;
  padding-right: 2.5rem;
  text-align: right;
}

/* Hide empty divs on desktop */
.timeline-empty {
  display: none;
}

.timeline-year {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.25rem;
}

.timeline-content h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--navy);
}

.timeline-content p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.6;
}

/* ── Alternating Story Sections ── */
.story-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-bottom: 5rem;
}

.story-section--reverse {
  direction: rtl;
}

.story-section--reverse > * {
  direction: ltr;
}

.story-img {
  width: 100%;
  height: 360px;
  background: linear-gradient(135deg, #ddd, #ccc);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
  font-style: italic;
  font-size: 0.9rem;
  overflow: hidden;
  transition: var(--transition);
}

.story-img:hover { transform: scale(1.02); }

/* ── Gallery Grid (Uniform) ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-grid__item {
  min-width: 0;
}

@media (max-width: 1024px) {
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
}

/* ── Gallery (Masonry Collage) ── */
.gallery-masonry {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
  grid-auto-flow: dense;
  grid-auto-rows: 10px;
}

@media (max-width: 1100px) {
  .gallery-masonry { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .gallery-masonry { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .gallery-masonry { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
}

.gallery-tile {
  grid-column: span 1;
  grid-row: span 24;
}

.gallery-tile--small { grid-column: span 1; grid-row: span 22; }
.gallery-tile--medium { grid-column: span 2; grid-row: span 22; }
.gallery-tile--large { grid-column: span 2; grid-row: span 44; }
.gallery-tile--wide { grid-column: span 3; grid-row: span 22; }
.gallery-tile--tall { grid-column: span 1; grid-row: span 44; }

.gallery-tile--featured {
  grid-column: span 3;
  grid-row: span 44;
}

@media (max-width: 820px) {
  .gallery-tile--featured { grid-column: span 3; grid-row: span 40; }
}

@media (max-width: 560px) {
  .gallery-tile--featured { grid-column: span 2; grid-row: span 44; }
}

.gallery-item {
  aspect-ratio: 4 / 5;
  height: auto;
  background: linear-gradient(135deg, #e0e0e0, #d0d0d0);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
  font-size: 0.82rem;
  font-style: italic;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: var(--transition);
}

.gallery-item:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow);
}

 .gallery-item img {
   width: 100%;
   height: 100%;
   object-fit: cover;
   display: block;
   transform: scale(1.001);
   transition: transform 0.35s ease, filter 0.35s ease;
 }

 .gallery-item:hover img {
   transform: scale(1.04);
   filter: brightness(0.92);
 }

 .featured-img {
   position: absolute;
   inset: 0;
 }

 .featured-img--b {
   opacity: 0;
 }

 .gallery-item.is-crossfading .featured-img--a {
   opacity: 0;
   transition: opacity 0.8s ease;
 }

 .gallery-item.is-crossfading .featured-img--b {
   opacity: 1;
   transition: opacity 0.8s ease;
 }

 .gallery-overlay {
   position: absolute;
   inset: 0;
   display: flex;
   flex-direction: column;
   justify-content: flex-end;
   gap: 0.25rem;
   padding: 0.9rem;
   background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,0.78) 100%);
   color: #fff;
   opacity: 0;
   transform: translateY(6px);
   transition: opacity 0.25s ease, transform 0.25s ease;
 }

 .gallery-item:hover .gallery-overlay {
   opacity: 1;
   transform: translateY(0);
 }

 .gallery-item.is-active .gallery-overlay {
   opacity: 1;
   transform: translateY(0);
 }

 .gallery-overlay__title {
   font-weight: 700;
   font-size: 0.95rem;
   line-height: 1.2;
 }

 .gallery-overlay__caption {
   font-size: 0.85rem;
   opacity: 0.95;
   overflow: hidden;
   display: -webkit-box;
   line-clamp: 2;
   -webkit-line-clamp: 2;
   -webkit-box-orient: vertical;
 }

 .gallery-overlay__author {
   font-size: 0.78rem;
   opacity: 0.88;
 }

 @media (hover: none), (pointer: coarse) {
   .gallery-item:hover .gallery-overlay { opacity: 0; transform: translateY(6px); }
 }

/* ── Gallery Slider (Homepage) ── */
.gallery-slider {
  position: relative;
  overflow: hidden;
  padding: 0 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-slider__track {
  display: flex;
  transition: transform 0.5s ease;
  gap: 0.5rem;
}

.gallery-slider__item {
  flex: 0 0 calc(20% - 0.4rem);
  min-width: 0;
}

.gallery-slider__img {
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #e0e0e0, #d0d0d0);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  font-size: 0.9rem;
  font-style: italic;
  overflow: hidden;
  transition: var(--transition);
  position: relative;
}

.gallery-slider__img:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow);
}

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

/* Hover overlay for gallery slider */
.gallery-slider__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.35rem;
  padding: 1rem;
  background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,0.75) 100%);
  color: #fff;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.gallery-slider__img:hover .gallery-slider__overlay {
  opacity: 1;
  transform: translateY(0);
}

.gallery-slider__overlay-title {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.3;
  color: #fff;
}

.gallery-slider__overlay-caption {
  font-size: 0.85rem;
  opacity: 0.92;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.gallery-slider__overlay-author {
  font-size: 0.75rem;
  opacity: 0.8;
  font-style: italic;
  margin-top: 0.25rem;
}

.gallery-slider__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--navy);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 10;
  box-shadow: var(--shadow);
}

.gallery-slider__btn:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--white);
}

.gallery-slider__btn--prev { left: -8px; }
.gallery-slider__btn--next { right: -8px; }

.gallery-slider__dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 1rem;
}

.gallery-slider__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.gallery-slider__dot.active {
  background: var(--gold);
}

/* Tablet: show 4 images */
@media (max-width: 1024px) {
  .gallery-slider__item {
    flex: 0 0 calc(25% - 0.375rem);
  }
}

/* Mobile: show 3 images */
@media (max-width: 768px) {
  .gallery-slider {
    padding: 0 18px;
  }
  .gallery-slider__item {
    flex: 0 0 calc(33.333% - 0.333rem) !important;
    min-width: calc(33.333% - 0.333rem) !important;
  }
  .gallery-slider__img {
    aspect-ratio: 3 / 4;
  }
  .gallery-slider__btn {
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
  }
}

/* Extra small screens - show 2 images */
@media (max-width: 480px) {
  .gallery-slider__item {
    flex: 0 0 calc(50% - 0.25rem) !important;
    min-width: calc(50% - 0.25rem) !important;
    max-width: calc(50% - 0.25rem) !important;
  }
  .gallery-slider {
    padding: 0 15px;
  }
  .gallery-slider__btn {
    width: 26px;
    height: 26px;
    font-size: 0.8rem;
  }
  .gallery-slider__img {
    aspect-ratio: 3 / 4;
  }
}

/* ── Updates Slider (Homepage) ── */
.updates-slider {
  position: relative;
  overflow: hidden;
  padding: 0 50px;
}

.updates-slider__track {
  display: flex;
  transition: transform 0.5s ease;
  gap: 1.5rem;
}

.updates-slider__item {
  flex: 0 0 calc(33.333% - 1rem);
  min-width: 0;
}

.updates-slider__item .update-card {
  height: 100%;
  margin: 0;
}

.updates-slider__item .update-card__media {
  margin: 0.75rem 0;
}

.updates-slider__item .update-media__frame {
  position: relative;
  padding-top: 56.25%;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}

.updates-slider__item .update-media__frame iframe,
.updates-slider__item .update-media__frame video,
.updates-slider__item .update-media__frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.updates-slider__item .update-media__audio {
  margin: 0.5rem 0;
}

.updates-slider__item .update-media__audio audio {
  width: 100%;
}

.updates-slider__item .update-media__caption {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 0.4rem;
  font-style: italic;
}

/* Modal media styles */
.update-modal__media {
  margin-bottom: 1.5rem;
}

.update-modal__media .update-media__frame {
  position: relative;
  padding-top: 56.25%;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  margin-bottom: 0.5rem;
}

.update-modal__media .update-media__frame iframe,
.update-modal__media .update-media__frame video,
.update-modal__media .update-media__frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.update-modal__media .update-media__audio {
  margin: 0.75rem 0;
}

.update-modal__media .update-media__audio audio {
  width: 100%;
}

.updates-slider__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--navy);
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 10;
  box-shadow: var(--shadow);
}

.updates-slider__btn:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--white);
}

.updates-slider__btn--prev { left: 0; }
.updates-slider__btn--next { right: 0; }

.updates-slider__dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.updates-slider__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.updates-slider__dot.active {
  background: var(--gold);
}

/* Tablet: show 2 items */
@media (max-width: 1024px) {
  .updates-slider__item {
    flex: 0 0 calc(50% - 0.75rem);
  }
}

/* Mobile: show 1 item */
@media (max-width: 768px) {
  .updates-slider {
    padding: 0 40px;
  }
  .updates-slider__item {
    flex: 0 0 100%;
  }
  .updates-slider__btn {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
  }
}

/* ── Update / Blog Cards ── */
.update-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.update-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.update-card__date-badge {
  background: var(--navy);
  color: var(--gold);
  font-family: 'Playfair Display', serif;
  text-align: center;
  padding: 0.75rem 1.25rem;
}

.update-card__date-badge .day {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  display: block;
}

.update-card__date-badge .month {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.update-card__body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.update-card__tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  margin-bottom: 0.75rem;
}

.update-card__title {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  flex: 1;
}

.update-card__summary {
  color: var(--text-light);
  font-size: 0.92rem;
  margin-bottom: 1.25rem;
}

 .update-card__media {
   margin-top: 0.9rem;
 }

 .update-media__frame {
   position: relative;
   padding-top: 56.25%;
   border-radius: 10px;
   overflow: hidden;
   box-shadow: var(--shadow);
   background: #000;
 }

 .update-media__frame iframe,
 .update-media__frame video,
 .update-media__frame img {
   position: absolute;
   inset: 0;
   width: 100%;
   height: 100%;
   border: 0;
 }

 .update-media__frame img {
   object-fit: cover;
 }

 .update-media__audio audio {
   width: 100%;
 }

 .update-media__caption {
  margin-top: 0.5rem;
  color: var(--text-light);
  font-size: 0.9rem;
}

/* ── Update Modal ── */
.update-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.update-modal[hidden] {
  display: none;
}

.update-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}

.update-modal__content {
  position: relative;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.update-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--gray-bg);
  color: var(--navy);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 10;
}

.update-modal__close:hover {
  background: var(--gold);
  color: var(--white);
}

.update-modal__header {
  padding: 2rem 2rem 1rem;
  border-bottom: 1px solid var(--border);
}

.update-modal__category {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(212, 163, 115, 0.12);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

.update-modal__title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--navy);
}

.update-modal__date {
  display: block;
  font-size: 0.85rem;
  color: var(--text-light);
  font-style: italic;
}

.update-modal__body {
  padding: 1.5rem 2rem 2rem;
}

.update-modal__text {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
  white-space: pre-wrap;
}

/* Modal responsive */
@media (max-width: 768px) {
  .update-modal {
    padding: 0.5rem;
  }
  
  .update-modal__content {
    max-height: 95vh;
    border-radius: 12px;
  }
  
  .update-modal__header {
    padding: 1.5rem 1.25rem 1rem;
  }
  
  .update-modal__title {
    font-size: 1.25rem;
  }
  
  .update-modal__body {
    padding: 1rem 1.25rem 1.5rem;
  }
}

/* ── Tribute Modal ── */
.tribute-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.tribute-modal[hidden] {
  display: none;
}

.tribute-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}

.tribute-modal__content {
  position: relative;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 600px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.tribute-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--gray-bg);
  color: var(--text-light);
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 10;
}

.tribute-modal__close:hover {
  background: var(--gold);
  color: var(--white);
}

.tribute-modal__header {
  padding: 2rem 2rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.tribute-modal__avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), #243d60);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  flex-shrink: 0;
}

.tribute-modal__meta {
  flex: 1;
}

.tribute-modal__name {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.25rem;
}

.tribute-modal__date {
  font-size: 0.85rem;
  color: var(--text-light);
  font-style: italic;
}

.tribute-modal__body {
  padding: 1.5rem 2rem 2rem;
  overflow-y: auto;
  max-height: 50vh;
}

.tribute-modal__message {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text);
  white-space: pre-wrap;
  margin: 0;
}

/* Tribute modal responsive */
@media (max-width: 768px) {
  .tribute-modal {
    padding: 0.5rem;
  }
  
  .tribute-modal__content {
    max-height: 90vh;
    border-radius: 12px;
  }
  
  .tribute-modal__header {
    padding: 1.5rem 1.25rem 1rem;
  }
  
  .tribute-modal__avatar {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }
  
  .tribute-modal__name {
    font-size: 1.2rem;
  }
  
  .tribute-modal__body {
    padding: 1rem 1.25rem 1.5rem;
    max-height: 55vh;
  }
  
  .tribute-modal__message {
    font-size: 1rem;
  }
}

/* ── Update Article Page (Individual News Pages) ── */
.update-article {
  padding-top: 2rem;
}

.update-article__media-float {
  float: left;
  width: 42%; /* Roughly half the width */
  max-width: 380px;
  margin: 0 1.5rem 1rem 0;
  margin-top: 0.3rem;
}

.update-article__media-float .update-media__frame {
  aspect-ratio: 4 / 3; /* Reduced height */
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
}

.update-article__media-float .update-media__frame iframe,
.update-article__media-float .update-media__frame video,
.update-article__media-float img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.update-article__media-float figcaption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-light);
  font-style: italic;
  text-align: center;
}

/* Text flows naturally around the floated image */
.update-article__text {
  text-align: left;
  line-height: 1.8;
}

/* Quill Editor Content Styles */
.update-article__text h1,
.update-article__text h2,
.update-article__text h3 {
  color: var(--navy);
  margin: 1.5rem 0 0.75rem 0;
  font-family: 'Playfair Display', serif;
}

.update-article__text h1 { font-size: 1.8rem; }
.update-article__text h2 { font-size: 1.5rem; }
.update-article__text h3 { font-size: 1.25rem; }

.update-article__text p {
  margin-bottom: 1rem;
}

.update-article__text strong,
.update-article__text b {
  font-weight: 700;
  color: var(--navy);
}

.update-article__text em,
.update-article__text i {
  font-style: italic;
}

.update-article__text u {
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 2px;
}

.update-article__text s,
.update-article__text strike {
  text-decoration: line-through;
}

.update-article__text a {
  color: var(--gold);
  text-decoration: underline;
}

.update-article__text a:hover {
  color: var(--navy);
}

.update-article__text ul,
.update-article__text ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.update-article__text li {
  margin-bottom: 0.5rem;
}

.update-article__text blockquote {
  border-left: 4px solid var(--gold);
  padding-left: 1rem;
  margin: 1rem 0;
  font-style: italic;
  color: var(--text-light);
}

/* Font sizes from Quill */
.update-article__text .ql-size-small {
  font-size: 0.85rem;
}

.update-article__text .ql-size-large {
  font-size: 1.25rem;
}

.update-article__text .ql-size-huge {
  font-size: 1.5rem;
}

/* Clear after the text content to ensure proper document flow */
.update-article__text::after {
  content: "";
  display: table;
  clear: both;
}

/* Responsive - stack on mobile */
@media (max-width: 768px) {
  .update-article__media-float {
    float: none;
    width: 100%;
    max-width: 100%;
    margin: 0 0 1.5rem 0;
  }
  
  .update-article__media-float .update-media__frame {
    aspect-ratio: 16 / 9;
  }
}

/* ── Biography Page Floating Images ── */
.bio-image-wrap {
  width: 280px;
  max-width: 45%;
  margin-bottom: 1rem;
}

.bio-image-wrap--left {
  float: left;
  margin-right: 1.5rem;
}

.bio-image-wrap--right {
  float: right;
  margin-left: 1.5rem;
}

.bio-image-wrap img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: block;
}

.bio-image-caption {
  display: block;
  font-size: 0.8rem;
  color: var(--text-light);
  font-style: italic;
  text-align: center;
  margin-top: 0.5rem;
}

/* Clearfix for biography content */
.biography-content::after {
  content: "";
  display: table;
  clear: both;
}

/* Mobile responsive - smaller images with text wrap */
@media (max-width: 768px) {
  .bio-image-wrap {
    width: 140px;
    max-width: 50%;
    float: left;
    margin: 0 1rem 0.5rem 0;
  }
  
  .bio-image-wrap--right {
    float: right;
    margin: 0 0 0.5rem 1rem;
  }
  
  .bio-image-wrap img {
    border-radius: 6px;
  }
  
  .bio-image-caption {
    font-size: 0.7rem;
    margin-top: 0.3rem;
  }
}

/* ── Stats Bar ── */
.stats-bar {
  background: var(--navy);
  padding: 2.5rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat-item { color: var(--white); }

.stat-number {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gold);
  display: block;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.05em;
}

/* ── Form Styles ── */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: var(--navy);
}

.form-label .required { color: #c0392b; }

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-family: 'Lato', sans-serif;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--white);
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,163,115,0.15);
}

.form-control.error {
  border-color: #c0392b;
}

.form-error {
  color: #c0392b;
  font-size: 0.82rem;
  margin-top: 0.35rem;
  display: none;
}

.form-error.visible { display: block; }

textarea.form-control {
  resize: vertical;
  min-height: 150px;
}

.form-success {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
  padding: 1.25rem 1.5rem;
  border-radius: 6px;
  font-size: 0.95rem;
  display: none;
  margin-top: 1rem;
}

.form-success.visible { display: block; }

/* ── Prayer / Reflection ── */
.scripture-block {
  background: linear-gradient(135deg, var(--navy), #243d60);
  color: var(--white);
  padding: 3rem;
  border-radius: var(--radius);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.scripture-text {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-style: italic;
  color: var(--white);
  line-height: 1.7;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.scripture-ref {
  color: var(--gold);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
}

.reflection-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--gold);
}

.reflection-card h3 {
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
}

/* ── Image Containers for Site-wide Use ── */

/* Standard image container with gold frame */
.img-container {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  background: linear-gradient(135deg, #e0e0e0, #d0d0d0);
}

.img-container::before {
  content: '';
  position: absolute;
  top: -8px;
  left: -8px;
  right: 8px;
  bottom: 8px;
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  opacity: 0.5;
  pointer-events: none;
  z-index: 1;
}

.img-container:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

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

.img-container:hover img {
  transform: scale(1.03);
}

/* Small square image (for quotes, side content) */
.img-container--small {
  width: 200px;
  height: 200px;
}

/* Medium rectangle image */
.img-container--medium {
  width: 100%;
  height: 280px;
}

/* Large featured image */
.img-container--large {
  width: 100%;
  height: 400px;
}

/* Portrait aspect ratio (3:4) */
.img-container--portrait {
  aspect-ratio: 3 / 4;
  max-width: 320px;
}

/* Landscape aspect ratio (16:9) */
.img-container--landscape {
  aspect-ratio: 16 / 9;
  width: 100%;
}

/* Square aspect ratio */
.img-container--square {
  aspect-ratio: 1 / 1;
  width: 100%;
}

/* Circle image (for portraits, memorial photos) */
.img-container--circle {
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  width: 200px;
  max-width: 100%;
}

.img-container--circle::before {
  border-radius: 50%;
}

/* Image grid layouts */
.image-grid {
  display: grid;
  gap: 1.5rem;
}

.image-grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.image-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.image-grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Masonry-style image gallery within sections */
.section-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.section-gallery .img-container {
  height: 200px;
}

/* Image with caption overlay */
.img-container--caption {
  position: relative;
}

.img-container--caption::after {
  content: attr(data-caption);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: linear-gradient(180deg, transparent, rgba(26,44,74,0.8));
  color: var(--white);
  font-size: 0.9rem;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.img-container--caption:hover::after {
  opacity: 1;
}

/* Side-by-side image layout for stories */
.img-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}

/* Floating image for inline content */
.img-float-left {
  float: left;
  margin: 0 1.5rem 1rem 0;
  max-width: 300px;
}

.img-float-right {
  float: right;
  margin: 0 0 1rem 1.5rem;
  max-width: 300px;
}

/* Section with background image */
.section-bg-img {
  position: relative;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.section-bg-img::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(26,44,74,0.85);
}

.section-bg-img .container {
  position: relative;
  z-index: 1;
}

/* Responsive image containers */
@media (max-width: 768px) {
  .img-container--small {
    width: 150px;
    height: 150px;
  }
  
  .img-container--medium {
    height: 220px;
  }
  
  .img-container--large {
    height: 300px;
  }
  
  .image-grid--2,
  .image-grid--3,
  .image-grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .section-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .img-float-left,
  .img-float-right {
    float: none;
    margin: 1rem 0;
    max-width: 100%;
  }
  
  .img-pair {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .image-grid--2,
  .image-grid--3,
  .image-grid--4 {
    grid-template-columns: 1fr;
  }
  
  .section-gallery {
    grid-template-columns: 1fr;
  }
  
  .img-container--portrait {
    max-width: 100%;
  }
}

/* ── Footer ── */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  padding: 3.5rem 0 1.5rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer__brand-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: var(--white);
  margin-bottom: 0.75rem;
}

.footer__tagline {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.footer__heading {
  font-family: 'Lato', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.footer__links li {
  margin-bottom: 0.5rem;
}

.footer__links a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  transition: color 0.2s;
}

.footer__links a:hover { color: var(--gold); }

.footer__social {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.social-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  transition: var(--transition);
}

.social-icon:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy);
  transform: translateY(-3px);
}

.footer__divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 1.5rem;
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ── Scroll Animations ── */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in {
  opacity: 0;
  transition: opacity 0.7s ease;
}

.fade-in.visible { opacity: 1; }

.stagger-child {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-child.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Page Hero (inner pages) ── */
.page-hero {
  background: linear-gradient(160deg, var(--navy) 0%, #243d60 100%);
  padding: 5rem 0 4rem;
  text-align: left;
  position: relative;
  overflow: hidden;
  min-height: 300px;
  display: flex;
  align-items: center;
}

/* Hero with background image and gradient overlay */
.page-hero--image {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Gradient overlay - dark on left fading to transparent on right */
.page-hero--image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, 
    rgba(0, 0, 0, 0.85) 0%, 
    rgba(0, 0, 0, 0.7) 40%, 
    rgba(0, 0, 0, 0.3) 70%, 
    transparent 100%);
  z-index: 1;
}

/* Mobile: darker overlay for better text readability */
@media (max-width: 768px) {
  .page-hero--image::before {
    background: linear-gradient(to right, 
      rgba(0, 0, 0, 0.9) 0%, 
      rgba(0, 0, 0, 0.8) 50%, 
      rgba(0, 0, 0, 0.6) 100%);
  }
  
  .page-hero {
    padding: 4rem 0 3rem;
    min-height: 250px;
  }
}

/* Very small screens: full dark overlay on left */
@media (max-width: 480px) {
  .page-hero--image::before {
    background: linear-gradient(to right, 
      rgba(0, 0, 0, 0.92) 0%, 
      rgba(0, 0, 0, 0.85) 60%, 
      rgba(0, 0, 0, 0.7) 100%);
  }
}

/* Pattern overlay (default when no image) */
.page-hero:not(.page-hero--image)::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23D4A373' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.page-hero__content { 
  position: relative; 
  z-index: 2; 
  max-width: 600px;
}

.page-hero h1 {
  color: var(--white);
  margin-bottom: 0.75rem;
  font-style: italic;
}

.page-hero p {
  color: rgba(255,255,255,0.85);
  font-size: 1.1rem;
  max-width: 500px;
  margin: 0;
}

.breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 1rem;
}

.breadcrumb a { color: var(--gold); }
.breadcrumb a:hover { text-decoration: underline; }

/* ── Divider Ornament ── */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: var(--gold);
  font-size: 1.2rem;
}

.ornament::before,
.ornament::after {
  content: '';
  flex: 1;
  max-width: 120px;
  height: 1px;
  background: var(--gold);
  opacity: 0.4;
}

/* ── Testimonials ── */
.testimonial {
  background: var(--gray-bg);
  border-radius: var(--radius);
  padding: 2rem;
  position: relative;
}

.testimonial::before {
  content: '\201C';
  font-family: 'Playfair Display', serif;
  font-size: 5rem;
  color: var(--gold);
  opacity: 0.3;
  position: absolute;
  top: 0.5rem;
  left: 1rem;
  line-height: 1;
}

.testimonial__text {
  font-style: italic;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
  padding-top: 1.5rem;
}

.testimonial__author {
  font-weight: 700;
  color: var(--navy);
  font-size: 0.9rem;
}

.testimonial__role {
  font-size: 0.82rem;
  color: var(--text-light);
}

/* ── Media Coverage Cards ── */
.media-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.media-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.media-card__img {
  height: 180px;
  background: linear-gradient(135deg, #e0e0e0, #d0d0d0);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
  font-style: italic;
  font-size: 0.85rem;
  overflow: hidden;
}

.media-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.media-card:hover .media-card__img img { transform: scale(1.06); }

.media-card__body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.media-card__source {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 0.4rem;
}

.media-card__title {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  flex: 1;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .hero__inner { gap: 2.5rem; }
  .portrait-frame { width: 300px; }
  .portrait-img { height: 380px; }
  .timeline { max-width: 100%; }
}

@media (max-width: 768px) {
  .navbar__nav { display: none; }
  .navbar__hamburger { display: flex; }
  .hero__inner { grid-template-columns: 1fr; text-align: center; }
  .hero__portrait { display: none; }
  .hero__eyebrow { justify-content: center; }
  .hero__actions { justify-content: center; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .story-section, .story-section--reverse { grid-template-columns: 1fr; direction: ltr; }
  .intro__grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; text-align: center; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 3.5rem 0; }
  /* Mobile Timeline Styles */
  .timeline::before { left: 25px; }
  .timeline-item { flex-direction: column; padding-left: 60px; }
  .timeline-dot {
    position: absolute;
    left: 25px;
    transform: translateX(-50%);
  }
  .timeline-content {
    width: 100%;
    padding: 0;
  }
  .timeline-item:nth-child(odd) .timeline-content,
  .timeline-item:nth-child(even) .timeline-content {
    margin-left: 0;
    margin-right: 0;
    text-align: left;
    padding-left: 0;
    padding-right: 0;
  }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .tribute-card__avatar { width: 42px; height: 42px; font-size: 1rem; }
}

/* ── Pinterest-Style Masonry Gallery ── */
/* CSS Columns Layout - Option A (preferred) */

.gallery-section {
  padding: 4rem 0;
  background: var(--white);
}

.masonry-gallery {
  column-count: 5;
  column-gap: 12px;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}

.masonry-item {
  break-inside: avoid;
  page-break-inside: avoid;
  -webkit-column-break-inside: avoid;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #e0e0e0, #d0d0d0);
}

.masonry-item:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.masonry-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 8px;
  transition: transform 0.4s ease, filter 0.4s ease;
}

.masonry-item:hover img {
  transform: scale(1.05);
  filter: brightness(0.95);
}

/* Stagger animation delays for masonry items */
.masonry-item:nth-child(1) { animation-delay: 0.05s; }
.masonry-item:nth-child(2) { animation-delay: 0.1s; }
.masonry-item:nth-child(3) { animation-delay: 0.15s; }
.masonry-item:nth-child(4) { animation-delay: 0.2s; }
.masonry-item:nth-child(5) { animation-delay: 0.25s; }
.masonry-item:nth-child(6) { animation-delay: 0.3s; }
.masonry-item:nth-child(7) { animation-delay: 0.35s; }
.masonry-item:nth-child(8) { animation-delay: 0.4s; }
.masonry-item:nth-child(9) { animation-delay: 0.45s; }
.masonry-item:nth-child(10) { animation-delay: 0.5s; }
.masonry-item:nth-child(11) { animation-delay: 0.55s; }
.masonry-item:nth-child(12) { animation-delay: 0.6s; }

/* Image overlay on hover */
.masonry-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,0.6) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 8px;
  pointer-events: none;
}

.masonry-item:hover::after {
  opacity: 1;
}

/* Animation keyframes */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive breakpoints for columns */
/* Desktop: 4-5 columns */
@media (max-width: 1200px) {
  .masonry-gallery {
    column-count: 4;
  }
}

/* Tablet: 3 columns */
@media (max-width: 900px) {
  .masonry-gallery {
    column-count: 3;
    column-gap: 10px;
    padding: 0 0.75rem;
  }
  .masonry-item {
    margin-bottom: 10px;
  }
}

/* Mobile: 2 columns */
@media (max-width: 600px) {
  .masonry-gallery {
    column-count: 2;
    column-gap: 8px;
    padding: 0 0.5rem;
  }
  .masonry-item {
    margin-bottom: 8px;
    border-radius: 6px;
  }
  .masonry-item img {
    border-radius: 6px;
  }
}

/* Very small screens: 1 column */
@media (max-width: 400px) {
  .masonry-gallery {
    column-count: 1;
    column-gap: 0;
    padding: 0 0.5rem;
  }
  .masonry-item {
    margin-bottom: 12px;
  }
}

/* Disable hover effects on touch devices */
@media (hover: none), (pointer: coarse) {
  .masonry-item:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
  .masonry-item:hover img {
    transform: none;
    filter: none;
  }
  .masonry-item:hover::after {
    opacity: 0;
  }
}

/* ── Gallery Lightbox ── */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-lightbox[hidden] {
  display: none;
}

.gallery-lightbox__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(4px);
}

.gallery-lightbox__content {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-lightbox__content img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.gallery-lightbox__close {
  position: absolute;
  top: -50px;
  right: 0;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
  z-index: 10;
}

.gallery-lightbox__close:hover {
  color: var(--gold);
}

.gallery-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
  z-index: 10;
}

.gallery-lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: var(--gold);
}

.gallery-lightbox__nav--prev {
  left: -70px;
}

.gallery-lightbox__nav--next {
  right: -70px;
}

.gallery-lightbox__caption {
  position: absolute;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 1rem;
  text-align: center;
  max-width: 80vw;
  padding: 0.5rem 1rem;
}

/* Lightbox responsive */
@media (max-width: 768px) {
  .gallery-lightbox__nav--prev {
    left: 10px;
  }
  .gallery-lightbox__nav--next {
    right: 10px;
  }
  .gallery-lightbox__close {
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.8rem;
  }
  .gallery-lightbox__caption {
    bottom: -50px;
    font-size: 0.9rem;
    padding: 0.5rem;
  }
}

@media (max-width: 480px) {
  .gallery-lightbox__nav {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  .gallery-lightbox__nav--prev {
    left: 5px;
  }
  .gallery-lightbox__nav--next {
    right: 5px;
  }
}


