/* JeanCarr Gallery Portfolio 1.5.1 — restrained exhibition layout. */
/* Theme elements that duplicate the gallery's own title/imagery. */
body.single-gallery .wp-block-post-featured-image,
body.single-gallery .post-thumbnail,
body.single-gallery .wp-block-post-title,
body.single-gallery .wp-block-post-author,
body.single-gallery .wp-block-post-author-name,
body.single-gallery .wp-block-post-terms,
body.single-gallery .wp-block-post-date,
body.single-gallery .wp-block-comments,
body.single-gallery .comments-area,
body.single-gallery #comments,
body.single-gallery .wp-block-post-navigation-link,
body.single-gallery .wp-block-post-navigation-links { display:none!important; }
body.single-gallery .wp-block-post-content:has(.jcg-gallery-editorial),
body.single-gallery .entry-content:has(.jcg-gallery-editorial){max-width:none!important;width:100%!important;}
/* Remove the large gap from theme wrappers around the gallery content. */
body.single-gallery :is(main,.wp-site-blocks) .wp-block-group:has(> .wp-block-post-content > .jcg-gallery-editorial){padding-top:0!important;margin-top:0!important;}
body.single-gallery .wp-block-post-content:has(.jcg-gallery-editorial){margin-block-start:0!important;padding-block-start:0!important;}
body.single-gallery .jcg-gallery-editorial{--jc-ink:#252923;max-width:1360px;width:calc(100% - 56px);margin:0 auto;padding:12px 0 95px;color:var(--jc-ink);font-family:Georgia,serif;box-sizing:border-box;}
body.single-gallery .jcg-gallery-editorial *{box-sizing:border-box;}
body.single-gallery .jcg-gallery-opening{position:relative;max-width:850px;text-align:center;margin:0 auto 50px;padding:0 15px;}
body.single-gallery .jcg-gallery-back{display:block;text-align:left;font:12px/1.5 Arial,sans-serif;color:#596451;text-decoration:none;max-width:max-content;border-bottom:1px solid #899584;padding-bottom:4px;margin:0 0 44px;}
body.single-gallery .jcg-gallery-kicker{font:600 10px/1.7 Arial,sans-serif;color:#65735e;letter-spacing:2.2px;text-transform:uppercase;margin:0 0 15px;}
body.single-gallery .jcg-gallery-kicker span{margin:0 6px;color:#b5baaf;}
body.single-gallery h1.jcg-gallery-title{font:400 clamp(42px,5.3vw,74px)/1.12 Georgia,serif;letter-spacing:-.035em;color:#252923;margin:0 0 15px;}
body.single-gallery .jcg-gallery-count{font:11px Arial,sans-serif;color:#84877f;letter-spacing:.1em;text-transform:uppercase;margin:0;}
body.single-gallery .jcg-gallery-prose{font:17px/1.8 Georgia,serif;color:#65695f;margin:25px auto 0;max-width:640px;}
body.single-gallery .jcg-gallery-prose p{margin:0 0 15px;}
body.single-gallery .jcg-detail--exhibition{max-width:none;width:100%;margin:0 auto 40px;}
body.single-gallery .jcg-exhibit-photo{margin:0!important;min-width:0;break-inside:avoid;page-break-inside:avoid;}
body.single-gallery .jcg-exhibit-photo .jcg-lightbox-link{display:block!important;width:100%;height:auto!important;min-height:0!important;aspect-ratio:auto!important;overflow:visible;background:transparent!important;line-height:0;}
body.single-gallery .jcg-exhibit-photo img{display:block!important;width:100%!important;height:auto!important;max-width:100%!important;max-height:none!important;aspect-ratio:auto!important;object-fit:contain!important;position:static!important;margin:0!important;}
body.single-gallery .jcg-exhibit-lead{max-width:1100px;margin:0 auto 55px;}
body.single-gallery .jcg-exhibit-lead img{max-height:740px!important;width:auto!important;max-width:100%!important;margin-left:auto!important;margin-right:auto!important;}
body.single-gallery .jcg-exhibit-photo figcaption{font:12px/1.6 Arial,sans-serif;color:#777970;padding:10px 0 0;text-align:left;}
body.single-gallery .jcg-exhibit-masonry{columns:2;column-gap:28px;}
body.single-gallery .jcg-exhibit-masonry .jcg-exhibit-photo{display:inline-block;width:100%;margin:0 0 36px!important;vertical-align:top;}
body.single-gallery .jcg-exhibit-photo a:hover img{opacity:.94;}
body.single-gallery .jcg-gallery-end{border-top:1px solid #e4e4df;padding-top:35px;margin-top:75px;display:flex;flex-wrap:wrap;gap:20px 32px;align-items:center;justify-content:space-between;font:12px/1.5 Arial,sans-serif;letter-spacing:.045em;}
body.single-gallery .jcg-gallery-end a{color:#41483d;text-decoration:none;border-bottom:1px solid #9aa394;padding-bottom:5px;}
body.single-gallery .jcg-gallery-end .jcg-gallery-all{font-weight:bold;}
@media(max-width:760px){body.single-gallery .jcg-gallery-editorial{width:calc(100% - 32px);padding-top:0;}body.single-gallery .jcg-gallery-back{margin-bottom:30px;}body.single-gallery .jcg-gallery-opening{margin-bottom:35px;}body.single-gallery .jcg-exhibit-lead{margin-bottom:32px;}body.single-gallery .jcg-exhibit-masonry{columns:1;}body.single-gallery .jcg-exhibit-masonry .jcg-exhibit-photo{margin-bottom:28px!important;}}
@media(prefers-reduced-motion:reduce){body.single-gallery .jcg-exhibit-photo img{transition:none;}}


/* v1.5.2 — continuous photographic tapestry, no isolated lead or masonry columns.
   Scoped to single gallery pages to keep homepage and gallery index intact. */
body.single-gallery .jcg-gallery-editorial .jcg-detail--exhibition {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 auto 28px !important;
  padding: 0 !important;
}
body.single-gallery .jcg-gallery-editorial .jcg-exhibit-tapestry {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  grid-auto-rows: 320px !important;
  grid-auto-flow: row dense !important;
  gap: 10px !important;
  align-items: stretch !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}
body.single-gallery .jcg-exhibit-tapestry > figure.jcg-exhibit-photo {
  grid-column: span 3;
  position: relative !important;
  display: block !important;
  width: auto !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: #eee !important;
}
body.single-gallery .jcg-exhibit-tapestry > figure.jcg-exhibit-photo:nth-child(4n + 1),
body.single-gallery .jcg-exhibit-tapestry > figure.jcg-exhibit-photo:nth-child(4n + 4) {grid-column: span 4;}
body.single-gallery .jcg-exhibit-tapestry > figure.jcg-exhibit-photo:nth-child(4n + 2),
body.single-gallery .jcg-exhibit-tapestry > figure.jcg-exhibit-photo:nth-child(4n + 3) {grid-column: span 2;}
body.single-gallery .jcg-exhibit-tapestry .jcg-lightbox-link {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
  background: transparent !important;
  line-height: 0 !important;
}
body.single-gallery .jcg-exhibit-tapestry .jcg-exhibit-photo img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center !important;
  aspect-ratio: auto !important;
  transition: transform .35s ease !important;
}
body.single-gallery .jcg-exhibit-tapestry a:hover img {transform: scale(1.025);}
body.single-gallery .jcg-exhibit-tapestry figcaption {
  position: absolute !important;
  left: 0; right: 0; bottom: 0;
  padding: 25px 15px 12px !important;
  margin: 0 !important;
  color: #fff !important;
  background: linear-gradient(transparent,rgba(0,0,0,.58));
  font: 12px/1.45 Arial,sans-serif !important;
  pointer-events: none;
}
body.single-gallery .jcg-gallery-opening {margin-bottom: 28px !important;}
body.single-gallery .jcg-gallery-editorial {padding-bottom: 55px !important;}
@media (max-width: 950px) {
  body.single-gallery .jcg-gallery-editorial .jcg-exhibit-tapestry {grid-auto-rows: 255px !important; gap: 8px !important;}
}
@media (max-width: 600px) {
  body.single-gallery .jcg-gallery-editorial .jcg-exhibit-tapestry {
    grid-template-columns: repeat(2, minmax(0,1fr)) !important;
    grid-auto-rows: 195px !important;
    gap: 6px !important;
  }
  body.single-gallery .jcg-exhibit-tapestry > figure.jcg-exhibit-photo {grid-column: span 1 !important;}
  body.single-gallery .jcg-exhibit-tapestry > figure.jcg-exhibit-photo:first-child {grid-column: span 2 !important; grid-row: span 2;}
  body.single-gallery .jcg-gallery-opening {margin-bottom: 22px !important;}
}
@media (prefers-reduced-motion: reduce) {
  body.single-gallery .jcg-exhibit-tapestry img {transition: none !important;}
}
