.ahq-photo-gallery {
 margin-block: 1.5rem;
 container-type: inline-size;
}

.ahq-photo-gallery-grid {
 display: grid;
 grid-template-columns: repeat(4, minmax(0, 1fr));
 gap: 2px;
}

.ahq-photo-gallery-grid a {
 display: block;
 aspect-ratio: 4 / 3;
 border: 3px solid #343434;
 overflow: hidden;
}

.ahq-photo-gallery-grid a:focus-visible {
 outline: 3px solid currentColor;
 outline-offset: -5px;
}

.ahq-photo-gallery-grid a img {
 display: block;
 width: 100%;
 height: 100%;
 object-fit: cover;
}

@container (max-width: 600px) {
 .ahq-photo-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
 .ahq-photo-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.ahq-photo-lightbox {
 max-width: min(95vw, 90rem);
 max-height: 95vh;
 padding: 1rem;
 color: #fff;
 background: #151515;
 border: 0;
 border-radius: 6px;
}

.ahq-photo-lightbox:modal {
 overscroll-behavior: contain;
}

.ahq-photo-lightbox::backdrop {
 background: rgb(0 0 0 / 85%);
 overflow: hidden;
 overscroll-behavior: contain;
}

.ahq-photo-lightbox img {
 display: block;
 margin-inline: auto;
 max-width: 100%;
 max-height: 75vh;
 object-fit: contain;
}

.ahq-photo-lightbox-controls {
 display: flex;
 align-items: center;
 justify-content: center;
 flex-wrap: wrap;
 gap: .5rem;
 margin-top: .75rem;
}

.ahq-photo-lightbox-controls button {
 background: #333;
 color: #fff;
 padding: .4rem .65rem;
 border: 1px solid #999;
 border-radius: 4px;
}
