/* =========================================================
   MATRIX PROPERTIES LTD — Homepage
   ========================================================= */
:root {
  --navy: #0b1a5c;
  --navy-deep: #0a1748;
  --blue: #0b5fd0;
  --blue-dark: #0a4fb0;
  --amber: #fbb517;
  --amber-dark: #eea600;
  --green: #1bb24a;
  --wa: #25b34b;
  --text: #2f3a4f;
  --muted: #5b6577;
  --line: #e3e7ef;
  --bg-soft: #f3f6fb;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(15, 35, 95, .10);
  --font: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: #fff;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
html, body { max-width: 100%; overflow-x: hidden; }
@supports (overflow-x: clip) { html, body { overflow-x: clip; } }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; color: var(--navy); line-height: 1.1; }
p { margin: 0; }

.container { width: 100%; max-width: 1360px; margin: 0 auto; padding: 0 24px; }

.ico { width: 18px; height: 18px; flex-shrink: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: inherit; font-weight: 600; font-size: 15px;
  padding: 11px 20px; border-radius: 6px; border: 2px solid transparent;
  cursor: pointer; transition: background .2s, color .2s, transform .15s, box-shadow .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-dark); box-shadow: 0 6px 18px rgba(11, 95, 208, .3); }
.btn--outline { background: #fff; color: var(--blue); border-color: var(--blue); }
.btn--outline:hover { background: var(--blue); color: #fff; }
.btn--accent { background: var(--amber); color: var(--navy); }
.btn--accent:hover { background: var(--amber-dark); }
.btn--lg { padding: 10px 30px; font-size: 16px; min-width: 206px; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--blue); font-weight: 600; text-decoration: underline; text-underline-offset: 3px;
}
.link-arrow:hover .ico { transform: translateX(3px); }
.link-arrow .ico { transition: transform .2s; }

/* ---------- Header ---------- */
.header {
  position: relative; z-index: 20;
  background: #fff;
}
.header__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; padding-left: 72px; padding-right: 72px;
}
.logo { display: flex; align-items: center; gap: 8px; }
.logo__icon { height: 56px; width: auto; }
.logo__text { height: 36px; width: auto; }

.nav { display: flex; align-items: center; gap: 34px; margin-left: auto; margin-right: 150px; }
.nav__link {
  position: relative; font-size: 15px; font-weight: 400; color: var(--navy);
  padding: 8px 0; transition: color .2s;
}
.nav__link:hover, .nav__link.is-active { color: var(--blue); }
.nav__link.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 3px; border-radius: 3px; background: var(--amber);
}
.nav__cta-mobile { display: none; }
.header__cta { padding: 9px 20px; }

.burger { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  margin-top: -72px; padding-top: 72px;
  min-height: 430px;
  background:
    linear-gradient(135deg, rgba(220, 228, 240, .55) 0 12%, transparent 12% 100%),
    linear-gradient(225deg, transparent 0 70%, rgba(225, 232, 243, .5) 70% 100%),
    linear-gradient(180deg, #f6f8fc 0%, #eef2f8 100%);
  overflow: hidden;
}
.hero__image {
  position: absolute; top: 72px; right: 14px; bottom: 14px;
  width: 57%;
  background: url("assets/hero.jpg") center / cover no-repeat;
  clip-path: polygon(7% 0, 100% 0, 100% 100%, 0 100%);
  border-radius: 0 14px 14px 0;
}
.hero__inner { position: relative; padding-left: 72px; }
.hero__content { max-width: 540px; padding: 40px 0 56px; }

.eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: .38em; text-transform: uppercase;
  color: var(--blue-dark); margin-bottom: 14px;
}
.hero__title { font-size: clamp(34px, 3.3vw, 50px); font-weight: 700; letter-spacing: -.02em; margin-bottom: 18px; max-width: 540px; }
.hero__lead { font-size: 16px; color: var(--text); font-weight: 300; max-width: 450px; margin-bottom: 24px; }
.hero__lead--mobile { display: none; }
.hero__actions { display: flex; gap: 22px; flex-wrap: wrap; }

/* ---------- Search ---------- */
.search-wrap { position: relative; z-index: 5; margin-top: -38px; }
.search {
  display: flex; align-items: flex-end; gap: 22px;
  background: #fff; border-radius: 10px; box-shadow: var(--shadow);
  padding: 14px 18px 12px;
}
.search__toggle {
  display: flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
  align-self: center; flex-shrink: 0;
}
.search__tab {
  font: inherit; font-size: 15px; border: 0; background: #f3f5f9; color: var(--navy);
  width: 80px; height: 44px; cursor: pointer; transition: background .2s, color .2s;
}
.search__tab.is-active { background: var(--blue); color: #fff; font-weight: 500; }
.search__divider { width: 1px; height: 46px; background: var(--line); align-self: center; }

.field { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.field--location { flex: 1.05; }
.field--type { flex: 1.12; }
.field--budget { flex: 1.15; }
.field__label { font-size: 13px; color: var(--navy); }
.field__control {
  position: relative; display: flex; align-items: center;
  border: 1px solid #d8dde8; border-radius: 6px; height: 38px; background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.field__control:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11, 95, 208, .12); }
.field__icon { position: absolute; left: 12px; width: 18px; height: 18px; color: var(--navy); pointer-events: none; }
.field__chev { position: absolute; right: 12px; width: 16px; height: 16px; color: var(--navy); pointer-events: none; }
.field select {
  appearance: none; -webkit-appearance: none;
  width: 100%; height: 100%; border: 0; background: transparent; outline: none;
  font: inherit; font-size: 13px; color: var(--navy);
  padding: 0 36px 0 44px; cursor: pointer;
}
.search__submit {
  align-self: center; height: 46px; padding: 0 30px; font-size: 15px; min-width: 218px;
}
.ico--search { width: 22px; height: 22px; }

/* ---------- Sections ---------- */
.section { padding-top: 26px; }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.section__title { font-size: clamp(26px, 2.1vw, 30px); font-weight: 700; letter-spacing: -.015em; }
.section__sub { font-size: 14px; color: var(--muted); margin-top: 6px; }
.section__head .link-arrow { margin-bottom: 12px; font-size: 15px; }

/* ---------- Property cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff;
  transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card__media { position: relative; aspect-ratio: 432 / 127; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card__media img { transform: scale(1.04); }
.badge {
  position: absolute; top: 9px; left: 13px;
  background: var(--amber); color: var(--navy); font-size: 11.5px; font-weight: 500;
  padding: 3px 9px; border-radius: 3px;
}
.card__body { padding: 6px 14px 12px; }
.card__title { font-size: 17px; font-weight: 600; }
.card__meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.card__loc { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.card__loc svg { width: 15px; height: 15px; color: var(--blue); }
.card__price { font-size: 16px; font-weight: 700; color: var(--blue); white-space: nowrap; }
.card__link { display: none; }
.dots { display: none; }

/* ---------- Services ---------- */
#services { padding-top: 32px; }
.services { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 14px; }
.service {
  display: flex; gap: 14px; align-items: flex-start;
  border: 1px solid var(--line); border-radius: 6px; padding: 14px 14px 16px;
  background: #fff; transition: border-color .2s, box-shadow .2s, transform .2s;
}
.service:hover { border-color: #c9d6ef; box-shadow: var(--shadow); transform: translateY(-2px); }
.service__icon { width: 44px; height: 44px; flex-shrink: 0; }
.service h3 { font-size: 13px; font-weight: 600; margin-bottom: 8px; margin-top: 2px; }
.service p { font-size: 12px; color: var(--muted); line-height: 1.4; font-weight: 300; }
.c-green { color: var(--green); }
.c-blue { color: var(--blue); }
.c-amber { color: var(--amber); }
.m-only { display: none; }

/* ---------- Banner ---------- */
.banner {
  margin-top: 12px;
  background:
    linear-gradient(90deg, var(--navy-deep) 0%, rgba(10, 23, 72, .92) 35%, rgba(10, 23, 72, .35) 65%, rgba(10, 23, 72, .7) 100%),
    url("assets/kampala-skyline.jpg") right center / cover no-repeat;
  color: #fff;
}
.banner__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 14px; padding-bottom: 16px; }
.banner__title { color: #fff; font-size: clamp(22px, 1.8vw, 26px); font-weight: 600; letter-spacing: -.01em; }
.banner__title span { color: var(--amber); }
.banner__sub { font-size: 14px; font-weight: 300; margin-top: 8px; opacity: .92; }
.banner__btn { padding: 10px 26px; min-width: 146px; }

/* ---------- Footer ---------- */
.footer { background: var(--navy-deep); color: #fff; }
.footer__inner { display: flex; align-items: center; gap: 28px; padding-top: 12px; padding-bottom: 12px; font-size: 14px; }
.footer__logo { display: flex; align-items: center; gap: 6px; }
.footer__icon { height: 40px; width: auto; }
.footer__word { display: flex; flex-direction: column; font-weight: 800; font-size: 22px; letter-spacing: -.01em; line-height: 1; }
.footer__word small { font-size: 6.5px; font-weight: 600; letter-spacing: .35em; margin-top: 3px; }
.footer__sep { width: 1px; height: 36px; background: rgba(255, 255, 255, .35); }
.footer__item { display: inline-flex; align-items: center; gap: 10px; }
.footer__item svg { width: 18px; height: 18px; }
a.footer__item:hover { color: var(--amber); }
.footer__copy { margin-left: auto; opacity: .7; font-size: 12px; }

.actionbar { display: none; }

/* =========================================================
   Tablet
   ========================================================= */
@media (max-width: 1180px) {
  .header__inner, .hero__inner { padding-left: 24px; padding-right: 24px; }
  .nav { gap: 24px; margin-right: 24px; }
  .services { grid-template-columns: repeat(3, 1fr); }
  .search { flex-wrap: wrap; }
  .search__divider { display: none; }
  .field { flex: 1 1 28%; }
  .search__submit { flex: 1 1 100%; }
}

@media (max-width: 960px) {
  .header__cta { display: none; }
  .burger {
    -webkit-appearance: none; appearance: none;
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px;
    flex-shrink: 0; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; padding: 6px;
    margin-left: auto; color: var(--blue-dark);
  }
  .burger span { display: block; flex: 0 0 auto; width: 28px; min-width: 28px; height: 4px; border-radius: 3px; background: var(--blue-dark); transition: transform .25s, opacity .25s; }
  .burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
  .burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

  .nav {
    position: absolute; top: 100%; left: 12px; right: 12px; margin: 8px 0 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-radius: 12px; box-shadow: var(--shadow); padding: 10px 18px 18px;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .25s, transform .25s, visibility .25s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__link { padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
  .nav__link.is-active::after { display: none; }
  .nav__cta-mobile { display: inline-flex; margin-top: 16px; }
}

/* =========================================================
   Mobile
   ========================================================= */
@media (max-width: 760px) {
  body { padding-bottom: 56px; }
  .container { padding: 0 16px; }

  .header { background: transparent; }
  .header__inner { height: 80px; padding: 0 16px 0 24px; }
  .logo { margin-top: 0; gap: 4px; position: relative; top: 18px; }
  .burger { position: relative; top: 18px; }
  .burger { background: #fff; border-radius: 10px; box-shadow: 0 4px 14px rgba(10, 23, 72, .18); padding: 9px; width: 46px; height: 46px; z-index: 2; }
  .burger span { height: 3.5px; }
  .page-detail .burger { background: transparent; box-shadow: none; }
  .nav { margin-top: 26px; }
  .logo__icon { height: 62px; }
  .logo__text { height: 38px; }

  .hero { margin-top: -80px; padding-top: 80px; min-height: 0; background: #fff; }
  .hero__image {
    top: 0; right: 0; bottom: auto; width: 54%; height: 100%;
    clip-path: none; border-radius: 0;
    background-position: 60% center;
  }
  .hero__image::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, .55) 22%, rgba(255, 255, 255, 0) 45%),
                linear-gradient(180deg, rgba(255, 255, 255, .6) 0%, rgba(255, 255, 255, 0) 18%),
                linear-gradient(0deg, rgba(255, 255, 255, .7) 0%, rgba(255, 255, 255, 0) 18%);
  }
  .hero__inner { padding: 0 24px; }
  .hero__content { max-width: 62%; padding: 26px 0 34px; }
  .eyebrow { font-size: 8.5px; letter-spacing: .24em; margin-bottom: 8px; white-space: nowrap; }
  .hero__title { font-size: clamp(20px, 5.7vw, 30px); margin-bottom: 10px; text-shadow: 0 0 18px #fff, 0 0 8px #fff; }
  .hero__lead--desktop { display: none; }
  .hero__lead--mobile { display: block; font-size: 14px; font-weight: 400; margin-bottom: 14px; color: var(--text); }
  .hero__actions { flex-direction: column; gap: 8px; max-width: 160px; }
  .btn--lg { min-width: 0; width: 100%; padding: 10px 12px; font-size: 14px; }
  .btn--outline.btn--lg { padding: 9px 12px; }

  /* search */
  .search-wrap { margin-top: -12px; padding: 0 22px; }
  .search { flex-direction: column; align-items: stretch; gap: 10px; padding: 10px 10px 10px; box-shadow: 0 6px 24px rgba(15, 35, 95, .12); }
  .search__toggle { align-self: stretch; }
  .search__tab { flex: 1; width: auto; height: 46px; font-size: 16px; }
  .field--location { flex: none; }
  .search { display: grid; grid-template-columns: 1fr 1fr; column-gap: 10px; row-gap: 10px; }
  .search__toggle, .field--location, .search__submit { grid-column: 1 / -1; }
  .field__label { font-size: 14px; }
  .field__control { height: 46px; }
  .field select { font-size: 13.5px; padding-left: 44px; padding-right: 30px; text-overflow: ellipsis; }
  .field__chev { right: 10px; }
  .field__icon { left: 14px; width: 19px; height: 19px; }
  .search__submit { height: 54px; font-size: 16px; min-width: 0; margin-top: 2px; }

  /* sections */
  .section { padding-top: 22px; }
  .section__head { align-items: flex-start; position: relative; display: block; margin-bottom: 12px; }
  .section__head .link-arrow { position: absolute; right: 0; top: 5px; margin: 0; font-size: 12.5px; gap: 6px; }
  .section__head .link-arrow .ico { width: 15px; height: 15px; }
  .section__title { font-size: 22px; }
  .section__head .section__title { padding-right: 130px; }
  .section__sub { font-size: 13.5px; margin-top: 6px; }

  /* carousel */
  .cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
  .card { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity .5s, visibility .5s; }
  .card.is-active { opacity: 1; visibility: visible; }
  .card:hover { transform: none; box-shadow: none; }
  .card__media { aspect-ratio: 727 / 200; }
  .badge { font-size: 13px; padding: 4px 10px; top: 6px; left: 8px; }
  .card__body { padding: 8px 10px 10px; }
  .card__title { font-size: 18px; }
  .card__meta { margin-top: 6px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
  .card__loc { font-size: 14px; }
  .card__price { font-size: 16px; }
  .card__link { display: inline-flex; font-size: 13px; margin: 8px 0 0 2px; }
  .dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
  .dots span { width: 8px; height: 8px; border-radius: 50%; background: #c9ced8; transition: background .2s; cursor: pointer; position: relative; }
  .dots span::before { content: ""; position: absolute; inset: -8px; }
  .dots span.is-active { background: var(--blue); }

  /* services */
  #services { padding-top: 22px; }
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
  .service > div { min-width: 0; overflow-wrap: anywhere; }
  .service { padding: 10px 8px 10px 10px; gap: 10px; align-items: center; }
  .service__icon { width: 34px; height: 34px; }
  .service h3 { font-size: 12.5px; margin-bottom: 2px; }
  .service p { font-size: 11.5px; font-weight: 300; }
  .d-only { display: none; }
  .m-only { display: inline; }

  /* banner */
  .banner { margin-top: 8px; background-size: auto 100%; }
  .banner__inner { align-items: center; padding-top: 12px; padding-bottom: 12px; }
  .banner__title { font-size: 17px; line-height: 1.2; }
  .banner__title span { display: block; }
  .banner__sub { font-size: 11px; margin-top: 6px; }
  .banner__btn { min-width: 0; flex-shrink: 0; padding: 9px 14px; font-size: 13px; gap: 8px; }
  .banner__btn .ico { width: 15px; height: 15px; }

  /* footer */
  .footer__inner { gap: 12px; font-size: 11.5px; padding-top: 8px; padding-bottom: 8px; }
  .footer__icon { height: 32px; }
  .footer__word { font-size: 16px; }
  .footer__word small { font-size: 5px; }
  .footer__sep { height: 28px; }
  .footer__item { gap: 6px; white-space: nowrap; }
  .footer__item svg { width: 15px; height: 15px; }
  .footer__copy { display: none; }

  /* sticky action bar */
  .actionbar {
    display: grid; grid-template-columns: 1fr 1fr;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; height: 56px;
    box-shadow: 0 -4px 14px rgba(0, 0, 0, .12);
  }
  .actionbar__btn { display: flex; align-items: center; justify-content: center; gap: 10px; color: #fff; font-weight: 500; font-size: 15px; }
  .actionbar__btn svg { width: 22px; height: 22px; }
  .actionbar__btn--call { background: var(--blue); }
  .actionbar__btn--wa { background: var(--wa); border-left: 2px solid #fff; }
}

@media (max-width: 380px) {
  .hero__content { max-width: 62%; }
  .footer__sep { display: none; }
  .footer__inner { gap: 6px 12px; flex-wrap: wrap; }
}

/* ---------- Sticky navbar: stays at the top with a soft shadow on its edge ---------- */
html { scroll-padding-top: 96px; }
.header { position: sticky; top: 0; z-index: 50; background: #fff; box-shadow: 0 2px 14px rgba(15, 35, 95, .10); }
@media (max-width: 760px) {
  .header { background: #fff; }
  .header .header__inner { height: 72px; }
  .header .logo, .header .burger { top: 0; }
  .header .logo__icon { height: 54px; }
  .header .logo__text { height: 34px; }
}

/* Form buttons while a message is being sent */
button[type="submit"][disabled] { opacity: .75; cursor: progress; }
