:root {
  --ink: #17211f;
  --muted: #62706c;
  --paper: #f7f4ed;
  --surface: #ffffff;
  --line: #d9dfd7;
  --green: #245f46;
  --green-dark: #174333;
  --gold: #c59a42;
  --terracotta: #a85c3e;
  --blue: #234f6b;
  --sky: #d8e8ef;
  --shadow: 0 18px 48px rgba(23, 33, 31, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(247, 244, 237, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 230px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #fff;
  background: var(--green);
  border-radius: 8px;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small,
.eyebrow,
.property-meta,
.footer,
.stats span {
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  color: #34413d;
  font-weight: 700;
}

.nav-action,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}

.nav-action,
.button.primary {
  color: #fff;
  background: var(--green);
}

.nav-action:hover,
.button.primary:hover {
  background: var(--green-dark);
}

.button.secondary {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  border-color: var(--line);
}

.button.full {
  width: 100%;
}

.hero {
  position: relative;
  min-height: min(720px, calc(100vh - 76px));
  display: grid;
  align-items: end;
  overflow: hidden;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(10, 20, 17, 0.84), rgba(10, 20, 17, 0.45) 56%, rgba(10, 20, 17, 0.16));
}

.hero-overlay {
  position: relative;
  z-index: 1;
  width: min(860px, calc(100% - 36px));
  margin: 0 clamp(18px, 6vw, 80px) clamp(42px, 9vh, 88px);
  color: #fff;
}

.hero .eyebrow {
  color: var(--sky);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 840px;
  margin-bottom: 16px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.08;
}

h3 {
  margin-bottom: 8px;
  font-size: 22px;
  line-height: 1.2;
}

.hero-copy {
  max-width: 680px;
  font-size: 20px;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.eyebrow {
  margin-bottom: 8px;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}

.stats div {
  padding: 24px clamp(18px, 4vw, 56px);
  background: var(--surface);
}

.stats strong,
.stats span {
  display: block;
}

.stats strong {
  margin-bottom: 4px;
  font-size: 28px;
}

.section,
.split-section {
  padding: clamp(48px, 8vw, 92px) clamp(18px, 5vw, 72px);
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-head.compact {
  max-width: 920px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.service-grid article {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 26px rgba(23, 33, 31, 0.07);
}

.service-grid img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.service-grid h3,
.service-grid p {
  margin-inline: 18px;
}

.service-grid h3 {
  margin-top: 18px;
}

.service-grid p {
  margin-bottom: 22px;
  color: var(--muted);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  justify-content: flex-end;
  gap: 8px;
}

.filter {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font-weight: 800;
  cursor: pointer;
}

.filter.active {
  color: #fff;
  background: var(--terracotta);
  border-color: var(--terracotta);
}

.property-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.property-card {
  display: flex;
  min-height: 355px;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 26px rgba(23, 33, 31, 0.07);
}

.property-visual {
  min-height: 132px;
  background:
    linear-gradient(135deg, rgba(36, 95, 70, 0.88), rgba(197, 154, 66, 0.64)),
    url("photos/bunia-boulevard.jpg") center/cover;
}

.property-visual.house {
  background:
    linear-gradient(135deg, rgba(36, 95, 70, 0.6), rgba(35, 79, 107, 0.64)),
    url("horizon-hero.png") center/cover;
}

.property-visual.rent {
  background:
    linear-gradient(135deg, rgba(168, 92, 62, 0.62), rgba(36, 95, 70, 0.64)),
    url("photos/bunia-avenue-similiki.jpg") center/cover;
}

.property-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
}

.property-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.badge {
  align-self: start;
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--green-dark);
  background: #e2f0e9;
  font-size: 12px;
  font-weight: 900;
}

.property-card h3 {
  margin: 0;
}

.price {
  margin-top: auto;
  color: var(--terracotta);
  font-size: 20px;
  font-weight: 900;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1.15fr);
  gap: 20px;
  background: #edf4ef;
}

.agent-section {
  background: #f1eee6;
}

.panel {
  padding: clamp(22px, 4vw, 34px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.intro-panel {
  background: var(--green);
  color: #fff;
}

.intro-panel.alt {
  background: var(--blue);
}

.intro-panel .eyebrow,
.intro-panel p {
  color: #d9efe4;
}

.checklist {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 24px 0 0;
  list-style: none;
}

.checklist li {
  padding-left: 24px;
  position: relative;
}

.checklist li::before {
  position: absolute;
  left: 0;
  color: var(--gold);
  content: "+";
  font-weight: 900;
}

form {
  display: grid;
  gap: 14px;
}

.two-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: #34413d;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #cfd8d3;
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

textarea {
  resize: vertical;
}

.form-status {
  min-height: 24px;
  margin: 0;
  color: var(--green-dark);
  font-weight: 800;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 26px clamp(18px, 5vw, 72px);
  background: #101817;
}

.admin-body {
  background: #f7f4ed;
}

.admin-main {
  padding: clamp(28px, 5vw, 56px);
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.admin-stats article {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-stats strong,
.admin-stats span {
  display: block;
}

.admin-stats strong {
  font-size: 30px;
}

.admin-stats span {
  color: var(--muted);
  font-weight: 800;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: #34413d;
  font-size: 13px;
}

.mini-link {
  display: inline-flex;
  margin-top: 8px;
  color: var(--green);
  font-weight: 800;
}

.status-pill {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 6px;
  color: var(--terracotta);
  background: #f5e7df;
  font-size: 12px;
  font-weight: 900;
}

.status-pill.published {
  color: var(--green-dark);
  background: #e2f0e9;
}

@media (max-width: 1000px) {
  .topbar,
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    justify-content: space-between;
  }

  .nav-action {
    display: none;
  }

  .stats,
  .service-grid,
  .property-grid,
  .split-section,
  .admin-stats,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .filters {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .nav {
    gap: 12px;
    overflow-x: auto;
    font-size: 14px;
  }

  .hero {
    min-height: 650px;
  }

  .two-cols {
    grid-template-columns: 1fr;
  }

  .footer {
    flex-direction: column;
  }
}

.form-status.success {
  color: var(--green);
}

.form-status.error {
  color: var(--terracotta);
}
