/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --blue: #1a6fc4;
  --blue-dark: #0f4f8f;
  --blue-light: #e8f1fb;
  --white: #ffffff;
  --gray: #f5f7fa;
  --text: #1a1a2e;
  --text-light: #6b7280;
  --whatsapp: #25d366;
  --shadow: 0 4px 24px rgba(26,111,196,0.10);
  --radius: 14px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', 'Cairo', sans-serif;
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
}

/* RTL */
body.rtl {
  direction: rtl;
  font-family: 'Cairo', 'Poppins', sans-serif;
}

/* Language visibility */
body.rtl .en { display: none !important; }
body.rtl .ar { display: inline !important; }
body:not(.rtl) .ar { display: none !important; }
body:not(.rtl) .en { display: inline !important; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed; top: 0; width: 100%; z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 16px rgba(26,111,196,0.08);
  transition: all 0.3s;
}
.navbar.scrolled { box-shadow: 0 4px 24px rgba(26,111,196,0.15); }

.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 70px;
}

.logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.3rem; font-weight: 700; color: var(--blue);
  text-decoration: none;
}
.logo i { font-size: 1.5rem; }

.nav-links {
  display: flex; align-items: center; gap: 32px;
  list-style: none;
}
.nav-links a {
  text-decoration: none; color: var(--text);
  font-weight: 500; font-size: 0.95rem;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--blue); }

.lang-btn {
  background: var(--blue); color: white;
  border: none; border-radius: 20px;
  padding: 6px 16px; cursor: pointer;
  font-size: 0.85rem; font-weight: 600;
  transition: background 0.2s;
}
.lang-btn:hover { background: var(--blue-dark); }

.hamburger { display: none; cursor: pointer; font-size: 1.4rem; color: var(--blue); }

.mobile-menu {
  display: none; list-style: none;
  flex-direction: column; gap: 0;
  background: white; padding: 0;
  border-top: 1px solid var(--blue-light);
}
.mobile-menu.open { display: flex; }
.mobile-menu li a {
  display: block; padding: 14px 24px;
  text-decoration: none; color: var(--text);
  font-weight: 500; border-bottom: 1px solid var(--gray);
}
.mobile-menu li:last-child { padding: 12px 24px; }

/* ===== HERO ===== */
.hero {
  position: relative; height: 100vh; min-height: 600px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.hero-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(15,79,143,0.82) 0%, rgba(26,111,196,0.65) 100%);
}
.hero-content {
  position: relative; z-index: 2;
  text-align: center; color: white; padding: 0 20px;
}
.hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700; margin-bottom: 16px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.hero-content p {
  font-size: clamp(1rem, 2vw, 1.3rem);
  margin-bottom: 32px; opacity: 0.9;
}
.btn-primary {
  display: inline-block;
  background: white; color: var(--blue);
  padding: 14px 36px; border-radius: 50px;
  font-weight: 700; font-size: 1rem;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  transition: all 0.3s;
}
.btn-primary:hover {
  background: var(--blue); color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(26,111,196,0.4);
}

/* ===== STATS ===== */
.stats {
  background: var(--blue);
  padding: 48px 0;
}
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 24px; text-align: center;
}
.stat-item h2 {
  font-size: 2.5rem; font-weight: 700; color: white;
}
.stat-item p {
  color: rgba(255,255,255,0.8); font-size: 0.95rem; margin-top: 4px;
}

/* ===== SECTION TITLE ===== */
.section-title {
  text-align: center; margin-bottom: 48px;
}
.section-title h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700; color: var(--text);
  margin-bottom: 10px;
}
.section-title p { color: var(--text-light); font-size: 1rem; }

/* ===== PROPERTIES ===== */
.properties { padding: 80px 0; background: var(--gray); }

.filter-bar {
  display: flex; justify-content: center; gap: 12px;
  flex-wrap: wrap; margin-bottom: 40px;
}
.filter-btn {
  padding: 8px 24px; border-radius: 50px;
  border: 2px solid var(--blue); background: transparent;
  color: var(--blue); font-weight: 600; cursor: pointer;
  transition: all 0.2s; font-size: 0.9rem;
}
.filter-btn.active, .filter-btn:hover {
  background: var(--blue); color: white;
}

.properties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.property-card {
  background: white; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}
.property-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(26,111,196,0.18);
}
.property-card.hidden { display: none; }

.card-link {
  display: block; text-decoration: none; color: inherit;
}

.card-img { position: relative; overflow: hidden; height: 220px; }
.card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s;
}
.property-card:hover .card-img img { transform: scale(1.06); }

.badge {
  position: absolute; top: 14px; left: 14px;
  background: var(--blue); color: white;
  padding: 4px 14px; border-radius: 20px;
  font-size: 0.8rem; font-weight: 600;
}
body.rtl .badge { left: auto; right: 14px; }

.card-body { padding: 20px; }
.card-body h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }

.location {
  color: var(--text-light); font-size: 0.88rem;
  margin-bottom: 14px; display: flex; align-items: center; gap: 6px;
}
.location i { color: var(--blue); }

.card-features {
  display: flex; gap: 16px;
  color: var(--text-light); font-size: 0.88rem;
  margin-bottom: 16px;
}
.card-features span { display: flex; align-items: center; gap: 5px; }
.card-features i { color: var(--blue); }

.card-footer {
  display: flex; align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--gray); padding-top: 14px;
}
.price { font-size: 1.2rem; font-weight: 700; color: var(--blue); }

.btn-whatsapp {
  background: var(--whatsapp); color: white;
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-whatsapp:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 14px rgba(37,211,102,0.4);
}

/* ===== GALLERY ===== */
.gallery { padding: 80px 0; background: white; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.gallery-item {
  border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 4/3;
}
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s;
}
.gallery-item:hover img { transform: scale(1.07); }

/* ===== CONTACT ===== */
.contact { padding: 80px 0; background: var(--blue-light); }
.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px; margin-top: 16px;
}
.contact-card {
  background: white; border-radius: var(--radius);
  padding: 36px 24px; text-align: center;
  text-decoration: none; color: var(--text);
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 36px rgba(26,111,196,0.15);
}
.contact-card i { font-size: 2.2rem; }
.contact-card.whatsapp i { color: var(--whatsapp); }
.contact-card.phone i { color: var(--blue); }
.contact-card.email i { color: var(--blue-dark); }
.contact-card h3 { font-size: 1.1rem; font-weight: 700; }
.contact-card p { color: var(--text-light); font-size: 0.9rem; }

/* ===== FOOTER ===== */
.footer {
  background: var(--blue-dark); color: white;
  padding: 28px 0;
}
.footer-inner {
  display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
.footer p { font-size: 0.9rem; opacity: 0.85; }
.social-links { display: flex; gap: 16px; }
.social-links a {
  color: white; font-size: 1.3rem;
  transition: opacity 0.2s;
}
.social-links a:hover { opacity: 0.7; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
  .hamburger { display: block; }
}

@media (max-width: 600px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .properties-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
}
