:root {
  /* --- Official Meleven brand colors, from Meleven_CI.pdf --- */
  --color-navy: #104480;
  --color-navy-dark: #0a2144;
  --color-gold: #c69d7a;
  --color-cream: #f6f1ea;
  --color-white: #ffffff;
  --color-text: #24303f;
  --color-text-muted: #6b7686;

  /* Brand fonts are Klavika Bold (headings) & Kiona Regular (body) — both paid fonts,
     not available on Google Fonts. Using close free equivalents: Montserrat (bold,
     geometric) and Jost (clean geometric sans). Swap these for the real font files
     once you have web-license versions of Klavika/Kiona. */
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Jost', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-navy);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}
.narrow { max-width: 760px; }

/* ---------- Header ---------- */
.site-header {
  background: var(--color-navy);
  padding: 14px 0;
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand {
  display: inline-flex;
  align-items: center;
}
.brand img {
  height: 62px;
  width: auto;
  display: block;
}
.brand-footer img { height: 50px; }
.main-nav a {
  color: var(--color-white);
  text-decoration: none;
  margin-left: 28px;
  font-size: 15px;
  font-weight: 500;
}
.main-nav a:hover { color: var(--color-gold); }
.nav-cta {
  background: var(--color-gold);
  color: var(--color-navy-dark) !important;
  padding: 8px 18px;
  border-radius: 4px;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--color-navy), var(--color-navy-dark));
  color: var(--color-white);
  padding: 90px 0;
  text-align: center;
}
.hero h1 {
  color: var(--color-white);
  font-size: 42px;
  max-width: 720px;
  margin: 0 auto 16px;
}
.hero p {
  color: #d7dbe2;
  font-size: 18px;
  margin-bottom: 32px;
}
.search-form {
  display: flex;
  justify-content: center;
  gap: 10px;
  max-width: 480px;
  margin: 0 auto;
}
.search-form select {
  flex: 1;
  padding: 12px 14px;
  border-radius: 4px;
  border: none;
  font-size: 15px;
}
.search-form button {
  background: var(--color-gold);
  color: var(--color-navy-dark);
  border: none;
  padding: 12px 24px;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
}

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-title { font-size: 28px; margin-bottom: 28px; }
.page-title { font-size: 34px; margin-bottom: 20px; }
.lead-text { font-size: 18px; color: var(--color-text-muted); margin-bottom: 20px; }

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.compound-card {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e8e5dd;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  background: var(--color-white);
}
.compound-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(16, 35, 59, 0.12);
}
.card-image-link { display: block; }
.card-image {
  height: 180px;
  background-size: cover;
  background-position: center;
  background-color: #ddd;
  position: relative;
}
.card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--color-gold);
  color: var(--color-navy-dark);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.card-badge-available { background: #2f9e5b; color: var(--color-white); }
.card-badge-delivery {
  left: auto;
  right: 10px;
  background: var(--color-navy);
  color: var(--color-white);
}
.card-body { padding: 16px 18px; }
.card-title-link { display: block; text-decoration: none; color: inherit; }
.card-body h3 { font-size: 18px; margin-bottom: 4px; }
.card-location { color: var(--color-text-muted); font-size: 14px; margin-bottom: 6px; }
.card-price { color: var(--color-gold); font-weight: 600; font-size: 15px; margin-top: 6px; }

.card-facts {
  display: flex;
  gap: 16px;
  margin: 8px 0;
  flex-wrap: wrap;
}
.fact {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--color-text-muted);
}
.fact-icon { width: 15px; height: 15px; color: var(--color-navy); flex-shrink: 0; }

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  text-decoration: none;
  transition: opacity 0.15s ease;
}
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn:hover { opacity: 0.85; }
.icon-btn-call { background: var(--color-navy); color: var(--color-white); }
.icon-btn-whatsapp { background: #25D366; color: var(--color-white); }

.empty-state { color: var(--color-text-muted); padding: 40px 0; text-align: center; }

/* ---------- Top Areas ---------- */
.area-section { background: var(--color-cream); }
.area-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 24px;
  text-align: center;
}
.area-card {
  text-decoration: none;
  color: inherit;
}
.area-circle {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-color: #ddd;
  margin: 0 auto 12px;
  border: 3px solid var(--color-white);
  box-shadow: 0 4px 14px rgba(16, 35, 59, 0.12);
  transition: transform 0.15s ease;
}
.area-card:hover .area-circle { transform: scale(1.05); }
.area-card h4 { font-size: 15px; margin-bottom: 2px; }
.area-card p { font-size: 13px; color: var(--color-text-muted); }

/* ---------- Unit cards (compound detail page) ---------- */
.unit-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 8px;
}
.unit-card {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e8e5dd;
}
.unit-card-image {
  height: 150px;
  background-size: cover;
  background-position: center;
  background-color: #ddd;
  position: relative;
}
.unit-card-body { padding: 14px 16px; }
.unit-card-body h3 { font-size: 16px; margin-bottom: 4px; }
.unit-payment-plan { font-size: 13px; color: var(--color-text-muted); margin-top: 4px; }

/* ---------- Filter bar ---------- */
.filter-bar { margin-bottom: 28px; }
.filter-bar select {
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 15px;
}

/* ---------- Compound detail ---------- */
.compound-hero {
  height: 360px;
  background-size: cover;
  background-position: center;
  position: relative;
}
.compound-hero-overlay {
  height: 100%;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(to top, rgba(10,22,38,0.85), rgba(10,22,38,0.1));
}
.compound-hero-overlay h1 { color: var(--color-white); font-size: 36px; margin-bottom: 4px; }
.compound-hero-overlay p { color: var(--color-gold); font-size: 16px; padding-bottom: 28px; }

.detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 48px;
  align-items: start;
}
.detail-main h2 { margin: 28px 0 12px; font-size: 22px; }
.detail-main h2:first-child { margin-top: 0; }
.fact-list { list-style: none; }
.fact-list li { padding: 8px 0; border-bottom: 1px solid #eee; }

.units-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.units-table th, .units-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}
.units-table th { color: var(--color-text-muted); font-weight: 600; }

/* ---------- Sidebar / inquiry form ---------- */
.inquiry-card {
  background: var(--color-cream);
  border-radius: 10px;
  padding: 24px;
  position: sticky;
  top: 24px;
}
.inquiry-card h3 { font-size: 18px; margin-bottom: 8px; }
.inquiry-card p { color: var(--color-text-muted); font-size: 14px; margin-bottom: 16px; }
.inquiry-form, .contact-form { display: flex; flex-direction: column; gap: 12px; }
.inquiry-form input, .inquiry-form textarea,
.contact-form input, .contact-form textarea {
  padding: 11px 13px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 14px;
}

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-block;
  background: var(--color-gold);
  color: var(--color-navy-dark);
  padding: 12px 26px;
  border-radius: 4px;
  border: none;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  font-size: 15px;
}
.btn-block { width: 100%; text-align: center; }

/* ---------- CTA section ---------- */
.cta-section { background: var(--color-cream); text-align: center; }
.cta-inline { margin-top: 24px; }

/* ---------- Flash messages ---------- */
.flash-wrap { padding-top: 16px; }
.flash {
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 12px;
  font-size: 14px;
}
.flash-success { background: #e5f6ea; color: #1b6e3c; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-navy-dark);
  color: #b7bdc8;
  padding: 48px 0 16px;
  margin-top: 40px;
}
.footer-columns {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 28px;
}
.footer-col h4 {
  color: var(--color-white);
  font-size: 15px;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.footer-col a {
  display: block;
  color: #b7bdc8;
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 10px;
}
.footer-col a:hover { color: var(--color-gold); }
.brand-footer { font-size: 20px; margin-bottom: 12px; }
.footer-tagline { font-size: 14px; line-height: 1.6; color: #9aa2b1; }
.footer-contact-line { font-size: 14px; margin-bottom: 10px; color: #9aa2b1; }
.footer-cta-link { color: var(--color-gold) !important; font-weight: 600; }
.footer-copy {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 16px;
  font-size: 13px;
  color: #7b8494;
}

/* ---------- Sell property steps ---------- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 12px;
}
.step-card {
  text-align: center;
  padding: 24px 16px;
}
.step-number {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-gold);
  color: var(--color-navy-dark);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.step-card h3 {
  font-size: 17px;
  margin-bottom: 8px;
}
.step-card p {
  color: var(--color-text-muted);
  font-size: 14px;
}

/* ---------- Admin: lead tabs ---------- */
.admin-lead-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid #e5e5e5;
}
.admin-lead-tab {
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: #6b7686;
  border-bottom: 2px solid transparent;
}
.admin-lead-tab:hover {
  color: #104480;
}
.admin-lead-tab.active {
  color: #104480;
  border-bottom-color: #c69d7a;
}
.admin-badge {
  display: inline-block;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 12px;
  background: #eef1f5;
  color: #6b7686;
}
.admin-badge-sell {
  background: rgba(198, 157, 122, 0.2);
  color: #8a6a2e;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .detail-grid { grid-template-columns: 1fr; }
  .main-nav a { margin-left: 16px; font-size: 14px; }
  .hero h1 { font-size: 30px; }
  .footer-columns { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .header-inner {
    flex-wrap: wrap;
    row-gap: 12px;
  }
  .brand img {
    height: 44px;
  }
  .main-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    width: 100%;
  }
  .main-nav a {
    margin-left: 0;
  }
  .nav-cta {
    margin-left: 0;
  }
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}
@media (max-width: 520px) {
  .footer-columns { grid-template-columns: 1fr; }
}
