/* ============================================
   APEX Real Estate (景峰物業) — Site Stylesheet
   Brand colors match APEX's existing listing videos.
   ============================================ */

:root {
  --forest-dark: #1F4423;   /* primary brand green */
  --sage: #4A7C59;          /* secondary/accent green */
  --cream: #F5F0E8;         /* light background / logo box */
  --logo-green: #2A5C1A;    /* APEX wordmark green */
  --white: #FFFFFF;
  --text: #23301F;          /* body text, green-tinted near-black */
  --text-muted: #5C6B57;
  --border: #E3DFD4;
  --danger-gold: #B8863B;   /* used sparingly for "for sale" price emphasis */
  --shadow: 0 4px 16px rgba(31, 68, 35, 0.10);
  --shadow-lg: 0 8px 32px rgba(31, 68, 35, 0.16);
  --radius: 10px;
  --max-width: 1140px;
  --font: "Noto Sans HK", "PingFang HK", "Microsoft JhengHei", "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

ul { list-style: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Typography ---------- */

h1, h2, h3, h4 {
  font-weight: 700;
  color: var(--forest-dark);
  line-height: 1.35;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; margin-bottom: 6px; }
h3 { font-size: 1.15rem; }

.eyebrow {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sage);
  font-weight: 700;
  margin-bottom: 6px;
}

.en-sub {
  display: block;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 2px;
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 36px;
}

.section-head p {
  color: var(--text-muted);
  margin-top: 10px;
}

section { padding: 56px 0; }
section.alt { background: var(--cream); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--forest-dark);
  color: var(--white);
}
.btn-primary:hover { background: #163419; box-shadow: var(--shadow); }

.btn-whatsapp {
  background: #25D366;
  color: var(--white);
}
.btn-whatsapp:hover { background: #1ebe5a; box-shadow: var(--shadow); }

.btn-outline {
  background: transparent;
  color: var(--forest-dark);
  border-color: var(--forest-dark);
}
.btn-outline:hover { background: var(--forest-dark); color: var(--white); }

.btn-block { width: 100%; justify-content: center; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Header / Nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo-mark {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-logo {
  height: 42px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--forest-dark);
  border-bottom-color: var(--sage);
}

.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-cta .btn-primary-icon { display: none; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  width: 24px;
  height: 2.5px;
  background: var(--forest-dark);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------- Seller banner (Home only) ---------- */

.seller-banner {
  background: var(--sage);
  color: var(--white);
  padding: 10px 0;
}
.seller-banner-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  text-align: center;
}
.seller-banner-text {
  font-size: 0.88rem;
  font-weight: 600;
}
.seller-banner-text .en-sub {
  color: rgba(255,255,255,0.85);
  font-weight: 400;
}
.seller-banner .btn {
  padding: 7px 16px;
  font-size: 0.82rem;
  white-space: nowrap;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  color: var(--white);
  padding: 90px 0 70px;
  background: linear-gradient(180deg, rgba(20,45,23,0.72), rgba(20,45,23,0.86)), var(--hero-img, none) center/cover no-repeat;
}

.hero .eyebrow { color: var(--cream); opacity: 0.9; }

.hero h1 {
  color: var(--white);
  font-size: 2.3rem;
  margin-bottom: 14px;
}

.hero h1 .cn { display: block; }
.hero h1 .en {
  display: block;
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--cream);
  margin-top: 8px;
  letter-spacing: 0.02em;
}

.hero p.lead {
  max-width: 560px;
  color: var(--cream);
  font-size: 1.02rem;
  margin-bottom: 26px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}
.hero-badge {
  background: rgba(245,240,232,0.14);
  border: 1px solid rgba(245,240,232,0.35);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.85rem;
}

/* ---------- Page header banner (non-home pages) ---------- */

.page-banner {
  background: var(--forest-dark);
  color: var(--white);
  padding: 52px 0 40px;
  text-align: center;
}
.page-banner h1 { color: var(--white); }
.page-banner .en-sub { color: var(--cream); opacity: 0.85; }
.page-banner .eyebrow { color: var(--cream); }

/* ---------- Estate highlight cards (Home) ---------- */

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

.estate-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.estate-card .tag {
  display: inline-block;
  background: var(--cream);
  color: var(--forest-dark);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.estate-card h3 { margin-bottom: 4px; }
.estate-card p { color: var(--text-muted); font-size: 0.92rem; margin-top: 8px; }

/* ---------- Listing cards ---------- */

.listing-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}
.filter-btn {
  background: var(--white);
  border: 1.5px solid var(--border);
  color: var(--text);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.filter-btn.active,
.filter-btn:hover {
  background: var(--forest-dark);
  border-color: var(--forest-dark);
  color: var(--white);
}

.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.listing-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.listing-photo {
  height: 190px;
  background: linear-gradient(135deg, var(--forest-dark), var(--sage));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: var(--white);
}
.listing-photo .badge-circle {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--sage);
  border: 3px solid rgba(255,255,255,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font-weight: 700;
  font-size: 0.95rem;
  text-align: center;
  line-height: 1.15;
}
.listing-photo .badge-circle small { font-size: 0.6rem; font-weight: 500; opacity: 0.85; }

.listing-status {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--white);
  color: var(--forest-dark);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
}
.listing-status.rent { background: var(--cream); }

.listing-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }

.listing-body h3 { margin-bottom: 2px; }
.listing-body .block-info { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 12px; }

.listing-price {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--forest-dark);
  margin-bottom: 14px;
}
.listing-price .en { font-size: 0.78rem; font-weight: 400; color: var(--text-muted); display: block; }

.listing-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
  font-size: 0.87rem;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--border);
}
.listing-specs div span {
  display: block;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.listing-features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}
.listing-features span {
  background: var(--cream);
  color: var(--forest-dark);
  font-size: 0.76rem;
  padding: 4px 10px;
  border-radius: 999px;
}

.listing-body .btn { margin-top: auto; }

.listing-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  grid-column: 1 / -1;
}

.listings-note {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 18px 22px;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 34px;
}

/* ---------- Neighbourhood guide ---------- */

.hood-block {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}
.hood-block:last-child { border-bottom: none; }

.hood-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.hood-header .num {
  font-size: 1rem;
  font-weight: 700;
  color: var(--sage);
}
.hood-header h2 { font-size: 1.85rem; }
.hood-header .en-sub { font-size: 1.02rem; }

.hood-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.hood-tags span {
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--forest-dark);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
}

.hood-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 14px;
}
.hood-col h4 {
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--sage);
  margin-bottom: 6px;
}
.hood-col p { font-size: 1.08rem; color: var(--text); }

/* ---------- Tips / market updates ---------- */

.tip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}
.tip-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.tip-card .tip-cat {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--sage);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}
.tip-card p { color: var(--text-muted); font-size: 0.92rem; margin-top: 8px; }

/* ---------- About ---------- */

.about-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  align-items: center;
}
.about-hero img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 30px;
}
.value-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.value-card h4 { color: var(--forest-dark); font-size: 1rem; margin-bottom: 6px; }
.value-card p { font-size: 0.88rem; color: var(--text-muted); }

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 30px;
}
.team-card {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.team-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--forest-dark);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}
.team-card h4 { font-size: 0.98rem; margin-bottom: 2px; }
.team-card .role { font-size: 0.78rem; color: var(--text-muted); }
.team-card .license { font-size: 0.72rem; color: var(--sage); margin-top: 4px; }

.license-note {
  margin-top: 30px;
  font-size: 0.82rem;
  color: var(--text-muted);
  background: var(--cream);
  padding: 14px 18px;
  border-radius: var(--radius);
}

/* ---------- Testimonials ---------- */

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}
.testimonial-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  position: relative;
}
.testimonial-card .sample-tag {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--sage);
  background: var(--cream);
  padding: 3px 9px;
  border-radius: 999px;
}
.testimonial-card .stars { color: var(--danger-gold); font-size: 0.95rem; margin-bottom: 12px; }
.testimonial-card p.quote { font-size: 0.95rem; color: var(--text); margin-bottom: 16px; font-style: italic; }
.testimonial-card .author { font-size: 0.85rem; font-weight: 700; color: var(--forest-dark); }
.testimonial-card .author .en { font-weight: 400; color: var(--text-muted); font-size: 0.78rem; }

.testimonial-callout {
  margin-top: 34px;
  text-align: center;
  background: var(--cream);
  border-radius: var(--radius);
  padding: 24px;
}

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.contact-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.contact-card h3 { margin-bottom: 12px; }
.contact-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.contact-row:last-child { border-bottom: none; }
.contact-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--cream);
  color: var(--forest-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}
.contact-row .label { font-size: 0.78rem; color: var(--text-muted); }
.contact-row .value { font-weight: 700; font-size: 0.98rem; }
.contact-row .value.en { font-weight: 400; font-size: 0.82rem; color: var(--text-muted); }

.social-row { display: flex; gap: 12px; margin-top: 16px; }
.social-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--forest-dark);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.social-btn:hover { background: var(--sage); }

.map-embed {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.map-embed iframe { width: 100%; height: 280px; border: 0; display: block; }

/* ---------- CTA band ---------- */

.cta-band {
  background: var(--forest-dark);
  color: var(--white);
  text-align: center;
  padding: 48px 0;
}
.cta-band h2 { color: var(--white); }
.cta-band p { color: var(--cream); margin-bottom: 22px; }
.cta-band .btn-row { justify-content: center; }

/* ---------- Footer ---------- */

.site-footer {
  background: #14311A;
  color: var(--cream);
  padding: 48px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 30px;
}
.footer-col h4 {
  color: var(--white);
  font-size: 0.9rem;
  margin-bottom: 14px;
  letter-spacing: 0.03em;
}
.footer-col p, .footer-col a {
  font-size: 0.86rem;
  color: rgba(245,240,232,0.75);
  display: block;
  margin-bottom: 8px;
}
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(245,240,232,0.15);
  padding-top: 20px;
  font-size: 0.78rem;
  color: rgba(245,240,232,0.55);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}

/* ---------- WhatsApp floating button ---------- */

.wa-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 200;
  background: #25D366;
  color: var(--white);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  font-size: 1.6rem;
}
.wa-float:hover { transform: scale(1.06); }

/* ============================================
   Responsive — mobile-first breakpoints
   ============================================ */

@media (max-width: 780px) {
  .nav-links {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 20px 18px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.18s ease, opacity 0.18s ease;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links a { width: 100%; padding: 12px 0; border-bottom: 1px solid var(--border); }
  .nav-links a:last-child { border-bottom: none; }
  .nav-toggle { display: flex; }
  .nav-cta .btn-primary { padding: 13px 16px; }
  .nav-cta .btn-primary-text { display: none; }
  .nav-cta .btn-primary-icon { display: inline; }
  .estate-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.7rem; }
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.3rem; }
}

@media (min-width: 640px) {
  .hood-cols { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 860px) {
  .about-hero { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1.1fr 0.9fr; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}
