/*
 * ParkWeb: community guide layout for single blog posts (child theme v2.1.0).
 * Loaded only on single posts (framework/functions/blog-single.php).
 */

.pw-guide-page {
	--pw-primary: #114a8f;
	--pw-primary-dark: #0c3768;
	--pw-primary-tint: #e8f0fa;
	--pw-ink: #1f2933;
	--pw-body: #3a4450;
	--pw-muted: #6b7682;
	--pw-line: var(--ic-border, #dddddd);       /* site card border (.widget-wrap, listing cards) */
	--pw-surface: #ffffff;
	--pw-soft: #f5f8fc;
	--pw-radius: 4px;                           /* site card and .btn radius */
	--pw-sticky-top: 110px;
}

.admin-bar.pw-guide-page {
	--pw-sticky-top: 142px;
}

/* ---- Header ----------------------------------------------------------- */
.pw-guide .page-title-wrap {
	margin-bottom: 8px;
}

.pw-guide-header {
	max-width: 900px;
	margin: 8px 0 24px;
}

.pw-guide-pill {
	display: inline-block;
	padding: 4px 12px;
	border-radius: var(--pw-radius);
	background: var(--pw-primary-tint);
	color: var(--pw-primary);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.5;
	text-decoration: none;
}

.pw-guide-pill:hover,
.pw-guide-pill:focus {
	background: var(--pw-primary);
	color: #fff;
}

.pw-guide-title {
	margin: 14px 0 12px;
	color: var(--pw-ink);
	font-size: clamp(28px, 3.4vw, 42px);
	line-height: 1.18;
	letter-spacing: -0.01em;
}

.pw-guide-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 20px;
	margin: 0;
	padding: 0;
	list-style: none;
	color: var(--pw-muted);
	font-size: 14px;
}

.pw-guide-meta li {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.pw-icon {
	flex: none;
	vertical-align: -3px;
}

/* ---- Featured image --------------------------------------------------- */
.pw-guide-hero {
	width: 100%;
	margin: 0 0 36px;
	overflow: hidden;
	border-radius: var(--pw-radius);
	background: var(--pw-soft);
	aspect-ratio: 16 / 7;
	max-height: 460px;
}

.pw-guide-hero-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ---- Article ---------------------------------------------------------- */
.pw-guide-body {
	align-items: flex-start;
}

/* Article card: same border and corners as the site's other cards. */
.pw-guide-article {
	border: 1px solid var(--pw-line);
	border-radius: var(--pw-radius);
}

/*
 * Article text = what's typed straight into the post, or into an Elementor
 * text-editor widget. Listing cards, forms and other widgets embedded in the
 * post keep their own styles, so these rules never reach them.
 */
.pw-guide-content > :is(p, ul, ol, blockquote),
.pw-guide-content .elementor-widget-text-editor :is(p, ul, ol, blockquote) {
	margin: 0 0 1.25em;
	color: var(--pw-body);
	font-size: 18px;
	line-height: 1.75;
}

.pw-guide-content > :is(ul, ol),
.pw-guide-content .elementor-widget-text-editor :is(ul, ol) {
	padding-left: 1.3em;
}

.pw-guide-content > :is(ul, ol) > li,
.pw-guide-content .elementor-widget-text-editor li {
	margin-bottom: 0.4em;
	color: inherit;
	font-size: inherit;
	line-height: inherit;
}

.pw-guide-content > h2,
.pw-guide-content .elementor-widget-text-editor h2 {
	margin: 1.8em 0 0.6em;
	color: var(--pw-ink);
	font-size: 26px;
	line-height: 1.3;
}

.pw-guide-content > h3,
.pw-guide-content .elementor-widget-text-editor h3 {
	margin: 1.5em 0 0.5em;
	color: var(--pw-ink);
	font-size: 21px;
	line-height: 1.35;
}

.pw-guide-content h2,
.pw-guide-content h3 {
	scroll-margin-top: var(--pw-sticky-top);
}

.pw-guide-content > h2:first-child,
.pw-guide-content .elementor-widget-text-editor .elementor-widget-container > h2:first-child {
	margin-top: 0;
}

.pw-guide-content > :is(p, ul, ol, blockquote) strong,
.pw-guide-content .elementor-widget-text-editor strong {
	color: var(--pw-ink);
}

.pw-guide-content > :is(p, ul, ol, blockquote, h2, h3) a:not(.btn):not(.elementor-button),
.pw-guide-content .elementor-widget-text-editor a:not(.btn):not(.elementor-button) {
	color: var(--pw-primary);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.pw-guide-content > :is(p, figure) img,
.pw-guide-content .wp-block-image img,
.pw-guide-content .elementor-widget-text-editor img {
	height: auto;
	border-radius: var(--pw-radius);
}

.pw-guide-content img.alignright {
	float: right;
	max-width: 45%;
	margin: 6px 0 16px 28px;
}

.pw-guide-content img.alignleft {
	float: left;
	max-width: 45%;
	margin: 6px 28px 16px 0;
}

.pw-guide-content::after {
	content: "";
	display: table;
	clear: both;
}

/* ---- Sidebar ---------------------------------------------------------- */
.pw-guide-sidebar-col {
	align-self: stretch;
}

.pw-guide-sidebar {
	position: sticky;
	top: var(--pw-sticky-top);
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding-bottom: 24px;
}

.pw-community-card {
	padding: 20px;
	border: 1px solid var(--pw-line);
	border-radius: var(--pw-radius);
	background: var(--pw-surface);
}

.pw-community-card__media {
	display: block;
	margin: -4px -4px 16px;
	overflow: hidden;
	border-radius: var(--pw-radius);
	aspect-ratio: 16 / 9;
	background: var(--pw-soft);
}

.pw-community-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.pw-community-card__eyebrow {
	margin: 0 0 2px;
	color: var(--pw-muted);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.pw-community-card__name {
	margin: 0 0 10px;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
}

.pw-community-card__name a {
	color: var(--pw-ink);
	text-decoration: none;
}

.pw-community-card__name a:hover {
	color: var(--pw-primary);
}

.pw-badge {
	display: inline-block;
	margin-bottom: 14px;
	padding: 3px 10px;
	border-radius: var(--pw-radius);
	background: var(--pw-primary-tint);
	color: var(--pw-primary);
	font-size: 13px;
	font-weight: 600;
}

.pw-community-card__facts {
	margin: 0 0 16px;
	padding: 0;
	list-style: none;
	color: var(--pw-body);
	font-size: 14px;
	line-height: 1.5;
}

.pw-community-card__facts li {
	display: flex;
	gap: 8px;
	margin-bottom: 8px;
}

.pw-community-card__facts .pw-icon {
	margin-top: 2px;
	color: var(--pw-primary);
}

.pw-community-card__facts a {
	color: var(--pw-body);
}

.pw-community-card__actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.pw-community-card__actions .btn {
	width: 100%;
}

/* Compact card for phones, above the article */
.pw-guide-mobile-aside {
	display: grid;
	gap: 14px;
	margin-bottom: 28px;
}

.pw-community-card--compact {
	padding: 16px;
	background: var(--pw-soft);
}

.pw-community-card--compact .pw-community-card__name {
	font-size: 18px;
}

.pw-community-card--compact .pw-community-card__actions {
	flex-direction: row;
	flex-wrap: wrap;
}

.pw-community-card--compact .pw-community-card__actions .btn {
	flex: 1 1 150px;
	width: auto;
}

/* ---- In this guide ---------------------------------------------------- */
.pw-guide-toc {
	padding: 18px 20px;
	border: 1px solid var(--pw-line);
	border-radius: var(--pw-radius);
	background: var(--pw-surface);
}

.pw-guide-toc__title,
.pw-guide-toc--mobile summary {
	margin: 0 0 8px;
	color: var(--pw-muted);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.pw-guide-toc--mobile summary {
	margin: 0;
	cursor: pointer;
}

.pw-guide-toc--mobile[open] summary {
	margin-bottom: 8px;
}

.pw-guide-toc__list {
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: pw-toc;
}

.pw-guide-toc__list li {
	counter-increment: pw-toc;
	display: flex;
	gap: 10px;
	padding: 6px 0;
	border-top: 1px solid var(--pw-line);
	font-size: 14px;
	line-height: 1.45;
}

.pw-guide-toc__list li:first-child {
	border-top: 0;
}

.pw-guide-toc__list li::before {
	content: counter(pw-toc);
	flex: none;
	min-width: 16px;
	color: var(--pw-muted);
	font-variant-numeric: tabular-nums;
}

.pw-guide-toc__list a {
	color: var(--pw-primary);
	text-decoration: none;
}

.pw-guide-toc__list a:hover {
	text-decoration: underline;
}

/* ---- Bands: available homes, more guides ------------------------------ */
.pw-guide-band {
	padding: 48px 0;
	border-top: 1px solid var(--pw-line);
}

.pw-guide-homes {
	background: var(--pw-soft);
}

.pw-guide-band__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 24px;
	margin-bottom: 24px;
}

.pw-guide-band__title {
	margin: 0;
	color: var(--pw-ink);
	font-size: 26px;
	line-height: 1.3;
}

.pw-guide-band__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--pw-primary);
	font-weight: 600;
	text-decoration: none;
}

.pw-guide-band__link:hover {
	text-decoration: underline;
}

.pw-guide-homes .item-listing-wrap {
	height: 100%;
}

/*
 * Listing cards anywhere on a guide page (the homes row, or a carousel in the
 * post body): no listing age ("3 weeks ago"), no "Details" button (the image
 * and title already link to the listing), and no link underlines.
 * !important is needed to beat Bootstrap's .d-flex / .d-xl-flex.
 */
.pw-guide-page .item-listing-wrap .item-date,
.pw-guide-page .item-listing-wrap .btn-item {
	display: none !important;
}

.pw-guide-page .item-listing-wrap a {
	text-decoration: none;
}

/*
 * Equal-height listing cards. Slick's adaptive height sizes each card's photo
 * area to that photo's own shape (inline heights like 233px / 208px / 143px),
 * so cards came out uneven. Every photo area is locked to 4:3, the shape
 * Houzez crops listing photos to (584 x 438), and photos fill it.
 */
.pw-guide-page .item-listing-wrap .listing-image-wrap {
	aspect-ratio: 4 / 3;
	overflow: hidden;
}

.pw-guide-page .item-listing-wrap .listing-image-wrap .listing-gallery-wrap,
.pw-guide-page .item-listing-wrap .listing-image-wrap .houzez-listing-carousel,
.pw-guide-page .item-listing-wrap .listing-image-wrap .slick-list,
.pw-guide-page .item-listing-wrap .listing-image-wrap .slick-track,
.pw-guide-page .item-listing-wrap .listing-image-wrap .slide-img,
.pw-guide-page .item-listing-wrap .listing-image-wrap .hover-effect {
	height: 100% !important;
}

.pw-guide-page .item-listing-wrap .listing-image-wrap img {
	width: 100%;
	height: 100% !important;
	object-fit: cover;
}

/* Listing carousels in the post body: stretch every card to the tallest one
   so the footers line up (the cards already pin their footer to the bottom). */
.pw-guide-page .houzez-properties-carousel-js > .slick-list > .slick-track {
	display: flex !important;
}

.pw-guide-page .houzez-properties-carousel-js > .slick-list > .slick-track > .slick-slide {
	float: none;
	height: auto;
}

/* ---- Closing call to action ------------------------------------------ */
.pw-guide-cta {
	padding: 48px 0;
}

/* Directly under the homes row: share its background and spacing. */
.pw-guide-homes + .pw-guide-cta {
	padding-top: 0;
	background: var(--pw-soft);
}

.pw-guide-cta__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px 32px;
	padding: 32px 36px;
	border-radius: var(--pw-radius);
	background: var(--pw-primary);
	color: #fff;
}

.pw-guide-cta__title {
	margin: 0 0 6px;
	color: #fff;
	font-size: 26px;
	line-height: 1.3;
}

.pw-guide-cta__copy p {
	margin: 0;
	color: rgba(255, 255, 255, 0.86);
	font-size: 16px;
}

.pw-guide-cta__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.pw-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 11px 18px;
	border: 1px solid #fff;
	border-radius: var(--pw-radius);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.pw-btn--solid {
	background: #fff;
	color: var(--pw-primary);
}

.pw-btn--solid:hover,
.pw-btn--solid:focus {
	background: var(--pw-primary-tint);
	color: var(--pw-primary-dark);
}

.pw-btn--ghost {
	background: transparent;
	color: #fff;
}

.pw-btn--ghost:hover,
.pw-btn--ghost:focus {
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
}

/* ---- More guides cards ------------------------------------------------ */
.pw-guide-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	border: 1px solid var(--pw-line);
	border-radius: var(--pw-radius);
	background: var(--pw-surface);
	color: var(--pw-ink);
	text-decoration: none;
	transition: border-color 0.15s ease;
}

.pw-guide-card:hover,
.pw-guide-card:focus {
	border-color: var(--pw-primary);
	color: var(--pw-ink);
}

.pw-guide-card__media {
	display: block;
	overflow: hidden;
	aspect-ratio: 16 / 9;
	background: var(--pw-soft);
}

.pw-guide-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.pw-guide-card__body {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 16px 18px 18px;
}

.pw-guide-card__date {
	color: var(--pw-muted);
	font-size: 13px;
}

.pw-guide-card__title {
	font-size: 17px;
	font-weight: 700;
	line-height: 1.35;
}

/* ---- Small screens ---------------------------------------------------- */
@media (max-width: 991.98px) {
	.pw-guide-hero {
		aspect-ratio: 4 / 3;
		margin-bottom: 24px;
	}

	.pw-guide-content > :is(p, ul, ol, blockquote),
	.pw-guide-content .elementor-widget-text-editor :is(p, ul, ol, blockquote) {
		font-size: 17px;
	}

	.pw-guide-band {
		padding: 36px 0;
	}
}

@media (max-width: 575.98px) {
	.pw-guide-content img.alignright,
	.pw-guide-content img.alignleft {
		float: none;
		display: block;
		max-width: 100%;
		margin: 0 0 16px;
	}

	.pw-guide-content > h2,
	.pw-guide-content .elementor-widget-text-editor h2,
	.pw-guide-band__title,
	.pw-guide-cta__title {
		font-size: 22px;
	}

	.pw-guide-cta__inner {
		padding: 24px 20px;
	}

	.pw-guide-cta__actions,
	.pw-guide-cta__actions .pw-btn {
		width: 100%;
		justify-content: center;
	}
}
