/* ==========================================================================
   Amlak Real Estate — base layer
   Design tokens, reset, layout shell, header, footer, buttons, forms,
   widgets, breadcrumbs, pagination, notices.

   Mirrors the tokens in amlak-web/style.css so the desktop app, the marketing
   site and this theme read as one product.
   ========================================================================== */

:root {
	/* Brand */
	--primary: #0e7c4a;
	--primary-dark: #0a5c37;
	--primary-darker: #084a2c;
	--primary-light: #e8f5ee;
	--primary-lighter: #f2faf6;
	--accent: #f59e0b;
	--accent-light: #fef3c7;

	/* Neutrals */
	--bg: #f8faf8;
	--surface: #ffffff;
	--ink: #0f1e14;
	--muted: #5a6b5e;
	--border: #dde6df;
	--border-strong: #c8d8cc;
	--danger: #b91c1c;
	--danger-light: #fef2f2;

	/* Shape */
	--radius: 16px;
	--radius-sm: 10px;
	--radius-pill: 999px;

	/* Elevation */
	--shadow: 0 8px 32px rgba(15, 30, 20, 0.08);
	--shadow-lg: 0 16px 48px rgba(15, 30, 20, 0.12);
	--shadow-sm: 0 1px 3px rgba(15, 30, 20, 0.06);

	/* Metrics */
	--max: 1180px;
	--max-wide: 1360px;
	--gutter: 1.25rem;
	--header-h: 72px;

	/* Motion — kept short; long eases feel sluggish on a listing grid. */
	--t-fast: 0.15s ease;
	--t: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --------------------------------------------------------------- reset --- */

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) + 1rem);
}

html {
	/* Guard against a grid child forcing the page wider than the viewport. */
	overflow-x: clip;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: Vazirmatn, Vazir, Tahoma, system-ui, -apple-system, sans-serif;
	font-size: 16px;
	line-height: 1.85;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-wrap: break-word;
}

/* Respect users who ask for less motion. */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

img,
svg,
video,
canvas {
	max-width: 100%;
	height: auto;
	display: block;
}

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}

/* Persian numerals should line up in price columns. */
.are-price,
.are-number,
time {
	font-variant-numeric: tabular-nums;
}

a {
	color: var(--primary);
	text-decoration: none;
	transition: color var(--t-fast);
}

a:hover,
a:focus-visible {
	color: var(--primary-dark);
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 0.6em;
	line-height: 1.4;
	font-weight: 800;
	letter-spacing: -0.01em;
}

h1 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem); }
h3 { font-size: clamp(1.15rem, 1rem + 0.6vw, 1.375rem); }
h4 { font-size: 1.125rem; }

p {
	margin: 0 0 1em;
}

ul,
ol {
	margin: 0 0 1em;
	padding-inline-start: 1.4em;
}

figure {
	margin: 0 0 1.5rem;
}

/* Visible focus for keyboard users on every interactive element. */
:focus-visible {
	outline: 2px solid var(--primary);
	outline-offset: 2px;
	border-radius: 4px;
}

.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background: var(--surface);
	clip-path: none;
	color: var(--primary-dark);
	display: block;
	font-size: 0.95rem;
	font-weight: 700;
	height: auto;
	inset-block-start: 0.5rem;
	inset-inline-start: 0.5rem;
	padding: 0.75rem 1.25rem;
	position: fixed;
	text-decoration: none;
	width: auto;
	z-index: 100000;
}

/* -------------------------------------------------------------- layout --- */

.are-shell {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.are-container {
	width: 100%;
	max-width: var(--max);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

/* WordPress core's alignwide/alignfull go edge-to-edge on desktop only. */
@media (max-width: 768px) {
	.are-container > .alignwide,
	.are-container > .alignfull {
		margin-inline: calc(var(--gutter) * -1);
		max-width: none;
		width: auto;
	}
}

.are-container--wide {
	max-width: var(--max-wide);
}

.are-main {
	flex: 1 0 auto;
	padding-block: clamp(1.75rem, 1rem + 2.5vw, 3rem);
}

.are-section {
	padding-block: clamp(2.5rem, 1.5rem + 3vw, 4.5rem);
}

.are-section--tight {
	padding-block: clamp(1.5rem, 1rem + 1.5vw, 2.25rem);
}

.are-section--alt {
	background: var(--surface);
	border-block: 1px solid var(--border);
}

/* Section heading used across home + archive + blog. */
.are-section-head {
	align-items: flex-end;
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	justify-content: space-between;
	margin-block-end: 1.75rem;
}

.are-section-head h2 {
	margin: 0;
}

.are-section-head p {
	color: var(--muted);
	margin: 0.35rem 0 0;
}

.are-section-head__link {
	align-items: center;
	display: inline-flex;
	gap: 0.35rem;
	font-weight: 700;
	white-space: nowrap;
}

/* ------------------------------------------------------------- buttons --- */

.are-btn {
	align-items: center;
	background: var(--primary);
	border: 2px solid var(--primary);
	border-radius: var(--radius-pill);
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	font-weight: 700;
	gap: 0.5rem;
	justify-content: center;
	line-height: 1.4;
	padding: 0.7rem 1.6rem;
	text-align: center;
	transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-fast);
}

.are-btn:hover,
.are-btn:focus-visible {
	background: var(--primary-dark);
	border-color: var(--primary-dark);
	color: #fff;
	transform: translateY(-1px);
}

.are-btn:active {
	transform: translateY(0);
}

.are-btn--ghost {
	background: transparent;
	border-color: var(--border-strong);
	color: var(--ink);
}

.are-btn--ghost:hover,
.are-btn--ghost:focus-visible {
	background: var(--surface);
	border-color: var(--primary);
	color: var(--primary-dark);
}

.are-btn--light {
	background: #fff;
	border-color: #fff;
	color: var(--primary-dark);
}

.are-btn--light:hover,
.are-btn--light:focus-visible {
	background: var(--primary-light);
	border-color: var(--primary-light);
	color: var(--primary-darker);
}

.are-btn--sm {
	font-size: 0.9rem;
	padding: 0.45rem 1rem;
}

.are-btn--block {
	width: 100%;
}

.are-btn--whatsapp {
	background: #25d366;
	border-color: #25d366;
	color: #fff;
}

.are-btn--whatsapp:hover,
.are-btn--whatsapp:focus-visible {
	background: #1eb455;
	border-color: #1eb455;
}

.are-btn[disabled],
.are-btn.is-busy {
	opacity: 0.6;
	pointer-events: none;
}

/* --------------------------------------------------------------- forms --- */

.are-field {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.are-label {
	color: var(--muted);
	font-size: 0.85rem;
	font-weight: 600;
}

.are-input,
.are-select,
.are-textarea {
	background: var(--surface);
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-sm);
	color: var(--ink);
	padding: 0.65rem 0.9rem;
	transition: border-color var(--t-fast), box-shadow var(--t-fast);
	width: 100%;
}

.are-input:focus,
.are-select:focus,
.are-textarea:focus {
	border-color: var(--primary);
	box-shadow: 0 0 0 3px var(--primary-light);
	outline: none;
}

.are-textarea {
	min-height: 130px;
	resize: vertical;
}

.are-select {
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%235a6b5e' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='m1 1 5 5 5-5'/%3E%3C/svg%3E");
	background-position: left 0.9rem center;
	background-repeat: no-repeat;
	cursor: pointer;
	padding-inline-start: 0.9rem;
	padding-inline-end: 2.4rem;
}

.are-check {
	align-items: center;
	cursor: pointer;
	display: inline-flex;
	gap: 0.5rem;
	line-height: 1.5;
}

.are-check input {
	accent-color: var(--primary);
	height: 1.1rem;
	margin: 0;
	width: 1.1rem;
}

/* Number inputs: strip the spinners, they sit on the wrong side in RTL. */
.are-input[type='number'] {
	-moz-appearance: textfield;
	appearance: textfield;
}

.are-input[type='number']::-webkit-outer-spin-button,
.are-input[type='number']::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* -------------------------------------------------------------- badges --- */

.are-badge {
	align-items: center;
	background: var(--primary-light);
	border-radius: var(--radius-pill);
	color: var(--primary-dark);
	display: inline-flex;
	font-size: 0.78rem;
	font-weight: 700;
	gap: 0.3rem;
	line-height: 1.6;
	padding: 0.2rem 0.7rem;
	white-space: nowrap;
}

.are-badge--closed {
	background: rgba(185, 28, 28, 0.9);
	color: #fff;
}

.are-badge--rent {
	background: var(--accent-light);
	color: #92400e;
}

.are-badge--outline {
	background: transparent;
	border: 1px solid var(--border-strong);
	color: var(--muted);
}

/* --------------------------------------------------------------- cards --- */

.are-panel {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-sm);
}

.are-panel__body {
	padding: 1.25rem;
}

/* -------------------------------------------------------------- header --- */

.are-header {
	background: var(--surface);
	border-block-end: 1px solid var(--border);
	position: sticky;
	inset-block-start: 0;
	z-index: 100;
}

.are-header__inner {
	align-items: center;
	display: flex;
	gap: 1.5rem;
	height: var(--header-h);
	justify-content: space-between;
}

.are-header__brand {
	align-items: center;
	display: flex;
	flex: 0 0 auto;
	gap: 0.6rem;
}

.are-header__brand img {
	max-height: 44px;
	width: auto;
}

.are-header__title {
	color: var(--ink);
	font-size: 1.15rem;
	font-weight: 800;
	margin: 0;
	white-space: nowrap;
}

.are-header__title:hover {
	color: var(--primary);
}

.are-header__tagline {
	color: var(--muted);
	display: block;
	font-size: 0.72rem;
	font-weight: 500;
	line-height: 1.3;
}

.are-nav {
	display: flex;
	flex: 1 1 auto;
	gap: 0.25rem;
	justify-content: center;
}

.are-nav ul {
	display: flex;
	gap: 0.15rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.are-nav li {
	position: relative;
}

.are-nav a {
	border-radius: var(--radius-pill);
	color: var(--ink);
	display: block;
	font-weight: 600;
	padding: 0.45rem 0.95rem;
	transition: background var(--t-fast), color var(--t-fast);
}

.are-nav a:hover,
.are-nav a:focus-visible,
.are-nav .current-menu-item > a,
.are-nav .current-menu-ancestor > a,
.are-nav .current_page_item > a {
	background: var(--primary-light);
	color: var(--primary-dark);
}

/* Sub-menus: opened on hover and on keyboard focus, so they are reachable
   without a pointer. */
.are-nav .sub-menu {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow);
	inset-block-start: 100%;
	inset-inline-end: 0;
	min-width: 210px;
	opacity: 0;
	padding: 0.4rem;
	position: absolute;
	transition: opacity var(--t-fast), transform var(--t-fast);
	transform: translateY(-6px);
	visibility: hidden;
	z-index: 60;
}

.are-nav li:hover > .sub-menu,
.are-nav li:focus-within > .sub-menu {
	opacity: 1;
	transform: translateY(0);
	visibility: visible;
}

.are-nav .sub-menu a {
	border-radius: 6px;
	display: block;
	padding: 0.4rem 0.75rem;
}

.are-nav .sub-menu .sub-menu {
	inset-block-start: -0.4rem;
	inset-inline-end: 100%;
}

/* Dropdown caret. */
.are-nav .menu-item-has-children > a::after {
	border-block: 4px solid transparent;
	border-inline-start: 5px solid currentColor;
	content: '';
	display: inline-block;
	margin-inline-start: 0.4rem;
	opacity: 0.6;
	vertical-align: middle;
}

.are-header__actions {
	align-items: center;
	display: flex;
	flex: 0 0 auto;
	gap: 0.6rem;
}

.are-header__phone {
	align-items: center;
	color: var(--ink);
	display: inline-flex;
	font-weight: 700;
	gap: 0.4rem;
	white-space: nowrap;
}

.are-header__phone:hover {
	color: var(--primary);
}

.are-burger {
	align-items: center;
	background: none;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-sm);
	cursor: pointer;
	display: none;
	height: 42px;
	justify-content: center;
	padding: 0;
	width: 42px;
}

@media (max-width: 1024px) {
	.are-burger {
		display: inline-flex;
	}

	.are-header__phone span {
		display: none;
	}

	.are-nav {
		background: var(--surface);
		border-block-end: 1px solid var(--border);
		box-shadow: var(--shadow);
		display: none;
		flex-direction: column;
		gap: 0;
		inset-block-start: var(--header-h);
		inset-inline: 0;
		padding: 0.75rem var(--gutter) 1.25rem;
		position: absolute;
	}

	.are-nav.is-open {
		display: flex;
	}

	.are-nav ul {
		flex-direction: column;
		width: 100%;
	}

	.are-nav .sub-menu {
		border: 0;
		box-shadow: none;
		inset: auto;
		min-width: 0;
		opacity: 1;
		padding-inline-start: 1rem;
		position: static;
		transform: none;
		visibility: visible;
	}

	.are-nav .menu-item-has-children > a::after {
		display: none;
	}
}

/* -------------------------------------------------------------- footer --- */

.are-footer {
	background: var(--ink);
	color: #c8d8cc;
	margin-block-start: auto;
	padding-block: clamp(2.5rem, 1.5rem + 3vw, 4rem) 1.5rem;
}

.are-footer a {
	color: #e8f5ee;
}

.are-footer a:hover {
	color: #fff;
	text-decoration: underline;
}

.are-footer__grid {
	display: grid;
	gap: 2rem;
	grid-template-columns: 1.6fr repeat(3, 1fr);
}

@media (max-width: 900px) {
	.are-footer__grid {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 560px) {
	.are-footer__grid {
		grid-template-columns: 1fr;
	}
}

.are-footer__title {
	color: #fff;
	font-size: 1.05rem;
	margin-block-end: 0.9rem;
}

.are-footer__about {
	color: #a7c0ad;
	font-size: 0.92rem;
	margin-block: 0.75rem;
	max-width: 42ch;
}

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

.are-footer li {
	margin-block-end: 0.45rem;
}

.are-footer__contact li {
	align-items: flex-start;
	display: flex;
	gap: 0.5rem;
}

.are-footer__bottom {
	align-items: center;
	border-block-start: 1px solid rgba(255, 255, 255, 0.12);
	color: #a7c0ad;
	display: flex;
	flex-wrap: wrap;
	font-size: 0.85rem;
	gap: 1rem;
	justify-content: space-between;
	margin-block-start: 2.5rem;
	padding-block-start: 1.25rem;
}

.are-footer__social {
	display: flex;
	gap: 0.5rem;
	margin-block-start: 1rem;
}

.are-footer__social a {
	align-items: center;
	background: rgba(255, 255, 255, 0.1);
	border-radius: var(--radius-pill);
	display: inline-flex;
	height: 38px;
	justify-content: center;
	transition: background var(--t-fast);
	width: 38px;
}

.are-footer__social a:hover {
	background: var(--primary);
	text-decoration: none;
}

.are-footer__credit {
	display: flex;
	gap: 0.35rem;
}

/* ------------------------------------------------------------- widgets --- */

.are-widget {
	margin-block-end: 1.75rem;
}

.are-widget-title {
	font-size: 1.05rem;
	margin-block-end: 0.9rem;
}

.are-widget ul {
	list-style: none;
	padding: 0;
}

.are-widget li {
	border-block-end: 1px solid var(--border);
	padding-block: 0.55rem;
}

.are-widget li:last-child {
	border-block-end: 0;
}

/* ------------------------------------------------------- breadcrumbs --- */

.are-breadcrumbs {
	color: var(--muted);
	font-size: 0.88rem;
	margin-block-end: 1.25rem;
}

.are-breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.are-breadcrumbs li {
	align-items: center;
	display: flex;
	gap: 0.4rem;
}

.are-breadcrumbs li:not(:last-child)::after {
	color: var(--border-strong);
	content: '/';
}

.are-breadcrumbs [aria-current='page'] {
	color: var(--ink);
	font-weight: 600;
}

/* ---------------------------------------------------------- pagination --- */

.are-pagination {
	margin-block-start: 2.5rem;
}

.are-pagination .nav-links {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	justify-content: center;
}

.are-pagination .page-numbers {
	align-items: center;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	color: var(--ink);
	display: inline-flex;
	font-weight: 600;
	height: 42px;
	justify-content: center;
	min-width: 42px;
	padding-inline: 0.5rem;
	transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}

.are-pagination .page-numbers:hover,
.are-pagination .page-numbers:focus-visible {
	background: var(--primary-light);
	border-color: var(--primary);
	color: var(--primary-dark);
}

.are-pagination .page-numbers.current {
	background: var(--primary);
	border-color: var(--primary);
	color: #fff;
}

.are-pagination .page-numbers.dots {
	background: none;
	border-color: transparent;
}

/* -------------------------------------------------------------- states --- */

.are-empty {
	background: var(--surface);
	border: 1px dashed var(--border-strong);
	border-radius: var(--radius);
	padding: clamp(2rem, 1.5rem + 2vw, 3.5rem);
	text-align: center;
}

.are-empty__icon {
	align-items: center;
	background: var(--primary-light);
	border-radius: 50%;
	color: var(--primary);
	display: inline-flex;
	height: 68px;
	justify-content: center;
	margin-block-end: 1rem;
	width: 68px;
}

.are-empty h2,
.are-empty h3 {
	margin-block-end: 0.4rem;
}

.are-empty p {
	color: var(--muted);
	margin-inline: auto;
	max-width: 48ch;
}

.are-notice {
	background: var(--primary-lighter);
	border: 1px solid var(--border);
	border-inline-start: 4px solid var(--primary);
	border-radius: var(--radius-sm);
	margin-block-end: 1.5rem;
	padding: 1rem 1.25rem;
}

.are-notice--error {
	background: var(--danger-light);
	border-inline-start-color: var(--danger);
}

.are-notice--ok {
	border-inline-start-color: var(--primary);
}

.are-notice p:last-child {
	margin-block-end: 0;
}

/* Toasts for AJAX feedback (inquiry form, copy-to-clipboard). */
.are-toast {
	background: var(--ink);
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow-lg);
	color: #fff;
	font-size: 0.9rem;
	inset-block-end: 1.5rem;
	inset-inline-start: 50%;
	opacity: 0;
	padding: 0.75rem 1.25rem;
	pointer-events: none;
	position: fixed;
	transform: translate(-50%, 12px);
	transition: opacity var(--t), transform var(--t);
	z-index: 100000;
}

.are-toast.is-visible {
	opacity: 1;
	transform: translate(-50%, 0);
}

.are-toast--error {
	background: var(--danger);
}

/* ------------------------------------------------------------ utilities --- */

.are-stack > * + * {
	margin-block-start: 1rem;
}

.are-row {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.are-muted {
	color: var(--muted);
}

.are-small {
	font-size: 0.88rem;
}

.are-hide {
	display: none !important;
}

@media (max-width: 640px) {
	.are-hide-sm {
		display: none !important;
	}
}

@media print {
	.are-header,
	.are-footer,
	.are-breadcrumbs,
	.are-sidebar,
	.are-toast,
	.are-map {
		display: none !important;
	}

	body {
		background: #fff;
	}

	.are-container {
		max-width: none;
		padding: 0;
	}
}
