:root {
  --primary: #0F2A43;
  --secondary: #1E3A5F;
  --secondary-hover: #284A73;
  --gold: #C99A2E;
  --gold-light: #E9D49A;
  --page-bg: #F7F9FC;
  --card-bg: #FCFDFE;
  --card-bg-alt: #FAFBFC;
  --text-main: #0F2A43;
  --text-secondary: #64748B;
  --input-border: #E2E8F0;
  --whatsapp: #16A34A;
  --whatsapp-hover: #15803D;
  --soft-line: #E2E8F0;
  --soft-shadow: 0 12px 28px rgba(15, 42, 67, 0.07);
  --hover-shadow: 0 18px 40px rgba(15, 42, 67, 0.12);
  --radius: 18px;

  --bg: var(--page-bg);
  --bg2: #FFFFFF;
  --card: var(--card-bg);
  --bg-2: #FFFFFF;
  --card2: #FFFFFF;
  --card-2: #FFFFFF;
  --line: var(--soft-line);
  --text: var(--text-main);
  --muted: var(--text-secondary);
  --accent: var(--primary);
  --accent2: var(--secondary);
  --accent-2: var(--secondary);
  --accent-3: var(--gold);
  --shadow: var(--soft-shadow);
}

body {
  background: var(--page-bg) !important;
  color: var(--text-main) !important;
}

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

a:hover {
  color: var(--secondary);
}

.shape {
  display: none;
}

.topbar {
  background: rgba(15, 42, 67, 0.96) !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.16) !important;
  box-shadow: 0 10px 30px rgba(15, 42, 67, 0.12);
}

.brand,
.topbar a,
.topbar .btn-soft {
  color: #FFFFFF !important;
}

.brand-badge {
  background: linear-gradient(145deg, var(--gold), var(--gold-light)) !important;
  color: var(--primary) !important;
  box-shadow: 0 10px 24px rgba(201, 154, 46, 0.18);
}

.brand-icon {
  color: var(--gold) !important;
}

.brand {
  font-size: clamp(1.7rem, 4vw, 2.25rem) !important;
  font-weight: 900 !important;
  letter-spacing: 0.2px;
  line-height: 1;
}

.brand-word {
  color: #FFFFFF;
}

.brand-word-gold {
  color: var(--gold);
}

.menu-btn,
.brand-badge {
  background: transparent !important;
  border: 1px solid rgba(226, 232, 240, 0.18) !important;
  box-shadow: none !important;
}

.hero-card {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(250, 251, 252, 0.98)) !important;
}

.hero-card .title,
.hero-card h1 {
  font-size: clamp(2.1rem, 5vw, 4rem) !important;
  font-weight: 900 !important;
  letter-spacing: -0.8px;
  line-height: 1.15 !important;
}

.hero-card .muted,
.hero-card p {
  font-size: clamp(1rem, 2.2vw, 1.15rem) !important;
  line-height: 1.85 !important;
  font-weight: 600;
}

.hero-card,
.item-card,
.search-card,
.stat,
.empty-state,
.cardx,
.feature-card,
.quick-stat,
.glass-card,
.property-card,
.office-card,
.modal-content {
  background: var(--card-bg) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--soft-line) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--soft-shadow) !important;
}

.hero,
.section {
  padding-top: 14px !important;
  padding-bottom: 14px !important;
}

.hero-card {
  overflow: hidden;
}

.hero-body,
.item-body {
  padding: 20px !important;
}

.card-body {
  padding: 22px !important;
}

.title,
.section h2,
.section-title,
.item-title,
.property-title,
.office-name,
.stat .v,
.quick-stat .value,
.cardx h1,
.hero-card h1,
.hero-card h2,
.hero-card h3,
.item-card h1,
.item-card h2,
.item-card h3,
.feature-card h5,
.modal-title {
  color: var(--text-main) !important;
}

.muted,
.section p,
.section-subtitle,
.item-meta,
.property-meta,
.office-meta,
.stat .k,
.quick-stat .label,
.quick-stat .hint,
.footer,
.form-label,
.empty-state,
.cardx .muted,
.text-white-50 {
  color: var(--text-secondary) !important;
}

.shell main .text-white,
.shell main .text-light {
  color: var(--text-main) !important;
}

.topbar .text-white,
.topbar .text-light {
  color: #FFFFFF !important;
}

.badge-pill,
.chip,
.service-pill,
.badge-chip,
.badge.text-bg-dark {
  background: rgba(201, 154, 46, 0.10) !important;
  border: 1px solid rgba(201, 154, 46, 0.28) !important;
  color: var(--primary) !important;
}

.badge-pill i,
.chip i,
.section h2 i,
.title i,
.icon i {
  color: var(--gold) !important;
}

.btn-main,
.btn.btn-main,
.btn-primary-hero,
.btn.btn-primary,
.modal .btn-primary {
  background: var(--secondary) !important;
  color: #FFFFFF !important;
  border: 1px solid var(--secondary) !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 22px rgba(15, 42, 67, 0.16);
  min-height: 46px;
  font-weight: 800 !important;
  font-size: 0.98rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-main:hover,
.btn.btn-main:hover,
.btn-primary-hero:hover,
.btn.btn-primary:hover,
.modal .btn-primary:hover {
  background: var(--primary) !important;
  border-color: var(--secondary-hover) !important;
  color: #FFFFFF !important;
  transform: translateY(-1px);
}

.btn-soft,
.btn-outline-light,
.btn-secondary-hero {
  background: transparent !important;
  border: 1px solid var(--gold) !important;
  color: var(--primary) !important;
  border-radius: 12px !important;
  min-height: 46px;
  font-weight: 800 !important;
  font-size: 0.98rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-soft:hover,
.btn-outline-light:hover,
.btn-secondary-hero:hover {
  background: var(--gold) !important;
  color: #FFFFFF !important;
}

a[href*="wa.me"].btn-main,
a[href*="wa.me"].btn-primary-hero {
  background: var(--whatsapp) !important;
  border-color: var(--whatsapp) !important;
  color: #FFFFFF !important;
}

a[href*="wa.me"].btn-main:hover,
a[href*="wa.me"].btn-primary-hero:hover {
  background: var(--whatsapp-hover) !important;
  border-color: var(--whatsapp-hover) !important;
}

.form-control,
.form-select {
  background: #FFFFFF !important;
  color: var(--text-main) !important;
  border: 1px solid var(--input-border) !important;
  border-radius: 12px !important;
  min-height: 46px;
}

.form-control:focus,
.form-select:focus {
  background: #FFFFFF !important;
  color: var(--text-main) !important;
  border-color: var(--secondary) !important;
  box-shadow: 0 0 0 0.2rem rgba(201, 154, 46, 0.14) !important;
}

.form-control::placeholder {
  color: #9CA3AF !important;
}

.search-card {
  padding: 20px !important;
  border-width: 1.5px !important;
  box-shadow: 0 16px 32px rgba(15, 42, 67, 0.08) !important;
}

.search-card input[name="search"] {
  padding-inline-start: 50px !important;
  background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.063.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1ZM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0Z' fill='%230F2A43'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-size: 22px 22px !important;
  background-position: left 16px center !important;
  font-weight: 700;
}

.hero-media,
.item-media,
.property-media {
  background: #EEF2F7 !important;
  overflow: hidden;
}

.hero-media {
  aspect-ratio: 16 / 9 !important;
}

.item-media,
.property-media {
  aspect-ratio: 4 / 3 !important;
  flex: 0 0 auto;
}

.hero-media img,
.item-media img,
.property-media img,
.gallery img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block;
}

.footer .border-top,
.border-white,
.border-opacity-10,
.modal-header,
.modal-footer {
  border-color: rgba(11, 30, 45, 0.10) !important;
}

.item-card,
.stat,
.feature-card,
.quick-stat,
.property-card,
.office-card,
.btn-main,
.btn-soft,
.btn-outline-light,
.btn-primary-hero,
.btn-secondary-hero {
  transition: all 0.18s ease;
}

.item-card,
.property-card,
.office-card {
  height: 100% !important;
}

.item-card,
.property-card {
  display: flex !important;
  flex-direction: column !important;
}

.item-body,
.property-body,
.featured-body {
  display: flex !important;
  flex-direction: column !important;
  gap: 9px;
  flex: 1;
}

.item-title,
.property-title {
  min-height: 3.2em;
  font-size: 1.12rem !important;
  font-weight: 900 !important;
  line-height: 1.6 !important;
}

.item-meta,
.property-meta {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 7px !important;
  min-height: 86px;
}

.item-meta span,
.property-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

.item-card .chip,
.property-card .badge-chip {
  min-height: 30px;
  font-size: 0.78rem !important;
  padding: 5px 9px !important;
  align-self: flex-start;
}

.item-card .item-meta span:has(.bi-cash-coin),
.property-price {
  margin-top: auto;
}

.item-actions,
.property-actions,
.property-cta-group {
  margin-top: auto;
  gap: 10px !important;
}

.item-actions .btn,
.property-actions .btn,
.property-cta-group .btn {
  flex: 1 1 180px;
  min-width: 0;
  min-height: 46px;
  padding: 10px 14px !important;
}

.item-card:hover,
.stat:hover,
.feature-card:hover,
.quick-stat:hover,
.property-card:hover,
.office-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--hover-shadow) !important;
  border-color: rgba(201, 154, 46, 0.42) !important;
}

.alert,
.alert-dark,
.alert-warning {
  background: #FFFFFF !important;
  color: var(--text-main) !important;
  border: 1px solid var(--soft-line) !important;
  border-radius: var(--radius) !important;
}

.phone-link,
.map-link,
.price,
.text-warning,
.property-price,
.feature-card i,
.quick-stat .icon,
.office-logo {
  color: var(--gold) !important;
}

.price,
.property-price {
  font-size: clamp(1.25rem, 3vw, 1.85rem) !important;
  font-weight: 900 !important;
  color: var(--gold) !important;
}

.property-price-panel {
  background: var(--card-bg-alt);
  border: 1px solid var(--soft-line);
  border-radius: 18px;
  padding: 16px 18px;
}

.property-price-panel .label {
  color: var(--text-secondary);
  font-weight: 700;
  margin-bottom: 6px;
}

.property-price-panel .value {
  color: var(--primary);
  font-size: clamp(1.8rem, 4.5vw, 2.7rem);
  font-weight: 800;
  line-height: 1.1;
}

.property-description {
  background: var(--card-bg-alt);
  border: 1px solid var(--soft-line);
  border-radius: 18px;
  padding: 18px;
}

.property-description p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.property-description::after {
  content: "عرض المزيد";
  display: inline-flex;
  margin-top: 10px;
  color: var(--primary);
  font-weight: 800;
  border-bottom: 1px solid var(--gold);
}

.property-description .label {
  color: var(--primary);
  font-weight: 800;
  margin-bottom: 8px;
}

.stat {
  padding: 16px !important;
}

.stat .k {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700 !important;
}

.stat .k::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(201, 154, 46, 0.12);
}

.quick-stats {
  gap: 14px !important;
}

.quick-stat {
  padding: 18px !important;
  min-height: 150px;
}

.section-head {
  margin-bottom: 14px !important;
}

.site-shell {
  background: transparent !important;
}

.topbar-actions .btn-hero {
  min-height: 42px;
}

.office-name a,
.text-white {
  color: var(--text-main) !important;
}

.topbar .text-white,
.topbar .brand,
.topbar .brand-wrap,
.topbar .btn-secondary-hero {
  color: #FFFFFF !important;
}

.property-card:hover {
  border-color: rgba(201, 154, 46, 0.42) !important;
}

.featured-card,
#featuredSection .property-card {
  border-color: rgba(201, 154, 46, 0.70) !important;
}

.modal .btn-close-white {
  filter: none;
}

@media (max-width: 768px) {
  .hero-body,
  .item-body {
    padding: 18px !important;
  }

  .hero,
  .section {
    padding-top: 14px !important;
    padding-bottom: 14px !important;
  }

  .title {
    font-size: 1.85rem !important;
  }

  .hero-card .title,
  .hero-card h1 {
    font-size: 2rem !important;
  }

  .brand {
    font-size: 1.7rem !important;
  }

  .btn-main,
  .btn-soft,
  .btn-primary-hero,
  .btn-secondary-hero {
    width: 100%;
  }

  .grid-stats,
  .quick-stats {
    gap: 10px !important;
  }

  .search-card {
    padding: 16px !important;
  }

  .item-title,
  .property-title {
    min-height: auto;
  }

  .item-meta,
  .property-meta {
    min-height: auto;
  }
}

/* Final UI polish: keep the interface quiet and let property images lead. */
.topbar-inner {
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}

.menu-btn {
  width: 38px !important;
  height: 38px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #FFFFFF !important;
  box-shadow: none !important;
}

.menu-btn i {
  font-size: 1.85rem !important;
  line-height: 1;
}

.brand {
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.brand-word {
  color: #FFFFFF !important;
}

.brand-word-gold {
  color: var(--gold) !important;
}

.hero {
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}

.hero-card {
  border-radius: 22px !important;
}

.hero-card .hero-body {
  padding-top: 18px !important;
  padding-bottom: 18px !important;
}

.hero-card .badge-pill,
.hero-card .d-flex.flex-wrap.gap-2.mb-3 {
  margin-bottom: 10px !important;
}

.hero-card .title,
.hero-card h1 {
  margin-bottom: 8px !important;
}

.hero-card .muted,
.hero-card p {
  margin-bottom: 10px !important;
}

.section {
  padding-top: 12px !important;
  padding-bottom: 12px !important;
}

.item-card,
.property-card {
  min-height: 500px;
}

.item-card .item-media,
.property-card .property-media,
.featured-card .property-media {
  aspect-ratio: 1.32 / 1 !important;
}

.item-body,
.property-body {
  padding: 16px !important;
}

.item-title,
.property-title,
.office-name {
  color: var(--primary) !important;
}

.item-meta span:nth-child(3),
.item-meta span:has(.bi-cash-coin),
.property-meta span:has(.bi-cash-coin) {
  color: var(--gold) !important;
  font-size: 1.16rem !important;
  font-weight: 900 !important;
  min-height: 30px;
}

.item-actions,
.property-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
}

.item-actions .btn,
.property-actions .btn {
  width: 100%;
  min-height: 46px;
  border-radius: 12px !important;
  padding: 10px 12px !important;
}

.item-card:hover,
.property-card:hover,
.office-card:hover,
.quick-stat:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 14px 34px rgba(15, 42, 67, 0.11) !important;
}

.badge-chip,
.chip {
  font-size: 0.76rem !important;
  min-height: 28px !important;
  line-height: 1.25 !important;
  white-space: nowrap;
}

#featuredSection .property-card,
.featured-card {
  border: 1px solid rgba(201, 154, 46, 0.72) !important;
}

.featured-card {
  gap: 14px !important;
}

.featured-card .property-media,
#featuredSection .property-media {
  min-height: 245px !important;
}

.featured-body {
  padding: 18px !important;
}

.featured-body p,
.featured-body .property-meta {
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.office-card {
  box-shadow: 0 14px 30px rgba(15, 42, 67, 0.09) !important;
}

.office-meta,
.office-card p,
.office-card .text-white-50 {
  color: #475569 !important;
  font-weight: 650;
}

.office-card .btn-soft {
  border-color: var(--primary) !important;
  color: var(--primary) !important;
}

.office-card .btn-soft:hover {
  border-color: var(--gold) !important;
  background: var(--gold) !important;
  color: #FFFFFF !important;
}

.office-logo {
  background: rgba(255, 255, 255, 0.88) !important;
  border: 1px solid rgba(226, 232, 240, 0.86) !important;
  border-radius: 14px !important;
  padding: 6px !important;
  box-shadow: 0 8px 18px rgba(15, 42, 67, 0.10) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
}

.office-logo img {
  border-radius: 10px !important;
}

#rentals .glass-card,
#rentals .item-card,
#rentals .property-card {
  background: #FFFFFF !important;
}

#rentals .item-media,
#rentals .property-media {
  aspect-ratio: 1.45 / 1 !important;
}

#rentals .property-title,
#rentals .mini-item h6,
#rentals .mini-item__body h6 {
  color: #FFFFFF !important;
  font-weight: 800 !important;
  text-shadow: 0 1px 8px rgba(15, 42, 67, 0.28);
}

#rentals .section-title,
#rentals h3,
#latest .section-title,
#offices .section-title {
  color: var(--primary) !important;
  font-weight: 900 !important;
}

/* Requested card-only visibility polish. */
.property-card .property-title,
.mini-item h6,
.mini-item__body h6 {
  color: #FFFFFF !important;
  font-weight: 800 !important;
  text-shadow: 0 1px 8px rgba(15, 42, 67, 0.28);
}

.property-media .office-logo,
.property-media .property-logo,
.property-media .office-badge,
.property-media .property-office-logo,
.property-card .office-logo {
  background: rgba(255, 255, 255, 0.88) !important;
  border: 1px solid rgba(226, 232, 240, 0.86) !important;
  border-radius: 14px !important;
  padding: 6px !important;
  box-shadow: 0 8px 18px rgba(15, 42, 67, 0.10) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Strong selector for the exact visible card elements. */
#rentals .property-card h3.property-title,
#rentals .property-card .property-title,
#rentals .mini-item h6,
#rentals .mini-item__body h6,
.property-card h3.property-title {
  color: #FFFFFF !important;
  font-weight: 800 !important;
  text-shadow: 0 1px 10px rgba(15, 42, 67, 0.34);
}

.property-media .property-badges,
.property-card .property-badges {
  background: rgba(255, 255, 255, 0.88) !important;
  border: 1px solid rgba(226, 232, 240, 0.86) !important;
  border-radius: 14px !important;
  padding: 6px !important;
  box-shadow: 0 8px 18px rgba(15, 42, 67, 0.10) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.property-media .property-badges:empty,
.property-card .property-badges:empty {
  display: none !important;
}

/* Restore the original homepage hero eyebrow and large logo only. */
.eyebrow {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 10px 16px !important;
  border-radius: 999px !important;
  background: rgba(34, 197, 94, 0.10) !important;
  border: 1px solid rgba(86, 211, 159, 0.25) !important;
  color: #d6ffeb !important;
  font-weight: 700 !important;
  font-size: 0.95rem !important;
}

.hero-title {
  font-size: clamp(2.3rem, 6vw, 5rem) !important;
  line-height: 1.03 !important;
  font-weight: 800 !important;
  margin: 18px 0 16px !important;
  letter-spacing: -0.5px !important;
}

.hero-title span {
  background: linear-gradient(135deg, #fff 0%, #b9f6d2 55%, #8cd8ff 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  color: transparent !important;
  text-shadow: none !important;
}

.quick-stat .label,
.quick-stat .hint,
.section-subtitle {
  color: #475569 !important;
}

.property-price-panel .value {
  color: var(--gold) !important;
  font-size: clamp(2rem, 5vw, 3rem) !important;
}

@media (min-width: 992px) {
  .hero-card .hero-body {
    padding: 26px !important;
  }

  .item-card,
  .property-card {
    min-height: 525px;
  }
}

@media (max-width: 768px) {
  .topbar-inner {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
  }

  .hero {
    padding-top: 8px !important;
  }

  .hero-card .hero-body {
    padding: 16px !important;
  }

  .item-card,
  .property-card {
    min-height: auto;
  }

  .item-actions,
  .property-actions {
    grid-template-columns: 1fr;
  }
}
