/* =========================================================
   أُفق العقارية — الأنماط الرئيسية
   Ufuq Real Estate — Main stylesheet
   ========================================================= */

/* ---------- THEME TOKENS ---------- */
:root,
:root[data-theme="light"]{
  --bg:#F8F6F1;
  --bg-alt:#EFEAE0;
  --surface:#FFFFFF;
  --surface-2:#FBFAF7;
  --text:#14171C;
  --text-muted:#61636B;
  --border:#E6E0D2;
  --navy:#0D1321;
  --navy-2:#141d33;
  --navy-3:#1b2745;
  --navy-text:#F7F4EE;
  --navy-text-muted:rgba(247,244,238,.68);
  --gold:#B08A22;
  --gold-2:#C9A43A;
  --gold-soft:rgba(176,138,34,.14);
  --shadow-soft:0 12px 30px -18px rgba(13,19,33,.28);
  --shadow-lift:0 26px 45px -20px rgba(13,19,33,.38);
  --overlay-hero:linear-gradient(180deg, rgba(13,19,33,.55) 0%, rgba(13,19,33,.72) 55%, rgba(13,19,33,.97) 100%);
  color-scheme:light;
}

:root[data-theme="dark"]{
  --bg:#0A0D13;
  --bg-alt:#0F131C;
  --surface:#151A24;
  --surface-2:#1A2029;
  --text:#F1EFE9;
  --text-muted:#9BA0AC;
  --border:#232A38;
  --navy:#05070C;
  --navy-2:#0B1019;
  --navy-3:#111A2C;
  --navy-text:#F1EFE9;
  --navy-text-muted:rgba(241,239,233,.65);
  --gold:#D9BA5F;
  --gold-2:#EAD08A;
  --gold-soft:rgba(217,186,95,.12);
  --shadow-soft:0 12px 30px -18px rgba(0,0,0,.6);
  --shadow-lift:0 26px 50px -18px rgba(0,0,0,.7);
  --overlay-hero:linear-gradient(180deg, rgba(4,6,10,.6) 0%, rgba(4,6,10,.8) 55%, rgba(4,6,10,1) 100%);
  color-scheme:dark;
}

:root{
  --ff-display:'Noto Kufi Arabic', 'Poppins', sans-serif;
  --ff-body:'Tajawal', 'Inter', sans-serif;
}
:root[lang="en"]{
  --ff-display:'Poppins', 'Noto Kufi Arabic', sans-serif;
  --ff-body:'Inter', 'Tajawal', sans-serif;
}

/* ---------- BASE ---------- */
*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  font-family:var(--ff-body);
  color:var(--text);
  background:var(--bg);
  overflow-x:hidden;
  transition:background-color .4s ease, color .4s ease;
}
h1,h2,h3,h4,h5,.display-font{font-family:var(--ff-display);}
::selection{background:var(--gold); color:#fff;}
a{transition:color .25s ease;}

.eyebrow{
  font-family:var(--ff-body);
  font-weight:700;
  letter-spacing:.5px;
  color:var(--gold);
  font-size:.85rem;
  display:flex;
  align-items:center;
  gap:.6rem;
  margin-bottom:.9rem;
}
.eyebrow::before{
  content:"";
  width:34px;
  height:2px;
  background:var(--gold);
  display:inline-block;
}

/* ---------- BUTTONS ---------- */
.btn-gold{
  background:linear-gradient(135deg,var(--gold-2),var(--gold));
  border:none;
  color:#1a1305;
  font-weight:700;
  padding:.85rem 2rem;
  border-radius:2px;
  letter-spacing:.3px;
  transition:.35s ease;
  box-shadow:0 8px 20px -8px rgba(176,138,34,.5);
}
.btn-gold:hover{
  transform:translateY(-2px);
  box-shadow:0 14px 28px -10px rgba(176,138,34,.6);
  color:#1a1305;
}
.btn-outline-ivory{
  border:1.5px solid rgba(247,244,238,.55);
  color:var(--navy-text);
  background:transparent;
  font-weight:600;
  padding:.8rem 1.9rem;
  border-radius:2px;
  transition:.35s ease;
}
.btn-outline-ivory:hover{
  background:var(--navy-text);
  color:var(--navy);
  border-color:var(--navy-text);
}
.btn-navy-outline{
  border:1.5px solid var(--text);
  color:var(--text);
  background:transparent;
  font-weight:600;
  border-radius:2px;
  transition:.3s;
}
.btn-navy-outline:hover{
  background:var(--text);
  color:var(--bg);
}

/* ---------- ICON TOGGLE BUTTONS (theme / lang) ---------- */
.util-btn{
  width:40px; height:40px;
  border-radius:50%;
  border:1px solid rgba(247,244,238,.25);
  background:rgba(247,244,238,.06);
  color:var(--navy-text);
  display:flex; align-items:center; justify-content:center;
  font-size:1.05rem;
  transition:.3s ease;
  cursor:pointer;
}
.util-btn:hover{
  background:var(--gold);
  border-color:var(--gold);
  color:#1a1305;
}
.lang-btn{
  width:auto;
  padding:0 .9rem;
  border-radius:20px;
  font-weight:700;
  font-size:.82rem;
  font-family:var(--ff-body);
}
.navbar-custom.scrolled .util-btn{
  border-color:var(--border);
  color:var(--text);
  background:transparent;
}
.navbar-custom.scrolled .util-btn:hover{
  background:var(--gold);
  border-color:var(--gold);
  color:#1a1305;
}
.icon-swap .bi-moon-stars-fill{display:none;}
:root[data-theme="dark"] .icon-swap .bi-sun-fill{display:none;}
:root[data-theme="dark"] .icon-swap .bi-moon-stars-fill{display:inline-block;}

/* ---------- NAVBAR ---------- */
.navbar-custom{
  position:fixed;
  inset-inline:0;
  top:0;
  z-index:1000;
  padding:1.35rem 0;
  transition:.4s ease;
  background:transparent;
}
.navbar-custom.scrolled{
  background:var(--surface);
  backdrop-filter:blur(10px);
  padding:.85rem 0;
  box-shadow:var(--shadow-soft);
  border-bottom:1px solid var(--border);
}
.navbar-custom .navbar-brand{
  font-family:var(--ff-display);
  font-weight:800;
  font-size:1.55rem;
  color:var(--navy-text) !important;
  letter-spacing:.5px;
}
.navbar-custom.scrolled .navbar-brand{color:var(--text) !important;}
.navbar-custom .navbar-brand span{color:var(--gold);}
.navbar-custom .nav-link{
  color:rgba(247,244,238,.85) !important;
  font-weight:500;
  margin-inline:.55rem;
  position:relative;
  padding:.4rem .1rem !important;
}
.navbar-custom.scrolled .nav-link{color:var(--text) !important;}
.navbar-custom .nav-link::after{
  content:"";
  position:absolute;
  inset-inline-start:0; bottom:0;
  width:0; height:2px;
  background:var(--gold);
  transition:.3s;
}
.navbar-custom .nav-link:hover::after,
.navbar-custom .nav-link.active::after{width:100%;}
.navbar-custom .navbar-toggler{border:none; color:var(--navy-text); font-size:1.4rem; box-shadow:none;}
.navbar-custom.scrolled .navbar-toggler{color:var(--text);}

/* ---------- HERO ---------- */
.hero{
  position:relative;
  min-height:100vh;
  display:flex;
  align-items:center;
  background:
    var(--overlay-hero),
    url('https://images.unsplash.com/photo-1600585154340-be6161a56a0c?auto=format&fit=crop&w=1800&q=80') center/cover no-repeat;
  padding-top:7rem;
  padding-bottom:11rem;
}
.hero .kicker{
  color:var(--gold-2);
  font-weight:700;
  letter-spacing:3px;
  font-size:.85rem;
  text-transform:uppercase;
}
.hero h1{
  color:var(--navy-text);
  font-weight:800;
  font-size:clamp(2.3rem, 5.2vw, 4rem);
  line-height:1.25;
  margin:1.1rem 0 1.4rem;
}
.hero h1 em{font-style:normal; color:var(--gold-2);}
.hero p.lead-text{
  color:rgba(247,244,238,.8);
  max-width:620px;
  font-size:1.15rem;
  font-weight:300;
}
.hero-scroll{
  position:absolute;
  bottom:2.4rem;
  inset-inline:0;
  text-align:center;
  color:rgba(247,244,238,.7);
  font-size:1.6rem;
  animation:bounceDown 2.2s infinite;
  pointer-events:none;
}
@keyframes bounceDown{
  0%,100%{transform:translateY(0);}
  50%{transform:translateY(10px);}
}

/* ---------- SEARCH PANEL ---------- */
.search-panel-wrap{position:relative; z-index:50; margin-top:-7.5rem;}
.search-panel{
  background:var(--surface);
  backdrop-filter:blur(14px);
  border:1px solid var(--border);
  border-radius:6px;
  box-shadow:0 30px 60px -20px rgba(13,19,33,.45);
  padding:1.9rem 2rem 1.6rem;
}
.search-tabs{display:flex; gap:.5rem; margin-bottom:1.4rem;}
.search-tab{
  border:none; background:transparent;
  font-family:var(--ff-display); font-weight:700; font-size:1rem;
  color:var(--text-muted);
  padding:.4rem 1.2rem .7rem;
  border-bottom:3px solid transparent;
  transition:.25s;
}
.search-tab.active{color:var(--text); border-bottom-color:var(--gold);}
.search-panel label{
  font-size:.78rem; font-weight:700; color:var(--text-muted);
  margin-bottom:.35rem; display:block;
}
.search-panel .form-select, .search-panel .form-control{
  border:1px solid var(--border);
  border-radius:3px;
  padding:.65rem .8rem;
  font-family:var(--ff-body);
  font-size:.95rem;
  background:var(--surface-2);
  color:var(--text);
}
.search-panel .form-select:focus, .search-panel .form-control:focus{
  box-shadow:0 0 0 .18rem var(--gold-soft);
  border-color:var(--gold);
  background:var(--surface-2);
  color:var(--text);
}
.search-submit-btn{width:100%; height:100%; min-height:48px;}

/* ---------- STATS ---------- */
.stats-section{background:var(--navy); color:var(--navy-text); padding:6.5rem 0 4rem;}
.stat-item h3{
  font-size:clamp(2.1rem,4vw,3rem);
  font-weight:800;
  color:var(--gold-2);
  margin-bottom:.2rem;
}
.stat-item p{color:var(--navy-text-muted); font-weight:500; letter-spacing:.3px; margin:0;}
.stat-item{border-inline-end:1px solid rgba(247,244,238,.12);}
.stat-item:last-child{border-inline-end:none;}

/* ---------- SECTIONS ---------- */
section{padding:6.5rem 0;}
.section-title{font-weight:800; font-size:clamp(1.8rem,3.2vw,2.6rem); color:var(--text); margin-bottom:.6rem;}
.section-sub{color:var(--text-muted); max-width:600px; font-size:1.02rem;}

/* ---------- PROPERTY CARDS ---------- */
.property-card{
  background:var(--surface);
  border-radius:6px;
  overflow:hidden;
  box-shadow:var(--shadow-soft);
  transition:.4s ease;
  height:100%;
  border:1px solid var(--border);
}
.property-card:hover{transform:translateY(-8px); box-shadow:var(--shadow-lift);}
.property-img-wrap{position:relative; overflow:hidden; height:250px;}
.property-img-wrap img{width:100%; height:100%; object-fit:cover; transition:.6s ease;}
.property-card:hover .property-img-wrap img{transform:scale(1.09);}
.badge-status{
  position:absolute; top:1rem; inset-inline-end:1rem;
  padding:.4rem .9rem; font-size:.75rem; font-weight:700;
  border-radius:2px; letter-spacing:.3px;
}
.badge-sale{background:var(--gold); color:#1a1305;}
.badge-rent{background:var(--navy); color:var(--navy-text);}
.fav-btn{
  position:absolute; top:1rem; inset-inline-start:1rem;
  width:38px; height:38px;
  background:rgba(255,255,255,.9);
  border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  color:var(--navy);
  border:none; transition:.25s;
}
.fav-btn:hover{background:var(--gold); color:#fff;}
.property-body{padding:1.4rem 1.5rem 1.6rem;}
.property-price{font-family:var(--ff-display); font-weight:800; font-size:1.35rem; color:var(--text); margin-bottom:.3rem;}
.property-price span{font-size:.8rem; color:var(--text-muted); font-weight:500; font-family:var(--ff-body);}
.property-title{font-weight:700; font-size:1.08rem; margin-bottom:.35rem; color:var(--text);}
.property-loc{color:var(--text-muted); font-size:.88rem; display:flex; align-items:center; gap:.35rem; margin-bottom:1rem;}
.property-specs{
  display:flex; gap:1.1rem;
  border-top:1px dashed var(--border);
  padding-top:.9rem; font-size:.85rem; color:var(--text-muted);
}
.property-specs span{display:flex; align-items:center; gap:.35rem;}
.property-specs i{color:var(--gold);}

/* ---------- WHY US ---------- */
.why-section{background:var(--navy); color:var(--navy-text); position:relative;}
.why-section .section-title{color:var(--navy-text);}
.why-section .section-sub{color:var(--navy-text-muted);}
.feature-box{
  padding:1.8rem 1.6rem;
  border:1px solid rgba(247,244,238,.1);
  border-radius:6px; height:100%; transition:.35s;
  background:rgba(255,255,255,.02);
}
.feature-box:hover{
  background:var(--gold-soft);
  border-color:rgba(217,186,95,.4);
  transform:translateY(-6px);
}
.feature-icon{
  width:56px; height:56px; border-radius:50%;
  background:var(--gold-soft); color:var(--gold-2);
  display:flex; align-items:center; justify-content:center;
  font-size:1.5rem; margin-bottom:1.2rem;
}
.feature-box h5{font-weight:700; margin-bottom:.6rem; color:var(--navy-text);}
.feature-box p{color:var(--navy-text-muted); font-size:.92rem; margin:0;}

/* ---------- CITIES ---------- */
.city-card{
  position:relative; border-radius:6px; overflow:hidden;
  height:340px; display:flex; align-items:flex-end; color:#fff;
}
.city-card img{position:absolute; inset:0; width:100%; height:100%; object-fit:cover; transition:.6s;}
.city-card::before{
  content:""; position:absolute; inset:0;
  background:linear-gradient(180deg, rgba(13,19,33,0) 30%, rgba(13,19,33,.92) 100%);
  z-index:1;
}
.city-card:hover img{transform:scale(1.1);}
.city-card-body{position:relative; z-index:2; padding:1.5rem; width:100%;}
.city-card-body h5{font-weight:800; margin-bottom:.15rem;}
.city-card-body span{font-size:.85rem; color:var(--sand,#C9BEA6);}

/* ---------- PROJECT SHOWCASE ---------- */
.project-showcase{
  background:
    linear-gradient(100deg, rgba(5,7,12,.92) 40%, rgba(5,7,12,.35) 100%),
    url('https://images.unsplash.com/photo-1512917774080-9991f1c4c750?auto=format&fit=crop&w=1800&q=80') center/cover;
  color:var(--navy-text);
  border-radius:10px; padding:5rem 3rem; position:relative; overflow:hidden;
}
[dir="rtl"] .project-showcase{
  background:
    linear-gradient(260deg, rgba(5,7,12,.92) 40%, rgba(5,7,12,.35) 100%),
    url('https://images.unsplash.com/photo-1512917774080-9991f1c4c750?auto=format&fit=crop&w=1800&q=80') center/cover;
}
.project-showcase h2{font-weight:800; font-size:clamp(1.7rem,3.5vw,2.4rem); margin-bottom:1rem;}
.project-showcase p{color:rgba(247,244,238,.72); max-width:520px; margin-bottom:1.8rem;}
.project-meta{display:flex; gap:2.5rem; margin-top:2.2rem; flex-wrap:wrap;}
.project-meta div{border-inline-start:2px solid var(--gold); padding-inline-start:.9rem;}
.project-meta small{display:block; color:rgba(247,244,238,.55); font-size:.78rem;}
.project-meta strong{font-size:1.15rem; font-family:var(--ff-display);}

/* ---------- TESTIMONIALS ---------- */
.testimonials-section{background:var(--bg-alt);}
.testimonial-card{
  background:var(--surface);
  border-radius:8px; padding:2.4rem; text-align:center;
  max-width:720px; margin:0 auto;
  box-shadow:var(--shadow-soft);
  border:1px solid var(--border);
}
.testimonial-card i.bi-quote{font-size:2.2rem; color:var(--gold); transform:scaleX(-1); display:inline-block;}
[dir="ltr"] .testimonial-card i.bi-quote{transform:scaleX(1);}
.testimonial-card p.quote{font-size:1.15rem; color:var(--text); line-height:1.9; margin:1.2rem 0 1.6rem;}
.testimonial-avatar{width:60px; height:60px; border-radius:50%; object-fit:cover; margin-bottom:.7rem; border:2px solid var(--gold);}
.testimonial-card h6{font-weight:700; margin-bottom:0; color:var(--text);}
.testimonial-card small{color:var(--text-muted);}
.carousel-indicators [data-bs-target]{background-color:var(--gold); width:9px; height:9px; border-radius:50%;}

/* ---------- CTA BANNER ---------- */
.cta-banner{
  background:linear-gradient(120deg, var(--navy) 0%, var(--navy-3) 100%);
  color:var(--navy-text); border-radius:10px; padding:4rem 3rem;
  position:relative; overflow:hidden;
}
.cta-banner::after{
  content:""; position:absolute; inset:0;
  background:radial-gradient(circle at 85% 30%, var(--gold-soft), transparent 55%);
}
.cta-banner h2{font-weight:800; font-size:clamp(1.6rem,3vw,2.3rem); position:relative; z-index:2;}
.cta-banner .cta-content{position:relative; z-index:2;}
.cta-banner p{color:var(--navy-text-muted);}

/* ---------- FOOTER ---------- */
footer{background:var(--navy); color:var(--navy-text-muted); padding-top:4.5rem;}
footer h6{color:var(--navy-text); font-weight:700; margin-bottom:1.3rem; font-family:var(--ff-display);}
footer .footer-brand{font-family:var(--ff-display); font-weight:800; font-size:1.5rem; color:var(--navy-text);}
footer .footer-brand span{color:var(--gold);}
footer a{color:var(--navy-text-muted); text-decoration:none; transition:.25s; font-size:.92rem;}
footer a:hover{color:var(--gold-2);}
footer ul{list-style:none; padding:0; margin:0;}
footer li{margin-bottom:.7rem;}
.footer-social a{
  width:38px; height:38px; border:1px solid rgba(247,244,238,.15);
  border-radius:50%; display:inline-flex; align-items:center; justify-content:center;
  margin-inline-end:.5rem;
}
.footer-social a:hover{background:var(--gold); border-color:var(--gold); color:#1a1305;}
.footer-bottom{border-top:1px solid rgba(247,244,238,.08); margin-top:3rem; padding:1.4rem 0; font-size:.85rem;}
.newsletter-input{
  background:rgba(255,255,255,.06);
  border:1px solid rgba(247,244,238,.15);
  color:#fff;
  border-start-start-radius:3px;
  border-end-start-radius:3px;
  border-start-end-radius:0;
  border-end-end-radius:0;
}
.newsletter-input::placeholder{color:rgba(247,244,238,.4);}
.newsletter-input:focus{background:rgba(255,255,255,.08); color:#fff; box-shadow:none; border-color:var(--gold);}
.newsletter-btn{
  border-start-start-radius:0 !important;
  border-end-start-radius:0 !important;
  border-start-end-radius:3px !important;
  border-end-end-radius:3px !important;
}

/* ---------- BACK TO TOP ---------- */
.back-to-top{
  position:fixed; bottom:1.8rem; inset-inline-start:1.8rem;
  width:46px; height:46px; background:var(--navy); color:var(--gold);
  border-radius:50%; display:flex; align-items:center; justify-content:center;
  z-index:999; opacity:0; visibility:hidden; transform:translateY(10px);
  transition:.35s; border:1px solid rgba(217,186,95,.4);
}
.back-to-top.show{opacity:1; visibility:visible; transform:translateY(0);}

/* ---------- REVEAL ANIMATION ----------
   Progressive enhancement: elements are only hidden pending animation
   when the `js` class is present on <html> (set by an inline script
   that runs before anything else). If JavaScript fails to load for
   any reason, content is fully visible by default — it never gets
   stuck invisible. */
.js .reveal{opacity:0; transform:translateY(30px); transition:opacity .8s ease, transform .8s ease;}
.reveal.in-view{opacity:1; transform:translateY(0);}

@media (prefers-reduced-motion: reduce){
  .js .reveal{opacity:1; transform:none; transition:none;}
  .hero-scroll{animation:none;}
}

@media (max-width: 991px){
  .stat-item{border-inline-end:none; margin-bottom:1.5rem;}
  .search-panel-wrap{margin-top:-4.5rem;}
  .project-showcase{padding:3rem 1.6rem;}
  .cta-banner{padding:3rem 1.6rem; text-align:center;}
}
