/* ═══════════════════════════════════════════════════════════
   IMÓVEL SYSTEM — Site Público
   CSS principal com variáveis :root
   ═══════════════════════════════════════════════════════════ */

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--fonte-corpo);
  background: var(--bg);
  color: var(--texto);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }

/* ── Variáveis (base azul — sobrescritas pelo PHP via <style>) */
:root {
  /* Cores principais */
  --primaria:         #1a56db;
  --primaria-escura:  #1e429f;
  --primaria-clara:   #dbeafe;
  --primaria-alpha:   rgba(26,86,219,.10);
  --acento:           #f59e0b;
  --acento-escuro:    #d97706;

  /* Textos */
  --texto:            #1f2937;
  --texto-suave:      #6b7280;
  --texto-branco:     #ffffff;

  /* Fundos */
  --bg:               #ffffff;
  --bg-alt:           #f8fafc;
  --bg-escuro:        #0f1f4a;

  /* Borders & Shadows */
  --borda:            #e5e7eb;
  --sombra-sm:        0 2px 8px rgba(0,0,0,.06);
  --sombra-md:        0 4px 20px rgba(0,0,0,.09);
  --sombra-lg:        0 8px 40px rgba(0,0,0,.14);
  --sombra-primaria:  0 4px 20px rgba(26,86,219,.25);

  /* Topo 1 */
  --topo1-bg:         #0f1f4a;
  --topo1-texto:      rgba(255,255,255,.80);
  --topo1-icone:      var(--acento);

  /* Header */
  --header-bg:        #ffffff;
  --header-altura:    88px;
  --menu-hover:       var(--primaria);
  --menu-ativo:       var(--primaria);

  /* Tipografia */
  --fonte-titulo:     'Montserrat', sans-serif;
  --fonte-corpo:      'Inter', sans-serif;

  /* Layout */
  --largura-max:      1260px;
  --gap:              24px;
  --raio-sm:          6px;
  --raio-md:          10px;
  --raio-lg:          16px;
  --transicao:        .22s ease;

  /* WhatsApp */
  --whats-bg:         #25d366;
  --whats-bg-hover:   #1ebe5d;
  --whats-sombra:     0 4px 18px rgba(37,211,102,.35);
}

/* ── Container ────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--largura-max);
  margin: 0 auto;
  padding: 0 20px;
}

/* ══════════════════════════════════════════════════════════
   TOPO 1 — Barra de informações
   ══════════════════════════════════════════════════════════ */
.topo-info {
  background: var(--topo1-bg);
  color: var(--topo1-texto);
  font-size: 12.5px;
  font-family: var(--fonte-corpo);
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.topo-info-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 42px;
  gap: 16px;
}

.topo-info-esq,
.topo-info-dir {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.topo-info-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--topo1-texto);
  transition: color var(--transicao);
}
.topo-info-item:hover { color: #fff; }
.topo-info-item i {
  color: var(--topo1-icone);
  font-size: 11.5px;
  flex-shrink: 0;
}
.topo-info-item a {
  color: inherit;
  transition: color var(--transicao);
}
.topo-info-item a:hover { color: #fff; }

.topo-info-sep {
  width: 1px;
  height: 14px;
  background: rgba(255,255,255,.15);
  flex-shrink: 0;
}

/* Social icons no topo */
.topo-social {
  display: flex;
  align-items: center;
  gap: 10px;
}
.topo-social a {
  color: var(--topo1-texto);
  font-size: 13px;
  transition: color var(--transicao), transform var(--transicao);
  display: flex;
  align-items: center;
}
.topo-social a:hover { color: var(--acento); transform: scale(1.15); }

/* ══════════════════════════════════════════════════════════
   HEADER PRINCIPAL (Topo 2)
   ══════════════════════════════════════════════════════════ */
.header-principal {
  background: var(--header-bg);
  box-shadow: var(--sombra-sm);
  position: sticky;
  top: 0;
  z-index: 900;
  transition: box-shadow var(--transicao), background var(--transicao);
}
.header-principal.scrolled {
  box-shadow: var(--sombra-md);
}

.header-inner {
  display: flex;
  align-items: center;
  height: var(--header-altura);
  padding: 14px 24px;
  gap: 24px;
  position: relative;
}
@media (max-width: 768px) {
  .header-inner { padding: 12px 16px; }
}
@media (max-width: 480px) {
  .header-inner { padding: 10px 14px; }
}

/* ── Logo ─────────────────────────────────────────────────── */
.logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo img {
  height: 56px;
  width: auto;
  object-fit: contain;
}
.logo-texto {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.logo-nome {
  font-family: var(--fonte-titulo);
  font-size: 20px;
  font-weight: 800;
  color: var(--primaria-escura);
  letter-spacing: -.3px;
}
.logo-slogan {
  font-size: 10px;
  color: var(--texto-suave);
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* ── Nav ──────────────────────────────────────────────────── */
.nav-principal {
  flex: 1;
  display: flex;
  justify-content: center;
}
.nav-lista {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-item {
  position: relative;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 9px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--texto);
  border-radius: var(--raio-sm);
  transition: color var(--transicao), background var(--transicao);
  white-space: nowrap;
  letter-spacing: -.01em;
}
/* Ícone: oculto no desktop, visível no mobile */
.nav-link .nav-icone {
  display: none;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: var(--raio-sm);
  background: var(--primaria-alpha);
  color: var(--primaria);
  font-size: 13px;
  flex-shrink: 0;
}
.nav-link:hover,
.nav-link.ativo {
  color: var(--primaria);
  background: var(--primaria-alpha);
}
.nav-link .seta {
  font-size: 9px;
  color: var(--texto-suave);
  transition: transform var(--transicao);
}
.nav-item:hover .seta { transform: rotate(180deg); }

/* Indicador de ativo — removido (background já indica) */

/* ── Submenu desktop (abre por CLICK, não hover) ─────────── */
.submenu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: #fff;
  border: 1px solid var(--borda);
  border-radius: var(--raio-md);
  box-shadow: var(--sombra-lg);
  min-width: 210px;
  padding: 6px 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}
.nav-item.sub-aberto > .submenu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
/* Rotaciona seta quando aberto */
.nav-item.sub-aberto > .nav-link .seta { transform: rotate(180deg); }

/* triângulo */
.submenu::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom-color: var(--borda);
  border-top: none;
}
.submenu::after {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-bottom-color: #fff;
  border-top: none;
}
.submenu-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  font-size: 13px;
  color: var(--texto);
  transition: background var(--transicao), color var(--transicao);
}
.submenu-link:hover {
  background: var(--primaria-alpha);
  color: var(--primaria);
}
.submenu-link i { font-size: 12px; color: var(--primaria); }
.submenu-divider {
  height: 1px;
  background: var(--borda);
  margin: 4px 0;
}

/* ── CTA header ───────────────────────────────────────────── */
.header-cta {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 50px;
  font-size: 13.5px;
  font-weight: 700;
  transition: all var(--transicao);
  white-space: nowrap;
  letter-spacing: .01em;
}
/* Botão WhatsApp com cor própria */
.btn-whats {
  background: var(--whats-bg);
  color: #fff;
  box-shadow: var(--whats-sombra);
}
.btn-whats:hover {
  background: var(--whats-bg-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(37,211,102,.45);
  color: #fff;
}
.btn-whats i { font-size: 16px; }

.btn-cta-prim {
  background: var(--primaria);
  color: #fff;
  box-shadow: var(--sombra-primaria);
}
.btn-cta-prim:hover {
  background: var(--primaria-escura);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(26,86,219,.35);
  color: #fff;
}
.btn-cta-out {
  border: 2px solid var(--primaria);
  color: var(--primaria);
  background: transparent;
}
.btn-cta-out:hover {
  background: var(--primaria);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--sombra-primaria);
}

/* No header: "Buscar Imóveis" não some mais em 1024px */
.header-cta { display: flex; }
@media (max-width: 860px) {
  .header-cta .btn-cta-out { display: none; }
}

/* CTAs do drawer — ocultos no desktop, visíveis só no mobile */
.nav-mobile-cta { display: none; }

/* ── Cabeçalho do drawer (real HTML, não pseudo) ─────────── */
.nav-drawer-topo {
  display: none; /* visível só no mobile */
}

/* ── Botão fechar dentro do drawer ───────────────────────── */
.nav-fechar { display: none; }

/* ── Botão hamburger (só mobile) ─────────────────────────── */
.btn-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  border-radius: var(--raio-sm);
  transition: background var(--transicao);
  margin-left: auto;
}
.btn-hamburger:hover { background: var(--primaria-alpha); }
.btn-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--texto);
  border-radius: 2px;
  transition: all .3s ease;
}

/* ── Overlay mobile ───────────────────────────────────────── */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 850;
  backdrop-filter: blur(2px);
}
.nav-overlay.ativo { display: block; }

/* ══════════════════════════════════════════════════════════
   RESPONSIVO
   ══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .nav-link { padding: 8px 10px; font-size: 13px; }
}

@media (max-width: 860px) {
  /* Topo 1: oculta endereço, email e redes — mantém só telefones */
  .topo-info-esq      { display: none; }
  .topo-item-email    { display: none; }
  .topo-sep-email     { display: none; }
  .topo-social        { display: none; }
  .topo-sep-social    { display: none; }
  .topo-info-inner    { justify-content: center; }
}

@media (max-width: 768px) {
  .btn-hamburger { display: flex; }
  .header-cta { display: none; }

  /* Drawer lateral */
  .nav-principal {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(300px, 85vw);
    height: 100vh;
    background: #fff;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 0 0 30px;
    box-shadow: var(--sombra-lg);
    z-index: 899;
    transition: right .3s ease;
    overflow-y: auto;
  }
  .nav-principal.aberto { right: 0; }

  /* Cabeçalho do drawer — HTML real */
  .nav-drawer-topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px 14px;
    border-bottom: 1px solid var(--borda);
    flex-shrink: 0;
  }
  .nav-drawer-label {
    font-family: var(--fonte-titulo);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--texto-suave);
  }
  .nav-fechar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-alt);
    color: var(--texto-suave);
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: background .2s, color .2s;
  }
  .nav-fechar:hover { background: var(--primaria-alpha); color: var(--primaria); }

  .nav-lista {
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
    padding: 8px 12px 0;
  }

  /* Ícones visíveis no mobile */
  .nav-link .nav-icone {
    display: flex;
  }
  .nav-link {
    padding: 10px 12px;
    font-size: 14.5px;
    border-radius: var(--raio-md);
    justify-content: flex-start;
    gap: 10px;
  }
  .nav-link .seta {
    margin-left: auto;
  }
  .nav-link::after { display: none; }

  /* Ativo no mobile */
  .nav-link.ativo {
    background: var(--primaria-alpha);
  }
  .nav-link.ativo .nav-icone {
    background: var(--primaria);
    color: #fff;
  }

  /* Submenu mobile */
  .submenu {
    position: static !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    box-shadow: none;
    border: none;
    border-left: 3px solid var(--primaria-clara);
    border-radius: 0;
    background: transparent;
    padding: 4px 0;
    margin: 4px 0 4px 14px;
    min-width: 0;
    display: none;
  }
  .submenu::before, .submenu::after { display: none !important; }
  .nav-item.sub-aberto > .submenu { display: block !important; }
  .submenu-link {
    padding: 9px 16px;
    font-size: 13.5px;
    border-radius: var(--raio-sm);
    margin: 1px 0;
  }

  /* CTAs no drawer */
  .nav-mobile-cta {
    padding: 16px 12px 0;
    margin-top: 10px;
    border-top: 1px solid var(--borda);
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .nav-mobile-cta .btn-cta {
    width: 100%;
    justify-content: center;
    padding: 13px 20px;
    font-size: 14px;
    border-radius: 50px;
  }
}

@media (max-width: 480px) {
  :root { --header-altura: 66px; }
  .logo img { height: 42px; }
  .logo-nome { font-size: 17px; }
}

/* ── Offset para âncoras (compensa header sticky) ────────── */
#busca,
#destaques {
  scroll-margin-top: calc(var(--header-altura) + 16px);
}

/* ══════════════════════════════════════════════════════════
   UTILITÁRIOS GERAIS
   ══════════════════════════════════════════════════════════ */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.texto-centro { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
