/* ============================================================
   BOB NEWMARCH MEMORIAL PAGE
   Add this as /css/bob-newmarch.css and link it after /css/Main.css
   ============================================================ */

:root {
  --memorial-navy: #06385a;
  --memorial-deep: #08283e;
  --memorial-blue: var(--brand-main, #2fa8d3);
  --memorial-sky: rgba(65, 184, 229, 0.16);
  --memorial-cream: #fffaf1;
  --memorial-gold: #d5a84d;
  --memorial-text: #25313a;
}

body.memorial-page {
  background:
    radial-gradient(circle at top left, rgba(65, 184, 229, 0.12), transparent 34rem),
    linear-gradient(180deg, #f7fbfd 0%, #f5f5f5 42%, #ffffff 100%);
  color: var(--memorial-text);
}

body.memorial-page main {
  max-width: 1100px;
}

/* Optional active state for this one-off page */
.main-nav a.memorial-active {
  background: rgba(255, 255, 255, 0.35);
}

.memorial-hero {
  position: relative;
  min-height: 460px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: 18px;
  margin: 27px auto 2rem;
  box-shadow: 0 12px 32px rgba(6, 56, 90, 0.22);
  background: #06233a;
}

.memorial-hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #06233a;
}

.memorial-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(5, 35, 58, 0.9) 0%,
      rgba(5, 35, 58, 0.7) 38%,
      rgba(5, 35, 58, 0.18) 100%
    ),
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.08),
      rgba(0, 0, 0, 0.22)
    );
}

.memorial-hero-inner {
  position: relative;
  z-index: 1;
  width: min(720px, calc(100% - 40px));
  padding: clamp(2rem, 5vw, 4rem);
  color: #fff;
}

.memorial-hero h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(2.2rem, 6vw, 4.8rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.35);
}

.memorial-dates {
  margin: 0 0 1rem;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  font-weight: 700;
}

.memorial-hero p {
  margin: 0;
  max-width: 620px;
  font-size: 1.05rem;
  line-height: 1.55;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.memorial-role-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.35rem;
}

.memorial-role {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.8rem;
  border: 1px solid rgba(213, 168, 77, 0.95);
  border-radius: 999px;
  background: rgba(6, 56, 90, 0.62);
  color: #fff;
  font-weight: 700;
  font-size: 0.86rem;
  line-height: 1.2;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.memorial-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(65, 184, 229, 0.22);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(6, 56, 90, 0.09);
}

.poem-card {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: clamp(1rem, 3vw, 2rem);
  padding: clamp(1.25rem, 4vw, 2.25rem);
  margin-bottom: 1.2rem;
  background:
    linear-gradient(135deg, rgba(255, 250, 241, 0.94), rgba(255, 255, 255, 0.96)),
    radial-gradient(circle at bottom right, rgba(47, 168, 211, 0.12), transparent 22rem);
  border-color: rgba(213, 168, 77, 0.34);
}

.poem-icon {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 0.5rem;
  color: var(--memorial-gold);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1;
  border-right: 1px solid rgba(213, 168, 77, 0.36);
}

.poem-content h3,
.contribution-card h3,
.memorial-gallery h3 {
  margin: 0 0 0.7rem;
  color: var(--memorial-navy);
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.poem-divider {
  width: 70px;
  height: 3px;
  margin: 0 0 1.15rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--memorial-gold), rgba(213, 168, 77, 0.12));
}

.poem-content blockquote {
  margin: 0;
  max-width: 800px;
  font-size: clamp(1rem, 1.5vw, 1.08rem);
  line-height: 1.7;
}

.poem-content blockquote p {
  margin: 0 0 1rem;
}

.poem-content footer {
  margin-top: 1.35rem;
  color: var(--memorial-navy);
  font-weight: 700;
  line-height: 1.45;
}

.contribution-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 1rem;
  align-items: center;
  padding: 1.2rem 1.4rem;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, rgba(65, 184, 229, 0.14), rgba(255, 255, 255, 0.95));
}

.contribution-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--memorial-navy);
  color: #fff;
  font-size: 1.8rem;
  box-shadow: 0 8px 18px rgba(6, 56, 90, 0.2);
}

.contribution-card p {
  margin: 0;
  line-height: 1.6;
}

.memorial-gallery {
  margin: 0 0 2.5rem;
}

.memorial-gallery h3 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  text-align: center;
}

.memorial-gallery h3::before,
.memorial-gallery h3::after {
  content: "";
  flex: 1;
  max-width: 260px;
  height: 1px;
  background: rgba(47, 168, 211, 0.5);
}

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

.gallery-card {
  display: block;
  overflow: hidden;
  border-radius: 15px;
  background: #fff;
  color: var(--memorial-navy);
  text-decoration: none;
  box-shadow: 0 5px 18px rgba(6, 56, 90, 0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.gallery-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(6, 56, 90, 0.18);
}

.gallery-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #e9eef1;
}

.gallery-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem 0.95rem;
  font-weight: 700;
  line-height: 1.25;
}

.gallery-caption span:last-child {
  color: var(--memorial-blue);
  font-size: 1.05rem;
}

.memorial-footer {
  margin: 2rem auto 0;
  padding: 1.25rem 1rem;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, var(--memorial-deep), var(--memorial-navy));
  border-radius: 16px 16px 0 0;
  line-height: 1.5;
}

.memorial-footer strong {
  display: block;
  font-size: 1.4rem;
  line-height: 1;
  margin-bottom: 0.3rem;
}

@media (max-width: 820px) {
  .memorial-hero {
    min-height: 430px;
    background-position: 62% center;
  }

  .memorial-hero::before {
    background: linear-gradient(180deg, rgba(5, 35, 58, 0.82), rgba(5, 35, 58, 0.52));
  }

  .poem-card,
  .contribution-card {
    grid-template-columns: 1fr;
  }

  .poem-icon {
    justify-content: flex-start;
    border-right: 0;
    border-bottom: 1px solid rgba(213, 168, 77, 0.3);
    padding-bottom: 0.6rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  body.memorial-page main {
    margin-top: 1rem;
  }

  .memorial-hero {
    min-height: 410px;
    border-radius: 14px;
  }

  .memorial-hero-inner {
    width: auto;
    padding: 1.4rem;
  }

  .memorial-role-row {
    gap: 0.45rem;
  }

  .memorial-role {
    font-size: 0.78rem;
    padding: 0.32rem 0.62rem;
  }

  .poem-content blockquote {
    line-height: 1.62;
  }
}
/*Lightbox*/
.memory-card {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(6, 56, 90, 0.14);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.memory-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(6, 56, 90, 0.2);
}

.memory-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.memory-card span {
  display: block;
  padding: 0.85rem 1rem 1rem;
  color: #06385a;
  font-weight: 600;
}

.memory-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.memory-lightbox.is-open {
  display: flex;
}

.memory-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 16, 33, 0.86);
  backdrop-filter: blur(5px);
}

.memory-lightbox-panel {
  position: relative;
  z-index: 1;
  width: min(1100px, 96vw);
  max-height: 92vh;
  display: grid;
  place-items: center;
}

.memory-lightbox-panel img {
  display: block;
  max-width: 100%;
  max-height: 78vh;
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  background: #fff;
}

.memory-lightbox-panel p {
  margin: 1rem 0 0;
  color: #fff;
  font-weight: 600;
  text-align: center;
}

.memory-lightbox-close,
.memory-lightbox-nav {
  position: absolute;
  border: 0;
  cursor: pointer;
  color: #fff;
  background: rgba(47, 168, 211, 0.75);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
}

.memory-lightbox-close {
  top: -14px;
  right: -14px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  font-size: 2rem;
  line-height: 1;
}

.memory-lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 64px;
  border-radius: 999px;
  font-size: 3rem;
  line-height: 1;
}

.memory-lightbox-prev {
  left: -20px;
}

.memory-lightbox-next {
  right: -20px;
}

.memory-lightbox-close:hover,
.memory-lightbox-nav:hover {
  background: #2fa8d3;
}

@media (max-width: 700px) {
  .memory-lightbox {
    padding: 14px;
  }

  .memory-lightbox-panel img {
    max-height: 72vh;
  }

  .memory-lightbox-nav {
    width: 42px;
    height: 54px;
    font-size: 2.4rem;
  }

  .memory-lightbox-prev {
    left: 4px;
  }

  .memory-lightbox-next {
    right: 4px;
  }

  .memory-lightbox-close {
    top: 8px;
    right: 8px;
  }
}
