/**
 * A taxonomy index.
 *
 * Scoped to .wptm-index throughout, no !important, logical directions, and
 * grid minimums wrapped in min() so nothing can push a phone sideways.
 * Colours come from the tour stylesheet's accent, which the accent setting
 * already controls.
 */

.wptm-index,
.wptm-index *,
.wptm-index *::before,
.wptm-index *::after {
	box-sizing: border-box;
}

.wptm-index__wrap {
	max-width: 1180px;
	margin-inline: auto;
	padding-inline: 20px;
	padding-block: clamp(18px, 3vw, 34px) clamp(40px, 6vw, 72px);
}

.wptm-index__crumbs {
	margin-block-end: 14px;
	font-size: 13px;
}

.wptm-index__head {
	margin-block-end: clamp(20px, 3vw, 32px);
}

.wptm-index__title {
	margin: 0;
	font-family: inherit;
	font-weight: 600;
	line-height: 1.14;
	letter-spacing: -0.02em;
	font-size: clamp(1.8rem, 4vw, 2.6rem);
	text-wrap: balance;
}

.wptm-index__count {
	margin: 8px 0 0;
	font-size: 0.9rem;
	color: var(--wptm-muted, #5b6472);
}

/* ============================================================== GRID ==== */

.wptm-index__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
	gap: clamp(14px, 2vw, 22px);
	margin: 0;
	padding: 0;
	list-style: none;
}

.wptm-index__item {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* The whole card is one link: three links to one address are three tab stops
   and three entries in a screen reader's link list for the same page. */
.wptm-index__card {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	border: 1px solid var(--wptm-line, rgba(0, 30, 83, 0.12));
	border-radius: 14px;
	background: #fff;
	text-decoration: none;
	color: inherit;
	transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.wptm-index__card:hover {
	transform: translateY(-3px);
	border-color: rgba(0, 30, 83, 0.2);
	box-shadow: 0 16px 36px rgba(0, 30, 83, 0.1);
}

.wptm-index__card:focus-visible {
	outline: 2px solid var(--wptm-accent, #b8853a);
	outline-offset: 3px;
}

.wptm-index__media {
	display: block;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	background: rgba(0, 30, 83, 0.06);
}

.wptm-index .wptm-index__img {
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
	display: block;
	transition: transform 0.7s ease;
}

.wptm-index__card:hover .wptm-index__img {
	transform: scale(1.04);
}

.wptm-index__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	gap: 6px;
	padding: 15px 17px 17px;
}

.wptm-index__name {
	font-size: 1.04rem;
	font-weight: 600;
	line-height: 1.4;
}

.wptm-index__note {
	font-size: 0.88rem;
	line-height: 1.6;
	color: var(--wptm-muted, #5b6472);
}

.wptm-index__count-badge {
	margin-block-start: auto;
	padding-block-start: 10px;
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--wptm-accent-dark, #94682a);
}

.wptm-index__empty {
	margin: 0;
	color: var(--wptm-muted, #5b6472);
}

@media (max-width: 600px), (pointer: coarse) {
	.wptm-index__card {
		min-height: 44px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wptm-index__card,
	.wptm-index__img {
		transition-duration: 0.01ms;
	}

	.wptm-index__card:hover,
	.wptm-index__card:hover .wptm-index__img {
		transform: none;
	}
}

/* ==========================================================================
 * Directory pages, revisited.
 *
 * The trail set as one line (the list rules live in the tour stylesheet,
 * which this page does not load); the owner's intro under the heading; a
 * quick filter for a long list; the count as a pill on the picture and a
 * marked tile where there is no picture; an "explore" line at the foot of
 * every card; and the closing band the landing pages end on.
 * ========================================================================== */

/* --- The trail ---------------------------------------------------------- */
.wptm-index__crumbs .wptm-crumbs__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.wptm-index__crumbs .wptm-crumbs__list li {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
	color: var(--wptm-faint, #8b93a1);
}

.wptm-index__crumbs .wptm-crumbs__list li::marker {
	content: "";
}

.wptm-index__crumbs .wptm-crumbs__list li + li::before {
	content: "\203A";
	line-height: 1;
	color: var(--wptm-accent, #b8853a);
	opacity: .7;
}

[dir="rtl"] .wptm-index__crumbs .wptm-crumbs__list li + li::before {
	content: "\2039";
}

.wptm-index__crumbs .wptm-crumbs__list a {
	color: var(--wptm-navy, #001e53);
	text-decoration: none;
	border-block-end: 1px solid transparent;
	transition: color .16s ease, border-color .16s ease;
}

.wptm-index__crumbs .wptm-crumbs__list a:hover {
	color: var(--wptm-accent, #b8853a);
	border-color: currentColor;
}

/* --- The head ----------------------------------------------------------- */
.wptm-index__intro {
	max-width: 66ch;
	margin-block-start: 14px;
	font-size: 1.02rem;
	line-height: 1.7;
	color: var(--wptm-muted, #5b6472);
	text-wrap: pretty;
}

.wptm-index__intro p {
	margin: 0 0 .8em;
}

.wptm-index__intro p:last-child {
	margin-block-end: 0;
}

/* --- The quick filter --------------------------------------------------- */
.wptm-index__find {
	display: flex;
	align-items: center;
	gap: 10px;
	max-width: 440px;
	margin: 0 0 clamp(18px, 3vw, 28px);
	padding: 4px 6px 4px 14px;
	border: 1px solid var(--wptm-line, rgba(0, 30, 83, 0.12));
	border-radius: 999px;
	background: #fff;
	transition: border-color .16s ease, box-shadow .16s ease;
}

.wptm-index__find:focus-within {
	border-color: var(--wptm-accent, #b8853a);
	box-shadow: 0 0 0 3px rgba(184, 133, 58, .18);
}

.wptm-index__findlabel {
	display: inline-flex;
	color: var(--wptm-accent-dark, #94682a);
	line-height: 0;
}

.wptm-index__findinput {
	flex: 1 1 auto;
	min-width: 0;
	min-height: 40px;
	padding: 0;
	border: 0;
	background: transparent;
	font: inherit;
	font-size: 16px;
	color: inherit;
	outline: none;
}

.wptm-index__findinput::-webkit-search-cancel-button {
	cursor: pointer;
}

.wptm-index__findcount {
	flex: 0 0 auto;
	padding: 4px 10px;
	border-radius: 999px;
	background: rgba(0, 30, 83, 0.06);
	font-size: .78rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	color: var(--wptm-muted, #5b6472);
}

.wptm-index__findcount:empty {
	display: none;
}

.wptm-index__none {
	margin: 8px 0 0;
	padding: 18px 20px;
	border: 1px dashed var(--wptm-line, rgba(0, 30, 83, 0.12));
	border-radius: 12px;
	text-align: center;
	color: var(--wptm-muted, #5b6472);
}

/* --- The cards ---------------------------------------------------------- */
.wptm-index__media {
	position: relative;
}

.wptm-index__pill {
	position: absolute;
	inset-block-start: 12px;
	inset-inline-start: 12px;
	padding: 5px 10px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .92);
	font-size: .76rem;
	font-weight: 700;
	letter-spacing: .02em;
	color: var(--wptm-accent-dark, #94682a);
	box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}

/* A tile for a card with no picture: the site colour, a large faint mark of
   what the page lists, and the same shape as a photograph so the grid keeps
   its rhythm. */
.wptm-index__media--plain {
	display: grid;
	place-items: center;
	background:
		radial-gradient(ellipse 80% 70% at 100% 100%, rgba(255, 255, 255, .22), transparent 70%),
		linear-gradient(150deg, var(--wptm-accent, #b8853a), var(--wptm-accent-dark, #94682a));
}

.wptm-index__glyph {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .16);
	color: rgba(255, 255, 255, .92);
	line-height: 0;
	transition: transform .5s ease;
}

.wptm-index__card:hover .wptm-index__glyph {
	transform: scale(1.06);
}

.wptm-index__card--plain .wptm-index__pill {
	display: none;
}

.wptm-index__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-block-start: auto;
	padding-block-start: 12px;
	border-block-start: 1px solid var(--wptm-line, rgba(0, 30, 83, 0.12));
}

.wptm-index__foot .wptm-index__count-badge {
	margin: 0;
	padding: 0;
}

.wptm-index__go {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: .82rem;
	font-weight: 600;
	color: var(--wptm-navy, #001e53);
	transition: color .16s ease, gap .2s ease;
}

.wptm-index__card:hover .wptm-index__go {
	color: var(--wptm-accent, #b8853a);
	gap: 10px;
}

[dir="rtl"] .wptm-index__go {
	flex-direction: row-reverse;
}

/* --- The closing band --------------------------------------------------- */
.wptm-index__cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 24px 40px;
	margin-block-start: clamp(36px, 5vw, 64px);
	padding: clamp(28px, 4vw, 48px);
	border-radius: 18px;
	background:
		radial-gradient(ellipse 60% 80% at 100% 100%, rgba(245, 165, 0, .18), transparent 70%),
		linear-gradient(160deg, #000b22 0%, #001e53 60%, #0a2f63 100%);
	color: #f5f1e8;
	box-shadow: 0 24px 60px rgba(0, 30, 83, .18);
}

.wptm-index__cta-copy {
	flex: 1 1 380px;
	max-width: 60ch;
}

.wptm-index__eyebrow {
	margin: 0 0 8px;
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--wptm-gold, #f5a500);
}

.wptm-index__cta-title {
	margin: 0 0 10px;
	font-size: clamp(1.4rem, 2.6vw, 2rem);
	line-height: 1.2;
	letter-spacing: -0.01em;
	color: #fff;
	text-wrap: balance;
}

.wptm-index__cta-lead {
	margin: 0;
	font-size: 1rem;
	line-height: 1.6;
	color: rgba(255, 255, 255, .78);
	text-wrap: pretty;
}

.wptm-index__cta-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.wptm-index__btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 14px 22px;
	border-radius: 999px;
	font-size: .98rem;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	transition: transform .18s ease, background-color .18s ease, border-color .18s ease;
}

.wptm-index__btn svg {
	width: 18px;
	height: 18px;
}

.wptm-index__btn--wa {
	background: #25d366;
	color: #062a14;
}

.wptm-index__btn--wa:hover {
	background: #1fbf5b;
	transform: translateY(-2px);
}

.wptm-index__btn--all {
	border: 1.5px solid rgba(255, 255, 255, .45);
	color: #fff;
}

.wptm-index__btn--all:hover {
	border-color: #fff;
	background: rgba(255, 255, 255, .08);
	transform: translateY(-2px);
}

.wptm-index__btn:focus-visible {
	outline: 2px solid var(--wptm-gold, #f5a500);
	outline-offset: 3px;
}

/* The hidden label text. */
.wptm-index .wptm-vh {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

@media (max-width: 640px) {
	.wptm-index__cta-actions,
	.wptm-index__btn {
		width: 100%;
		justify-content: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wptm-index__glyph,
	.wptm-index__go,
	.wptm-index__btn,
	.wptm-index__find,
	.wptm-index__crumbs .wptm-crumbs__list a {
		transition: none;
	}

	.wptm-index__card:hover .wptm-index__glyph,
	.wptm-index__btn:hover {
		transform: none;
	}
}
