/* ═══════════ فيلات مصر — ستايل الموقع ═══════════ */
:root {
  --ink: #1c2730;
  --ink-2: #4a5862;
  --muted: #7b8790;
  --line: #e7e2d8;
  --bg: #f8f6f1;
  --card: #ffffff;
  --brand: #1f4d43;
  --brand-2: #2c6a5c;
  --gold: #c39a4b;
  --gold-2: #a8813a;
  --wa: #1fa855;
  --danger: #b5412f;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(28, 39, 48, .05), 0 6px 22px rgba(28, 39, 48, .07);
  --font: "Cairo", "Segoe UI", Tahoma, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.7; font-size: 16px; }
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-2); }
h1, h2, h3 { line-height: 1.35; margin: 0 0 .5em; }
h1 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem); font-weight: 800; }
h2 { font-size: clamp(1.2rem, 1rem + .7vw, 1.55rem); font-weight: 700; }
h2 small { font-size: .7em; color: var(--muted); font-weight: 600; }
p { margin: 0 0 1em; }
.container { width: min(1200px, 100% - 2rem); margin-inline: auto; }
.muted { color: var(--muted); }
.icon { width: 1.15em; height: 1.15em; display: inline-block; vertical-align: -.2em; flex: none; }
.section { padding-block: 2.2rem; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1rem; }
.section-head h2 { margin: 0; }

/* ── أزرار ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45em; padding: .7em 1.3em; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-weight: 700; cursor: pointer;
  transition: transform .15s, background .15s, box-shadow .15s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-2); color: #fff; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-2); color: #fff; }
.btn-wa { background: var(--wa); border-color: var(--wa); color: #fff; }
.btn-wa:hover { color: #fff; filter: brightness(1.05); }
.btn-outline { background: transparent; border-color: var(--brand); color: var(--brand); }

/* ── الهيدر ── */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 66px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.2rem; color: var(--brand); }
.brand-mark { width: 32px; height: 32px; color: var(--gold); }
.site-nav { display: flex; align-items: center; gap: .3rem; }
.site-nav a { padding: .45rem .8rem; border-radius: 8px; color: var(--ink-2); font-weight: 600; }
.site-nav a.active, .site-nav a:hover { color: var(--brand); background: #eef3f0; }
.site-nav .nav-phone { color: var(--gold-2); font-weight: 700; }
.nav-toggle { display: none; background: none; border: 0; padding: .5rem; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; }
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .site-nav { position: absolute; inset: 66px 0 auto 0; background: #fff; flex-direction: column; align-items: stretch; padding: .5rem 1rem 1rem;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow); display: none; }
  .site-nav.open { display: flex; }
  .site-nav a { padding: .75rem; }
}

/* ── رسائل ── */
.flash { padding: .8rem 1rem; border-radius: 10px; margin: 1rem 0; font-weight: 600; }
.flash-success { background: #e7f4ec; color: #1d6a3d; }
.flash-error { background: #fbeae6; color: var(--danger); }
.flash-info { background: #fbf4e4; color: #7a5a1c; }

/* ── الهيرو ── */
.hero { position: relative; color: #fff; padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(2.5rem, 6vw, 4.5rem);
  background: linear-gradient(180deg, rgba(20, 38, 34, .55), rgba(20, 38, 34, .82)), var(--hero, linear-gradient(135deg, #2c6a5c, #1c3a33)) center/cover; }
.hero h1 { font-size: clamp(1.9rem, 1.2rem + 3vw, 3.2rem); line-height: 1.25; margin-bottom: .4em; }
.hero h1 span { color: #f1d9a4; }
.hero p { max-width: 640px; font-size: 1.1rem; opacity: .92; }
.search-box { background: #fff; color: var(--ink); border-radius: 18px; padding: 1rem; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); margin-top: 1.6rem; max-width: 980px; }
.seg { display: inline-flex; background: #f1eee7; border-radius: 10px; padding: 4px; margin-bottom: .8rem; flex-wrap: wrap; }
.seg input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.seg span { display: block; padding: .4rem 1rem; border-radius: 8px; cursor: pointer; font-weight: 700; color: var(--ink-2); }
.seg input:checked + span { background: #fff; color: var(--brand); box-shadow: 0 1px 4px rgba(0, 0, 0, .1); }
.seg input:focus-visible + span { outline: 2px solid var(--gold); }
.search-fields { display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: .7rem; align-items: end; }
.search-fields label span, .filters-body label span { display: block; font-size: .82rem; color: var(--muted); font-weight: 600; margin-bottom: .2rem; }
select, input, textarea { font: inherit; color: var(--ink); width: 100%; padding: .62rem .75rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
select:focus, input:focus, textarea:focus { outline: 2px solid rgba(195, 154, 75, .45); border-color: var(--gold); }
.search-fields .btn { height: 46px; padding-inline: 2rem; }
@media (max-width: 860px) { .search-fields { grid-template-columns: 1fr 1fr; } .search-fields .btn { grid-column: 1 / -1; } }

/* ── الكروت ── */
.grid { display: grid; gap: 1.2rem; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-2-3 { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); color: var(--ink); display: flex; flex-direction: column;
  transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(28, 39, 48, .13); color: var(--ink); }
.card-media { position: relative; aspect-ratio: 16 / 10; background: #e9e5dc; overflow: hidden; }
.card-media.tall { aspect-ratio: 4 / 3; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card-media img { transform: scale(1.04); }
.badge { position: absolute; top: .7rem; right: .7rem; padding: .2rem .7rem; border-radius: 999px; font-size: .8rem; font-weight: 700; color: #fff; background: var(--brand); }
.badge-resale { background: var(--gold-2); }
.badge-delivery { background: rgba(28, 39, 48, .75); }
.card-body { padding: 1rem 1.1rem 1.15rem; display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.card-price { font-weight: 800; font-size: 1.2rem; color: var(--brand); }
.card-price small, .card-foot small { font-weight: 600; font-size: .78rem; color: var(--muted); }
.card-title { font-size: 1.05rem; margin: 0; }
.card-sub { color: var(--muted); font-size: .9rem; }
.specs { list-style: none; padding: .55rem 0 0; margin: auto 0 0; display: flex; flex-wrap: wrap; gap: .35rem .9rem; font-size: .88rem; color: var(--ink-2);
  border-top: 1px dashed var(--line); }
.specs li { display: flex; align-items: center; gap: .3rem; }
.card-foot { display: flex; justify-content: space-between; margin-top: auto; padding-top: .6rem; border-top: 1px dashed var(--line); font-weight: 700; color: var(--brand); }
.card-foot .muted { font-weight: 600; font-size: .88rem; }

.area-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.4rem; }
.area-chips a { background: #fff; border: 1px solid var(--line); padding: .45rem 1rem; border-radius: 999px; color: var(--ink-2); font-weight: 600; }
.area-chips a small { color: var(--gold-2); }
.area-chips a.active, .area-chips a:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.area-chips a.active small, .area-chips a:hover small { color: #f1d9a4; }

.cta { background: var(--brand); color: #fff; padding: 2.4rem 0; margin-top: 1.5rem; }
.cta-inner { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.cta h2 { margin: 0 0 .2rem; }
.cta p { margin: 0; opacity: .85; }

.page-banner { background: linear-gradient(135deg, var(--brand), #173a33); color: #fff; padding: 1.8rem 0 1.5rem; }
.page-banner h1 { margin: 0; }
.page-banner p { margin: 0; opacity: .8; }

.empty-state { text-align: center; background: #fff; border-radius: var(--radius); padding: 3rem 1.5rem; box-shadow: var(--shadow); }

/* ── البحث ── */
.search-layout { display: grid; grid-template-columns: 280px 1fr; gap: 1.5rem; padding-block: 1.5rem 2.5rem; align-items: start; }
.filters-panel { background: #fff; border-radius: var(--radius); padding: 1.1rem; box-shadow: var(--shadow); position: sticky; top: 82px; }
.filters-body { display: grid; gap: .75rem; }
.filters-body .range { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.filters-toggle { display: none; }
.link-reset { text-align: center; font-size: .9rem; }
@media (max-width: 900px) {
  .search-layout { grid-template-columns: 1fr; }
  .filters-panel { position: static; padding: .7rem; }
  .filters-toggle { display: block; width: 100%; font: inherit; font-weight: 700; background: none; border: 0; padding: .4rem; cursor: pointer; color: var(--brand); }
  .filters-toggle::after { content: " ▾"; }
  .filters-panel:not(.open) .filters-body { display: none; }
  .filters-panel.open .filters-body { margin-top: .6rem; }
}
.pagination { display: flex; gap: .35rem; justify-content: center; margin-top: 1.8rem; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 40px; text-align: center; padding: .45rem .7rem; border-radius: 8px; background: #fff; border: 1px solid var(--line); }
.pagination .current { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ── صفحة التفاصيل ── */
.detail { padding-block: 1rem 3rem; }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: .6rem; }
.crumbs a { color: var(--muted); }
.detail-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.detail-head h1 { margin: 0; }
.detail-sub { margin: .2rem 0 0; color: var(--ink-2); }
.detail-price { text-align: left; }
.detail-price small { display: block; color: var(--muted); font-weight: 600; }
.detail-price b { font-size: 1.5rem; color: var(--brand); }
.sold-tag { display: inline-block; vertical-align: middle; font-size: .9rem; background: var(--danger); color: #fff; padding: .1rem .7rem; border-radius: 999px; }

.gallery { display: grid; gap: .5rem; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 210px 210px; border-radius: var(--radius); overflow: hidden; margin-bottom: 1.5rem; }
.g-item { position: relative; display: block; background: #e9e5dc; overflow: hidden; }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.g-item:hover img { transform: scale(1.03); }
.g-main { grid-row: span 2; }
.g-item:nth-child(n+6) { display: none; }
.g-more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(20, 30, 36, .55); color: #fff; font-size: 1.6rem; font-weight: 800; }
.gallery:has(.g-item:only-child) { grid-template-columns: 1fr; grid-template-rows: 420px; }
.gallery:has(.g-item:nth-child(2):last-child) { grid-template-columns: 2fr 1fr; }
.gallery:has(.g-item:nth-child(3):last-child) { grid-template-columns: 2fr 1fr; }
@media (max-width: 700px) {
  .gallery { grid-template-columns: repeat(4, 1fr); grid-template-rows: 240px 70px; border-radius: 10px; }
  .g-main { grid-column: 1 / -1; grid-row: auto; }
  .gallery:has(.g-item:only-child) { grid-template-rows: 260px; }
}
.gallery-plans { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important; grid-template-rows: none !important; background: none; overflow: visible; }
.gallery-plans .g-item { grid-row: auto; grid-column: auto; aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: 12px; background: #fff; display: block !important; }
.gallery-plans .g-item img { object-fit: contain; padding: .4rem; }
.g-zoom { position: absolute; bottom: .5rem; left: .5rem; background: rgba(28, 39, 48, .8); color: #fff; font-size: .8rem; padding: .2rem .6rem; border-radius: 999px; display: flex; gap: .3rem; align-items: center; }
.g-cap { position: absolute; top: .5rem; right: .5rem; background: var(--gold); color: #fff; font-size: .8rem; font-weight: 700; padding: .15rem .6rem; border-radius: 999px; }

.detail-grid { display: grid; grid-template-columns: 1fr 360px; gap: 1.8rem; align-items: start; }
.detail-side { position: sticky; top: 82px; }
@media (max-width: 960px) { .detail-grid { grid-template-columns: 1fr; } .detail-side { position: static; } }
.block { background: #fff; border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow); margin-bottom: 1.2rem; }
.prose { color: var(--ink-2); }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; margin-bottom: 1.2rem; }
.facts > div { background: #fff; border-radius: 12px; padding: .8rem .9rem; box-shadow: var(--shadow); display: grid; grid-template-columns: auto 1fr; column-gap: .55rem; align-items: center; }
.facts .icon { grid-row: span 2; width: 1.7em; height: 1.7em; color: var(--gold); }
.facts span { font-size: .8rem; color: var(--muted); font-weight: 600; }
.facts b { font-size: 1.02rem; }
.plan-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .7rem; }
.plan-card { border: 1px solid var(--line); border-right: 4px solid var(--gold); border-radius: 10px; padding: .75rem .9rem; display: flex; flex-direction: column; }
.plan-card span { color: var(--muted); font-size: .88rem; }
.amenity-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .5rem; }
.amenity-list li { display: flex; gap: .4rem; align-items: center; color: var(--ink-2); }
.amenity-list .icon { color: var(--brand); }
.compound-link { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 10px; }

.contact-box { background: #fff; border-radius: var(--radius); padding: 1.2rem; box-shadow: var(--shadow); display: grid; gap: .9rem; }
.side-title { font-weight: 800; font-size: 1.1rem; }
.side-price { display: flex; flex-direction: column; gap: .1rem; }
.side-price b { font-size: 1.6rem; color: var(--brand); line-height: 1.3; }
.side-price small { color: var(--muted); font-weight: 600; }
.side-price p { margin: .3rem 0 0; font-size: .9rem; }
.badge-inline { display: inline-block; width: fit-content; padding: .05rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 700; color: #fff; background: var(--brand); }
.badge-inline.badge-resale { background: var(--gold-2); }
.contact-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.contact-buttons .btn:only-child { grid-column: 1 / -1; }
.lead-form-public { display: grid; gap: .55rem; border-top: 1px solid var(--line); padding-top: .9rem; }
.lead-form-public h3 { font-size: 1rem; margin: 0; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); opacity: 0; pointer-events: none; }
.lead-done { display: grid; justify-items: center; text-align: center; gap: .2rem; padding: 1rem; background: #e7f4ec; border-radius: 10px; color: #1d6a3d; }
.lead-done .icon { width: 2.2em; height: 2.2em; }
.mobile-price { display: none; }
@media (max-width: 960px) { .mobile-price { display: block; } .mobile-price .side-price { background: #fff; padding: 1rem 1.2rem; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 1rem; } }

/* ── حاسبة القسط ── */
.calc-plans { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.calc-plan input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.calc-plan span { display: block; border: 1px solid var(--line); border-radius: 10px; padding: .5rem .9rem; cursor: pointer; font-weight: 700; }
.calc-plan span small { color: var(--muted); font-weight: 600; }
.calc-plan input:checked + span { border-color: var(--brand); background: #eef3f0; color: var(--brand); }
.calc-plan input:focus-visible + span { outline: 2px solid var(--gold); }
.calc-out { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.calc-out div { background: var(--bg); border-radius: 10px; padding: .7rem .8rem; }
.calc-out span { display: block; font-size: .8rem; color: var(--muted); font-weight: 600; }
.calc-out b { font-size: 1.05rem; color: var(--brand); }
@media (max-width: 560px) { .calc-out { grid-template-columns: 1fr; } }

/* ── زرار الواتساب العايم + شريط الموبايل ── */
.wa-float { position: fixed; bottom: 1.2rem; left: 1.2rem; width: 58px; height: 58px; border-radius: 50%; background: var(--wa); color: #fff; display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(31, 168, 85, .45); z-index: 60; }
.wa-float .icon { width: 32px; height: 32px; }
.wa-float:hover { color: #fff; transform: scale(1.06); }
.sticky-cta { display: none; }
@media (max-width: 960px) {
  .sticky-cta { display: flex; position: fixed; bottom: 0; inset-inline: 0; background: #fff; border-top: 1px solid var(--line); padding: .6rem 1rem; gap: .5rem; align-items: center; z-index: 55;
    box-shadow: 0 -6px 20px rgba(0, 0, 0, .08); }
  .sticky-cta > div { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
  .sticky-cta small { color: var(--muted); font-size: .75rem; }
  .sticky-cta b { color: var(--brand); }
  .sticky-cta > div { min-width: 0; }
  .sticky-cta .btn { padding: .55rem .8rem; font-size: .92rem; gap: .3em; }
  body:has(.sticky-cta) .wa-float { display: none; }
  body:has(.sticky-cta) .site-footer { padding-bottom: 5rem; }
}

/* ── الفوتر ── */
.site-footer { background: #15211d; color: #c9d1cd; padding: 2rem 0 1.2rem; }
main > .cta:last-child { margin-bottom: 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.footer-inner strong { color: #fff; font-size: 1.1rem; }
.footer-contact { display: flex; flex-direction: column; gap: .2rem; }
.footer-contact a { color: #f1d9a4; }
.footer-note { font-size: .8rem; opacity: .6; border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 1.2rem; padding-top: .8rem; }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.contact-list li { display: flex; gap: .5rem; align-items: center; }

/* ── lightbox ── */
.lb { position: fixed; inset: 0; z-index: 100; background: rgba(12, 16, 19, .94); display: none; flex-direction: column; }
.lb.open { display: flex; }
.lb-stage { flex: 1; overflow: hidden; position: relative; touch-action: none; display: grid; place-items: center; }
.lb-stage img { max-width: 96vw; max-height: calc(100vh - 120px); object-fit: contain; transform-origin: center; user-select: none; -webkit-user-drag: none; }
.lb-stage.zoomable img { background: #fff; cursor: zoom-in; }
.lb-stage.zoomed img { cursor: grab; }
.lb-bar { display: flex; justify-content: space-between; align-items: center; gap: .5rem; color: #fff; padding: .6rem 1rem; }
.lb-bar button { background: rgba(255, 255, 255, .12); border: 0; color: #fff; font: inherit; font-size: 1.1rem; min-width: 44px; height: 44px; border-radius: 10px; cursor: pointer; }
.lb-bar button:hover { background: rgba(255, 255, 255, .22); }
.lb-cap { flex: 1; text-align: center; font-weight: 600; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255, 255, 255, .14); border: 0; color: #fff; width: 48px; height: 64px; font-size: 1.8rem; cursor: pointer; border-radius: 10px; }
.lb-prev { right: .6rem; } .lb-next { left: .6rem; }
.lb-hint { color: rgba(255, 255, 255, .6); font-size: .82rem; text-align: center; padding-bottom: .6rem; }
