:root {
  /* Colors - Memorial Theme */
  --color-bg-dark: #0f1115;
  --color-bg-alt: #1a1c23;
  --color-text-main: #e0e0e0;
  --color-text-muted: #a0a0a0;
  --color-gold: #d4af37;
  --color-gold-light: #f5d76e;
  --color-gold-dark: #aa8620;
  --color-white: #ffffff;
  --color-black: #000000;
  
  /* Fonts */
  --font-serif: 'Playfair Display', serif;
  --font-sans: 'Lato', sans-serif;
  --font-script: 'EB Garamond', serif;

  /* Transitions */
  --transition-fast: 0.3s ease;
  --transition-slow: 0.8s ease-in-out;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg-dark);
  color: var(--color-text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

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

ul {
  list-style: none;
}

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

/* ══════════════════════════════════════════════════════════ */
/*  TYPOGRAPHY & UTILITIES                                   */
/* ══════════════════════════════════════════════════════════ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--color-gold);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 6rem 0;
}

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

.section-tag {
  display: block;
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.85rem;
  color: var(--color-gold-dark);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--color-white);
}

.section-sub {
  color: var(--color-text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

.gold-line {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
  margin: 0.5rem auto 1.5rem;
}

.btn-gold {
  display: inline-block;
  background: transparent;
  color: var(--color-gold);
  border: 1px solid var(--color-gold);
  padding: 0.8rem 2rem;
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-fast);
  border-radius: 4px;
}

.btn-gold:hover {
  background: var(--color-gold);
  color: var(--color-bg-dark);
}

/* ══════════════════════════════════════════════════════════ */
/*  NAVIGATION                                               */
/* ══════════════════════════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 0;
  z-index: 1000;
  transition: var(--transition-fast);
  background: transparent;
}

.navbar.scrolled {
  background: rgba(15, 17, 21, 0.95);
  padding: 1rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--color-gold);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cross-icon {
  font-size: 1.2rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: var(--transition-fast);
}

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

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--color-gold);
  transition: var(--transition-fast);
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .nav-toggle {
    display: flex;
  }
}

/* ══════════════════════════════════════════════════════════ */
/*  HERO SECTION                                             */
/* ══════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 6rem 2rem;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../images/hero/chapel-bg.png');
  background-size: cover;
  background-position: center;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(15, 17, 21, 0.4) 0%,
    rgba(15, 17, 21, 0.8) 70%,
    var(--color-bg-dark) 100%
  );
  z-index: 2;
}

.particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 800px;
}

.hero-pre {
  font-family: var(--font-script);
  font-size: 1.8rem;
  font-style: italic;
  color: var(--color-gold-light);
  margin-bottom: 2rem;
  opacity: 0.9;
}

/* Portrait Frame */
.portrait-frame {
  position: relative;
  width: 180px;
  height: 240px;
  margin: 0 auto 2rem;
}

.portrait-inner {
  width: 100%;
  height: 100%;
  border-radius: 100px 100px 10px 10px;
  overflow: hidden;
  border: 3px solid var(--color-gold);
  background: #2a2a2a;
  position: relative;
  z-index: 2;
}

.portrait-placeholder {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  text-align: center;
  padding: 1rem;
}

.portrait-placeholder .cross-large {
  font-size: 2rem;
  color: var(--color-gold-dark);
  margin-bottom: 0.5rem;
}

.portrait-placeholder small {
  font-size: 0.7rem;
  opacity: 0.6;
}

.portrait-ring {
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 110px 110px 15px 15px;
  z-index: 1;
}

.portrait-laurel {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  color: var(--color-gold-dark);
  opacity: 0.6;
  z-index: 3;
}

.left-laurel {
  left: -40px;
}

.right-laurel {
  right: -40px;
  transform: translateY(-50%) scaleX(-1);
}

.hero-name {
  font-size: 3.5rem;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--color-white);
  text-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.title-prefix {
  display: block;
  font-size: 1.5rem;
  color: var(--color-gold);
  margin-bottom: 0.5rem;
}

.hero-dates {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-family: var(--font-sans);
  font-size: 1.1rem;
  color: var(--color-text-main);
  margin-bottom: 0.5rem;
}

.date-separator {
  color: var(--color-gold);
  font-size: 0.8rem;
}

.hero-age {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-quote {
  font-family: var(--font-script);
  font-size: 1.4rem;
  font-style: italic;
  color: var(--color-white);
  border-left: none;
  padding: 0;
  margin: 0 auto 3rem;
  max-width: 600px;
  opacity: 0.8;
}

.hero-quote cite {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-style: normal;
  color: var(--color-gold);
  margin-top: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Scroll Button */
.scroll-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: var(--transition-fast);
}

.scroll-btn:hover {
  color: var(--color-gold);
}

.scroll-arrow {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--color-gold), transparent);
  position: relative;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

/* Candle Animation in Hero */
.hero-candle-wrap {
  position: absolute;
  bottom: 10%;
  z-index: 5;
  opacity: 0.6;
}

.hero-candle-wrap:not(.right) {
  left: 15%;
}

.hero-candle-wrap.right {
  right: 15%;
}

@media (max-width: 992px) {
  .hero-candle-wrap {
    display: none;
  }
  .hero-name {
    font-size: 2.5rem;
  }
}

/* ══════════════════════════════════════════════════════════ */
/*  CANDLE CSS (Reusable)                                    */
/* ══════════════════════════════════════════════════════════ */
.candle {
  width: 40px;
  margin: 0 auto;
  position: relative;
}

.candle-body {
  width: 40px;
  height: 120px;
  background: linear-gradient(to bottom, #fdfbfb 0%, #e2d1c3 100%);
  border-radius: 3px 3px 2px 2px;
  position: relative;
  box-shadow: inset 0 -5px 10px rgba(0,0,0,0.1), 
              inset 0 0 5px rgba(0,0,0,0.1),
              0 2px 5px rgba(0,0,0,0.5);
}

.wick {
  width: 4px;
  height: 15px;
  background: #333;
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50% 50% 0 0;
}

.flame-wrap {
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 40px;
  z-index: 10;
}

.flame {
  width: 20px;
  height: 40px;
  background: radial-gradient(ellipse at bottom, #fff 0%, #fde08b 20%, #ff9a44 60%, transparent 100%);
  border-radius: 50% 50% 20% 20%;
  box-shadow: 0 0 15px #ff9a44, 0 -10px 20px #fde08b, 0 0 40px #ff5e62;
  animation: flicker 3s infinite ease-in-out alternate;
  transform-origin: bottom center;
}

.glow {
  position: absolute;
  top: -20px;
  left: -30px;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, rgba(255, 154, 68, 0.4) 0%, transparent 70%);
  border-radius: 50%;
  animation: glow-pulse 4s infinite alternate;
  pointer-events: none;
}

.drip {
  position: absolute;
  background: #fdfbfb;
  border-radius: 10px;
}

.drip1 {
  width: 6px;
  height: 25px;
  top: 5px;
  left: 5px;
}

.drip2 {
  width: 5px;
  height: 40px;
  top: 10px;
  right: 5px;
}

@keyframes flicker {
  0% { transform: scale(1) rotate(-1deg); }
  20% { transform: scale(0.95) rotate(1deg); box-shadow: 0 0 10px #ff9a44, 0 -10px 15px #fde08b; }
  40% { transform: scale(1.05) rotate(-1deg); }
  60% { transform: scale(0.9) rotate(2deg); box-shadow: 0 0 20px #ff9a44, 0 -10px 25px #fde08b; }
  80% { transform: scale(1.02) rotate(-2deg); }
  100% { transform: scale(1) rotate(0deg); }
}

@keyframes glow-pulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.2); opacity: 1; }
}

/* ══════════════════════════════════════════════════════════ */
/*  BIOGRAPHY SECTION                                        */
/* ══════════════════════════════════════════════════════════ */
.biography-section {
  background-color: var(--color-bg-dark);
}

.bio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.bio-lead {
  font-family: var(--font-script);
  font-size: 1.5rem;
  color: var(--color-gold-light);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.bio-text p {
  margin-bottom: 1.2rem;
  color: var(--color-text-main);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 30px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 40px;
  bottom: 0;
  width: 2px;
  background: rgba(212, 175, 55, 0.2);
}

.timeline-title {
  font-size: 1.8rem;
  margin-bottom: 2rem;
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
}

.timeline-dot {
  position: absolute;
  left: -30px;
  top: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-bg-dark);
  border: 2px solid var(--color-gold);
  z-index: 2;
}

.timeline-dot.gold {
  background: var(--color-gold);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.timeline-year {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--color-gold);
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
}

.timeline-content p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

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

/* ══════════════════════════════════════════════════════════ */
/*  GALLERY SECTION                                          */
/* ══════════════════════════════════════════════════════════ */
.gallery-section {
  background-color: var(--color-bg-alt);
}

.slideshow-block {
  margin-bottom: 6rem;
}

.slideshow-header {
  text-align: center;
  margin-bottom: 2rem;
}

.slideshow-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
}

.slideshow-title {
  font-size: 2rem;
  color: var(--color-white);
  margin-bottom: 0.5rem;
}

.folder-tag {
  display: inline-block;
  background: rgba(0,0,0,0.3);
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
}

.folder-tag code {
  color: var(--color-gold-light);
}

/* Swiper Styles */
.swiper {
  width: 100%;
  padding-bottom: 3rem;
}

.swiper-slide {
  background-position: center;
  background-size: cover;
  width: 300px;
  height: 400px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.1);
}

.placeholder-slide {
  width: 100%;
  height: 100%;
  background: #2a2a2a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  color: var(--color-text-muted);
}

.placeholder-slide span {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.swiper-pagination-bullet {
  background: var(--color-text-muted);
}

.swiper-pagination-bullet-active {
  background: var(--color-gold);
}

.swiper-button-next,
.swiper-button-prev {
  color: var(--color-gold);
}

/* ══════════════════════════════════════════════════════════ */
/*  SCRIPTURE BANNER                                         */
/* ══════════════════════════════════════════════════════════ */
.scripture-banner {
  background: linear-gradient(rgba(15, 17, 21, 0.9), rgba(15, 17, 21, 0.9)), url('../images/hero/chapel-bg.png') fixed center/cover;
  padding: 5rem 2rem;
  text-align: center;
  border-top: 1px solid rgba(212, 175, 55, 0.2);
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.scripture-inner {
  max-width: 800px;
  margin: 0 auto;
}

.scripture-cross {
  font-size: 2rem;
  color: var(--color-gold);
  margin-bottom: 1.5rem;
}

.scripture-banner blockquote p {
  font-family: var(--font-script);
  font-size: 2rem;
  font-style: italic;
  color: var(--color-white);
  margin-bottom: 1rem;
}

.scripture-banner cite {
  font-family: var(--font-sans);
  color: var(--color-gold);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.9rem;
}

/* ══════════════════════════════════════════════════════════ */
/*  CANDLE SECTION                                           */
/* ══════════════════════════════════════════════════════════ */
.candle-section {
  background-color: var(--color-bg-dark);
  text-align: center;
}

.candle-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 3rem;
  min-height: 200px;
}

.candle-item {
  transform: scale(0.8);
  transition: var(--transition-fast);
  cursor: pointer;
}

.candle-item:hover {
  transform: scale(0.85);
}

.candle-item .flame-wrap {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.candle-item.lit .flame-wrap {
  opacity: 1;
}

.candle-count-wrap {
  margin-top: 2rem;
}

.candle-count {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: var(--color-text-main);
}

#litCount {
  color: var(--color-gold);
  font-weight: bold;
  font-size: 1.5rem;
}

/* ══════════════════════════════════════════════════════════ */
/*  TRIBUTES SECTION                                         */
/* ══════════════════════════════════════════════════════════ */
.tributes-section {
  background-color: var(--color-bg-alt);
}

.tributes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.tribute-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(212, 175, 55, 0.1);
  padding: 2.5rem 2rem;
  border-radius: 8px;
  position: relative;
  transition: var(--transition-fast);
}

.tribute-card:hover {
  border-color: rgba(212, 175, 55, 0.3);
  transform: translateY(-5px);
}

.tribute-quote-mark {
  font-family: var(--font-serif);
  font-size: 4rem;
  color: rgba(212, 175, 55, 0.2);
  line-height: 1;
  position: absolute;
  top: 10px;
  left: 20px;
}

.tribute-text {
  position: relative;
  z-index: 2;
  font-style: italic;
  margin-bottom: 1.5rem;
  color: var(--color-text-main);
}

.tribute-author {
  color: var(--color-gold);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Tribute Form */
.tribute-form-wrap {
  max-width: 600px;
  margin: 0 auto;
  background: var(--color-bg-dark);
  padding: 3rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.05);
}

.form-title {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 1.8rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

input, textarea {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 1rem;
  color: var(--color-white);
  border-radius: 4px;
  font-family: var(--font-sans);
  transition: var(--transition-fast);
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--color-gold);
  background: rgba(255,255,255,0.08);
}

.tribute-form button {
  width: 100%;
  margin-top: 1rem;
}

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

/* ══════════════════════════════════════════════════════════ */
/*  FOOTER                                                   */
/* ══════════════════════════════════════════════════════════ */
.site-footer {
  background-color: #08090b;
  padding: 4rem 2rem 2rem;
  text-align: center;
  border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.footer-cross {
  font-size: 1.5rem;
  color: var(--color-gold-dark);
  margin-bottom: 1rem;
}

.footer-name {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.footer-dates {
  color: var(--color-text-muted);
  font-family: var(--font-sans);
  margin-bottom: 1.5rem;
}

.footer-rest {
  font-family: var(--font-script);
  font-style: italic;
  color: var(--color-gold-light);
  font-size: 1.2rem;
  opacity: 0.8;
  margin-bottom: 2rem;
}

.footer-divider {
  width: 100px;
  height: 1px;
  background: rgba(255,255,255,0.1);
  margin: 0 auto 2rem;
}

.footer-copy {
  color: var(--color-text-muted);
  font-size: 0.85rem;
}
