@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;700;800&family=Inter:wght@700&display=swap');

:root{
  --green-900:#12362a;
  --green-800:#163d2f;
  --green-700:#1e4d3b;
  --green-600:#2b6349;
  --green-soft:#e7efe9;
  --gold:#d6a445;
  --gold-dark:#c08f34;
  --cream:#faf9f5;
  --ink:#1c2621;
  --gray:#6b756f;
  --line:#e3e7e2;
  --radius:16px;
  --radius-sm:10px;
  --shadow:0 10px 30px rgba(18,54,42,.08);
  --bottom-nav-h:64px;
  --safe-bottom:env(safe-area-inset-bottom, 0px);
}

*{box-sizing:border-box;-webkit-tap-highlight-color:transparent;}
html{scroll-behavior:smooth;}
html[dir="rtl"] body{direction:rtl;text-align:right;}
html[dir="ltr"] body{direction:ltr;text-align:left;}
body{
  margin:0;
  font-family: 'Cairo', 'Inter', sans-serif;
  color:var(--ink);
  background:var(--cream);
  overscroll-behavior-y:none;
}
img{max-width:100%;display:block;}
a{text-decoration:none;color:inherit;}
ul{list-style:none;margin:0;padding:0;}
button{font-family:inherit;cursor:pointer;border:none;background:none;}
h1,h2,h3,h4{margin:0;font-weight:800;}
.container{max-width:1280px;margin:0 auto;padding:0 32px;}
.serif{font-family:'Inter',serif;}

/* ============ App shell (mobile-app-like) ============ */
.app-shell{
  min-height:100vh;
  display:flex;
  flex-direction:column;
  padding-bottom:calc(var(--bottom-nav-h) + var(--safe-bottom));
}
@media(min-width:981px){
  .app-shell{padding-bottom:0;}
}

/* ---------- Header (desktop) ---------- */
.site-header{
  position:sticky;top:0;z-index:100;
  background:linear-gradient(180deg,#ffffff, #eef3ee 140%);
  border-bottom:1px solid var(--line);
}
.header-inner{
  max-width:1280px;margin:0 auto;padding:12px 20px;
  display:flex;align-items:center;justify-content:space-between;gap:16px;
}
.brand{display:flex;align-items:center;gap:10px;}
.brand-mark{
  width:42px;height:42px;border-radius:12px;flex-shrink:0;
  background:var(--green-800);
  display:flex;align-items:center;justify-content:center;color:var(--gold);
}
.brand-mark svg{width:22px;height:22px;}
.brand-text{line-height:1.2;}
.brand-text .name-ar{font-weight:800;color:var(--green-800);font-size:16px;}
.brand-text .name-en{font-weight:700;color:var(--gold-dark);font-size:10px;letter-spacing:.5px;text-transform:uppercase;}

.main-nav{display:none;align-items:center;gap:24px;flex-wrap:wrap;}
.main-nav a{font-weight:700;font-size:14px;color:var(--ink);position:relative;padding:6px 0;white-space:nowrap;}
.main-nav a.active{color:var(--green-700);}
.main-nav a.active::after{content:"";position:absolute;bottom:-4px;right:0;left:0;height:3px;background:var(--gold);border-radius:3px;}
.has-dd{position:relative;}
.dd-menu{
  position:absolute;top:130%;inset-inline-end:0;background:#fff;border:1px solid var(--line);
  border-radius:var(--radius-sm);box-shadow:var(--shadow);min-width:190px;padding:8px;
  opacity:0;visibility:hidden;transform:translateY(6px);transition:.18s ease;z-index:50;
}
.has-dd:hover .dd-menu,.has-dd:focus-within .dd-menu{opacity:1;visibility:visible;transform:translateY(0);}
.dd-menu a{display:block;padding:9px 12px;border-radius:8px;font-weight:600;font-size:14px;}
.dd-menu a:hover{background:var(--green-soft);color:var(--green-700);}

.header-actions{display:flex;align-items:center;gap:10px;}
.lang-btn{
  display:flex;align-items:center;gap:4px;font-weight:800;color:var(--green-700);font-size:13px;
  background:var(--green-soft);padding:8px 12px;border-radius:20px;
}
.call-btn{
  background:var(--gold);color:#fff;font-weight:800;font-size:13px;
  padding:10px 16px;border-radius:30px;display:none;align-items:center;gap:6px;white-space:nowrap;
}
.call-btn svg{width:15px;height:15px;}

@media(min-width:981px){
  .main-nav{display:flex;}
  .call-btn{display:flex;}
}

/* ---------- Bottom Nav (mobile app feel) ---------- */
.bottom-nav{
  position:fixed;bottom:0;left:0;right:0;z-index:200;
  background:#fff;border-top:1px solid var(--line);
  display:flex;justify-content:space-around;align-items:center;
  height:var(--bottom-nav-h);
  padding-bottom:var(--safe-bottom);
  box-shadow:0 -4px 20px rgba(18,54,42,.06);
}
@media(min-width:981px){.bottom-nav{display:none;}}
.bottom-nav a, .bottom-nav button{
  display:flex;flex-direction:column;align-items:center;gap:3px;
  font-size:11px;font-weight:700;color:var(--gray);flex:1;padding:6px 0;
}
.bottom-nav a.active, .bottom-nav button.active{color:var(--green-700);}
.bottom-nav svg{width:22px;height:22px;}

/* ============ Side Drawer for Mobile ============ */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(18, 54, 42, .5);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}

.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 82%;
  max-width: 340px;
  background: #ffffff;
  z-index: 301;
  padding: 24px 20px;
  padding-bottom: calc(24px + var(--safe-bottom));
  overflow-y: auto;
  transition: transform .3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 40px rgba(18, 54, 42, .15);
}

/* LTR (English) - يظهر من اليسار */
html[dir="ltr"] .drawer {
  left: 0;
  transform: translateX(-100%);
}

/* RTL (Arabic) - يظهر من اليمين */
html[dir="rtl"] .drawer {
  right: 0;
  transform: translateX(100%);
}

/* عندما يكون مفتوحاً - يعمل مع LTR و RTL */
.drawer.open {
  transform: translateX(0) !important;
}

/* تنسيق محتوى الـ Drawer */
.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.drawer-header h4 {
  color: var(--green-800);
  font-size: 18px;
  font-weight: 800;
  margin: 0;
}

.drawer-close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--green-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  color: var(--green-800);
  border: none;
  cursor: pointer;
}

.drawer-close:hover {
  background: var(--green-800);
  color: #fff;
}

.drawer-close svg {
  width: 22px;
  height: 22px;
}

.drawer-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.drawer-links a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 8px;
  font-weight: 700;
  font-size: 15px;
  border-radius: 10px;
  color: var(--ink);
  transition: all .2s;
  text-decoration: none;
}

.drawer-links a:hover {
  background: var(--green-soft);
  color: var(--green-700);
}

.drawer-links a svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* RTL - عكس اتجاه الأيقونات والنص */
html[dir="rtl"] .drawer-links a {
  flex-direction: row-reverse;
}

.drawer-lang-btn {
  margin-top: 24px !important;
  width: 100% !important;
  justify-content: center !important;
  display: flex !important;
  box-sizing: border-box !important;
  padding: 14px !important;
}

/* تأثير الظهور */
.drawer-enter-active,
.drawer-leave-active {
  transition: transform .3s cubic-bezier(0.4, 0, 0.2, 1);
}

.drawer-enter-from,
.drawer-leave-to {
  transform: translateX(-100%);
}

html[dir="rtl"] .drawer-enter-from,
html[dir="rtl"] .drawer-leave-to {
  transform: translateX(100%);
}

/* ---------- Page hero ---------- */
.page-hero{
  position:relative;padding:56px 0 40px;color:#fff;overflow:hidden;
  background:linear-gradient(120deg, rgba(18,54,42,.92), rgba(30,77,59,.82)), var(--hero-img,none);
  background-size:cover;background-position:center;
}
.page-hero h1{font-size:32px;margin-bottom:10px;}
.page-hero p{font-size:15px;opacity:.9;max-width:640px;}
.gold-rule{width:90px;height:4px;background:var(--gold);border-radius:4px;margin-top:18px;}
@media(min-width:768px){.page-hero{padding:90px 0 60px;}.page-hero h1{font-size:44px;}.page-hero p{font-size:17px;}}

/* ---------- Home hero ---------- */
.home-hero{
  position:relative;color:#fff;padding:64px 0 50px;overflow:hidden;
  background:linear-gradient(120deg, rgba(15,45,34,.88), rgba(30,80,60,.72)),
    url('https://images.unsplash.com/photo-1512453979798-5ea266f8880c?q=80&w=1600&auto=format&fit=crop') center/cover;
}
@media(min-width:768px){.home-hero{padding:120px 0 90px;}}
.badge-pill{
  display:inline-flex;align-items:center;gap:8px;background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.35);color:var(--gold);font-weight:700;font-size:12px;
  padding:8px 16px;border-radius:30px;margin-bottom:20px;backdrop-filter:blur(4px);
}
.home-hero h1{font-family:'Cairo','Inter',serif;font-size:32px;line-height:1.35;max-width:850px;margin-bottom:16px;}
.home-hero .lead{font-size:14.5px;max-width:640px;opacity:.92;line-height:1.9;margin-bottom:26px;}
@media(min-width:768px){.home-hero h1{font-size:56px;}.home-hero .lead{font-size:17px;}}
.tab-row{display:flex;gap:10px;margin-bottom:18px;flex-wrap:wrap;}
.tab-pill{padding:10px 22px;border-radius:30px;font-weight:800;font-size:13px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.4);color:#fff;}
.tab-pill.active{background:var(--gold);color:#fff;border-color:var(--gold);}
.search-bar{background:#fff;border-radius:20px;padding:8px;display:flex;gap:8px;max-width:780px;box-shadow:var(--shadow);flex-wrap:wrap;}
.search-bar input{flex:1;min-width:150px;border:none;outline:none;padding:12px 14px;font-family:inherit;font-size:14px;background:transparent;color:var(--ink);}
.search-bar button{background:var(--green-800);color:#fff;font-weight:800;padding:12px 22px;border-radius:14px;font-size:14px;display:flex;align-items:center;gap:6px;}

/* ---------- Buttons / links ---------- */
.tool-link{color:var(--gold-dark);font-weight:800;font-size:13px;display:inline-flex;align-items:center;gap:6px;}
.btn-gold{background:var(--gold);color:#fff;font-weight:800;padding:13px 24px;border-radius:12px;display:inline-block;text-align:center;}
.btn-outline{border:2px solid var(--green-700);color:var(--green-700);font-weight:800;padding:11px 22px;border-radius:12px;display:inline-block;}
.section{padding:44px 0;}
.section-title{font-size:22px;margin-bottom:8px;color:var(--green-800);}
.section-sub{color:var(--gray);margin-bottom:24px;font-size:13.5px;}
@media(min-width:768px){.section{padding:70px 0;}.section-title{font-size:30px;}.section-sub{font-size:15px;margin-bottom:36px;}}

/* ---------- Grids / Cards ---------- */
.grid{display:grid;gap:16px;}
.grid-2{grid-template-columns:repeat(2,1fr);}
.grid-3{grid-template-columns:repeat(3,1fr);}
.grid-4{grid-template-columns:repeat(4,1fr);}
@media(max-width:980px){.grid-3,.grid-4{grid-template-columns:repeat(2,1fr);}}
@media(max-width:520px){.grid-3,.grid-4{grid-template-columns:1fr;}.grid-2{grid-template-columns:1fr;}}

.card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;transition:.25s ease;box-shadow:0 2px 10px rgba(18,54,42,.04);}
.card:active{transform:scale(.98);}
@media(min-width:768px){.card:hover{transform:translateY(-4px);box-shadow:var(--shadow);}}

.property-card .thumb{position:relative;aspect-ratio:4/3;overflow:hidden;}
.property-card .thumb img{width:100%;height:100%;object-fit:cover;}
.badge{position:absolute;top:12px;inset-inline-start:12px;background:var(--gold);color:#fff;font-weight:800;font-size:11px;padding:5px 12px;border-radius:20px;}
.property-card .info{padding:16px;}
.property-card .price{color:var(--green-700);font-weight:800;font-size:18px;margin-bottom:6px;}
.property-card .title{font-weight:800;font-size:15px;margin-bottom:6px;}
.property-card .loc{color:var(--gray);font-size:13px;display:flex;align-items:center;gap:6px;}

.land-card .info{padding:16px;display:flex;justify-content:space-between;align-items:flex-end;}
.land-card .area{font-weight:700;color:var(--green-700);font-size:13px;}
.land-card .price{color:var(--gold-dark);font-weight:800;font-size:17px;}

.dir-card{padding:20px;text-align:center;}
.dir-card .verified{display:inline-flex;align-items:center;gap:6px;color:var(--green-700);font-weight:700;font-size:12px;background:var(--green-soft);padding:5px 12px;border-radius:20px;margin-bottom:14px;}
.dir-card .icon-box{width:58px;height:58px;border-radius:16px;background:var(--green-800);color:var(--gold);display:flex;align-items:center;justify-content:center;margin:0 auto 14px;}
.dir-card .icon-box svg{width:26px;height:26px;}
.dir-card h4{font-size:16px;margin-bottom:5px;}
.dir-card .sub{color:var(--gold-dark);font-weight:700;font-size:13px;margin-bottom:12px;}
.dir-card .file-link{color:var(--green-700);font-weight:800;font-size:13px;}

.tool-card{padding:24px;}
.tool-card .ico{width:48px;height:48px;border-radius:14px;background:var(--green-soft);color:var(--green-700);display:flex;align-items:center;justify-content:center;margin-bottom:16px;}
.tool-card.featured{background:var(--green-800);color:#fff;}
.tool-card.featured .ico{background:var(--gold);color:#fff;}
.tool-card.featured h4{color:#fff;}
.tool-card.featured p{color:rgba(255,255,255,.8);}
.tool-card.featured .tool-link{color:var(--gold);}
.tool-card h4{font-size:17px;margin-bottom:8px;}
.tool-card p{color:var(--gray);font-size:13.5px;line-height:1.8;margin-bottom:14px;}

.invest-card .thumb{position:relative;aspect-ratio:16/11;overflow:hidden;}
.invest-card .thumb img{width:100%;height:100%;object-fit:cover;}
.invest-card .yield{position:absolute;top:12px;inset-inline-start:12px;background:var(--gold);color:#fff;font-weight:800;font-size:12px;padding:6px 12px;border-radius:20px;}
.invest-card .info{padding:16px;}

.project-card{display:grid;grid-template-columns:1fr;background:#fff;border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow);margin-bottom:20px;}
@media(min-width:768px){.project-card{grid-template-columns:1fr 1fr;}}
.project-card .content{padding:26px;display:flex;flex-direction:column;justify-content:center;}
.project-card .status{display:inline-block;background:var(--green-soft);color:var(--green-700);font-weight:700;font-size:12px;padding:6px 14px;border-radius:20px;margin-bottom:14px;width:fit-content;}
.project-card h3{font-size:20px;color:var(--green-800);margin-bottom:8px;}
.project-card .loc{color:var(--gray);margin-bottom:12px;display:flex;align-items:center;gap:6px;font-size:14px;}
.project-card .units{color:var(--gold-dark);font-weight:800;margin-bottom:16px;font-size:14px;}
.project-card .img{min-height:200px;}
.project-card .img img{width:100%;height:100%;object-fit:cover;}
@media(min-width:768px){.project-card .img{min-height:320px;}}

.stat-strip{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin:-30px auto 30px;position:relative;z-index:5;max-width:1280px;padding:0 20px;}
.stat-box{background:#fff;border-radius:var(--radius);box-shadow:var(--shadow);padding:16px;}
.stat-box .num{font-size:20px;font-weight:800;color:var(--green-800);}
.stat-box .lbl{color:var(--gray);font-size:12px;margin-top:4px;}
@media(min-width:768px){.stat-strip{grid-template-columns:repeat(4,1fr);margin:-56px auto 50px;padding:0 32px;}.stat-box{padding:24px;}.stat-box .num{font-size:26px;}.stat-box .lbl{font-size:14px;}}

/* ---------- Listing layout ---------- */
.listing-wrap{display:flex;flex-direction:column;gap:20px;padding:24px 0;}
@media(min-width:981px){.listing-wrap{display:grid;grid-template-columns:300px 1fr;gap:28px;padding:40px 0;}}
.filters-box{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:20px;height:fit-content;}
@media(min-width:981px){.filters-box{position:sticky;top:80px;}}
.filters-box h3{font-size:16px;margin-bottom:16px;}
.filter-group{margin-bottom:16px;}
.filter-group label{display:block;font-weight:700;font-size:13px;margin-bottom:6px;color:var(--gray);}
.filter-group select{width:100%;padding:11px 12px;border-radius:10px;border:1px solid var(--line);font-family:inherit;font-size:13px;background:#fff;}
.seg-toggle{display:flex;background:var(--green-soft);border-radius:10px;padding:4px;}
.seg-toggle button{flex:1;padding:9px;border-radius:8px;font-weight:700;font-size:12px;color:var(--ink);}
.seg-toggle button.active{background:var(--green-800);color:#fff;}
.listing-results{display:flex;flex-direction:column;gap:18px;}
.listing-grid{display:grid;grid-template-columns:1fr;gap:16px;}
@media(min-width:640px){.listing-grid{grid-template-columns:repeat(2,1fr);}}

.map-box{border-radius:var(--radius);overflow:hidden;background:linear-gradient(135deg,var(--green-700),var(--green-900));height:260px;position:relative;margin-bottom:20px;}
@media(min-width:768px){.map-box{height:420px;}}
.map-pin{position:absolute;width:32px;height:32px;border-radius:50%;background:var(--gold);color:#fff;display:flex;align-items:center;justify-content:center;box-shadow:0 0 0 6px rgba(255,255,255,.15);}
.map-count{position:absolute;bottom:14px;inset-inline-start:14px;background:rgba(255,255,255,.95);color:var(--green-800);font-weight:800;padding:8px 14px;border-radius:14px;font-size:12px;}

/* ---------- Form ---------- */
.form-box{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:22px;}
.form-row{display:grid;grid-template-columns:1fr;gap:14px;margin-bottom:14px;}
@media(min-width:640px){.form-row.two-col{grid-template-columns:1fr 1fr;}}
.form-row input,.form-row textarea{width:100%;padding:13px 14px;border-radius:10px;border:1px solid var(--line);font-family:inherit;font-size:14px;}
.benefit-card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:18px 20px;display:flex;align-items:center;gap:14px;justify-content:space-between;}
.benefit-card .ico2{width:44px;height:44px;border-radius:12px;background:var(--green-800);color:var(--gold);display:flex;align-items:center;justify-content:center;flex-shrink:0;}
.benefit-card b{font-size:14px;}

.alert-success{background:#e7f5ec;color:var(--green-700);border:1px solid #b9dfc7;padding:14px 18px;border-radius:12px;font-weight:700;font-size:14px;margin-bottom:16px;}

/* ---------- Dashboard ---------- */
.dash-title{font-size:22px;margin-bottom:20px;}
.dash-stats{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin-bottom:18px;}
@media(min-width:768px){.dash-stats{grid-template-columns:repeat(4,1fr);gap:18px;}}
.dash-stat{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:16px;}
.dash-stat .val{font-size:22px;font-weight:800;color:var(--green-800);margin-top:6px;}
.dash-stat .lbl{color:var(--gray);font-size:12px;margin-top:2px;}
.dash-panel{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:20px;}
.dash-row{display:flex;justify-content:space-between;align-items:center;padding:12px 0;border-bottom:1px solid var(--line);}
.dash-row:last-child{border-bottom:none;}
.dash-row .price{color:var(--green-700);font-weight:800;font-size:14px;}
.dash-row .item{display:flex;align-items:center;gap:10px;font-weight:700;font-size:14px;}
.dash-row .item img{width:40px;height:40px;border-radius:10px;object-fit:cover;}

/* ---------- Footer ---------- */
.site-footer{background:var(--green-900);color:#fff;padding:40px 0 90px;margin-top:40px;}
@media(min-width:981px){.site-footer{padding:64px 0 26px;}}
.footer-grid{display:grid;grid-template-columns:1fr;gap:28px;margin-bottom:30px;}
@media(min-width:640px){.footer-grid{grid-template-columns:1fr 1fr;}}
@media(min-width:981px){.footer-grid{grid-template-columns:1.3fr 1fr 1fr 1.2fr;}}
.footer-grid h4{color:var(--gold);font-size:15px;margin-bottom:16px;}
.footer-grid p{color:rgba(255,255,255,.75);font-size:13.5px;line-height:1.9;}
.footer-grid ul li{margin-bottom:10px;font-size:13.5px;color:rgba(255,255,255,.85);}
.foot-contact li{display:flex;align-items:center;gap:10px;}
.foot-brand{display:flex;align-items:center;gap:12px;margin-bottom:14px;}
.social-row{display:flex;gap:10px;margin-top:16px;}
.social-row a{width:34px;height:34px;border-radius:10px;background:rgba(255,255,255,.08);display:flex;align-items:center;justify-content:center;}
.cta-mini{background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.15);border-radius:var(--radius-sm);padding:20px;text-align:center;}
.cta-mini .btn-gold{margin-top:12px;width:100%;}
.footer-bottom{border-top:1px solid rgba(255,255,255,.12);padding-top:18px;display:flex;flex-direction:column;gap:8px;color:rgba(255,255,255,.6);font-size:12px;}
@media(min-width:640px){.footer-bottom{flex-direction:row;justify-content:space-between;}}

.icon{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:1.8;}

[x-cloak]{display:none!important;}
