:root {
  --ij-ink: #082f35;
  --ij-teal: #0e8f8a;
  --ij-teal-dark: #08706d;
  --ij-gold: #d6b16b;
  --ij-mist: #f3f7f7;
  --ij-line: #dfe9ea;
  --ij-shadow: 0 18px 50px rgba(8, 47, 53, .10);
}

html { scroll-behavior: smooth; }
body {
  background:
    radial-gradient(circle at 8% 2%, rgba(14, 143, 138, .07), transparent 24rem),
    var(--ij-mist);
  color: var(--ij-ink);
  min-height: 100vh;
}

.topbar {
  z-index: 1050;
  background: rgba(255, 255, 255, .96) !important;
  border-bottom: 1px solid rgba(223, 233, 234, .9) !important;
  box-shadow: 0 8px 32px rgba(8, 47, 53, .06);
}
.topbar .logo { height: 66px; max-width: 150px; object-fit: contain; }
.topbar .nav-link {
  color: #344d51;
  border-radius: 12px;
  padding: .62rem .78rem !important;
  transition: .2s ease;
}
.topbar .nav-link:hover,
.topbar .nav-link:focus {
  color: var(--ij-teal-dark);
  background: #e9f7f5;
}
.topbar .nav-link i { color: var(--ij-teal); }
.btn-cta,
.btn-brand {
  background: linear-gradient(135deg, var(--ij-teal), var(--ij-teal-dark)) !important;
  border: 0 !important;
  border-radius: 13px !important;
  box-shadow: 0 9px 20px rgba(14, 143, 138, .2);
}

.page-hero {
  overflow: hidden;
  min-height: 245px;
  display: grid;
  place-items: center;
  border-bottom: 1px solid rgba(223, 233, 234, .8);
}
.page-hero h1 { color: var(--ij-ink); font-size: clamp(2rem, 4vw, 3.35rem); font-weight: 900; }
.page-hero p { font-size: 1.05rem; }

.sidebar,
.sidebar .card,
.result-bar {
  border: 1px solid var(--ij-line) !important;
  border-radius: 22px !important;
  box-shadow: 0 12px 34px rgba(8, 47, 53, .07) !important;
}
.sidebar .card-body { padding: 1.25rem; }
.form-control,
.form-select {
  border-radius: 13px;
  border-color: var(--ij-line);
  min-height: 46px;
}

body .x-ads-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: .9rem !important;
}
@media (min-width: 1400px) {
  body .x-ads-grid { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
}
body .x-ads-card,
body .prop-card,
body .card-villa,
body .ad-card,
body .ent-card {
  border: 1px solid var(--ij-line) !important;
  border-radius: 18px !important;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 12px 34px rgba(8, 47, 53, .075) !important;
  transition: transform .25s ease, box-shadow .25s ease;
}
body .x-ads-card:hover,
body .prop-card:hover,
body .card-villa:hover,
body .ad-card:hover,
body .ent-card:hover {
  transform: translateY(-7px) !important;
  box-shadow: var(--ij-shadow) !important;
}
body .x-ads-thumb,
body .prop-thumb,
body .card-villa .thumb,
body .ad-card .thumb,
body .ent-card .thumb {
  height: 168px !important;
  overflow: hidden;
  background: linear-gradient(135deg, #e9f3f2, #d7e7e8);
}
body .x-ads-thumb img,
body .prop-thumb img,
body .card-villa .thumb img,
body .ad-card .thumb img,
body .ent-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}
body .x-ads-card:hover img,
body .prop-card:hover img,
body .card-villa:hover img,
body .ad-card:hover img,
body .ent-card:hover img { transform: scale(1.055); }
body .x-ads-card .p-3 { padding: .85rem !important; }
body .x-ads-card h5 { font-size: .98rem !important; line-height: 1.45; }
body .x-ads-badge,
body .badge-city,
body .badge-cat {
  display: inline-flex;
  align-items: center;
  padding: .38rem .68rem;
  border-radius: 999px;
}

.ij-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.ij-section-heading h2 { color: var(--ij-ink); font-weight: 900; }

.ij-mobile-menu-intro { display: none; }
.ij-chat-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1040;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.45rem;
  text-decoration: none;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--ij-teal), var(--ij-ink));
  box-shadow: 0 15px 32px rgba(8, 47, 53, .28);
  transition: .22s ease;
}
.ij-chat-fab:hover { color: #fff; transform: translateY(-4px) scale(1.03); }
.ij-chat-fab::after {
  content: "محادثة";
  position: absolute;
  right: 68px;
  white-space: nowrap;
  color: var(--ij-ink);
  background: #fff;
  border: 1px solid var(--ij-line);
  padding: .45rem .7rem;
  border-radius: 10px;
  font-size: .75rem;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(8, 47, 53, .1);
}

@media (min-width: 992px) {
  .topbar {
    padding-top: .35rem;
  }
  .topbar > .container:first-child {
    min-height: 88px;
  }
  #mainMenu {
    width: 100%;
    display: flex !important;
    justify-content: center;
    padding: 0 0 .8rem;
  }
  #mainMenu .navbar-nav {
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    gap: .55rem !important;
  }
  #mainMenu .nav-link {
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .78rem 1rem !important;
    white-space: nowrap;
    text-align: center;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, .75);
  }
  #mainMenu .nav-link i {
    margin: 0 !important;
    font-size: .98rem;
    line-height: 1;
  }
  #mainMenu .nav-link:hover,
  #mainMenu .nav-link:focus {
    border-color: rgba(14, 143, 138, .14);
  }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  #mainMenu .navbar-nav { gap: .35rem !important; }
  #mainMenu .nav-link {
    padding: .72rem .72rem !important;
    font-size: .94rem;
  }
  #mainMenu .nav-link i { font-size: .92rem; }
}

@media (max-width: 991.98px) {
  .topbar > .container:first-child { min-height: 78px; }
  .topbar .logo { height: 54px; max-width: 112px; }
  .topbar .btn-cta { font-size: .78rem; padding: .55rem .7rem; }
  .navbar-toggler {
    border: 1px solid var(--ij-line) !important;
    width: 46px;
    height: 46px;
    border-radius: 14px !important;
    background: #fff;
    box-shadow: 0 6px 16px rgba(8, 47, 53, .08);
  }
  #mainMenu {
    position: fixed;
    top: 84px;
    right: 12px;
    left: 12px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    padding: 14px;
    background: rgba(255, 255, 255, .985);
    border: 1px solid var(--ij-line);
    border-radius: 26px;
    box-shadow: 0 24px 70px rgba(8, 47, 53, .22);
  }
  #mainMenu.collapsing { transition: height .22s ease; }
  #mainMenu .navbar-nav { gap: 5px !important; }
  #mainMenu .nav-link {
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: .7rem .85rem !important;
    border: 1px solid transparent;
  }
  #mainMenu .nav-link i {
    width: 38px;
    height: 38px;
    margin: 0;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #e9f7f5;
    font-size: 1.05rem;
  }
  .ij-mobile-menu-intro {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 16px;
    color: #fff;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--ij-teal), var(--ij-ink));
  }
  .ij-mobile-menu-intro img { width: 66px; height: 56px; object-fit: contain; background: #fff; border-radius: 13px; padding: 4px; }
  body .x-ads-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .page-hero { min-height: 200px; }
  .sidebar { position: static !important; }
}

@media (max-width: 575.98px) {
  body .x-ads-grid { grid-template-columns: 1fr !important; }
  body .x-ads-thumb,
  body .prop-thumb,
  body .card-villa .thumb,
  body .ad-card .thumb,
  body .ent-card .thumb { height: 225px !important; }
  .section { padding: 42px 0 !important; }
  .page-hero { min-height: 185px; padding: 42px 0 !important; }
  .page-hero h1 { font-size: 1.75rem; }
  .ij-chat-fab { right: 14px; bottom: 14px; width: 54px; height: 54px; border-radius: 18px; }
  .ij-chat-fab::after { display: none; }
}
