/* PGT Gallery (inc/gallery.php). Uses the design tokens defined on #pgt-html-home in home.css. */
#pgt-html-home .pgt-gallery { padding-top: 48px; }
#pgt-html-home .pgt-gal-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 26px; }
#pgt-html-home .pgt-gal-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
#pgt-html-home .pgt-gal-tabs button { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px 0 18px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font: 700 13px/1 var(--font); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; transition: border-color .2s, background .2s, color .2s; }
#pgt-html-home .pgt-gal-tabs button:hover { border-color: var(--ink); }
#pgt-html-home .pgt-gal-tabs button:focus-visible { outline: 3px solid var(--y); outline-offset: 2px; }
#pgt-html-home .pgt-gal-tabs .ct { display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--line-2); color: var(--steel); font-size: 11.5px; letter-spacing: 0; }
#pgt-html-home .pgt-gal-tabs button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
#pgt-html-home .pgt-gal-tabs button.on .ct { background: var(--y); color: var(--ink); }
#pgt-html-home .pgt-gal-hint { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--muted); font-size: 13.5px; }
#pgt-html-home .pgt-gal-hint .icon { width: 15px; height: 15px; }
#pgt-html-home .pgt-gal-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 184px; grid-auto-flow: dense; gap: 12px; }
#pgt-html-home .pgt-gal-item { position: relative; margin: 0; border-radius: 14px; overflow: hidden; background: var(--ink-2); isolation: isolate; }
#pgt-html-home .pgt-gal-item[hidden] { display: none; }
#pgt-html-home .pgt-gal-item.s-large { grid-column: span 2; grid-row: span 2; }
#pgt-html-home .pgt-gal-item.s-wide { grid-column: span 2; }
#pgt-html-home .pgt-gal-item.s-tall { grid-row: span 2; }
#pgt-html-home .pgt-gal-open { position: absolute; inset: 0; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
#pgt-html-home .pgt-gal-open:focus-visible { outline: 3px solid var(--y); outline-offset: -3px; }
#pgt-html-home .pgt-gal-open img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease, ease); }
#pgt-html-home .pgt-gal-item:hover .pgt-gal-open img, #pgt-html-home .pgt-gal-open:focus-visible img { transform: scale(1.05); }
#pgt-html-home .pgt-gal-item::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, transparent 50%, rgba(13,14,16,.82)); }
#pgt-html-home .pgt-gal-zoom { position: absolute; top: 14px; right: 14px; z-index: 2; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--y); color: var(--ink); opacity: 0; transform: scale(.8); transition: opacity .25s, transform .25s; }
#pgt-html-home .pgt-gal-zoom .icon { width: 17px; height: 17px; }
#pgt-html-home .pgt-gal-item:hover .pgt-gal-zoom, #pgt-html-home .pgt-gal-open:focus-visible .pgt-gal-zoom { opacity: 1; transform: none; }
@media (hover: none) { #pgt-html-home .pgt-gal-zoom { opacity: 1; transform: none; } }
#pgt-html-home .pgt-gal-item figcaption { position: absolute; left: 16px; right: 60px; bottom: 14px; z-index: 2; pointer-events: none; display: flex; flex-direction: column; gap: 4px; }
#pgt-html-home .pgt-gal-item figcaption b { color: #fff; font-size: 15px; font-weight: 700; line-height: 1.3; }
#pgt-html-home .pgt-gal-item figcaption span { color: var(--y); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
#pgt-html-home .pgt-gal-item.s-normal figcaption b, #pgt-html-home .pgt-gal-item.s-tall figcaption b { font-size: 14px; }
#pgt-html-home .pgt-gal-empty { padding: 56px 24px; border: 1.5px dashed var(--line); border-radius: 14px; text-align: center; color: var(--muted); }
@media (max-width: 1024px) {
  #pgt-html-home .pgt-gal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 210px; }
}
@media (max-width: 680px) {
  #pgt-html-home .pgt-gallery { padding-top: 32px; }
  #pgt-html-home .pgt-gal-tabs { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 6px; scrollbar-width: none; }
  #pgt-html-home .pgt-gal-tabs::-webkit-scrollbar { display: none; }
  #pgt-html-home .pgt-gal-tabs button { flex: 0 0 auto; height: 40px; }
  #pgt-html-home .pgt-gal-grid { grid-auto-rows: 150px; gap: 8px; }
  #pgt-html-home .pgt-gal-item { border-radius: 10px; }
  #pgt-html-home .pgt-gal-item figcaption { left: 12px; right: 12px; bottom: 10px; }
  #pgt-html-home .pgt-gal-item.s-normal figcaption b, #pgt-html-home .pgt-gal-item.s-tall figcaption b { font-size: 12.5px; }
  #pgt-html-home .pgt-gal-zoom { width: 32px; height: 32px; top: 10px; right: 10px; }
}
/* Lightbox */
html.pgt-lb-open { overflow: hidden; }
#pgt-html-home .pgt-lightbox { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: #fff; font-family: var(--font); overflow: hidden; }
#pgt-html-home .pgt-lightbox[open] { display: block; }
#pgt-html-home .pgt-lightbox::backdrop { background: rgba(8,9,11,.9); backdrop-filter: blur(4px); }
#pgt-html-home .lb-stage { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; width: 100%; height: 100%; margin: 0; padding: 70px 120px 36px; }
#pgt-html-home .lb-img { display: block; max-width: min(1100px, 100%); max-height: calc(100dvh - 170px); width: auto; height: auto; border-radius: 14px; object-fit: contain; box-shadow: 0 30px 70px -20px rgba(0,0,0,.7); transition: opacity .25s; }
#pgt-html-home .lb-img.loading { opacity: .25; }
#pgt-html-home .lb-stage figcaption { display: flex; align-items: baseline; justify-content: center; gap: 18px; max-width: 900px; text-align: center; }
#pgt-html-home .lb-cap { color: #fff; font-size: 17px; font-weight: 700; line-height: 1.4; }
#pgt-html-home .lb-num { flex-shrink: 0; color: #9AA1AC; font-size: 14px; font-variant-numeric: tabular-nums; }
#pgt-html-home .lb-btn { position: absolute; z-index: 2; display: grid; place-items: center; width: 64px; height: 64px; padding: 0; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; background: rgba(22,24,28,.75); color: #fff; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
#pgt-html-home .lb-btn .icon { width: 22px; height: 22px; }
#pgt-html-home .lb-btn:hover { background: var(--y); border-color: var(--y); color: var(--ink); }
#pgt-html-home .lb-btn:focus-visible { outline: 3px solid var(--y); outline-offset: 3px; }
#pgt-html-home .lb-btn[hidden] { display: none; }
#pgt-html-home .lb-close { top: 18px; right: 18px; }
#pgt-html-home .lb-prev, #pgt-html-home .lb-next { top: 50%; transform: translateY(-50%); }
#pgt-html-home .lb-prev { left: 40px; }
#pgt-html-home .lb-prev .icon { transform: rotate(180deg); }
#pgt-html-home .lb-next { right: 40px; }
@media (max-width: 900px) {
  #pgt-html-home .lb-stage { padding: 76px 14px 28px; }
  #pgt-html-home .lb-btn { width: 48px; height: 48px; }
  #pgt-html-home .lb-close { top: 14px; right: 14px; }
  #pgt-html-home .lb-prev, #pgt-html-home .lb-next { top: auto; bottom: 20px; transform: none; }
  #pgt-html-home .lb-prev { left: 14px; }
  #pgt-html-home .lb-next { right: 14px; }
  #pgt-html-home .lb-stage { padding-bottom: 88px; }
  #pgt-html-home .lb-img { max-height: calc(100dvh - 230px); border-radius: 10px; }
  #pgt-html-home .lb-stage figcaption { flex-direction: column; align-items: center; gap: 6px; }
  #pgt-html-home .lb-cap { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  #pgt-html-home .pgt-gal-open img, #pgt-html-home .pgt-gal-zoom, #pgt-html-home .lb-img { transition: none; }
}
/* Natural masonry (client design 2026-11-25): images keep their own proportions, 2 columns. */
#pgt-html-home .pgt-gal-grid { display: block; columns: 2; column-gap: 18px; grid-auto-rows: auto; }
#pgt-html-home .pgt-gal-item, #pgt-html-home .pgt-gal-item.s-large, #pgt-html-home .pgt-gal-item.s-wide, #pgt-html-home .pgt-gal-item.s-tall, #pgt-html-home .pgt-gal-item.s-normal { display: block; break-inside: avoid; -webkit-column-break-inside: avoid; margin: 0 0 18px; height: auto; border-radius: 16px; }
#pgt-html-home .pgt-gal-item[hidden] { display: none; }
#pgt-html-home .pgt-gal-open { position: relative; inset: auto; display: block; width: 100%; height: auto; }
#pgt-html-home .pgt-gal-open img { display: block; width: 100%; height: auto; object-fit: initial; }
@media (max-width: 680px) {
  #pgt-html-home .pgt-gal-grid { columns: 1; }
  #pgt-html-home .pgt-gal-item, #pgt-html-home .pgt-gal-item.s-large, #pgt-html-home .pgt-gal-item.s-wide, #pgt-html-home .pgt-gal-item.s-tall, #pgt-html-home .pgt-gal-item.s-normal { margin-bottom: 12px; border-radius: 12px; }
}