/* ==========================================================================
   SEMSARK — COMPLETE DESIGN SYSTEM STYLESHEET (2026 EDITION)
   Bilingual Real-Estate Marketplace (Arabic RTL & English LTR)
   Matching Official Semsark Design Mockups & Mobile Specifications
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* Brand Palette */
  --brand-primary: #1D64EC;
  --brand-primary-hover: #1550C4;
  --brand-primary-dark: #0F3D99;
  --brand-primary-soft: #EFF6FF;
  --brand-primary-subtle: #DBEAFE;
  --brand-navy: #0F172A;
  --brand-navy-light: #1E293B;
  --brand-text: #1E293B;
  --brand-muted: #64748B;
  --brand-bg: #F8FAFC;
  --brand-surface: #FFFFFF;
  --brand-border: #E2E8F0;
  --brand-border-subtle: #F1F5F9;
  --brand-accent-red: #EF4444;
  --brand-accent-red-soft: #FEE2E2;
  --brand-success: #10B981;
  --brand-success-soft: #ECFDF5;
  --brand-warning: #F59E0B;

  /* Typography */
  --font-arabic: 'IBM Plex Sans Arabic', 'Tajawal', system-ui, -apple-system, sans-serif;
  --font-english: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Radii */
  --radius-card: 20px;
  --radius-card-sm: 14px;
  --radius-btn: 12px;
  --radius-pill: 999px;
  --radius-img: 16px;
  --radius-input: 14px;

  /* Elevation Shadows */
  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.04), 0 6px 20px rgba(15, 23, 42, 0.04);
  --shadow-card-hover: 0 6px 12px rgba(15, 23, 42, 0.06), 0 16px 36px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-search: 0 4px 20px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.03);
  --shadow-dock: 0 12px 36px rgba(15, 23, 42, 0.35);

  /* Transitions */
  --transition-fast: 150ms ease-out;
  --transition-normal: 250ms ease-out;
}

/* --------------------------------------------------------------------------
   2. RESET & BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  padding: 0;
  background-color: var(--brand-bg);
  color: var(--brand-text);
  font-family: var(--font-english);
  font-size: 0.95rem;
  line-height: 1.6;
}

[dir="rtl"],
html[lang="ar"],
body.is-arabic {
  font-family: var(--font-arabic);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--brand-navy);
  font-weight: 700;
  margin-top: 0;
}

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--brand-primary-hover);
}

/* --------------------------------------------------------------------------
   3. HEADER (72px Sticky)
   -------------------------------------------------------------------------- */
.semsark-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  height: 72px;
  background-color: var(--brand-surface);
  border-bottom: 1px solid var(--brand-border);
}

.header-container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-wordmark {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--brand-navy);
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.brand-wordmark:hover {
  color: var(--brand-navy);
}

.brand-wordmark .brand-dot {
  color: var(--brand-primary);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.header-nav-link {
  color: var(--brand-navy);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0.25rem;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: color var(--transition-fast);
}

.header-nav-link:hover {
  color: var(--brand-primary);
}

.header-nav-link.active {
  color: var(--brand-primary);
  font-weight: 700;
}

.header-nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -16px;
  inset-inline-start: 0;
  inset-inline-end: 0;
  height: 2.5px;
  background-color: var(--brand-primary);
  border-radius: 2px;
}

.header-cluster {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand-navy);
  background-color: var(--brand-surface);
  gap: 0.4rem;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.lang-toggle:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background-color: var(--brand-primary-soft);
}

.header-avatar-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--brand-border);
}

/* --------------------------------------------------------------------------
   4. HERO SECTION
   -------------------------------------------------------------------------- */
.semsark-hero {
  position: relative;
  background: linear-gradient(180deg, #F0F7FD 0%, #F8FAFC 100%);
  padding: 48px 0 56px 0;
  overflow: hidden;
  border-bottom: 1px solid var(--brand-border);
}

.hero-villa-bg {
  position: absolute;
  top: 0;
  bottom: 0;
  inset-inline-end: 0;
  width: 44%;
  background-repeat: no-repeat;
  background-position: center right;
  background-size: cover;
  pointer-events: none;
  opacity: 0.9;
  mask-image: linear-gradient(to var(--mask-direction, left), black 45%, transparent 100%);
  -webkit-mask-image: linear-gradient(to var(--mask-direction, left), black 45%, transparent 100%);
}

[dir="rtl"] .hero-villa-bg {
  --mask-direction: right;
  background-position: center left;
}

[dir="ltr"] .hero-villa-bg {
  --mask-direction: left;
  background-position: center right;
}

.hero-content-stack {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  color: var(--brand-navy);
  font-size: clamp(1.85rem, 3.5vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  color: var(--brand-muted);
  font-size: 1.05rem;
  margin-bottom: 1.75rem;
}

/* Search Bar Component (Pill, max 660px) */
.semsark-search-bar {
  background-color: var(--brand-surface);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-search);
  max-width: 660px;
  margin: 0 auto 1.25rem auto;
  display: flex;
  align-items: center;
  padding: 0.4rem 0.6rem;
  transition: all var(--transition-fast);
}

.semsark-search-bar:focus-within {
  border-color: var(--brand-primary);
  box-shadow: 0 8px 30px rgba(29, 100, 236, 0.12), 0 0 0 3px rgba(29, 100, 236, 0.15);
}

.search-icon-leading {
  color: var(--brand-muted);
  font-size: 1.25rem;
  padding-inline-start: 0.85rem;
  padding-inline-end: 0.4rem;
  display: flex;
  align-items: center;
}

.search-input-field {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.6rem 0.5rem;
  font-size: 0.95rem;
  color: var(--brand-navy);
  outline: none;
  font-family: inherit;
}

.search-input-field::placeholder {
  color: var(--brand-muted);
}

.search-filter-btn {
  background: transparent;
  border: none;
  color: var(--brand-muted);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.search-filter-btn:hover {
  background-color: var(--brand-primary-soft);
  color: var(--brand-primary);
}

/* Category Chips (Horizontally scrollable on mobile) */
.category-chips-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 1.25rem;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.category-chips-wrapper::-webkit-scrollbar {
  display: none;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background-color: var(--brand-surface);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-pill);
  padding: 0.45rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--brand-navy);
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  transition: all var(--transition-fast);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.category-chip i {
  color: var(--brand-muted);
  font-size: 0.95rem;
}

.category-chip:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background-color: var(--brand-primary-soft);
}

.category-chip:hover i {
  color: var(--brand-primary);
}

.category-chip.active {
  background-color: var(--brand-primary);
  color: #FFFFFF;
  border-color: var(--brand-primary);
}

.category-chip.active i {
  color: #FFFFFF;
}

/* --------------------------------------------------------------------------
   5. FEATURED PROPERTY SPLIT CARD + MAP WIDGET
   -------------------------------------------------------------------------- */
.featured-split-card {
  background-color: var(--brand-surface);
  border-radius: var(--radius-card);
  border: 1px solid var(--brand-border);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

@media (min-width: 992px) {
  .featured-split-card {
    flex-direction: row;
  }
}

.featured-split-image {
  position: relative;
  width: 100%;
  min-height: 260px;
  background-color: #CBD5E1;
  overflow: hidden;
}

@media (min-width: 992px) {
  .featured-split-image {
    width: 52%;
    min-height: 340px;
  }
}

.featured-split-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease-out;
}

.featured-split-card:hover .featured-split-image img {
  transform: scale(1.02);
}

.slider-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-navy);
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  z-index: 3;
}

.slider-nav-prev { inset-inline-start: 12px; }
.slider-nav-next { inset-inline-end: 12px; }

.featured-split-details {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}

.map-card-widget {
  background-color: var(--brand-surface);
  border-radius: var(--radius-card);
  border: 1px solid var(--brand-border);
  box-shadow: var(--shadow-card);
  padding: 16px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.map-widget-inner {
  border-radius: var(--radius-img);
  overflow: hidden;
  position: relative;
  aspect-ratio: 4 / 3;
  background-color: #E2E8F0;
  margin-bottom: 12px;
}

.map-widget-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   6. PROPERTY CARD COMPONENT
   -------------------------------------------------------------------------- */
.property-card {
  background-color: var(--brand-surface);
  border-radius: var(--radius-card);
  border: 1px solid var(--brand-border);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.property-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}

.card-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: #E2E8F0;
}

.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease-out;
}

.property-card:hover .card-image-wrap img {
  transform: scale(1.03);
}

/* Floating Badges */
.card-badge-cluster {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  display: flex;
  gap: 6px;
  z-index: 2;
}

.badge-semsark {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.badge-for-sale {
  background-color: var(--brand-success);
  color: #FFFFFF;
}

.badge-price-drop {
  background-color: var(--brand-accent-red);
  color: #FFFFFF;
}

.badge-featured {
  background-color: var(--brand-primary);
  color: #FFFFFF;
}

.badge-new-project {
  background-color: #4F46E5;
  color: #FFFFFF;
}

.badge-suggested {
  background-color: rgba(255, 255, 255, 0.95);
  color: var(--brand-primary);
  border: 1px solid var(--brand-border);
}

/* Floating Action Buttons */
.floating-action-btn {
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-navy);
  font-size: 0.95rem;
  cursor: pointer;
  z-index: 2;
  transition: all var(--transition-fast);
}

.floating-action-btn:hover {
  background: #FFFFFF;
  color: var(--brand-accent-red);
  transform: scale(1.08);
}

.btn-favorite {
  top: 12px;
  inset-inline-end: 12px;
}

.btn-favorite.active {
  color: var(--brand-accent-red);
}

.btn-share {
  bottom: 12px;
  inset-inline-end: 12px;
}

/* Card Body */
.card-body-semsark {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--brand-navy);
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--brand-navy);
  margin-bottom: 0.35rem;
}

.card-location {
  color: var(--brand-muted);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 0.75rem;
}

.card-meta-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--brand-border);
  color: var(--brand-muted);
  font-size: 0.85rem;
  margin-top: auto;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* --------------------------------------------------------------------------
   7. PROJECTS & NEIGHBORHOODS CARDS
   -------------------------------------------------------------------------- */
.project-card {
  background-color: var(--brand-surface);
  border-radius: var(--radius-card-sm);
  border: 1px solid var(--brand-border);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform var(--transition-fast);
}

.project-card:hover {
  transform: translateY(-2px);
}

.project-image-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background-color: #CBD5E1;
}

.project-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-body {
  padding: 12px 14px;
}

.neighborhood-tile {
  position: relative;
  border-radius: var(--radius-card-sm);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: block;
  transition: transform var(--transition-fast);
}

.neighborhood-tile:hover {
  transform: translateY(-2px);
}

.neighborhood-tile img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

.neighborhood-caption {
  position: absolute;
  bottom: 0;
  inset-inline-start: 0;
  inset-inline-end: 0;
  padding: 8px 12px;
  background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.8) 100%);
  color: #FFFFFF;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* --------------------------------------------------------------------------
   8. PROMO INVESTMENT BANNER
   -------------------------------------------------------------------------- */
.investment-promo-banner {
  background: linear-gradient(90deg, #1E3A8A 0%, #1D64EC 100%);
  border-radius: var(--radius-card);
  color: #FFFFFF;
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 48px;
}

/* --------------------------------------------------------------------------
   9. PROPERTY DETAILS PAGE COMPONENTS
   -------------------------------------------------------------------------- */
.details-gallery-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  border-radius: var(--radius-card);
  overflow: hidden;
  margin-bottom: 24px;
}

@media (min-width: 992px) {
  .details-gallery-container {
    grid-template-columns: 2.2fr 1fr;
    grid-template-rows: repeat(3, 115px);
  }
}

.details-main-img-wrap {
  position: relative;
  background-color: #CBD5E1;
  min-height: 280px;
}

@media (min-width: 992px) {
  .details-main-img-wrap {
    grid-row: 1 / span 3;
    min-height: 360px;
  }
}

.details-main-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.details-thumb-img-wrap {
  position: relative;
  background-color: #E2E8F0;
  cursor: pointer;
  overflow: hidden;
}

.details-thumb-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease-out;
}

.details-thumb-img-wrap:hover img {
  transform: scale(1.05);
}

.feature-pill-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}

.feature-pill-badge {
  background-color: var(--brand-surface);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-pill);
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--brand-navy);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.feature-pill-badge i {
  color: var(--brand-primary);
}

.sticky-details-sidebar {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-card {
  background-color: var(--brand-surface);
  border-radius: var(--radius-card);
  border: 1px solid var(--brand-border);
  box-shadow: var(--shadow-card);
  padding: 20px;
}

/* --------------------------------------------------------------------------
   10. MOBILE FLOATING BOTTOM DOCK NAVIGATION
   -------------------------------------------------------------------------- */
.mobile-bottom-dock {
  display: none;
}

@media (max-width: 768px) {
  .mobile-bottom-dock {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-pill);
    padding: 8px 18px;
    display: flex;
    align-items: center;
    gap: 18px;
    z-index: 1050;
    box-shadow: var(--shadow-dock);
  }

  .dock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: #94A3B8;
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 500;
    padding: 4px 6px;
    border-radius: 8px;
    transition: color var(--transition-fast);
  }

  .dock-item i {
    font-size: 1.15rem;
  }

  .dock-item.active,
  .dock-item:hover {
    color: #FFFFFF;
  }

  .dock-item.active i {
    color: #60A5FA;
  }
}

/* --------------------------------------------------------------------------
   11. BUTTONS & UTILITIES
   -------------------------------------------------------------------------- */
.btn-semsark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.925rem;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-btn);
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  cursor: pointer;
  line-height: 1.4;
}

.btn-semsark-primary {
  background-color: var(--brand-primary);
  color: #FFFFFF !important;
  border-color: var(--brand-primary);
}

.btn-semsark-primary:hover {
  background-color: var(--brand-primary-hover);
  border-color: var(--brand-primary-hover);
}

.btn-semsark-outline {
  background-color: var(--brand-surface);
  color: var(--brand-navy) !important;
  border-color: var(--brand-border);
}

.btn-semsark-outline:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary) !important;
  background-color: var(--brand-primary-soft);
}

.btn-semsark-pill {
  border-radius: var(--radius-pill);
}

/* --------------------------------------------------------------------------
   12. FOOTER
   -------------------------------------------------------------------------- */
.semsark-footer {
  background-color: var(--brand-surface);
  border-top: 1px solid var(--brand-border);
  padding: 40px 0 24px 0;
  margin-top: 64px;
}

.footer-bottom-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--brand-muted);
  font-size: 0.875rem;
}

/* Helper Brand Color Utilities */
.text-navy {
  color: var(--brand-navy) !important;
}

.bg-navy {
  background-color: var(--brand-navy) !important;
}

