/* عتبة الغد: new homepage and map. Colors come from the logo. */
:root {
	--ot-ink: #171717;
	--ot-copper: #c57832;
	--ot-copper-text: #8f5212;
	--ot-white: #fff;
	--ot-mist: #eef2f3;
	--ot-line: #d5dbdd;
	--ot-text-2: #3d4345;
	--ot-text-3: #4e5558;
	--ot-gutter: clamp(16px, 4vw, 48px);
	--ot-sans: "IBM Plex Sans Arabic", system-ui, sans-serif;
	--ot-kufi: "Noto Kufi Arabic", "IBM Plex Sans Arabic", sans-serif;
}

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

body.otbat-page {
	margin: 0;
	background: var(--ot-white);
	color: var(--ot-ink);
	font-family: var(--ot-sans);
	font-size: 17px;
	line-height: 1.7;
	overflow-x: clip;
}

.otbat-page img { max-width: 100%; }
.otbat-page a { color: var(--ot-ink); }
.otbat-page a:hover { color: var(--ot-copper-text); }
.otbat-page :focus-visible { outline: 3px solid var(--ot-copper-text); outline-offset: 2px; }

/* Estatik prints hidden popups into every page; its own stylesheet isn't loaded here. */
.otbat-page .mfp-hide { display: none !important; }

.ot-wrap {
	max-width: 1320px;
	margin-inline: auto;
	padding-inline: var(--ot-gutter);
}

.ot-display, .ot-title { font-family: var(--ot-kufi); margin: 0; }
.ot-title { font-weight: 600; font-size: clamp(30px, 3vw, 44px); line-height: 1.4; text-wrap: balance; }

/* Buttons */
.ot-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 0 20px;
	border: 1.5px solid transparent;
	border-radius: 4px;
	background: none;
	font: inherit;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}
.otbat-page .ot-btn--line { border-color: var(--ot-ink); background: var(--ot-white); color: var(--ot-ink); }
.otbat-page .ot-btn--ink { background: var(--ot-ink); color: var(--ot-white); }
.otbat-page .ot-btn--ink:hover { background: #333; color: var(--ot-white); }
.otbat-page .ot-btn--copper { background: var(--ot-copper); color: var(--ot-ink); font-weight: 700; }
.otbat-page .ot-btn--copper:hover { background: #d68a43; color: var(--ot-ink); }

/* Form fields */
.otbat-page input:not([type="checkbox"]), .otbat-page select {
	width: 100%;
	min-width: 0;
	height: 46px;
	padding: 0 12px;
	border: 1px solid #6b7375;
	border-radius: 4px;
	background: var(--ot-white);
	color: var(--ot-ink);
	font: inherit;
	font-size: 16px; /* 16px stops iPhones zooming in on tap */
}

/* Header */
.ot-header {
	max-width: 1320px;
	margin-inline: auto;
	padding: 18px var(--ot-gutter);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 32px;
}
.ot-header__logo { display: block; line-height: 0; }
.ot-header__logo img { width: auto; height: 84px; }
.ot-header__nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px clamp(14px, 2.4vw, 36px); font-weight: 500; }
.ot-header__nav a { padding: 10px 0; text-decoration: none; }
.otbat-page .ot-header__nav a[aria-current="page"] { color: var(--ot-copper-text); font-weight: 700; }
.ot-header--compact { max-width: 1500px; padding-block: 10px; padding-inline: clamp(16px, 2.4vw, 32px); }
.ot-header--compact .ot-header__logo img { height: 64px; }

/* Hero */
.ot-hero {
	padding-block: clamp(20px, 3vw, 44px) clamp(48px, 6vw, 88px);
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 40px clamp(32px, 6vw, 96px);
}
.ot-hero__text { flex: 999 1 460px; min-width: 0; padding-bottom: 8px; }
.ot-display { font-weight: 700; font-size: clamp(44px, 6.2vw, 92px); line-height: 1.28; text-wrap: balance; }
.ot-hero__lead { margin: 24px 0 0; max-width: 34em; color: var(--ot-text-2); font-size: clamp(18px, 1.6vw, 22px); line-height: 1.75; }

.ot-search { margin-top: 36px; max-width: 640px; display: flex; flex-wrap: wrap; gap: 10px; }
.ot-search label { flex: 1 1 100%; font-weight: 600; }
.otbat-page .ot-search input { flex: 999 1 240px; width: auto; height: 56px; padding-inline: 16px; border: 1.5px solid var(--ot-ink); }
.ot-search button { flex: 1 1 110px; height: 56px; }

.ot-adnum { margin-top: 22px; padding-top: 18px; max-width: 640px; border-top: 1px solid var(--ot-line); display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.ot-adnum label { flex: 1 1 220px; font-weight: 500; }
.ot-adnum__row { flex: 1 1 240px; display: flex; gap: 8px; min-width: 0; }
.ot-adnum__row button { flex: 0 0 auto; }
.ot-adnum__error { flex: 1 1 100%; margin: 0; color: #a4231c; font-weight: 500; }

.ot-door { flex: 1 1 440px; max-width: 540px; min-width: 0; margin-inline: auto; }
.ot-door__frame {
	position: relative;
	border: 26px solid var(--ot-ink);
	border-bottom: 0;
	border-radius: 132px 0 0 0;
	overflow: hidden;
	line-height: 0;
}
.ot-door__frame > img { display: block; width: 100%; height: clamp(400px, 46vw, 620px); object-fit: cover; object-position: center 62%; }
.otbat-page .ot-door__tag { position: absolute; inset-inline-start: 0; bottom: 0; max-width: 82%; padding: 12px 18px; background: var(--ot-ink); color: var(--ot-white); line-height: 1.5; text-decoration: none; }
.ot-door__tag span { display: block; font-size: 15px; }
.ot-door__tag strong { display: block; font-size: 22px; font-weight: 600; }
.ot-door__step {
	clip-path: polygon(5% 0, 95% 0, 100% 100%, 0 100%);
	background: var(--ot-copper);
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	padding-inline: 6%;
}
.otbat-page .ot-door__step a {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 76px;
	color: var(--ot-ink);
	font-family: var(--ot-kufi);
	font-size: clamp(20px, 2vw, 26px);
	font-weight: 700;
	text-decoration: none;
}
.otbat-page .ot-door__step a:hover { background: rgb(23 23 23 / 0.12); }

/* Latest listings */
.ot-latest { padding-bottom: clamp(64px, 8vw, 112px); }
.ot-section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 32px; }
.ot-section-head > a { padding: 10px 0; font-weight: 600; }
.ot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 44px 36px; }

.ot-card__image { position: relative; display: flex; align-items: center; justify-content: center; height: 280px; border-radius: 72px 0 0 0; overflow: hidden; background: var(--ot-mist); color: var(--ot-text-3); text-decoration: none; line-height: 1.5; }
.ot-card__image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ot-card__image em { position: absolute; inset-inline-start: 0; top: 0; padding: 4px 14px; background: var(--ot-ink); color: var(--ot-white); font-size: 15px; font-style: normal; font-weight: 500; }
.ot-card__price { margin: 18px 0 0; font-size: 28px; font-weight: 600; line-height: 1.3; }
.ot-card__title { margin: 4px 0 0; font-size: 20px; font-weight: 600; line-height: 1.5; }
.ot-card__title a { display: inline-block; padding: 7px 0; text-decoration: none; }
.ot-card__place { margin: 0; color: var(--ot-text-3); }
.ot-card__facts { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--ot-line); display: flex; flex-wrap: wrap; gap: 8px 32px; }
.ot-card__facts dt { font-size: 14px; color: var(--ot-text-3); }
.ot-card__facts dd { margin: 0; font-weight: 600; }

.otbat-page .ot-card-invite {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 8px;
	min-height: 280px;
	padding: 32px;
	border-radius: 72px 0 0 0;
	background: var(--ot-ink);
	color: var(--ot-white);
	text-decoration: none;
}
.ot-card-invite strong { font-family: var(--ot-kufi); font-size: 28px; font-weight: 600; line-height: 1.45; }
.ot-card-invite span { color: #eaa767; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }

/* Map band */
.ot-mapband { background: var(--ot-ink); color: var(--ot-white); }
.ot-mapband__in { padding-block: clamp(48px, 6vw, 88px); display: flex; flex-wrap: wrap; align-items: center; gap: 36px clamp(32px, 6vw, 88px); }
.ot-mapband__text { flex: 1 1 340px; min-width: 0; }
.ot-mapband__text p { margin: 18px 0 26px; max-width: 30em; color: #e4e8e9; font-size: 18px; }
.ot-mapband__text .ot-btn { min-height: 54px; padding-inline: 30px; }
.ot-mapband__art { flex: 999 1 460px; min-width: 0; display: block; height: clamp(280px, 34vw, 460px); border-radius: clamp(72px, 9vw, 120px) 0 0 0; overflow: hidden; background: #e9ece7; line-height: 0; }

/* Why us */
.ot-why { padding-block: clamp(64px, 8vw, 112px); }
.ot-why .ot-title { margin-bottom: 36px; }
.ot-why__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 32px 48px; }
.ot-why__grid > div { padding-top: 18px; border-top: 2px solid var(--ot-ink); }
.ot-why__grid h3 { margin: 0; font-size: 22px; font-weight: 600; }
.ot-why__grid p { margin: 8px 0 0; color: var(--ot-text-2); }

/* Owner band */
.ot-owner { background: var(--ot-copper); }
.ot-owner__in { padding-block: clamp(40px, 5vw, 68px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; }
.ot-owner .ot-title { flex: 1 1 320px; font-weight: 700; }
.ot-owner .ot-btn { min-height: 56px; padding-inline: 32px; }

/* Footer */
.ot-footer { background: var(--ot-ink); color: var(--ot-white); }
.ot-footer__in { padding-block: 48px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px 48px; }
.ot-footer img { width: auto; height: 112px; }
.ot-footer p { margin: 0; line-height: 2; }
.otbat-page .ot-footer a { display: inline-block; padding: 8px 0; color: var(--ot-white); line-height: 1.7; }
.ot-footer__rights { color: #e4e8e9; }

/* Map page */
.ot-mappage { max-width: 1500px; margin-inline: auto; padding: 0 clamp(16px, 2.4vw, 32px) 32px; }

.ot-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 14px; padding: 4px 0 14px; }
.ot-seg { display: flex; flex: 0 1 auto; border: 1.5px solid var(--ot-ink); border-radius: 4px; overflow: hidden; }
.ot-seg button { min-height: 46px; padding: 0 18px; border: 0; background: var(--ot-white); color: var(--ot-ink); font: inherit; font-weight: 500; cursor: pointer; }
.ot-seg button[aria-pressed="true"] { background: var(--ot-ink); color: var(--ot-white); font-weight: 600; }
.ot-seg button:focus-visible { outline-offset: -5px; }
.ot-filters__toggle { display: none; flex: 1 1 90px; min-height: 49px; }
.ot-filters__more { flex: 1 1 560px; min-width: 0; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 14px; }
.ot-filters__more label { flex: 1 1 140px; min-width: 0; font-size: 14px; font-weight: 500; }
.ot-filters__more .ot-filters__search { flex: 3 1 240px; }
.ot-filters__more select, .ot-filters__more input { display: block; margin-top: 2px; }

.ot-mapview { display: flex; flex-wrap: wrap; gap: 24px; }
.ot-mapbox { flex: 999 1 560px; min-width: 0; position: relative; height: clamp(500px, 52vw, 760px); border-radius: clamp(56px, 8vw, 120px) 0 0 0; overflow: hidden; background: #e9ece7; }
.ot-mapbox .ot-mapbox__map { position: absolute; inset: 0; }
.ot-mapbox__tools { position: absolute; top: 16px; right: 16px; display: flex; flex-direction: column; border: 1px solid var(--ot-ink); border-radius: 4px; overflow: hidden; background: var(--ot-white); z-index: 2; }
.ot-mapbox__tools button { width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; border: 0; border-bottom: 1px solid var(--ot-line); background: var(--ot-white); color: var(--ot-ink); cursor: pointer; }
.ot-mapbox__tools button:last-child { border-bottom: 0; }
.ot-mapbox__tools button:focus-visible { outline-offset: -4px; }
.ot-mapbox__notice { position: absolute; top: 16px; left: clamp(52px, 8vw, 104px); right: 78px; margin: 0; padding: 8px 14px; background: var(--ot-ink); color: var(--ot-white); border-radius: 4px; font-size: 15px; line-height: 1.5; z-index: 2; }

.ot-pin { min-height: 44px; padding: 0 14px; border: 1px solid var(--ot-ink); border-radius: 4px; background: var(--ot-white); color: var(--ot-ink); font-family: var(--ot-sans); font-size: 16px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.ot-pin:hover { background: var(--ot-mist); }
.ot-pin.is-selected { background: var(--ot-copper); border-color: var(--ot-copper); font-weight: 700; z-index: 1; }

.ot-popcard { position: absolute; bottom: 16px; right: 16px; width: min(420px, calc(100% - 32px)); display: flex; gap: 14px; padding: 12px; background: var(--ot-white); border: 1.5px solid var(--ot-ink); border-radius: 4px; z-index: 3; }
.ot-popcard[hidden] { display: none; }
.ot-popcard__img { flex: 0 0 104px; width: 104px; height: 128px; object-fit: cover; border-radius: 32px 0 0 0; }
.ot-popcard__body { flex: 1 1 auto; min-width: 0; line-height: 1.5; }
.ot-popcard__price { margin: 0; padding-inline-end: 34px; font-size: 22px; font-weight: 600; }
.ot-popcard__name { margin: 2px 0 0; font-size: 17px; font-weight: 600; }
.ot-popcard__facts { margin: 0; color: var(--ot-text-3); font-size: 15px; }
.ot-popcard__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ot-popcard__actions .ot-btn { min-height: 44px; padding: 0 14px; font-size: 15px; }
.ot-popcard__close { position: absolute; top: 2px; left: 2px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 0; background: none; color: var(--ot-ink); cursor: pointer; }

.ot-results { flex: 1 1 320px; min-width: 0; }
.ot-results__title { margin: 0; font-family: var(--ot-kufi); font-size: clamp(26px, 2.2vw, 32px); font-weight: 600; line-height: 1.4; }
.ot-results__count { min-height: 1.7em; margin: 0 0 8px; color: var(--ot-text-3); font-size: 15px; }
.ot-results__list { margin: 0; padding: 0; list-style: none; border-top: 2px solid var(--ot-ink); }
.ot-results__empty { padding: 20px 0; }
.ot-results__empty p { margin: 0 0 12px; }

.ot-row { border-bottom: 1px solid var(--ot-line); }
.ot-row__btn { width: 100%; display: flex; gap: 14px; padding: 14px 8px; border: 0; background: none; color: var(--ot-ink); font: inherit; text-align: start; cursor: pointer; }
.ot-row__btn:hover { background: var(--ot-mist); }
.ot-row.is-selected .ot-row__btn { background: #f8ecdf; }
.ot-row__img { flex: 0 0 104px; height: 92px; border-radius: 32px 0 0 0; overflow: hidden; background: var(--ot-mist); }
.ot-row__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ot-row__text { min-width: 0; display: block; line-height: 1.5; }
.ot-row__text strong { display: block; font-size: 21px; font-weight: 600; }
.ot-row__name { display: block; font-weight: 500; }
.ot-row__place { display: block; color: var(--ot-text-3); font-size: 15px; }
.ot-row__noplace { display: block; color: var(--ot-copper-text); font-size: 14px; }

.maplibregl-ctrl-attrib { font-family: system-ui, sans-serif; font-size: 11px; }

/* Phones */
@media (max-width: 640px) {
	.ot-header__nav { order: 3; flex: 1 1 100%; justify-content: space-between; }
	.ot-door { order: -1; flex-basis: 100%; }
	.ot-door__frame > img { height: 340px; }
	.ot-filters__toggle { display: inline-flex; }
	.ot-filters__more { display: none; flex-basis: 100%; }
	.ot-filters__more.is-open { display: flex; }
	.ot-seg { flex: 1 1 100%; }
	.ot-seg button { flex: 1 1 auto; padding: 0 8px; }
}

@media (prefers-reduced-motion: reduce) {
	* { scroll-behavior: auto !important; }
}
