/* ============================================================
   ZambiaRent – Main Stylesheet
   Font: Plus Jakarta Sans (loaded via Google Fonts in header)
   Color system:
     Primary blue:   #1a6fc4  (Bootstrap override via CSS var)
     Accent green:   #2ea44f
     Warm orange:    #f59e0b  (Bootstrap warning)
   ============================================================ */

/* ── Root & typography ──────────────────────────────────────── */
:root {
  --zr-blue:    #1a6fc4;
  --zr-green:   #2ea44f;
  --zr-orange:  #f59e0b;
  --zr-dark:    #1a1f2e;
  --zr-card-shadow: 0 2px 12px rgba(0,0,0,.08);
  --zr-card-hover:  0 6px 24px rgba(0,0,0,.14);
  --bs-primary: #1a6fc4;
  --bs-primary-rgb: 26,111,196;
  --bs-font-sans-serif: 'Plus Jakarta Sans', system-ui, sans-serif;
}

body {
  font-family: var(--bs-font-sans-serif);
  color: #2d2d3a;
  background: #f8f9fc;
  font-size: 15px;
}

a { text-decoration: none; }

/* ── Navbar ─────────────────────────────────────────────────── */
.navbar {
  background-color: var(--zr-blue) !important;
}
.navbar-brand { letter-spacing: -.3px; }
.nav-link { font-weight: 500; font-size: 14px; }

/* ── Hero / search banner ───────────────────────────────────── */
.hero-section {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: center;
  background-image: url('../images/logo.png');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  padding: 72px 0 56px;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.64) 0%, rgba(0,0,0,.46) 42%, rgba(0,0,0,.28) 100%);
  z-index: 1;
}
.hero-section .container {
  position: relative;
  z-index: 2;
}
.hero-section h1 {
  font-size: clamp(2.8rem, 5vw, 4.25rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.05;
  text-shadow: 0 4px 22px rgba(0,0,0,.34);
}
.hero-section .lead {
  max-width: 650px;
  line-height: 1.6;
  text-shadow: 0 2px 14px rgba(0,0,0,.35);
}
.hero-search-card {
  width: 100%;
  max-width: 560px;
  margin-left: auto;
  background: rgba(255,255,255,.97);
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 22px;
  padding: 30px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  backdrop-filter: blur(6px);
}
.hero-search-card .form-control,
.hero-search-card .form-select {
  border-color: #dde1e9;
  font-size: 14px;
}
.hero-search-card .form-control:focus,
.hero-search-card .form-select:focus {
  border-color: var(--zr-blue);
  box-shadow: 0 0 0 3px rgba(26,111,196,.12);
}

/* Homepage entry actions */
.home-actions-section {
  background: #fff;
  border-bottom: 1px solid #eef0f5;
  padding: 24px 0;
}

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

.home-action-card {
  align-items: center;
  background: #fff;
  border: 1px solid #e7ebf2;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, .06);
  color: #1a1f2e;
  display: grid;
  gap: 14px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 112px;
  padding: 18px;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.home-action-card:hover {
  border-color: var(--zr-blue);
  box-shadow: 0 10px 28px rgba(26, 111, 196, .13);
  color: #1a1f2e;
  transform: translateY(-2px);
}

.home-action-icon {
  align-items: center;
  border-radius: 8px;
  display: flex;
  font-size: 24px;
  height: 54px;
  justify-content: center;
  width: 54px;
}

.home-action-icon.blue { background: #e8f0fd; color: var(--zr-blue); }
.home-action-icon.green { background: #e8f7ee; color: var(--zr-green); }
.home-action-icon.orange { background: #fff4df; color: #d97706; }

.home-action-copy strong,
.home-action-copy small {
  display: block;
}

.home-action-copy strong {
  font-size: 16px;
  margin-bottom: 4px;
}

.home-action-copy small {
  color: #6b7280;
  font-size: 13px;
  line-height: 1.45;
}

.home-action-arrow {
  color: var(--zr-blue);
  font-size: 18px;
}

/* ── Section headings ───────────────────────────────────────── */
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -.3px;
}
.section-subtitle {
  color: #6b7280;
  font-size: 15px;
}

/* ── Property card ──────────────────────────────────────────── */
.property-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--zr-card-shadow);
  transition: box-shadow .22s ease, transform .22s ease;
  border: 1px solid #eef0f5;
  height: 100%;
}
.property-card:hover {
  box-shadow: var(--zr-card-hover);
  transform: translateY(-3px);
}
.property-card .card-img-wrap {
  position: relative;
  overflow: hidden;
  height: 210px;
}
.property-card .card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.property-card:hover .card-img-wrap img {
  transform: scale(1.04);
}
.property-card .badge-type {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--zr-blue);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 3px 8px;
  border-radius: 6px;
}
.property-card .badge-status-pending {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(245,158,11,.92);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
}
.property-card .fav-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255,255,255,.9);
  border: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s;
  font-size: 15px;
}
.property-card .fav-btn:hover { background: #fff; }
.property-card .fav-btn.active { color: #e03d3d; }

.property-card .card-body { padding: 16px; }
.property-card .price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--zr-blue);
}
.property-card .price span {
  font-size: 12px;
  font-weight: 400;
  color: #6b7280;
}
.property-card .card-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: #1a1f2e;
  margin: 4px 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.property-card .location {
  font-size: 13px;
  color: #6b7280;
}
.property-card .meta {
  font-size: 12.5px;
  color: #6b7280;
  border-top: 1px solid #f0f1f5;
  padding-top: 10px;
  margin-top: 10px;
  gap: 12px;
}
.property-card .meta i { color: var(--zr-blue); }

/* ── Stats bar (city overview) ──────────────────────────────── */
.city-stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  border: 1px solid #eef0f5;
  transition: box-shadow .2s;
  cursor: pointer;
}
.city-stat-card:hover {
  box-shadow: var(--zr-card-hover);
}
.city-stat-card .city-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(26,111,196,.1);
  color: var(--zr-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin: 0 auto 10px;
}
.city-stat-card .city-name {
  font-weight: 700;
  font-size: 15px;
  color: #1a1f2e;
}
.city-stat-card .city-count {
  font-size: 13px;
  color: #6b7280;
}

/* ── Property detail page ───────────────────────────────────── */
.gallery-main img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: 14px;
}
.gallery-thumb img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  opacity: .75;
  transition: opacity .2s;
  border: 2px solid transparent;
}
.gallery-thumb img:hover,
.gallery-thumb img.active {
  opacity: 1;
  border-color: var(--zr-blue);
}
.detail-info-card {
  background: #fff;
  border-radius: 14px;
  padding: 24px;
  box-shadow: var(--zr-card-shadow);
}
.amenity-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f0f6ff;
  color: #1a5fa8;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
}
.amenity-badge.off {
  background: #f5f5f7;
  color: #9ca3af;
}
.contact-card {
  background: #fff;
  border-radius: 14px;
  padding: 24px;
  box-shadow: var(--zr-card-shadow);
  position: sticky;
  top: 80px;
}
.whatsapp-btn {
  background: #25d366;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background .2s;
  text-decoration: none;
}
.whatsapp-btn:hover { background: #1ebe5d; color: #fff; }

/* ── Auth pages ─────────────────────────────────────────────── */
.auth-card {
  background: #fff;
  border-radius: 18px;
  padding: 40px;
  box-shadow: 0 8px 40px rgba(0,0,0,.1);
  max-width: 480px;
  width: 100%;
}

/* ── Dashboard ──────────────────────────────────────────────── */
.stat-card {
  background: #fff;
  border-radius: 14px;
  padding: 24px;
  box-shadow: var(--zr-card-shadow);
  border-left: 4px solid var(--zr-blue);
}
.stat-card.green  { border-left-color: var(--zr-green); }
.stat-card.orange { border-left-color: var(--zr-orange); }
.stat-card.red    { border-left-color: #ef4444; }
.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #1a1f2e;
}
.stat-card .stat-label {
  font-size: 13px;
  color: #6b7280;
}

/* ── Table ──────────────────────────────────────────────────── */
.table-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--zr-card-shadow);
  overflow: hidden;
}
.table-card table th {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #6b7280;
  background: #f8f9fc;
  border-bottom: 1px solid #eef0f5;
}
.table-card table td { vertical-align: middle; font-size: 14px; }

/* ── Status badges ──────────────────────────────────────────── */
.badge-active   { background: #dcfce7; color: #166534; }
.badge-pending  { background: #fef9c3; color: #854d0e; }
.badge-rejected { background: #fee2e2; color: #991b1b; }
.badge-archived { background: #f1f5f9; color: #475569; }

/* ── Pagination ─────────────────────────────────────────────── */
.pagination .page-link {
  border-radius: 8px !important;
  margin: 0 2px;
  font-size: 14px;
  color: var(--zr-blue);
}
.pagination .page-item.active .page-link {
  background: var(--zr-blue);
  border-color: var(--zr-blue);
}

/* ── Google Map embed ───────────────────────────────────────── */
.map-container {
  width: 100%;
  height: 300px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #eef0f5;
}
.map-container iframe { width: 100%; height: 100%; border: none; }

/* ── Search sidebar ─────────────────────────────────────────── */
.filter-card {
  background: #fff;
  border-radius: 14px;
  padding: 22px;
  box-shadow: var(--zr-card-shadow);
  position: sticky;
  top: 76px;
}
.filter-card .form-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

/* ── Utilities ──────────────────────────────────────────────── */
.btn-primary {
  background-color: var(--zr-blue);
  border-color: var(--zr-blue);
}
.btn-primary:hover {
  background-color: #155fa0;
  border-color: #155fa0;
}
.bg-primary { background-color: var(--zr-blue) !important; }
.text-primary { color: var(--zr-blue) !important; }

.rounded-xl { border-radius: 14px !important; }
.fw-600 { font-weight: 600 !important; }

/* ── Responsive tweaks ──────────────────────────────────────── */
@media (max-width: 767px) {
  .hero-section {
    min-height: auto;
    padding: 48px 0 36px;
    background-position: center center;
  }
  .hero-section::before {
    background: rgba(0,0,0,.58);
  }
  .hero-section .row {
    text-align: center;
  }
  .hero-section .col-lg-5 .d-flex {
    justify-content: center;
  }
  .hero-section h1 {
    font-size: 2.55rem;
  }
  .hero-search-card {
    max-width: none;
    margin: 0;
    padding: 20px;
    border-radius: 18px;
  }
  .home-actions { grid-template-columns: 1fr; }
  .home-action-card { min-height: 96px; }
  .gallery-main img { height: 240px; }
  .auth-card { padding: 28px 20px; }
}
