/* ===== BASE ===== */
:root {
  --gold: #9A7A2E;
  --gold-light: #C4A14A;
  --gold-bg: #f9f6ef;
  --gold-accent: #fdf8ed;
  --bg: #f8f7f3;
  --surface: #ffffff;
  --surface2: #f4f2ec;
  --border: #e2ddd3;
  --text: #1e1a12;
  --text-muted: #7a7568;
  --text-faint: #b5b0a8;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;
  --shadow: 0 2px 12px rgba(0,0,0,0.07);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --transition: 180ms cubic-bezier(0.16,1,0.3,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-font-smoothing: antialiased; }
body {
  font-family: 'Tajawal', system-ui, sans-serif;
  direction: rtl;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.6rem 1.4rem; border-radius: var(--radius-sm); font-size: 0.9rem;
  font-weight: 600; font-family: inherit; cursor: pointer; transition: var(--transition);
  white-space: nowrap; border: 2px solid transparent;
}
.btn-primary { background: var(--gold); color: #fff; }
.btn-primary:hover { background: var(--gold-light); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }
.btn-outline-light { background: rgba(255,255,255,0.15); color: #fff; border-color: rgba(255,255,255,0.3); backdrop-filter: blur(4px); }
.btn-outline-light:hover { background: rgba(255,255,255,0.25); }
.btn-lg { padding: 0.8rem 2rem; font-size: 1rem; border-radius: var(--radius); }
.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.8rem; }
.btn-block { width: 100%; }

/* ===== NAV ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(248,247,243,0.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 1.5rem;
  height: 64px; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; gap: 0.6rem; font-size: 1.1rem; font-weight: 700; }
.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-link { font-size: 0.9rem; color: var(--text-muted); transition: var(--transition); }
.nav-link:hover { color: var(--gold); }
.nav-cta { font-size: 0.85rem; }
.nav-hamburger { display: none; flex-direction: column; gap: 5px; padding: 4px; }
.nav-hamburger span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--transition); }
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
  .nav-hamburger { display: flex; }
  .nav-links { 
    display: none; position: absolute; top: 64px; right: 0; left: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: flex-start; gap: 0; padding: 0.5rem 0;
  }
  .nav-links.open { display: flex; }
  .nav-link { padding: 0.75rem 1.5rem; width: 100%; border-bottom: 1px solid var(--border); }
  .nav-cta { margin: 0.75rem 1.5rem; }
}

/* ===== HERO ===== */
.hero {
  position: relative; height: 100vh; min-height: 600px;
  display: flex; align-items: center; overflow: hidden;
}
.hero-carousel {
  position: absolute; inset: 0; z-index: 0;
}
.hero-slide {
  position: absolute; inset: 0;
  transition: opacity 0.9s ease;
}
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-no-image {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #2a1d06 0%, #1a1208 40%, #3d2a08 100%);
}
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to bottom, rgba(10,7,2,0.5) 0%, rgba(10,7,2,0.3) 50%, rgba(10,7,2,0.75) 100%);
}
.hero-content {
  position: relative; z-index: 2;
  max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; width: 100%;
  padding-top: 64px;
}
.hero-location { display: flex; align-items: center; gap: 0.35rem; color: rgba(255,255,255,0.7); font-size: 0.9rem; margin-bottom: 1rem; }
.hero-title { font-size: clamp(2.8rem, 7vw, 6rem); font-weight: 900; color: #fff; line-height: 1.1; margin-bottom: 0.75rem; }
.hero-tagline { font-size: clamp(1.1rem, 2.5vw, 1.6rem); color: rgba(255,255,255,0.9); font-weight: 500; margin-bottom: 0.75rem; }
.hero-desc { font-size: 1rem; color: rgba(255,255,255,0.7); max-width: 520px; margin-bottom: 2rem; }
.hero-btns { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero-dots {
  position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%); z-index: 3;
  display: flex; gap: 0.5rem;
}
.hero-dot {
  width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.4);
  border: none; cursor: pointer; transition: all 0.3s;
}
.hero-dot.active { width: 24px; border-radius: 4px; background: #fff; }
.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 40px; height: 40px; border-radius: 50%; background: rgba(0,0,0,0.3);
  color: #fff; font-size: 1.5rem; display: flex; align-items: center; justify-content: center;
  transition: var(--transition); display: none;
}
.hero-arrow:hover { background: rgba(0,0,0,0.55); }
.hero-arrow-prev { right: 1rem; }
.hero-arrow-next { left: 1rem; }

/* ===== SECTIONS ===== */
.section { padding: clamp(4rem, 8vw, 6rem) 0; }
.section-alt { background: var(--surface2); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section-header { margin-bottom: 3rem; }
.section-label { display: block; font-size: 0.8rem; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.5rem; }
.section-title { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; color: var(--text); }
.section-sub { font-size: 1rem; color: var(--text-muted); margin-top: 0.75rem; max-width: 560px; }

/* ===== UNITS GRID ===== */
.units-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem;
}
.unit-card {
  background: var(--surface); border-radius: var(--radius-lg); border: 1px solid var(--border);
  overflow: hidden; cursor: pointer; transition: var(--transition);
  box-shadow: var(--shadow);
}
.unit-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.unit-card-imgs { position: relative; height: 200px; overflow: hidden; background: var(--surface2); }
.unit-card-imgs img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.unit-card:hover .unit-card-imgs img { transform: scale(1.04); }
.unit-card-no-img { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--text-faint); font-size: 2.5rem; }
.unit-card-body { padding: 1.25rem; }
.unit-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.75rem; }
.unit-card-title { font-size: 1.05rem; font-weight: 700; color: var(--text); line-height: 1.3; }
.unit-card-type { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.15rem; }
.unit-card-specs { display: flex; align-items: center; gap: 1rem; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.75rem; flex-wrap: wrap; }
.spec-item { display: flex; align-items: center; gap: 0.3rem; }
.unit-card-price { padding-top: 0.75rem; border-top: 1px solid var(--border); font-size: 1.05rem; font-weight: 700; color: var(--gold); }

/* ===== BADGE ===== */
.badge {
  display: inline-block; font-size: 0.72rem; font-weight: 700; padding: 0.2rem 0.6rem;
  border-radius: 20px; white-space: nowrap;
}
.badge-available { background: #d4f0d4; color: #2d6a2d; }
.badge-reserved { background: #fef3cd; color: #7a5c10; }
.badge-sold { background: #fde8e8; color: #8b2020; }

/* ===== AMENITIES ===== */
.amenities-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1rem;
}
.amenity-card {
  background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border);
  padding: 1.25rem 1rem; text-align: center; transition: var(--transition);
}
.amenity-card:hover { border-color: var(--gold); }
.amenity-icon { font-size: 1.8rem; margin-bottom: 0.5rem; }
.amenity-title { font-size: 0.85rem; font-weight: 600; color: var(--text); line-height: 1.3; }

/* ===== CONTACT ===== */
.contact-container { text-align: center; }
.contact-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-top: 2rem; }
.contact-card {
  display: flex; align-items: center; gap: 1rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.25rem 1.75rem; min-width: 220px; transition: var(--transition);
  text-decoration: none; color: var(--text);
}
.contact-card:hover { border-color: var(--gold); box-shadow: var(--shadow); }
.contact-icon {
  width: 44px; height: 44px; border-radius: 50%; background: var(--gold-accent);
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0;
  transition: var(--transition);
}
.contact-card:hover .contact-icon { background: var(--gold); }
.contact-label { font-size: 0.75rem; color: var(--text-muted); }
.contact-value { font-size: 1rem; font-weight: 700; direction: ltr; }

/* ===== FOOTER ===== */
.footer { border-top: 1px solid var(--border); padding: 2rem 1.5rem; background: var(--surface); }
.footer-inner { max-width: 1200px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.footer-logo { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1rem; }
.footer-note { font-size: 0.85rem; color: var(--text-muted); }
.footer-credit { font-size: 0.75rem; color: var(--text-faint); transition: var(--transition); }
.footer-credit:hover { color: var(--gold); }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.55); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center; padding: 1rem;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--surface); border-radius: var(--radius-lg); width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg);
}
.modal-head {
  padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-head h3 { font-size: 1.1rem; font-weight: 700; }
.modal-close { font-size: 1.1rem; color: var(--text-muted); padding: 0.25rem; transition: var(--transition); }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 1.5rem; }
.modal-images { position: relative; height: 220px; overflow: hidden; background: var(--surface2); }
.modal-images img { width: 100%; height: 100%; object-fit: cover; }
.modal-images-nav {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between;
  padding: 0 0.75rem;
}
.modal-nav-btn {
  width: 32px; height: 32px; background: rgba(0,0,0,0.4); color: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 1rem; transition: var(--transition);
}
.modal-nav-btn:hover { background: rgba(0,0,0,0.6); }
.modal-header-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.modal-header-right { display: flex; align-items: center; gap: 0.5rem; }
.modal-title { font-size: 1.2rem; font-weight: 700; }
.modal-type { font-size: 0.85rem; color: var(--text-muted); }
.modal-specs { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.modal-spec { background: var(--surface2); border-radius: var(--radius-sm); padding: 0.6rem 1rem; text-align: center; min-width: 80px; }
.modal-spec-icon { font-size: 1.1rem; margin-bottom: 0.2rem; }
.modal-spec-label { font-size: 0.7rem; color: var(--text-muted); }
.modal-spec-val { font-size: 0.95rem; font-weight: 700; }
.modal-desc { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1rem; line-height: 1.7; }
.modal-features { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.modal-feature-tag { background: var(--gold-accent); color: var(--gold); font-size: 0.8rem; padding: 0.25rem 0.75rem; border-radius: 20px; font-weight: 600; }
.modal-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 1rem; border-top: 1px solid var(--border); }
.modal-price { font-size: 1.2rem; font-weight: 800; color: var(--gold); }
.modal-foot { padding: 1rem 1.5rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 0.75rem; }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 3rem; color: var(--text-muted); font-size: 0.95rem; background: var(--surface); border-radius: var(--radius-lg); border: 1px dashed var(--border); }

/* ===== INPUT ===== */
.input {
  width: 100%; padding: 0.65rem 0.9rem; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-family: inherit; font-size: 0.95rem;
  color: var(--text); background: var(--surface); transition: var(--transition);
  outline: none;
}
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(154,122,46,0.12); }
.textarea { resize: vertical; min-height: 80px; }

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%) translateY(100px);
  background: var(--text); color: #fff; padding: 0.75rem 1.5rem; border-radius: var(--radius);
  font-size: 0.9rem; z-index: 9999; transition: transform 0.3s ease; white-space: nowrap;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { background: #2d6a2d; }
.toast.error { background: #8b2020; }

/* ===== PROJECTS ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.project-card-img {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--surface2);
}

.project-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.project-card:hover .project-card-img img {
  transform: scale(1.05);
}

.project-card-no-img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--text-muted);
}

.project-card-body {
  padding: 1.25rem;
}

.project-card-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.project-card-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.project-card-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}
