/*
 * 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).
 */
:root {
	--ce-surface: #ffffff;
	--ce-ink: #1e1a17;
	--ce-muted: #645b54;
	--ce-line: #e8e1d9;
	--ce-chip: #f1ebe3;
	--ce-accent: #a30000;
	--ce-radius: 18px;
	--ce-shadow: 0 10px 28px rgba(0, 0, 0, .10);
}
html[data-theme="dark"] {
	--ce-surface: #1a1a1a;
	--ce-ink: #f1ece6;
	--ce-muted: #b5aaa0;
	--ce-line: #2e2a27;
	--ce-chip: #2a2625;
	--ce-shadow: 0 10px 28px rgba(0, 0, 0, .55);
}

/* ---- Listing (place / event) hero: fix the black strip, add a readable scrim ---- */
.listing-hero .jumbotron {
	padding: 0 !important;
	min-height: clamp(280px, 36vw, 440px);
	display: flex;
	align-items: flex-end;
}
.listing-hero .listing-hero-img {
	left: 0 !important;
	right: 0 !important;
	top: 0 !important;
	bottom: 0 !important;
	width: 100% !important;
}
.listing-hero .jumbotron:before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: linear-gradient(180deg, rgba(10, 8, 6, 0) 30%, rgba(10, 8, 6, .78) 100%);
}
.listing-hero .jumbotron > .container {
	position: relative;
	z-index: 2;
	padding-top: 0 !important;
	padding-bottom: 28px;
}
/* The hero content block already has its own top padding; on phones keep the stack compact */
@media (max-width: 576px) {
	.listing-hero .listing-hero-content {
		padding-top: 120px !important;
		padding-bottom: 20px !important;
	}
	.listing-hero .breadcrumb {
		font-size: 12px;
		margin-bottom: 6px;
	}
	.listing-hero .right-info {
		margin-top: 8px !important;
	}
}
.listing-hero h1 {
	font-size: clamp(28px, 3.6vw, 44px) !important;
	line-height: 1.15;
	font-weight: 500;
	letter-spacing: -.01em;
	text-shadow: 0 2px 14px rgba(0, 0, 0, .35);
}

/* ---- Listing sidebar + body: calm panels ---- */
#listing-right-sidebar .card,
.details-page1 .content-area .card {
	border-radius: var(--ce-radius) !important;
	border: 1px solid var(--ce-line) !important;
	background: var(--ce-surface) !important;
	box-shadow: none !important;
}
#listing-right-sidebar .widget-area .card,
#listing-right-sidebar .card {
	margin-bottom: 20px;
}
#listing-right-sidebar .card:has(.geodir-map-canvas),
#listing-right-sidebar .card:has(.geodir-map-wrap) {
	overflow: hidden;
}

/* ---- Listing tabs bar ---- */
#listing-menu.listing-nav {
	border-bottom: 1px solid var(--ce-line);
	box-shadow: none;
}
#listing-menu .nav-link {
	font-weight: 500;
}

/* ---- Cards: calmer corners, gentle hover ---- */
.card.card-blog {
	border-radius: var(--ce-radius) !important;
	overflow: hidden;
	transition: box-shadow .2s ease, transform .2s ease;
}
.card.card-blog:hover {
	transform: translateY(-2px);
}
.card.card-blog .entry-title,
.card.card-blog .card-title {
	font-weight: 500;
	line-height: 1.3;
}

/* ---- Category chips ---- */
.card.card-blog .category a,
.entry-meta .cat-links a {
	border-radius: 999px;
}

/* ---- Home hero type ---- */
.hero-section.home h1,
.hero-section.home .custom-header-in h1 {
	font-size: clamp(32px, 4.4vw, 52px);
	font-weight: 500;
	letter-spacing: -.01em;
}

/* ---- Focus visibility (accessibility) ---- */
a:focus-visible, button:focus-visible, input:focus-visible {
	outline: 2px solid var(--ce-accent);
	outline-offset: 2px;
}
html[data-theme="dark"] a:focus-visible,
html[data-theme="dark"] button:focus-visible,
html[data-theme="dark"] input:focus-visible {
	outline-color: #ff8f80;
}

@media (prefers-reduced-motion: reduce) {
	.card.card-blog { transition: none; }
	.card.card-blog:hover { transform: none; }
}

/* ==========================================================================
 * Step 2 — Home page
 * ========================================================================== */

/* Hero: readable scrim, pill search bar */
.hero-section.home .jumbotron {
	position: relative;
}
.hero-section.home .jumbotron:before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: linear-gradient(180deg, rgba(10, 8, 6, .45), rgba(10, 8, 6, .65));
}
.hero-section.home .custom-header-in {
	position: relative;
	z-index: 2;
}
.hero-section.home .lead {
	font-size: clamp(16px, 1.6vw, 20px);
	opacity: .95;
}
#ajax_home_search_container .input-group {
	background: #fff;
	border-radius: 999px;
	padding: 6px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, .28);
	flex-wrap: nowrap;
}
#ajax_home_search_container input.ajax_s {
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	border-radius: 999px !important;
	font-size: 16px;
	padding-left: 20px;
	color: #1e1a17 !important;
}
#ajax_home_search_container .input-group-btn,
#ajax_home_search_container .input-group-btn .btn {
	border-radius: 999px !important;
}

/* 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 */
#recent-posts-4 .row > [class*="col-"] {
	display: flex;
	margin-bottom: 28px;
}
#recent-posts-4 .post-grid {
	width: 100%;
	display: flex;
}
#recent-posts-4 .card.card-blog {
	width: 100%;
	display: flex;
	flex-direction: column;
	height: 100%;
}
#recent-posts-4 .card.card-blog .card-body {
	flex: 1;
	display: flex;
	flex-direction: column;
}
#recent-posts-4 .card.card-blog .card-image {
	aspect-ratio: 16 / 10;
	overflow: hidden;
}
#recent-posts-4 .card.card-blog .card-image img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
}
#recent-posts-4 .card.card-blog .card-footer {
	margin-top: auto;
}

/* ==========================================================================
 * Step 3 — Place / event detail pages
 * ========================================================================== */

/* Each tab section becomes a calm panel (GeoDirectory "tabs as list" layout) */
.geodir-tabs-content.geodir-tabs-as-list > div.mb-4 {
	background: var(--ce-surface);
	border: 1px solid var(--ce-line);
	border-radius: var(--ce-radius);
	padding: 26px 28px;
	margin-bottom: 24px !important;
}
.geodir-tabs-as-list .content-title {
	font-size: 22px;
	font-weight: 500;
	letter-spacing: -.01em;
	margin: 0 0 16px;
	padding: 0;
	border: 0 !important;
	display: flex;
	align-items: center;
	gap: 10px;
}
.geodir-tabs-as-list .content-title i {
	color: var(--ce-accent);
	font-size: 18px;
}
html[data-theme="dark"] .geodir-tabs-as-list .content-title i {
	color: #ff8f80;
}
.geodir-tabs-as-list .geodir-field-post_content {
	font-size: 16px;
	line-height: 1.7;
	max-width: 70ch;
}
.geodir-tabs-as-list .geodir-field-post_content img {
	border-radius: 12px;
	height: auto;
	max-width: 100%;
}

/* Facts list in the sidebar */
.geodir-output-location .list-group-item {
	background: transparent !important;
	border-color: var(--ce-line) !important;
	padding: 14px 4px !important;
	line-height: 1.5;
}
.geodir-output-location .list-group-item i.fa-fw,
.geodir-output-location .list-group-item > span:first-child i {
	color: var(--ce-accent);
}
html[data-theme="dark"] .geodir-output-location .list-group-item i.fa-fw {
	color: #ff8f80;
}
.geodir-output-location .list-group-item a {
	font-weight: 500;
}

/* ==========================================================================
 * Step 4 — Articles and listing cards
 * ========================================================================== */

/* Warm page background in light mode (dark mode keeps its own) */
html:not([data-theme="dark"]) body {
	background-color: #faf8f5;
}

/* Article: comfortable reading */
.single-post article.card-blog .card-description {
	font-size: 17px;
	line-height: 1.75;
}
html:not([data-theme="dark"]) .single-post article.card-blog .card-description {
	color: #2b2623;
}
.single-post article.card-blog .card-body {
	padding: clamp(20px, 4vw, 48px);
}
.single-post article.card-blog .card-description p,
.single-post article.card-blog .card-description li {
	max-width: 70ch;
	margin-left: auto;
	margin-right: auto;
}
.single-post article.card-blog .card-description h1 {
	font-size: clamp(28px, 3.2vw, 38px);
	line-height: 1.2;
	font-weight: 500;
	letter-spacing: -.01em;
}
.single-post article.card-blog .card-description h2,
.single-post article.card-blog .card-description h3 {
	font-weight: 500;
	letter-spacing: -.01em;
	line-height: 1.3;
	margin-top: 1.8em;
}
.single-post article.card-blog .card-description img {
	border-radius: 12px;
	height: auto;
	max-width: 100%;
}
.single-post article.card-blog .card-description table {
	width: 100%;
	border-collapse: collapse;
	display: block;
	overflow-x: auto;
}
.single-post article.card-blog .card-description th,
.single-post article.card-blog .card-description td {
	border: 1px solid var(--ce-line);
	padding: 10px 12px;
}
.single-post article.card-blog .card-top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 20px;
	font-size: 14px;
	color: var(--ce-muted);
	margin-bottom: 24px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--ce-line);
}
.single-post article.card-blog .card-top > div {
	margin: 0;
	float: none;
}
.single-post article.card-blog .card-top .category {
	margin-left: auto;
}
.single-post .card.card-blog:hover {
	transform: none;
}

/* GeoDirectory listing cards (events / places archives and widgets) */
.geodir-post .card.h-100 {
	border-radius: var(--ce-radius) !important;
	border: 1px solid var(--ce-line) !important;
	overflow: hidden;
	background: var(--ce-surface) !important;
	box-shadow: none !important;
	transition: box-shadow .2s ease, transform .2s ease;
}
.geodir-post .card.h-100:hover {
	box-shadow: var(--ce-shadow) !important;
	transform: translateY(-2px);
}
.geodir-post .card.h-100 .geodir-entry-title,
.geodir-post .card.h-100 .geodir-entry-title a {
	font-weight: 500;
	line-height: 1.3;
}
.geodir-post .card.h-100 .listing-card-body {
	padding-top: 64px !important;
	background: linear-gradient(180deg, rgba(10, 8, 6, 0) 0%, rgba(10, 8, 6, .62) 38%, rgba(10, 8, 6, .88) 100%) !important;
}
.geodir-post .card.h-100 .listing-card-body .geodir-field-post_category,
.geodir-post .card.h-100 .listing-card-body .geodir-field-post_category a {
	color: #fff !important;
	opacity: .9;
}
.geodir-post .card.h-100 .listing-card-body .geodir-entry-title a {
	color: #fff !important;
	text-shadow: 0 1px 8px rgba(0, 0, 0, .5);
}
.geodir-post .card.h-100 .geodir-output-location .list-group-item {
	background: transparent !important;
	border-color: var(--ce-line) !important;
}
@media (prefers-reduced-motion: reduce) {
	.geodir-post .card.h-100 { transition: none; }
	.geodir-post .card.h-100:hover { transform: none; }
}

/* ==========================================================================
 * 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)
 * ========================================================================== */
html .listing-hero h1,
html .listing-hero .page-header {
	color: #fff !important;
}
html .listing-hero .details-cat .card {
	background: rgba(10, 8, 6, .55) !important;
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	border: 1px solid rgba(255, 255, 255, .3) !important;
	border-radius: 999px !important;
	box-shadow: none !important;
	overflow: hidden;
}
html .listing-hero .details-cat .card,
html .listing-hero .details-cat .card *,
html .listing-hero .details-cat a {
	color: #fff !important;
}
html .listing-hero .geodir-schedule-rows,
html .listing-hero .geodir-schedule-row.list-group-item {
	background: transparent !important;
	border: 0 !important;
	padding: 2px 0 !important;
}
html .listing-hero .geodir-event-schedules,
html .listing-hero .geodir-event-schedules * {
	color: #fff !important;
	text-shadow: 0 1px 8px rgba(0, 0, 0, .45);
}
html .listing-hero .left-info-mid a,
html .listing-hero .gd-list-rating-link {
	color: #fff !important;
	text-decoration: underline;
	text-underline-offset: 3px;
}
html .listing-hero .breadcrumb,
html .listing-hero .breadcrumb span {
	color: rgba(255, 255, 255, .88) !important;
}
html .listing-hero .breadcrumb a {
	color: #fff !important;
}
html .listing-hero .review-button {
	background: var(--ce-accent) !important;
	border-color: var(--ce-accent) !important;
	color: #fff !important;
	font-weight: 500;
	letter-spacing: .04em;
	border-radius: 999px !important;
	padding-left: 22px;
	padding-right: 22px;
}
html .listing-hero .share-btn {
	background: rgba(255, 255, 255, .16) !important;
	border: 1px solid rgba(255, 255, 255, .45) !important;
	color: #fff !important;
	border-radius: 999px !important;
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}
html .listing-hero .gd-list-favorite,
html .listing-hero .geodir-addtofav {
	color: #fff !important;
}

/* Category badge in the listing hero: compact pill, icon in a white circle, text beside it */
html .listing-hero .details-cat .gd-cptcat-row .row {
	display: flex !important;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 10px !important;
}
html .listing-hero .details-cat .gd-cptcat-parent {
	flex: 0 0 auto !important;
	width: auto !important;
	max-width: none !important;
	padding: 0 !important;
	margin: 0 !important;
}
html .listing-hero .details-cat .gd-cptcat-parent .card {
	width: auto !important;
	display: inline-flex !important;
	height: auto !important;
	background: rgba(10, 8, 6, .5) !important;
	border: 1px solid rgba(255, 255, 255, .28) !important;
	border-radius: 999px !important;
	box-shadow: none !important;
}
html .listing-hero .details-cat .gd-cptcat-parent .card-body {
	padding: 4px 16px 4px 4px !important;
	border: 0 !important;
	background: transparent !important;
	display: flex;
	align-items: center;
	text-align: left !important;
	justify-content: flex-start !important;
}
html .listing-hero .details-cat .gd-cptcat-cat-right {
	display: flex;
	align-items: center;
	width: auto !important;
	height: auto !important;
	padding: 0 !important;
	overflow: visible !important;
	text-align: left !important;
}
html .listing-hero .details-cat .gd-cptcat-cat-right a {
	display: flex !important;
	align-items: center;
	gap: 10px;
	margin: 0 !important;
	font-size: 12px !important;
	font-weight: 500 !important;
	letter-spacing: .12em;
	line-height: 1;
	white-space: nowrap;
	color: #fff !important;
}
html .listing-hero .details-cat .iconbox {
	width: 30px !important;
	height: 30px !important;
	min-width: 30px;
	flex: none;
	border-radius: 50% !important;
	margin: 0 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	background: #fff !important;
	background-image: none !important;
	box-shadow: none !important;
	border: 0 !important;
	line-height: 0;
	overflow: hidden;
}
html .listing-hero .details-cat .iconbox:before,
html .listing-hero .details-cat .iconbox:after {
	display: none !important;
}
html .listing-hero .details-cat .iconbox .gd-cptcat-icon {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	line-height: 0;
}
html .listing-hero .details-cat .iconbox img {
	width: 18px !important;
	height: 18px !important;
	margin: 0 !important;
	display: block;
	object-fit: contain;
}

/* ==========================================================================
 * Home hero + header: dark mode and small screens
 * ========================================================================== */
html .hero-section.home h1 {
	color: #fff !important;
}
/* Dark mode: the search pill matches the dark theme instead of a black field on a white pill */
html[data-theme="dark"] #ajax_home_search_container .input-group {
	background: #1a1a1a;
	border: 1px solid rgba(255, 255, 255, .18);
}
html[data-theme="dark"] #ajax_home_search_container input.ajax_s {
	background: transparent !important;
	color: #f1ece6 !important;
}
html[data-theme="dark"] #ajax_home_search_container input.ajax_s::placeholder {
	color: #b5aaa0 !important;
}
/* Dark mode: the hamburger icon was black on the dark bar */
html[data-theme="dark"] .navbar-light .navbar-toggler {
	border-color: rgba(255, 255, 255, .35) !important;
}
html[data-theme="dark"] .navbar-light .navbar-toggler-icon {
	filter: invert(1);
}
/* Phones/tablets: the header bar spans the full width instead of a small floating box */
@media (max-width: 767.98px) {
	#wrapper-navbar {
		left: 0;
		right: 0;
		width: 100%;
	}
	#wrapper-navbar > nav.navbar {
		width: 100%;
	}
	#wrapper-navbar > nav.navbar > .container-fluid {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		justify-content: space-between;
	}
	#wrapper-navbar .navbar-toggler {
		margin-left: auto;
	}
}

/* ==========================================================================
 * Dark mode logo: the white/transparent version replaces the white badge
 * (the normal logo is a JPG with a baked-in white background).
 * ========================================================================== */
html[data-theme="dark"] .navbar-brand.custom-logo-link {
	background: url("images/logo-dark.png") no-repeat left center / contain !important;
	padding: 0 !important;
	border-radius: 0 !important;
	display: block !important;
	width: 184px;
	height: 40px;
	overflow: hidden;
}
html[data-theme="dark"] .navbar-brand.custom-logo-link img {
	width: 184px !important;
	height: 40px !important;
	opacity: 0;
	object-fit: contain;
}

/* Favourite heart stays visible on pale photos */
.geodir-post .card.h-100 .gd-list-favorite,
.geodir-post .card.h-100 .geodir-addtofav {
	filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .6));
}

/* ==========================================================================
 * Article lists (category archives such as Tips & Essentials)
 * ========================================================================== */

/* Regular cards: same image shape, compact type, so rows stay even */
.archive.category .content-area .card.card-blog {
	position: relative;
}
.archive.category .content-area .card.card-blog:not(.card-featured) .card-image {
	aspect-ratio: 16 / 10;
	height: auto;
	overflow: hidden;
	background: var(--ce-chip);
}
.archive.category .content-area .card.card-blog:not(.card-featured) .card-image img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
}
/* Very small source images: show them whole, centred, instead of stretching them */
.archive.category .content-area .card.card-blog .card-image.ce-lowres a {
	display: flex;
	width: 100%;
	height: 100%;
	align-items: center;
	justify-content: center;
}
.archive.category .content-area .card.card-blog .card-image.ce-lowres img {
	object-fit: contain !important;
	width: auto !important;
	max-width: 100%;
	height: auto !important;
	max-height: 100%;
	border-radius: 8px;
}
.archive.category .content-area .card.card-blog:not(.card-featured) h2.entry-title {
	font-size: 1.25rem !important;
	line-height: 1.3;
	font-weight: 500;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.archive.category .content-area .card.card-blog:not(.card-featured) .card-description {
	font-size: .95rem;
	line-height: 1.6;
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Whole card is clickable (the title link stretches over it) */
.archive.category .content-area .card.card-blog .entry-title a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}
/* "Read more" becomes a quiet text link */
.archive.category .content-area .card.card-blog .card-footer .btn {
	border: 0 !important;
	background: transparent !important;
	padding: 0 !important;
	color: var(--ce-accent) !important;
	font-weight: 500;
	box-shadow: none !important;
}
html[data-theme="dark"] .archive.category .content-area .card.card-blog .card-footer .btn {
	color: #ff8f80 !important;
}
.archive.category .content-area .card.card-blog .card-footer .btn::after {
	content: " →";
}

/* Pagination: round buttons, "Page X of Y" as a small caption */
html .pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 0;
	margin: 32px 0 8px;
}
html .pagination .page-item {
	margin: 0;
}
html .pagination .page-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding: 0 14px;
	border-radius: 999px !important;
	border: 1px solid var(--ce-line) !important;
	background: var(--ce-surface) !important;
	color: var(--ce-ink) !important;
	font-weight: 500;
	box-shadow: none !important;
}
html .pagination .page-item.active .page-link {
	background: var(--ce-accent) !important;
	border-color: var(--ce-accent) !important;
	color: #fff !important;
}
html .pagination .page-link:hover {
	border-color: var(--ce-accent) !important;
}
html .pagination .pagination-summary-item .page-link {
	border: 0 !important;
	background: transparent !important;
	color: var(--ce-muted) !important;
	font-size: 14px;
	font-weight: 400;
}

/* ==========================================================================
 * Detail pages: match the approved mockup (radius, spacing, facts card)
 * ========================================================================== */

/* The theme's own tab-panel rule (radius .25rem, padding 30px) is more specific than ours: out-rank it */
html body .geodir-tabs .geodir-tabs-content.geodir-tabs-as-list > div.mb-4 {
	border-radius: var(--ce-radius) !important;
	padding: 28px !important;
	box-shadow: 0 1px 2px rgba(30, 26, 23, .04);
}

/* Hero: the content block had a 320px top padding on desktop (hero ~660px tall) */
.listing-hero .listing-hero-content {
	padding-top: clamp(120px, 14vw, 200px) !important;
	padding-bottom: 36px !important;
}

/* Admin-only hint box: same rounded language */
.geodir-notifications .alert.alert-info {
	border-radius: 14px;
}

/* Facts card (sidebar): one clean list with hairline dividers instead of boxed rows */
html #listing-right-sidebar .list-group,
html #listing-right-sidebar .geodir-output-location {
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}
html #listing-right-sidebar .list-group-item {
	border-width: 1px 0 0 0 !important;
	border-style: solid !important;
	border-color: var(--ce-line) !important;
	border-radius: 0 !important;
	padding: 14px 0 !important;
}
html #listing-right-sidebar .list-group-item:first-child {
	border-top-width: 0 !important;
	padding-top: 4px !important;
}
html #listing-right-sidebar .card-body {
	padding: 22px 24px !important;
}

/* ==========================================================================
 * 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.
 * ========================================================================== */
html #listing-right-sidebar .card:has(.card.card-blog),
html #listing-right-sidebar .card:has(.geodir-post .card),
html #right-sidebar .sidebar-widget:has(.card.card-blog) {
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	border-radius: 0 !important;
}
html #listing-right-sidebar .card:has(.card.card-blog) > .card-body,
html #listing-right-sidebar .card:has(.geodir-post .card) > .card-body,
html #right-sidebar .sidebar-widget:has(.card.card-blog) > .card-body {
	padding: 0 !important;
}
html #listing-right-sidebar .widget .card-title,
html #listing-right-sidebar .widget h2.card-title,
html #right-sidebar .widget .card-title {
	font-size: 18px;
	font-weight: 600;
	letter-spacing: -.005em;
	border: 0 !important;
	padding: 0 !important;
	margin: 0 0 14px 4px !important;
	text-align: left;
}
html #listing-right-sidebar .widget .widget-inner .row > [class*="col-"] {
	margin-bottom: 16px;
	flex: 0 0 100%;
	max-width: 100%;
}
/* The cards keep their border, radius and a hairline shadow */
html #listing-right-sidebar .card .card.card-blog,
html #right-sidebar .sidebar-widget .card.card-blog,
html #listing-right-sidebar .geodir-post .card.h-100 {
	border: 1px solid var(--ce-line) !important;
	background: var(--ce-surface) !important;
	border-radius: var(--ce-radius) !important;
	overflow: hidden;
	box-shadow: 0 1px 2px rgba(30, 26, 23, .04) !important;
}
/* Distance badge: neutral chip instead of the default blue */
html .geodir-post-distance .gd-badge {
	background: var(--ce-chip) !important;
	color: var(--ce-ink) !important;
	border-radius: 999px !important;
	font-weight: 500;
	padding: 5px 10px;
}
html .geodir-post-distance .gd-badge * {
	color: var(--ce-ink) !important;
}

/* ==========================================================================
 * Facts card (place/event sidebar): small label above each value, accent
 * icons, category/tag chips, no duplicated event title
 * ========================================================================== */
html #listing-right-sidebar .geodir-output-location-detail .geodir_post_meta.list-group-item {
	position: relative;
	background: transparent !important;
	border: 0 !important;
	border-top: 1px solid var(--ce-line) !important;
	border-radius: 0 !important;
	padding: 14px 0 14px 34px !important;
	font-size: 15px;
	line-height: 1.5;
	color: var(--ce-ink);
}
html #listing-right-sidebar .geodir-output-location-detail .geodir_post_meta.list-group-item:first-child {
	border-top: 0 !important;
	padding-top: 4px !important;
}
html #listing-right-sidebar .geodir-output-location-detail .geodir_post_meta.list-group-item > i,
html #listing-right-sidebar .geodir-output-location-detail .geodir_post_meta_icon i,
html #listing-right-sidebar .geodir-output-location-detail .geodir-i-datepicker i {
	position: absolute;
	left: 2px;
	top: 17px;
	color: var(--ce-accent);
	font-size: 16px;
	width: 20px;
	text-align: center;
}
html[data-theme="dark"] #listing-right-sidebar .geodir-output-location-detail .geodir_post_meta_icon i,
html[data-theme="dark"] #listing-right-sidebar .geodir-output-location-detail .geodir-i-datepicker i {
	color: #ff8f80;
}
html #listing-right-sidebar .geodir-output-location-detail .geodir-field-event_dates i {
	top: 7px;
}
html #listing-right-sidebar .geodir-output-location-detail .geodir_post_meta_icon,
html #listing-right-sidebar .geodir-output-location-detail .geodir-i-datepicker {
	display: block;
	margin: 0 0 2px;
}
html #listing-right-sidebar .geodir-output-location-detail .geodir_post_meta_title,
html #listing-right-sidebar .geodir-output-location-detail .geodir-i-datepicker {
	font-size: 12px;
	letter-spacing: .07em;
	text-transform: uppercase;
	color: var(--ce-muted);
	font-weight: 500;
}
/* The event title is already the page heading */
html #listing-right-sidebar .geodir-output-location-detail .geodir-field-post_title {
	display: none !important;
}
/* Categories and tags as chips (font-size 0 hides the ", " and "and" between links) */
html #listing-right-sidebar .geodir-output-location-detail .geodir-field-post_tags,
html #listing-right-sidebar .geodir-output-location-detail .geodir-field-post_category {
	font-size: 0;
}
html #listing-right-sidebar .geodir-output-location-detail .geodir-field-post_tags .geodir_post_meta_title,
html #listing-right-sidebar .geodir-output-location-detail .geodir-field-post_category .geodir_post_meta_title {
	font-size: 12px;
}
html #listing-right-sidebar .geodir-output-location-detail .geodir-field-post_tags a,
html #listing-right-sidebar .geodir-output-location-detail .geodir-field-post_category a {
	display: inline-block;
	font-size: 13px;
	font-weight: 500;
	background: var(--ce-chip);
	color: var(--ce-ink) !important;
	padding: 4px 12px;
	border-radius: 999px;
	margin: 4px 6px 2px 0;
	text-decoration: none;
}
html #listing-right-sidebar .geodir-output-location-detail .geodir-field-address_pinyin p {
	margin: 0;
}
/* Address on one line: street, city, region */
html #listing-right-sidebar .geodir-output-location-detail .geodir-field-address br {
	display: none;
}
html #listing-right-sidebar .geodir-output-location-detail .geodir-field-address span[itemprop]:not(:last-of-type)::after {
	content: ",";
}

/* ==========================================================================
 * Map card: rounded map, pill-shaped directions field, no dead space
 * ========================================================================== */
html .geodir-map-wrap .geodir_map_container .map_background {
	border-radius: 14px;
	overflow: hidden;
}
html .geodir-map-wrap .leaflet-bar,
html .geodir-map-wrap .leaflet-control-zoom {
	border: 0 !important;
	border-radius: 12px !important;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .18) !important;
}
html .geodir-map-wrap .leaflet-bar a {
	border-radius: 0 !important;
}
html .geodir-map-directions-wrap {
	margin-top: 14px !important;
}
html .geodir-map-directions-wrap .row {
	margin-left: 0;
	margin-right: 0;
}
html .geodir-map-directions-wrap .row > .col {
	padding-left: 0;
	padding-right: 0;
}
html .geodir-map-directions-wrap .form-group {
	margin-bottom: 0;
}
html .geodir-map-directions-wrap .input-group {
	flex-wrap: nowrap;
	border: 1px solid var(--ce-line);
	border-radius: 999px;
	overflow: hidden;
	background: var(--ce-surface);
}
html .geodir-map-directions-wrap .input-group .form-control {
	border: 0 !important;
	box-shadow: none !important;
	height: 46px;
	padding-left: 18px;
	background: transparent !important;
	border-radius: 0 !important;
}
html .geodir-map-directions-wrap .input-group .input-group-text,
html .geodir-map-directions-wrap .input-group .input-group-append .input-group-text,
html .geodir-map-directions-wrap .input-group .gd-directions-from-user {
	border: 0 !important;
	background: var(--ce-chip) !important;
	border-radius: 0 !important;
}
html .geodir-map-directions-wrap .input-group .btn {
	border: 0 !important;
	border-radius: 0 !important;
	background: var(--ce-accent) !important;
	color: #fff !important;
	font-weight: 500;
	letter-spacing: .04em;
	padding: 0 20px;
}
html .geodir-map-directions-wrap .table {
	margin-bottom: 0 !important;
}

/* ==========================================================================
 * Reviews and rating form (light + dark)
 * ========================================================================== */
/* File drop zone: Bootstrap's bg-light made a bright white box in dark mode */
html .geodir-add-files {
	background: var(--ce-surface) !important;
	color: var(--ce-ink) !important;
	border: 1.5px dashed var(--ce-line) !important;
	border-radius: 16px !important;
	box-shadow: none !important;
}
html .geodir-add-files .geodir-dropbox-title,
html .geodir-add-files .text-muted {
	color: var(--ce-muted) !important;
}
html .geodir-add-files .btn {
	border-radius: 999px !important;
	background: var(--ce-accent) !important;
	border-color: var(--ce-accent) !important;
	color: #fff !important;
}
html #commentform textarea.form-control,
html #commentform input.form-control:not([type="submit"]) {
	border-radius: 12px !important;
}
/* "Post review": brand button (the dark theme was turning it into a dark box) */
html #commentform input[type="submit"],
html #commentform .btn.btn-primary.form-control {
	background: var(--ce-accent) !important;
	border: 0 !important;
	color: #fff !important;
	border-radius: 999px !important;
	height: 48px;
	font-weight: 500;
	letter-spacing: .03em;
	text-align: center;
}
/* "Select a rating" tooltip: white text on light grey was unreadable */
html #commentform .gd-rating-text.badge,
html .gd-rating-input-wrap .badge {
	background: var(--ce-chip) !important;
	color: var(--ce-ink) !important;
	border: 0 !important;
	border-radius: 999px;
	font-weight: 500;
}
html #commentform .form-group.form-control.h-auto {
	border-radius: 14px !important;
}

/* Dark mode: body-size links in the red #c83232 only reach ~3:1 on the dark surface; lighten them */
html[data-theme="dark"] .geodir-tabs-content a:not(.btn),
html[data-theme="dark"] .comments-area a:not(.btn),
html[data-theme="dark"] .comment-respond a:not(.btn),
html[data-theme="dark"] .card-description a:not(.btn),
html[data-theme="dark"] .geodir-output-location a:not(.btn):not(.gd-badge) {
	color: #ff8f80;
}

/* The row rule above (font-size 15px) out-ranked the chip rows' font-size:0, so the ", " and "and" between chips stayed visible */
html #listing-right-sidebar .geodir-output-location-detail .geodir_post_meta.list-group-item.geodir-field-post_tags,
html #listing-right-sidebar .geodir-output-location-detail .geodir_post_meta.list-group-item.geodir-field-post_category {
	font-size: 0;
}
html #listing-right-sidebar .geodir-output-location-detail .geodir_post_meta.list-group-item.geodir-field-post_tags .geodir_post_meta_title,
html #listing-right-sidebar .geodir-output-location-detail .geodir_post_meta.list-group-item.geodir-field-post_category .geodir_post_meta_title {
	font-size: 12px;
}

/* ==========================================================================
 * Section intro (category pages, see mu-plugins/ce-seo-content.php)
 * ========================================================================== */
.ce-section-intro {
	flex: 0 0 100%;
	max-width: 70ch;
	margin: 0 15px 24px;
	font-size: 1.1rem;
	line-height: 1.6;
	color: var(--ce-muted);
}

/* ==========================================================================
 * Forms, buttons, search badges, static pages and footer
 * ========================================================================== */

/* Form controls: rounded, brand focus ring */
html .form-control,
html .custom-select,
html select.form-control,
html .input-group > .form-control {
	border-radius: 12px;
	border: 1px solid var(--ce-line);
	min-height: 44px;
	box-shadow: none;
}
html .form-control:focus,
html .custom-select:focus {
	border-color: var(--ce-accent);
	box-shadow: 0 0 0 3px rgba(163, 0, 0, .18) !important;
}
html textarea.form-control {
	min-height: 120px;
}

/* Buttons: brand red everywhere (the default outline buttons were blue/green) */
html .btn-primary:not(.input-group .btn) {
	border-radius: 999px;
}
html .btn-outline-primary {
	color: var(--ce-accent);
	border-color: var(--ce-accent);
	border-radius: 999px;
	background: transparent;
}
html .btn-outline-primary:hover,
html .btn-outline-primary:focus {
	background: var(--ce-accent);
	border-color: var(--ce-accent);
	color: #fff;
}
html[data-theme="dark"] .btn-outline-primary {
	color: #ff8f80;
	border-color: #ff8f80;
}
html[data-theme="dark"] .btn-outline-primary:hover,
html[data-theme="dark"] .btn-outline-primary:focus {
	background: #a30000;
	border-color: #a30000;
	color: #fff;
}
html .geodir_preview_button.btn-outline-primary {
	background: transparent !important;
}

/* Add Place / Add Event: labels above the fields instead of a left column */
html #geodirectory-add-post .form-group.row {
	flex-direction: column;
	margin: 0 0 22px;
}
html #geodirectory-add-post .form-group.row > [class*="col-"] {
	flex: 0 0 100%;
	max-width: 100%;
	padding-left: 0;
	padding-right: 0;
}
html #geodirectory-add-post label.col-form-label {
	padding: 0 0 6px;
	font-weight: 500;
	font-size: 15px;
}
html #geodirectory-add-post .form-text,
html #geodirectory-add-post small.text-muted {
	color: var(--ce-muted) !important;
	font-size: 13px;
}
html .geodir-add-listing h2,
html #geodirectory-add-post h3 {
	font-size: 22px;
	font-weight: 500;
	letter-spacing: -.01em;
}

/* Search results: type badges (Article / Event / Place) in one neutral style */
html .search-type-badge {
	background: rgba(10, 8, 6, .72) !important;
	color: #fff !important;
	border-radius: 999px !important;
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	font-weight: 500;
	letter-spacing: .06em;
}

/* Static pages (add listing, account, contact...): the content box matches the cards */
html #page-wrapper .content-area > .site-main {
	border-radius: var(--ce-radius) !important;
	border: 1px solid var(--ce-line);
	padding: 32px !important;
}

/* Footer */
html .footer {
	background: #17140f;
	padding-top: 56px;
	padding-bottom: 12px;
}
html .footer .widget-title {
	font-size: 17px;
	font-weight: 600;
	letter-spacing: -.005em;
	margin: 0 0 18px;
	padding-bottom: 12px;
	position: relative;
	border: 0;
}
html .footer .widget-title::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 36px;
	height: 3px;
	border-radius: 3px;
	background: #a30000;
}
html .footer,
html .footer p,
html .footer li {
	font-size: 14px;
	line-height: 1.7;
	color: rgba(255, 255, 255, .78);
}
html .footer a {
	color: rgba(255, 255, 255, .92) !important;
	text-decoration: none;
}
html .footer a:hover {
	color: #ff8f80 !important;
	text-decoration: underline;
}
html .footer ul {
	list-style: none;
	padding: 0;
	margin: 0;
}
html .footer li {
	margin: 0 0 10px;
	padding: 0;
}
html .footer .textwidget p {
	margin: 0;
	padding: 0;
	text-indent: 0;
}
html .footer .textwidget picture,
html .footer .textwidget img {
	display: block !important;
	float: none !important;
	margin: 0 0 14px;
	max-width: 190px;
	height: auto;
}
html .footer-bottom {
	background: rgba(255, 255, 255, .04) !important;
	border-top: 1px solid rgba(255, 255, 255, .08);
	margin-top: 40px !important;
	padding: 18px 0;
}
html .footer-bottom,
html .footer-bottom * {
	font-size: 13px !important;
	color: rgba(255, 255, 255, .6);
}
html .footer-bottom a {
	color: rgba(255, 255, 255, .85) !important;
}

/* ==========================================================================
 * Hero thumbnails (mu-plugins/ce-listing-gallery.php): the other photos of a
 * listing as small rounded thumbnails inside the hero; "+N" opens the Photos section
 * ========================================================================== */
.ce-hero-thumbs {
	display: flex;
	gap: 8px;
	margin-top: 14px;
	justify-content: flex-end;
}
.ce-ht {
	position: relative;
	display: block;
	width: 92px;
	height: 68px;
	border-radius: 12px;
	overflow: hidden;
	border: 2px solid rgba(255, 255, 255, .85);
	box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
	background: rgba(0, 0, 0, .3);
}
.ce-ht img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .3s ease;
}
.ce-ht:hover img {
	transform: scale(1.06);
}
.ce-ht-more {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(10, 8, 6, .55);
	color: #fff;
	font-weight: 600;
	font-size: 15px;
}
@media (max-width: 991.98px) {
	.ce-hero-thumbs { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
	.ce-ht img { transition: none; }
	.ce-ht:hover img { transform: none; }
}
