/*
 * Locations page and single location (template-parts/location-card.php).
 * The hero and sticky menu reuse services-index.css; the breadcrumb reuses service.css rules below.
 */

.locations { max-width: 1100px; margin: 0 auto; padding: clamp(32px, 4vw, 64px) var(--gutter) 0; }

.location-card {
	display: grid;
	grid-template-columns: 480px 1fr;
	gap: clamp(28px, 4vw, 56px);
	align-items: start;
	padding: clamp(32px, 4vw, 56px) 0;
	border-top: 1px solid var(--rule);
	scroll-margin-top: calc(var(--header-h, 0px) + 80px);
}
.location-card:first-child { border-top: 0; }

/* The photo is a fixed 480 x 320, whatever the screen; the row of small pictures sits under it and the pair stays in view while the text scrolls. */
.location-media { width: 480px; max-width: 100%; position: sticky; top: calc(var(--header-h, 0px) + 84px); }
.location-photo-wrap { position: relative; }
.location-photo { width: 480px; max-width: 100%; aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--radius-photo); background: var(--surface-warm); }
.location-photo img { width: 100%; height: 100%; object-fit: cover; }
.location-photo img[data-tour-full], .location-thumb img[data-tour-full] { cursor: zoom-in; }
.javan-editing .location-media img[data-tour-full] { cursor: grab; }
.location-tour-btn { position: absolute; left: 12px; bottom: 12px; z-index: 2; padding: 10px 14px; border-radius: 3px; background: rgba(20, 16, 13, .82); color: var(--paper); font-family: var(--ui); font-size: var(--fs-button); letter-spacing: var(--label-tracking); text-transform: uppercase; cursor: pointer; transition: background .2s ease; }
.location-tour-btn:hover { background: var(--gold-surface); color: var(--on-gold); }

/* Small pictures: fixed 112 x 75 each, in one row that scrolls sideways when there are more than fit. */
.location-thumbs { display: flex; gap: 8px; margin-top: 10px; padding-bottom: 6px; overflow-x: auto; scrollbar-width: thin; }
.location-thumb { flex: 0 0 112px; width: 112px; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 4px; background: var(--surface-warm); }
.location-thumb-pic { display: block; width: 100%; height: 100%; }
.location-thumb img, .location-thumb img.javan-whole { width: 100%; height: 100% !important; aspect-ratio: auto !important; object-fit: cover !important; transition: opacity .2s ease; }
.location-thumb .location-thumb-pic:has(> img.javan-whole) { height: 100% !important; }
.location-thumb img:hover { opacity: .85; }
.location-media img[data-tour-full]:focus-visible, .location-tour-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.location-body .eyebrow { display: block; margin-bottom: 10px; }
.location-body h2 { font-size: var(--fs-h2); margin-bottom: 16px; }
.location-story p { font-size: var(--fs-body); line-height: var(--lh-text); margin-bottom: 14px; }

.location-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 32px; margin: 26px 0 28px; padding-top: 22px; border-top: 1px solid var(--rule); }
.location-detail .label { display: block; margin-bottom: 6px; }
.location-detail address { font-style: normal; font-size: var(--fs-small); line-height: 1.6; }
.location-detail a:not(.text-link) { font-size: var(--fs-body); }
.location-hours { display: block; font-size: var(--fs-small); line-height: 1.6; }
.location-rating { font-size: var(--fs-body); }
.location-rating .stars { color: var(--gold); letter-spacing: 2px; }

@media (max-width: 1000px) {
	.location-card { grid-template-columns: 360px 1fr; }
	.location-media, .location-photo { width: 360px; }
}

@media (max-width: 760px) {
	.location-card { grid-template-columns: 1fr; gap: 22px; }
	.location-media { position: static; width: 100%; max-width: 480px; }
	.location-photo { width: 100%; max-width: 480px; }
	.location-details { grid-template-columns: 1fr; }
}


/* ---------- The full-screen photo tour (template-parts/photo-tour.php) ---------- */

/* Above everything, the WordPress bar and the Edit button included: it is the whole screen while open. */
.tour { position: fixed; inset: 0; z-index: 100001; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: #0e0c0a; color: #f3f1ea; }
.tour[hidden] { display: none; }
.tour-bar { display: flex; align-items: center; gap: 20px; padding: 10px 12px 10px 24px; }
.tour-title { font-family: var(--serif); font-size: 24px; line-height: 1.2; }
.tour-count { margin-left: auto; font-family: var(--ui); font-size: 14px; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.tour-close { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: none; color: #f3f1ea; cursor: pointer; }
.tour-close:hover { background: rgba(243, 241, 234, .16); }
.tour-stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 0 84px; }
.tour-stage img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.tour-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; background: var(--gold-surface); border: 1px solid var(--gold-surface); cursor: pointer; }
.tour-nav[hidden] { display: none; }
.tour-nav::before { content: ''; position: absolute; top: 50%; left: 50%; width: 12px; height: 12px; border-left: 2px solid var(--on-gold); border-bottom: 2px solid var(--on-gold); transform: translate(-35%, -50%) rotate(45deg); }
.tour-nav.next::before { transform: translate(-65%, -50%) rotate(-135deg); }
.tour-nav.prev { left: 16px; }
.tour-nav.next { right: 16px; }
.tour-nav:hover { background: #f3f1ea; border-color: #f3f1ea; }
.tour-strip { display: flex; gap: 8px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); overflow-x: auto; scrollbar-width: thin; }
.tour-strip[hidden] { display: none; }
.tour-strip::before, .tour-strip::after { content: ''; margin: auto; } /* centered when they all fit, scrolls when they do not */
.tour-strip button { flex: 0 0 96px; width: 96px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: 3px; overflow: hidden; background: none; opacity: .5; cursor: pointer; transition: opacity .2s ease; }
.tour-strip button img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tour-strip button:hover { opacity: .85; }
.tour-strip button[aria-current="true"] { border-color: var(--gold); opacity: 1; }
.tour button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

@media (max-width: 700px) {
	.tour-bar { padding: 6px 6px 6px 16px; gap: 12px; }
	.tour-title { font-size: 20px; }
	.tour-stage { padding: 0; }
	.tour-nav { width: 44px; height: 44px; background: rgba(20, 16, 13, .7); border-color: rgba(243, 241, 234, .5); }
	.tour-nav::before { border-color: #f3f1ea; }
	.tour-nav.prev { left: 8px; }
	.tour-nav.next { right: 8px; }
	.tour-strip button { flex-basis: 72px; width: 72px; height: 48px; }
}
