/* عقار لار Aqarlar — نظام تصميم بهوية الأزرق السماوي والبرتقالي
   أزرق سماوي #29A8E0 أساسي، برتقالي #FF8A3D مميز، رملي #FAF6EF خلفية، حبر #1F2A2E نص */
:root {
  --sky: #29A8E0;
  --sky-dark: #1B7FB8;
  --sky-navy: #0A4A73;
  --sky-deep: #07304A;
  --sky-tint: #E7F5FD;
  --sky-soft: #CDEEFB;
  --sky-border: #BFE3F5;
  --orange: #FF8A3D;
  --orange-dark: #E56E1F;
  --orange-deep: #C75B12;
  --sand: #FAF6EF;
  --sand-deep: #F1E7D3;
  --ink: #1F2A2E;
  --muted: #54666C;
  --border: #E3D9C8;
  --green: #25D366;
  --green-dark: #1DA851;
  --grad-sky: linear-gradient(135deg, #29A8E0 0%, #1B7FB8 60%, #0A4A73 100%);
  --grad-hero: linear-gradient(135deg, #07304A 0%, #0A4A73 52%, #1577AC 100%);
  --grad-orange: linear-gradient(135deg, #FF8A3D 0%, #E56E1F 100%);
  --grad-footer: linear-gradient(180deg, #0A4A73 0%, #07304A 100%);
  --shadow-sm: 0 2px 8px rgba(10, 74, 115, .08);
  --shadow-md: 0 6px 20px rgba(10, 74, 115, .13);
  --shadow-lg: 0 14px 34px rgba(10, 74, 115, .2);
  --radius: 16px;
}
* { box-sizing: border-box; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  font-family: 'Tajawal', system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(900px 340px at 85% -60px, rgba(41, 168, 224, .16), transparent 70%),
    radial-gradient(700px 300px at 5% -40px, rgba(255, 138, 61, .1), transparent 70%),
    linear-gradient(180deg, #EAF6FD 0, var(--sand) 460px, var(--sand) 100%);
  line-height: 1.7;
}
h1, h2, h3, .card-price, .detail-price { font-family: 'Cairo', sans-serif; }
a { color: var(--sky-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
main.container { padding-top: 22px; padding-bottom: 44px; min-height: 60vh; }
main.container:has(> .band-hero) { padding-top: 0; }
.center { text-align: center; }
::selection { background: var(--sky-soft); }

/* ---------- Header ---------- */
.site-header {
  background: var(--grad-sky);
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 4px 18px rgba(7, 48, 74, .25);
  border-bottom: 3px solid var(--orange);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 12px; color: #fff; font-family: 'Cairo'; font-weight: 800; font-size: 1.4rem; line-height: 1.15; }
.logo:hover { text-decoration: none; }
.logo-badge { background: #fff; border-radius: 12px; padding: 3px; display: inline-flex; box-shadow: 0 3px 10px rgba(7, 48, 74, .3); }
.logo-badge img { border-radius: 9px; object-fit: cover; display: block; }
.logo small { display: block; font-size: .62rem; letter-spacing: 3px; color: #FFD9BE; font-weight: 700; }
.main-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.main-nav a { color: #fff; font-weight: 500; padding: 7px 12px; border-radius: 10px; }
.main-nav a:hover { background: rgba(255, 255, 255, .16); text-decoration: none; }
.main-nav a.btn-orange { padding: 9px 18px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 9px 18px; border-radius: 12px; border: 1px solid var(--border);
  background: #fff; color: var(--ink); cursor: pointer; font-family: 'Cairo'; font-weight: 700;
  font-size: .95rem; box-shadow: var(--shadow-sm); transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-primary { background: var(--grad-sky); border-color: var(--sky-dark); color: #fff; }
.btn-orange { background: var(--grad-orange); border-color: var(--orange-dark); color: #fff; box-shadow: 0 6px 16px rgba(229, 110, 31, .35); }
.btn-wa { background: linear-gradient(135deg, #25D366, #1DA851); border-color: var(--green-dark); color: #fff; }
.btn-danger { background: #d9534f; border-color: #d9534f; color: #fff; }
.btn-map { background: var(--grad-sky); border-color: var(--sky-navy); color: #fff; display: inline-flex; align-items: center; gap: 8px; }
.btn-map svg { flex: none; }
.btn-sm { padding: 5px 12px; font-size: .85rem; border-radius: 10px; }
.btn-lg { padding: 13px 30px; font-size: 1.05rem; border-radius: 14px; }

/* ---------- Full-bleed bands (home) ---------- */
.band { width: 100vw; margin-inline: calc(50% - 50vw); padding: 34px 0 40px; }
.band-hero {
  background:
    radial-gradient(560px 260px at 12% 0%, rgba(255, 138, 61, .35), transparent 65%),
    radial-gradient(720px 340px at 88% 110%, rgba(41, 168, 224, .45), transparent 65%),
    var(--grad-hero);
  color: #fff; padding: 40px 0 44px;
}
.band-tint { background: linear-gradient(180deg, var(--sky-tint), #F2FAFE); border-block: 1px solid var(--sky-border); }
.band-sand { background: linear-gradient(180deg, var(--sand), #FFFDF8); }
.band-white { background: #fff; border-block: 1px solid var(--border); }

/* ---------- Hero + stats ---------- */
.hero { text-align: center; }
.hero h1 { font-size: 2.5rem; color: #fff; margin: 0 0 8px; text-shadow: 0 2px 14px rgba(7, 48, 74, .45); }
.hero h1 .hl { color: #FFC79A; }
.hero p { color: rgba(255, 255, 255, .92); max-width: 740px; margin: 0 auto 22px; font-size: 1.08rem; }
.stats-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 22px 0 8px; }
.stats-strip div {
  background: #fff; border: 1px solid var(--sky-border); border-top: 4px solid var(--sky);
  border-radius: 14px; padding: 14px; text-align: center; box-shadow: var(--shadow-sm);
}
.stats-strip div:nth-child(2) { border-top-color: var(--orange); }
.stats-strip div:nth-child(3) { border-top-color: var(--sky-dark); }
.stats-strip div:nth-child(4) { border-top-color: var(--orange-dark); }
.stats-strip strong { display: block; font-family: 'Cairo'; font-size: 1.55rem; color: var(--sky-navy); }
.stats-strip span { color: var(--muted); font-size: .9rem; font-weight: 500; }
.hero .stats-strip div { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .35); backdrop-filter: blur(4px); box-shadow: none; }
.hero .stats-strip strong { color: #fff; }
.hero .stats-strip span { color: rgba(255, 255, 255, .85); }

/* ---------- Section heads ---------- */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.section-head h2 { margin: 0; font-size: 1.55rem; color: var(--sky-deep); position: relative; padding-bottom: 8px; }
.section-head h2::after {
  content: ''; position: absolute; bottom: 0; inset-inline-start: 0; width: 64px; height: 4px;
  border-radius: 4px; background: var(--grad-orange);
}
.section-head .more-link { font-family: 'Cairo'; font-weight: 700; color: var(--orange-deep); }
main > h1, .page-head h1 {
  font-size: 1.9rem; color: var(--sky-deep); margin: 4px 0 16px; position: relative; padding-bottom: 10px;
}
main > h1::after, .page-head h1::after {
  content: ''; position: absolute; bottom: 0; inset-inline-start: 0; width: 72px; height: 5px;
  border-radius: 5px; background: var(--grad-orange);
}
.page-head { margin-bottom: 6px; }

/* ---------- Filters ---------- */
.filters {
  background: #fff; border: 1px solid var(--sky-border); border-radius: 18px;
  box-shadow: var(--shadow-md); margin-bottom: 18px; overflow: hidden; text-align: start;
}
.filters-head {
  background: var(--grad-sky); color: #fff; font-family: 'Cairo'; font-weight: 800; font-size: 1.05rem;
  padding: 10px 16px; display: flex; align-items: center; gap: 8px;
}
.filters-head .filters-icon {
  background: var(--orange); color: #fff; width: 26px; height: 26px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center; font-size: .95rem; flex: none;
}
.filters-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; padding: 14px; }
input, select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--sky-border); border-radius: 10px;
  font-family: inherit; font-size: 1rem; background: #F7FCFE; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--sky); border-color: var(--sky); background: #fff; }
.filters .btn-primary { background: var(--grad-orange); border-color: var(--orange-dark); box-shadow: 0 6px 16px rgba(229, 110, 31, .35); }
.results-count {
  display: inline-block; background: var(--sky-tint); color: var(--sky-navy); border: 1px solid var(--sky-border);
  font-family: 'Cairo'; font-weight: 700; padding: 4px 14px; border-radius: 20px; margin: 0 0 14px;
}

/* ---------- Cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.card {
  background: #fff; border: 1px solid var(--sky-border); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-featured { border: 2px solid var(--orange); box-shadow: 0 8px 24px rgba(229, 110, 31, .22); }
.card-img { position: relative; display: block; aspect-ratio: 4/3; background: var(--sky-tint); }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-noimg {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 100%;
  font-family: 'Cairo'; font-weight: 800; font-size: 1.5rem; color: var(--sky-dark);
  background:
    radial-gradient(220px 120px at 80% 0%, rgba(255, 138, 61, .35), transparent 70%),
    linear-gradient(135deg, #DFF2FC, #FFF3E8);
}
.card-noimg small { font-size: .62rem; letter-spacing: 4px; color: var(--orange-deep); font-weight: 700; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.card-body h3 { margin: 0 0 2px; font-size: 1.05rem; line-height: 1.45; }
.card-body h3 a { color: var(--ink); }
.card-body h3 a:hover { color: var(--sky-dark); text-decoration: none; }
.card-price { color: var(--orange-deep); font-weight: 800; font-size: 1.25rem; }
.card-meta { color: var(--muted); font-size: .9rem; }
.card-specs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.spec-chip {
  background: var(--sky-tint); color: var(--sky-navy); border: 1px solid var(--sky-border);
  font-size: .8rem; font-weight: 500; padding: 1px 10px; border-radius: 20px;
}
.card-poster {
  margin-top: auto; padding-top: 8px; font-size: .8rem; font-weight: 700; font-family: 'Cairo';
  display: inline-block; align-self: flex-start; padding-inline: 12px; border-radius: 20px; border: 1px solid;
}
.card-poster.poster-owner { background: var(--sky-tint); color: var(--sky-navy); border-color: var(--sky-border); }
.card-poster.poster-developer { background: #FFEFE2; color: var(--orange-deep); border-color: #FFD3AC; }
.card-poster.poster-company { background: #E8F0F5; color: var(--sky-deep); border-color: #C4D8E4; }
.card-poster.poster-broker { background: var(--sand-deep); color: #7A5B23; border-color: #E7D3A8; }
.badge-featured {
  position: absolute; top: 10px; inset-inline-start: 10px; background: var(--grad-orange); color: #fff;
  padding: 3px 14px; border-radius: 20px; font-size: .8rem; font-weight: 700; font-family: 'Cairo';
  box-shadow: 0 4px 12px rgba(229, 110, 31, .45);
}
.badge-purpose {
  position: absolute; bottom: 10px; inset-inline-start: 10px; padding: 3px 14px; border-radius: 20px;
  font-size: .8rem; font-weight: 700; font-family: 'Cairo'; color: #fff; box-shadow: var(--shadow-sm);
}
.badge-purpose.sale { background: var(--grad-sky); }
.badge-purpose.rent { background: var(--grad-orange); }
.badge-cat {
  position: absolute; top: 10px; inset-inline-start: 10px; padding: 3px 14px; border-radius: 20px;
  font-size: .8rem; font-weight: 700; font-family: 'Cairo'; color: #fff; box-shadow: var(--shadow-sm);
}
.badge-cat.article { background: var(--grad-sky); }
.badge-cat.news { background: var(--grad-orange); }
.detail-price .badge-purpose, .detail-price .badge-featured { position: static; box-shadow: none; }

/* ---------- Ad slots ---------- */
.ad-slot {
  background: linear-gradient(160deg, #fff 0%, var(--sky-tint) 100%);
  border: 1.5px solid var(--sky); border-radius: var(--radius); padding: 16px 14px 14px;
  text-align: center; position: relative; box-shadow: var(--shadow-sm);
}
.ad-tag {
  position: absolute; top: 8px; inset-inline-end: 10px; font-size: .65rem; font-weight: 700;
  color: #fff; background: var(--orange-dark); padding: 1px 9px; border-radius: 12px; font-family: 'Cairo';
}
.ad-slot strong { font-family: 'Cairo'; display: block; margin: 4px 0; color: var(--sky-deep); font-size: 1.05rem; }
.ad-slot p { margin: 4px 0 10px; color: var(--muted); font-size: .92rem; }
.ad-slot img { max-width: 100%; border-radius: 10px; }
.ad-slot a:hover { text-decoration: none; }
.ad-header { max-width: 1180px; margin: 14px auto 0; background: linear-gradient(90deg, var(--sky-tint), #FFF3E8); }
.ad-infeed { display: flex; flex-direction: column; justify-content: center; }
.ad-featured .ad-price { display: block; color: var(--orange-deep); font-weight: 800; font-family: 'Cairo'; font-size: 1.15rem; }
.ad-featured .ad-area { color: var(--muted); font-size: .9rem; }

/* ---------- Layout with sidebar ---------- */
.layout-with-sidebar { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
.sidebar { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 96px; }
@media (max-width: 860px) {
  .layout-with-sidebar { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 1.75rem; }
  .band { padding: 26px 0 30px; }
  .band-hero { padding: 30px 0 34px; }
  .main-nav a { padding: 6px 9px; font-size: .92rem; }
  .logo { font-size: 1.2rem; }
}

/* ---------- Detail ---------- */
.detail-head { margin-bottom: 4px; }
.price-box {
  background: linear-gradient(120deg, var(--sky-tint), #FFF3E8); border: 1px solid var(--sky-border);
  border-inline-start: 6px solid var(--orange); border-radius: 14px; padding: 14px 18px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 10px 0 16px; box-shadow: var(--shadow-sm);
}
.detail-price { font-size: 1.8rem; font-weight: 800; color: var(--sky-navy); margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.price-box .btn-map { margin-inline-start: auto; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin: 14px 0; }
.gallery img { width: 100%; border-radius: 14px; aspect-ratio: 4/3; object-fit: cover; border: 1px solid var(--sky-border); }
.gallery-empty {
  background: linear-gradient(135deg, #DFF2FC, #FFF3E8); border: 1px dashed var(--sky); border-radius: 14px;
  padding: 40px; text-align: center; color: var(--sky-navy); margin: 14px 0; font-family: 'Cairo'; font-weight: 700;
}
.specs { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--sky-border); border-radius: 14px; overflow: hidden; margin: 14px 0; box-shadow: var(--shadow-sm); }
.specs th, .specs td { padding: 10px 14px; border-bottom: 1px solid #EAF3F9; text-align: start; }
.specs tr:last-child th, .specs tr:last-child td { border-bottom: none; }
.specs th { background: var(--sky-tint); color: var(--sky-navy); font-family: 'Cairo'; width: 160px; }
.specs tr:nth-child(even) td { background: #FCFEFF; }
.specs.preview { font-size: .8rem; display: block; overflow-x: auto; }
.desc {
  background: #fff; border: 1px solid var(--sky-border); border-inline-start: 6px solid var(--sky);
  border-radius: 14px; padding: 18px; box-shadow: var(--shadow-sm);
}
.contact-box {
  background: #fff; border: 1px solid var(--sky-border); border-top: 5px solid var(--sky); border-radius: 16px;
  padding: 20px 16px; display: flex; flex-direction: column; gap: 8px; text-align: center; box-shadow: var(--shadow-md);
}
.contact-avatar {
  width: 54px; height: 54px; margin: 0 auto; border-radius: 50%; background: var(--grad-sky); color: #fff;
  font-family: 'Cairo'; font-weight: 800; font-size: 1.4rem; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
}
.contact-box strong { font-family: 'Cairo'; font-size: 1.15rem; color: var(--sky-deep); }
.contact-box span { color: var(--muted); }
.contact-box .btn { width: 100%; }

/* ---------- Forms ---------- */
.form {
  background: #fff; border: 1px solid var(--sky-border); border-top: 5px solid var(--sky); border-radius: 16px;
  padding: 22px; display: flex; flex-direction: column; gap: 14px; max-width: 760px; box-shadow: var(--shadow-md);
}
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; font-family: 'Cairo'; color: var(--sky-deep); }
.form label input, .form label select, .form label textarea { font-family: 'Tajawal'; color: var(--ink); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.inline-form { flex-direction: row; align-items: end; flex-wrap: wrap; }
.inline-form label { flex: 1; min-width: 220px; }
.hint { color: var(--muted); font-size: .88rem; margin: 0; }
.error { background: #fdecea; border: 1px solid #f5c6c0; color: #8a2a22; padding: 12px; border-radius: 12px; }
.success-box {
  background: #fff; border: 1px solid var(--sky-border); border-top: 5px solid var(--orange);
  border-radius: 18px; padding: 34px; text-align: center; box-shadow: var(--shadow-md);
}
.success-box h1 { color: var(--sky-deep); }

/* ---------- My listings / admin items ---------- */
.my-list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.my-item {
  background: #fff; border: 1px solid var(--sky-border); border-inline-start: 5px solid var(--sky); border-radius: 12px;
  padding: 12px 14px; display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}
.my-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.my-actions form { margin: 0; }
.admin-bar {
  background: var(--grad-sky); color: #fff; border-radius: 14px; padding: 12px 16px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 18px;
  box-shadow: var(--shadow-md); border-bottom: 3px solid var(--orange);
}
.admin-bar strong { font-family: 'Cairo'; }
.admin-bar nav a { margin-inline-end: 6px; color: #fff; padding: 4px 10px; border-radius: 8px; display: inline-block; }
.admin-bar nav a:hover { background: rgba(255, 255, 255, .18); text-decoration: none; }

/* ---------- Posts & static pages ---------- */
.post-cover { width: 100%; border-radius: 16px; margin: 14px 0; border: 1px solid var(--sky-border); }
.post-head { margin-bottom: 4px; }
.post-body {
  background: #fff; border: 1px solid var(--sky-border); border-inline-start: 6px solid var(--sky);
  border-radius: 14px; padding: 24px; font-size: 1.05rem; box-shadow: var(--shadow-sm);
}
.static-page {
  background: #fff; border: 1px solid var(--sky-border); border-top: 5px solid var(--sky); border-radius: 16px;
  padding: 28px; max-width: 860px; box-shadow: var(--shadow-sm);
}
.static-page h1 { color: var(--sky-deep); margin-top: 0; position: relative; padding-bottom: 10px; }
.static-page h1::after {
  content: ''; position: absolute; bottom: 0; inset-inline-start: 0; width: 64px; height: 4px;
  border-radius: 4px; background: var(--grad-orange);
}
.static-page h3 { color: var(--sky-navy); margin-bottom: 4px; }
.contact-list { list-style: none; padding: 0; }
.contact-list li { padding: 10px 0; border-bottom: 1px solid #EAF3F9; }
.cta-box {
  background:
    radial-gradient(420px 180px at 90% 0%, rgba(255, 138, 61, .4), transparent 65%),
    var(--grad-hero);
  color: #fff; border-radius: 20px; padding: 38px 30px; text-align: center; margin-top: 34px;
  box-shadow: var(--shadow-lg); border-bottom: 4px solid var(--orange);
}
.cta-box h2 { margin-top: 0; font-size: 1.7rem; }
.cta-box p { color: rgba(255, 255, 255, .92); }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: 6px; justify-content: center; margin: 26px 0; flex-wrap: wrap; }
.page-link { padding: 7px 15px; border: 1px solid var(--sky-border); border-radius: 10px; background: #fff; color: var(--sky-navy); font-family: 'Cairo'; font-weight: 700; }
.page-link:hover { background: var(--sky-tint); text-decoration: none; }
.page-link.active { background: var(--grad-sky); color: #fff; border-color: var(--sky-dark); }

/* ---------- Footer ---------- */
.site-footer { background: var(--grad-footer); color: #DCEEF7; margin-top: 48px; border-top: 4px solid var(--orange); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; padding-top: 34px; padding-bottom: 14px; }
.footer-grid strong {
  font-family: 'Cairo'; display: block; margin-bottom: 12px; color: #fff; font-size: 1.05rem;
  position: relative; padding-bottom: 7px;
}
.footer-grid strong::after {
  content: ''; position: absolute; bottom: 0; inset-inline-start: 0; width: 38px; height: 3px;
  border-radius: 3px; background: var(--orange);
}
.footer-grid p { color: #BFE3F5; margin: 0; font-size: .95rem; }
.footer-grid a { display: block; color: #BFE3F5; padding: 4px 0; }
.footer-grid a:hover { color: #fff; }
.footer-logo { display: inline-flex; background: #fff; border-radius: 12px; padding: 3px; margin-bottom: 12px; }
.footer-logo img { border-radius: 9px; object-fit: cover; display: block; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .18); padding: 14px 16px; text-align: center; font-size: .88rem; color: #9CC8DE; }
