/* ==========================================================================
   الرئيسية — أقسام إضافية (home.css): قيد الإنشاء · خطط السداد · الموقع · الآراء · الأخبار · الأسئلة
   تعيد استخدام بطاقات about.css (ab-plan / ab-quote / ab-news) بأسلوب عناوين الرئيسية.
   ========================================================================== */
.home-x{ --gold-text:#8A6230; --muted-ab:#5E5A51; }

.home-more{ display:flex; justify-content:center; margin-top:36px; }
.home-more .btn{ border-radius:var(--r-pill); padding-inline:30px; }

/* plans: reuse the featured-plan look; keep the section tidy on the home page */
.home-plans .ab-plan-grid{ margin-top:8px; }

/* location */
.home-loc__grid{ display:grid; grid-template-columns:.9fr 1.1fr; gap:44px; align-items:stretch; }
.home-loc__card{
  display:flex; flex-direction:column; justify-content:center; padding:42px; background:var(--surface);
  border:1px solid var(--line); border-radius:var(--r-lg); box-shadow:var(--shadow-sm);
}
.home-loc__card > p{ margin-top:14px; color:var(--muted-ab); line-height:1.95; }
.home-loc__list{ display:grid; gap:12px; margin-top:22px; padding:0; list-style:none; }
.home-loc__list li{ display:flex; align-items:center; gap:12px; font-weight:600; }
.home-loc__list svg{ flex:none; color:var(--gold-text); }
.home-loc__btns{ display:flex; gap:10px; flex-wrap:wrap; margin-top:28px; }
.home-loc__btns .btn{ border-radius:var(--r-pill); padding-inline:24px; }
.home-loc__map{
  min-height:380px; overflow:hidden; border:1px solid var(--line); border-radius:var(--r-lg); box-shadow:var(--shadow-md);
  background:linear-gradient(135deg, var(--sand), var(--sand-2));
}
.home-loc__map iframe{ display:block; width:100%; height:100%; min-height:380px; border:0; }

/* news cards: "read" link instead of the about-page accordion */
.ab-more-link{
  display:inline-flex; align-items:center; gap:6px; margin-top:12px; min-height:40px; font-weight:700; font-size:.9rem; color:var(--gold-text);
}
.ab-more-link svg{ transition:translate var(--dur) var(--ease); }
.ab-more-link:hover svg{ translate:-4px 0; }

/* FAQ */
.home-faq{ max-width:820px; margin-inline:auto; display:grid; gap:12px; }
.home-faq .acc{ border-radius:18px; transition:border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.home-faq .acc[open]{ border-color:var(--gold); box-shadow:var(--shadow-sm); }
.home-faq .acc summary{ padding:20px 22px; line-height:1.7; }

@media (max-width:900px){
  .home-loc__grid{ grid-template-columns:1fr; gap:22px; }
  .home-loc__card{ padding:30px 24px; }
  .home-loc__map, .home-loc__map iframe{ min-height:300px; }
}
@media (max-width:767px){
  .home-more{ margin-top:24px; }
  .home-more .btn{ width:100%; }
  .home-loc__btns .btn{ flex:1 1 100%; }
  .home-faq .acc summary{ padding:16px 18px; }
}


/* ==========================================================================
   Closing call-to-action: a light card on the cream page (the dark footer is now the only dark block)
   ========================================================================== */
.cta-section{ background:var(--bg); color:var(--ink); padding:40px 0 96px; overflow:visible; }
.cta-section__bg{ display:none; }
.cta-section__inner{
  position:relative; isolation:isolate; overflow:hidden; width:calc(100% - 48px); max-width:calc(var(--container) - 48px); margin-inline:auto;
  padding:48px 56px; grid-template-columns:270px 1fr; gap:56px; align-items:center;
  background:radial-gradient(circle at 14% 18%, rgba(230,194,143,.42), transparent 46%), linear-gradient(135deg, #F6F1E7 0%, #EADFC9 100%);
  border:1px solid var(--sand-2); border-radius:32px; box-shadow:var(--shadow-md);
}
.cta-section__inner::before{
  content:""; position:absolute; z-index:-1; inset-inline-start:-90px; bottom:-120px; width:340px; height:340px; border-radius:50%;
  background:rgba(184,135,76,.14);
}
.cta-section__image{
  border:6px solid #fff; border-radius:28px; box-shadow:var(--shadow-lg); background:var(--sand-2);
}
.cta-section__title{ color:var(--ink); letter-spacing:0; text-wrap:balance; }
.cta-section__lead{ color:var(--ink-soft); opacity:1; }
.cta-section .btn.btn--light{
  background:var(--ink); color:#fff; border-radius:var(--r-pill); padding:16px 34px; gap:10px;
  box-shadow:0 14px 28px -12px rgba(21,22,26,.55); transition:background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.cta-section .btn.btn--light:hover{ background:#000; transform:translateY(-2px); }
.cta-section .btn.btn--light svg{ transition:translate var(--dur) var(--ease); }
.cta-section .btn.btn--light:hover svg{ translate:-4px 0; }

@media (max-width:1000px){
  .cta-section__inner{ grid-template-columns:1fr; gap:26px; padding:40px 32px; text-align:center; justify-items:center; }
  .cta-section__image{ width:220px; max-width:none; }
}
@media (max-width:767px){
  .cta-section{ padding:24px 0 56px; }
  .cta-section__inner{ width:calc(100% - 36px); padding:30px 20px 28px; gap:18px; border-radius:26px; }
  .cta-section__image{ width:104px; aspect-ratio:1 / 1; border:4px solid #fff; border-radius:50%; }
  .cta-section__title{ font-size:1.45rem; }
  .cta-section__lead{ font-size:.95rem; margin:10px 0 20px; }
  .cta-section .btn.btn--light{ width:100%; }
}

/* ==========================================================================
   News: cards on the page + the reading card (native <dialog>)
   ========================================================================== */
.home-more[hidden]{ display:none; }
.home-news .ab-news{ cursor:pointer; }
.home-news .ab-news h3{ font-size:1.08rem; line-height:1.65; }
.ab-news__excerpt{
  margin-top:8px; color:var(--muted-ab); font-size:.9rem; line-height:1.85;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
@media (min-width:768px){ .ab-news-grid.is-collapsed .news-extra{ display:none; } }
@media (max-width:767px){ #newsMore{ display:none; } }

.news-dialog{
  width:100%; height:100%; max-width:none; max-height:none; margin:0; padding:0; border:0; background:transparent; color:var(--ink);
  overflow:hidden;
}
.news-dialog::backdrop{ background:rgba(12,13,16,.64); -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px); }
.news-dialog[open]{ display:grid; place-items:center; padding:24px; }
.news-card{
  position:relative; width:min(900px, 100%); max-height:calc(100svh - 48px); overflow-y:auto; overscroll-behavior:contain;
  background:var(--surface); border-radius:30px; box-shadow:0 44px 110px -32px rgba(0,0,0,.65);
  --gold-text:#8A6230; --muted-ab:#5E5A51;
}
/* the scrollable card must not show a focus frame; the close button keeps its own */
.news-dialog:focus, .news-card:focus, .news-card:focus-visible{ outline:none; }
.news-close:focus-visible{ outline:2px solid #fff; outline-offset:2px; }
@keyframes newsIn{ from{ opacity:0; transform:translateY(26px) scale(.98); } to{ opacity:1; transform:none; } }
@media (prefers-reduced-motion: no-preference){ .news-dialog[open] .news-card{ animation:newsIn .38s var(--ease) both; } }

.news-card__media{ position:relative; aspect-ratio:16 / 6; overflow:hidden; background:linear-gradient(135deg, var(--sand), var(--sand-2)); border-radius:30px 30px 0 0; }
.news-card__media img{ width:100%; height:100%; object-fit:cover; display:block; }
.news-card__media::after{ content:""; position:absolute; inset:0; background:linear-gradient(180deg, rgba(10,12,16,.28), transparent 40%, rgba(10,12,16,.4)); }
.news-card__media .ab-chip{ top:auto; bottom:16px; right:20px; z-index:1; }
.news-close{
  position:sticky; top:14px; float:left; z-index:5; width:44px; height:44px; margin:14px 0 -58px 14px; border-radius:50%; border:1px solid rgba(255,255,255,.5);
  display:grid; place-items:center; cursor:pointer; color:#fff; background:rgba(21,22,26,.55);
  -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px); transition:background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.news-close:hover{ background:rgba(21,22,26,.8); }
.news-close:active{ transform:scale(.92); }

.news-card__body{ padding:30px 44px 8px; }
.news-meta{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; font-size:.88rem; color:var(--muted-ab); }
.news-meta time{ color:var(--gold-text); font-weight:700; }
.news-card h3{ margin-top:10px; font-size:clamp(1.5rem, 3vw, 2.05rem); line-height:1.45; letter-spacing:0; text-wrap:balance; }
.news-lead{ margin-top:16px; font-size:1.1rem; line-height:2; font-weight:500; color:var(--ink); }
.news-facts{ display:grid; grid-template-columns:repeat(3, 1fr); gap:12px; margin-top:26px; padding:0; list-style:none; }
.news-facts li{ padding:18px 10px; text-align:center; background:var(--sand); border:1px solid var(--sand-2); border-radius:18px; }
.news-facts b{ display:block; font-family:var(--font-display); font-size:1.4rem; font-weight:800; line-height:1.4; }
.news-facts span{ display:block; margin-top:4px; font-size:.82rem; line-height:1.55; color:var(--muted-ab); }
.news-text p{ margin-top:18px; line-height:2.05; color:var(--ink-soft); }
.news-list{ margin-top:24px; padding:22px 24px; background:var(--bg); border:1px solid var(--line); border-radius:20px; }
.news-list h4{ font-size:1rem; margin-bottom:14px; }
.news-list ul{ display:grid; grid-template-columns:1fr 1fr; gap:12px 22px; padding:0; list-style:none; }
.news-list li{ position:relative; padding-inline-start:30px; line-height:1.7; font-size:.94rem; color:var(--ink-soft); }
.news-list li::before{
  content:"\2713"; position:absolute; inset-inline-start:0; top:1px; width:21px; height:21px; border-radius:50%; display:grid; place-items:center;
  background:var(--sand); color:var(--gold-text); font-size:.72rem; font-weight:800;
}
.news-note{ margin-top:16px; font-weight:700; color:var(--gold-text); }
.news-actions{ display:flex; gap:10px; flex-wrap:wrap; margin:28px 0 30px; }
.news-actions .btn{ border-radius:var(--r-pill); padding-inline:26px; }

.news-nav{ display:grid; grid-template-columns:1fr 1fr; border-top:1px solid var(--line); background:var(--bg); border-radius:0 0 30px 30px; overflow:hidden; }
.news-nav button{
  display:flex; flex-direction:column; gap:4px; padding:18px 26px; text-align:start; cursor:pointer; background:none; border:0; color:var(--ink);
  transition:background var(--dur) var(--ease); min-width:0;
}
.news-nav button + button{ border-inline-start:1px solid var(--line); }
.news-nav button:hover{ background:var(--sand); }
.news-nav small{ color:var(--gold-text); font-weight:700; font-size:.78rem; }
.news-nav b{ font-size:.92rem; font-weight:600; line-height:1.6; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

@media (max-width:767px){
  .news-dialog[open]{ padding:0; align-items:end; }
  .news-card{ width:100%; max-height:92svh; border-radius:26px 26px 0 0; }
  @keyframes newsUp{ from{ transform:translateY(40px); opacity:.6; } to{ transform:none; opacity:1; } }
  @media (prefers-reduced-motion: no-preference){ .news-dialog[open] .news-card{ animation:newsUp .34s var(--ease) both; } }
  .news-card__media{ aspect-ratio:16 / 10; border-radius:26px 26px 0 0; }
  .news-card__body{ padding:22px 20px 4px; }
  .news-lead{ font-size:1.02rem; line-height:1.95; }
  .news-facts{ gap:8px; margin-top:20px; }
  .news-facts li{ padding:14px 6px; }
  .news-facts b{ font-size:1.05rem; }
  .news-facts span{ font-size:.75rem; }
  .news-list{ padding:18px; }
  .news-list ul{ grid-template-columns:1fr; gap:10px; }
  .news-actions{ margin:22px 0 24px; }
  .news-actions .btn{ flex:1 1 100%; }
  .news-nav button{ padding:14px 16px; }
  .news-nav b{ font-size:.82rem; }
}


/* ==========================================================================
   Home polish: stats card on the hero edge · desktop carousels · white bands · consistent headings
   ========================================================================== */
/* one heading scale for every home section */
.sec-title, .section-head .h2{ font-size:clamp(1.8rem, 3.4vw, 2.6rem); line-height:1.35; letter-spacing:0; }
.section-header .eyebrow{
  display:inline-flex; align-items:center; gap:10px; margin-bottom:12px; font-size:.92rem; font-weight:700; letter-spacing:0; text-transform:none; color:var(--gold-ink);
}
.section-header .eyebrow::before, .section-header .eyebrow::after{ content:""; width:26px; height:2px; border-radius:2px; background:var(--gold); }

/* white bands break the cream monotony */
.home-band{ background:var(--bg); }
.home-band .card-property, .home-band .ab-news{ box-shadow:var(--shadow-sm); }

@media (min-width:1024px){ #bestOffersRail{ margin-top:0; } }

/* desktop: unit lists become one-row carousels with arrows (saves ~1000px of scrolling) */
@media (min-width:1024px){
  .rail{
    display:flex; gap:24px; overflow-x:auto; scroll-snap-type:x mandatory; scroll-padding-inline:4px; margin:0 -4px; padding:6px 4px 18px; scrollbar-width:none;
  }
  .rail::-webkit-scrollbar{ display:none; }
  .rail .card-property{ flex:0 0 calc((100% - 72px) / 4); min-width:0; scroll-snap-align:start; }
  .section-head .rail-nav{ margin-inline-start:auto; margin-inline-end:8px; }
}
/* arrows: always a side-by-side row (never stacked); below 1024px swiping is used, so they are hidden there */
.rail-nav{ display:flex; flex:none; align-items:center; gap:8px; }
.rail-nav[hidden]{ display:none; }
@media (max-width:1023px){ .section-head .rail-nav{ display:none; } }
.rail-btn{
  width:42px; height:42px; display:grid; place-items:center; border-radius:50%; cursor:pointer; background:var(--surface); color:var(--ink);
  border:1px solid var(--line-strong); transition:background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.rail-btn:hover:not(:disabled){ background:var(--ink); color:#fff; border-color:var(--ink); }
.rail-btn:active:not(:disabled){ transform:scale(.92); }
.rail-btn:disabled{ opacity:.38; cursor:default; }
.rail-btn[data-dir="1"] svg{ transform:none; }
.rail-btn[data-dir="-1"] svg{ transform:scaleX(-1); }
