/* PE Home — every rule is scoped to #pe-home. No global selectors.
   Typeface = Inter, which the site already loads. Palette (variant A,
   2026-10-07) aligned with the site: black buttons as in the header, green
   accents from the listing hero, grey #f9f9f9 from /search-results/. No gold.
   Contrast: white on --pe-btn 21:1 · --pe-accent on --pe-bg 10.5:1 ·
   --pe-accent-line (lines/icons only, non-text) on --pe-bg 3.6:1. */

#pe-home {
	--pe-black: #000000;        /* titles; dark layers over photos */
	--pe-btn: #000000;          /* buttons, outline button and active tab */
	--pe-btn-hover: #262626;
	--pe-accent: #004442;       /* accent text */
	--pe-accent-line: #5b8b8b;  /* underlines, rules, icons, focus ring — never text */
	--pe-bg: #f9f9f9;           /* tinted sections (= /search-results/ background) */
	--pe-white: #ffffff;
	--pe-ink: #24333e;
	--pe-muted: #5d6870;
	--pe-line: #d5dbe0;
	--pe-max-width: 1320px;
	--pe-radius: 3px;
	--pe-shadow: 0 12px 40px rgb(0 0 0 / 8%);
	--pe-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
	--pe-gutter: 20px;

	display: block;
	width: 100%;
	overflow-x: clip;
	background: var(--pe-white);
	color: var(--pe-ink);
	font-family: var(--pe-font);
	font-size: 16px;
	line-height: 1.6;
	-webkit-text-size-adjust: 100%;
}

/* ---------- Neutralise inherited Houzez / Elementor styles ----------
   The site's inline CSS forces a:not(.btn):not(.nav-link):not(.dropdown-item)
   { color:#000 !important }, so link colours here need !important too
   (scoped: #pe-home a… = 1,1,1 beats 0,3,1). */
#pe-home *,
#pe-home *::before,
#pe-home *::after { box-sizing: border-box; }

#pe-home h1, #pe-home h2, #pe-home h3, #pe-home p, #pe-home ul, #pe-home li,
#pe-home figure, #pe-home form, #pe-home fieldset, #pe-home details, #pe-home summary {
	margin: 0;
	padding: 0;
	font-family: var(--pe-font);
	letter-spacing: normal;
	text-transform: none;
}
#pe-home h1, #pe-home h2, #pe-home h3 { color: var(--pe-black); font-weight: 600; }
#pe-home ul { list-style: none; }
#pe-home li::before { content: none; }
#pe-home img { display: block; max-width: 100%; height: auto; border: 0; border-radius: 0; box-shadow: none; }
#pe-home a { color: inherit !important; text-decoration: none; box-shadow: none; transition: color .15s ease, background-color .15s ease, border-color .15s ease; }
#pe-home a:hover { text-decoration: none; }
#pe-home button, #pe-home input, #pe-home select {
	margin: 0;
	font-family: var(--pe-font);
	font-size: 16px; /* ≥16px: avoids the iOS zoom on focus */
	line-height: 1.3;
	letter-spacing: normal;
	text-transform: none;
	box-shadow: none;
}
#pe-home .pe-ico { width: 18px; height: 18px; flex: 0 0 auto; display: inline-block; vertical-align: middle; }

/* Visible focus everywhere */
#pe-home a:focus-visible,
#pe-home button:focus-visible,
#pe-home summary:focus-visible,
#pe-home input:focus-visible,
#pe-home select:focus-visible {
	outline: 3px solid var(--pe-accent-line);
	outline-offset: 2px;
}

/* ---------- Layout primitives ---------- */
#pe-home .pe-wrap {
	width: 100%;
	max-width: calc(var(--pe-max-width) + 2 * var(--pe-gutter));
	margin: 0 auto;
	padding: 0 var(--pe-gutter);
}
#pe-home .pe-section { padding: 56px 0; }
#pe-home .pe-section--tint { background: var(--pe-bg); }
#pe-home .pe-center { display: flex; justify-content: center; margin-top: 32px; }

#pe-home .pe-h1,
#pe-home .pe-h2 { text-wrap: balance; }
#pe-home .pe-h1 {
	font-size: clamp(2rem, 1.35rem + 2.6vw, 3.4rem);
	line-height: 1.12;
	font-weight: 600;
	color: var(--pe-white);
}
#pe-home .pe-h2 {
	font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.4rem);
	line-height: 1.2;
	font-weight: 500;
	color: var(--pe-black);
}
#pe-home .pe-h2--light { color: var(--pe-white); }
#pe-home .pe-h3 { font-size: 1.25rem; line-height: 1.3; font-weight: 600; color: var(--pe-black); }

#pe-home .pe-eyebrow {
	font-size: .8125rem;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--pe-accent);
}
#pe-home .pe-eyebrow--light { color: var(--pe-white); }

#pe-home .pe-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px 24px;
	margin-bottom: 28px;
}

/* ---------- Buttons ---------- */
#pe-home .pe-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 48px;
	padding: 12px 24px;
	border: 1px solid var(--pe-btn);
	border-radius: var(--pe-radius);
	font-size: .9375rem;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	cursor: pointer;
}
#pe-home .pe-btn--primary { background: var(--pe-btn); color: var(--pe-white) !important; }
#pe-home .pe-btn--primary:hover { background: var(--pe-btn-hover); border-color: var(--pe-btn-hover); color: var(--pe-white) !important; }
#pe-home .pe-btn--outline { background: transparent; color: var(--pe-btn) !important; }
#pe-home .pe-btn--outline:hover { background: var(--pe-btn); color: var(--pe-white) !important; }

#pe-home .pe-textlink {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	font-weight: 600;
	color: var(--pe-accent) !important;
	border-bottom: 2px solid var(--pe-accent-line);
}
#pe-home .pe-textlink:hover { color: var(--pe-black) !important; border-bottom-color: var(--pe-accent); }

/* ---------- 1. Hero ---------- */
#pe-home .pe-hero {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: 0;
	background: var(--pe-black);
	color: var(--pe-white);
	isolation: isolate;
}
#pe-home .pe-hero__media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
/* Imagify wraps library images in <picture> and moves the img's class onto
   it, so style "the img inside the media box", with or without <picture>. */
#pe-home .pe-hero__media picture,
#pe-home .pe-areas__media picture { position: absolute; inset: 0; display: block; }
#pe-home .pe-hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 55%; }
/* Soft black gradient only behind the text. On phones and tablets the text
   fills most of the hero, so it rises higher (eyebrow ≥5.5:1 worst case). */
#pe-home .pe-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(0deg, rgb(0 0 0 / 80%) 0%, rgb(0 0 0 / 66%) 40%, rgb(0 0 0 / 52%) 70%, rgb(0 0 0 / 18%) 100%);
	pointer-events: none;
}
#pe-home .pe-hero__inner { padding-top: 150px; padding-bottom: 36px; }
#pe-home .pe-hero__text { max-width: 720px; }
#pe-home .pe-hero__text .pe-eyebrow { margin-bottom: 14px; }
#pe-home .pe-hero__sub { margin-top: 16px; font-size: 1.0625rem; line-height: 1.55; color: var(--pe-white); max-width: 560px; }

/* Search box */
#pe-home .pe-search-wrap { position: relative; z-index: 2; margin-top: 0; }
/* Grey band behind the box, full width, from the bottom of the photo down to
   "How can we help you?" (top = how far the box overlaps the hero). */
#pe-home .pe-search-wrap::before {
	content: "";
	position: absolute;
	z-index: -1;
	top: 0;
	bottom: 0;
	left: 50%;
	width: 100vw;
	margin-left: -50vw;
	background: var(--pe-bg);
	pointer-events: none;
}
#pe-home .pe-search {
	background: var(--pe-white);
	border: 1px solid var(--pe-line);
	border-top: 0;
	box-shadow: var(--pe-shadow);
	padding: 0 18px 18px;
}
#pe-home .pe-search__top {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 0 20px;
	margin: 0 -18px 18px;
	border-bottom: 1px solid var(--pe-line);
}
#pe-home .pe-search__mode {
	display: inline-flex;
	align-items: center;
	min-height: 48px;
	padding: 0 22px;
	background: var(--pe-btn);
	color: var(--pe-white);
	font-weight: 600;
	font-size: .9375rem;
	box-shadow: -1px 0 0 var(--pe-btn); /* covers the box's 1px left border, no layout shift */
}
#pe-home .pe-search__rentals {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 48px;
	padding: 0 4px;
	color: var(--pe-accent) !important;
	font-weight: 600;
	font-size: .9375rem;
	text-decoration: underline;
	text-decoration-color: var(--pe-accent-line);
	text-underline-offset: 4px;
}
#pe-home .pe-search__rentals:hover { color: var(--pe-black) !important; text-decoration-thickness: 2px; }

#pe-home .pe-search__fields { display: grid; grid-template-columns: 1fr; gap: 14px; }
#pe-home .pe-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
#pe-home .pe-field label {
	margin: 0;
	font-size: .8125rem;
	font-weight: 600;
	color: var(--pe-ink);
	letter-spacing: .02em;
}
#pe-home .pe-field select,
#pe-home .pe-field input {
	display: block;
	width: 100%;
	height: 48px;
	padding: 10px 40px 10px 12px;
	border: 1px solid #8c979f; /* 3:1 against white for the control boundary */
	border-radius: var(--pe-radius);
	background-color: var(--pe-white);
	color: var(--pe-ink);
	font-weight: 400;
}
#pe-home .pe-field input { padding-right: 12px; }
#pe-home .pe-field select {
	-webkit-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 18px 18px;
}
#pe-home .pe-field input::placeholder { color: var(--pe-muted); opacity: 1; }
#pe-home .pe-search__submit { width: 100%; align-self: end; }

#pe-home .pe-search__more { margin-top: 12px; }
#pe-home .pe-search__more summary {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	cursor: pointer;
	font-weight: 600;
	font-size: .9375rem;
	color: var(--pe-black);
	list-style: none;
}
#pe-home .pe-search__more summary::-webkit-details-marker { display: none; }
#pe-home .pe-search__more[open] summary { color: var(--pe-accent); }
#pe-home .pe-search__extra { display: grid; grid-template-columns: 1fr; gap: 14px; padding: 6px 0 4px; }

#pe-home .pe-search__popular {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0 16px;
	margin-top: 8px;
	padding-top: 10px;
	border-top: 1px solid var(--pe-line);
	font-size: .9375rem;
}
#pe-home .pe-search__popular-label { color: var(--pe-muted); font-weight: 600; margin-right: 2px; }
#pe-home .pe-search__popular a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	color: var(--pe-black) !important;
	text-decoration: underline;
	text-decoration-color: var(--pe-accent-line);
	text-underline-offset: 4px;
}
#pe-home .pe-search__popular a:hover { text-decoration-thickness: 2px; }

/* ---------- 2. How can we help you? ---------- */
#pe-home .pe-help { margin-top: 0; }
#pe-home .pe-help .pe-h2 { margin-bottom: 28px; }
#pe-home .pe-help__grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
#pe-home .pe-help__card {
	display: flex;
	flex-direction: column;
	background: var(--pe-white);
	box-shadow: 0 1px 0 var(--pe-line);
}
#pe-home .pe-help__media { position: relative; aspect-ratio: 16 / 10; background: var(--pe-bg); }
#pe-home .pe-help__media > picture, #pe-home .pe-help__media > img { overflow: hidden; }
#pe-home .pe-help__media > picture, #pe-home .pe-about__media > picture { display: block; width: 100%; height: 100%; }
#pe-home .pe-help__media img { width: 100%; height: 100%; object-fit: cover; }
#pe-home .pe-help__icon {
	position: absolute;
	left: 20px;
	bottom: -22px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: var(--pe-white);
	border: 1px solid var(--pe-accent-line);
	color: var(--pe-accent-line);
}
#pe-home .pe-help__icon .pe-ico { width: 22px; height: 22px; }
#pe-home .pe-help__body { display: flex; flex-direction: column; gap: 12px; flex: 1 1 auto; padding: 36px 20px 22px; }
#pe-home .pe-help__body p { color: var(--pe-ink); font-size: .9875rem; flex: 1 1 auto; }
#pe-home .pe-help__body .pe-btn { align-self: stretch; margin-top: 6px; }

/* ---------- 3. Featured properties ---------- */
#pe-home .pe-cards {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(260px, 78%);
	gap: 16px;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-padding-left: var(--pe-gutter);
	margin: 0 calc(-1 * var(--pe-gutter));
	padding: 4px var(--pe-gutter) 14px;
	-webkit-overflow-scrolling: touch;
}
#pe-home .pe-card { scroll-snap-align: start; min-width: 0; }
#pe-home .pe-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: var(--pe-white);
	border: 1px solid var(--pe-line);
	color: var(--pe-ink) !important;
}
#pe-home .pe-card__link:hover { border-color: var(--pe-black); }
#pe-home .pe-card__link:hover .pe-card__title { text-decoration: underline; text-underline-offset: 3px; }
#pe-home .pe-card__media { aspect-ratio: 4 / 3; background: var(--pe-bg); overflow: hidden; }
#pe-home .pe-card__media img { width: 100%; height: 100%; object-fit: cover; }
#pe-home .pe-card__body { display: flex; flex-direction: column; gap: 6px; padding: 16px 16px 18px; flex: 1 1 auto; }
#pe-home .pe-card__price { font-size: 1.1875rem; font-weight: 700; color: var(--pe-black); }
#pe-home .pe-card__title { font-size: .9375rem; font-weight: 500; line-height: 1.4; color: var(--pe-ink); }
#pe-home .pe-card__specs { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: auto; padding-top: 8px; font-size: .875rem; color: var(--pe-muted); }
#pe-home .pe-card__spec { display: inline-flex; align-items: center; gap: 6px; }
#pe-home .pe-card__spec .pe-ico { color: var(--pe-accent-line); }

/* ---------- 4. About ---------- */
#pe-home .pe-about__grid { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: center; }
#pe-home .pe-about__text { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
#pe-home .pe-about__text p { max-width: 60ch; }
#pe-home .pe-about__text .pe-btn { margin-top: 8px; }
#pe-home .pe-about__media { aspect-ratio: 1200 / 771; background: var(--pe-bg); }
#pe-home .pe-about__media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 5. Areas ---------- */
#pe-home .pe-areas__band { position: relative; isolation: isolate; color: var(--pe-white); background: var(--pe-black); }
#pe-home .pe-areas__media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
#pe-home .pe-areas__media img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
#pe-home .pe-areas__band::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: rgb(0 0 0 / 60%); /* uniform black veil */
}
#pe-home .pe-areas__inner { padding-top: 56px; padding-bottom: 56px; }
#pe-home .pe-areas__cities { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
#pe-home .pe-areas__cities a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	padding: 8px 16px;
	border: 1px solid rgb(255 255 255 / 70%);
	border-radius: var(--pe-radius);
	color: var(--pe-white) !important;
	font-weight: 600;
	background: rgb(0 0 0 / 30%);
}
#pe-home .pe-areas__cities a:hover { background: var(--pe-white); color: var(--pe-black) !important; }
#pe-home .pe-areas__groups { display: grid; grid-template-columns: 1fr; gap: 28px; }
#pe-home .pe-areas__group .pe-h3 { margin-bottom: 4px; padding-bottom: 4px; border-bottom: 1px solid var(--pe-accent-line); }
#pe-home .pe-areas__group .pe-h3 a.pe-areas__city {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--pe-black) !important;
	text-decoration: underline;
	text-decoration-color: var(--pe-accent-line);
	text-underline-offset: 5px;
}
#pe-home .pe-areas__group .pe-h3 a.pe-areas__city:hover { text-decoration-thickness: 2px; }
#pe-home .pe-areas__group .pe-h3:not(:has(a)) { min-height: 48px; display: flex; align-items: center; }
#pe-home .pe-areas__group a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--pe-black) !important;
	text-decoration: underline;
	text-decoration-color: rgb(91 139 139 / 60%);
	text-underline-offset: 4px;
}
#pe-home .pe-areas__group a:hover { text-decoration-color: var(--pe-accent-line); }

/* ---------- 6. Closing ---------- */
#pe-home .pe-closing { border-top: 1px solid var(--pe-line); }
#pe-home .pe-closing__inner { display: flex; flex-direction: column; gap: 18px; }
#pe-home .pe-closing__contact { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; }
#pe-home .pe-closing__phone {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	font-size: 1.375rem;
	font-weight: 600;
	color: var(--pe-black) !important;
}
#pe-home .pe-closing__phone:hover { color: var(--pe-accent) !important; }
#pe-home .pe-closing__address { display: inline-flex; align-items: center; gap: 8px; color: var(--pe-ink); }
#pe-home .pe-closing .pe-ico { color: var(--pe-accent-line); }

/* ================= Tablet (≥768px) ================= */
@media (min-width: 768px) {
	#pe-home { --pe-gutter: 32px; }
	#pe-home .pe-section { padding: 72px 0; }
	#pe-home .pe-hero { min-height: 520px; }
	#pe-home .pe-hero__inner { padding-top: 96px; padding-bottom: 120px; }
	#pe-home .pe-search-wrap { margin-top: -72px; }
	#pe-home .pe-search-wrap::before { top: 72px; }
	#pe-home .pe-search { padding: 0 24px 20px; }
	#pe-home .pe-search__top { margin: 0 -24px 18px; }
	#pe-home .pe-search__fields { grid-template-columns: 1fr 1fr; }
	#pe-home .pe-search__submit { grid-column: 1 / -1; }
	#pe-home .pe-search__extra { grid-template-columns: repeat(3, 1fr); }
	#pe-home .pe-help { padding-top: 72px; }
	#pe-home .pe-help__grid { grid-template-columns: 1fr 1fr; }
	#pe-home .pe-cards { grid-auto-columns: minmax(280px, 44%); }
	#pe-home .pe-areas__groups { grid-template-columns: repeat(2, 1fr); gap: 32px 40px; }
	#pe-home .pe-closing__inner { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* ================= Desktop (≥1024px) ================= */
@media (min-width: 1024px) {
	#pe-home .pe-section { padding: 88px 0; }
	#pe-home .pe-hero { min-height: clamp(560px, 72vh, 760px); }
	#pe-home .pe-hero::after {
		background: linear-gradient(90deg, rgb(0 0 0 / 78%) 0%, rgb(0 0 0 / 58%) 45%, rgb(0 0 0 / 0%) 80%);
	}
	#pe-home .pe-hero__text { max-width: min(720px, 60%); }
	#pe-home .pe-hero__inner { padding-top: 120px; padding-bottom: 150px; }
	#pe-home .pe-search-wrap { margin-top: -96px; }
	#pe-home .pe-search-wrap::before { top: 96px; }
	#pe-home .pe-search__fields { grid-template-columns: 1.3fr 1fr 1fr .8fr auto; align-items: end; }
	#pe-home .pe-search__submit { grid-column: auto; width: auto; white-space: nowrap; }
	/* 8 cards: 4 columns × 2 rows, no scrolling. */
	#pe-home .pe-cards {
		grid-auto-flow: row;
		grid-template-columns: repeat(4, 1fr);
		grid-auto-columns: auto;
		gap: 24px;
		overflow: visible;
		scroll-snap-type: none;
		margin: 0;
		padding: 0;
	}
	#pe-home .pe-about__grid { grid-template-columns: 1fr 1fr; gap: 64px; }
	#pe-home .pe-areas__inner { padding-top: 88px; padding-bottom: 88px; }
	#pe-home .pe-areas__groups { grid-template-columns: repeat(4, 1fr); }
}

/* 4 service cards in one row only when they have room for their buttons. */
@media (min-width: 1180px) {
	#pe-home .pe-help__grid { grid-template-columns: repeat(4, 1fr); }
}

/* Low, wide screens (e.g. 1366×650): keep the search box in view. */
@media (min-width: 1024px) and (max-height: 760px) {
	#pe-home .pe-hero { min-height: 500px; }
	#pe-home .pe-hero__inner { padding-top: 72px; padding-bottom: 130px; }
}

@media (prefers-reduced-motion: reduce) {
	#pe-home a, #pe-home .pe-btn { transition: none; }
}
