/* Clinic photo gallery and lightbox (shared by every clinic profile). Compact: one main image, a strip of equal thumbnails, a "view all" control. */
.pg{display:grid;gap:10px;min-width:0;align-content:start}
.pg [hidden],.pgl [hidden]{display:none!important}
.pg-stage{position:relative}
.pg-main{display:block;line-height:0;border-radius:12px;overflow:hidden;background:#e7eddf;aspect-ratio:4/3}
.pg-main img{display:block;width:100%;height:100%;object-fit:cover;object-position:50% 50%}
.pg-main[data-o="p"] img,.pg-thumb[data-o="p"] img{object-position:50% 20%} /* portraits: keep faces, which sit in the upper part of the frame */
/* One thumbnail per photograph in a scrolling strip (four in view); the one showing is outlined. */
/* The thumbnails and "View all" share a strip; it adds no layout of its own except where a template gives it one (profile v3). */
.pg-strip{display:contents}
.pg-thumbs{list-style:none;margin:0;padding:var(--pg-strip-pad,3px);display:flex;gap:8px;overflow-x:auto;scrollbar-width:thin;-webkit-overflow-scrolling:touch}
.pg-thumbs li{flex:0 0 calc((100% - 30px) / 4);min-width:0}
.pg-thumb{display:block;line-height:0;aspect-ratio:1/1;border-radius:8px;overflow:hidden;background:#e7eddf}
.pg-thumb[aria-current="true"]{outline:3px solid #21675b;outline-offset:1px}
.pg-prev,.pg-next{position:absolute;z-index:2;top:50%;transform:translateY(-50%);width:44px;height:44px;border-radius:50%;border:1px solid #b9cbc0;background:rgba(255,255,255,.94);color:#153e3c;font:inherit;font-size:26px;line-height:1;padding:0 0 3px;cursor:pointer;display:flex;align-items:center;justify-content:center}
.pg-prev{left:10px}.pg-next{right:10px}
.pg-prev:hover,.pg-next:hover{background:#fff;border-color:#21675b}
.pg-counter{position:absolute;z-index:2;right:10px;bottom:10px;margin:0;padding:4px 10px;border-radius:999px;background:rgba(21,62,60,.88);color:#fff;font-size:13px;font-weight:700;line-height:1.3;pointer-events:none}
.pg button:focus-visible{outline:3px solid #21675b;outline-offset:2px}
.pg-thumb img{display:block;width:100%;height:100%;object-fit:cover;object-position:50% 50%}
.pg-main:hover img,.pg-thumb:hover img{filter:brightness(.94)}
.pg a:focus-visible,.pgl button:focus-visible{outline:3px solid #21675b;outline-offset:2px}
.pg-all{justify-self:start;display:inline-block;padding:9px 16px;border:1px solid #b9cbc0;border-radius:7px;font-weight:700;font-size:15px;color:#153e3c;background:#fff}
.pg-all:hover{background:#f5f7f0}
.pg-credit{margin:0;font-size:13px;color:#5a6c66}
.pg-credit a{text-decoration:underline;text-underline-offset:3px}
.pg-logo{margin:0 0 10px}
.pg-logo img{display:block;max-height:52px;max-width:180px;width:auto;height:auto;object-fit:contain}
@media (max-width:600px){.pg-thumbs{gap:6px}.pg-thumbs li{flex-basis:calc((100% - 24px) / 4)}.pg-prev,.pg-next{width:40px;height:40px}.pg-all{width:100%;text-align:center;justify-self:stretch}}

/* Lightbox */
.pgl{position:fixed;inset:0;z-index:10000;background:rgba(9,20,19,.97);display:grid;grid-template-rows:auto 1fr auto auto;color:#fff;font:16px/1.4 "DM Sans",system-ui,sans-serif;touch-action:pan-y}
.pgl[hidden]{display:none}
.pgl-top{display:flex;align-items:center;justify-content:space-between;padding:10px 14px}
.pgl-count{font-weight:700;letter-spacing:.02em}
.pgl button{font:inherit;color:#fff;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.3);border-radius:8px;cursor:pointer}
.pgl button:hover{background:rgba(255,255,255,.24)}
.pgl-close{min-width:44px;min-height:44px;font-size:26px;line-height:1}
.pgl-body{position:relative;min-height:0;overflow:hidden}
/* The stage fills the body exactly (absolute), so the picture is always fitted inside the free space, whatever its shape. */
.pgl-stage{position:absolute;inset:0 56px;margin:0;display:flex;align-items:center;justify-content:center}
.pgl-stage img{display:block;max-width:100%;max-height:100%;width:auto;height:auto;min-width:0;min-height:0;object-fit:contain;border-radius:4px}
.pgl-prev,.pgl-next{position:absolute;z-index:2;top:50%;transform:translateY(-50%);width:44px;height:64px;font-size:30px}
.pgl-prev{left:6px}.pgl-next{right:6px}
.pgl-source{margin:0;padding:6px 14px;text-align:center;font-size:13px;color:#cfe0da;min-height:1.4em}
.pgl-source a{color:#bfe9dc}
.pgl-rail{list-style:none;margin:0;padding:8px 12px 12px;display:flex;gap:6px;overflow-x:auto;justify-content:center}
.pgl-rail button{padding:0;width:56px;height:56px;border-radius:6px;overflow:hidden;opacity:.6;flex:none}
.pgl-rail button[aria-current="true"]{opacity:1;outline:2px solid #fff}
.pgl-rail img{display:block;width:100%;height:100%;object-fit:cover;object-position:50% 20%}
.pgl-loading{position:absolute;inset:auto 0 auto 0;text-align:center;font-size:14px;color:#cfe0da;pointer-events:none}
@media (max-width:600px){.pgl-stage{inset:0 4px}.pgl-prev,.pgl-next{width:38px;height:56px;background:rgba(0,0,0,.45)}.pgl-rail{justify-content:flex-start}}
@media (prefers-reduced-motion:reduce){.pg *{transition:none!important}}
