/* ═══════════════════════════════════════════════
   BI26 · Bolsa Imobiliária — style.css
   Palette: white dominant, amber/yellow accents,
            grays, black/white text, green for incorporação
═══════════════════════════════════════════════ */

:root {
  --white:       #ffffff;
  --off-white:   #f8f8f6;
  --gray-50:     #f3f3f1;
  --gray-100:    #e8e8e5;
  --gray-200:    #d0d0cc;
  --gray-400:    #9a9993;
  --gray-600:    #5c5b57;
  --gray-800:    #2a2a28;
  --black:       #141412;

  --amber:       #d4a017;
  --amber-light: #f0c040;
  --amber-pale:  #fdf3d0;
  --amber-dark:  #a07810;

  --dev-green:   #1b4332;
  --dev-mid:     #2d6a4f;
  --dev-light:   #52b788;
  --dev-pale:    #d8f3dc;

  --shadow-sm:   0 1px 4px rgba(20,20,18,.07);
  --shadow-md:   0 4px 20px rgba(20,20,18,.10);
  --shadow-lg:   0 12px 48px rgba(20,20,18,.14);

  --radius:      6px;
  --radius-lg:   12px;
  --transition:  all .22s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Outfit', sans-serif;
  background: var(--white);
  color: var(--black);
  line-height: 1.6;
  overflow-x: hidden;
}

.mono { font-family: 'JetBrains Mono', monospace; }
em { font-family: 'Playfair Display', serif; font-style: italic; }
.container { max-width: 1240px; margin: 0 auto; padding: 0 2rem; }
.hidden { display: none !important; }

/* ── Scroll reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ═══════════════════════════════════════════════
   HEADER
═══════════════════════════════════════════════ */
#site-header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 900;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--gray-100);
  transition: box-shadow .3s;
}
#site-header.scrolled { box-shadow: var(--shadow-md); }

.header-inner {
  max-width: 1240px; margin: 0 auto;
  padding: 0 2rem;
  height: 62px;
  display: flex; align-items: center; justify-content: space-between;
}

/* Logo */
.logo { display: flex; align-items: center; gap: .35rem; text-decoration: none; }
.logo-mark {
  width: 36px; height: 36px;
  background: var(--amber);
  color: var(--white);
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  display: grid; place-items: center;
  border-radius: 4px;
}
.logo-text {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--black);
  letter-spacing: -.01em;
}

/* Nav */
.main-nav { display: flex; align-items: center; gap: 1.75rem; }
.main-nav a {
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--gray-600);
  text-decoration: none;
  transition: var(--transition);
}
.main-nav a:hover { color: var(--black); }

.nav-dev {
  color: var(--dev-green) !important;
  font-weight: 600 !important;
  border-bottom: 2px solid var(--dev-light);
  padding-bottom: 1px;
}

.nav-admin {
  background: var(--amber);
  color: var(--white) !important;
  padding: .45rem 1.1rem;
  border-radius: var(--radius);
  font-weight: 600 !important;
  letter-spacing: .02em !important;
  transition: background .2s !important;
}
.nav-admin:hover { background: var(--amber-dark) !important; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--black);
  border-radius: 2px;
  transition: var(--transition);
}

/* ═══════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .75rem 1.75rem;
  font-family: 'Outfit', sans-serif;
  font-size: .88rem; font-weight: 600;
  letter-spacing: .03em;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer; text-decoration: none;
  transition: var(--transition);
}

.btn-primary {
  background: var(--amber);
  color: var(--white);
  border-color: var(--amber);
}
.btn-primary:hover {
  background: var(--amber-dark);
  border-color: var(--amber-dark);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--black);
  border-color: var(--gray-200);
}
.btn-outline:hover {
  border-color: var(--amber);
  color: var(--amber);
}

.btn-outline-dev {
  background: transparent;
  color: var(--dev-green);
  border: 2px solid var(--dev-mid);
}
.btn-outline-dev:hover {
  background: var(--dev-green);
  color: var(--white);
}

.btn-dev-cta {
  background: var(--amber-light);
  color: var(--black);
  border-color: var(--amber-light);
}
.btn-dev-cta:hover { background: var(--white); border-color: var(--white); }

.w-full { width: 100%; justify-content: center; }

/* ═══════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════ */
.hero {
  margin-top: 62px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - 62px);
}

.hero-content {
  display: flex; flex-direction: column; justify-content: center;
  padding: 4rem 3rem 4rem 4rem;
  background: var(--white);
}

.hero-tag {
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 1.25rem;
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.8rem, 4.5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.08;
  color: var(--black);
  margin-bottom: 1.1rem;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--gray-600);
  max-width: 420px;
  margin-bottom: 2rem;
  font-weight: 300;
}

.hero-actions { display: flex; gap: .85rem; flex-wrap: wrap; margin-bottom: 2.5rem; }

.hero-stats {
  display: flex; align-items: center; gap: 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--gray-100);
}

.stat { text-align: center; }
.stat-n {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--amber);
  line-height: 1;
}
.stat-l {
  display: block;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--gray-400);
  margin-top: .3rem;
}
.stat-div { width: 1px; height: 40px; background: var(--gray-100); }

/* Hero map */
.hero-map-wrap {
  position: relative;
  background: var(--gray-50);
}
#hero-map {
  width: 100%; height: 100%;
  min-height: calc(100vh - 62px);
}

.map-legend {
  position: absolute; bottom: 1.25rem; left: 1.25rem;
  display: flex; gap: .6rem;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-radius: var(--radius);
  padding: .5rem .75rem;
  box-shadow: var(--shadow-md);
  z-index: 500;
}
.leg {
  display: flex; align-items: center; gap: .35rem;
  font-size: .75rem; font-weight: 500; color: var(--gray-800);
}
.leg::before {
  content: ''; display: block;
  width: 10px; height: 10px;
  border-radius: 50%;
}
.leg-venda::before   { background: var(--amber); }
.leg-aluguel::before { background: var(--gray-600); }
.leg-dev::before     { background: var(--dev-green); }

/* ═══════════════════════════════════════════════
   SECTION HEADERS
═══════════════════════════════════════════════ */
.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 700;
  color: var(--black);
  line-height: 1.15;
}
.section-sub {
  font-size: .95rem;
  color: var(--gray-400);
  margin-top: .5rem;
}

/* ═══════════════════════════════════════════════
   FILTERS
═══════════════════════════════════════════════ */
.section-listings { padding: 5rem 0; background: var(--off-white); }

.filters {
  display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--gray-100);
}

.filter-btn {
  padding: .45rem 1.1rem;
  border-radius: 999px;
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  font-family: 'Outfit', sans-serif;
  font-size: .82rem; font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  transition: var(--transition);
}
.filter-btn:hover { border-color: var(--amber); color: var(--amber); }
.filter-btn.active {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--white);
}

.filter-btn-dev.active {
  background: var(--dev-green);
  border-color: var(--dev-green);
}
.filter-btn-dev:hover { border-color: var(--dev-green); color: var(--dev-green); }

.filter-sep { flex: 1; }

.filter-select {
  padding: .45rem 1rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--white);
  font-family: 'Outfit', sans-serif;
  font-size: .82rem; font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  outline: none;
  transition: var(--transition);
}
.filter-select:focus { border-color: var(--amber); }

/* ═══════════════════════════════════════════════
   CARDS
═══════════════════════════════════════════════ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  transition: var(--transition);
  cursor: pointer;
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.card-img {
  width: 100%; height: 210px;
  object-fit: cover;
  display: block;
  background: var(--gray-100);
  position: relative;
}

.card-img-wrap { position: relative; overflow: hidden; }
.card-img-wrap img { width: 100%; height: 210px; object-fit: cover; display: block; }

.card-badge {
  position: absolute; top: .85rem; left: .85rem;
  padding: .25rem .65rem;
  border-radius: 999px;
  font-size: .72rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
}
.badge-venda   { background: var(--amber);    color: var(--white); }
.badge-aluguel { background: var(--gray-800); color: var(--white); }
.badge-incorporacao {
  background: var(--dev-green); color: var(--white);
  border: 1.5px solid var(--dev-light);
}

.card-body { padding: 1.25rem 1.25rem 1.5rem; }

.card-tipo {
  font-size: .75rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: .3rem;
}

.card-title {
  font-size: 1.05rem; font-weight: 600;
  color: var(--black);
  margin-bottom: .25rem;
  line-height: 1.3;
}

.card-bairro {
  font-size: .82rem; color: var(--gray-400);
  margin-bottom: 1rem;
}

.card-specs {
  display: flex; gap: 1rem;
  font-size: .8rem; color: var(--gray-600);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.spec { display: flex; align-items: center; gap: .3rem; }

.card-price {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem; font-weight: 700;
  color: var(--black);
}
.card-price.dev { color: var(--dev-green); }
.card-price-label {
  font-size: .75rem; color: var(--gray-400);
  font-family: 'Outfit', sans-serif;
  font-weight: 400;
}

/* Incorporação card (larger emphasis) */
.card.card-dev {
  border: 2px solid var(--dev-light);
  background: linear-gradient(135deg, var(--white) 70%, var(--dev-pale));
}
.card.card-dev .card-body { border-top: 3px solid var(--dev-green); }

/* No results */
.no-results {
  text-align: center; padding: 3rem;
  color: var(--gray-400); font-size: 1rem;
}

/* ═══════════════════════════════════════════════
   INCORPORAÇÃO SECTION
═══════════════════════════════════════════════ */
.section-dev { background: var(--dev-green); padding: 5rem 0; }

.dev-banner {
  max-width: 1240px; margin: 0 auto; padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.dev-tag {
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--dev-light);
  display: block;
  margin-bottom: 1rem;
}

.dev-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 3.5vw, 3.5rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.dev-sub {
  font-size: .95rem; color: rgba(255,255,255,.75);
  font-weight: 300; line-height: 1.7;
  margin-bottom: 2rem;
}

.dev-cards {
  display: grid; gap: 1rem;
}

.dev-card {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(82,183,136,.3);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex; gap: 1rem; align-items: center;
}
.dev-card:hover {
  background: rgba(255,255,255,.14);
  border-color: var(--dev-light);
  transform: translateX(4px);
}

.dev-card-icon {
  width: 44px; height: 44px;
  background: rgba(82,183,136,.2);
  border-radius: var(--radius);
  display: grid; place-items: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.dev-card-title {
  font-size: .95rem; font-weight: 600; color: var(--white);
}
.dev-card-bairro {
  font-size: .8rem; color: rgba(255,255,255,.6);
}
.dev-card-price {
  margin-left: auto;
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem; font-weight: 700;
  color: var(--amber-light);
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════
   FULL MAP
═══════════════════════════════════════════════ */
.section-map { padding: 5rem 0; background: var(--white); }

.full-map-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-100);
}

#full-map { height: 580px; width: 100%; }

/* ═══════════════════════════════════════════════
   CONTACT
═══════════════════════════════════════════════ */
.section-contact { padding: 5rem 0; background: var(--gray-50); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 4rem;
  align-items: start;
}

.contact-text .section-title { text-align: left; }

.contact-text p {
  font-size: .95rem; color: var(--gray-600);
  font-weight: 300; line-height: 1.7;
  margin: 1rem 0 1.75rem;
}

.contact-info { display: flex; flex-direction: column; gap: .75rem; }
.contact-item {
  display: flex; align-items: center; gap: .75rem;
  font-size: .9rem; color: var(--gray-600);
}
.contact-icon {
  font-size: 1.1rem; color: var(--amber);
  width: 24px; text-align: center;
}

.contact-form { display: flex; flex-direction: column; gap: .85rem; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; }

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: .8rem 1rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-family: 'Outfit', sans-serif;
  font-size: .9rem;
  color: var(--black);
  background: var(--white);
  outline: none;
  transition: border-color .2s;
}
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--amber); }
.contact-form textarea { resize: vertical; min-height: 110px; }

.form-note { font-size: .75rem; color: var(--gray-400); text-align: center; }

/* ═══════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════ */
.site-footer {
  background: var(--black);
  padding: 2rem 0;
}
.footer-inner {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 1.5rem; justify-content: space-between;
}
.footer-logo {
  display: flex; align-items: center; gap: .4rem;
  color: var(--white);
  font-size: .95rem;
}
.footer-logo .logo-mark {
  width: 28px; height: 28px; font-size: 1rem;
}
.footer-copy { font-size: .78rem; color: var(--gray-400); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a {
  font-size: .78rem; color: var(--gray-400);
  text-decoration: none; transition: color .2s;
}
.footer-links a:hover { color: var(--amber); }

/* ═══════════════════════════════════════════════
   MODAL
═══════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(20,20,18,.7);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 800px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform .25s;
}
.modal-overlay.open .modal { transform: translateY(0); }

.modal-close {
  position: absolute; top: 1rem; right: 1rem; z-index: 10;
  background: var(--gray-800); color: var(--white);
  border: none; width: 32px; height: 32px;
  border-radius: 50%; font-size: .9rem; cursor: pointer;
  transition: background .2s;
}
.modal-close:hover { background: var(--black); }

.modal-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 2px;
}
.modal-gallery img {
  width: 100%; height: 200px;
  object-fit: cover; display: block;
}
.modal-gallery img:first-child {
  grid-column: 1 / -1; height: 320px;
}

.modal-body { padding: 2rem; }

.modal-badge {
  display: inline-block;
  padding: .3rem .8rem;
  border-radius: 999px;
  font-size: .75rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  margin-bottom: 1rem;
}

.modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem; font-weight: 700;
  color: var(--black); margin-bottom: .25rem;
}
.modal-bairro { font-size: .9rem; color: var(--gray-400); margin-bottom: 1.25rem; }

.modal-specs {
  display: flex; flex-wrap: wrap; gap: 1rem;
  padding: 1rem 0; border-top: 1px solid var(--gray-100);
  border-bottom: 1px solid var(--gray-100);
  margin-bottom: 1.25rem;
}
.modal-spec { font-size: .85rem; color: var(--gray-600); }
.modal-spec strong { color: var(--black); }

.modal-desc { font-size: .9rem; color: var(--gray-600); line-height: 1.7; margin-bottom: 1.5rem; }

.modal-price {
  font-family: 'Playfair Display', serif;
  font-size: 2rem; font-weight: 700;
  color: var(--amber); margin-bottom: 1.25rem;
}
.modal-price.dev { color: var(--dev-green); }

.modal-actions { display: flex; gap: .75rem; flex-wrap: wrap; }

/* Leaflet popup custom */
.leaflet-popup-content-wrapper {
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-md) !important;
  font-family: 'Outfit', sans-serif !important;
}
.popup-inner { min-width: 180px; }
.popup-tipo {
  font-size: .7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--gray-400);
}
.popup-title { font-weight: 600; font-size: .95rem; color: var(--black); margin: .2rem 0; }
.popup-price { font-weight: 700; color: var(--amber); }
.popup-price.dev { color: var(--dev-green); }
.popup-btn {
  display: block; margin-top: .6rem;
  background: var(--amber);
  color: var(--white); text-align: center;
  padding: .35rem; border-radius: var(--radius);
  font-size: .78rem; font-weight: 600;
  text-decoration: none; cursor: pointer; border: none;
  width: 100%; transition: background .2s;
}
.popup-btn:hover { background: var(--amber-dark); }
.popup-btn.dev { background: var(--dev-green); }
.popup-btn.dev:hover { background: var(--dev-mid); }

/* ═══════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════ */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-content { padding: 2.5rem 1.5rem; }
  #hero-map { min-height: 50vh; }

  .dev-banner { grid-template-columns: 1fr; gap: 2.5rem; }

  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
  .form-row { grid-template-columns: 1fr; }

  .main-nav { display: none; flex-direction: column; gap: 1.2rem;
    position: fixed; top: 62px; left: 0; right: 0;
    background: var(--white);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border-top: 1px solid var(--gray-100);
  }
  .main-nav.open { display: flex; }
  .hamburger { display: flex; }

  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 600px) {
  .cards-grid { grid-template-columns: 1fr; }
  .hero-stats { flex-wrap: wrap; }
  .modal-gallery img:first-child { height: 200px; }
}
