/* =====================================================
   Real Estate - Public Site Styles
   Luxury navy + gold theme with full RTL support
   ===================================================== */

:root {
  --primary: #0f2942;
  --primary-dark: #0a1f33;
  --primary-light: #1a3a5c;
  --accent: #c9a961;
  --accent-dark: #a8884a;
  --accent-light: #e3c98a;
  --text-dark: #1a1a1a;
  --text-body: #4a4a4a;
  --text-muted: #888;
  --bg-light: #f8f9fb;
  --bg-section: #f3f5f8;
  --white: #ffffff;
  --border: #e5e7eb;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --transition: all 0.3s ease;
}

* { box-sizing: border-box; }
body {
  font-family: 'Tajawal', 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-body);
  background: var(--white);
  line-height: 1.7;
  margin: 0;
  font-size: 15px;
}
[dir="ltr"] body { font-family: 'Poppins', 'Tajawal', sans-serif; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent); }
h1,h2,h3,h4,h5,h6 { color: var(--text-dark); font-weight: 700; line-height: 1.3; }
img { max-width: 100%; height: auto; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Top bar */
.topbar { background: var(--primary-dark); color: rgba(255,255,255,0.85); padding: 8px 0; font-size: 13px; }
.topbar a { color: rgba(255,255,255,0.85); }
.topbar a:hover { color: var(--accent); }
.topbar .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.topbar-left, .topbar-right { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.topbar-right { gap: 12px; }
.lang-switch { background: rgba(255,255,255,0.1); padding: 4px 12px; border-radius: var(--radius-sm); }
.lang-switch:hover { background: var(--accent); color: var(--primary-dark); }

/* Navbar */
.navbar-main { background: var(--white); box-shadow: var(--shadow-sm); padding: 18px 0; position: sticky; top: 0; z-index: 1000; }
.navbar-main .container { display: flex; justify-content: space-between; align-items: center; }
.brand { font-size: 24px; font-weight: 800; color: var(--primary); display: flex; align-items: center; gap: 8px; }
.brand-accent { color: var(--accent); }
.nav-menu { display: flex; list-style: none; gap: 28px; margin: 0; padding: 0; align-items: center; }
.nav-menu a { color: var(--text-dark); font-weight: 500; font-size: 15px; position: relative; padding: 8px 0; }
.nav-menu a:hover, .nav-menu a.active { color: var(--accent); }
.nav-menu a.active::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background: var(--accent); }
.nav-actions { display: flex; gap: 12px; align-items: center; }
.mobile-toggle { display: none; background: none; border: none; font-size: 24px; cursor: pointer; color: var(--primary); }

@media (max-width: 991px) {
  .mobile-toggle { display: block; }
  .nav-menu { position: absolute; top: 100%; left: 0; right: 0; background: var(--white); flex-direction: column; padding: 20px; box-shadow: var(--shadow); display: none; gap: 10px; }
  .nav-menu.active { display: flex; }
  .nav-menu a { width: 100%; padding: 10px 0; border-bottom: 1px solid var(--border); }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 24px; border-radius: var(--radius-sm); font-weight: 600; font-size: 14px; cursor: pointer; border: 2px solid transparent; transition: var(--transition); text-decoration: none; white-space: nowrap; }
.btn-primary { background: var(--primary); color: var(--white); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); color: var(--white); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-accent { background: var(--accent); color: var(--primary-dark); border-color: var(--accent); }
.btn-accent:hover { background: var(--accent-dark); color: var(--white); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: var(--white); }
.btn-whatsapp { background: #25d366; color: var(--white); border-color: #25d366; }
.btn-whatsapp:hover { background: #1da851; color: var(--white); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-danger { background: var(--danger); color: var(--white); border-color: var(--danger); }

/* Hero */
.hero { position: relative; min-height: 600px; background: linear-gradient(135deg, rgba(15,41,66,0.85), rgba(15,41,66,0.6)), url('https://images.unsplash.com/photo-1564013799919-ab600027ffc6?auto=format&fit=crop&w=1600') center/cover; color: var(--white); display: flex; align-items: center; padding: 80px 0; }
.hero-content { max-width: 760px; }
.hero h1 { color: var(--white); font-size: clamp(32px, 5vw, 56px); margin: 0 0 20px; font-weight: 800; }
.hero p { font-size: clamp(15px, 1.6vw, 20px); margin: 0 0 32px; color: rgba(255,255,255,0.92); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.search-box { background: var(--white); padding: 28px; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); margin-top: 40px; }
.search-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; align-items: end; }
.search-row .form-group { margin-bottom: 0; }

/* Sections */
.section { padding: 80px 0; }
.section-light { background: var(--bg-section); }
.section-dark { background: var(--primary); color: var(--white); }
.section-dark h1, .section-dark h2, .section-dark h3 { color: var(--white); }
.section-title { text-align: center; margin-bottom: 50px; }
.section-title .eyebrow { display: inline-block; color: var(--accent); font-weight: 600; font-size: 14px; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 12px; }
.section-title h2 { font-size: clamp(28px, 4vw, 40px); margin: 0 0 14px; }
.section-title p { color: var(--text-muted); max-width: 640px; margin: 0 auto; font-size: 16px; }

/* Property cards */
.properties-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 30px; }
.property-card { background: var(--white); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: var(--transition); border: 1px solid var(--border); display: flex; flex-direction: column; }
.property-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.property-image { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--bg-section); }
.property-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.property-card:hover .property-image img { transform: scale(1.06); }
.property-badges { position: absolute; top: 14px; inset-inline-start: 14px; display: flex; gap: 6px; flex-wrap: wrap; }
.badge-property { padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; background: var(--accent); color: var(--primary-dark); }
.badge-property.featured { background: var(--accent); }
.badge-property.available { background: var(--success); color: var(--white); }
.badge-property.reserved { background: var(--warning); color: var(--white); }
.badge-property.sold { background: var(--danger); color: var(--white); }
.property-fav { position: absolute; top: 14px; inset-inline-end: 14px; width: 38px; height: 38px; background: var(--white); border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; border: none; box-shadow: var(--shadow-sm); transition: var(--transition); font-size: 16px; color: var(--text-muted); }
.property-fav:hover, .property-fav.active { background: var(--danger); color: var(--white); }
.property-body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.property-category { font-size: 12px; color: var(--accent); font-weight: 600; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 6px; }
.property-title { font-size: 18px; font-weight: 700; margin: 0 0 8px; color: var(--text-dark); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.property-title a { color: inherit; }
.property-title a:hover { color: var(--accent); }
.property-location { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; }
.property-location i { color: var(--accent); margin-inline-end: 4px; }
.property-price { font-size: 22px; font-weight: 800; color: var(--primary); margin-bottom: 14px; }
.property-meta { display: flex; justify-content: space-between; padding-top: 14px; border-top: 1px solid var(--border); margin-top: auto; font-size: 13px; color: var(--text-body); }
.property-meta div { display: flex; align-items: center; gap: 5px; }
.property-meta i { color: var(--accent); }

/* Categories */
.categories-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; }
.category-card { background: var(--white); padding: 32px 20px; text-align: center; border-radius: var(--radius); border: 1px solid var(--border); transition: var(--transition); }
.category-card:hover { background: var(--primary); color: var(--white); transform: translateY(-4px); box-shadow: var(--shadow); }
.category-card:hover .category-icon { color: var(--accent); }
.category-card:hover h4 { color: var(--white); }
.category-icon { font-size: 38px; color: var(--accent); margin-bottom: 14px; }
.category-card h4 { margin: 0; font-size: 16px; }

/* Forms */
.form-group { margin-bottom: 18px; }
.form-label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 14px; color: var(--text-dark); }
.form-control, .form-select { width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; font-family: inherit; transition: var(--transition); background: var(--white); color: var(--text-dark); }
.form-control:focus, .form-select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(201,169,97,0.12); }
textarea.form-control { resize: vertical; min-height: 110px; }

/* Alerts */
.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 18px; border: 1px solid; }
.alert-success { background: #d1fae5; color: #065f46; border-color: #6ee7b7; }
.alert-danger { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.alert-warning { background: #fef3c7; color: #92400e; border-color: #fcd34d; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; text-align: center; }
.stat-item .stat-number { font-size: 48px; font-weight: 800; color: var(--accent); line-height: 1; margin-bottom: 8px; }
.stat-item .stat-label { font-size: 14px; color: rgba(255,255,255,0.85); }

/* Testimonials */
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.testimonial-card { background: var(--white); padding: 30px; border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.testimonial-stars { color: var(--accent); margin-bottom: 14px; }
.testimonial-content { color: var(--text-body); font-style: italic; margin-bottom: 18px; font-size: 15px; line-height: 1.7; }
.testimonial-author { font-weight: 700; color: var(--text-dark); }
.testimonial-position { font-size: 13px; color: var(--text-muted); }

/* Page header */
.page-header { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: var(--white); padding: 60px 0; text-align: center; }
.page-header h1 { color: var(--white); margin: 0 0 8px; font-size: clamp(28px, 4vw, 40px); }
.page-header .breadcrumb { font-size: 14px; color: rgba(255,255,255,0.8); }
.page-header .breadcrumb a { color: var(--accent); }

/* Filters sidebar */
.filters-card { background: var(--white); padding: 24px; border-radius: var(--radius); border: 1px solid var(--border); position: sticky; top: 90px; }
.filters-card h3 { margin: 0 0 18px; font-size: 18px; }

/* Property detail */
.gallery-main { border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 14px; aspect-ratio: 16/10; background: var(--bg-section); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 10px; }
.gallery-thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); cursor: pointer; transition: var(--transition); opacity: 0.7; }
.gallery-thumbs img:hover, .gallery-thumbs img.active { opacity: 1; }
.detail-section { background: var(--white); padding: 28px; border-radius: var(--radius); border: 1px solid var(--border); margin-bottom: 24px; }
.detail-section h3 { margin: 0 0 20px; font-size: 20px; }
.specs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px; }
.spec-item { display: flex; gap: 12px; align-items: center; }
.spec-icon { width: 44px; height: 44px; background: var(--bg-section); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--accent); font-size: 18px; flex-shrink: 0; }
.spec-label { font-size: 12px; color: var(--text-muted); }
.spec-value { font-weight: 700; color: var(--text-dark); }
.features-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; list-style: none; padding: 0; margin: 0; }
.features-list li { padding: 8px 0; display: flex; align-items: center; gap: 10px; font-size: 14px; }
.features-list i { color: var(--accent); }

.contact-card { background: var(--white); padding: 26px; border-radius: var(--radius); border: 1px solid var(--border); position: sticky; top: 90px; }
.contact-card .price-large { font-size: 30px; font-weight: 800; color: var(--primary); margin-bottom: 16px; }
.contact-card .agent-info { display: flex; gap: 12px; align-items: center; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.contact-card .agent-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--bg-section); display: flex; align-items: center; justify-content: center; color: var(--accent); }
#map { height: 380px; border-radius: var(--radius); }

/* Footer */
.footer { background: var(--primary-dark); color: rgba(255,255,255,0.75); padding: 60px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr; gap: 40px; margin-bottom: 40px; }
.footer h4 { color: var(--white); font-size: 17px; margin: 0 0 18px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer ul li { margin-bottom: 10px; }
.footer a { color: rgba(255,255,255,0.75); }
.footer a:hover { color: var(--accent); }
.footer-brand p { margin: 14px 0; font-size: 14px; line-height: 1.7; }
.footer-social { display: flex; gap: 10px; }
.footer-social a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; color: var(--white); }
.footer-social a:hover { background: var(--accent); color: var(--primary-dark); }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.footer-contact i { color: var(--accent); margin-top: 4px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 20px 0; text-align: center; font-size: 13px; }

@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; gap: 30px; } }

/* WhatsApp float */
.whatsapp-float { position: fixed; bottom: 24px; inset-inline-end: 24px; width: 58px; height: 58px; background: #25d366; color: var(--white); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; box-shadow: 0 4px 16px rgba(37,211,102,0.4); z-index: 999; transition: var(--transition); }
.whatsapp-float:hover { transform: scale(1.1); color: var(--white); }

/* Compare bar */
.compare-bar { position: fixed; bottom: 0; left: 0; right: 0; background: var(--primary); color: var(--white); padding: 14px 0; z-index: 998; transform: translateY(100%); transition: var(--transition); box-shadow: 0 -4px 12px rgba(0,0,0,0.1); }
.compare-bar.active { transform: translateY(0); }
.compare-bar .container { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.compare-items { display: flex; gap: 12px; flex-wrap: wrap; }
.compare-item-thumb { width: 50px; height: 50px; border-radius: var(--radius-sm); object-fit: cover; }

/* Utilities */
.text-center { text-align: center; }
.text-accent { color: var(--accent); }
.text-primary { color: var(--primary); }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-4 { margin-top: 2rem; }
.d-flex { display: flex; }
.gap-2 { gap: 12px; }
.flex-wrap { flex-wrap: wrap; }

/* Layout grid */
.row { display: grid; gap: 24px; }
.col-md-3 { grid-column: span 12; }
.col-md-4 { grid-column: span 12; }
.col-md-8 { grid-column: span 12; }
.col-md-9 { grid-column: span 12; }
@media (min-width: 768px) {
  .col-md-3 { grid-column: span 3; }
  .col-md-4 { grid-column: span 4; }
  .col-md-8 { grid-column: span 8; }
  .col-md-9 { grid-column: span 9; }
}

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 6px; list-style: none; padding: 0; margin: 30px 0 0; flex-wrap: wrap; }
.page-item .page-link { display: inline-block; padding: 8px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-dark); background: var(--white); }
.page-item.active .page-link { background: var(--primary); color: var(--white); border-color: var(--primary); }
.page-item.disabled .page-link { color: var(--text-muted); pointer-events: none; }
