/* Z24 843: gallery lines always fill their row for 1, 2, 3, 4, 5 ... media items. */
.z24-lg{max-width:1200px;margin:36px auto 44px;padding:24px;border:1px solid #d8e5df;background:linear-gradient(145deg,#f7fcf9,#fff 54%);border-radius:20px;box-shadow:0 12px 34px rgba(9,50,39,.06)}
.z24-lg-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:18px}.z24-lg-head small{font-size:11px;letter-spacing:.14em;font-weight:800;color:#218165}.z24-lg-head h2{font-size:clamp(20px,2vw,27px);line-height:1.2;margin:5px 0 6px;color:#123c31}.z24-lg-head p{font-size:14px;color:#64756f;margin:0}.z24-lg-head>span{white-space:normal;overflow-wrap:anywhere;max-width:100%;text-align:center;flex-shrink:0;border-radius:50px;background:#e7f5eb;padding:7px 11px;color:#17634a;font-size:12px;font-weight:750}
/* Twelve virtual columns allow 3 equal tiles or 2 wider tiles. No blank last-row cells. */
.z24-lg-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:12px;align-items:stretch}
.z24-lg-grid>.z24-lg-tile{grid-column:span 4;aspect-ratio:3/2;appearance:none;display:block;position:relative;min-width:0;border:0;border-radius:13px;padding:0;overflow:hidden;background:#16372c;cursor:pointer;box-shadow:0 1px 8px #062a1814}
/* If the remainder is two, show two half-width photos on the last row. */
.z24-lg-grid[data-gallery-mod="2"]>.z24-lg-tile:nth-last-child(-n+2){grid-column:span 6;aspect-ratio:16/10}
/* If the remainder is one, arrange the last four into two complete rows of two. */
.z24-lg-grid[data-gallery-mod="1"]>.z24-lg-tile:nth-last-child(-n+4){grid-column:span 6;aspect-ratio:16/10}
.z24-lg-grid[data-gallery-count="1"]>.z24-lg-tile:only-child{grid-column:span 12;aspect-ratio:16/8}
.z24-lg-tile img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .22s ease}.z24-lg-tile:hover img{transform:scale(1.045)}.z24-lg-tile:focus-visible{outline:3px solid #18a779;outline-offset:3px}.z24-lg-video-thumb{display:flex;height:100%;flex-direction:column;align-items:center;justify-content:center;gap:12px;color:white;background:linear-gradient(125deg,#102b33,#205c51)}.z24-lg-video-thumb span{display:grid;place-items:center;width:66px;height:66px;background:#ffffff29;border:1px solid #ffffff75;border-radius:50%;font-size:28px}.z24-lg-video-thumb b{font-size:13px;font-weight:650}.z24-lg-tile-caption{position:absolute;inset:auto 0 0;padding:23px 13px 11px;text-align:left;color:white;font-weight:700;font-size:13px;background:linear-gradient(transparent,#03120ec4);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}
.z24-lg-dialog{position:fixed;inset:0;margin:auto;border:0;padding:0;width:min(960px,calc(100vw - 22px));max-width:none;max-height:calc(100dvh - 22px);background:#071711;color:white;border-radius:15px;box-shadow:0 20px 90px #0008;overflow:hidden}.z24-lg-dialog::backdrop{background:#000d;backdrop-filter:blur(3px)}.z24-lg-dialog-head{height:48px;padding:7px 14px;display:flex;align-items:center;justify-content:space-between;background:#13291e}.z24-lg-close{background:#ffffff20;border:0;border-radius:8px;color:white;width:34px;height:34px;cursor:pointer}.z24-lg-stage{display:grid;place-items:center;min-height:170px;height:min(69dvh,680px)}.z24-lg-stage img,.z24-lg-stage video{max-width:100%;max-height:100%;height:auto;width:auto;object-fit:contain}.z24-lg-stage video{width:100%;height:100%;background:#000}.z24-lg-dialog-footer{display:grid;grid-template-columns:44px 1fr 44px;align-items:center;gap:9px;padding:10px 14px;min-height:58px}.z24-lg-dialog-footer button{height:38px;border:1px solid #ffffff48;background:#ffffff18;color:white;border-radius:9px;cursor:pointer}.z24-lg-description{text-align:center;min-width:0;font-size:14px;line-height:1.3;margin:0;overflow-wrap:anywhere}
@media(min-width:641px) and (max-width:900px){
 .z24-lg-grid>.z24-lg-tile,.z24-lg-grid[data-gallery-mod="1"]>.z24-lg-tile:nth-last-child(-n+4),.z24-lg-grid[data-gallery-mod="2"]>.z24-lg-tile:nth-last-child(-n+2){grid-column:span 6;aspect-ratio:4/3}
 /* When count is odd, the final 3 are equal thirds: no orphan at the end. */
 .z24-lg-grid[data-gallery-parity="odd"]>.z24-lg-tile:nth-last-child(-n+3){grid-column:span 4;aspect-ratio:4/3}
 .z24-lg-grid[data-gallery-count="1"]>.z24-lg-tile:only-child{grid-column:span 12;aspect-ratio:16/9}
}
@media(max-width:640px){
 .z24-lg{margin:24px auto 28px;padding:15px 12px;border-radius:14px}
 .z24-lg-grid{gap:8px}
 .z24-lg-grid>.z24-lg-tile,.z24-lg-grid[data-gallery-mod="1"]>.z24-lg-tile:nth-last-child(-n+4),.z24-lg-grid[data-gallery-mod="2"]>.z24-lg-tile:nth-last-child(-n+2){grid-column:span 6;aspect-ratio:1/1}
 /* Odd counts: one feature image first, then rows of two. */
 .z24-lg-grid[data-gallery-parity="odd"]>.z24-lg-tile:first-child{grid-column:span 12;aspect-ratio:16/10}
 .z24-lg-head p{font-size:13px}.z24-lg-head{gap:10px;flex-wrap:wrap}.z24-lg-head>span{padding:6px 8px}
 .z24-lg-stage{height:70dvh}.z24-lg-dialog{width:calc(100vw - 10px);max-height:calc(100dvh - 10px)}
}
@media(prefers-reduced-motion:reduce){.z24-lg-tile img{transition:none}}

/* zvupd888: compact public-waterbody gallery, same tile packing and full-screen preview */
.wb-location-page .z24-lg{max-width:1000px;margin-top:25px;margin-bottom:29px;padding:20px}
.wb-location-page .z24-lg-head{margin-bottom:14px;gap:12px}
.wb-location-page .z24-lg-grid{gap:10px}
.wb-location-page .z24-lg-head small{font-size:12px;letter-spacing:.09em}
@media (max-width:640px){
  .wb-location-page .z24-lg{margin:18px auto 23px;padding:13px 11px}
  .wb-location-page .z24-lg-head{margin-bottom:11px}
  .wb-location-page .z24-lg-grid{gap:7px}
  .wb-location-page .z24-lg-grid>.z24-lg-tile,
  .wb-location-page .z24-lg-grid[data-gallery-mod="1"]>.z24-lg-tile:nth-last-child(-n+4),
  .wb-location-page .z24-lg-grid[data-gallery-mod="2"]>.z24-lg-tile:nth-last-child(-n+2){aspect-ratio:6/5}
  .wb-location-page .z24-lg-grid[data-gallery-parity="odd"]>.z24-lg-tile:first-child{aspect-ratio:2/1}
  .wb-location-page .z24-lg-head h2{font-size:20px}
  .wb-location-page .z24-lg-tile-caption{font-size:12px;padding:18px 10px 9px}
}

/* zvupd890: keep the gallery section full width; shrink only gallery THUMBNAILS.
   The four Greiciunu photos now fit in one centered row on desktop.
   The existing dialog/lightbox and hero image are intentionally untouched. */
.wb-location-page .z24-lg{max-width:1210px}
.wb-location-page .z24-lg-grid{display:flex;flex-wrap:wrap;justify-content:center;align-items:flex-start;gap:12px}
.wb-location-page .z24-lg-grid>.z24-lg-tile,
.wb-location-page .z24-lg-grid[data-gallery-mod="1"]>.z24-lg-tile:nth-last-child(-n+4),
.wb-location-page .z24-lg-grid[data-gallery-mod="2"]>.z24-lg-tile:nth-last-child(-n+2),
.wb-location-page .z24-lg-grid[data-gallery-count="1"]>.z24-lg-tile:only-child,
.wb-location-page .z24-lg-grid[data-gallery-parity="odd"]>.z24-lg-tile:first-child{
  flex:0 1 270px;
  width:min(270px,100%);
  max-width:270px;
  aspect-ratio:3/2;
}
/* Keep all 4 Greiciunu thumbnails on one row when desktop is narrower. */
@media(min-width:901px){
  .wb-location-page .z24-lg-grid>.z24-lg-tile,
  .wb-location-page .z24-lg-grid[data-gallery-mod="1"]>.z24-lg-tile:nth-last-child(-n+4),
  .wb-location-page .z24-lg-grid[data-gallery-mod="2"]>.z24-lg-tile:nth-last-child(-n+2),
  .wb-location-page .z24-lg-grid[data-gallery-count="1"]>.z24-lg-tile:only-child,
  .wb-location-page .z24-lg-grid[data-gallery-parity="odd"]>.z24-lg-tile:first-child{
    flex-basis:min(270px,calc((100% - 36px)/4));
    width:min(270px,calc((100% - 36px)/4));
  }
}
@media(max-width:640px){
  .wb-location-page .z24-lg-grid{gap:7px}
  .wb-location-page .z24-lg-grid>.z24-lg-tile,
  .wb-location-page .z24-lg-grid[data-gallery-mod="1"]>.z24-lg-tile:nth-last-child(-n+4),
  .wb-location-page .z24-lg-grid[data-gallery-mod="2"]>.z24-lg-tile:nth-last-child(-n+2),
  .wb-location-page .z24-lg-grid[data-gallery-count="1"]>.z24-lg-tile:only-child,
  .wb-location-page .z24-lg-grid[data-gallery-parity="odd"]>.z24-lg-tile:first-child{
    flex:0 1 min(210px,calc((100% - 7px)/2));
    width:min(210px,calc((100% - 7px)/2));
    max-width:210px;
    aspect-ratio:4/3;
  }
}
