/* Front-end editorial story blocks */
.mpp-story-row {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, .92fr);
  gap: clamp(26px, 6vw, 90px);
  align-items: center;
  max-width: 1300px;
  margin: clamp(55px, 8vw, 115px) auto;
}
.mpp-story-row--image-right { grid-template-columns: minmax(280px, .92fr) minmax(0, 1.08fr); }
.mpp-story-row--image-right .mpp-story-row__media { order: 2; }
.mpp-story-row__media { min-width:0; background:transparent; }
.mpp-story-row__media .mpp-story-row__image { display:block; width:100%; height:auto; max-height:760px; object-fit:contain; background:transparent; }
.mpp-story-row__media--fixed { overflow:hidden; }
.mpp-story-row__media--fixed .mpp-story-row__image { width:100%; height:100%; max-height:none; }
.mpp-story-row__media .mpp-story-row__image--ratio-4-5 { aspect-ratio:4 / 5; }
.mpp-story-row__media .mpp-story-row__image--ratio-3-2 { aspect-ratio:3 / 2; }
.mpp-story-row__media .mpp-story-row__image--ratio-16-9 { aspect-ratio:16 / 9; }
.mpp-story-row__media .mpp-story-row__image--ratio-1-1 { aspect-ratio:1 / 1; }
.mpp-story-row__media .mpp-story-row__image--fit-cover { object-fit:cover; }
.mpp-story-row__media .mpp-story-row__image--fit-contain { object-fit:contain; }
.mpp-story-row__placeholder { min-height:420px; display:grid; place-items:center; background:#f2f2f0; color:#888; }
.mpp-story-row__copy { padding:clamp(0px, 3vw, 35px); }
.mpp-story-row__eyebrow { margin:0 0 18px; color:#888; font:500 10px/1.4 'DM Sans',sans-serif; letter-spacing:.14em; text-transform:uppercase; }
.mpp-story-row__heading { margin:0 0 22px; color:#151515; font:750 clamp(25px,3.5vw,44px)/1.02 'Inter',sans-serif; letter-spacing:-.06em; }
.mpp-story-row__text { color:#555; font:400 15px/1.78 'DM Sans',sans-serif; letter-spacing:-.012em; }
.mpp-story-row__text p { margin:0 0 1em; }

/* Large image carousel */
.mpp-carousel { max-width:1420px; margin:clamp(60px,9vw,130px) auto; }
.mpp-carousel__heading { display:flex; justify-content:space-between; align-items:end; gap:20px; margin:0 0 20px; }
.mpp-carousel__heading h2 { margin:0; color:#151515; font:750 clamp(22px,3vw,34px)/1.05 'Inter',sans-serif; letter-spacing:-.055em; }
.mpp-carousel__heading p { margin:0; color:#888; font:500 10px/1.4 'DM Sans',sans-serif; letter-spacing:.12em; text-transform:uppercase; }
.mpp-carousel__layout { position:relative; display:grid; grid-template-columns:82px minmax(0,1fr) 82px; align-items:center; gap:0; }
.mpp-carousel__viewport { position:relative; min-width:0; max-height:90vh; max-height:90svh; overflow:hidden; background:transparent; touch-action:pan-y; display:flex; align-items:center; justify-content:center; }
.mpp-carousel__slide { display:none; position:relative; inset:auto; width:100%; max-height:90vh; max-height:90svh; margin:0; align-items:center; justify-content:center; }
.mpp-carousel__slide.is-active { display:flex; }
.mpp-carousel__image { display:block; width:auto; height:auto; max-width:100%; max-height:90vh; max-height:90svh; object-fit:contain; background:transparent; }
.mpp-carousel__image-caption { position:absolute; left:16px; bottom:14px; max-width:calc(100% - 32px); padding:7px 10px; background:rgba(255,255,255,.9); color:#333; font:500 11px/1.4 'DM Sans',sans-serif; }
.mpp-carousel .mpp-carousel__arrow { appearance:none; justify-self:center; width:48px; height:48px; padding:0; border:1px solid #151515; border-radius:50%; background:#fff; color:#151515; font:400 25px/1 Inter,sans-serif; display:grid; place-items:center; cursor:pointer; transition:background .22s ease,border-color .22s ease,color .22s ease,transform .22s ease; }
.mpp-carousel .mpp-carousel__arrow[data-mpp-prev] { justify-self:end; margin-right:16px; }
.mpp-carousel .mpp-carousel__arrow[data-mpp-next] { justify-self:start; margin-left:16px; }
.mpp-carousel .mpp-carousel__arrow:hover,
.mpp-carousel .mpp-carousel__arrow:active { background:#151515; border-color:#151515; color:#fff; transform:scale(1.06); }
.mpp-carousel .mpp-carousel__arrow:focus-visible { background:#151515; border-color:#151515; color:#fff; outline:2px solid #151515; outline-offset:4px; }
.mpp-carousel__arrow:focus-visible,.mpp-carousel__viewport:focus-visible { outline:2px solid #111; outline-offset:4px; }
.mpp-carousel__footer { display:flex; justify-content:space-between; align-items:center; gap:20px; margin-top:14px; }
.mpp-carousel__dots { display:flex; align-items:center; gap:7px; }
.mpp-carousel__dot { width:5px; height:5px; padding:0; border:0; border-radius:99px; background:#d2d2d2; cursor:pointer; transition:width .25s ease,background .25s ease; }
.mpp-carousel__dot.is-active { width:22px; background:#161616; }
.mpp-carousel__dot:focus-visible { outline:2px solid #111; outline-offset:4px; }
.mpp-carousel__counter { margin:0; color:#888; font:500 10px/1.4 'DM Sans',sans-serif; letter-spacing:.1em; }
.mpp-carousel__counter strong { color:#333; }

/* Gutenberg editor previews */
.mpp-editor-story-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:24px; align-items:center; padding:12px 0; border:0; background:transparent; }
.mpp-editor-story-row.is-selected { outline:2px solid var(--wp-admin-theme-color, #3858e9); outline-offset:8px; }
.mpp-editor-story-row.is-reversed .mpp-editor-story-row__media { order:2; }
.mpp-editor-story-row__media { min-width:0; background:transparent; }
.mpp-editor-story-row__media-frame { width:100%; background:transparent; }
.mpp-editor-story-row__media-frame img { display:block; width:100%; height:auto; max-height:760px; object-fit:contain; background:transparent; margin-bottom:10px; }
.mpp-editor-story-row__media-frame.is-fixed { overflow:hidden; }
.mpp-editor-story-row__media-frame.is-fixed img { width:100%; height:100%; max-height:none; margin-bottom:0; }
.mpp-editor-story-row__copy .components-base-control { margin-bottom:12px; }
.mpp-editor-story-row__heading { font-size:28px; line-height:1.05; letter-spacing:-.04em; }
.mpp-editor-story-row__text { font-size:15px; line-height:1.6; }
.mpp-editor-placeholder { min-height:230px; display:grid; place-items:center; background:#f2f2f0; color:#777; margin-bottom:10px; }
.mpp-editor-placeholder--wide { min-height:170px; }
.mpp-editor-slideshow { padding:12px 0; border:0; background:transparent; }
.mpp-editor-slideshow.is-selected { outline:2px solid var(--wp-admin-theme-color, #3858e9); outline-offset:8px; }
.mpp-editor-slideshow__top { display:flex; align-items:flex-end; justify-content:space-between; gap:24px; }
.mpp-editor-slideshow__preview { margin-top:16px; }
.mpp-editor-slideshow__main img { display:block; width:100%; height:auto; max-height:360px; object-fit:contain; background:transparent; }
.mpp-editor-slideshow__thumbs { display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }
.mpp-editor-slideshow__thumbs img { width:70px; height:70px; object-fit:cover; }

@media (max-width:800px) {
  .mpp-story-row,.mpp-story-row--image-right { grid-template-columns:1fr; gap:22px; }
  .mpp-story-row--image-right .mpp-story-row__media { order:0; }
  .mpp-story-row__copy { padding:0; }
  .mpp-carousel__layout { grid-template-columns:66px minmax(0,1fr) 66px; gap:0; }
  .mpp-carousel .mpp-carousel__arrow { width:40px; height:40px; }
  .mpp-carousel .mpp-carousel__arrow[data-mpp-prev] { margin-right:13px; }
  .mpp-carousel .mpp-carousel__arrow[data-mpp-next] { margin-left:13px; }
}
@media (max-width:560px) {
  .mpp-carousel__heading { display:block; }
  .mpp-carousel__heading p { margin-top:7px; }
  .mpp-carousel__layout {
    grid-template-columns:1fr;
    width:100vw;
    margin-left:calc(50% - 50vw);
    margin-right:calc(50% - 50vw);
    gap:0;
  }
  .mpp-carousel .mpp-carousel__arrow { position:absolute; z-index:2; top:50%; justify-self:auto; transform:translateY(-50%); }
  .mpp-carousel .mpp-carousel__arrow:hover,
  .mpp-carousel .mpp-carousel__arrow:active { transform:translateY(-50%) scale(1.05); }
  .mpp-carousel .mpp-carousel__arrow:focus-visible { transform:translateY(-50%); }
  .mpp-carousel .mpp-carousel__arrow[data-mpp-prev] { left:16px; margin:0; }
  .mpp-carousel .mpp-carousel__arrow[data-mpp-next] { right:16px; margin:0; }
  .mpp-carousel__viewport { grid-column:1; width:100%; max-height:calc(100vh - 150px); max-height:calc(100svh - 150px); }
  .mpp-carousel__slide { width:100%; max-height:calc(100vh - 150px); max-height:calc(100svh - 150px); }
  .mpp-carousel__image { max-width:100vw; max-height:calc(100vh - 150px); max-height:calc(100svh - 150px); }
  .mpp-editor-story-row { grid-template-columns:1fr; }
  .mpp-editor-story-row.is-reversed .mpp-editor-story-row__media { order:0; }
  .mpp-editor-slideshow__top { display:block; }
}

/* Slideshow sizing: leave room for the sticky header and gallery controls. */
:root {
  --mpp-carousel-header-height: 88px;
  --mpp-carousel-control-space: 140px;
}
.mpp-carousel__viewport,
.mpp-carousel__slide,
.mpp-carousel__image {
  max-height: min(72vh, calc(100vh - var(--mpp-carousel-header-height) - var(--mpp-carousel-control-space)));
  max-height: min(72svh, calc(100svh - var(--mpp-carousel-header-height) - var(--mpp-carousel-control-space)));
}
.mpp-carousel__slide { min-height: 0; }
.mpp-carousel__image { width:auto; height:auto; max-width:100%; object-fit:contain; }
/* The theme gives all article figures generous editorial margins. Do not apply those to carousel slides. */
.mpt-content .mpp-carousel__slide { margin:0; }
.mpp-carousel { scroll-margin-top:calc(var(--mpp-carousel-header-height) + 18px); }

/* Navigation variant: centered dots, with no numeric counter. */
.mpp-carousel__footer--dots { justify-content:center; }
.mpp-carousel__footer--dots .mpp-carousel__dots { justify-content:center; width:100%; }
.mpp-carousel__footer--dots .mpp-carousel__counter { display:none; }

/* Navigation variant: clickable image thumbnails below the main photograph. */
.mpp-carousel__footer--thumbnails { justify-content:center; width:100%; }
.mpp-carousel__thumbs {
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:9px;
  width:100%;
  max-width:100%;
  overflow-x:auto;
  overscroll-behavior-x:contain;
  padding:5px 3px 9px;
  scrollbar-width:thin;
  scrollbar-color:#c9c9c9 transparent;
}
.mpp-carousel__thumb {
  display:block;
  flex:0 0 clamp(66px, 8vw, 104px);
  width:clamp(66px, 8vw, 104px);
  aspect-ratio:3 / 2;
  padding:0;
  overflow:hidden;
  border:2px solid transparent;
  border-radius:2px;
  background:#f1f1ef;
  opacity:.58;
  cursor:pointer;
  transition:opacity .2s ease,border-color .2s ease,transform .2s ease;
}
.mpp-carousel__thumbs.is-centered { justify-content:center; }
.mpp-carousel__thumb:hover { opacity:.88; transform:translateY(-2px); }
.mpp-carousel__thumb.is-active { opacity:1; border-color:#151515; }
.mpp-carousel__thumb:focus-visible { outline:2px solid #151515; outline-offset:3px; }
.mpp-carousel__thumb-image { display:block; width:100%; height:100%; object-fit:cover; }

/* Gutenberg preview mirrors the selected navigation mode. */
.mpp-editor-slideshow__dots { display:flex; justify-content:center; align-items:center; gap:7px; margin-top:14px; }
.mpp-editor-slideshow__dot { width:5px; height:5px; border-radius:99px; background:#d2d2d2; }
.mpp-editor-slideshow__dot.is-active { width:22px; background:#161616; }
.mpp-editor-slideshow__thumbs { justify-content:center; overflow-x:auto; flex-wrap:nowrap; }
.mpp-editor-slideshow__thumbs img { flex:0 0 78px; width:78px; height:52px; opacity:.75; }

@media (max-width:640px) {
  :root { --mpp-carousel-header-height: 104px; --mpp-carousel-control-space: 116px; }
}
@media (max-width:560px) {
  .mpp-carousel__viewport,
  .mpp-carousel__slide,
  .mpp-carousel__image {
    max-height:min(74vh, calc(100vh - var(--mpp-carousel-header-height) - var(--mpp-carousel-control-space)));
    max-height:min(74svh, calc(100svh - var(--mpp-carousel-header-height) - var(--mpp-carousel-control-space)));
  }
  .mpp-carousel__footer--thumbnails { padding-left:12px; padding-right:12px; }
  .mpp-carousel__thumbs { justify-content:flex-start; gap:7px; }
  .mpp-carousel__thumb { flex-basis:70px; width:70px; }
}
