/* PROTECTED: user-approved gallery. Keep isolated from hotel/template styles. */
.jt-sacred-gallery { margin: 56px 0 28px; }
.jt-sacred-gallery .jt-sacred-tag { display:block; margin-bottom:10px; font-size:13px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:#004cc9; }
.jt-sacred-gallery h2 { font-size:clamp(26px,3.4vw,40px); font-weight:800; line-height:1.15; letter-spacing:-.02em; margin:0 0 12px; color:#111214; }
.jt-sacred-gallery p { font-size:15.5px; color:#53627a; line-height:1.7; margin:0 0 28px; }
.jt-sacred-gallery .jt-sacred-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; }
.jt-sacred-gallery .jt-sacred-photo { display:block; padding:0; border:0; height:200px; width:100%; border-radius:14px; overflow:hidden; background:#edf2f8; cursor:pointer; }
.jt-sacred-gallery .jt-sacred-photo img { display:block; width:100%; height:100%; object-fit:cover; filter:none; opacity:1; }
.jt-sacred-gallery button:focus-visible { outline:3px solid #004cc9; outline-offset:3px; }
.jt-sacred-dialog { position:fixed; inset:0; margin:auto; border:0; padding:50px 55px; border-radius:14px; background:#111827; color:#fff; width:min(1100px,96vw); max-height:94dvh; }
.jt-sacred-dialog::backdrop { background:rgba(0,0,0,.85); }
.jt-sacred-dialog figure { margin:0; text-align:center; }
.jt-sacred-dialog figure img { display:block; width:100%; height:70dvh; object-fit:contain; }
.jt-sacred-dialog figcaption { margin-top:12px; font-size:14px; }
.jt-sacred-dialog button { position:absolute; border:0; border-radius:50%; background:#fff; color:#111; width:42px; height:42px; font-size:30px; cursor:pointer; display:grid; place-items:center; padding:0; }
.jt-sacred-dialog [data-action=close] { top:8px; right:8px; }
.jt-sacred-dialog [data-action=prev] { top:50%; left:7px; }
.jt-sacred-dialog [data-action=next] { top:50%; right:7px; }
@media(max-width:1024px) { .jt-sacred-gallery .jt-sacred-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) { .jt-sacred-gallery .jt-sacred-grid { gap:10px; } .jt-sacred-gallery .jt-sacred-photo { height:150px; } .jt-sacred-dialog { padding:54px 8px 65px; } .jt-sacred-dialog figure img { height:60dvh; } .jt-sacred-dialog [data-action=prev], .jt-sacred-dialog [data-action=next] { top:auto; bottom:10px; } }
/* Eight eligible destination images keep the approved 4/2-column mosaic; short collections adapt. */
.jt-sacred-gallery .jt-sacred-destinations[data-photo-count="1"] { grid-template-columns:1fr; }
.jt-sacred-gallery .jt-sacred-destinations[data-photo-count="2"] { grid-template-columns:repeat(2,minmax(0,1fr)); }
.jt-sacred-gallery .jt-sacred-destinations[data-photo-count="3"] { grid-template-columns:repeat(3,minmax(0,1fr)); }
.jt-sacred-gallery .jt-sacred-destinations .jt-sacred-photo { position:relative; }
.jt-sacred-gallery .jt-sacred-photo-caption { position:absolute; inset:auto 0 0; padding:28px 14px 12px; background:linear-gradient(transparent,rgba(9,22,42,.85)); color:#fff; text-align:left; font-size:14px; line-height:1.4; font-weight:600; }
.jt-sacred-gallery .jt-sacred-credits { color:#53627a; font-size:13px; line-height:1.7; margin-top:16px; }
.jt-sacred-gallery .jt-sacred-credits summary { cursor:pointer; width:fit-content; }
.jt-sacred-gallery .jt-sacred-credits a { color:#004cc9; text-decoration:underline; }
.jt-sacred-gallery .jt-sacred-credits li { margin:8px 0; overflow-wrap:anywhere; }
@media(max-width:1024px) { .jt-sacred-gallery .jt-sacred-destinations[data-photo-count="3"] { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) { .jt-sacred-gallery .jt-sacred-photo-caption { font-size:12px; padding:24px 10px 9px; } }

/* Complete a short second or third row without blank cells or unrelated filler imagery. */
.jt-sacred-gallery .jt-sacred-destinations[data-photo-count="5"] > :last-child { grid-column:1 / -1; }
.jt-sacred-gallery .jt-sacred-destinations[data-photo-count="6"] > :nth-child(n+5) { grid-column:span 2; }
.jt-sacred-gallery .jt-sacred-destinations[data-photo-count="7"] > :last-child { grid-column:span 2; }
.jt-sacred-gallery .jt-sacred-destinations[data-photo-count="9"] > :last-child { grid-column:1 / -1; }
.jt-sacred-gallery .jt-sacred-destinations[data-photo-count="10"] > :nth-child(n+9) { grid-column:span 2; }
.jt-sacred-gallery .jt-sacred-destinations[data-photo-count="11"] > :last-child { grid-column:span 2; }
@media(max-width:1024px) {
  .jt-sacred-gallery .jt-sacred-destinations[data-photo-count="6"] > :nth-child(n+5),
  .jt-sacred-gallery .jt-sacred-destinations[data-photo-count="10"] > :nth-child(n+9) { grid-column:auto; }
}
