/* Muhr Core — suite gallery, lightbox, favorites and directory states.
   Colors come from the GeneratePress global colors (var(--ink) etc.). */

/* Directory: cards hidden by the filter must stay hidden even when a block sets display. */
[data-muhr-card][hidden],
[data-muhr-empty][hidden],
[data-muhr-fav-count][hidden] { display: none !important; }
.muhr-js [data-muhr-directory]:not(.is-ready) [data-muhr-card] { visibility: hidden; }

/* Favorites */
[data-muhr-fav] { cursor: pointer; }
[data-muhr-fav] svg path { transition: fill .2s ease; }
[data-muhr-fav][aria-pressed="true"] svg path { fill: currentColor; }

/* Gallery */
/* 6-column grid: the lead photo spans the row, the rest sit three per row
   (two per row when that divides evenly, full width when there is only one). */
.muhr-gallery-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.muhr-gallery-item { margin: 0; grid-column: span 2; }
.muhr-gallery-item:first-child,
.muhr-gallery[data-count="2"] .muhr-gallery-item { grid-column: span 6; }
.muhr-gallery[data-count="3"] .muhr-gallery-item:not(:first-child),
.muhr-gallery[data-count="5"] .muhr-gallery-item:not(:first-child) { grid-column: span 3; }
.muhr-gallery figure { margin: 0; }
.muhr-gallery a { display: block; position: relative; overflow: hidden; background: var(--paper-deep, #e7dfd2); cursor: zoom-in; }
.muhr-gallery img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.muhr-gallery-item:first-child img { aspect-ratio: 16 / 9; }
.muhr-gallery a:hover img { transform: scale(1.03); }
.muhr-gallery a:focus-visible { outline: 2px solid var(--bronze, #a47b52); outline-offset: 3px; }
.muhr-gallery figcaption { margin-top: 8px; font-size: 13px; line-height: 1.5; color: var(--muted, #666860); }
.muhr-gallery-empty { margin: 0; padding: 28px; border: 1px dashed var(--line, rgba(36, 38, 34, .15)); color: var(--muted, #666860); font-size: 15px; }
@media (max-width: 767px) {
	.muhr-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
	.muhr-gallery-item, .muhr-gallery[data-count] .muhr-gallery-item:not(:first-child) { grid-column: span 1; }
	.muhr-gallery-item:first-child, .muhr-gallery[data-count="2"] .muhr-gallery-item { grid-column: span 2; }
}

/* Lightbox */
html.muhr-lightbox-open { overflow: hidden; }
.muhr-lightbox { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(22, 24, 21, .97); color: #fbfaf7; overscroll-behavior: contain; }
.muhr-lightbox::backdrop { background: rgba(0, 0, 0, .7); }
.muhr-lightbox[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.muhr-lightbox-stage { display: flex; align-items: center; justify-content: center; min-height: 0; padding: 72px 88px 12px; touch-action: pan-y pinch-zoom; }
.muhr-lightbox-stage img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.muhr-lightbox-bar { display: flex; justify-content: space-between; gap: 24px; padding: 8px 88px 28px; font-size: 14px; line-height: 1.5; }
.muhr-lightbox-bar p { margin: 0; }
.muhr-lightbox-counter { color: var(--bronze-light, #c8b79f); letter-spacing: .14em; font-size: 12px; white-space: nowrap; }
.muhr-lightbox button { position: absolute; display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; padding: 0; border: 1px solid rgba(251, 250, 247, .28); background: rgba(22, 24, 21, .4); color: inherit; cursor: pointer; transition: background .2s ease, border-color .2s ease; }
.muhr-lightbox button:hover { background: var(--evergreen, #173c32); border-color: var(--evergreen, #173c32); }
.muhr-lightbox button:focus-visible { outline: 2px solid var(--bronze-light, #c8b79f); outline-offset: 2px; }
.muhr-lightbox button[hidden] { display: none; }
.muhr-lightbox-close { top: 16px; right: 16px; }
.muhr-lightbox-prev { left: 20px; top: calc(50% - 26px); }
.muhr-lightbox-next { right: 20px; top: calc(50% - 26px); }
@media (max-width: 767px) {
	.muhr-lightbox-stage { padding: 72px 0 8px; }
	.muhr-lightbox-bar { padding: 8px 16px 88px; }
	.muhr-lightbox-prev, .muhr-lightbox-next { top: auto; bottom: 20px; }
	.muhr-lightbox-prev { left: 16px; }
	.muhr-lightbox-next { right: 16px; }
}
@media (prefers-reduced-motion: reduce) {
	.muhr-gallery img, [data-muhr-fav] svg path { transition: none; }
}

/* Saved suites bar (fixed): leave room for it at the end of the page.
   The height is set by muhr-suites.js (0 when nothing is saved). */
body { padding-bottom: var(--muhr-saved-bar-h, 0px); }
[data-muhr-saved-bar][hidden] { display: none !important; }
