/* Directory pages on the main site. Mobile first; BrandHub colours (teal #033a46, sky #90e1f2) and Rubik.
   Logical properties keep Arabic (RTL) and English (LTR) identical. */
:root {
	--teal: #033a46; --teal-2: #022f39; --sky: #90e1f2; --sky-l: #e3f8fc;
	--ink: #0f2a31; --muted: #5b7279; --line: #dcebee; --surface: #fff; --bg: #f3f8f9;
	--wa: #128c4b; --open: #128c4b; --open-bg: #e3f5ea; --closed: #8a3b3b; --closed-bg: #f6e9e9;
	--r: 1rem; --font: Rubik, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 var(--font); color: var(--ink); background: var(--bg); }
a { color: inherit; }
h1, h2, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }

.top { position: sticky; top: 0; z-index: 1000; display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 10px 16px; background: var(--teal); color: #fff; }
.brand { font-weight: 700; font-size: 1.1rem; text-decoration: none; }
.top-nav { display: flex; gap: 6px; }
.top-nav a { text-decoration: none; padding: 6px 12px; border-radius: 999px; background: rgb(255 255 255 / .12); font-size: .9rem; }

.wrap { max-width: 960px; margin: 0 auto; padding: 16px; }
.wrap.wide { max-width: 1200px; }
.hero { background: linear-gradient(160deg, #003a46 0%, #3d9fb3 100%); color: #fff; border-radius: 1.5rem; padding: 24px 18px; margin-block-end: 20px; }
.hero h1 { font-size: 1.45rem; line-height: 1.25; }
.hero p { opacity: .92; margin-block: 6px 16px; }

.search { display: flex; gap: 8px; }
.search input { flex: 1; min-width: 0; height: 48px; padding-inline: 14px; border: 1px solid var(--line); border-radius: 999px; font: inherit; background: #fff; color: var(--ink); }
.search button, .btn { height: 48px; padding-inline: 18px; border: 0; border-radius: 999px; background: var(--teal); color: #fff; font: inherit; font-weight: 500; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.hero .search button { background: var(--sky); color: var(--teal); }

.block { margin-block-end: 24px; }
.block h2 { font-size: 1.1rem; margin-block-end: 10px; }
.block.biz { background: var(--surface); border: 1px solid var(--line); border-radius: 1.25rem; padding: 18px; }
.block.biz p { margin-block-end: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.chips.grid .chip { white-space: normal; line-height: 1.25; min-height: 44px; border-radius: .9rem; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; padding-block-end: 4px; scrollbar-width: thin; }
.chip { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; text-decoration: none; white-space: nowrap; font-size: .95rem; }
.chip b { font-weight: 500; color: var(--muted); font-size: .85rem; }
.chip.on { background: var(--teal); color: #fff; border-color: var(--teal); }
.chip.on b { color: var(--sky); }

.crumbs { font-size: .9rem; color: var(--muted); margin-block-end: 8px; }
.crumbs a { color: var(--teal); }
.list-head { margin-block-end: 12px; }
.list-head h1 { font-size: 1.4rem; line-height: 1.25; }
.list-head .count { color: var(--muted); margin-block: 2px 12px; }
.filters { display: grid; gap: 8px; margin-block-end: 14px; }
.tools { display: flex; gap: 8px; flex-wrap: wrap; }

.cards { display: grid; gap: 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: 0 2px 10px -4px rgb(3 58 70 / .14); }
.card-main { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: start; padding: 14px; text-decoration: none; }
.logo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--sky-l); border: 1px solid var(--line); }
.logo.initial { display: grid; place-items: center; font-weight: 700; font-size: 1.4rem; color: var(--teal); }
.card-text { display: grid; gap: 2px; min-width: 0; }
.name { font-weight: 700; font-size: 1.05rem; }
.meta { color: var(--muted); font-size: .9rem; }
.addr { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { font-size: .78rem; font-weight: 500; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.badge.open { color: var(--open); background: var(--open-bg); }
.badge.closed { color: var(--closed); background: var(--closed-bg); }
.card.featured { border-color: #d9a400; box-shadow: 0 0 0 1px #d9a400 inset; }
.feat { display: inline-block; font-size: .72rem; font-weight: 600; color: #6b4e00; background: #fff1c2; padding: 1px 8px; border-radius: 999px; vertical-align: middle; }
.duty { font-size: .85rem; font-weight: 500; }
.duty.now { color: var(--open); }
.duty.later { color: var(--closed); }
.duty-block .empty { margin: 0 0 8px; }
.actions { display: flex; border-block-start: 1px solid var(--line); }
.act { flex: 1; text-align: center; padding: 11px 6px; text-decoration: none; font-size: .92rem; font-weight: 500; color: var(--teal); }
.act + .act { border-inline-start: 1px solid var(--line); }
.act.wa { color: var(--wa); }
.act.call span { display: block; font-weight: 400; font-size: .8rem; color: var(--muted); }

.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-block: 20px; }
.more { text-align: center; margin-block-start: 14px; }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); background: var(--surface); border-radius: var(--r); border: 1px dashed var(--line); }

.map-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 8px; }
.map-filter select { height: 44px; border-radius: 999px; border: 1px solid var(--line); padding-inline: 12px; font: inherit; background: #fff; }
.map-filter .btn { height: 44px; }
.map { height: 70vh; min-height: 360px; border-radius: var(--r); border: 1px solid var(--line); z-index: 0; }
.leaflet-popup-content { font-family: var(--font); line-height: 1.5; }

.panel { background: var(--surface); border-radius: var(--r); padding: 16px; border: 1px solid var(--line); }
.bhn-signup { display: grid; gap: 12px; }
.bhn-signup label { display: grid; gap: 4px; font-weight: 500; }
.bhn-signup input, .bhn-signup select { height: 46px; border: 1px solid var(--line); border-radius: .75rem; padding-inline: 12px; font: inherit; }
.bhn-signup button { height: 48px; border: 0; border-radius: 999px; background: var(--teal); color: #fff; font: inherit; font-weight: 700; }

.foot { text-align: center; padding: 24px 16px 40px; color: var(--muted); font-size: .9rem; display: grid; gap: 12px; justify-items: center; }
.btn.join { background: var(--sky); color: var(--teal); }

@media (min-width: 640px) {
	.hero { padding: 36px 32px; }
	.hero h1 { font-size: 1.9rem; }
	.chips.grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.cards { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
	.chips.grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
/* friendly 404 */
.nf-search { margin-block: 16px; max-width: 560px; }
.nf-links { display: flex; flex-wrap: wrap; gap: 8px; }
.btn.ghost { background: transparent; color: var(--teal); border: 1px solid var(--line); }
.bhn-signup .err { color: #a3261b; }
.bhn-signup .ok { color: #0b6b3a; }
.bhn-signup button[disabled] { opacity: .6; cursor: progress; }
/* install-as-app hint */
.install { position: fixed; inset-inline: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 50; display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--teal); color: #fff; border-radius: 16px; box-shadow: 0 8px 30px rgba(0,0,0,.25); max-width: 520px; margin-inline: auto; }
.install[hidden] { display: none; }
.install span { flex: 1; font-size: .95rem; line-height: 1.5; }
.install .btn { background: var(--sky); color: var(--teal); height: 40px; }
.install .x { background: transparent; border: 0; color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; padding: 4px 8px; }
/* signup form: never wider than the screen (long select options / address prefix) */
.bhn-signup { grid-template-columns: minmax(0, 1fr); }
.bhn-signup label, .bhn-signup input, .bhn-signup select, .bhn-signup button { min-width: 0; max-width: 100%; box-sizing: border-box; }
.bhn-signup input, .bhn-signup select { width: 100%; }
.bhn-signup label span[dir="ltr"] { overflow-wrap: anywhere; font-weight: 400; color: var(--muted, #5b7179); }

/* Gate 7: internal ads + WhatsApp share; Gate 8: claim / removal forms */
.act.share { color: var(--wa); flex: 0 0 auto; padding-inline: 12px; }
.featured-strip { background: var(--sky-l); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 14px 6px; }
.featured-strip h2 { margin-top: 0; }
.strip-ad { text-align: center; font-size: .92rem; margin: 10px 0; }
.strip-ad a, .foot-links a { color: var(--teal); font-weight: 500; }
.foot-links { margin: 0; }
.btn.wa-btn { background: var(--wa); color: #fff; }
.share-hub { text-align: center; margin: 8px 0 24px; }
.adv h2 { font-size: 1.1rem; margin: 18px 0 8px; }
.adv h2:first-child { margin-top: 0; }
.adv .price { font-size: 1.15rem; font-weight: 600; color: var(--teal); }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ticks li { padding-inline-start: 26px; position: relative; }
.ticks li::before { content: "✓"; position: absolute; inset-inline-start: 4px; color: var(--wa); font-weight: 700; }
.seedform { display: grid; gap: 12px; max-width: 460px; }
.seedform label { display: grid; gap: 4px; font-weight: 500; }
.seedform input, .seedform textarea { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: .6rem; background: #fff; }
.seedform .hint { color: var(--muted); font-size: .9rem; margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.note { padding: 10px 12px; border-radius: .6rem; margin: 0 0 12px; }
.note.ok { background: var(--open-bg); color: var(--open); }
.note.err { background: var(--closed-bg); color: var(--closed); }
