/* ==========================================================================
   Mount Harmony Memorial Gardens — hand-written replacement for nicepage.css
   Measurements taken from the original Nicepage export at a 1280px viewport.
   ========================================================================== */

/* ---- Tokens ---------------------------------------------------------- */
:root {
  --ink: #111111;
  --header-bg: #292c33;
  --footer-bg: #333333;
  --drawer-bg: #111111;
  --accent: #4d6eaa;            /* the short blue rule under headings */
  --grey-10: #efefef;
  --shadow-soft: 0 0 40px rgba(26, 26, 26, 0.4);
  --shadow-card: 2px 2px 8px rgb(128, 128, 128);
  --serif-display: "Playfair Display", Georgia, serif;
  --serif-body: "Merriweather", Georgia, serif;
  --sans: "Open Sans", Arial, sans-serif;
  --script: "Alex Brush", cursive;
  --sheet: 1140px;
}

/* ---- Base ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--serif-display);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: #fff;
}
main { overflow-x: clip; } /* decorative blocks may bleed past the edge, as in the original */
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: inherit; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif-display);
  font-weight: 400;
  margin: 0;
}
h1 { font-size: 48px; line-height: 1.1; }
h2 { font-size: 36px; line-height: 1.1; }
h3 { font-size: 30px; line-height: 1.2; }
h4 { font-size: 24px; line-height: 1.2; }
p  { margin: 0; }

.container { width: min(var(--sheet), 100% - 40px); margin-inline: auto; }
.merri { font-family: var(--serif-body); }
.sans  { font-family: var(--sans); }
.italic { font-style: italic; }
.center { text-align: center; }
.small { font-size: 14px; line-height: 1.6; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* The short rule Nicepage put under headings */
.rule { width: 64px; height: 0; border-top: 3px solid var(--accent); margin: 22px 0 0; }
.rule--black { width: 114px; border-top: 2px solid #000; margin: 24px auto 0; }

.shadow-soft { box-shadow: var(--shadow-soft); }
.shadow-card { box-shadow: var(--shadow-card); }

/* ---- Header + off-canvas menu --------------------------------------- */
.site-header {
  background: var(--header-bg);
  color: #fff;
  height: 74px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  position: relative;
  z-index: 20;
}
.menu-btn {
  margin-top: 6px;
  background: none;
  border: 0;
  color: #fff;
  font: 16px/1.2 var(--serif-display);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 4px 16px;
}
.menu-btn svg { width: 22px; height: 22px; fill: #8a8d93; }
.menu-btn:hover svg, .menu-btn:focus-visible svg { fill: #fff; }

.drawer {
  position: fixed;
  inset: 0 auto 0 0;
  width: 331px;
  max-width: 85vw;
  background: var(--drawer-bg);
  color: #fff;
  padding: 50px 20px 30px;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 40;
  visibility: hidden;
}
.drawer.is-open { transform: none; visibility: visible; }
.drawer-close {
  position: absolute; top: 14px; left: 20px;
  background: none; border: 0; color: #fff; cursor: pointer; padding: 4px;
}
.drawer-close svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; }
.drawer ul { list-style: none; margin: 0; padding: 0; text-align: center; }
.drawer a {
  display: block;
  padding: 10px 12px;
  font: 16px/1.25 var(--serif-display);
  text-decoration: none;
  color: #fff;
}
.drawer a:hover, .drawer a[aria-current="page"] { color: #c8d3ea; }
.overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.8);
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 30;
}
.overlay.is-open { opacity: 1; visibility: visible; }
body.menu-open { overflow: hidden; }
.nav-short { display: none; }

/* Laptops and desktops: the same <nav> becomes a horizontal bar in the header's place.
   The Menu button, close button and overlay are hidden, so main.js has nothing to open. */
@media (min-width: 1024px) {
  .site-header, .drawer-close, .overlay { display: none !important; }
  body.menu-open { overflow: auto; } /* drawer left open, then window widened */
  .drawer {
    position: sticky;
    inset: auto;
    top: 0; /* after `inset`, which would otherwise reset it */
    width: auto;
    max-width: none;
    transform: none;
    visibility: visible;
    transition: none;
    overflow: visible;
    background: var(--header-bg);
    padding: 0 20px;
    z-index: 20;
  }
  .drawer ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    max-width: var(--sheet);
    margin: 0 auto;
  }
  .drawer a {
    padding: 24px 11px 22px;
    font-size: 15px;
    white-space: nowrap;
    color: #d9dbe0;
    border-bottom: 3px solid transparent;
  }
  .drawer a:hover { color: #fff; }
  .drawer a[aria-current="page"] { color: #fff; border-bottom-color: var(--accent); }
  .nav-full { display: none; }
  .nav-short { display: inline; }
}
@media (min-width: 1024px) and (max-width: 1199px) {
  .drawer { padding: 0 8px; }
  .drawer a { padding-left: 8px; padding-right: 8px; font-size: 14px; } /* keeps all 12 links on one row */
}

/* ---- Footer ---------------------------------------------------------- */
.site-footer {
  background: var(--footer-bg);
  color: #fff;
  text-align: center;
  padding: 49px 20px 40px;
}
.site-footer p { font-family: var(--serif-body); max-width: 516px; margin-inline: auto; }
.site-footer .credit { font: 12px/1.6 var(--sans); margin-top: 20px; }
.site-footer a { color: #fff; }

/* Line icons (footer email, menu phone): thin white strokes like the menu/close icons */
.icon-link svg, .nav-call svg {
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linejoin: round; stroke-linecap: round;
}
.site-footer .icon-link { display: inline-block; vertical-align: middle; padding: 2px 4px; }
.site-footer .icon-link svg { display: block; width: 24px; height: 24px; }
.site-footer .icon-link:hover, .site-footer .icon-link:focus-visible { color: #c8d3ea; }
.nav-call { display: inline-flex !important; align-items: center; justify-content: center; gap: 8px; }
.nav-call svg { width: 20px; height: 20px; flex: none; }

/* ---- Back-to-top button (Nicepage had one bottom-right) -------------- */
.to-top {
  position: fixed; right: 20px; bottom: 20px;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(77, 110, 170, 0.35); color: #fff; border: 0;
  display: grid; place-items: center; cursor: pointer;
  opacity: 0; visibility: hidden; transition: opacity .3s;
  z-index: 10;
}
.to-top.is-visible { opacity: 1; visibility: visible; }
.to-top svg { width: 16px; height: 16px; fill: currentColor; }

/* ==========================================================================
   Home page
   ========================================================================== */
.hero { padding-top: 1px; }
.hero img { width: 100%; height: 372px; object-fit: cover; }

.intro { padding: 40px 0 0; }
.intro p { margin-top: 11px; }

/* "A History of Service" — overlapping photos + floating card */
.collage {
  position: relative;
  height: 832px;
}
.collage__img1 { position: absolute; left: -6px; top: 90px; width: 570px; height: 496px; object-fit: cover; }
.collage__img2 { position: absolute; left: 301px; top: 417px; width: 572px; height: 365px; object-fit: cover; box-shadow: 0 0 31px rgba(26,26,26,.55); }
.collage__text { position: absolute; left: 630px; top: 0; width: 510px; padding-top: 68px; }
.collage__text p { margin-top: 22px; width: 450px; }
.collage__card {
  position: absolute; left: 755px; top: 455px; width: 385px; min-height: 269px;
  background: #fff; box-shadow: -2px 2px 8px rgb(128,128,128);
  padding: 20px 41px 24px;
}
.collage__card p { margin-top: 26px; }

/* "One Final Gift" */
.gift { position: relative; height: 615px; }
.gift__text { position: absolute; left: 0; top: 61px; width: 454px; padding: 0 15px; }
.gift__text h3 { margin-top: 35px; }
.gift__text p { margin-top: 23px; }
.gift__img1 { position: absolute; left: 416px; top: 265px; width: 427px; height: 309px; object-fit: cover; }
.gift__img2 { position: absolute; left: 753px; top: 3px; width: 387px; height: 477px; object-fit: cover; }

/* Six service cards */
.cards { padding: 35px 0 57px; }
.cards__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-inline: -15px;
}
.card { padding: 15px; }
.card__inner {
  box-shadow: var(--shadow-card);
  background: #fff;
  margin: 0;
  padding: 25px 20px 20px;
  height: 100%;
}
.card h4 { margin-top: 0; }
.card p { margin-top: 17px; }
.cards__grid > .card { min-height: 317px; }
.cards__grid > .card:nth-child(n+4) { min-height: 357px; }

/* Hours & Location */
.hours { padding: 40px 0 60px; text-align: center; }
.hours h2 { padding-top: 17px; }
.hours__times { font-size: 18px; line-height: 1.8; margin-top: 41px; }
.hours__addr { margin-top: 5px; }
.hours__icon {
  display: inline-grid; place-items: center;
  width: 64px; height: 64px; margin-top: 14px; color: var(--ink);
}
.hours__icon img { width: 64px; height: 64px; }
.hours__dir { font-size: 12px; margin-top: 8px; }
.hours__dir a { color: var(--accent); text-decoration: none; }

/* ==========================================================================
   Shared page components
   ========================================================================== */
/* Full-width photo directly under the header */
.page-photo img { width: 100%; height: var(--h, 515px); object-fit: cover; }

/* Centred page title + text block */
.lead { padding: 3px 0 40px; }
.lead h2 { text-align: center; }
.lead p { margin: 19px auto 0; max-width: 1029px; }

/* Two columns: photo + text. --img-w sets the photo column width */
.split {
  display: grid;
  grid-template-columns: var(--img-w, 524px) 1fr;
  gap: var(--gap, 16px);
  align-items: start;
  padding-bottom: var(--pb, 0);
}
.split--reverse { grid-template-columns: 1fr var(--img-w, 524px); }
.split img { width: 100%; height: var(--img-h, auto); object-fit: cover; }
.split__text { padding: var(--text-pad, 0); }
.split__text p { margin-top: 25px; }
.rule--short { width: 38px; }

/* Photo grid that opens in the lightbox */
.gallery {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), 1fr);
  gap: 17px 16px;
  padding: 0 0 120px;
}
.gallery a { display: block; overflow: hidden; }
.gallery img {
  width: 100%;
  aspect-ratio: var(--ratio, 369 / 254);
  object-fit: cover;
  transition: transform .4s ease;
}
.gallery a:hover img, .gallery a:focus-visible img { transform: scale(1.04); }

.lightbox {
  border: 0; padding: 0; background: transparent;
  max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh;
}
.lightbox::backdrop { background: rgba(0, 0, 0, 0.9); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox img { max-width: 90vw; max-height: 88vh; width: auto; height: auto; }
.lightbox button {
  position: fixed; background: none; border: 0; color: #fff;
  font-size: 48px; line-height: 1; cursor: pointer; padding: 10px 18px;
}
.lightbox__close { top: 10px; right: 10px; font-size: 40px; }
.lightbox__prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 10px; top: 50%; transform: translateY(-50%); }

.panel-grey { background: #f2f2f2; }
.steps { margin: 0; padding-left: 20px; font-family: var(--serif-body); }
.steps li + li { margin-top: 25px; }

/* Full-bleed photo banner with white heading at the bottom (Plan Ahead) */
.banner {
  min-height: 472px;
  background-position: center; background-size: cover; background-repeat: no-repeat;
  display: flex; align-items: flex-end;
  padding-bottom: 9px;
}
.banner h2 { color: #fff; margin-left: 227px; text-shadow: 0 1px 6px rgba(0,0,0,.35); }

/* Contact block (Plan Ahead) */
.contact { text-align: center; font-family: var(--serif-body); }
.contact .big { font-size: 24px; line-height: 1.6; }
.contact a { text-decoration: none; color: var(--accent); }
.icon-ring {
  display: inline-grid; place-items: center;
  width: 64px; height: 64px; border: 2px solid var(--accent); border-radius: 50%;
  margin: 21px 0 31px;
}
.icon-ring img { width: 34px; height: 34px; }

/* Testimonials */
.section-title { text-align: center; padding: 34px 0 34px; }
.section-title h3 { font-style: italic; }
.section-title .bar { width: 912px; max-width: 100%; margin: 30px auto 0; border-top: 3px solid #454545; }
.quotes { padding: 19px 0 121px; background: linear-gradient(#fff, #849cce); }
.quotes--down { padding: 68px 0 72px; background: linear-gradient(#849cce, #fff); }
.quotes .container { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.quote {
  margin: 0; background: #fff; min-height: 400px;
  display: grid; place-items: center;
  padding: 40px 93px;
  font-style: italic; text-align: center;
}
.quote:nth-child(1) { box-shadow: 2px 2px 8px 3px rgb(128,128,128); }
.quote:nth-child(2) { box-shadow: 5px 5px 20px 3px rgba(0,0,0,.4); }

/* Photo mosaic (Our Grounds): 4 columns x 3 rows, two large tiles */
.mosaic {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: 251px 248px 251px;
  margin-inline: -15px;
}
.mosaic > * { padding: 8px; margin: 0; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; }
.mosaic .tall-wide { grid-column: span 2; grid-row: span 2; }
.mosaic .c1r2 { grid-column: 1 / span 2; grid-row: 2 / span 2; }
.mosaic .flower { display: grid; place-items: center; }
.mosaic .flower img { width: 203px; height: 161px; }

/* Edge-to-edge photo tiles (Flowers for Sale) */
.tiles { display: grid; grid-template-columns: 1fr 1fr 2fr; }
.tiles--b { grid-template-columns: 1fr 1fr; }
.tile-photo { background-position: center; background-size: cover; min-height: var(--h, 630px); }
.tile-grey { background: #eeeeee; }
.stack { display: grid; grid-template-rows: 1fr 1fr; }
.script { font-family: var(--script); font-size: 48px; line-height: 1.2; }
.display-60 { font-size: 60px; line-height: 1.1; }
.circle { width: 320px; height: 320px; border-radius: 50%; object-fit: cover; }

/* Photo collage with a title tile (Bronze Memorials) */
.collage-grid {
  display: grid;
  grid-template-columns: 565px 278px 278px;
  grid-template-rows: 255px 255px;
  gap: 10px;
  justify-content: center;
}
.collage-grid img { width: 100%; height: 100%; object-fit: cover; }
.collage-grid .big { grid-row: span 2; }
.collage-grid .wide { grid-column: 2 / span 2; }
.collage-grid .title { display: flex; flex-direction: column; align-items: center; padding: 30px 30px 0; text-align: center; }
.caps { text-transform: uppercase; }

/* Photos with a small white caption in the top-right corner */
.labelled { position: relative; margin: 0; }
.labelled img { width: 100%; height: 100%; object-fit: cover; }
.labelled figcaption {
  position: absolute; top: 30px; right: 30px;
  color: #fff; font-family: var(--serif-body); font-size: 16px;
  text-shadow: 0 1px 3px rgba(0,0,0,.6);
}

/* 2 x 2 tile grid (Mausoleums) */
.quad { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 315px; margin-inline: -5px; }
.quad > * { padding: 5px; }

/* Grey page background (Burial Guide) */
.page-grey { background: #e5e5e5; }
.outlined { border: 1px solid #a5a5a5; }

/* Light-blue block behind a photo (Payment Guidelines) */
.blue-block { position: relative; }
.blue-block::before {
  content: ""; position: absolute; top: -65px; left: 0; right: -80px; height: 559px;
  background: #cad5eb; z-index: -1;
}

/* Contact column with ring icons (Maps) */
.ring-blue {
  display: inline-grid; place-items: center;
  width: 64px; height: 64px; margin: 30px 0 46px;
}
.ring-blue img { width: 64px; height: 64px; }
.map-embed { width: 100%; height: 500px; border: 0; background: #e5e5e5; display: block; }
.map-drawing { min-height: 1051px; background-size: cover; background-position: center; }

/* Desktop-only offsets that collapse on small screens */
.inset-60 { padding-left: 60px; }
.pay-grid { display: grid; grid-template-columns: 551px 589px; position: relative; z-index: 0; }
.pay-photo { padding: 65px 0 0 95px; }
.pay-photo img { width: 494px; height: 494px; object-fit: cover; }
.vaults { position: relative; height: 575px; }
.vaults > * { position: absolute; }

/* ==========================================================================
   Responsive — below Nicepage's "lg" breakpoint everything stacks
   ========================================================================== */
@media (max-width: 1199px) {
  .collage, .gift { height: auto; display: flex; flex-direction: column; gap: 30px; padding: 40px 0; }
  .collage > *, .gift > * { position: static !important; width: 100% !important; height: auto !important; }
  .collage__text { padding-top: 0; }
  .collage__text p { width: auto; }
  .collage__img1 { order: 2; } .collage__img2 { order: 3; } .collage__card { order: 4; }
  .gift__text { padding: 0; }
  .gift__text h3 { margin-top: 0; }
  .collage-grid { grid-template-columns: 2fr 1fr 1fr; }
  .pay-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .pay-photo { padding: 30px 0 0; }
  .pay-photo img { width: 100%; height: auto; aspect-ratio: 1; }
  .blue-block::before { display: none; }
  .vaults { height: auto; display: flex; flex-direction: column; gap: 24px; padding-bottom: 40px; }
  .vaults > * { position: relative !important; left: auto !important; top: auto !important; width: 100% !important; height: 320px !important; }
  .vaults > p { height: auto !important; }
}
@media (max-width: 991px) {
  .split, .split--reverse { grid-template-columns: 1fr; gap: 30px; padding-bottom: 40px; }
  .split--reverse > img, .split--reverse > .split__media { order: -1; }
  .split img { height: auto; max-height: 480px; }
  .split__text { padding: 0 !important; }
  .gallery { --cols: 2; }
  .mosaic { grid-template-columns: 1fr 1fr; grid-template-rows: none; grid-auto-rows: 220px; margin-inline: 0; }
  .mosaic > * { grid-column: auto !important; grid-row: auto !important; }
  .mosaic .flower { display: none; }
  .tiles, .tiles--b { grid-template-columns: 1fr; }
  .tile-photo { min-height: 320px; }
  .tiles .tile-photo:first-child { display: none; }
  .tile-grey { padding: 40px 20px !important; }
  .tile-grey[style*="grid"] { grid-template-columns: 1fr !important; justify-items: center; }
  .stack .tile-photo { min-height: 232px; }
  .collage-grid { grid-template-columns: 1fr 1fr; grid-template-rows: none; grid-auto-rows: 240px; }
  .collage-grid .big, .collage-grid .wide { grid-column: span 2; grid-row: auto; }
  .collage-grid .title { grid-column: span 2; padding: 20px; height: auto; }
  .inset-60 { padding-left: 0; }
  .pay-grid { grid-template-columns: 1fr; }
  .pay-photo { padding: 30px 0 0; }
  .pay-photo img { width: 100%; height: auto; aspect-ratio: 1; }
  .vaults { height: auto; display: flex; flex-direction: column; gap: 24px; padding-bottom: 40px; }
  .vaults > * { position: relative !important; left: auto !important; top: auto !important; width: 100% !important; height: 260px !important; }
  .vaults > p { height: auto !important; }
  .quad { grid-template-columns: 1fr; grid-auto-rows: auto; margin-inline: 0; }
  .quad > figure { height: 280px; }
  .blue-block::before { display: none; }
  .map-drawing { min-height: 0; aspect-ratio: 1265 / 1051; }
  .banner { min-height: 320px; }
  .banner h2 { margin-left: 20px; }
  .quotes .container { grid-template-columns: 1fr; }
  .quote { min-height: 0; padding: 40px 30px; }
  .cards__grid { grid-template-columns: repeat(2, 1fr); margin-inline: 0; gap: 20px; }
  .cards__grid > .card { min-height: 0 !important; }
}
@media (max-width: 767px) {
  h1 { font-size: 36px; }
  h2 { font-size: 30px; }
  .hero img { height: 220px; }
  .page-photo img { height: 240px; }
  .gallery { --cols: 1; }
  .cards__grid { grid-template-columns: 1fr; }
}
