/* The existing text link still opens the project. Its sibling opens the photos. */
.mtkp-gallery-tile { min-width: 0; }
.page-id-23 .mtkp-featured-projects .mtkp-gallery-tile a.mtkp-project-card { height: auto; }
.mtkp-gallery-cover {
  display: block; position: relative; width: 100%; padding: 0; margin: 0;
  border: 0; border-radius: 5px; overflow: hidden; background: #e6e0d2;
  color: #203026; cursor: zoom-in; appearance: none;
}
.mtkp-gallery-cover > img {
  display: block; width: 100%; height: auto; aspect-ratio: 1.62;
  object-fit: cover; object-position: 50% 53%;
}
.mtkp-gallery-tile[data-project="sarasota"] .mtkp-gallery-cover > img { aspect-ratio: 1.025; object-position: 50% 14%; }
.mtkp-gallery-tile[data-project="cape"] .mtkp-gallery-cover > img { object-position: 49% 52%; }
.mtkp-gallery-cover:focus-visible { outline: 3px solid #704b74; outline-offset: 4px; }
@media (max-width: 700px) {
  .page-id-23 .mtkp-featured-projects--three .mtkp-gallery-tile:first-child { grid-column: 1 / -1; }
  .mtkp-gallery-cover > img { aspect-ratio: 1.32; }
  .page-id-23 .mtkp-featured-projects--three .mtkp-gallery-tile:first-child .mtkp-project-card-title {
    font-size: 23px; min-height: 0; line-height: 1.13;
  }
  .page-id-23 .mtkp-featured-projects--three .mtkp-gallery-tile:first-child .mtkp-project-card-copy {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}
html.mtkp-viewer-open { overflow: hidden; scrollbar-gutter: stable; }
dialog.mtkp-gallery-viewer {
  position: fixed; inset: 0; box-sizing: border-box; margin: auto; padding: 0;
  width: min(1120px, calc(100% - 48px)); max-width: none;
  height: min(940px, calc(100vh - 40px)); height: min(940px, calc(100dvh - 40px)); max-height: none;
  border: 1px solid #637266; border-radius: 8px; background: #19281e; color: #f8f3e8;
  overflow: hidden; overscroll-behavior: contain; color-scheme: dark;
  font-family: Arial, Helvetica, sans-serif;
}
.mtkp-gallery-viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.mtkp-gallery-viewer:not([open]), .mtkp-gallery-viewer [hidden] { display: none !important; }
.mtkp-gallery-viewer::backdrop { background: rgba(15, 24, 18, .83); }
.mtkp-gallery-viewer *, .mtkp-gallery-cover * { box-sizing: border-box; }
.mtkp-viewer-header {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 11px 18px; border-bottom: 1px solid #4c5d50;
}
.mtkp-gallery-viewer [data-gallery-city] { color: #e2dccb; font: 500 12px/1.25 Arial, sans-serif; }
.mtkp-gallery-viewer h2 {
  margin: 2px 0 0; padding: 0; color: #fff9ed; font: 400 clamp(20px, 2.1vw, 28px)/1.1 Georgia, serif;
  letter-spacing: -.02em; text-align: left;
}
.mtkp-gallery-viewer h2::after { display: none; }
.mtkp-gallery-viewer button {
  appearance: none; color: #fff9ed; background: transparent; border: 1px solid #829082; border-radius: 4px;
  padding: 0 12px; min-width: 44px; min-height: 44px; cursor: pointer; font: 500 14px/1.2 Arial, sans-serif;
}
.mtkp-gallery-viewer button:focus-visible, .mtkp-gallery-viewer a:focus-visible { outline: 3px solid #f4c981; outline-offset: 2px; }
.mtkp-gallery-viewer button:disabled { opacity: .34; cursor: default; }
.mtkp-gallery-viewer button:enabled:is(:hover, :active) { background-color: #2e4436; color: #fff9ed; }
.mtkp-viewer-stage {
  display: grid; place-items: center; height: 100%; min-width: 0; min-height: 0; overflow: hidden;
  background: #101b16; touch-action: pan-y pinch-zoom; user-select: none; -webkit-user-select: none;
}
.mtkp-gallery-viewer .mtkp-viewer-stage img {
  display: block; width: 100%; height: 100%; min-height: 0; max-height: 100%; max-width: 100%;
  object-fit: contain; border-radius: 0; pointer-events: none; -webkit-user-drag: none;
}
.mtkp-viewer-footer {
  display: grid; justify-items: stretch; gap: 7px; width: min(100%, 660px); margin: 0 auto;
  padding: 8px 15px max(12px, env(safe-area-inset-bottom));
}
.mtkp-viewer-sequence { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 9px; align-items: center; text-align: center; }
.mtkp-viewer-sequence > div { grid-column: 2; }
.mtkp-gallery-viewer [data-gallery-count] { display: block; color: #dfcfba; font: 600 11px/1.25 Arial, sans-serif; }
.mtkp-gallery-viewer [data-gallery-caption] { display: block; margin-top: 2px; color: #fff9ed; font: 400 17px/1.12 Georgia, serif; }
.mtkp-viewer-sequence button { display: grid; place-items: center; padding: 0; }
.mtkp-viewer-sequence svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.mtkp-viewer-thumbs { display: flex; gap: 4px; overflow-x: auto; padding: 3px; scrollbar-width: thin; }
.mtkp-viewer-thumbs button {
  flex: 1 0 38px; min-width: 0; min-height: 44px; border: 2px solid transparent; padding: 1px; line-height: 0;
}
.mtkp-viewer-thumbs img { width: 100%; height: 42px; display: block; object-fit: cover; border-radius: 1px; }
.mtkp-viewer-thumbs [aria-current="true"] { border-color: #e3bd79; }
.mtkp-gallery-viewer .mtkp-viewer-quote {
  display: flex; align-items: center; justify-content: center; min-height: 44px;
  color: #1b2a1f; background: #e6bf80; border-radius: 4px; text-decoration: none;
  font: 700 15px/1.2 Arial, sans-serif;
}
@media (max-width: 700px) {
  dialog.mtkp-gallery-viewer {
    width: 100%; height: 100vh; height: 100dvh; margin: 0; border: 0; border-radius: 0;
  }
  .mtkp-viewer-header { padding: max(9px, env(safe-area-inset-top)) 13px 8px; }
  .mtkp-viewer-footer { padding-inline: 12px; }
}
@media (orientation: landscape) and (max-height: 500px) {
  dialog.mtkp-gallery-viewer[open] {
    width: 100%; height: 100vh; height: 100dvh; border: 0; border-radius: 0;
    grid-template-columns: minmax(0, 1fr) minmax(200px, 33%); grid-template-rows: auto minmax(0, 1fr);
  }
  .mtkp-viewer-header { grid-column: 1 / -1; padding: 4px 12px; }
  .mtkp-viewer-footer { align-self: center; grid-column: 2; grid-row: 2; max-height: 100%; overflow: auto; }
  .mtkp-viewer-thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* The three project covers share a frame, including the unenhanced project links. */
.page-id-23 .mtkp-featured-projects.mtkp-featured-projects--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.page-id-23 .mtkp-featured-projects--three .mtkp-gallery-cover > img,
.page-id-23 .mtkp-featured-projects.mtkp-featured-projects--three a.mtkp-project-card[data-project] > img {
  aspect-ratio: 1.025;
}

.page-id-23 .mtkp-featured-projects--three [data-project="sarasota"] .mtkp-gallery-cover > img,
.page-id-23 .mtkp-featured-projects.mtkp-featured-projects--three a.mtkp-project-card[data-project="sarasota"] > img {
  object-position: 50% 14%;
}

@media (max-width: 700px) {
  .page-id-23 .mtkp-featured-projects.mtkp-featured-projects--three {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 18px;
  }
  .page-id-23 .mtkp-featured-projects.mtkp-featured-projects--three > .mtkp-gallery-tile,
  .page-id-23 .mtkp-featured-projects.mtkp-featured-projects--three > a.mtkp-project-card {
    display: grid;
    grid-column: 1;
    grid-template-columns: min(48%, 232px) minmax(0, 1fr);
    align-items: center;
    column-gap: 16px;
  }
  .page-id-23 .mtkp-featured-projects.mtkp-featured-projects--three .mtkp-gallery-tile .mtkp-project-card-copy,
  .page-id-23 .mtkp-featured-projects.mtkp-featured-projects--three a.mtkp-project-card[data-project] .mtkp-project-card-copy {
    grid-template-columns: minmax(0, 1fr);
    padding: 0;
    row-gap: 6px;
  }
  .page-id-23 .mtkp-featured-projects.mtkp-featured-projects--three .mtkp-gallery-tile .mtkp-project-card-title,
  .page-id-23 .mtkp-featured-projects.mtkp-featured-projects--three a.mtkp-project-card[data-project] .mtkp-project-card-title {
    font-size: 19px;
    line-height: 1.15;
    min-height: 0;
  }
}

/* Some older photo blocks contain a nested WordPress gallery with its own top margin. */
.page-id-23 .mtk-gallery-grid > .wp-block-gallery {
  margin: 0 !important;
}

.page-id-23 .mtk-gallery-grid .wp-block-image > .mtk-photo-open {
  display: block;
  width: 100%;
  aspect-ratio: 1;
}

.page-id-23 .mtk-gallery-grid .wp-block-image > .mtk-photo-open > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
}
