/* Hey Xi'an home page design (ported from the Chengdu Expat home). Loaded only on the front page. */
/*
 * Chengdu Expat — design refresh layer.
 * Loaded after style.css. Additive: only restyles, never removes content or
 * changes ad banner sizes. Dark mode follows html[data-theme] (auto from the
 * visitor's device setting, set by the toggle script in functions.php).
 */
/* ---- Listing (place / event) hero: fix the black strip, add a readable scrim ---- */
/* The hero content block already has its own top padding; on phones keep the stack compact */
/* ---- Listing sidebar + body: calm panels ---- */
/* ---- Listing tabs bar ---- */
/* ---- Cards: calmer corners, gentle hover ---- */
/* ---- Category chips ---- */
/* ---- Home hero type ---- */
/* ---- Focus visibility (accessibility) ---- */
/* ==========================================================================
 * Step 2 — Home page
 * ========================================================================== */
/* Section headings */
.home-widget .widget-title,
.home-widget .widget-title h2 {
	font-weight: 500;
	letter-spacing: -.01em;
}
.home-widget .widget-title h2 {
	font-size: clamp(24px, 2.4vw, 32px);
}
/* Recent news: same image shape, cards in a row share one height */
/* ==========================================================================
 * Step 3 — Place / event detail pages
 * ========================================================================== */
/* Facts list in the sidebar */
/* ==========================================================================
 * Step 4 — Articles and listing cards
 * ========================================================================== */
/* Article: comfortable reading */
/* GeoDirectory listing cards (events / places archives and widgets) */
/* ==========================================================================
 * Listing hero: legible badge, date, rating links and buttons on any photo
 * (the dark theme was painting red links and dark boxes on top of the image)
 * ========================================================================== */
/* Category badge in the listing hero: compact pill, icon in a white circle, text beside it */
/* ==========================================================================
 * Home hero + header: dark mode and small screens
 * ========================================================================== */
/* Dark mode: the search pill matches the dark theme instead of a black field on a white pill */
/* Dark mode: the hamburger icon was black on the dark bar */
/* Phones/tablets: the header bar spans the full width instead of a small floating box */
/* ==========================================================================
 * Dark mode logo: the white/transparent version replaces the white badge
 * (the normal logo is a JPG with a baked-in white background).
 * ========================================================================== */
/* Favourite heart stays visible on pale photos */
/* ==========================================================================
 * Article lists (category archives such as Tips & Essentials)
 * ========================================================================== */
/* Very small source images: show them whole, centred, instead of stretching them */
/* Whole card is clickable (the title link stretches over it) */
/* "Read more" becomes a quiet text link */
/* Pagination: round buttons, "Page X of Y" as a small caption */
/* ==========================================================================
 * Detail pages: match the approved mockup (radius, spacing, facts card)
 * ========================================================================== */
/* Hero: the content block had a 320px top padding on desktop (hero ~660px tall) */
/* Admin-only hint box: same rounded language */
/* Facts card (sidebar): one clean list with hairline dividers instead of boxed rows */
/* ==========================================================================
 * Sidebars: widgets that list cards (News, Upcoming events, Latest news) have
 * no panel of their own — the cards themselves are the panels. Widgets that
 * are a single block (facts, map, actions) keep their card.
 * ========================================================================== */
/* The cards keep their border, radius and a hairline shadow */
/* Distance badge: neutral chip instead of the default blue */
/* ==========================================================================
 * Facts card (place/event sidebar): small label above each value, accent
 * icons, category/tag chips, no duplicated event title
 * ========================================================================== */
/* The event title is already the page heading */
/* Categories and tags as chips (font-size 0 hides the ", " and "and" between links) */
/* Address on one line: street, city, region */
/* ==========================================================================
 * Map card: rounded map, pill-shaped directions field, no dead space
 * ========================================================================== */
/* ==========================================================================
 * Reviews and rating form (light + dark)
 * ========================================================================== */
/* "Post review": brand button (the dark theme was turning it into a dark box) */
/* "Select a rating" tooltip: white text on light grey was unreadable */
/* Dark mode: body-size links in the red #c83232 only reach ~3:1 on the dark surface; lighten them */
/* The row rule above (font-size 15px) out-ranked the chip rows' font-size:0, so the ", " and "and" between chips stayed visible */
/* ==========================================================================
 * Section intro (category pages, see mu-plugins/hx-seo-content.php)
 * ========================================================================== */
/* ==========================================================================
 * Forms, buttons, search badges, static pages and footer
 * ========================================================================== */
/* Buttons: brand red everywhere (the default outline buttons were blue/green) */
/* Add Place / Add Event: labels above the fields instead of a left column */
/* Search results: type badges (Article / Event / Place) in one neutral style */
/* Static pages (add listing, account, contact...): the content box matches the cards */
/* Shared site footer */
/* ==========================================================================
 * Hero thumbnails (mu-plugins/hx-listing-gallery.php): the other photos of a
 * listing as small rounded thumbnails inside the hero; "+N" opens the Photos section
 * ========================================================================== */
/* Reserve space for the mobile menu above the homepage hero. */
/* Compact split hero on the homepage. */
.hx-home-hero {
	background: inherit;
	color: var(--hx-ink);
}
.hx-home-hero__inner,
.hx-home-editorial {
	width: calc(100% - 30px);
	margin-inline: auto;
}
.hx-home-hero__inner {
	display: grid;
	grid-template-columns: minmax(0, 1.24fr) minmax(0, 1fr);
	align-items: center;
	gap: clamp(17px, 3vw, 50px);
	padding-block: clamp(21px, 2.8vw, 46px);
}
.hx-home-hero__location,
.hx-home-hero__kicker {
	color: var(--hx-accent);
	font-size: .75rem;
	font-weight: 500;
	letter-spacing: .14em;
	text-transform: uppercase;
}
.hx-home-hero__location {
	display: flex;
	align-items: center;
	gap: .65rem;
	margin: 0;
}
.hx-home-hero__location::before {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: currentColor;
	content: "";
}
.hx-home-hero__location span {
	letter-spacing: .03em;
}
.hx-home-hero h1 {
	margin: 13px 0 10px;
	color: var(--hx-ink);
	font-size: clamp(34px, 4vw, 66px);
	font-weight: 500;
	letter-spacing: -.035em;
	line-height: 1.02;
}
.hx-home-hero h1 em,
.hx-home-editorial__heading h2 em,
.hx-events__heading h2 em,
body.home .widget-title h2 em {
	font-family: Baskerville, Georgia, "Times New Roman", serif;
	font-style: italic;
	font-weight: 400;
	letter-spacing: -.025em;
}
.hx-home-hero h1 em { color: var(--hx-accent); }
.hx-home-hero__lead {
	margin: 0 0 15px;
	color: var(--hx-muted);
	font-size: clamp(16px, 1.55vw, 21px);
}
.hx-home-hero__search {
	display: flex;
	width: min(100%, 495px);
	padding: 5px;
	border: 1px solid var(--hx-line);
	border-radius: 999px;
	background: var(--hx-surface);
}
.hx-home-hero__search input {
	flex: 1;
	min-width: 0;
	padding: 8px 12px;
	border: 0;
	border-radius: inherit;
	background: transparent;
	color: var(--hx-ink);
}
.hx-home-hero__search input::placeholder {
	color: var(--hx-muted);
}
.hx-home-hero__search button {
	padding: 8px 14px;
	border: 0;
	border-radius: inherit;
	background: var(--hx-accent);
	color: #fff;
	cursor: pointer;
}
.hx-home-hero__search button:hover {
	filter: brightness(.88);
}
.hx-home-hero__shortcuts {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 14px;
	margin-top: 9px;
}
.hx-home-hero__shortcuts a {
	padding: 5px 12px;
	border: 1px solid var(--hx-line);
	border-radius: 999px;
	color: var(--hx-ink);
}
.hx-home-hero__shortcuts a:hover {
	background: var(--hx-chip);
}
.hx-home-hero__story {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: 18px;
	background: var(--hx-chip);
}
.hx-home-hero__story img {
	display: block;
	width: 100%;
	height: clamp(249px, 25.2vw, 392px);
	object-fit: cover;
	object-position: center 43%;
	transition: transform .25s ease;
}
.hx-home-hero__story:hover img {
	transform: scale(1.025);
}
.hx-home-hero__caption {
	position: absolute;
	inset: auto 14px 14px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 10px 14px;
	border-radius: 10px;
	background: var(--hx-surface);
}
.hx-home-hero__caption h2 {
	margin: 4px 0 0;
	color: var(--hx-ink);
	font-size: clamp(17px, 1.65vw, 24px);
	line-height: 1.2;
	overflow-wrap: anywhere;
}
.hx-home-hero__arrow {
	color: var(--hx-accent);
	font-size: 22px;
}
html[data-theme="dark"] .hx-home-hero :is(h1 em, .hx-home-hero__location, .hx-home-hero__kicker, .hx-home-hero__arrow) {
	color: #8fd6bd;
}
@media (max-width: 700px) {
.hx-home-hero__inner {
		grid-template-columns: 1fr;
		gap: 16px;
		padding-block: 20px;
	}
.hx-home-hero h1 {
		font-size: clamp(34px, 8vw, 52px);
	}
.hx-home-hero__story img {
		height: clamp(189px, 53.2vw, 284px);
	}
}
@media (prefers-reduced-motion: reduce) {
.hx-home-hero__story img {
		transition: none;
	}
}
/* Clean Home editorial sections and existing sponsor widgets. */
.hx-home-editorial {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(220px, 24%);
	align-items: start;
	gap: clamp(12px, 1.8vw, 26px);
	padding-block: 34px 44px;
	color: var(--hx-ink);
}
.hx-home-editorial__main {
	min-width: 0;
}
.hx-home-editorial__main > section + section {
	margin-top: 34px;
}
.hx-home-editorial__heading {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 20px;
	padding-bottom: 13px;
	border-bottom: 1px solid var(--hx-line);
}
.hx-home-editorial__heading h2 {
	margin: 0;
	color: var(--hx-ink);
	font-size: clamp(24px, 2.6vw, 34px);
	line-height: 1.15;
}
.hx-home-editorial__heading a,
.hx-home-editorial__category {
	color: var(--hx-accent);
}
.hx-home-editorial__heading a {
	font-size: 14px;
	white-space: nowrap;
}
.hx-home-editorial__columns {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(12px, 1.8vw, 26px);
}
.hx-home-editorial__story {
	display: flex;
	align-items: center;
	gap: 9px;
	padding-block: 10px;
	border-bottom: 1px solid var(--hx-line);
	color: var(--hx-ink);
}
.hx-home-editorial__story:first-child {
	padding-top: 0;
}
.hx-home-editorial__story img {
	flex: 0 0 auto;
	width: clamp(42px, 4.1vw, 58px);
	height: auto;
	aspect-ratio: 1.2;
	object-fit: cover;
	border-radius: 6px;
}
.hx-home-editorial__copy {
	min-width: 0;
}
.hx-home-editorial__category {
	display: block;
	margin-bottom: 4px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .08em;
}
.hx-home-editorial__story h3 {
	margin: 0;
	color: var(--hx-ink);
	font-size: clamp(14px, 1.2vw, 17px);
	line-height: 1.22;
	overflow-wrap: anywhere;
}
.hx-home-editorial__story:hover h3 {
	text-decoration: underline;
	text-underline-offset: 3px;
}
.hx-home-editorial__story--lead {
	display: block;
	overflow: hidden;
	padding: 0;
	border: 0;
	border-radius: 13px;
	background: var(--hx-chip);
}
.hx-home-editorial__story--lead img {
	display: block;
	width: 100%;
	aspect-ratio: 1.55;
	border-radius: 0;
}
.hx-home-editorial__story--lead .hx-home-editorial__copy {
	padding: 14px;
}
.hx-home-editorial__story--lead h3,
.hx-home-editorial__story--lead p {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}
.hx-home-editorial__story--lead h3 {
	font-size: clamp(19px, 2.1vw, 30px);
	line-height: 1.13;
	letter-spacing: -.04em;
}
.hx-home-editorial__story--lead p {
	margin: 8px 0 0;
	color: var(--hx-muted);
	font-size: 14px;
	line-height: 1.4;
}
.hx-home-editorial__rail {
	min-width: 0;
	margin-top: 60px;
	padding-left: 16px;
	border-left: 1px solid var(--hx-line);
}
.home .hx-home-editorial__rail #sow-editor-2 {
	width: 100%;
	max-width: none;
	padding: 0;
}
.hx-home-editorial__rail img {
	display: block;
	width: 100%;
	height: auto;
}
html[data-theme="dark"] .hx-home-editorial :is(.hx-home-editorial__heading a, .hx-home-editorial__category) {
	color: #8fd6bd;
}
@media (max-width: 1050px) {
.hx-home-editorial {
		grid-template-columns: minmax(0, 1fr);
	}
.hx-home-editorial__rail {
		width: min(100%, 340px);
		margin: 0 auto;
		padding: 15px 0 0;
		border: 0;
		border-top: 1px solid var(--hx-line);
	}
}
@media (max-width: 760px) {
.hx-home-editorial__columns {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
.hx-home-editorial__column:has(.hx-home-editorial__story--lead) {
		grid-column: 1 / -1;
	}
}
@media (max-width: 540px) {
.hx-home-editorial__columns {
		grid-template-columns: minmax(0, 1fr);
	}
}
.hx-home-editorial__story:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
.hx-home-editorial__story {
		transition: transform .18s ease;
	}
.hx-home-editorial__story img {
		transition: transform .22s ease;
	}
.hx-home-editorial__story:hover {
		transform: translateY(-2px);
	}
.hx-home-editorial__story:hover img {
		transform: scale(1.03);
	}
}
/* Homepage event discovery */
.hx-events {
	--hx-event-accent: var(--hx-accent);
	background: #efe8de;
	color: var(--hx-ink);
	padding: clamp(24px, 4vw, 60px) 15px;
}
html[data-theme="dark"] .hx-events {
	--hx-event-accent: #8fd6bd;
	background: #221d1a;
}
.hx-events [hidden] { display: none !important; }
.hx-events__heading {
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 8px 20px;
	margin-bottom: 20px;
}
.hx-events__heading h2 {
	color: inherit;
	font-size: clamp(29px, 4vw, 56px);
	letter-spacing: -.035em;
	margin: 0;
}
.hx-events__heading :is(em, a),
.hx-events__card-copy > span { color: var(--hx-event-accent); }
.hx-events__slider { position: relative; }
.hx-events__slide {
	position: relative;
	display: grid;
	align-items: end;
	min-height: clamp(285px, 31vw, 465px);
	isolation: isolate;
	overflow: hidden;
	border-radius: var(--hx-radius);
	background: #201715;
	color: #f3faf7 !important;
	text-decoration: none !important;
}
.hx-events__slide img,
.hx-events__slide::before {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}
.hx-events__slide img { object-fit: cover; object-position: center 30%; z-index: -2; }
.hx-events__slide::before {
	content: "";
	background: linear-gradient(0deg, rgba(20,12,13,.93), transparent 80%);
	z-index: -1;
}
.hx-events__slide-copy { display: grid; gap: 5px; padding: clamp(18px, 3vw, 40px); }
.hx-events__slide-copy > span:first-child { color: #d3efe4; font-size: .9rem; }
.hx-events__slide-copy strong { font-size: clamp(25px, 3.2vw, 46px); line-height: 1.12; }
.hx-events__arrows { position: absolute; top: 14px; right: 14px; display: flex; gap: 8px; }
.hx-events__arrows button {
	border: 1px solid #ffffff75;
	border-radius: 50%;
	width: 44px;
	height: 44px;
	background: #211719e0;
	color: white;
	font-size: 1.5rem;
	cursor: pointer;
}
.hx-events__filters {
	display: flex;
	gap: clamp(15px, 3vw, 42px);
	overflow-x: auto;
	border-bottom: 1px solid color-mix(in srgb, var(--hx-muted) 35%, transparent);
	margin: 20px 0 24px;
}
.hx-events__filters button {
	flex: none;
	background: transparent;
	color: var(--hx-muted);
	border: 0;
	border-bottom: 3px solid transparent;
	padding: 12px 0 9px;
	cursor: pointer;
	font: inherit;
}
.hx-events__filters button[aria-pressed="true"] {
	color: var(--hx-event-accent);
	border-color: currentColor;
	font-weight: 500;
}
.hx-events__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.hx-events__grid--five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.hx-events__card {
	display: block;
	overflow: hidden;
	border-radius: var(--hx-radius);
	background: var(--hx-surface);
	color: var(--hx-ink) !important;
	text-decoration: none !important;
}
.hx-events__poster { display: block; aspect-ratio: 1.6; background: var(--hx-chip); overflow: hidden; }
.hx-events__poster img { width: 100%; height: 100%; object-fit: cover; transition: transform 180ms ease; }
.hx-events__card:hover img { transform: scale(1.03); }
.hx-events__card-copy { display: grid; gap: 5px; padding: 13px 15px 17px; line-height: 1.22; }
.hx-events__card-copy > span { font-size: .85rem; }
.hx-events__card-copy strong { font-size: clamp(15px, 1.4vw, 21px); }
.hx-events :is(a, button):focus-visible { outline: 2px solid var(--hx-event-accent); outline-offset: -3px; }
@media (max-width: 1000px) {
.hx-events__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
.hx-events__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.hx-events__card-copy { padding: 10px 11px 13px; }
}
@media (prefers-reduced-motion: reduce) {
.hx-events__poster img { transition: none; }
}
/* Single event pages */
/* Article category archives */
/* Site search uses the same cards and title treatment as the article archives. */
/* About and Gap Club */
/* ==========================================================================
 * Design refresh v2 — accessibility, scale, seals.
 * China-hosting rules for this block: no web fonts, no CDN, no new requests.
 * Chinese glyphs use the visitor's installed CJK system font only.
 * ========================================================================== */
/* --- Home body copy to 16px; the rest of the site keeps the theme default for now --- */
/* --- Primary nav: 12.6px -> 14px, one weight, comfortable hit area --- */
/* --- Nothing below 12px --- */
.hx-home-editorial__category,
.hx-home-hero__location,
.hx-home-hero__kicker { font-size: .75rem; }
/* --- 44px tap targets for homepage controls --- */
.hx-home-hero__shortcuts a,
.hx-home-editorial__heading a,
.hx-events__filters button {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
}
.hx-home-hero__search button { min-height: 44px; padding-inline: 18px; }
.hx-events__filters { gap: clamp(8px, 2vw, 32px); }
.hx-events__filters button { padding-inline: 8px; }
/* --- Dark mode: restore ink where the global link colour used to leak in --- */
html[data-theme="dark"] .hx-home-hero__shortcuts a,
html[data-theme="dark"] .hx-events__card { color: var(--hx-ink) !important; }
html[data-theme="dark"] .hx-events__slide { color: #fff !important; }
/* --- Seals: one Chinese character per directory category (also what a driver can read) --- */
/* old FA / map-pin icons: the seal replaces them */
/* --- Small inline controls: grow the hit area without changing the layout --- */
/* ==========================================================================
 * Design refresh v3 — articles, places and events archives.
 * Same China-hosting rules as v2: no new requests, no web fonts.
 * ========================================================================== */
/* Event dates and times were 11px: they are the key fact on an event card */
/* Unrated places: five solid stars read as a perfect score, so show them as empty */
/* 44px hit areas: pagination, sort / view buttons, search button, category lists, topic tabs */
/* Breadcrumbs stay compact; the clickable area grows invisibly */
/* ==========================================================================
 * Homepage section titles: one style. Plain, same size, left-aligned.
 * The red italic word stays in the hero headline only.
 * ========================================================================== */
.hx-events__heading h2,
.hx-home-editorial__heading h2,
body.home .widget-title h2 {
	color: var(--hx-ink);
	font-size: clamp(24px, 2.6vw, 34px);
	font-weight: 500;
	letter-spacing: -.02em;
	line-height: 1.15;
}
.hx-events__heading h2 { color: inherit; }
body.home .widget-title.text-center { text-align: left !important; }
/* ==========================================================================
 * Single place and event pages: the refreshed layout (class .hx-gap, set in
 * inc/listing-layout.php) now applies to every listing. Event-specific tuning.
 * ========================================================================== */
/* Events: date prefix pulled out of the title as a small red eyebrow */
/* Every place and event (Gap Club included): full-width photo, text straight on it.
   Light mode: a soft light fade on the text side so the title can be black, with the
   last word in red italic serif. Dark mode: dark fade, white title, coral accent. */
/* Light mode: the text side is pale, so use dark text there (share / review stay on the photo side) */
@media (max-width: 767px) {
/* Phone: the text sits low on the photo, so the fade comes from the bottom */
}
/* Detail-page section headings: one size */
/* In-page navigation: 44px targets */
/* Place and event archive headings: "Restaurants in Chengdu", "What's on in Chengdu" */
/* Home widget titles (What are you looking for?, Most read, Places to know in Chengdu):
   same rule line, spacing and weight as Recent news / Useful info. */
body.home .widget-title {
	margin-bottom: 20px;
	padding-bottom: 13px;
	border-bottom: 1px solid var(--hx-line);
}
body.home .widget-title h2 { margin: 0; }
/* ==========================================================================
 * Single place / event sidebar: use the space.
 * The facts column was a short stack beside a very long page. It now stays in
 * view while you read (js/sticky-sidebar.js), and the facts card is denser.
 * ========================================================================== */
/* Short facts sit side by side; long ones (date, address) keep the full width */
@media (max-width: 991px) {
/* Narrow sidebar: one column again */
}
/* Widget cards in the sidebar (news, upcoming events): shorter images */
/* Home section titles: red italic last word (coral in dark mode), like the hero */
.hx-home-editorial__heading h2 em,
body.home .widget-title h2 em { color: var(--hx-accent); }
html[data-theme="dark"] .hx-home-editorial__heading h2 em,
html[data-theme="dark"] body.home .widget-title h2 em { color: #8fd6bd; }
/* ==========================================================================
 * Single article (all posts): breadcrumb, eyebrow, big title with a red
 * italic last word, meta line, photo, readable text, sticky sidebar.
 * ========================================================================== */
/* ==========================================================================
 * Maps (places, events, single listings): clusters, markers, popups.
 * Clustering is switched on in functions.php (client side, library from the
 * GeoDirectory Marker Cluster add-on on this domain, nothing from outside China).
 * ========================================================================== */
/* Map popup card: photo, category, title, street, button */

/* Hey Xi'an has no sponsor rail beside the news, so the editorial block uses the full width. */
.hx-home-editorial.hx-home-editorial--solo { grid-template-columns: minmax(0, 1fr); }

/* Phones/tablets: the site header floats above the page; make it full width and keep the hero clear of it. */
@media (max-width: 991.98px) {
	body.home #wrapper-navbar { width: 100%; left: 0; right: 0; }
	body.home .hx-home-hero { padding-top: 96px; }
}
