/*
Theme Name: Real Estate
Theme URI: https://example.com
Author: Your Company
Description: A complete real-estate agency theme built around a Property listing type with type/location/status taxonomies, a Νομός → Πόλη location hierarchy with map coordinates, filterable search, a discreet-listing mode for off-market properties, a gated lead-capture form (no exposed agent contact info), an investment-opportunities section, a region map, on-page SEO (meta tags, indexable location landing pages, structured data) with a live SEO score, and an "Estate Settings" admin panel for general/appearance/SEO/demo-data settings. No third-party plugin dependency.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: real-estate
*/

/* -------------------------------------------------- */
/* Variables & reset                                   */
/* -------------------------------------------------- */
:root {
	--re-primary: #0f3a52;
	--re-primary-light: #1c5975;
	--re-accent: #c9a24b;
	--re-terracotta: #b25c3a;
	--re-text: #24211c;
	--re-text-light: #6b6455;
	--re-bg: #faf8f3;
	--re-bg-alt: #f2ede1;
	--re-border: #e4ddcc;
	--re-radius: 6px;
	--re-shadow: 0 2px 14px rgba(36, 33, 28, 0.08);
	--re-max-width: 1200px;
	--re-serif: Georgia, "Noto Serif", "Times New Roman", serif;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--re-text);
	background: var(--re-bg);
	line-height: 1.6;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--re-primary);
	text-decoration: none;
}

a:hover {
	color: var(--re-accent);
}

ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

h1, h2, h3, h4 {
	margin: 0 0 0.5em;
	line-height: 1.25;
	font-family: var(--re-serif);
	font-weight: 600;
	letter-spacing: 0.01em;
}

/* -------------------------------------------------- */
/* Greek key (meander) decorative divider              */
/* -------------------------------------------------- */
.meander-divider {
	height: 14px;
	background-image: url("assets/images/meander.svg");
	background-repeat: repeat-x;
	background-position: center;
}

.meander-divider--small {
	width: 100px;
	margin: 18px 0 22px;
}

.container {
	max-width: var(--re-max-width);
	margin: 0 auto;
	padding: 0 20px;
}

.btn {
	display: inline-block;
	background: var(--re-primary);
	color: #fff;
	padding: 12px 24px;
	border-radius: var(--re-radius);
	border: none;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s ease;
}

.btn:hover {
	background: var(--re-primary-light);
	color: #fff;
}

.btn-accent {
	background: var(--re-accent);
}

.btn-accent:hover {
	background: #b6903f;
}

.btn-outline {
	background: transparent;
	border: 1px solid var(--re-primary);
	color: var(--re-primary);
}

.btn-outline:hover {
	background: var(--re-primary);
	color: #fff;
}

/* -------------------------------------------------- */
/* Header                                              */
/* -------------------------------------------------- */
.site-header {
	border-bottom: 1px solid var(--re-border);
	background: var(--re-bg);
	position: sticky;
	top: 0;
	z-index: 100;
}

.site-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 0;
	gap: 24px;
}

.site-branding {
	display: flex;
	align-items: center;
	gap: 10px;
}

.site-title {
	font-size: 22px;
	font-weight: 700;
	margin: 0;
}

.site-title a {
	color: var(--re-text);
}

.site-description {
	font-size: 13px;
	color: var(--re-text-light);
	margin: 0;
}

.primary-menu {
	display: flex;
	gap: 28px;
}

.primary-menu a {
	color: var(--re-text);
	font-weight: 500;
}

.menu-toggle {
	display: none;
	background: none;
	border: 1px solid var(--re-border);
	border-radius: 6px;
	padding: 8px 10px;
	cursor: pointer;
}

/* -------------------------------------------------- */
/* Hero / search                                       */
/* -------------------------------------------------- */
.hero {
	position: relative;
	background: linear-gradient(135deg, var(--re-primary) 0%, var(--re-primary-light) 100%);
	color: #fff;
	padding: 70px 0;
	overflow: hidden;
}

.hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: url("assets/images/meander.svg");
	background-size: 56px 32px;
	opacity: 0.08;
	pointer-events: none;
}

.hero .container {
	position: relative;
}

.hero h1 {
	font-size: 38px;
	max-width: 640px;
}

.hero p {
	max-width: 560px;
	opacity: 0.9;
}

.property-search-form {
	background: #fff;
	border-radius: var(--re-radius);
	box-shadow: var(--re-shadow);
	padding: 20px;
	margin-top: 30px;
	display: grid;
	grid-template-columns: repeat(4, 1fr) auto;
	gap: 14px;
	align-items: end;
}

.property-search-form .field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.property-search-form label {
	font-size: 12px;
	font-weight: 600;
	color: var(--re-text-light);
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.property-search-form input,
.property-search-form select {
	padding: 10px 12px;
	border: 1px solid var(--re-border);
	border-radius: 6px;
	font-size: 14px;
	color: var(--re-text);
	background: #fff;
}

.property-search-form .btn {
	white-space: nowrap;
}

.form-actions {
	display: flex;
	gap: 10px;
}

.property-search-form.is-compact {
	grid-template-columns: 1fr;
	box-shadow: none;
	padding: 0;
	margin-top: 0;
}

.property-search-form.is-compact .btn {
	width: 100%;
}

.property-search-form.is-compact .form-actions {
	flex-direction: column;
}

/* -------------------------------------------------- */
/* Property grid & cards                               */
/* -------------------------------------------------- */
.section {
	padding: 60px 0;
}

.section-header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 30px;
}

.section-header h2 {
	font-size: 28px;
}

.property-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 26px;
}

.property-card {
	border: 1px solid var(--re-border);
	border-radius: var(--re-radius);
	overflow: hidden;
	background: #fff;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.property-card:hover {
	box-shadow: var(--re-shadow);
	transform: translateY(-2px);
}

.property-card-media {
	position: relative;
	aspect-ratio: 4 / 3;
	background: var(--re-bg-alt);
	overflow: hidden;
}

.property-card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.property-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	background: var(--re-accent);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: 999px;
	text-transform: uppercase;
}

.property-card-body {
	padding: 18px;
}

.property-price {
	font-size: 20px;
	font-weight: 700;
	color: var(--re-primary);
	margin-bottom: 6px;
}

.property-card-title {
	font-size: 17px;
	margin-bottom: 6px;
}

.property-card-title a {
	color: var(--re-text);
}

.property-location {
	font-size: 13px;
	color: var(--re-text-light);
	margin-bottom: 12px;
}

.property-meta {
	display: flex;
	gap: 16px;
	font-size: 13px;
	color: var(--re-text-light);
	border-top: 1px solid var(--re-border);
	padding-top: 12px;
}

.property-meta span {
	display: flex;
	align-items: center;
	gap: 5px;
}

/* -------------------------------------------------- */
/* Archive layout (grid + filters sidebar)             */
/* -------------------------------------------------- */
.archive-layout {
	display: grid;
	grid-template-columns: 280px 1fr;
	gap: 40px;
	align-items: start;
}

.filters-panel {
	border: 1px solid var(--re-border);
	border-radius: var(--re-radius);
	padding: 20px;
	position: sticky;
	top: 90px;
}

.filters-panel h3 {
	font-size: 16px;
	margin-bottom: 16px;
}

.filters-panel .field {
	margin-bottom: 16px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.filters-panel label {
	font-size: 13px;
	font-weight: 600;
}

.filters-panel input,
.filters-panel select {
	padding: 8px 10px;
	border: 1px solid var(--re-border);
	border-radius: 6px;
	font-size: 14px;
}

.re-map {
	height: 560px;
	border-radius: var(--re-radius);
	border: 1px solid var(--re-border);
	overflow: hidden;
}

.leaflet-container img {
	max-width: none;
}

.leaflet-popup-content {
	font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.5;
}

.archive-intro {
	max-width: 720px;
	color: var(--re-text-light);
	margin-bottom: 26px;
}

.results-count {
	color: var(--re-text-light);
	font-size: 14px;
	margin-bottom: 20px;
}

.no-results {
	padding: 40px;
	text-align: center;
	background: var(--re-bg-alt);
	border-radius: var(--re-radius);
	color: var(--re-text-light);
}

/* -------------------------------------------------- */
/* Single property                                     */
/* -------------------------------------------------- */
.property-hero {
	margin-bottom: 12px;
	border-radius: var(--re-radius);
	overflow: hidden;
}

.property-hero img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	aspect-ratio: 16 / 9;
}

.property-gallery {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 10px;
	margin-bottom: 30px;
}

.property-gallery-item {
	display: block;
	border-radius: 4px;
	overflow: hidden;
	aspect-ratio: 4 / 3;
}

.property-gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.2s ease;
}

.property-gallery-item:hover img {
	transform: scale(1.05);
}

.property-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	flex-wrap: wrap;
	gap: 20px;
	margin-bottom: 30px;
	padding-bottom: 30px;
	border-bottom: 1px solid var(--re-border);
}

.property-header h1 {
	font-size: 30px;
	margin-bottom: 8px;
}

.property-stats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
	margin: 30px 0;
}

.property-stat {
	background: var(--re-bg-alt);
	border-radius: var(--re-radius);
	padding: 18px;
	text-align: center;
}

.property-stat strong {
	display: block;
	font-size: 20px;
	color: var(--re-primary);
}

.property-stat span {
	font-size: 12px;
	color: var(--re-text-light);
	text-transform: uppercase;
}

.property-body {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 40px;
	align-items: start;
}

.property-details-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 20px;
}

.property-details-table td {
	padding: 10px 0;
	border-bottom: 1px solid var(--re-border);
	font-size: 14px;
}

.property-details-table td:first-child {
	color: var(--re-text-light);
	width: 40%;
}

.contact-card {
	border: 1px solid var(--re-border);
	border-radius: var(--re-radius);
	padding: 24px;
	position: sticky;
	top: 90px;
}

.contact-card h3 {
	font-size: 18px;
}

.contact-card .btn {
	width: 100%;
	text-align: center;
	margin-top: 10px;
}

.related-properties {
	margin-top: 60px;
	padding-top: 40px;
	border-top: 1px solid var(--re-border);
}

.related-properties h2 {
	margin-bottom: 24px;
}

.property-badge-discreet {
	background: var(--re-primary);
	margin-left: 8px;
}

.lead-form {
	margin-top: 16px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.lead-form .field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.lead-form label {
	font-size: 13px;
	font-weight: 600;
}

.lead-form input[type="text"],
.lead-form input[type="email"],
.lead-form input[type="tel"],
.lead-form textarea {
	padding: 10px 12px;
	border: 1px solid var(--re-border);
	border-radius: 6px;
	font-size: 14px;
	font-family: inherit;
}

.lead-form .field-consent {
	font-size: 12px;
	color: var(--re-text-light);
	flex-direction: row;
	align-items: flex-start;
	gap: 8px;
}

.lead-form .field-consent label {
	font-size: 12px;
	font-weight: 400;
	display: flex;
	align-items: flex-start;
	gap: 8px;
}

.lead-form .field-consent input {
	margin-top: 3px;
}

.lead-form .btn {
	width: 100%;
}

.lead-form-notice {
	padding: 14px 16px;
	border-radius: var(--re-radius);
	font-size: 14px;
	margin-top: 16px;
}

.lead-form-success {
	background: #e4f3ea;
	color: #1a4d3e;
}

.lead-form-error {
	background: #fbe9e7;
	color: #9c3b2e;
}

/* -------------------------------------------------- */
/* Footer                                              */
/* -------------------------------------------------- */
.site-footer {
	background: var(--re-primary);
	color: #fff;
	margin-top: 60px;
	padding: 50px 0 24px;
}

.footer-widgets {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 30px;
	margin-bottom: 30px;
}

.footer-widgets h2,
.footer-widgets h3 {
	font-size: 16px;
	color: #fff;
}

.site-footer a {
	color: rgba(255, 255, 255, 0.85);
}

.footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.15);
	padding-top: 20px;
	font-size: 13px;
	color: rgba(255, 255, 255, 0.7);
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
}

/* -------------------------------------------------- */
/* Blog / generic content                              */
/* -------------------------------------------------- */
.content-area {
	max-width: 780px;
	margin: 0 auto;
}

.entry-header {
	margin-bottom: 20px;
}

.entry-meta {
	font-size: 13px;
	color: var(--re-text-light);
}

.pagination {
	display: flex;
	gap: 10px;
	margin-top: 30px;
}

.pagination a,
.pagination span {
	padding: 8px 14px;
	border: 1px solid var(--re-border);
	border-radius: 6px;
	font-size: 14px;
}

/* -------------------------------------------------- */
/* Responsive                                          */
/* -------------------------------------------------- */
@media (max-width: 960px) {
	.property-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.archive-layout {
		grid-template-columns: 1fr;
	}

	.filters-panel {
		position: static;
	}

	.property-body {
		grid-template-columns: 1fr;
	}

	.footer-widgets {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 680px) {
	.primary-menu {
		display: none;
		flex-direction: column;
		gap: 0;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: #fff;
		border-bottom: 1px solid var(--re-border);
		padding: 10px 20px;
	}

	.primary-menu.is-open {
		display: flex;
	}

	.primary-menu a {
		padding: 12px 0;
		border-bottom: 1px solid var(--re-border);
	}

	.menu-toggle {
		display: block;
	}

	.property-search-form {
		grid-template-columns: 1fr;
	}

	.form-actions {
		flex-direction: column;
	}

	.property-grid {
		grid-template-columns: 1fr;
	}

	.property-gallery {
		grid-template-columns: repeat(3, 1fr);
	}

	.property-stats {
		grid-template-columns: repeat(2, 1fr);
	}

	.footer-widgets {
		grid-template-columns: 1fr;
	}
}
