
.mnhs-home{
  --mnhs-gap-x:15px;
  --mnhs-gap-y:22px;
  --mnhs-card:320px;
  width:100%;
  display:flex;
  flex-direction:column;
  gap:var(--mnhs-gap-y);
  margin-top:var(--mnhs-space-before,18px);
  margin-bottom:var(--mnhs-space-after,28px);
}
.mnhs-row{
  display:grid;
  grid-template-columns:var(--mnhs-card) minmax(0,1fr);
  gap:var(--mnhs-gap-x);
  width:100%;
  min-width:0;
}
.mnhs-fixed-card{
  width:100%;
  aspect-ratio:1/1;
  min-width:0;
}
.mnhs-fixed-card__link{
  position:relative;
  box-sizing:border-box;
  width:100%;
  height:100%;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  text-align:center;
  padding:12%;
  background:#4a4a4a;
  color:#fff;
  text-decoration:none;
}
.mnhs-fixed-card__title{
  display:block;
  font-size:clamp(22px,2.3vw,38px);
  line-height:1;
  font-weight:400;
  letter-spacing:-.02em;
}
.mnhs-fixed-card__text{
  display:block;
  margin-top:.7rem;
  max-width:88%;
  font-size:clamp(11px,.82vw,14px);
  line-height:1.35;
  font-weight:300;
  opacity:.8;
}
.mnhs-fixed-card__plus{
  position:absolute;
  right:14px;
  bottom:10px;
  font-size:34px;
  line-height:1;
  font-weight:400;
  color:#fff;
  text-shadow:none;
  box-shadow:none;
}
.mnhs-slider-shell{
  position:relative;
  min-width:0;
  overflow:hidden;
}
.mnhs-track{
  display:flex;
  flex-wrap:nowrap;
  gap:var(--mnhs-gap-x);
  overflow-x:auto;
  overflow-y:hidden;
  scroll-snap-type:x mandatory;
  scrollbar-width:none;
  -ms-overflow-style:none;
  overscroll-behavior-inline:contain;
  touch-action:pan-x;
}
.mnhs-track::-webkit-scrollbar{display:none}
.mnhs-track > .mngs-ig-card,
.mnhs-track > .mntg-card,
.mnhs-track > article{
  flex:0 0 var(--mnhs-card)!important;
  width:var(--mnhs-card)!important;
  max-width:var(--mnhs-card)!important;
  scroll-snap-align:start;
  margin:0!important;
}
.mnhs-track .mngs-ig-card__link,
.mnhs-track .mngs-ig-card__image,
.mnhs-track .mntg-text-face{
  width:100%!important;
  aspect-ratio:1/1!important;
  height:auto!important;
}
.mnhs-track .mngs-ig-card__image img{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  object-position:var(--mntg-pos-x,50%) var(--mntg-pos-y,50%);
}
.mnhs-arrow{
  position:absolute;
  z-index:5;
  top:50%;
  transform:translateY(-50%);
  width:48px;
  height:64px;
  border:0;
  background:transparent;
  color:#fff;
  font-size:46px;
  line-height:1;
  font-weight:500;
  cursor:pointer;
  opacity:1;
  transition:opacity .2s ease;
  box-shadow:none;
  text-shadow:none;
  filter:none;
  -webkit-text-stroke:0;
}
.mnhs-arrow:focus-visible{outline:2px solid currentColor;outline-offset:2px}
.mnhs-arrow--prev{left:0}
.mnhs-arrow--next{right:0}
.mnhs-row:first-child{margin-top:0}
@media(max-width:780px){
  .wp-block-post-content:has(.mnhs-home){
    overflow:visible!important;
  }
  .mnhs-home{
    /* Override desktop values saved as inline custom properties. */
    --mnhs-gap-x:var(--mnhs-mobile-gap-x,6px)!important;
    --mnhs-gap-y:var(--mnhs-mobile-gap-y,10px)!important;
    position:relative;
    max-width:none!important;
    margin-left:0!important;
    margin-right:0!important;
  }
  .mnhs-home.mnhs-mobile-width-full{
    left:auto!important;
    transform:none!important;
    width:calc(100% + var(--wp--style--root--padding-left,12px) + var(--wp--style--root--padding-right,12px))!important;
    margin-left:calc(var(--wp--style--root--padding-left,12px) * -1)!important;
  }
  .mnhs-home.mnhs-mobile-width-content{
    left:50%;
    transform:translateX(-50%);
    width:calc(100vw - 24px)!important;
  }
  .mnhs-row{
    /* home.js measures this from the chosen decimal total (e.g. 2.3). */
    grid-template-columns:var(--mnhs-mobile-card,calc((100% - var(--mnhs-gap-x))/2)) minmax(0,1fr);
    gap:var(--mnhs-gap-x);
  }
  .mnhs-fixed-card{grid-column:1;}
  .mnhs-slider-shell{grid-column:2;}
  .mnhs-track{gap:var(--mnhs-gap-x);}
  .mnhs-track > .mngs-ig-card,
  .mnhs-track > .mntg-card,
  .mnhs-track > article{
    flex:0 0 var(--mnhs-mobile-card,100%)!important;
    width:var(--mnhs-mobile-card,100%)!important;
    max-width:var(--mnhs-mobile-card,100%)!important;
  }
  .mnhs-fixed-card__link{
    padding:10%;
  }
  .mnhs-fixed-card__title{
    font-size:clamp(13px,4.4vw,20px);
  }
  .mnhs-fixed-card__text{
    margin-top:.4rem;
    max-width:96%;
    font-size:clamp(11.5px,3.15vw,13px);
    line-height:1.28;
  }
  .mnhs-fixed-card__plus{
    right:8px;
    bottom:6px;
    font-size:26px;
  }
  .mnhs-arrow{
    display:block!important;
    width:40px;
    height:52px;
    padding:0;
    background:transparent;
    font-size:38px;
    font-weight:500;
    opacity:1!important;
  }
}


/* Homepage hover information — preserve MNARCH card hierarchy */
.mnhs-track > *{
  position:relative;
}

.mnhs-track .mngs-ig-card__link,
.mnhs-track a{
  position:relative!important;
  display:block;
}

.mnhs-track .mngs-ig-card__image{
  position:relative!important;
}

/* Full dark hover field */
.mnhs-card-overlay,
.mnhs-track .mngs-ig-card__overlay,
.mnhs-track .mntg-card__overlay{
  position:absolute!important;
  inset:0!important;
  z-index:3!important;
  display:block!important;
  box-sizing:border-box!important;
  padding:clamp(.8rem,1.3vw,1.15rem)!important;
  background:rgba(74,74,74,.92)!important;
  color:#fff!important;
  opacity:0!important;
  visibility:hidden!important;
  transition:opacity .18s ease,visibility .18s ease!important;
  pointer-events:none!important;
}

/* Main title / hover sentence: centered in the card */
.mnhs-track .mngs-ig-card__title,
.mnhs-track .mntg-card__title,
.mnhs-card-overlay__text{
  position:absolute!important;
  left:10%!important;
  right:10%!important;
  top:50%!important;
  transform:translateY(-50%)!important;
  margin:0!important;
  padding:0!important;
  text-align:center!important;
  font-size:clamp(12px,.95vw,16px)!important;
  line-height:1.28!important;
  font-weight:400!important;
  color:#fff!important;
}

/* Year / location: lower left */
.mnhs-track .mngs-ig-card__meta,
.mnhs-track .mntg-card__meta,
.mnhs-track .mngs-ig-card__cats{
  position:absolute!important;
  left:clamp(.8rem,1.3vw,1.15rem)!important;
  right:3rem!important;
  bottom:clamp(.8rem,1.15vw,1rem)!important;
  margin:0!important;
  padding:0!important;
  text-align:left!important;
  font-size:clamp(10px,.72vw,12px)!important;
  line-height:1.2!important;
  font-weight:300!important;
  opacity:.82!important;
  color:#fff!important;
}

/* Plus: lower right */
.mnhs-track .mngs-ig-card__plus,
.mnhs-track .mntg-card__plus{
  position:absolute!important;
  right:clamp(.8rem,1.3vw,1.15rem)!important;
  bottom:clamp(.7rem,1.05vw,.95rem)!important;
  left:auto!important;
  top:auto!important;
  margin:0!important;
  padding:0!important;
  font-size:1.7rem!important;
  line-height:1!important;
  font-weight:400!important;
  color:#fff!important;
  text-shadow:none!important;
  box-shadow:none!important;
  opacity:1!important;
}

/* Reveal */
.mnhs-track > *:hover .mnhs-card-overlay,
.mnhs-track > *:focus-within .mnhs-card-overlay,
.mnhs-track > *:hover .mngs-ig-card__overlay,
.mnhs-track > *:focus-within .mngs-ig-card__overlay,
.mnhs-track > *:hover .mntg-card__overlay,
.mnhs-track > *:focus-within .mntg-card__overlay{
  opacity:1!important;
  visibility:visible!important;
}

/* No permanent overlay on touch */
@media(hover:none){
  .mnhs-card-overlay,
  .mnhs-track .mngs-ig-card__overlay,
  .mnhs-track .mntg-card__overlay{
    opacity:0!important;
    visibility:hidden!important;
  }
}


/* 1.0.29 — Desktop Home rows fill the existing page frame exactly:
   1 fixed card + 3 visible slider cards + 3 equal gaps = 100% */
@media(min-width:781px){
  .mnhs-row{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:var(--mnhs-gap-x)!important;
    width:100%!important;
  }

  .mnhs-fixed-card{
    grid-column:1!important;
    width:100%!important;
    min-width:0!important;
  }

  .mnhs-slider-shell{
    grid-column:2 / span 3!important;
    width:100%!important;
    min-width:0!important;
  }

  .mnhs-track > .mngs-ig-card,
  .mnhs-track > .mntg-card,
  .mnhs-track > article{
    flex:0 0 calc((100% - (2 * var(--mnhs-gap-x))) / 3)!important;
    width:calc((100% - (2 * var(--mnhs-gap-x))) / 3)!important;
    max-width:calc((100% - (2 * var(--mnhs-gap-x))) / 3)!important;
  }
}

/* Mobile type must come after the shared overlay rules above. */
@media(max-width:780px){
  .mnhs-track .mngs-ig-card__title,
  .mnhs-track .mntg-card__title,
  .mnhs-card-overlay__text{
    font-size:clamp(13px,3.6vw,15px)!important;
  }
  .mnhs-track .mngs-ig-card__meta,
  .mnhs-track .mntg-card__meta,
  .mnhs-track .mngs-ig-card__cats{
    font-size:clamp(11px,3vw,12px)!important;
  }
  .mnhs-track .mngs-ig-card__plus,
  .mnhs-track .mntg-card__plus{
    font-size:1.65rem!important;
  }
}

/* 1.0.47: page/frame layout is owned by MNARCH + MONUMENS Setup. */

/* 1.1.5: Always-visible carousel arrows on both MNARCH + MONUMENS.
   The clickable areas remain unchanged. No painted rectangles, and
   strong two-tone glyph contrast over light AND dark gallery photos.
   Specificity also wins over Site Colors palette's generic arrow rules. */
.mnhs-home .mnhs-slider-shell > button.mnhs-arrow,
body.mnms-palette-active .mnhs-home .mnhs-slider-shell > button.mnhs-arrow {
  display:block!important;
  opacity:1!important;
  visibility:visible!important;
  background:transparent!important;
  background-color:transparent!important;
  border:0!important;
  box-shadow:none!important;
  color:#fff!important;
  text-shadow:none!important;
  -webkit-text-stroke:0!important;
  filter:none!important;
  opacity:1!important;
  pointer-events:auto!important;
}
.mnhs-home .mnhs-slider-shell > button.mnhs-arrow:is(:hover,:focus,:active),
body.mnms-palette-active .mnhs-home .mnhs-slider-shell > button.mnhs-arrow:is(:hover,:focus,:active) {
  opacity:1!important;
  background:transparent!important;
  color:#fff!important;
}
/* A visible focus indicator is preserved for keyboard navigation. */
.mnhs-home .mnhs-slider-shell > button.mnhs-arrow:focus-visible {
  outline:2px solid currentColor!important;
  outline-offset:2px!important;
}

/* 1.1.8: fixed category cards do not draw a browser focus frame after click. */
.mnhs-fixed-card__link:focus,
.mnhs-fixed-card__link:focus-visible,
.mnhs-fixed-card__link:active{
  outline:none!important;
  box-shadow:none!important;
}

/* 1.1.11 — mobile category flap. Open on load; swipe collapses; card tap toggles.
   The + remains the only navigation link. Desktop remains unchanged. */
@media(max-width:780px){
  /* OPEN is the default mobile state, so there is no closed flash on load. */
  .mnhs-row{
    --mnhs-mobile-flap:clamp(48px,12vw,58px);
    grid-template-columns:var(--mnhs-mobile-card,calc((100% - var(--mnhs-gap-x))/2)) minmax(0,1fr)!important;
    transition:grid-template-columns .18s ease;
    align-items:start;
  }
  .mnhs-fixed-card{
    width:100%!important;
    aspect-ratio:1/1!important;
    min-width:0!important;
    overflow:hidden;
  }
  .mnhs-fixed-card__link{
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    padding:10%!important;
    justify-content:center!important;
    overflow:hidden;
    cursor:pointer;
  }
  .mnhs-fixed-card__title{
    writing-mode:horizontal-tb;
    transform:none;
    white-space:normal;
    font-size:clamp(13px,4.4vw,20px)!important;
  }
  .mnhs-fixed-card__text{display:block!important;}
  .mnhs-fixed-card__plus{
    right:8px!important;
    bottom:6px!important;
    transform:none!important;
    font-size:26px!important;
    color:#fff!important;
    opacity:1!important;
    text-shadow:none!important;
    filter:none!important;
  }

  /* COLLAPSED after horizontal swipe or a deliberate tap. */
  .mnhs-row.mnhs-fixed-collapsed{
    grid-template-columns:var(--mnhs-mobile-flap) minmax(0,1fr)!important;
  }
  .mnhs-row.mnhs-fixed-collapsed .mnhs-fixed-card{
    height:var(--mnhs-mobile-card,auto)!important;
    aspect-ratio:auto!important;
  }
  .mnhs-row.mnhs-fixed-collapsed .mnhs-fixed-card__link{
    padding:8px 4px!important;
  }
  .mnhs-row.mnhs-fixed-collapsed .mnhs-fixed-card__title{
    writing-mode:vertical-rl;
    transform:rotate(180deg);
    white-space:nowrap;
    font-size:clamp(12px,3.4vw,15px)!important;
    letter-spacing:.01em;
  }
  .mnhs-row.mnhs-fixed-collapsed .mnhs-fixed-card__text{display:none!important;}
  .mnhs-row.mnhs-fixed-collapsed .mnhs-fixed-card__plus{
    right:50%!important;
    bottom:7px!important;
    transform:translateX(50%)!important;
  }
}
