/* =========================================================
   ESTATEFOLIO — Real Estate Blog Theme
   Palette: Navy #1B2430 / Slate #2E3B4E / Bone #F7F5F2 / Gold #C8A165 / Ink #0F141C
   Type: "Fraunces"-style serif for display (fallback Georgia), Inter for body
   ========================================================= */

:root {
  --navy: #1B2430;
  --navy-2: #232F3F;
  --ink: #0F141C;
  --bone: #F7F5F2;
  --bone-2: #EFEBE3;
  --gold: #C8A165;
  --gold-dark: #A9834E;
  --text: #2A2F36;
  --muted: #6B7280;
  --line: #E4E0D8;
  --white: #FFFFFF;
  --radius: 6px;
  --shadow: 0 10px 30px rgba(15, 20, 28, 0.08);
  --shadow-lg: 0 20px 50px rgba(15, 20, 28, 0.18);
  --maxw: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { max-width: 100%; overflow-x: hidden; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  color: var(--text);
  background: var(--bone);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .display {
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  color: var(--navy);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 .5em;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------------- Eyebrow / Section labels ---------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-dark);
  font-weight: 700;
  margin-bottom: 10px;
}
.eyebrow::before {
  content: '';
  width: 22px;
  height: 2px;
  background: var(--gold);
  display: inline-block;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.section-head h2 { font-size: clamp(26px, 3vw, 34px); margin: 0; }
.section-head .see-all {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  border-bottom: 1px solid var(--gold);
  padding-bottom: 2px;
  white-space: nowrap;
}
.section-head .see-all:hover { color: var(--gold-dark); }

section { padding: 64px 0; }
.section-tight { padding: 40px 0; }
.bg-navy { background: var(--navy); color: var(--bone); }
.bg-navy h2, .bg-navy h3 { color: var(--white); }

/* ================= HEADER ================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(247, 245, 242, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 24px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo img { height: 38px; width: auto; }

.header-search {
  flex: 1;
  max-width: 420px;
  margin: 0 auto;
}
.header-search form {
  display: flex;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 6px 6px 18px;
}
.header-search input {
  border: none;
  outline: none;
  flex: 1;
  font-size: 14px;
  background: transparent;
  padding: 8px 4px;
  font-family: inherit;
}
.header-search button {
  background: var(--navy);
  color: var(--bone);
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .2s;
}
.header-search button:hover { background: var(--gold-dark); }
.header-search svg { width: 16px; height: 16px; }

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  position: relative;
  padding: 6px 0;
}
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--gold);
  transition: width .2s ease;
}
.main-nav a:hover::after,
.main-nav a.active::after { width: 100%; }
.main-nav a.active { color: var(--gold-dark); }

.header-cta {
  background: var(--gold);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background .2s, transform .2s;
}
.header-cta:hover { background: var(--gold-dark); transform: translateY(-1px); }

.nav-mobile-cta { display: none; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: '';
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  position: relative;
  transition: all .2s;
}
.nav-toggle span::before { position: absolute; top: -7px; }
.nav-toggle span::after { position: absolute; top: 7px; }

/* ================= HERO ================= */
.hero {
  position: relative;
  background: linear-gradient(160deg, var(--navy) 0%, var(--ink) 100%);
  color: var(--bone);
  overflow: hidden;
  padding: 90px 0 100px;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../images/hero-bg.jpg') center/cover no-repeat;
  opacity: .35;
  mix-blend-mode: luminosity;
}
.hero-inner {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
.hero .eyebrow { color: var(--gold); }
.hero .eyebrow::before { background: var(--gold); }
.hero h1 {
  color: var(--white);
  font-size: clamp(34px, 5.5vw, 58px);
  max-width: 780px;
  margin-bottom: 18px;
}
.hero p.lead {
  max-width: 560px;
  font-size: 17px;
  color: #C9CFD8;
  margin-bottom: 32px;
}
.hero-stats {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 44px;
  border-top: 1px solid rgba(255,255,255,.14);
  padding-top: 28px;
}
.hero-stats div strong {
  display: block;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 30px;
  color: var(--gold);
}
.hero-stats div span {
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #9AA3B0;
}

/* ================= BLOG GRID ================= */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
}
.blog-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

.blog-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}
.blog-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }

.card-media {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bone-2);
}
.card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.blog-card:hover .card-media img { transform: scale(1.06); }

.badge-popular {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--gold);
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 4px 10px rgba(0,0,0,.2);
}
.badge-popular svg { width: 12px; height: 12px; }

.price-tag {
  position: absolute;
  bottom: 12px; left: 12px;
  background: var(--navy);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 4px;
}

.card-body {
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-type {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 8px;
}
.card-title {
  font-size: 18px;
  margin-bottom: 8px;
  line-height: 1.3;
}
.card-title a:hover { color: var(--gold-dark); }
.card-loc {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
}
.card-loc svg { width: 14px; height: 14px; flex-shrink: 0; }

.card-meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.card-meta .meta-item { display: flex; align-items: center; gap: 5px; }
.card-meta svg { width: 14px; height: 14px; }

/* list layout for Projects page */
.blog-grid.list-view { grid-template-columns: 1fr; }
.blog-grid.list-view .blog-card { flex-direction: row; }
.blog-grid.list-view .card-media { width: 320px; flex-shrink: 0; aspect-ratio: auto; }
.blog-grid.list-view .card-body { padding: 22px 26px; }
.blog-grid.list-view .card-title { font-size: 21px; }
.blog-grid.list-view .summary { color: var(--muted); font-size: 14px; margin: 0 0 14px; }

/* ================= FILTER BAR (projects page) ================= */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 30px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.filter-bar .count { font-size: 14px; color: var(--muted); }
.filter-bar .sort-note {
  font-size: 13px;
  color: var(--navy);
  font-weight: 600;
  display: flex; align-items: center; gap: 6px;
}
.filter-bar svg { width: 15px; height: 15px; color: var(--gold-dark); }

/* ================= SLIDER (single blog page) ================= */
.slider {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--bone-2);
  box-shadow: var(--shadow);
}
.slider-track {
  display: flex;
  height: 100%;
  transition: transform .45s cubic-bezier(.65,0,.35,1);
}
.slider-track img {
  width: 100%; height: 100%;
  object-fit: cover;
  flex-shrink: 0;
}
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15,20,28,.55);
  color: var(--white);
  border: none;
  width: 42px; height: 42px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
  transition: background .2s;
}
.slider-arrow:hover { background: var(--gold-dark); }
.slider-arrow.prev { left: 16px; }
.slider-arrow.next { right: 16px; }
.slider-arrow svg { width: 18px; height: 18px; }

.slider-dots {
  position: absolute;
  bottom: 14px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 8px;
}
.slider-dots button {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.55);
  border: none;
}
.slider-dots button.active { background: var(--gold); width: 22px; border-radius: 4px; }

.slider-count {
  position: absolute;
  top: 14px; right: 14px;
  background: rgba(15,20,28,.6);
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
}

/* ================= SINGLE BLOG PAGE ================= */
.blog-header { padding: 40px 0 10px; }
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.breadcrumb a:hover { color: var(--gold-dark); }
.blog-header h1 { font-size: clamp(28px, 4vw, 42px); max-width: 900px; }

.blog-topmeta {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  color: var(--muted);
  font-size: 14px;
  margin: 18px 0 28px;
}
.blog-topmeta .meta-item { display: flex; align-items: center; gap: 6px; }
.blog-topmeta svg { width: 16px; height: 16px; color: var(--gold-dark); }
.blog-topmeta .popular-pill {
  background: var(--gold);
  color: var(--ink);
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.blog-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  align-items: start;
  margin-top: 34px;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 34px 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.spec-item { text-align: center; }
.spec-item svg { width: 24px; height: 24px; color: var(--gold-dark); margin-bottom: 8px; }
.spec-item strong { display: block; font-family: 'Fraunces', Georgia, serif; font-size: 19px; color: var(--navy); }
.spec-item span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

.blog-desc { font-size: 16px; color: var(--text); line-height: 1.8; }
.blog-desc h3 { margin-top: 30px; }

.sidebar-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  position: sticky;
  top: 96px;
  box-shadow: var(--shadow);
}
.sidebar-card .price-big {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 28px;
  color: var(--navy);
  margin-bottom: 4px;
}
.sidebar-card .price-sub { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.btn-interest {
  display: block;
  width: 100%;
  background: var(--navy);
  color: var(--white);
  text-align: center;
  padding: 15px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 15px;
  border: none;
  transition: background .2s;
}
.btn-interest:hover { background: var(--gold-dark); color: var(--ink); }
.sidebar-note { font-size: 12px; color: var(--muted); margin-top: 12px; text-align: center; }

.sidebar-agent {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

/* ================= POPUP MODAL ================= */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,20,28,.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  backdrop-filter: blur(2px);
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--white);
  width: 100%;
  max-width: 460px;
  border-radius: 8px;
  padding: 34px;
  position: relative;
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: none; border: none;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  border-radius: 50%;
}
.modal-close:hover { background: var(--bone-2); color: var(--navy); }
.modal-box .eyebrow { margin-bottom: 6px; }
.modal-box h3 { font-size: 22px; margin-bottom: 6px; }
.modal-box .modal-sub { font-size: 13px; color: var(--muted); margin-bottom: 24px; }

.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--navy);
  margin-bottom: 6px;
}
.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  background: var(--bone);
  transition: border-color .2s;
}
.form-group input:focus,
.form-group select:focus {
  border-color: var(--gold);
  outline: none;
}
.phone-row { display: flex; gap: 8px; }
.phone-row select { max-width: 150px; flex-shrink: 0; }

.form-submit {
  width: 100%;
  background: var(--gold);
  color: var(--ink);
  border: none;
  padding: 14px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 15px;
  margin-top: 8px;
  transition: background .2s;
}
.form-submit:hover { background: var(--gold-dark); }
.form-submit:disabled { opacity: .6; cursor: not-allowed; }

.form-status {
  margin-top: 14px;
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 4px;
  display: none;
}
.form-status.show { display: block; }
.form-status.ok { background: #E7F5E9; color: #2A7A3B; }
.form-status.err { background: #FBE9E7; color: #B3261E; }

/* ================= FOOTER ================= */
.site-footer {
  background: var(--navy);
  color: #B7BFCB;
  padding: 30px 0;
  margin-top: 40px;
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-inner .flogo { display: flex; align-items: center; gap: 8px; font-family: 'Fraunces', Georgia, serif; color: var(--white); font-size: 16px; font-weight: 600; }
.footer-inner .flogo span.dot { width: 6px; height: 6px; background: var(--gold); border-radius: 50%; display: inline-block; }
.footer-links { display: flex; gap: 22px; font-size: 13px; }
.footer-links a:hover { color: var(--gold); }
.footer-copy { font-size: 12px; color: #7C8798; }

/* ================= NO RESULTS / EMPTY ================= */
.empty-state {
  text-align: center;
  padding: 70px 20px;
  color: var(--muted);
}
.empty-state h3 { color: var(--navy); margin-bottom: 8px; }

/* ================= PAGE HEADER BANDS ================= */
.page-band {
  background: var(--navy);
  color: var(--bone);
  padding: 56px 0 44px;
}
.page-band h1 { color: var(--white); margin-bottom: 8px; }
.page-band p { color: #B7BFCB; max-width: 560px; }

/* ================= RESPONSIVE ================= */
@media (max-width: 1080px) {
  .blog-grid { grid-template-columns: repeat(3, 1fr); }
  .blog-layout { grid-template-columns: 1fr; }
  .sidebar-card { position: static; }
}

@media (max-width: 880px) {
  .header-inner { justify-content: space-between; gap: 10px; }

  /* Keep search visible on mobile, just smaller, so it fits next to the logo and menu button */
  .header-search { flex: 0 1 150px; max-width: 150px; min-width: 0; margin: 0; overflow: hidden; }
  .header-search form { padding: 4px 4px 4px 12px; min-width: 0; }
  .header-search input { font-size: 13px; padding: 7px 2px; min-width: 0; width: 100%; }
  .header-search input::placeholder { font-size: 12px; }
  .header-search button { width: 30px; height: 30px; flex-shrink: 0; }
  .header-search svg { width: 14px; height: 14px; }

  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .header-cta.desktop-only { display: none; }

  .header-inner.nav-open .main-nav {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 24px 24px;
    gap: 16px;
    box-shadow: var(--shadow);
    border-top: 1px solid var(--line);
  }

  /* Register Interest button appears inside the mobile menu dropdown, alongside the menu links */
  .nav-mobile-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 4px;
  }

  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-grid.list-view .blog-card { flex-direction: column; }
  .blog-grid.list-view .card-media { width: 100%; aspect-ratio: 4/3; }
  .spec-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .wrap, .hero-inner, .footer-inner { padding-left: 18px; padding-right: 18px; }
  .blog-grid { grid-template-columns: 1fr; }
  section { padding: 44px 0; }
  .hero { padding: 60px 0 70px; }
  .hero-stats { gap: 26px; }
  .footer-inner { flex-direction: column; align-items: flex-start; text-align: left; }
  .phone-row { flex-direction: column; }
  .phone-row select { max-width: none; }
  .modal-box { padding: 26px 20px; }
}

/* Extra-small phones (older/smaller devices, split-screen, etc.) */
@media (max-width: 420px) {
  .header-inner { padding: 12px 16px; gap: 12px; }
  .logo img { height: 32px; }
  .header-search { flex-basis: 110px; max-width: 110px; }
  .spec-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 18px; }
  .hero-stats { gap: 18px 24px; }
  .hero h1 { font-size: 28px; }
  .card-meta { flex-wrap: wrap; gap: 8px; row-gap: 6px; }
  .blog-topmeta { gap: 14px; }
  .footer-links { flex-wrap: wrap; gap: 12px 18px; }
  .modal-box { padding: 22px 16px; }
  .slider-arrow { width: 34px; height: 34px; }
  .slider-arrow svg { width: 15px; height: 15px; }
}
