/* ===== DESIGN SYSTEM ===== */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&family=Tajawal:wght@300;400;500;700;800&display=swap');

:root {
  --navy-950: #050d1a;
  --navy-900: #0A1628;
  --navy-800: #0f1f3d;
  --navy-700: #162847;
  --navy-600: #1e3a5f;
  --navy-500: #274d7a;
  --gold-400: #F0C040;
  --gold-500: #C9A227;
  --gold-600: #a0821f;
  --emerald: #10B981;
  --indigo: #6366F1;
  --amber: #F59E0B;
  --rose: #F43F5E;
  --text-primary: #F0F4FF;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(201,162,39,0.4);
  --glass-bg: rgba(15,31,61,0.7);
  --glass-bg-hover: rgba(22,40,71,0.85);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.5);
  --shadow-gold: 0 8px 32px rgba(201,162,39,0.25);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  --font-heading: 'Cairo', sans-serif;
  --font-body: 'Tajawal', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--navy-900);
  color: var(--text-primary);
  direction: rtl;
  text-align: right;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

h1,h2,h3,h4,h5,h6 { font-family: var(--font-heading); line-height: 1.3; }
a { color: inherit; text-decoration: none; transition: var(--transition); }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: var(--font-body); }
select, input, textarea { font-family: var(--font-body); direction: rtl; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-md);
  font-weight: 600; font-size: 0.95rem; font-family: var(--font-heading);
  transition: var(--transition); cursor: pointer; border: none;
  white-space: nowrap; text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
  color: var(--navy-900);
  box-shadow: var(--shadow-gold);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(201,162,39,0.4); background: linear-gradient(135deg, var(--gold-400), #FFD060); }
.btn-outline { background: transparent; border: 1.5px solid var(--border-hover); color: var(--gold-400); }
.btn-outline:hover { background: rgba(201,162,39,0.1); border-color: var(--gold-400); transform: translateY(-2px); }
.btn-ghost { background: rgba(255,255,255,0.07); color: var(--text-primary); border: 1.5px solid var(--border); }
.btn-ghost:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.2); }
.btn-danger { background: linear-gradient(135deg,#F43F5E,#e11d48); color: #fff; }
.btn-danger:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(244,63,94,0.35); }
.btn-success { background: linear-gradient(135deg,#10B981,#059669); color: #fff; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 16px 32px; font-size: 1.05rem; border-radius: var(--radius-lg); }

/* ===== GLASS CARD ===== */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: var(--transition);
}
.glass-card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-gold); }

/* ===== BADGES ===== */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; border-radius: 50px; font-size: 0.78rem; font-weight: 700; }
.badge-gold { background: rgba(201,162,39,0.15); color: var(--gold-400); border: 1px solid rgba(201,162,39,0.3); }
.badge-emerald { background: rgba(16,185,129,0.15); color: var(--emerald); border: 1px solid rgba(16,185,129,0.3); }
.badge-indigo { background: rgba(99,102,241,0.15); color: var(--indigo); border: 1px solid rgba(99,102,241,0.3); }
.badge-rose { background: rgba(244,63,94,0.15); color: var(--rose); border: 1px solid rgba(244,63,94,0.3); }

/* ===== SECTION HEADERS ===== */
.section-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 48px; gap: 16px; flex-wrap: wrap; }
.section-badge { display: inline-block; padding: 6px 16px; background: rgba(201,162,39,0.12); border: 1px solid rgba(201,162,39,0.3); border-radius: 50px; color: var(--gold-400); font-size: 0.82rem; font-weight: 700; margin-bottom: 12px; }
.section-title { font-size: clamp(1.6rem,3vw,2.2rem); font-weight: 800; color: var(--text-primary); }
.section-subtitle { color: var(--text-secondary); margin-top: 8px; font-size: 1rem; }
.text-gradient { background: linear-gradient(135deg, var(--gold-500), var(--gold-400), #FFD700); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; font-size: 0.9rem; }
.form-control {
  width: 100%; padding: 12px 16px;
  background: rgba(255,255,255,0.05); border: 1.5px solid var(--border);
  border-radius: var(--radius-md); color: var(--text-primary);
  font-size: 0.95rem; transition: var(--transition); outline: none;
}
.form-control:focus { border-color: var(--gold-500); background: rgba(201,162,39,0.05); box-shadow: 0 0 0 3px rgba(201,162,39,0.12); }
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 120px; }
select.form-control { cursor: pointer; }

/* ===== GRID ===== */
.properties-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 0; transition: var(--transition);
}
.navbar.scrolled { background: rgba(10,22,40,0.95); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-md); }
.nav-container { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.nav-logo { display: flex; align-items: center; gap: 10px; }
.logo-icon { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: rgba(201,162,39,0.1); border-radius: 10px; border: 1px solid rgba(201,162,39,0.3); }
.logo-text { font-family: var(--font-heading); font-size: 1.3rem; font-weight: 800; color: var(--text-primary); }
.logo-accent { color: var(--gold-400); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link { padding: 8px 16px; border-radius: var(--radius-sm); color: var(--text-secondary); font-weight: 600; font-size: 0.9rem; transition: var(--transition); }
.nav-link:hover, .nav-link.active { color: var(--gold-400); background: rgba(201,162,39,0.1); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px; border-radius: 8px; border: 1px solid var(--border); }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: var(--transition); }

/* ===== FOOTER ===== */
.footer { background: var(--navy-950); border-top: 1px solid var(--border); padding: 60px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-brand { display: flex; flex-direction: column; gap: 16px; }
.footer-desc { color: var(--text-muted); font-size: 0.9rem; line-height: 1.8; }
.footer-social { display: flex; gap: 10px; }
.social-btn { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.06); border: 1px solid var(--border); border-radius: 9px; color: var(--text-secondary); transition: var(--transition); }
.social-btn:hover { background: rgba(201,162,39,0.15); border-color: var(--gold-500); color: var(--gold-400); }
.footer-links-group h4 { font-weight: 700; color: var(--text-primary); margin-bottom: 16px; font-size: 0.95rem; }
.footer-links-group ul { display: flex; flex-direction: column; gap: 10px; }
.footer-links-group a { color: var(--text-muted); font-size: 0.9rem; }
.footer-links-group a:hover { color: var(--gold-400); }
.footer-bottom { border-top: 1px solid var(--border); padding: 20px 0; display: flex; justify-content: space-between; align-items: center; }
.footer-bottom p { color: var(--text-muted); font-size: 0.85rem; }
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { color: var(--text-muted); font-size: 0.85rem; }
.footer-bottom-links a:hover { color: var(--gold-400); }

/* ===== PAGE HEADER ===== */
.page-header { padding: 120px 0 60px; background: linear-gradient(180deg, var(--navy-800) 0%, var(--navy-900) 100%); border-bottom: 1px solid var(--border); }
.page-header h1 { font-size: clamp(1.8rem,3vw,2.5rem); font-weight: 800; }
.page-header p { color: var(--text-secondary); margin-top: 8px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; color: var(--text-muted); font-size: 0.85rem; }
.breadcrumb a { color: var(--gold-400); }
.breadcrumb span { color: var(--text-muted); }

/* ===== TOASTS ===== */
#toast-container { position: fixed; bottom: 24px; left: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 12px; }
.toast { padding: 14px 20px; border-radius: var(--radius-md); font-weight: 600; font-size: 0.9rem; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px; animation: slideInLeft 0.3s ease; backdrop-filter: blur(10px); min-width: 260px; }
.toast-success { background: rgba(16,185,129,0.9); color: #fff; }
.toast-error { background: rgba(244,63,94,0.9); color: #fff; }
.toast-info { background: rgba(99,102,241,0.9); color: #fff; }

/* ===== MODAL ===== */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(8px); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 24px; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal { background: var(--navy-800); border: 1px solid var(--border); border-radius: var(--radius-xl); width: 100%; max-width: 600px; max-height: 90vh; overflow-y: auto; transform: translateY(20px) scale(0.97); transition: transform 0.3s ease; }
.modal-overlay.active .modal { transform: translateY(0) scale(1); }
.modal-header { padding: 24px 28px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { font-size: 1.2rem; font-weight: 700; }
.modal-close { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: rgba(255,255,255,0.07); color: var(--text-secondary); transition: var(--transition); }
.modal-close:hover { background: rgba(244,63,94,0.2); color: var(--rose); }
.modal-body { padding: 28px; }
.modal-footer { padding: 20px 28px; border-top: 1px solid var(--border); display: flex; gap: 12px; justify-content: flex-end; }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 80px 24px; color: var(--text-muted); }
.empty-state svg { margin: 0 auto 20px; opacity: 0.4; }
.empty-state h3 { font-size: 1.2rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }

/* ===== RESPONSIVE ===== */
@media(max-width:1024px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media(max-width:768px) {
  .nav-links { display: none; position: fixed; top: 70px; right: 0; left: 0; background: var(--navy-900); border-bottom: 1px solid var(--border); flex-direction: column; padding: 16px; gap: 4px; }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .section { padding: 60px 0; }
  .container { padding: 0 16px; }
}
