@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --navy: #0D1B3E;
  --gold: #C9A030;
  --gold-light: #E2B96F;
  --white: #FFFFFF;
  --light-gray: #F5F5F5;
  --text-dark: #1A1A2E;
  --text-muted: #6B7280;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Cairo', sans-serif;
  direction: rtl;
  background: var(--white);
  color: var(--text-dark);
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: 'Cairo', sans-serif; border: none; }
input, select { font-family: 'Cairo', sans-serif; }

/* ======================== NAVBAR ======================== */
.navbar {
  position: fixed; top: 0; right: 0; left: 0;
  background: var(--navy);
  z-index: 1000;
  padding: 0 3%;
  height: 72px;
  display: flex; align-items: center; justify-content: space-between;
}

.nav-logo img { height: 50px; }

.nav-links { display: flex; align-items: center; gap: 32px; }

.nav-links a {
  color: var(--white); font-size: 15px; font-weight: 600;
  position: relative; padding: 8px 0; transition: color 0.3s;
}

.nav-links a::after {
  content: ''; position: absolute; bottom: 0; right: 0;
  width: 0; height: 2px; background: var(--gold); transition: width 0.3s;
}

.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a:hover, .nav-links a.active { color: var(--gold); }

.nav-dropdown { position: relative; }

.nav-dropdown .dropdown-menu {
  position: absolute; top: 100%; right: 0;
  background: var(--white); border-radius: 8px;
  min-width: 200px; padding: 8px 0;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  opacity: 0; visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s;
}

.profile-dropdown .dropdown-menu { right: auto; left: 0; }

.nav-dropdown:hover .dropdown-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}

.dropdown-menu a {
  display: block; padding: 10px 20px; color: var(--text-dark) !important;
  font-size: 14px; transition: background 0.2s;
}

.dropdown-menu a:hover { background: var(--light-gray); color: var(--gold) !important; }
.dropdown-menu a::after { display: none; }

.dropdown-arrow { font-size: 10px; margin-right: 4px; }

.nav-actions { display: flex; align-items: center; gap: 12px; }

.nav-icon-btn {
  background: transparent; border: 1px solid rgba(255,255,255,0.2);
  color: var(--white); width: 40px; height: 40px;
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 18px; transition: all 0.3s;
}

.nav-icon-btn:hover { border-color: var(--gold); color: var(--gold); }

.nav-cta {
  background: var(--gold); color: var(--navy);
  padding: 10px 22px; border-radius: 10px;
  font-weight: 700; font-size: 14px;
  display: flex; align-items: center; gap: 6px;
  transition: all 0.3s;
}

.nav-cta:hover { background: var(--gold-light); transform: translateY(-1px); }

/* Mobile menu toggle */
.mobile-toggle {
  display: none; background: transparent; border: none;
  color: var(--white); font-size: 26px; cursor: pointer;
}

/* ======================== HERO ======================== */
.hero {
  min-height: 85vh; position: relative;
  display: flex; align-items: center;
  background: url('assests/hero-bg.jpg') center/cover no-repeat;
  padding-top: 72px;
}

.hero::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 1;
  background: linear-gradient(to left, #0D1B3E 35%, rgba(13, 27, 62, 0.7) 60%, rgba(13, 27, 62, 0.1) 100%);
}

.hero-content {
  position: relative; z-index: 2;
  padding: 0 8% 80px;
  max-width: 700px;
}

.hero-subtitle {
  color: var(--gold); font-size: 18px; font-weight: 600;
  margin-bottom: 16px; letter-spacing: 1px;
}

.hero-title {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800; line-height: 1.25; margin-bottom: 20px;
}

.hero-title .white { color: var(--white); }
.hero-title .gold { color: var(--gold); }

.hero-desc {
  color: rgba(255,255,255,0.8); font-size: 16px;
  line-height: 1.8; margin-bottom: 32px; max-width: 550px;
}

.hero-btns { display: flex; gap: 16px; flex-wrap: wrap; }

.btn-gold {
  background: var(--gold); color: var(--navy);
  padding: 14px 32px; border-radius: 12px;
  font-weight: 700; font-size: 16px; transition: all 0.3s;
}

.btn-gold:hover { background: var(--gold-light); transform: translateY(-2px); }

.btn-outline {
  background: transparent; color: var(--white);
  border: 2px solid rgba(255,255,255,0.4);
  padding: 14px 32px; border-radius: 12px;
  font-weight: 700; font-size: 16px; transition: all 0.3s;
}

.btn-outline:hover { border-color: var(--gold); color: var(--gold); }

/* ======================== SEARCH BAR ======================== */
.search-section {
  position: relative; z-index: 10;
  margin-top: -60px; padding: 0 5%;
  margin-bottom: 60px;
}

.search-card {
  background: var(--white); border-radius: 16px;
  box-shadow: 0 10px 50px rgba(0,0,0,0.12);
  padding: 28px 32px;
  max-width: 1200px; margin: 0 auto;
}

.search-tabs {
  display: flex; gap: 6px; margin-bottom: 24px;
  border-bottom: 1px solid #eee; padding-bottom: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.search-tab {
  padding: 10px 20px; border-radius: 10px;
  background: transparent; color: var(--text-muted);
  font-weight: 600; font-size: 14px;
  display: flex; align-items: center; gap: 8px;
  transition: all 0.3s; border: none;
}

.search-tab.active, .search-tab:hover {
  background: var(--gold); color: var(--navy);
}

.search-tab svg { width: 18px; height: 18px; }

.search-fields {
  display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap;
}

.search-field { flex: 1; min-width: 200px; }

.search-field label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text-dark); margin-bottom: 8px;
}

.search-field .input-wrap {
  display: flex; align-items: center; gap: 8px;
  border: 1.5px solid #E5E7EB; border-radius: 10px;
  padding: 12px 16px; transition: border-color 0.3s;
}

.search-field .input-wrap:focus-within { border-color: var(--gold); }

.search-field .input-wrap svg { color: var(--text-muted); flex-shrink: 0; width: 18px; height: 18px; }

.search-field input, .search-field select {
  border: none; outline: none; background: transparent;
  font-size: 14px; color: var(--text-dark); width: 100%;
  font-family: 'Cairo', sans-serif;
}

.search-field select { cursor: pointer; }

.price-inputs { display: flex; align-items: center; gap: 8px; }
.price-inputs input { width: 50%; }
.price-sep { color: var(--text-muted); font-size: 14px; }

.search-btn {
  background: var(--navy); color: var(--white);
  padding: 14px 28px; border-radius: 10px;
  font-weight: 700; font-size: 14px;
  display: flex; align-items: center; gap: 8px;
  white-space: nowrap; transition: all 0.3s;
  min-width: fit-content;
}

.search-btn:hover { background: #162a56; }

/* ======================== FEATURED PROPERTIES ======================== */
.featured-section { padding: 40px 5% 80px; max-width: 1300px; margin: 0 auto; }

.section-header {
  display: flex; justify-content: space-between;
  align-items: center; margin-bottom: 36px; flex-wrap: wrap; gap: 12px;
}

.section-title { font-size: 28px; font-weight: 800; color: var(--text-dark); }

.section-link {
  color: var(--gold); font-weight: 600; font-size: 15px;
  display: flex; align-items: center; gap: 6px; transition: color 0.3s;
}

.section-link:hover { color: var(--gold-light); }

.properties-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.property-card {
  background: var(--white); border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
  overflow: hidden; transition: all 0.3s;
}

.property-card:hover { transform: translateY(-6px); box-shadow: 0 12px 36px rgba(0,0,0,0.12); }

.property-img { position: relative; height: 220px; overflow: hidden; }
.property-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.property-card:hover .property-img img { transform: scale(1.05); }

.property-badge {
  position: absolute; top: 14px; right: 14px;
  padding: 4px 14px; border-radius: 6px;
  font-size: 12px; font-weight: 700; color: var(--white);
}

.badge-new { background: #3B82F6; }
.badge-featured { background: var(--gold); }

.property-fav {
  position: absolute; top: 14px; left: 14px;
  background: rgba(255,255,255,0.85); width: 36px; height: 36px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 16px; transition: all 0.3s; border: none; cursor: pointer;
}

.property-fav:hover { color: #EF4444; background: var(--white); }

.property-info { padding: 18px; }

.property-name { font-size: 16px; font-weight: 700; margin-bottom: 6px; color: var(--text-dark); }

.property-location {
  font-size: 13px; color: var(--text-muted);
  display: flex; align-items: center; gap: 4px; margin-bottom: 12px;
}

.property-specs {
  display: flex; gap: 12px; flex-wrap: wrap;
  padding: 12px 0; border-top: 1px solid #f0f0f0;
  margin-bottom: 12px;
}

.property-spec {
  display: flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--text-muted);
}

.property-spec svg { width: 14px; height: 14px; color: var(--gold); }

.property-price { font-size: 18px; font-weight: 800; color: var(--gold); }

/* ======================== WHY CHOOSE US ======================== */
.why-section {
  background: var(--light-gray); padding: 80px 5%;
}

.why-inner { max-width: 1200px; margin: 0 auto; text-align: center; }

.why-label {
  font-size: 14px; color: var(--gold); font-weight: 600;
  margin-bottom: 8px;
}

.why-title {
  font-size: 32px; font-weight: 800; color: var(--text-dark); margin-bottom: 48px;
}

.why-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px;
}

.why-card { text-align: center; padding: 24px; }

.why-icon {
  width: 72px; height: 72px; border-radius: 16px;
  background: rgba(201,160,48,0.1);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px; font-size: 32px; color: var(--gold);
}

.why-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; color: var(--text-dark); }
.why-card p { font-size: 14px; color: var(--text-muted); line-height: 1.7; }

/* ======================== STATS ======================== */
.stats-section {
  background: var(--white); padding: 60px 5%;
}

.stats-inner {
  max-width: 1100px; margin: 0 auto;
  background: var(--navy);
  border-radius: 16px;
  padding: 32px 48px;
  display: flex; justify-content: space-between; align-items: center;
}

.stat-item {
  display: flex; align-items: center; gap: 16px;
  text-align: right; flex-direction: row-reverse;
}

.stat-icon {
  font-size: 32px; color: var(--gold);
  display: flex; align-items: center; justify-content: center;
}

.stat-text {
  display: flex; flex-direction: column;
}

.stat-number { font-size: 36px; font-weight: 800; color: var(--white); line-height: 1.1; }
.stat-label { font-size: 14px; color: var(--gold); font-weight: 600; margin-top: 4px; }

.stat-divider {
  width: 1px; height: 60px;
  background-color: rgba(201, 160, 48, 0.3);
}

/* ======================== CTA ROW ======================== */
.cta-section { padding: 80px 5%; max-width: 1300px; margin: 0 auto; }

.cta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }

.cta-newsletter {
  background: var(--navy); border-radius: 16px;
  padding: 40px 32px; color: var(--white);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}

.cta-newsletter > .material-icons {
  font-size: 56px !important; color: #C9A030 !important; margin-bottom: 20px !important;
}

.cta-newsletter h3 { font-size: 24px; font-weight: 700; margin-bottom: 12px; text-align: center; }
.cta-newsletter p { font-size: 14px; color: rgba(255,255,255,0.7); margin-bottom: 24px; line-height: 1.7; text-align: center; }

.newsletter-form { display: flex; gap: 12px; width: 100%; }

.newsletter-form input {
  flex: 1; padding: 14px 18px; border-radius: 10px;
  border: 1.5px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08); color: var(--white);
  font-size: 14px; outline: none; font-family: 'Cairo', sans-serif;
}

.newsletter-form input::placeholder { color: rgba(255,255,255,0.4); }
.newsletter-form input:focus { border-color: var(--gold); }

.newsletter-form button {
  background: var(--gold); color: var(--navy);
  padding: 14px 24px; border-radius: 10px;
  font-weight: 700; font-size: 14px;
  white-space: nowrap; transition: all 0.3s;
}

.newsletter-form button:hover { background: var(--gold-light); }

.cta-map {
  border-radius: 16px; position: relative; overflow: hidden;
  min-height: 220px; display: flex; align-items: center; justify-content: flex-start;
  background-image: url('assests/map-preview.jpg'); background-size: cover; background-position: center;
}

.cta-map-content {
  position: absolute; right: 0; left: auto; z-index: 2; padding: 40px 36px; text-align: right; max-width: 55%;
  display: flex; flex-direction: column; align-items: flex-start; /* flex-start in RTL is right */
}

.cta-map-content h3 { font-size: 22px; font-weight: bold; margin-bottom: 10px; color: var(--navy); }
.cta-map-content p { font-size: 14px; color: #444; margin-bottom: 20px; line-height: 1.7; }

.cta-map-content .btn-gold { 
  display: flex; justify-content: center; align-items: center; 
  width: 100%; font-size: 14px; padding: 14px 24px; 
}

.cta-map-bg { display: none; }

/* ======================== FOOTER ======================== */
.footer { background: var(--navy); padding: 60px 5% 0; color: rgba(255,255,255,0.7); }

.footer-inner {
  max-width: 1300px; margin: 0 auto;
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 36px; padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand img { height: 48px; margin-bottom: 12px; }
.footer-brand p { font-size: 13px; line-height: 1.7; margin-bottom: 16px; }

.footer-socials { display: flex; gap: 10px; }

.social-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 15px;
  transition: border-color 0.3s, color 0.3s;
}

.social-icon:hover {
  border-color: #C9A030;
  color: #C9A030;
}

.footer-col h4 {
  color: var(--white); font-size: 16px; font-weight: 700;
  margin-bottom: 20px;
}

.footer-col ul li { margin-bottom: 10px; }

.footer-col ul a {
  font-size: 14px; color: rgba(255,255,255,0.6);
  transition: color 0.3s;
}

.footer-col ul a:hover { color: var(--gold); }

.footer-contact li {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px; font-size: 14px;
}

.footer-contact li svg { color: var(--gold); flex-shrink: 0; width: 18px; height: 18px; }

.footer-bottom {
  max-width: 1300px; margin: 0 auto;
  padding: 20px 0; text-align: center;
  font-size: 13px; color: rgba(255,255,255,0.4);
}

/* ======================== RESPONSIVE ======================== */
@media (max-width: 1100px) {
  .properties-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: repeat(3, 1fr); }
  .stats-inner { flex-wrap: wrap; justify-content: center; gap: 32px; padding: 32px; }
  .stat-divider { display: none; }
}

@media (max-width: 768px) {
  .navbar { padding: 11px 4%; height: auto; flex-wrap: wrap; }
  .nav-logo { order: 1; }
  .mobile-toggle { order: 2; display: block; }
  .nav-links { order: 3; display: none; width: 100%; }
  .nav-actions { order: 4; display: none; width: 100%; }

  .nav-links.active {
    display: flex; flex-direction: column; padding: 20px 0 10px; gap: 16px;
    border-top: 1px solid rgba(255,255,255,0.1); margin-top: 11px;
  }
  .nav-actions.active {
    display: flex; justify-content: center; padding: 10px 0 20px;
  }

  .hero-content { padding: 0 5% 60px; }
  .hero-title { font-size: 32px; }

  .search-fields { flex-direction: column; }
  .search-field { min-width: 100%; }

  .properties-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  
  .stats-inner { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; padding: 24px; }
  .stat-divider { display: none; }
  .stat-item { justify-content: center; }
  
  .cta-grid { grid-template-columns: 1fr; }
  
  .cta-map {
    position: relative !important;
    display: block !important;
    background-image: url('assests/map-preview.jpg') !important;
    background-size: cover !important;
    background-position: left center !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    padding: 0 !important;
    min-height: 220px !important;
  }
  .cta-map::after {
    content: '' !important;
    display: block !important;
    position: absolute !important;
    inset: 0 !important;
    background: linear-gradient(to left, rgba(255,255,255,0.97) 40%, rgba(255,255,255,0.6) 65%, rgba(255,255,255,0) 100%) !important;
    z-index: 1 !important;
  }
  .cta-map-bg {
    display: none !important;
  }
  .cta-map-content {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    width: 58% !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    padding: 20px 16px !important;
    text-align: right !important;
    z-index: 2 !important;
  }
  .cta-map-content h3 {
    color: #0D1B3E !important;
    font-size: 16px !important;
    margin-bottom: 8px !important;
    line-height: 1.4 !important;
  }
  .cta-map-content p {
    color: #333 !important;
    font-size: 12px !important;
    line-height: 1.6 !important;
    margin-bottom: 14px !important;
  }
  .cta-map-content .btn-gold {
    width: 100% !important;
    text-align: center !important;
    font-size: 13px !important;
    padding: 10px 12px !important;
  }
  
  .newsletter-form { flex-direction: column; }
  
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .why-grid { grid-template-columns: 1fr; }
  .stats-inner { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero-btns { flex-direction: column; }
  .search-tabs { gap: 4px; }
  .search-tab { padding: 8px 12px; font-size: 12px; }
}

/* ======================== TEMPDATA ALERT BAR ======================== */
.alert-bar {
  position: fixed;
  top: 80px;
  right: 50%;
  transform: translateX(50%);
  z-index: 1100;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Cairo', sans-serif;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  animation: alertSlide 0.3s ease-out;
}
.alert-success { background: #DCFCE7; color: #166534; border: 1px solid #86EFAC; }
.alert-error { background: #FEE2E2; color: #B91C1C; border: 1px solid #FCA5A5; }
@keyframes alertSlide {
  from { opacity: 0; transform: translate(50%, -20px); }
  to { opacity: 1; transform: translate(50%, 0); }
}
