/* ==========================================================
   OBITUARY ARCHIVE
   One parent class controls the complete section.

   Add this class to the outer WordPress block:
   obituary-content

   This CSS expects modern-home.css to load first.
========================================================== */

.obituary-content {
  position: relative;
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
  padding: clamp(58px, 8vw, 110px) 0;
  color: var(--mh-gray-800);
  font-family: var(--mh-font-body);
  isolation: isolate;
}

/* Editorial background field */
.obituary-content::before,.description-above-content::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: -2;
  width: 100vw;
  transform: translateX(-50%);
  background:
    linear-gradient(
      90deg,
      var(--mh-black) 0,
      var(--mh-black) clamp(18px, 4vw, 64px),
      var(--mh-gray-50) clamp(18px, 4vw, 64px),
      var(--mh-gray-50) 100%
    );
}

/* Prevent WordPress blocks and long content from overflowing */

.obituary-content,
.obituary-content *,
.obituary-content *::before,
.obituary-content *::after {
  box-sizing: border-box;
}

.obituary-content > * {
  min-width: 0;
  max-width: 100%;
}

/* ==========================================================
   PRIMARY PAGE TITLE
========================================================== */



.obituary-content > h1, .description-above-content > h1{
  position: relative;
  max-width: 85%;
  margin: 0 0 clamp(44px, 7vw, 86px);
  padding:
    clamp(38px, 6vw, 72px)
    clamp(28px, 6vw, 76px)
    clamp(42px, 6vw, 76px);
  background: var(--mh-black);
  color: var(--mh-white);
  font-family: var(--mh-font-heading);
  font-size: clamp(2rem, 5.5vw, 5.3rem);
  font-weight: 900;
  line-height: .92;
  letter-spacing: -.07em;
}


.obituary-content > .wp-block-heading:first-child {
  position: relative;
  max-width: 100%;
  margin: 0 0 clamp(44px, 7vw, 86px);
  padding:
    clamp(38px, 6vw, 72px)
    clamp(28px, 6vw, 76px)
    clamp(42px, 6vw, 76px);
  background: var(--mh-black);
  color: var(--mh-white);
  font-family: var(--mh-font-heading);
  font-size: clamp(2rem, 5.5vw, 5.3rem);
  font-weight: 900;
  line-height: .92;
  letter-spacing: -.07em;
}

.description-above-content {
  position: relative;
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
  color: var(--mh-gray-800);
  font-family: var(--mh-font-body);
  isolation: isolate;
}

.description-above-content > h1{
  margin: 0 0;
}

/* Gold editorial rule beneath the page title */

.obituary-content > h1::after,
.obituary-content > .wp-block-heading:first-child::after {
  content: "";
  position: absolute;
  right: clamp(28px, 6vw, 76px);
  bottom: 0;
  left: clamp(28px, 6vw, 76px);
  height: 5px;
  background: var(--mh-gradient-gold);
}

/* ==========================================================
   YEAR HEADINGS
   Use H2 for archive years.
========================================================== */

.obituary-content h2 {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: clamp(16px, 3vw, 34px);
  margin:
    clamp(70px, 10vw, 70px)
    0
    clamp(28px, 5vw, 52px);
  color: var(--mh-black);
  font-family: var(--mh-font-heading);
  font-size: clamp(2.8rem, 6vw, 6rem);
  font-weight: 900;
  line-height: .85;
  letter-spacing: -.075em;
}

/* First year does not need excessive top spacing */

.obituary-content > h2:first-child,
.obituary-content > h1 + h2,
.obituary-content > .wp-block-heading:first-child + h2 {
  margin-top: 0;
}

/* Long black and gold archival rule */

.obituary-content h2::after {
  content: "";
  min-width: 60px;
  height: 5px;
  flex: 1;
  background:
    linear-gradient(
      90deg,
      var(--mh-gradient-gold),
      var(--mh-black) 38%,
      rgba(0, 0, 0, .12) 38%,
      rgba(0, 0, 0, .12) 100%
    );
}

/* ==========================================================
   MEMORIAL TITLES
========================================================== */

.obituary-content h3 {
  position: relative;
  margin: 0 0 14px;
  padding-bottom: 18px;
  color: var(--mh-black);
  font-family: var(--mh-font-heading);
  font-size: clamp(1.75rem, 3.3vw, 3.4rem);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -.05em;
}

/* Short title divider */

.obituary-content h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: clamp(54px, 8vw, 110px);
  height: 3px;
  background: var(--mh-gradient-gold);
}

/* Resource and secondary headings */

.obituary-content h4,
.obituary-content h5,
.obituary-content h6 {
  margin: clamp(24px, 4vw, 38px) 0 10px;
  color: var(--mh-black);
  font-family: var(--mh-font-heading);
  font-size: clamp(1rem, 1.45vw, 1.22rem);
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -.015em;
}

/* ==========================================================
   WORDPRESS COLUMNS
   Each Columns block becomes one archival memorial row.
========================================================== */
.wp-block-columns.obituary-content{
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 0;
  border-top: 1px solid rgba(0, 0, 0, .16);
  background: var(--mh-white);
}

.obituary-content .wp-block-columns,.wp-block-columns.obituary-content {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 0;
  border-top: 1px solid rgba(0, 0, 0, .16);
  background: var(--mh-white);
}

/* Add separation between successive memorial rows */

.obituary-content .wp-block-columns + .wp-block-columns {
  margin-top: clamp(24px, 4vw, 42px);
}

/* Strong closing rule */

.obituary-content .wp-block-columns::after, .wp-block-columns::after.obituary-content {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background:
    linear-gradient(
      90deg,
      var(--mh-gold),
      var(--mh-black) 24%,
      rgba(0, 0, 0, .14) 24%
    );
}

/* General column treatment */

.obituary-content .wp-block-column {
  min-width: 0;
  margin: 0;
  padding: clamp(28px, 4vw, 52px);
}

/*
   First column:
   Intended for portrait, life dates, or short memorial metadata.
*/

.obituary-content .wp-block-columns > .wp-block-column:first-child {
  flex-basis: 33.33%;
  flex-grow: 0;
  background: var(--mh-black);
  color: var(--mh-white);
}

/*
   Final or main column:
   Intended for title, obituary text and resource links.
*/

.obituary-content .wp-block-columns > .wp-block-column:last-child {
  flex: 66.66%;
  border-right: 1px solid rgba(0, 0, 0, .12);
  background:
    linear-gradient(
      90deg,
      rgba(227, 191, 37, .07),
      transparent 90px
    ),
    var(--mh-white);
}

/* Text within the black archival column */

.obituary-content
.wp-block-columns
> .wp-block-column:first-child
p,
.obituary-content
.wp-block-columns
> .wp-block-column:first-child
li {
  color: rgba(255, 255, 255, .76);
}

.obituary-content
.wp-block-columns
> .wp-block-column:first-child
h3,
.obituary-content
.wp-block-columns
> .wp-block-column:first-child
h4,
.obituary-content
.wp-block-columns
> .wp-block-column:first-child
h5,
.obituary-content
.wp-block-columns
> .wp-block-column:first-child
h6 {
  color: var(--mh-white);
}

.obituary-content
.wp-block-columns
> .wp-block-column:first-child
strong {
  color: var(--mh-white);
}

/* ==========================================================
   BODY COPY
========================================================== */

.obituary-content p {
  max-width: 74ch;
  margin: 0 0 1.35em;
  color: var(--mh-gray-800);
  font-size: clamp(1rem, 1.12vw, 1.075rem);
  line-height: 1.86;
  text-wrap: pretty;
  overflow-wrap: anywhere;
}

.obituary-content p:last-child {
  margin-bottom: 0;
}

.obituary-content strong,
.obituary-content b {
  color: var(--mh-black);
  font-weight: 800;
}

/* Optional introductory paragraph after an H3 */

.obituary-content h3 + p {
  color: var(--mh-gray-600);
  font-size: clamp(1.025rem, 1.25vw, 1.14rem);
  line-height: 1.82;
}

/* ==========================================================
   LISTS
========================================================== */

.obituary-content ul,
.obituary-content ol {
  display: grid;
  gap: 10px;
  max-width: 74ch;
  margin: 20px 0 28px;
  padding-left: 1.3rem;
}

.obituary-content li {
  padding-left: .35rem;
  color: var(--mh-gray-800);
  font-size: clamp(1rem, 1.12vw, 1.075rem);
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.obituary-content li::marker {
  color: var(--mh-gold);
  font-weight: 900;
}

/* ==========================================================
   LINKS
========================================================== */

.obituary-content a {
  color: inherit;
  font-weight: 800;
  text-decoration-line: underline;
  text-decoration-color: var(--mh-gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  overflow-wrap: anywhere;
  transition:
    color var(--mh-transition),
    text-decoration-color var(--mh-transition);
}

.obituary-content a:hover {
  color: var(--mh-gold);
  text-decoration-color: var(--mh-black);
}

.obituary-content a:focus-visible {
  outline: 3px solid var(--mh-gold);
  outline-offset: 4px;
}

/* Links inside the black column */

.obituary-content
.wp-block-columns
> .wp-block-column:first-child
a {
  color: var(--mh-white);
}

.obituary-content
.wp-block-columns
> .wp-block-column:first-child
a:hover {
  color: var(--mh-gold);
  text-decoration-color: currentColor;
}

/* ==========================================================
   IMAGES
========================================================== */

.obituary-content figure {
  position: relative;
  max-width: 100%;
  margin: 0;
}

/* Gold archival backing plate */

.obituary-content figure::before {
  content: "";
  position: absolute;
  top: 12px;
  right: -12px;
  bottom: -12px;
  left: 12px;
  z-index: 0;
  background: var(--mh-gradient-gold);
}

/* Image itself */

.obituary-content img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 0;
  background: var(--mh-gray-100);
  box-shadow: 0 24px 45px rgba(0, 0, 0, .24);
  object-fit: cover;
  object-position: center top;
}

/* Captions resemble archival publication notes */

.obituary-content figcaption {
  position: relative;
  z-index: 1;
  margin-top: 22px;
  color: rgba(255, 255, 255, .68);
  font-family: var(--mh-font-heading);
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/*
   Images outside a WordPress column should not become oversized.
*/

.obituary-content > figure,
.obituary-content > .wp-block-image {
  width: min(100%, 420px);
  margin: clamp(28px, 4vw, 46px) 0;
}

/* ==========================================================
   QUOTES
========================================================== */

.obituary-content blockquote {
  position: relative;
  max-width: 70ch;
  margin: clamp(30px, 5vw, 54px) 0;
  padding:
    clamp(28px, 4vw, 46px)
    clamp(26px, 5vw, 58px);
  border: 0;
  border-left: 5px solid var(--mh-gold);
  background: var(--mh-black);
  color: var(--mh-white);
}

.obituary-content blockquote p {
  margin: 0;
  color: var(--mh-white);
  font-family: var(--mh-font-heading);
  font-size: clamp(1.15rem, 2vw, 1.65rem);
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: -.02em;
}

.obituary-content blockquote cite {
  display: block;
  margin-top: 18px;
  color: var(--mh-gold);
  font-family: var(--mh-font-heading);
  font-size: .78rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* ==========================================================
   SEPARATORS
========================================================== */

.obituary-content hr,
.obituary-content .wp-block-separator {
  width: 100%;
  height: 1px;
  margin: clamp(42px, 7vw, 82px) 0;
  border: 0;
  background:
    linear-gradient(
      90deg,
      var(--mh-gold) 0 12%,
      var(--mh-black) 12% 34%,
      rgba(0, 0, 0, .14) 34% 100%
    );
}

/* ==========================================================
   TABLET
========================================================== */

@media (max-width: 900px) {
  .obituary-content {
    width: min(100% - 32px, 1180px);
  }

  .obituary-content::before {
    background:
      linear-gradient(
        90deg,
        var(--mh-black) 0 20px,
        var(--mh-gray-50) 20px 100%
      );
  }

  .obituary-content .wp-block-columns {
    flex-wrap: wrap;
  }

  .obituary-content
  .wp-block-columns
  > .wp-block-column:first-child {
    flex-basis: 280px;
  }
}

/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 781px) {
  .obituary-content {
    width: min(100% - 28px, 1180px);
    padding: 42px 0 64px;
  }

  .obituary-content::before {
    background:
      linear-gradient(
        90deg,
        var(--mh-black) 0 8px,
        var(--mh-gray-50) 8px 100%
      );
  }

  .obituary-content > h1,
  .obituary-content > .wp-block-heading:first-child {
    margin-bottom: 54px;
    padding: 34px 24px 40px;
    font-size: clamp(2.7rem, 15vw, 4.3rem);
  }

  .obituary-content > h1::after,
  .obituary-content > .wp-block-heading:first-child::after {
    right: 24px;
    left: 24px;
  }

  .obituary-content h2 {
    align-items: flex-end;
    gap: 14px;
    margin-top: 72px;
    font-size: clamp(2.5rem, 15vw, 4rem);
  }

  .obituary-content h2::after {
    height: 3px;
  }

  /*
     WordPress normally collapses Columns at this breakpoint.
     These declarations ensure a predictable stacked layout.
  */

  .obituary-content .wp-block-columns {
    display: block;
  }

  .obituary-content .wp-block-column {
    width: 100%;
    padding: 26px 22px 30px;
  }

  .obituary-content
  .wp-block-columns
  > .wp-block-column:first-child {
    width: 100%;
  }

  .obituary-content
  .wp-block-columns
  > .wp-block-column:last-child {
    border-right: 1px solid rgba(0, 0, 0, .12);
    border-left: 1px solid rgba(0, 0, 0, .12);
  }

  .obituary-content figure {
    width: min(100%, 290px);
  }

  .obituary-content figure::before {
    top: 9px;
    right: -9px;
    bottom: -9px;
    left: 9px;
  }

  .obituary-content img {
    max-height: 410px;
  }
}

/* ==========================================================
   VERY SMALL SCREENS
========================================================== */

@media (max-width: 420px) {
  .obituary-content {
    width: min(100% - 20px, 1180px);
  }

  .obituary-content .wp-block-column {
    padding: 24px 18px 28px;
  }

  .obituary-content h3 {
    font-size: clamp(1.65rem, 10vw, 2.35rem);
  }
}

/* ==========================================================
   REDUCED MOTION
========================================================== */

@media (prefers-reduced-motion: reduce) {
  .obituary-content a {
    transition-duration: .01ms;
  }
}