/* =====================================================================
   extra.css — إضافات: أيقونات المنصات، الإدارة، صفحة المشاريع، التفاصيل
   ===================================================================== */

/* ---------- أيقونات منصات التواصل (SVG) ---------- */
.si { width: 17px; height: 17px; display: block; flex: none; }
.footer-social, .social-panel { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; direction: ltr; }
.footer-social a, .social-panel a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(214, 176, 104, .75); color: #e6c77f; text-decoration: none;
  transition: background .2s ease, transform .2s ease, color .2s ease;
}
.social-panel a { width: 30px; height: 30px; }
.social-panel a .si { width: 15px; height: 15px; }
.footer-social a:hover, .social-panel a:hover { background: rgba(214, 176, 104, .2); color: #fff; transform: translateY(-2px); }

/* ---------- صفحة الخطأ ---------- */
.err-page { min-height: 62vh; display: grid; place-items: center; padding: 60px 20px; background: #f5f1e8; }
.err-card { text-align: center; max-width: 520px; background: #fff; border: 1px solid #e5e0d6; border-radius: 24px; padding: 44px 34px; box-shadow: 0 18px 40px -26px rgba(22, 53, 42, .35); }
.err-code { font-size: 64px; font-weight: 900; color: #c9a15a; line-height: 1; margin-bottom: 14px; }
.err-card h1 { font-size: 20px; line-height: 1.7; color: #173c30; margin: 0 0 24px; }
.err-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- إضافات صفحة القوائم ---------- */
.prop-extra { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.prop-extra span { background: #f4efe3; color: #6a5a2f; border-radius: 999px; padding: 4px 10px; font-size: 11.5px; font-weight: 700; }
.listing-extra-filters select { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; font: inherit; color: var(--ink); }

/* =====================================================================
   الإدارة: نمط موحد للصفحات (af-*)
   ===================================================================== */
.admin-mobile-nav {
  display: flex; align-items: center; gap: 8px; width: min(1300px, calc(100% - 36px)); margin: 22px auto 0;
  overflow-x: auto; white-space: nowrap; scrollbar-width: none;
}
.admin-mobile-nav::-webkit-scrollbar { display: none; }
.admin-mobile-nav a {
  flex: 0 0 auto; padding: 9px 15px; border: 1px solid var(--line); border-radius: 999px; background: #fff;
  color: var(--green-950); font-size: 13px; font-weight: 700; text-decoration: none; transition: all .18s ease;
}
.admin-mobile-nav a:hover { border-color: var(--gold-600); }
.admin-mobile-nav a.is-current { background: var(--green-950); border-color: var(--green-950); color: #fff; }

.af-shell { width: min(1300px, calc(100% - 36px)); margin: 28px auto 80px; }
.af-shell.af-narrow { max-width: 680px; }
.af-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.af-head > div > span { font-size: 12px; color: #b78a35; font-weight: 800; }
.af-head h1 { margin: 4px 0; font-size: clamp(24px, 3vw, 34px); color: var(--green-950); }
.af-head p { color: #7b817b; margin: 0; max-width: 680px; line-height: 1.8; font-size: 14px; }
.af-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.af-grid-social { grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); }
.af-stack { display: flex; flex-direction: column; gap: 20px; }
.af-card { background: #fff; border: 1px solid #e4dfd5; border-radius: 22px; padding: 24px; box-shadow: 0 10px 30px rgba(20, 40, 30, .05); }
.af-card h2 { margin: 0 0 18px; font-size: 18px; color: var(--green-950); display: flex; align-items: center; gap: 10px; }
.af-card h2 small { background: #f4efe3; border-radius: 999px; padding: 2px 10px; font-size: 12px; color: #8b681e; }
.af-num { width: 26px; height: 26px; border-radius: 50%; background: var(--green-950); color: #e6c77f; display: inline-grid; place-items: center; font-size: 13px; }
.af-form label { display: block; font-size: 13px; font-weight: 700; color: var(--green-950); }
.af-form input:not([type="checkbox"]):not([type="file"]), .af-form select, .af-form textarea {
  display: block; width: 100%; box-sizing: border-box; margin-top: 7px; border: 1px solid #ded9cf; border-radius: 12px;
  padding: 12px 13px; font: inherit; font-weight: 500; background: #fff; color: var(--ink); outline: 0;
}
.af-form input[type="file"] { display: block; margin-top: 7px; width: 100%; padding: 9px; border: 1px dashed #cfc7b4; border-radius: 12px; background: #faf8f3; font: inherit; font-size: 13px; box-sizing: border-box; }
.af-form input:focus, .af-form select:focus, .af-form textarea:focus { border-color: var(--gold-600); box-shadow: 0 0 0 3px rgba(181, 137, 63, .13); }
.af-form textarea { resize: vertical; min-height: 110px; }
.af-form > label, .af-card > .af-form > label, .af-card > label, .af-card .af-two, .af-card .af-three, .af-card fieldset { margin-bottom: 14px; }
.af-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.af-three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.af-hint { color: #8a8f88; font-size: 12.5px; line-height: 1.8; margin: 0 0 12px; }
.af-empty { color: #8b918c; text-align: center; padding: 26px 0; }
.af-check { display: flex !important; align-items: center; gap: 8px; font-weight: 700; cursor: pointer; }
.af-check input { width: 17px; height: 17px; accent-color: var(--green-950); }
.af-submit { display: flex; gap: 12px; flex-wrap: wrap; position: sticky; bottom: 0; padding: 14px 0; background: linear-gradient(180deg, rgba(245, 241, 232, 0), #f5f1e8 38%); }
.af-map { height: 340px; border-radius: 16px; overflow: hidden; border: 1px solid #e4dfd5; margin-bottom: 14px; }
fieldset.af-chips { border: 0; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 9px; min-width: 0; }
fieldset.af-chips legend { font-size: 13px; font-weight: 800; color: var(--green-950); padding: 0; margin-bottom: 10px; float: right; width: 100%; }
.chip { display: inline-block; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; padding: 8px 15px; border-radius: 999px; border: 1px solid #ded9cf; background: #faf8f3; font-size: 13px; font-weight: 700; color: #4a5a52; transition: all .15s ease; }
.chip input:checked + span { background: var(--green-950); border-color: var(--green-950); color: #fff; }
.chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(181, 137, 63, .35); }
.af-thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.af-thumbs figure { margin: 0; width: 104px; }
.af-thumbs img { width: 104px; height: 78px; object-fit: cover; border-radius: 10px; border: 1px solid #e4dfd5; display: block; }
.af-thumbs .af-check { font-size: 12px; margin-top: 6px; color: #a33; }

.mini-btn { border: 1px solid #ddd6c9; background: #faf8f3; color: #173c30; border-radius: 9px; padding: 8px 13px; font: 700 12px inherit; font-family: inherit; text-decoration: none; cursor: pointer; display: inline-block; transition: all .15s ease; }
.mini-btn:hover:not(:disabled) { border-color: var(--green-950); }
.mini-btn.primary { background: var(--green-950); border-color: var(--green-950); color: #fff; }
.mini-btn.danger { color: #b3261e; border-color: #efc9c5; background: #fff5f4; }
.mini-btn:disabled { opacity: .35; cursor: default; }

/* منصات التواصل (الإدارة) */
.soc-list { display: flex; flex-direction: column; gap: 12px; }
.soc-row { display: grid; grid-template-columns: 46px 1fr auto; gap: 14px; align-items: start; padding: 14px; border: 1px solid #ece6d9; border-radius: 16px; background: #fffdf9; transition: opacity .2s ease, background .2s ease; }
.soc-row.is-hidden { opacity: .62; background: #f6f3ec; }
.soc-icon { width: 46px; height: 46px; border-radius: 14px; background: var(--green-950); color: #e6c77f; display: grid; place-items: center; }
.soc-icon .si { width: 22px; height: 22px; }
.soc-fields { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.soc-line { display: grid; grid-template-columns: 150px 1fr; gap: 8px; }
.soc-fields input, .soc-fields select { margin-top: 0 !important; padding: 10px 12px !important; font-size: 13px !important; }
.soc-warn { color: #a3680c; font-size: 12px; font-weight: 700; }
.soc-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.soc-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.switch { display: inline-flex !important; align-items: center; gap: 9px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track { width: 44px; height: 25px; border-radius: 999px; background: #cfcabd; position: relative; transition: background .2s ease; flex: none; }
.switch-thumb { position: absolute; top: 3px; right: 3px; width: 19px; height: 19px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, .25); transition: transform .2s ease; }
.switch input:checked + .switch-track { background: #1f7a52; }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(-19px); }
.switch input:focus-visible + .switch-track { box-shadow: 0 0 0 3px rgba(181, 137, 63, .4); }
.switch-text { font-size: 12.5px; font-weight: 800; color: #4a5a52; min-width: 44px; }

/* قائمة المشاريع (الإدارة) */
.prj-list { display: flex; flex-direction: column; }
.prj-row { display: grid; grid-template-columns: 84px 1fr auto; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid #eee9df; }
.prj-row:last-child { border-bottom: 0; }
.prj-thumb { width: 84px; height: 64px; object-fit: cover; border-radius: 12px; background: #f0eadb; border: 1px solid #e4dfd5; }
.prj-main { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.prj-main small { color: #818781; font-size: 12px; }
.prj-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { background: #f1ede2; color: #4a5a52; border-radius: 999px; padding: 3px 10px; font-size: 11.5px; font-weight: 700; }
.tag.gold { background: #f6ecd2; color: #8b681e; }
.prj-actions { display: flex; gap: 7px; align-items: center; }
.prj-actions form { margin: 0; }

/* =====================================================================
   صفحة المشاريع (pj-*)
   ===================================================================== */
.pj-page { background: #f5f1e8; min-height: 100vh; color: #173c30; direction: rtl; }
.pj-hero { background: linear-gradient(135deg, #123226 0%, #1c4a3a 100%); color: #fff; padding: 54px 20px 74px; text-align: center; position: relative; overflow: hidden; }
.pj-hero::after { content: ""; position: absolute; inset: auto -10% -60% -10%; height: 90%; background: radial-gradient(ellipse at center, rgba(209, 160, 75, .22), transparent 65%); pointer-events: none; }
.pj-hero-in { max-width: 860px; margin: 0 auto; position: relative; z-index: 1; }
.pj-kicker { display: inline-block; color: #d1a04b; font-weight: 800; font-size: 14px; margin-bottom: 8px; letter-spacing: .5px; }
.pj-hero h1 { margin: 0 0 10px; font-size: clamp(30px, 4.6vw, 48px); line-height: 1.2; }
.pj-hero p { margin: 0 auto; color: #d8e3dc; font-size: 15px; line-height: 1.9; max-width: 700px; }
.pj-stats { display: flex; justify-content: center; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.pj-stats div { min-width: 104px; padding: 12px 18px; background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .16); border-radius: 16px; backdrop-filter: blur(4px); }
.pj-stats b { display: block; font-size: 26px; color: #e6c77f; line-height: 1.1; }
.pj-stats span { font-size: 12.5px; color: #d8e3dc; }

.pj-shell { width: min(1440px, calc(100% - 32px)); margin: -34px auto 70px; position: relative; }
.pj-topbar { display: flex; gap: 10px; align-items: center; background: #fff; border: 1px solid #e5e0d6; border-radius: 20px; padding: 10px; box-shadow: 0 14px 34px -22px rgba(20, 40, 30, .45); flex-wrap: wrap; }
.pj-search { flex: 1 1 280px; display: flex; align-items: center; gap: 9px; background: #faf8f3; border: 1px solid #e8e2d4; border-radius: 14px; padding: 0 14px; color: #a17d36; }
.pj-search svg, .pj-filter-toggle svg, .pj-views svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.pj-search input { flex: 1; min-width: 0; height: 46px; border: 0; outline: 0; background: transparent; font: 600 14px inherit; font-family: inherit; color: #173c30; }
.pj-search:focus-within { border-color: #c9a15a; box-shadow: 0 0 0 3px rgba(201, 161, 90, .16); }
.pj-topbar select { height: 48px; border: 1px solid #e8e2d4; background: #faf8f3; border-radius: 14px; padding: 0 12px; font: 700 13px inherit; font-family: inherit; color: #173c30; cursor: pointer; }
.pj-filter-toggle { display: none; align-items: center; gap: 8px; height: 48px; border: 1px solid #e8e2d4; background: #faf8f3; border-radius: 14px; padding: 0 16px; font: 800 13px inherit; font-family: inherit; color: #173c30; cursor: pointer; }
.pj-filter-toggle b { background: #173c30; color: #fff; border-radius: 999px; min-width: 20px; height: 20px; display: inline-grid; place-items: center; font-size: 11px; }
.pj-views { display: flex; gap: 4px; background: #faf8f3; border: 1px solid #e8e2d4; border-radius: 14px; padding: 4px; }
.pj-views button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: #748078; border-radius: 10px; padding: 0 13px; height: 38px; font: 800 12.5px inherit; font-family: inherit; cursor: pointer; transition: all .15s ease; }
.pj-views button.active { background: #173c30; color: #fff; }

.pj-achips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 2px 0; }
.pj-achips[hidden] { display: none; }
.pj-achip { border: 1px solid #dfd5bb; background: #fff; color: #173c30; border-radius: 999px; padding: 6px 12px; font: 700 12px inherit; font-family: inherit; cursor: pointer; }
.pj-achip b { color: #b5893f; margin-right: 4px; }
.pj-achip:hover { border-color: #173c30; }
.pj-achip.clear { background: #173c30; color: #fff; border-color: #173c30; }

.pj-layout { display: grid; grid-template-columns: 318px minmax(0, 1fr); gap: 20px; margin-top: 18px; align-items: start; }
.pj-filters { background: #fff; border: 1px solid #e5e0d6; border-radius: 22px; position: sticky; top: 90px; max-height: calc(100vh - 110px); display: flex; flex-direction: column; overflow: hidden; }
.pj-filters-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid #eee9df; }
.pj-filters-head h2 { margin: 0; font-size: 16px; flex: 1; }
.pj-linkbtn { border: 0; background: transparent; color: #a17d36; font: 800 12.5px inherit; font-family: inherit; cursor: pointer; }
.pj-close { display: none; border: 0; background: #f4efe3; width: 34px; height: 34px; border-radius: 50%; font-size: 20px; cursor: pointer; color: #173c30; }
.pj-filters-body { overflow-y: auto; padding: 6px 18px 14px; flex: 1; }
.pj-filters-foot { display: none; padding: 12px 18px; border-top: 1px solid #eee9df; }
.pj-fgroup { border-bottom: 1px solid #f0ebdf; padding: 12px 0; }
.pj-fgroup:last-child { border-bottom: 0; }
.pj-fgroup summary { cursor: pointer; font-weight: 800; font-size: 14px; list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 2px 0 8px; }
.pj-fgroup summary::-webkit-details-marker { display: none; }
.pj-fgroup summary::after { content: "⌄"; color: #a17d36; font-size: 16px; transition: transform .2s ease; }
.pj-fgroup[open] summary::after { transform: rotate(180deg); }
.pj-fchips { display: flex; flex-wrap: wrap; gap: 7px; }
.pj-chip { cursor: pointer; }
.pj-chip input { position: absolute; opacity: 0; pointer-events: none; }
.pj-chip span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid #e3dccb; border-radius: 999px; background: #faf8f3; font-size: 12.5px; font-weight: 700; color: #3f5149; transition: all .15s ease; }
.pj-chip em, .pj-check em { font-style: normal; font-size: 11px; opacity: .6; }
.pj-chip input:checked + span { background: #173c30; border-color: #173c30; color: #fff; }
.pj-chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(201, 161, 90, .45); }
.pj-fsearch { width: 100%; box-sizing: border-box; margin: 0 0 8px; border: 1px solid #e8e2d4; background: #faf8f3; border-radius: 10px; padding: 9px 12px; font: 600 12.5px inherit; font-family: inherit; outline: 0; }
.pj-flist { max-height: 184px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding-left: 4px; }
.pj-check { display: flex; align-items: center; gap: 10px; padding: 7px 4px; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600; }
.pj-check:hover { background: #faf6ec; }
.pj-check span { flex: 1; }
.pj-check input { width: 17px; height: 17px; accent-color: #173c30; }

.pj-range { padding: 4px 6px 4px; }
.pj-range-vals { display: flex; justify-content: space-between; font-size: 12px; font-weight: 800; color: #3f5149; margin-bottom: 14px; }
.pj-range-track { position: relative; height: 22px; }
.pj-range-track::before { content: ""; position: absolute; top: 9px; left: 0; right: 0; height: 4px; border-radius: 4px; background: #e9e2d0; }
.pj-range-fill { position: absolute; top: 9px; height: 4px; border-radius: 4px; background: #c9a15a; }
.pj-range-track input[type="range"] { position: absolute; inset: 0; width: 100%; margin: 0; background: transparent; pointer-events: none; -webkit-appearance: none; appearance: none; direction: rtl; }
.pj-range-track input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 20px; height: 20px; border-radius: 50%; background: #173c30; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); cursor: grab; }
.pj-range-track input[type="range"]::-moz-range-thumb { pointer-events: auto; width: 14px; height: 14px; border-radius: 50%; background: #173c30; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); cursor: grab; }
.pj-range-track input[type="range"]::-webkit-slider-runnable-track { background: transparent; }
.pj-range-track input[type="range"]::-moz-range-track { background: transparent; }

.pj-countrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.pj-countrow strong { font-size: 15px; }
.pj-inview { display: none; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; cursor: pointer; }
.pj-inview input { width: 17px; height: 17px; accent-color: #173c30; }
.pj-split[data-view="map"] ~ * { }
.pj-results .pj-split[data-view="map"] { display: grid; }
.pj-countrow:has(+ .pj-split[data-view="map"]) .pj-inview { display: inline-flex; }

.pj-split { display: block; }
.pj-cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.pj-split[data-view="list"] .pj-cards { grid-template-columns: 1fr; gap: 14px; }
.pj-mapbox { display: none; position: relative; border-radius: 22px; overflow: hidden; border: 1px solid #e0d9c8; background: #e9e3d3; }
#pjMap { width: 100%; height: 100%; min-height: 420px; }
.pj-split[data-view="map"] { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 16px; align-items: start; direction: ltr; }
.pj-split[data-view="map"] > * { direction: rtl; }
.pj-split[data-view="map"] .pj-cards { grid-template-columns: 1fr; gap: 12px; max-height: calc(100vh - 150px); min-height: 560px; overflow-y: auto; padding: 4px 4px 4px 8px; }
.pj-split[data-view="map"] .pj-mapbox { display: block; position: sticky; top: 90px; height: calc(100vh - 130px); min-height: 560px; }
.pj-mapbox.is-full { position: fixed !important; inset: 0 !important; z-index: 9999; height: 100vh !important; border-radius: 0; top: 0 !important; }
body.pj-noscroll { overflow: hidden; }

.pj-maptools { position: absolute; top: 12px; left: 12px; z-index: 500; display: flex; flex-direction: column; gap: 8px; }
.pj-maptools button { display: inline-flex; align-items: center; gap: 7px; border: 0; background: #fff; color: #173c30; height: 38px; padding: 0 12px; border-radius: 11px; font: 800 12px inherit; font-family: inherit; box-shadow: 0 6px 18px rgba(20, 40, 30, .22); cursor: pointer; direction: rtl; }
.pj-maptools button:hover, .pj-maptools button.on { background: #173c30; color: #fff; }
.pj-legend { position: absolute; bottom: 12px; right: 12px; z-index: 500; background: rgba(255, 255, 255, .94); border-radius: 12px; padding: 8px 12px; font-size: 11.5px; font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; box-shadow: 0 6px 18px rgba(20, 40, 30, .18); max-width: calc(100% - 24px); }
.pj-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.pj-legend i.s-ok, .pj-pin.s-ok { --pc: #1f7a52; }
.pj-legend i.s-wip, .pj-pin.s-wip { --pc: #c98a1b; }
.pj-legend i.s-done, .pj-pin.s-done { --pc: #2563a8; }
.pj-legend i.s-sold, .pj-pin.s-sold { --pc: #8a8f88; }
.pj-legend i { background: var(--pc, #999); }

.pj-pin-wrap { background: transparent !important; border: 0 !important; width: auto !important; height: auto !important; }
.pj-pin { transform: translate(-50%, -100%); position: absolute; white-space: nowrap; }
.pj-pin b { display: block; background: #173c30; color: #fff; border: 2px solid var(--pc, #d1a04b); border-radius: 999px; padding: 5px 11px; font: 800 12px Tajawal, Arial, sans-serif; box-shadow: 0 6px 14px rgba(15, 42, 32, .35); transition: transform .15s ease, background .15s ease; }
.pj-pin::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 10px; height: 10px; background: #173c30; border-right: 2px solid var(--pc, #d1a04b); border-bottom: 2px solid var(--pc, #d1a04b); transform: translateX(-50%) rotate(45deg); }
.pj-pin-wrap.is-active { z-index: 1000 !important; }
.pj-pin-wrap.is-active .pj-pin b { background: #c9a15a; color: #123226; transform: scale(1.14); }
.pj-pin-wrap.is-active .pj-pin::after { background: #c9a15a; }
.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large { background: rgba(201, 161, 90, .35); }
.marker-cluster-small div, .marker-cluster-medium div, .marker-cluster-large div { background: #173c30; color: #fff; font-family: Tajawal, Arial, sans-serif; font-weight: 800; }

.leaflet-popup-content-wrapper { border-radius: 16px; padding: 0; overflow: hidden; box-shadow: 0 16px 38px rgba(20, 40, 30, .28); }
.leaflet-popup-content { margin: 0; width: 270px !important; }
.pj-popup img { width: 100%; height: 124px; object-fit: cover; display: block; background: #efe8d6; }
.pj-popup-body { padding: 12px 14px 14px; text-align: right; font-family: Tajawal, Arial, sans-serif; }
.pj-popup h3 { margin: 8px 0 4px; font-size: 17px; color: #173c30; }
.pj-popup p { margin: 0 0 8px; color: #777; font-size: 12.5px; }
.pj-popup-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 11px; }
.pj-popup-meta strong { color: #8b681e; font-size: 13px; width: 100%; }
.pj-popup-meta span { background: #f4efe3; border-radius: 7px; padding: 4px 8px; font-size: 11px; color: #3f5149; }
.pj-popup a { display: block; text-align: center; background: #173c30; color: #fff !important; border-radius: 10px; padding: 10px; font-weight: 800; font-size: 13px; text-decoration: none; }
.leaflet-control-zoom { border: 0 !important; box-shadow: 0 6px 18px rgba(20, 40, 30, .22) !important; border-radius: 11px !important; overflow: hidden; }
.leaflet-control-zoom a { color: #173c30 !important; }

/* البطاقات */
.pj-card { background: #fff; border: 1px solid #e5e0d6; border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.pj-card:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -24px rgba(20, 40, 30, .45); }
.pj-card.is-active { border-color: #c9a15a; box-shadow: 0 0 0 3px rgba(201, 161, 90, .28); }
.pj-card-img { position: relative; display: block; aspect-ratio: 16 / 10; background: #efe8d6; overflow: hidden; }
.pj-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.pj-card:hover .pj-card-img img { transform: scale(1.05); }
.pj-status { position: absolute; top: 12px; right: 12px; background: #1f7a52; color: #fff; border-radius: 999px; padding: 4px 11px; font-size: 11.5px; font-weight: 800; z-index: 1; }
.pj-status.s-wip { background: #c98a1b; } .pj-status.s-done { background: #2563a8; } .pj-status.s-sold { background: #6b706a; }
.pj-popup .pj-status { position: static; display: inline-block; }
.pj-imgcount { position: absolute; top: 12px; left: 12px; background: rgba(0, 0, 0, .55); color: #fff; border-radius: 999px; padding: 4px 10px; font-size: 11.5px; font-weight: 700; }
.pj-price { position: absolute; bottom: 12px; right: 12px; background: rgba(15, 42, 32, .92); color: #f3dfa6; border-radius: 12px; padding: 7px 13px; font-size: 13px; font-weight: 800; }
.pj-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pj-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pj-cat { color: #a17d36; font-size: 12px; font-weight: 800; }
.pj-dist { background: #eaf3ee; color: #1f7a52; border-radius: 999px; padding: 3px 9px; font-size: 11px; font-weight: 800; }
.pj-card h3 { margin: 0; font-size: 19px; line-height: 1.4; }
.pj-card h3 a { color: #173c30; text-decoration: none; }
.pj-loc { margin: 0; color: #7b817b; font-size: 13px; }
.pj-specs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.pj-specs span { background: #f5f2ea; border-radius: 9px; padding: 5px 9px; font-size: 11.5px; font-weight: 700; color: #3f5149; }
.pj-specs i { font-style: normal; color: #b5893f; margin-left: 5px; }
.pj-types { display: flex; flex-wrap: wrap; gap: 6px; }
.pj-typechip { border: 1px solid #e3dccb; border-radius: 999px; padding: 3px 10px; font-size: 11px; font-weight: 700; color: #6a5a2f; }
.pj-card-actions { margin-top: auto; padding-top: 10px; display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.pj-more { background: #173c30; color: #fff; border-radius: 11px; padding: 10px 16px; font-size: 13px; font-weight: 800; text-decoration: none; }
.pj-more:hover { background: #0f2d25; }
.pj-locate { border: 1px solid #e0d6bd; background: #fffaf0; color: #8b681e; border-radius: 11px; padding: 9px 12px; font: 800 12px inherit; font-family: inherit; cursor: pointer; }
.pj-locate:hover { background: #f6ecd2; }
.pj-split[data-view="list"] .pj-card { flex-direction: row; }
.pj-split[data-view="list"] .pj-card-img { width: 300px; aspect-ratio: auto; flex: none; min-height: 190px; }
.pj-split[data-view="map"] .pj-card { flex-direction: row; border-radius: 16px; }
.pj-split[data-view="map"] .pj-card-img { width: 132px; aspect-ratio: auto; flex: none; }
.pj-split[data-view="map"] .pj-card-body { padding: 12px 14px; gap: 6px; }
.pj-split[data-view="map"] .pj-card h3 { font-size: 15.5px; }
.pj-split[data-view="map"] .pj-price, .pj-split[data-view="map"] .pj-imgcount, .pj-split[data-view="map"] .pj-types, .pj-split[data-view="map"] .pj-more { display: none; }
.pj-split[data-view="map"] .pj-status { top: 8px; right: 8px; font-size: 10.5px; padding: 3px 8px; }
.pj-split[data-view="map"] .pj-specs span:nth-child(n+3) { display: none; }
.pj-split[data-view="map"] .pj-card-actions { padding-top: 2px; }
.pj-split[data-view="map"] .pj-card-actions::before { content: attr(data-price); }
.pj-empty { grid-column: 1 / -1; text-align: center; padding: 60px 20px; background: #fff; border: 1px dashed #d9d0b8; border-radius: 22px; }
.pj-empty > div { font-size: 40px; color: #c9a15a; }
.pj-empty h3 { margin: 6px 0; }
.pj-empty p { color: #7b817b; margin: 0 0 18px; }
.pj-btn { background: #173c30; color: #fff; border: 0; border-radius: 12px; padding: 12px 22px; font: 800 14px inherit; font-family: inherit; cursor: pointer; width: auto; }
.pj-filters-foot .pj-btn { width: 100%; }
.pj-backdrop { display: none; }
.pj-noscript { text-align: center; padding: 30px; }

@media (max-width: 1100px) {
  .pj-layout { grid-template-columns: 1fr; }
  .pj-filter-toggle { display: inline-flex; }
  .pj-filters { position: fixed; z-index: 10000; top: 0; bottom: 0; right: 0; width: min(380px, 92vw); max-height: none; border-radius: 22px 0 0 22px; transform: translateX(105%); transition: transform .28s ease; box-shadow: -20px 0 50px rgba(0, 0, 0, .3); }
  body.pj-drawer-open .pj-filters { transform: translateX(0); }
  .pj-close { display: inline-grid; place-items: center; }
  .pj-filters-foot { display: block; }
  .pj-backdrop { display: block; position: fixed; inset: 0; background: rgba(10, 25, 18, .5); z-index: 9990; opacity: 0; pointer-events: none; transition: opacity .25s ease; }
  body.pj-drawer-open .pj-backdrop { opacity: 1; pointer-events: auto; }
  body.pj-drawer-open { overflow: hidden; }
  .pj-split[data-view="map"] { grid-template-columns: 1fr; direction: rtl; }
  .pj-split[data-view="map"] .pj-mapbox { order: -1; position: relative; top: 0; height: 56vh; min-height: 380px; }
  .pj-split[data-view="map"] .pj-cards { max-height: none; min-height: 0; overflow: visible; padding: 0; }
}
@media (max-width: 700px) {
  .pj-hero { padding: 40px 16px 66px; }
  .pj-shell { width: calc(100% - 20px); }
  .pj-views button span { display: none; }
  .pj-views button { padding: 0 12px; }
  .pj-topbar select { flex: 1; }
  .pj-cards { grid-template-columns: 1fr; }
  .pj-split[data-view="list"] .pj-card { flex-direction: column; }
  .pj-split[data-view="list"] .pj-card-img { width: auto; aspect-ratio: 16 / 10; min-height: 0; }
  .pj-maptools button span { display: none; }
  .pj-maptools button { width: 38px; padding: 0; justify-content: center; }
}

/* =====================================================================
   صفحات التفاصيل (pd-*)
   ===================================================================== */
.pd-page { background: #f5f1e8; min-height: 100vh; color: #173c30; padding-bottom: 70px; }
.pd-wrap { width: min(1280px, calc(100% - 36px)); margin: 0 auto; }
.pd-crumbs { padding: 16px 0; font-size: 13px; color: #7b817b; }
.pd-crumbs a { color: #7b817b; text-decoration: none; }
.pd-crumbs span { margin: 0 8px; color: #b5893f; }
.pd-crumbs b { color: #173c30; }
.pd-top { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); gap: 22px; align-items: start; }
.pd-gallery { min-width: 0; }
.pd-main-img { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 24px; overflow: hidden; background: #e9e2d0; aspect-ratio: 16 / 10; cursor: zoom-in; }
.pd-main-img.static { cursor: default; }
.pd-main-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-zoom, .pd-counter { position: absolute; bottom: 14px; background: rgba(15, 42, 32, .82); color: #fff; border-radius: 999px; padding: 6px 13px; font: 700 12px Tajawal, Arial, sans-serif; }
.pd-zoom { right: 14px; } .pd-counter { left: 14px; }
.pd-thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.pd-thumbs button { flex: 0 0 110px; height: 78px; padding: 0; border: 2px solid transparent; border-radius: 14px; overflow: hidden; cursor: pointer; background: #e9e2d0; opacity: .75; transition: all .15s ease; }
.pd-thumbs button.on { border-color: #c9a15a; opacity: 1; }
.pd-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-summary { background: #fff; border: 1px solid #e5e0d6; border-radius: 24px; padding: 26px; box-shadow: 0 14px 34px -24px rgba(20, 40, 30, .4); }
.pd-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.pd-status { background: #1f7a52; color: #fff; border-radius: 999px; padding: 5px 13px; font-size: 12px; font-weight: 800; }
.pd-cat { background: #f4efe3; color: #8b681e; border-radius: 999px; padding: 5px 13px; font-size: 12px; font-weight: 800; }
.pd-summary h1 { margin: 0 0 6px; font-size: clamp(24px, 3vw, 32px); line-height: 1.3; }
.pd-loc { margin: 0 0 18px; color: #7b817b; font-size: 14px; }
.pd-pricebox { background: linear-gradient(135deg, #123226, #1c4a3a); color: #fff; border-radius: 18px; padding: 16px 20px; margin-bottom: 16px; }
.pd-pricebox small { display: block; color: #cfdcd4; font-size: 12px; margin-bottom: 2px; }
.pd-pricebox strong { font-size: 24px; color: #f3dfa6; }
.pd-pricebox s { margin-right: 10px; color: #aebdb4; font-size: 14px; }
.pd-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.pd-spec { background: #faf8f3; border: 1px solid #eee7d6; border-radius: 14px; padding: 11px 14px; }
.pd-spec small { display: block; color: #8a8f88; font-size: 11.5px; margin-bottom: 3px; }
.pd-spec strong { font-size: 14px; line-height: 1.6; }
.pd-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.pd-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; text-align: center; background: #173c30; color: #fff; border: 1px solid #173c30; border-radius: 13px; padding: 13px 18px; font: 800 14px Tajawal, Arial, sans-serif; text-decoration: none; cursor: pointer; transition: all .15s ease; }
.pd-btn:hover { background: #0f2d25; }
.pd-btn.wa { background: #1f9d57; border-color: #1f9d57; }
.pd-btn.wa:hover { background: #17824a; }
.pd-btn.ghost { background: #fff; color: #173c30; }
.pd-btn.ghost:hover { background: #faf8f3; }
.pd-btn.full { width: 100%; flex: none; }

.pd-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; margin-top: 22px; align-items: start; }
.pd-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.pd-card { background: #fff; border: 1px solid #e5e0d6; border-radius: 22px; padding: 24px 26px; }
.pd-card h2 { margin: 0 0 16px; font-size: 20px; }
.pd-card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.pd-card-head h2 { margin: 0; }
.pd-desc { margin: 0; line-height: 2; color: #44554c; white-space: pre-line; }
.pd-specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.pd-amenities { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.pd-amenities li { background: #f1f7f3; color: #1f6a47; border-radius: 12px; padding: 10px 14px; font-size: 13.5px; font-weight: 700; }
.pd-map { height: 380px; border-radius: 16px; overflow: hidden; border: 1px solid #e5e0d6; }
.pd-map-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pd-map-actions a { border: 1px solid #e0d6bd; background: #fffaf0; color: #8b681e; border-radius: 10px; padding: 8px 13px; font-size: 12.5px; font-weight: 800; text-decoration: none; }
.pd-side { position: sticky; top: 90px; }
.pd-inquiry h3 { margin: 0 0 4px; font-size: 18px; }
.pd-inquiry p { margin: 0 0 14px; color: #7b817b; font-size: 13px; }
.pd-inquiry form { display: flex; flex-direction: column; gap: 10px; }
.pd-inquiry input, .pd-inquiry textarea { width: 100%; box-sizing: border-box; border: 1px solid #ded9cf; border-radius: 12px; padding: 12px 13px; font: 500 14px Tajawal, Arial, sans-serif; outline: 0; background: #fff; resize: vertical; }
.pd-inquiry input:focus, .pd-inquiry textarea:focus { border-color: #b5893f; box-shadow: 0 0 0 3px rgba(181, 137, 63, .14); }
.pd-related h2 { margin: 6px 0 14px; font-size: 20px; }
.pd-related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.pd-rcard { background: #fff; border: 1px solid #e5e0d6; border-radius: 18px; overflow: hidden; text-decoration: none; color: #173c30; transition: transform .2s ease, box-shadow .2s ease; }
.pd-rcard:hover { transform: translateY(-3px); box-shadow: 0 18px 36px -24px rgba(20, 40, 30, .5); }
.pd-rcard img { width: 100%; height: 130px; object-fit: cover; display: block; background: #efe8d6; }
.pd-rcard div { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 3px; }
.pd-rcard span { color: #1f7a52; font-size: 11.5px; font-weight: 800; }
.pd-rcard small { color: #7b817b; }
.pd-rcard em { font-style: normal; color: #8b681e; font-size: 13px; font-weight: 800; }

.pd-lightbox { position: fixed; inset: 0; background: rgba(8, 18, 13, .94); z-index: 20000; display: grid; place-items: center; padding: 30px; }
.pd-lightbox[hidden] { display: none; }
.pd-lightbox img { max-width: 100%; max-height: 90vh; border-radius: 10px; object-fit: contain; }
.pd-lightbox button { position: absolute; border: 0; background: rgba(255, 255, 255, .14); color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 28px; cursor: pointer; }
.pd-lightbox button:hover { background: rgba(255, 255, 255, .28); }
.lb-close { top: 20px; right: 20px; } .lb-prev { right: 20px; top: 50%; } .lb-next { left: 20px; top: 50%; }

@media (max-width: 980px) {
  .pd-top, .pd-body { grid-template-columns: 1fr; }
  .pd-side { position: static; }
}
@media (max-width: 600px) {
  .pd-wrap { width: calc(100% - 20px); }
  .pd-card, .pd-summary { padding: 18px; border-radius: 18px; }
  .pd-main-img { border-radius: 18px; }
  .pd-map { height: 300px; }
  .pd-quick { grid-template-columns: 1fr 1fr; }
}

/* ---------- لوحة الإدارة: الجوال ---------- */
@media (max-width: 860px) {
  .af-grid, .af-grid-social, .af-two, .af-three { grid-template-columns: 1fr; }
  .soc-row { grid-template-columns: 1fr; }
  .soc-line { grid-template-columns: 1fr; }
  .soc-side { align-items: stretch; }
  .soc-actions { justify-content: flex-start; }
  .prj-row { grid-template-columns: 70px 1fr; }
  .prj-thumb { width: 70px; height: 56px; }
  .prj-actions { grid-column: 1 / -1; }
  .prj-actions .mini-btn { flex: 1; text-align: center; }
  .af-card { padding: 18px; border-radius: 18px; }
}

/* صورة بديلة (الشعار) للمشاريع بلا صورة */
img.noimg { object-fit: contain !important; padding: 12% 16%; background: #faf7ef !important; box-sizing: border-box; }
.prj-thumb.noimg { padding: 6px; }
.pj-thumbs-none { display: none; }

/* ترويسة أخف في صفحة المشاريع */
.pj-hero { padding: 34px 20px 62px; }
.pj-hero h1 { font-size: clamp(26px, 3.6vw, 38px); margin-bottom: 8px; }
.pj-hero p { font-size: 14px; }
.pj-stats { margin-top: 16px; gap: 10px; }
.pj-stats div { min-width: 92px; padding: 8px 14px; border-radius: 14px; }
.pj-stats b { font-size: 22px; }

.pj-filter-toggle b[hidden] { display: none; }
@media (max-width: 700px) {
  .pj-hero p { display: none; }
  .pj-hero { padding-bottom: 54px; }
}
