/* Parish Gallery — uses the Parish Theme colours when present. */
.pg-section, .pg-block, .pg-banner {
	--pg-primary: var(--primary, #034f75); --pg-accent: var(--accent, #fcb040); --pg-ink: var(--ink, #1d2433);
	--pg-muted: color-mix(in srgb, var(--pg-ink) 62%, #fff); --pg-line: color-mix(in srgb, var(--pg-ink) 13%, #fff);
	--pg-tint: color-mix(in srgb, var(--pg-accent) 14%, #fff); --pg-serif: var(--serif, Georgia, serif);
}
.pg-wrap { max-width: var(--wrap, 1200px); margin: 0 auto; padding: 0 20px; box-sizing: border-box; }
.pg-banner { background-color: var(--pg-primary); background-size: cover; background-position: center 40%; color: #fff; padding: 44px 0 36px; border-bottom: 4px solid var(--pg-accent); position: relative; }
.pg-banner h1 { color: #fff; margin: 0; }
.pg-banner p { color: rgba(255,255,255,.88); margin: 8px 0 0; }
.pg-crumb { margin: 0 0 6px !important; font-size: .92rem; }
.pg-crumb a { color: #fff; }
.pg-section { padding: 36px 0 60px; color: var(--pg-ink); }

.pg-tools { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 22px; }
.pg-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.pg-chips a { padding: 8px 15px; border-radius: 999px; border: 1px solid var(--pg-line); background: #fff; color: var(--pg-primary); font-weight: 600; font-size: .92rem; text-decoration: none; }
.pg-chips a.on, .pg-chips a:hover { background: var(--pg-primary); border-color: var(--pg-primary); color: #fff; }
.pg-year { font-weight: 600; color: var(--pg-muted); }
.pg-year select { font: inherit; padding: 7px 10px; border: 1px solid var(--pg-line); border-radius: 8px; margin-left: 6px; background: #fff; }

.pg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.pg-grid.pg-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pg-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--pg-line); border-radius: 12px; overflow: hidden; text-decoration: none; color: var(--pg-ink); transition: box-shadow .15s, transform .15s; }
.pg-card:hover { box-shadow: 0 10px 26px rgba(0,0,0,.12); transform: translateY(-2px); color: var(--pg-ink); }
.pg-card[hidden] { display: none; }
.pg-cover { position: relative; display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--pg-tint); }
.pg-cover img, .pg-nocover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.pg-count { position: absolute; right: 10px; bottom: 10px; background: rgba(0,0,0,.65); color: #fff; font-size: .78rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.pg-body { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px 16px; border-bottom: 4px solid var(--pg-accent); flex: 1; }
.pg-tag { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--pg-primary); }
.pg-title { font-family: var(--pg-serif); font-weight: 600; font-size: 1.15rem; line-height: 1.3; color: var(--pg-primary); }
.pg-meta { font-size: .88rem; color: var(--pg-muted); }
.pg-none, .pg-empty { background: #fff; border: 1px dashed var(--pg-line); border-radius: 10px; padding: 18px 20px; color: var(--pg-muted); }
.pg-note { margin-top: 30px; font-size: .9rem; color: var(--pg-muted); background: #f6f7f9; border-radius: 8px; padding: 12px 16px; }
.pg-note a { color: var(--pg-primary); }

.pg-intro { font-size: 1.08rem; max-width: 70ch; margin: 0 0 22px; }
.pg-intro a { color: var(--pg-primary); font-weight: 700; }
.pg-photos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: dense; gap: 10px; }
.pg-ph { position: relative; display: block; border-radius: 8px; overflow: hidden; aspect-ratio: 1; background: var(--pg-tint); cursor: zoom-in; }
.pg-ph[hidden] { display: none; }
.pg-ph.pg-wide { grid-column: span 2; grid-row: span 2; }
.pg-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.pg-ph:hover img { transform: scale(1.04); }
.pg-ph:focus-visible { outline: 3px solid var(--pg-accent); outline-offset: 2px; }
.pg-more { text-align: center; margin: 22px 0 0; }
.pg-btn-o { font: inherit; font-weight: 700; padding: 12px 24px; border-radius: 999px; border: 2px solid var(--pg-primary); background: #fff; color: var(--pg-primary); cursor: pointer; }
.pg-btn-o:hover { background: var(--pg-primary); color: #fff; }
.pg-more-head, .pg-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 44px 0 16px; }
.pg-head { margin-top: 0; }
.pg-h2 { font-family: var(--pg-serif); color: var(--pg-primary); margin: 0; font-size: 1.6rem; }
.pg-more-head a, .pg-head a { font-weight: 700; color: var(--pg-primary); }

.pg-lb { position: fixed; inset: 0; z-index: 9999; background: rgba(8,18,26,.95); display: flex; align-items: center; justify-content: center; gap: 10px; padding: 20px; }
.pg-lb[hidden] { display: none; }
.pg-lb figure { margin: 0; text-align: center; max-width: min(1200px, 84vw); }
.pg-lb img { max-width: 100%; max-height: 80vh; border-radius: 6px; display: block; margin: 0 auto; }
.pg-lb figcaption { color: #e4eef4; margin-top: 10px; font-size: .95rem; }
.pg-lb button { flex: none; background: rgba(255,255,255,.14); color: #fff; border: 0; width: 52px; height: 52px; border-radius: 50%; font-size: 2rem; line-height: 1; cursor: pointer; }
.pg-lb button:hover, .pg-lb button:focus-visible { background: rgba(255,255,255,.3); }
.pg-lb-x { position: absolute; top: calc(14px + env(safe-area-inset-top, 0px)); right: 14px; }

@media (max-width: 960px) { .pg-grid, .pg-grid.pg-four { grid-template-columns: 1fr 1fr; } .pg-photos { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) {
	.pg-grid, .pg-grid.pg-four { grid-template-columns: 1fr; }
	.pg-photos { grid-template-columns: 1fr 1fr; gap: 6px; }
	.pg-lb { padding: 10px; } .pg-lb figure { max-width: 100%; }
	.pg-lb-p, .pg-lb-n { position: absolute; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
	.pg-lb-p { left: 20px; } .pg-lb-n { right: 20px; }
}
