/* Hub opening and search row, shared by the four hubs (tours, destinations, experiences, travel guide).
   Each hub then lays out what it holds in its own composition (pages/hub-*.css). */
@layer components {
.mp-hub { padding-block: 0 var(--band-y); }
.mp-hub > .mp-container { max-width: var(--w-wide); padding-inline: var(--gutter-bleed); }
.mp-hub .mp-archive__head--split { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-6); margin: 0 0 var(--s-10); padding: calc(var(--h-header) + var(--s-6)) 0 var(--s-8); border-block-end: 1px solid var(--c-rule-strong); }
.mp-hub .mp-archive__title { display: grid; gap: var(--s-4); align-content: start; }
.mp-hub .mp-archive__title .mp-label { font-size: var(--fs-label); font-weight: 600; letter-spacing: var(--track-label); text-transform: uppercase; color: var(--c-signal-text); }
.mp-hub .mp-archive__head h1 { margin: 0; font-family: var(--font-display); font-weight: 300; font-size: var(--fs-hub); line-height: 1; letter-spacing: -0.028em; max-width: 18ch; text-wrap: balance; }
.mp-hub .mp-archive__intro { max-width: 62ch; }
.mp-hub .mp-archive__intro .mp-lead { margin: 0; font-family: var(--font-display); font-size: var(--fs-body); line-height: 1.65; color: var(--c-ink); }
.mp-hub .mp-archive__aside { min-width: 0; }

/* Search row: one quiet line, never a toolbar. */
.mp-hub .mp-catalogue-filter { display: grid; gap: var(--s-2); margin: 0 0 var(--s-10); }
.mp-hub .mp-catalogue-filter label { font-size: var(--fs-label); font-weight: 600; letter-spacing: var(--track-label); text-transform: uppercase; color: var(--c-muted); }
.mp-hub .mp-catalogue-filter__controls { display: flex; gap: var(--s-3); }
.mp-hub .mp-catalogue-filter input { flex: 1 1 auto; min-width: 0; min-height: var(--h-input); padding: var(--s-3) var(--s-4); border: 1px solid var(--c-rule-strong); border-radius: var(--radius-control); background: var(--c-surface); font-family: var(--font-ui); }
.mp-hub .mp-catalogue-filter input:focus-visible { border-color: var(--c-deep); outline: 2px solid var(--c-signal-text); outline-offset: 2px; }
.mp-hub .mp-catalogue-filter [role="status"] { margin: 0; font-size: var(--fs-meta); color: var(--c-muted); font-variant-numeric: tabular-nums; }
.mp-hub .mp-catalogue-group + .mp-catalogue-group { margin-block-start: var(--s-16); }
.mp-hub .mp-catalogue-group__title { margin: 0 0 var(--s-6); font-family: var(--font-display); font-weight: 300; font-size: var(--fs-h2); line-height: 1.1; }
.mp-hub .mp-catalogue-empty { font-size: var(--fs-body); color: var(--c-muted); }

@media (min-width: 768px) {
    .mp-hub .mp-catalogue-filter { grid-template-columns: auto minmax(0, 30rem) 1fr; align-items: center; column-gap: var(--s-6); }
    .mp-hub .mp-catalogue-filter [role="status"] { text-align: end; }
}
@media (min-width: 1024px) {
    .mp-hub .mp-archive__head--split { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); column-gap: var(--s-16); row-gap: var(--s-6); padding-block: calc(var(--h-header) + var(--s-10)) var(--s-12); }
    .mp-hub .mp-archive__head--split > .mp-archive__intro { grid-column: 2; grid-row: 1; align-self: end; }
    /* With a photograph: title and intro stack on the left, straight after each other (the last row takes the
       spare height, so no gap opens between them); the photograph takes the right and both columns end together. */
    .mp-hub .mp-archive__head--split:has(.mp-archive__aside) { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); grid-template-rows: auto auto 1fr; align-items: start; row-gap: var(--s-8); }
    .mp-hub .mp-archive__head--split:has(.mp-archive__aside) > .mp-archive__title { grid-column: 1; grid-row: 1; align-self: end; padding-block-start: var(--s-12); }
    .mp-hub .mp-archive__head--split:has(.mp-archive__aside) > .mp-archive__intro { grid-column: 1; grid-row: 2; align-self: start; }
    .mp-hub .mp-archive__head--split > .mp-archive__aside { grid-column: 2; grid-row: 1 / span 3; }
    .mp-hub .mp-archive__head--split:has(.mp-hub-figure--landscape) { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); }
}

/* Hub photograph (inc/hub-map-image.php): shown whole, never cropped, in a quiet double frame: a Saffron line set
   off the picture's corner. Portrait pictures keep a reading height; landscape ones fill the column. */
.mp-hub-figure { position: relative; margin: 0; isolation: isolate; }
.mp-hub-figure::before { content: ""; position: absolute; inset: var(--s-3) calc(var(--s-3) * -1) calc(var(--s-3) * -1) var(--s-3); z-index: -1; border: 1px solid var(--c-signal); pointer-events: none; }
.mp-hub-figure__img { display: block; width: 100%; height: auto; object-fit: contain; background: var(--c-canvas-alt); }
.mp-hub-figure--portrait { max-width: 30rem; }
.mp-hub-figure--portrait .mp-hub-figure__img { max-height: min(78svh, 40rem); width: auto; max-width: 100%; }
@media (max-width: 767px) {
    .mp-hub-figure { margin-inline-end: var(--s-3); }
    .mp-hub-figure--portrait { max-width: none; }
    .mp-hub-figure--portrait .mp-hub-figure__img { width: 100%; max-height: none; }
}
@media (min-width: 1024px) {
    .mp-hub-figure { margin-inline-end: var(--s-4); }
    .mp-hub-figure--portrait { justify-self: end; margin-inline-start: auto; }
    .mp-hub-figure::before { inset: var(--s-5) calc(var(--s-5) * -1) calc(var(--s-5) * -1) var(--s-5); }
}
/* Arrival: the picture settles and its frame line draws in once. Transform and clip only; the photograph itself
   is never hidden (it can be the largest paint of the page). */
@media (prefers-reduced-motion: no-preference) {
    .mp-hub-figure__img { animation: mp-hub-settle var(--dur-settle) var(--ease-out) both; }
    .mp-hub-figure::before { animation: mp-hub-frame 900ms var(--ease-out) 200ms both; }
    @keyframes mp-hub-settle { from { transform: scale(1.03); } }
    @keyframes mp-hub-frame { from { clip-path: inset(0 100% 100% 0); } to { clip-path: inset(0 0 0 0); } }
}
}
