/* AGS Photos: galleries on the website. Self-contained, so theme styles can't change the layout. */
.ags-ph, .ags-ph * { box-sizing: border-box; }
.ags-ph { margin: 0 !important; padding: 0 !important; list-style: none !important; width: 100%; }
.ags-ph-item { position: relative; display: block; margin: 0 !important; padding: 0 !important; overflow: hidden; background: #ECEAE2; border: 0 !important; }
.ags-ph-link { display: block !important; position: relative; cursor: zoom-in; border: 0 !important; box-shadow: none !important; text-decoration: none !important; background: none !important; padding: 0 !important; margin: 0 !important; }
.ags-ph-link:focus-visible { outline: 2px solid #D4AF37; outline-offset: -2px; }
.ags-ph-img { display: block !important; width: 100% !important; max-width: none !important; height: auto !important; margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; transition: transform .7s ease; }

/* Hover: slight zoom + "VIEW" label (matches the site design) */
.ags-ph-link::after { content: "View"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(28,35,33,.4); color: #fff; font: 500 12px/1 'Montserrat', sans-serif; letter-spacing: .2em; text-transform: uppercase; opacity: 0; transition: opacity .4s ease; pointer-events: none; }
@media (hover: hover) {
	.ags-ph-link:hover::after { opacity: 1; }
	.ags-ph-link:hover .ags-ph-img { transform: scale(1.05); }
}

/* Masonry (Gallery page): 2 columns on phones, 3 on computers */
.ags-ph--masonry { display: block !important; column-count: 2; column-gap: 8px; }
.ags-ph--masonry .ags-ph-item { break-inside: avoid; -webkit-column-break-inside: avoid; page-break-inside: avoid; margin-bottom: 8px !important; }
@media (min-width: 640px) {
	.ags-ph--masonry { column-gap: 16px; }
	.ags-ph--masonry .ags-ph-item { margin-bottom: 16px !important; }
}
@media (min-width: 1024px) { .ags-ph--masonry { column-count: 3; } }

/* Grid (service pages): 2 per row on phones, 4 on computers, tall portrait tiles */
.ags-ph--grid { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 768px) { .ags-ph--grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } }
.ags-ph--grid .ags-ph-item { aspect-ratio: 3 / 4; }
.ags-ph--grid .ags-ph-link { position: absolute !important; inset: 0; }
.ags-ph--grid .ags-ph-img { height: 100% !important; object-fit: cover; }

/* Load More (Gallery page) */
.ags-ph-more-wrap { display: none; text-align: center; margin-top: 40px; }
.ags-ph-more-wrap.is-on { display: block; }
.ags-ph-more-wrap .ags-ph-more { display: inline-block; background: transparent !important; border: 1px solid #1C2321 !important; color: #1C2321 !important; font: 500 12px/1 'Montserrat', sans-serif !important; letter-spacing: .08em; text-transform: uppercase; padding: 14px 40px !important; border-radius: 0 !important; box-shadow: none !important; cursor: pointer; transition: background .3s, color .3s; }
.ags-ph-more-wrap .ags-ph-more:hover, .ags-ph-more-wrap .ags-ph-more:focus-visible { background: #1C2321 !important; color: #fff !important; }
.ags-ph-item.is-hidden { display: none !important; }

/* Note shown only to logged-in editors when a gallery is empty */
.ags-ph-note { border: 2px dashed #D4AF37; background: #FFFBEA; color: #1C2321; padding: 16px; text-align: center; font: 14px/1.5 'Montserrat', sans-serif; margin: 0; }

/* Full-screen photo viewer */
.agsph-lb { position: fixed; inset: 0; z-index: 999999; display: none; align-items: center; justify-content: center; background: rgba(14,17,16,.96); opacity: 0; transition: opacity .25s ease; -webkit-tap-highlight-color: transparent; font-family: 'Montserrat', sans-serif; }
.agsph-lb.is-open { display: flex; }
.agsph-lb.is-visible { opacity: 1; }
.agsph-lb-stage { position: relative; max-width: 92vw; max-height: 84vh; display: flex; align-items: center; justify-content: center; touch-action: pan-y; }
.agsph-lb-img { display: block; max-width: 92vw; max-height: 84vh; width: auto; height: auto; object-fit: contain; box-shadow: 0 20px 60px rgba(0,0,0,.5); transition: opacity .2s ease, transform .25s ease; user-select: none; -webkit-user-drag: none; border-radius: 0 !important; margin: 0 !important; }
.agsph-lb-img.is-loading { opacity: 0; transform: scale(.98); }
.agsph-lb-spin { position: absolute; width: 34px; height: 34px; border: 2px solid rgba(244,241,222,.25); border-top-color: #D4AF37; border-radius: 50%; animation: agsph-spin .8s linear infinite; display: none; }
.agsph-lb-stage.is-loading .agsph-lb-spin { display: block; }
@keyframes agsph-spin { to { transform: rotate(360deg); } }
.agsph-lb button.agsph-lb-btn { position: absolute !important; display: flex !important; align-items: center; justify-content: center; width: 52px !important; height: 52px !important; min-width: 0 !important; padding: 0 !important; margin: 0 !important; border: 1px solid rgba(244,241,222,.25) !important; border-radius: 50% !important; background: rgba(28,35,33,.6) !important; color: #F4F1DE !important; font-size: 20px !important; line-height: 1 !important; cursor: pointer; box-shadow: none !important; text-transform: none !important; transition: background .2s, border-color .2s, color .2s; }
.agsph-lb button.agsph-lb-btn:hover, .agsph-lb button.agsph-lb-btn:focus-visible { background: #D4AF37 !important; border-color: #D4AF37 !important; color: #1C2321 !important; outline: none; }
.agsph-lb-close { top: 20px; right: 20px; }
.agsph-lb-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.agsph-lb-next { right: 24px; top: 50%; transform: translateY(-50%); }
.agsph-lb-bar { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; color: #BFB8A5; font-size: 13px; letter-spacing: .18em; pointer-events: none; }
.agsph-lb-hint { display: block; margin-top: 6px; font-size: 11px; letter-spacing: .08em; color: #7C8481; }
.agsph-lb.is-single .agsph-lb-prev, .agsph-lb.is-single .agsph-lb-next { display: none !important; }
@media (max-width: 767px) {
	.agsph-lb-stage, .agsph-lb-img { max-width: 100vw; max-height: 78vh; }
	.agsph-lb-img { box-shadow: none; }
	.agsph-lb button.agsph-lb-btn { width: 44px !important; height: 44px !important; font-size: 17px !important; }
	.agsph-lb-prev { left: 10px; top: auto; bottom: 14px; transform: none; }
	.agsph-lb-next { right: 10px; top: auto; bottom: 14px; transform: none; }
	.agsph-lb-close { top: 14px; right: 14px; }
	.agsph-lb-bar { bottom: 28px; }
	.agsph-lb-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	.ags-ph-img, .agsph-lb, .agsph-lb-img { transition: none; }
	.agsph-lb-spin { animation: none; }
}
