/* Child Theme - Custom CSS File for Buyers to Modify */


/* =====================================================================
 * The One Prop — custom styles for [title_search] and [pages_grid]
 * ===================================================================== */

/* Project search box */
.top-title-search {
	display: flex;
	max-width: 640px;
	margin: 0 auto;
	background: #fff;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
}
.top-title-search input[type="search"] {
	flex: 1 1 auto;
	min-width: 0;
	border: 0;
	outline: none;
	background: #fff;
	color: #333;
	font-size: 16px;
	padding: 14px 18px;
	box-shadow: none;
	border-radius: 0;
}
.top-title-search input[type="search"]::placeholder {
	color: #9aa3ad;
}
.top-title-search button {
	flex: 0 0 auto;
	border: 0;
	border-radius: 0;
	background: #2d8ee8;
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	padding: 0 28px;
	cursor: pointer;
	transition: background 0.2s ease;
}
.top-title-search button:hover,
.top-title-search button:focus {
	background: #1f6fc0;
	color: #fff;
}

/* Project cards grid */
.top-pages-grid {
	display: grid;
	gap: 24px;
	grid-template-columns: repeat(4, minmax(0, 1fr));
}
.top-pages-grid.top-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.top-pages-grid.top-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.top-pages-grid.top-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.top-pages-grid.top-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.top-pages-grid.top-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.top-pages-grid.top-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.top-card {
	display: block;
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
	color: inherit;
	text-decoration: none;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.top-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 10px 26px rgba(0, 0, 0, 0.14);
	text-decoration: none;
}
.top-card__img {
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: #eef2f6;
}
.top-card__img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}
.top-card:hover .top-card__img img {
	transform: scale(1.04);
}
.top-card__noimg {
	display: block;
	width: 100%;
	height: 100%;
}
.top-card__body {
	padding: 14px 16px 16px;
}
.top-card__title {
	margin: 0 0 6px;
	font-size: 18px;
	line-height: 1.3;
	color: #1a2b48;
}
.top-card__price {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	color: #2d8ee8;
}

@media (max-width: 1024px) {
	.top-pages-grid,
	.top-pages-grid.top-cols-3,
	.top-pages-grid.top-cols-4,
	.top-pages-grid.top-cols-5,
	.top-pages-grid.top-cols-6 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px;
	}
}
@media (max-width: 480px) {
	.top-pages-grid,
	.top-pages-grid.top-cols-2,
	.top-pages-grid.top-cols-3,
	.top-pages-grid.top-cols-4,
	.top-pages-grid.top-cols-5,
	.top-pages-grid.top-cols-6 {
		grid-template-columns: repeat(1, minmax(0, 1fr));
	}
	.top-title-search button {
		padding: 0 18px;
	}
}


/* Header ทุกหน้า (จอกว้าง + sticky) ใช้สีน้ำเงินเข้ม #001F54 เหมือนเดิม */
.rh_header.rh_temp_header_large_screens,
.rh_header--shadow,
.rh_header--shadow.rh_header--sticky,
.rh_temp_header_large_screens.rh_header--sticky {
	background: #001F54 !important;
}
.rh_header.rh_temp_header_large_screens .rh_menu__main > li > a,
.rh_header.rh_temp_header_large_screens .main-menu > ul > li > a {
	color: #fff;
}


/* ===== Search bar with filters ===== */
.top-title-search.top-title-search--filters {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 8px;
	max-width: 1100px;
	margin: 0 auto;
	padding: 10px;
	background: #fff;
	border-radius: 14px;
	overflow: visible;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
}
.top-title-search--filters .top-ts__field {
	flex: 1 1 150px;
	min-width: 0;
	display: flex;
}
.top-title-search--filters .top-ts__field--q {
	flex: 3 1 260px;
}
.top-title-search--filters input[type="search"],
.top-title-search--filters select {
	width: 100%;
	height: 48px;
	margin: 0;
	padding: 0 14px;
	border: 1px solid #e3e7ec;
	border-radius: 8px;
	background: #f7f9fb;
	color: #333;
	font-size: 15px;
	line-height: 48px;
	box-shadow: none;
	outline: none;
	appearance: none;
	-webkit-appearance: none;
}
.top-title-search--filters select {
	cursor: pointer;
	padding-right: 34px;
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23667' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
}
.top-title-search--filters input[type="search"]:focus,
.top-title-search--filters select:focus {
	border-color: #2d8ee8;
	background-color: #fff;
}
.top-title-search--filters .top-ts__btn {
	flex: 0 0 auto;
	height: 48px;
	border: 0;
	border-radius: 8px;
	background: #2d8ee8;
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	padding: 0 32px;
	cursor: pointer;
	transition: background 0.2s ease;
}
.top-title-search--filters .top-ts__btn:hover,
.top-title-search--filters .top-ts__btn:focus {
	background: #1f6fc0;
	color: #fff;
}
@media (max-width: 767px) {
	.top-title-search--filters .top-ts__field,
	.top-title-search--filters .top-ts__field--q {
		flex: 1 1 calc(50% - 4px);
	}
	.top-title-search--filters .top-ts__field--q,
	.top-title-search--filters .top-ts__btn {
		flex-basis: 100%;
		width: 100%;
	}
}

/* Results page */
.top-results-search {
	margin: 0 0 28px;
}
.top-results-summary {
	margin: -8px 0 20px;
	text-align: center;
	color: #556;
	font-size: 15px;
}
.top-results-summary .top-results-clear {
	margin-left: 10px;
	color: #2d8ee8;
	text-decoration: underline;
}
.top-results-empty {
	margin: 24px 0 48px;
	padding: 28px;
	text-align: center;
	color: #556;
	background: #f7f9fb;
	border-radius: 12px;
}

/* Type badge on cards */
.top-card__img {
	position: relative;
}
.top-card__badge {
	position: absolute;
	top: 10px;
	left: 10px;
	padding: 4px 10px;
	border-radius: 999px;
	background: rgba(0, 31, 84, 0.85);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
}


/* ===== Custom footer ===== */
.top-footer {
	background: #001F54;
	color: rgba(255, 255, 255, 0.78);
	font-size: 15px;
	line-height: 1.7;
	padding: 0;
}
.top-footer a {
	color: rgba(255, 255, 255, 0.85);
	text-decoration: none;
	transition: color 0.2s ease;
}
.top-footer a:hover {
	color: #fff;
	text-decoration: underline;
}
.top-footer__inner {
	max-width: 1240px;
	margin: 0 auto;
	padding: 56px 24px 40px;
}
.top-footer__grid {
	display: grid;
	grid-template-columns: 1.7fr 1fr 1.2fr 1.2fr 1.4fr;
	gap: 40px 32px;
}
.top-footer__col--brand {
	padding-right: 12px;
}
.top-footer__logo img {
	max-width: 190px;
	height: auto;
	display: block;
	margin-bottom: 18px;
}
.top-footer__desc {
	margin: 0 0 20px;
	font-size: 14.5px;
	line-height: 1.75;
	color: rgba(255, 255, 255, 0.72);
}
.top-footer__social {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.top-footer__soc {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	font-size: 16px;
	transition: background 0.2s ease, transform 0.2s ease;
}
.top-footer__soc:hover {
	background: #2d8ee8;
	color: #fff;
	text-decoration: none;
	transform: translateY(-2px);
}
.top-footer__soc--soon {
	opacity: 0.45;
	cursor: default;
}
.top-footer__soc--soon:hover {
	background: rgba(255, 255, 255, 0.1);
	transform: none;
}
.top-footer__soon {
	position: absolute;
	bottom: -6px;
	left: 50%;
	transform: translateX(-50%);
	white-space: nowrap;
	font-size: 9px;
	line-height: 1;
	padding: 2px 5px;
	border-radius: 999px;
	background: #2d8ee8;
	color: #fff;
	opacity: 1;
}
.top-footer__title {
	margin: 0 0 16px;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0.2px;
	color: #fff;
	position: relative;
	padding-bottom: 10px;
}
.top-footer__title::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 32px;
	height: 3px;
	border-radius: 2px;
	background: #2d8ee8;
}
.top-footer__list,
.top-footer__contact {
	list-style: none;
	margin: 0;
	padding: 0;
}
.top-footer__list li {
	margin: 0 0 9px;
}
.top-footer__list a {
	display: inline-block;
}
.top-footer__more {
	font-weight: 600;
	color: #6fb5f5 !important;
}
.top-footer__contact li {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	margin: 0 0 12px;
}
.top-footer__contact i {
	flex: 0 0 18px;
	margin-top: 5px;
	color: #6fb5f5;
	font-size: 14px;
	text-align: center;
}
.top-footer__cta {
	display: inline-block;
	margin-top: 8px;
	padding: 10px 18px;
	border-radius: 8px;
	background: #2d8ee8;
	color: #fff !important;
	font-weight: 600;
	font-size: 14px;
}
.top-footer__cta:hover {
	background: #1f6fc0;
	text-decoration: none !important;
}
.top-footer__bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	background: rgba(0, 0, 0, 0.18);
}
.top-footer__bottom-inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 8px 24px;
	padding: 18px 24px;
	font-size: 13.5px;
}
.top-footer__copy {
	margin: 0;
	color: rgba(255, 255, 255, 0.6);
}
.top-footer__legal {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 22px;
}
.top-footer__legal a {
	color: rgba(255, 255, 255, 0.7);
}
@media (max-width: 1100px) {
	.top-footer__grid {
		grid-template-columns: 1fr 1fr 1fr;
	}
	.top-footer__col--brand {
		grid-column: 1 / -1;
		max-width: 560px;
	}
}
@media (max-width: 640px) {
	.top-footer__inner {
		padding: 40px 20px 28px;
	}
	.top-footer__grid {
		grid-template-columns: 1fr 1fr;
		gap: 32px 20px;
	}
	.top-footer__col--contact {
		grid-column: 1 / -1;
	}
	.top-footer__bottom-inner {
		flex-direction: column;
		align-items: flex-start;
		padding: 16px 20px;
	}
}


/* Footer full width (theme limits .rh_footer to 1240px) */
.rh_footer.top-footer {
	max-width: none !important;
	width: 100% !important;
	margin: 0 !important;
	border-radius: 0 !important;
}
.top-footer__bottom-inner {
	padding-right: 80px;
}
@media (max-width: 640px) {
	.top-footer__bottom-inner {
		padding-right: 20px;
		padding-bottom: 56px;
	}
}


/* Legal pages (privacy policy etc.) */
.top-legal {
	max-width: 860px;
	margin: 0 auto;
	padding: 56px 24px 72px;
	font-size: 16px;
	line-height: 1.8;
	color: #333;
}
.top-legal h1 {
	font-size: 32px;
	margin: 0 0 6px;
	color: #001F54;
}
.top-legal__updated {
	color: #778;
	font-size: 14px;
	margin: 0 0 28px;
}
.top-legal h2 {
	font-size: 20px;
	margin: 32px 0 10px;
	color: #001F54;
}
.top-legal ul {
	padding-left: 22px;
	margin: 0 0 16px;
}
.top-legal li {
	margin-bottom: 8px;
}
.top-legal a {
	color: #2d8ee8;
}


/* Home hero banner: keep the whole image visible on every screen (image is 16:9) */
.elementor-105 .elementor-element.elementor-element-5879c7b,
.elementor-105 .elementor-element.elementor-element-5879c7b > .elementor-container {
	min-height: 56.25vw !important;
	height: auto !important;
	background-size: cover !important;
	background-position: center center !important;
}


/* ===== Type groups on the results page ===== */
.top-group {
	margin: 0 0 44px;
}
.top-group-banner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 22px;
	padding: 14px 22px;
	border-radius: 12px;
	background: linear-gradient(90deg, #001F54 0%, #0b3a8a 100%);
	color: #fff;
}
.top-group-banner__title {
	margin: 0;
	font-size: 22px;
	font-weight: 700;
	color: #fff;
	line-height: 1.3;
}
.top-group-banner__count {
	flex: 0 0 auto;
	font-size: 14px;
	padding: 5px 12px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.16);
}
.top-more {
	text-align: center;
	margin: 26px 0 0;
}
.top-more__btn {
	display: inline-block;
	padding: 11px 26px;
	border: 2px solid #2d8ee8;
	border-radius: 999px;
	color: #2d8ee8 !important;
	font-weight: 600;
	font-size: 15px;
	text-decoration: none !important;
	transition: background 0.2s ease, color 0.2s ease;
}
.top-more__btn:hover {
	background: #2d8ee8;
	color: #fff !important;
}

/* Type pages (/house, /condo) */
.top-type-page {
	max-width: 1240px;
	margin: 0 auto;
	padding: 44px 24px 72px;
}
.top-type-page__title {
	text-align: center;
	margin: 0 0 8px;
	font-size: 32px;
	color: #001F54;
}
.top-type-page__sub {
	text-align: center;
	margin: 0 0 28px;
	color: #667;
}
@media (max-width: 640px) {
	.top-group-banner {
		padding: 12px 16px;
	}
	.top-group-banner__title {
		font-size: 18px;
	}
	.top-type-page {
		padding: 28px 16px 56px;
	}
	.top-type-page__title {
		font-size: 24px;
	}
}


/* Header บนมือถือ/แท็บเล็ต ใช้สีน้ำเงินเข้มเหมือนจอกว้าง */
.rh_header.rh_temp_header_responsive_view,
.rh_header.rh_temp_header_responsive_view.rh_header--sticky {
	background: #001F54 !important;
}


/* แกลเลอรีรูปโครงการ (RealHomes image gallery widget) — ใช้ CSS grid แทน JS masonry กันเลย์เอาต์พังบนมือถือ */
.rhea-image-gallery {
	height: auto !important;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 10px;
}
.rhea-image-gallery .rhea-image-gallery-item {
	position: static !important;
	width: auto !important;
	left: auto !important;
	top: auto !important;
	margin: 0;
}
.rhea-image-gallery .rhea-image-gallery-item figure {
	margin: 0;
}
.rhea-image-gallery .rhea-image-gallery-item img {
	width: 100%;
	height: auto;
	display: block;
	object-fit: cover;
}
@media (max-width: 767px) {
	.rhea-image-gallery {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 8px;
	}
}


/* SEO: H1 เหนือช่องค้นหาหน้าแรก + heading ที่ถูกเปลี่ยน tag ให้คงขนาดเดิม */
.top-title-search__heading {
	text-align: center;
	margin: 0 0 22px;
	font-size: 30px;
	line-height: 1.3;
	font-weight: 700;
	color: #001F54;
}
h1.rh_section__title,
h1.rh_page__title {
	font-size: inherit;
}
h2.entry-title {
	font-size: inherit;
}
@media (max-width: 640px) {
	.top-title-search__heading {
		font-size: 22px;
		margin-bottom: 16px;
	}
}
