:root {
  /* Main theme colors */
  --green: #4CAF50;
  --green-light: #cce7b4;
  --white: #ffffff;
  --pink: #f8c9c2;
  --muted: #020202;

  /* Background & surface */
  --bg: var(--green-light);
  --card: var(--white);
  --accent: var(--green);
  --glass: rgba(255, 255, 255, 0.1);

  font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #ffd6e8, #f9b8cc, #f8c3d4, #ffe1ec);
  background-size: 400% 400%;
  animation: pinkFlow 25s ease-in-out infinite;
  overflow-x: hidden;
}

/* Animation that cycles through the pink tones */
@keyframes pinkFlow {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

#farewellCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* =============== 🎥 MEMORIAL HEADER WITH VIDEO =============== */
.memorial-header {
  position: relative;
  text-align: center;
  padding: clamp(24px, 4vw, 48px) 20px;
  color: var(--green);
  overflow: hidden;
  min-height: 100vh;
  width: 100%;
  min-width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
}



/* Background video styling */
.memorial-header .background-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.7;
  /* Adjust to control brightness of video */
}

/* Dark overlay for contrast */
.memorial-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom,
      rgba(0, 0, 0, 0.3),
      rgba(0, 0, 0, 0.5));
  z-index: 1;
}

/* Foreground content */
.memorial-header .header-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 100%;
  padding: 0 12px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Title styling */
.memory-title {
  font-family: 'Playfair Display', cursive;
  font-size: 2rem;
  margin-bottom: 30px;
  color: var(--green);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Circular Portrait Frame */
.memorial-frame {
  position: relative;
  width: min(70vw, 400px);
  height: min(70vw, 400px);
  margin: 10px auto 40px auto;
  border-radius: 100%;
  overflow: hidden;
  border: 6px double var(--green);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  z-index: 2;
}

.flowers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.flower {
  position: absolute;
  width: min(22vw, 120px);
  height: auto;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.25));
}

.flower.top-left {
  top: -8%;
  left: -8%;
}

.flower.bottom-right {
  bottom: -10%;
  right: -8%;
}

.flower.bottom-left {
  bottom: -10%;
  left: -8%;
}

.memorial-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  border-radius: 50%;
}

/* Decorative ring (flower effect substitute) */
.flower-ring::before,
.flower-ring::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border: 2px dashed var(--green-light);
  animation: spin 20s linear infinite;
}

.flower-ring::after {
  border: 2px dotted var(--pink);
  animation-direction: reverse;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Text below portrait */
.memorial-info h1 {
  font-family: 'DM Sans', 'Inter', sans-serif;
  font-size: 1.8rem;
  margin: 10px 0 6px;
  color: var(--green);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.memorial-info .dates {
  font-weight: 600;
  color: #f1f1f1;
  margin-bottom: 8px;
}

.memorial-info .lead {
  font-style: italic;
  font-size: 1rem;
  color: #e8e8e8;
}

.memorial-info {
  width: 100%;
  max-width: 720px;
  text-align: center;
}

/* Responsive tweaks */
@media (max-width: 600px) {
  .memory-title {
    font-size: 1.6rem;
  }

  .memorial-info h1 {
    font-size: 1.4rem;
  }

  .memorial-info {
    max-width: 92vw;
  }

  .memorial-info .dates {
    line-height: 1.4;
  }

  .flower {
    width: min(28vw, 90px);
  }
}

/* ====== Rest of your previous CSS remains unchanged ====== */


.logo {
  width: 74px;
  height: 74px;
  border-radius: 12px;
  overflow: hidden;
  flex: 0 0 74px;
  border: 2px solid var(--white);
}

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

h1 {
  font-size: 22px;
  margin: 0;
  color: var(--white);
}

p.lead {
  margin: 6px 0 0;
  color: var(--white);
  font-size: 14px;
}

main {
  max-width: 1100px;
  margin: 20px auto;
  padding: 18px;
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr 340px;
}

/* Cards */
.card {
  background: var(--card);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  /* border-left: 5px solid var(--accent); */
  color: #04202a;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.hero {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
  text-align: center;
}

.hero .portrait {
  width: 160px;
  height: 160px;
  border-radius: 12px;
  overflow: hidden;
  flex: 0 0 160px;
  border: 3px solid var(--pink);
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.meta {
  flex: 1;
}

.dates {
  color: var(--muted);
  margin-top: 6px;
}

.actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn {
  background: var(--accent);
  color: var(--white);
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  box-shadow: 0 6px 15px rgba(76, 175, 80, 0.25);
  transition: background 0.2s ease;
}

.btn:hover {
  background: #43a047;
}

.language-toggle {
  padding-bottom: 30px;
}

.ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 10px 14px;
  border-radius: 8px;
  transition: 0.3s;
}

.ghost:hover {
  background: var(--accent);
  color: var(--white);
}

/* Timeline */
.timeline {
  margin-top: 12px;
  padding-left: 10px;
}

.event {
  margin-bottom: 10px;
}

.event h4,
h3,
h2 {
  color: var(--green);
  margin: 0 0 6px 0;
}

.muted {
  color: var(--muted);
  font-size: 14px;
}

/* ====== Gallery: paging + responsive grid ====== */
.gallery-container {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 10px;
}

/* each page occupies the full container width */
.gallery-page {
  flex: 0 0 100%;
  scroll-snap-align: start;
}

/* grid inside a page (rows x cols) */
.gallery-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, minmax(160px, 22vw));
  align-items: stretch;
  justify-items: stretch;
}

/* Thumb visual */
.thumb {
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  border: 2px solid var(--green-light);
  transition: transform 0.28s ease;
  display: block;
}

.thumb:hover {
  transform: scale(1.04);
}

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

/* Responsive grid counts */
@media (max-width: 900px) and (min-width: 601px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, minmax(180px, 30vw));
    height: 555px;
  }
}


@media (max-width: 600px) {
  .gallery-grid {
    padding-top: 20px;
    padding-bottom: 4px;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(2, minmax(380px, 45vw));
  }
}

/* Lightbox overlay (expanded image) */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
  z-index: 1200;
  overflow: auto;
  /* allows scrolling the expanded image if large */
  padding: 30px;
}

#lightbox img {
  max-width: 95%;
  max-height: 95%;
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

#lightbox.show {
  display: flex;
}


/* Tribute wall */
#tributeList {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

/* Grid layout for tributes page */
.tributes-grid #tributeList {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.tributes-grid .tribute {
  height: 100%;
  display: flex;
  flex-direction: column;
}



/* Tributes Page Specific Layout */
.tributes-layout main {
  max-width: 100%;
  padding: 20px;
  display: block; /* Remove the grid that constrains width */
}

.tributes-layout .card {
  max-width: 1400px; /* Allow it to get wide but keep it readable */
  margin: 0 auto 20px auto;
  width: 100%;
}

.tributes-layout .tributes-grid {
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.tributes-layout .tributes-grid #tributeList {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.tribute {
  background: var(--green-light);
  padding: 10px;
  border-radius: 8px;
  border-left: 4px solid var(--pink);
}

.tribute small {
  color: var(--muted);
}

/* Inputs */
input,
textarea {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--green);
  background: var(--white);
  color: #04202a;
}

textarea {
  min-height: 80px;
  resize: vertical;
}

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

th,
td {
  padding: 8px 6px;
  border-bottom: 1px dashed var(--green-light);
  color: #04202a;
}

/* Map */
.map iframe {
  width: 100%;
  height: 260px;
  border-radius: 10px;
  border: 2px solid var(--green-light);
}

/* Footer */
footer {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin-top: 10px;
  padding: 8px;
  border-top: 3px solid var(--pink);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 10, 0.7);
  z-index: 60;
}

.lightbox img {
  max-width: 90%;
  max-height: 85%;
  border-radius: 8px;
  border: 3px solid var(--white);
}

.lightbox.show {
  display: flex;
}

.accordion-item {
  border-bottom: 1px solid var(--muted, #ddd);
  margin-bottom: 6px;
}

.accordion-header {
  background: var(--glass, rgba(255, 255, 255, 0.1));
  color: var(--green, #222);
  font-weight: 600;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
}

.accordion-header:hover {
  background: var(--hover, rgba(0, 0, 0, 0.05));
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  padding: 0 12px;
  background: var(--surface, #fafafa);
  transition: max-height 0.4s ease;
  border-radius: 6px;
}

.accordion-content p {
  margin: 10px 0;
  font-size: 15px;
  color: var(--muted, #555);
}

/* Responsive */
@media (max-width: 980px) {
  main {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .portrait {
    width: 140px;
    height: 140px;
  }
}

@media (max-width: 800px) {
  .hero {
    align-items: stretch;
  }

  .top-actions {
    align-items: center;
  }

  .top-meta {
    text-align: center;
  }
}

.fade-in {
  animation: fade .6s ease both;
}

@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.download-btn {
  display: inline-block;
  background: var(--green);
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: background 0.3s ease, transform 0.2s ease;
}

.download-btn:hover {
  background: #43a047;
  /* slightly darker green */
  transform: translateY(-3px);
}

.progress-container {
  text-align: center;
  margin-top: 15px;
  color: var(--muted);
  font-weight: 600;
}

.progress-bar {
  width: 80%;
  max-width: 300px;
  height: 10px;
  background: #e0e0e0;
  border-radius: 10px;
  margin: 8px auto;
  overflow: hidden;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: var(--green);
  border-radius: 10px;
  transition: width 2.5s ease;
}

/* .top-meta {
  text-align: center;
  margin-bottom: 25px;
  padding: 20px;
  background: rgba(255,255,255,0.5);
  border-radius: 14px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.top-meta h2 {
  color: var(--green);
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.top-meta .dates {
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 12px;
}

.top-meta .actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 12px;
} */

/* ===== Top actions bar styling ===== */
.top-actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 15px;
  padding: 20px;
  width: 100%;
  border-bottom: 2px solid var(--green-light);
  background: rgba(255, 255, 255, 0.6);
  border-radius: 12px 12px 0 0;
}

/* Optional: make the card top look clean */
.card.hero {
  padding-top: 0;
  overflow: hidden;
}

.top-meta {
  text-align: center;
  margin-top: 10px;
  margin-bottom: 20px;
}


.whatsapp-btn {
  display: inline-block;
  background-color: #25D366;
  color: white;
  padding: 10px 18px;
  border-radius: 30px;
  text-decoration: none;
  margin: 10%;
  font-weight: 600;
  font-size: 16px;
  box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
  transition: 0.3s;
}

.whatsapp-btn:hover {
  background-color: #1ebe5d;
  transform: scale(1.05);
}


/* Mobile (max 600px) */
@media (max-width: 600px) {
  header h1 {
    font-size: 1.3rem;
  }

  section {
    padding: 10px;
  }
}

/* Tablets (601–900px) */
@media (min-width: 601px) and (max-width: 900px) {
  header h1 {
    font-size: 1.8rem;
  }

  section {
    padding: 20px;
  }
}

.name-title {
  margin: 0 0 6px 0;
}

.tribute-row {
  margin-bottom: 8px;
}

.submit-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.hidden {
  display: none !important;
}

.programme-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  border: 1px solid #ddd;
}

.programme-table th,
.programme-table td {
  padding: 12px;
  border: 1px solid #ddd;
}

.programme-table thead {
  background-color: #f2f2f2;
}

.map-card,
.appreciation-card {
  margin-top: 14px;
}

.map-frame {
  border: 0;
  width: 100%;
}

.get-directions-btn {
  margin-top: 8px;
  display: inline-block;
}