/* Natural photo proportions and CSS masonry; no layout script or cropped gallery tiles. */
.senthero-editorial-gallery.senthero-photo-gallery {
 display: block; column-count: 4; column-gap: clamp(1rem,2vw,1.5rem);
}
.senthero-photo-gallery .senthero-photo-item {
 display: inline-block; vertical-align: top; width: 100%; break-inside: avoid;
 margin: 0 0 clamp(1rem,2vw,1.5rem) !important;
}
.senthero-photo-item figure { margin: 0 !important; border-radius: var(--wp--custom--radius--small); }
.senthero-photo-item a { display: block; border-radius: inherit; }
.senthero-photo-item img { display: block; width: 100%; height: auto; object-fit: contain; border-radius: inherit; }
.senthero-photo-item .senthero-gallery-caption { margin: .65rem 0 0 !important; font-size: .75rem; line-height: 1.6; }
.senthero-gallery-strip .senthero-managed-photo img { object-position: center top; }
.senthero-footer-gallery .senthero-managed-photo img { object-position: center 30%; }
.senthero-guide-card .senthero-managed-photo img { object-position: center 30%; }
.senthero-guide-card .senthero-photo-focus-beard img { object-position: center 75%; }
.senthero-lightbox {
 width: min(850px,calc(100vw - 2rem)); max-width: none; max-height: calc(100svh - 2rem);
 border: 1px solid var(--wp--preset--color--muted); border-radius: var(--wp--custom--radius--button);
 padding: 1rem; background: var(--wp--preset--color--ink); color: var(--wp--preset--color--ivory);
}
.senthero-lightbox::backdrop { background: color-mix(in srgb,var(--wp--preset--color--ink) 94%,transparent); }
.senthero-lightbox:not([open]) { display: none; }
.senthero-lightbox header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .5rem; }
.senthero-lightbox h2 { margin: 0; font-size: .85rem; line-height: 1.5; }
.senthero-lightbox button {
 min-width: 44px; min-height: 44px; padding: .6rem .9rem; font: inherit; font-size: .8rem;
 background: transparent; color: inherit; border: 1px solid currentColor; border-radius: var(--wp--custom--radius--button); cursor: pointer;
}
.senthero-lightbox button:hover { background: var(--wp--preset--color--gold); }
.senthero-lightbox-stage { display: grid; grid-template-columns: 44px minmax(0,1fr) 44px; align-items: center; gap: 1rem; }
.senthero-lightbox-stage img { display: block; width: auto; max-width: 100%; max-height: 70svh; height: auto; margin: auto; object-fit: contain; touch-action: pan-y pinch-zoom; }
.senthero-lightbox-caption { margin: .75rem auto 0; max-width: 65ch; font-size: .8rem; text-align: center; }
@media (max-width: 1199px) { .senthero-editorial-gallery.senthero-photo-gallery { column-count: 3; } }
@media (max-width: 767px) {
 .senthero-editorial-gallery.senthero-photo-gallery { column-count: 2; }
 .senthero-lightbox { width: calc(100vw - 1rem); max-height: calc(100svh - 1rem); padding: .75rem; }
 .senthero-lightbox-stage { grid-template-columns: 1fr 1fr; gap: .65rem; }
 .senthero-lightbox-stage img { grid-column: 1 / -1; grid-row: 1; max-height: 65svh; }
 .senthero-lightbox-stage .senthero-lightbox-prev { grid-column: 1; grid-row: 2; }
 .senthero-lightbox-stage .senthero-lightbox-next { grid-column: 2; grid-row: 2; }
}
@media (max-width: 399px) { .senthero-editorial-gallery.senthero-photo-gallery { column-count: 1; } }


/* Native Gallery editor keeps media add/remove/reorder controls; frontend retains masonry. */
.senthero-photo-gallery.wp-block-gallery.has-nested-images {
 display: block; column-count: 4; gap: normal; column-gap: clamp(1rem,2vw,1.5rem);
}
.senthero-photo-gallery.wp-block-gallery.has-nested-images figure.wp-block-image {
 display: inline-block; width: 100% !important; flex-grow: 0; border-radius: var(--wp--custom--radius--small);
 margin: 0 0 clamp(1rem,2vw,1.5rem) !important; break-inside: avoid;
}
.senthero-photo-gallery.wp-block-gallery.has-nested-images figure.wp-block-image img {
 width: 100%; height: auto; flex: none; object-fit: contain;
}
.senthero-photo-gallery.wp-block-gallery.has-nested-images figure.wp-block-image figcaption {
 position: static; padding: .65rem 0 0; margin: 0;
 background: none; color: inherit; font-size: .75rem; line-height: 1.6; text-align: center;
 max-height: none; overflow: visible; text-shadow: none; font-weight: 400;
}
@media (max-width: 1199px) { .senthero-photo-gallery.wp-block-gallery.has-nested-images { column-count: 3; } }
@media (max-width: 767px) { .senthero-photo-gallery.wp-block-gallery.has-nested-images { column-count: 2; } }
@media (max-width: 399px) { .senthero-photo-gallery.wp-block-gallery.has-nested-images { column-count: 1; } }
