/* =========================================================
   BIEN NHA — Real Estate Stylesheet
   Convention: BEM (block__element--modifier)
   Bootstrap 5.3 utilities still available for layout
   ========================================================= */

/* ---------- 1. DESIGN TOKENS ---------- */
:root {
  /* Brand palette */
  --color-navy:        #0E2A47;
  --color-navy-2:      #163657;
  --color-navy-dark:   #0B1F36;
  --color-gold:        #B0895A;
  --color-gold-2:      #957244;
  --color-gold-soft:   #F4EEE3;

  /* Surfaces & ink */
  --color-bg:          #FAFAF6;
  --color-bg-soft:     #F5F2EA;
  --color-surface:     #FFFFFF;
  --color-ink:         #14202E;
  --color-ink-2:       #2A3647;
  --color-muted:       #6C7689;
  --color-line:        #E6E3DB;
  --color-line-2:      #F0EDE6;

  /* Status colors */
  --status-open:       #1F7A4D;
  --status-soon:       #C77A1A;
  --status-handed:     #6C7689;

  /* Typography */
  --font-sans:  "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Cormorant Garamond", "Times New Roman", serif;

  /* Spacing scale */
  --space-1:  4px;
  --space-2:  8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 88px;

  /* Radii */
  --radius:    12px;
  --radius-sm:  8px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(20,32,46,.04);
  --shadow-md: 0 8px 24px -8px rgba(20,32,46,.12);
  --shadow-lg: 0 24px 48px -16px rgba(20,32,46,.18);

  /* Transitions */
  --t-fast: .2s ease;
  --t-base: .25s ease;
  --t-slow: .35s cubic-bezier(.2,.7,.2,1);
}

/* ---------- 2. BASE ---------- */
* { -webkit-font-smoothing: antialiased; }
html { scroll-behavior: smooth; }
body {
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-weight: 400;
  letter-spacing: -.005em;
}
img { max-width: 100%; display: block; }
.u-font-serif { font-family: var(--font-serif); font-weight: 500; letter-spacing: -.01em; }

/* ---------- 3. BUTTONS ---------- */
.btn {
  border-radius: var(--radius-sm);
  font-weight: 500;
  padding: .7rem 1.4rem;
  transition: all var(--t-base);
}
.btn--navy        { background: var(--color-navy); color: #fff; border: 1px solid var(--color-navy); }
.btn--navy:hover  { background: var(--color-navy-2); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn--gold        { background: var(--color-gold); color: #fff; border: 1px solid var(--color-gold); }
.btn--gold:hover  { background: var(--color-gold-2); color: #fff; }
.btn--outline-navy        { background: transparent; color: var(--color-navy); border: 1px solid var(--color-navy); }
.btn--outline-navy:hover  { background: var(--color-navy); color: #fff; }
.btn--ghost        { background: transparent; color: var(--color-ink); border: 1px solid var(--color-line); }
.btn--ghost:hover  { border-color: var(--color-ink); }

/* ---------- 4. SECTION HELPERS ---------- */
.section { padding: var(--space-9) 0; }
@media (max-width: 768px) { .section { padding: 56px 0; } }

.eyebrow {
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--color-gold); font-weight: 600;
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 24px; height: 1px; background: var(--color-gold); }

.section-title {
  font-family: var(--font-serif); font-weight: 500;
  font-size: clamp(2rem, 3.4vw, 3rem); line-height: 1.1;
  color: var(--color-navy); letter-spacing: -.01em;
  margin: 12px 0 0;
}
.section-lead {
  color: var(--color-muted); max-width: 56ch;
  font-size: 16px; line-height: 1.7;
}

/* ---------- 5. SITE HEADER ---------- */
.site-topbar {
  background: var(--color-navy-dark);
  color: rgba(255,255,255,.72);
  font-size: 13px; padding: 8px 0;
}
.site-topbar a { color: rgba(255,255,255,.72); text-decoration: none; }
.site-topbar a:hover { color: #fff; }

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--color-line);
  padding: 18px 0;
}
.site-header__brand {
  font-family: var(--font-serif);
  font-size: 28px; font-weight: 600;
  color: var(--color-navy);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 10px;
}
.site-header__brand-mark {
  width: 34px; height: 34px;
  border: 1.5px solid var(--color-gold);
  color: var(--color-gold);
  font-family: var(--font-serif); font-size: 14px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.site-header__nav-link {
  color: var(--color-ink); font-size: 14px; font-weight: 500;
  padding: 8px 16px; position: relative; text-decoration: none;
}
.site-header__nav-link:hover,
.site-header__nav-link--active { color: var(--color-navy); }
.site-header__nav-link--active::after {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: -4px;
  height: 2px; background: var(--color-gold);
}

/* ---------- 6. SITE FOOTER ---------- */
.site-footer {
  background: var(--color-navy-dark);
  color: rgba(255,255,255,.7);
  padding: 64px 0 24px;
  font-size: 14px;
}
.site-footer__title {
  color: #fff; font-size: 13px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  margin-bottom: 18px;
}
.site-footer__brand { color: #fff; font-family: var(--font-serif); font-size: 26px; }
.site-footer a { color: rgba(255,255,255,.7); text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer__bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 24px; margin-top: 48px;
  font-size: 13px; color: rgba(255,255,255,.5);
}

/* ---------- 7. HERO ---------- */
.hero {
  position: relative;
  min-height: 88vh;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(11,31,54,.55) 0%, rgba(11,31,54,.72) 100%),
    var(--hero-bg, url("https://picsum.photos/seed/luxury-hero/1920/1200")) center/cover no-repeat;
  display: flex; align-items: center;
  padding: 100px 0 80px;
}
.hero__eyebrow { color: #E8C998; }
.hero__eyebrow::before { background: #E8C998; }
.hero__title {
  font-family: var(--font-serif); font-weight: 500;
  font-size: clamp(2.6rem, 6vw, 5.2rem); line-height: 1.02;
  letter-spacing: -.015em;
  margin: 18px 0 22px; max-width: 18ch;
}
.hero__lead {
  font-size: 17px; color: rgba(255,255,255,.82);
  max-width: 56ch; line-height: 1.65;
}
.hero__meta {
  position: absolute; left: 0; right: 0; bottom: 0;
  border-top: 1px solid rgba(255,255,255,.15);
  background: rgba(11,31,54,.4); backdrop-filter: blur(8px);
  padding: 20px 0; font-size: 13px;
}
.hero__meta-item { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.85); }
.hero__meta-item i { color: #E8C998; font-size: 18px; }

.hero-search {
  background: rgba(255,255,255,.98);
  border-radius: 14px;
  padding: 10px;
  box-shadow: var(--shadow-lg);
  margin-top: 36px;
  max-width: 760px;
}
.hero-search__col      { border-right: 1px solid var(--color-line-2); }
.hero-search__col:last-of-type { border-right: 0; }
.hero-search__label {
  font-size: 11px; letter-spacing: .15em; text-transform: uppercase;
  color: var(--color-muted); font-weight: 600;
  padding-left: 16px; margin-bottom: -4px; margin-top: 8px;
}
.hero-search .form-select,
.hero-search .form-control {
  border: 0; background: transparent; padding: 14px 16px; font-size: 14px;
}
@media (max-width: 768px) {
  .hero-search__col { border-right: 0; border-bottom: 1px solid var(--color-line-2); }
  .hero-search__col:last-of-type { border-bottom: 0; }
}

/* ---------- 8. PROPERTY CARD (repeat unit) ---------- */
.property-card {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  overflow: hidden;
  display: block; height: 100%;
  color: inherit; text-decoration: none;
  transition: transform var(--t-slow), box-shadow var(--t-slow), border-color var(--t-base);
}
.property-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: #DAD4C6;
  color: inherit;
}
.property-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #EDE9DF;
  overflow: hidden;
}
.property-card__image {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s ease;
}
.property-card:hover .property-card__image { transform: scale(1.06); }

.property-card__badge {
  position: absolute;
  font-size: 11px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: #fff;
  display: inline-flex; align-items: center; gap: 6px;
  box-shadow: var(--shadow-sm);
}
.property-card__badge--status        { top: 14px; left: 14px; }
.property-card__badge--status::before{
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor;
}
.property-card__badge--status-open    { color: var(--status-open); }
.property-card__badge--status-soon    { color: var(--status-soon); }
.property-card__badge--status-handed  { color: var(--status-handed); }

.property-card__badge--price {
  bottom: 14px; right: 14px;
  background: rgba(11,31,54,.82);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 15px;
  padding: 8px 14px;
  border-radius: 8px;
  text-transform: none; letter-spacing: -.01em;
}

.property-card__body { padding: 22px 22px 20px; }
.property-card__name {
  font-family: var(--font-serif); font-weight: 600;
  font-size: 22px; color: var(--color-navy);
  line-height: 1.2; margin: 0 0 6px;
}
.property-card__location {
  color: var(--color-muted); font-size: 14px;
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 16px;
}
.property-card__specs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border-top: 1px solid var(--color-line-2);
  padding-top: 14px;
  font-size: 13px;
  color: var(--color-ink-2);
}
.property-card__spec {
  display: flex; align-items: center; gap: 6px;
  padding: 0 10px;
  border-right: 1px solid var(--color-line-2);
}
.property-card__spec:last-child  { border-right: 0; }
.property-card__spec:first-child { padding-left: 0; }
.property-card__spec i           { color: var(--color-gold); font-size: 15px; }

/* ---------- 9. FILTER BAR ---------- */
.filter-bar {
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: -40px;
  position: relative; z-index: 3;
  box-shadow: var(--shadow-md);
}
.filter-bar__label {
  font-size: 11px; letter-spacing: .15em; text-transform: uppercase;
  color: var(--color-muted); font-weight: 600;
}
.filter-bar__field {
  padding: .65rem .9rem; font-size: 14px;
}

/* ---------- 10. SPEC TABLE (detail) ---------- */
.spec-table {
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  overflow: hidden;
}
.spec-table__row {
  display: grid; grid-template-columns: 1fr 1fr;
  padding: 16px 22px;
  border-bottom: 1px solid var(--color-line-2);
}
.spec-table__row:last-child { border-bottom: 0; }
.spec-table__label {
  color: var(--color-muted); font-size: 14px;
  display: flex; align-items: center; gap: 10px;
}
.spec-table__label i { color: var(--color-gold); font-size: 17px; width: 20px; }
.spec-table__value {
  color: var(--color-navy); font-weight: 500; font-size: 15px;
  text-align: right;
}

/* ---------- 11. GALLERY (detail) ---------- */
.gallery__main {
  aspect-ratio: 16/10;
  border-radius: var(--radius);
  overflow: hidden;
  background: #EDE9DF;
  position: relative;
}
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }

.gallery__thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px; margin-top: 12px;
}
.gallery__thumb {
  aspect-ratio: 4/3; border-radius: 8px; overflow: hidden;
  border: 2px solid transparent; background: #EDE9DF;
  padding: 0; cursor: pointer;
  transition: border-color var(--t-fast);
}
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb--active { border-color: var(--color-gold); }

/* ---------- 12. LEAD FORM ---------- */
.lead-form {
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-md);
}
.lead-form__header {
  border-bottom: 1px solid var(--color-line-2);
  padding-bottom: 18px; margin-bottom: 18px;
}
.lead-form__title {
  font-family: var(--font-serif); color: var(--color-navy);
  font-size: 22px; font-weight: 600; margin: 0 0 4px;
}
.lead-form__subtitle { margin: 0; font-size: 13px; color: var(--color-muted); }
.lead-form .form-label { font-size: 13px; font-weight: 500; color: var(--color-ink-2); margin-bottom: 6px; }
.lead-form .form-control,
.lead-form .form-select {
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-line);
  padding: .8rem 1rem; font-size: 14.5px;
  background: #fff;
}
.lead-form .form-control:focus,
.lead-form .form-select:focus {
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(176,137,90,.15);
}

/* dark variant for use on navy CTA section */
.lead-form--on-dark { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.1); }
.lead-form--on-dark .form-control,
.lead-form--on-dark .form-select {
  background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); color: #fff;
}
.lead-form--on-dark .form-control::placeholder { color: rgba(255,255,255,.4); }
.lead-form--on-dark .form-label { color: rgba(255,255,255,.75); }

/* ---------- 13. PAGINATION ---------- */
.pagination .page-link {
  color: var(--color-navy);
  border: 1px solid var(--color-line);
  border-radius: 6px !important;
  margin: 0 4px; padding: .55rem .9rem; font-size: 14px;
}
.pagination .page-item.active .page-link {
  background: var(--color-navy); border-color: var(--color-navy); color: #fff;
}
.pagination .page-link:hover {
  background: var(--color-gold-soft); color: var(--color-navy); border-color: var(--color-gold);
}
