/* ================================================= ===========
   IMÓVEIS VENDIDOS — main.css
   Organização: tokens → layout → componentes → utilitários
   ============================================================ */

/* ------------------------------------------------------------
   1. Tokens / variáveis
   ------------------------------------------------------------ */
:root {
  /* ---- Cartório Claro — tokens base ---- */
  --bg:          #EFF2F6;
  --surface:     #FFFFFF;
  --surface-2:   #F6F8FB;
  --ink:         #16222F;
  --ink-soft:    #3A4A59;
  --muted:       #67788A;
  --faint:       #9DAAB8;
  --line:        #E2E8EF;
  --line-strong: #CFD9E3;
  --accent:      #2D7FF9;
  --accent-2:    #2BC1F0;
  --accent-press:#1F66D8;
  --accent-soft: #E8F1FF;
  --accent-ink:  #0E3F86;
  --pos:         #1F9D6B;
  --pos-soft:    #E5F5EE;
  --neg:         #E0573E;
  --neg-soft:    #FBE9E4;

  --font-body:    'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  --radius:      16px;
  --radius-pill: 999px;

  --shadow:    0 18px 40px -24px rgba(16,40,70,.34), 0 2px 6px -2px rgba(16,40,70,.10);
  --shadow-sm: 0 4px 14px -8px rgba(16,40,70,.22);

  /* ---- Aliases de compatibilidade (páginas legadas usam estes nomes) ---- */
  --pri:        var(--accent);
  --pri-light:  var(--accent-soft);
  --pri-muted:  var(--accent-press);
  --sec:        var(--ink-soft);
  --tert:       var(--pos);
  --tert-dark:  #18815a;
  --neu:        var(--muted);
  --neu-light:  var(--line);
  --page-bg:    var(--bg);
  --card-bg:    var(--surface);
  --text-main:  var(--ink);
  --text-body:  var(--ink-soft);
  --text-muted: var(--muted);
  --border:     var(--line);
  --radius-sm:  10px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  20px;
}

/* ------------------------------------------------------------
   2. Reset & base
   ------------------------------------------------------------ */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--ink-soft);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { letter-spacing: -.02em; }
.mono { font-family: var(--font-mono); font-feature-settings: "tnum" 1; }

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

/* ------------------------------------------------------------
   3. Navbar
   ------------------------------------------------------------ */
.nav-top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding: 13px clamp(18px, 4vw, 40px);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-brand-dot {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  flex: none;
  position: relative;
  background: linear-gradient(150deg, var(--accent-2), var(--accent));
  box-shadow: var(--shadow-sm);
}

.nav-brand-dot::after {
  content: "";
  position: absolute;
  inset: 8px 8px 6px;
  border: 2px solid #fff;
  border-bottom: none;
  border-radius: 3px 3px 0 0;
}

.nav-brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  color: var(--ink);
  letter-spacing: -0.03em;
}

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

.nav-link-item {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 15px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: .18s;
}

.nav-link-item:hover {
  background: var(--surface);
  color: var(--ink);
}

.nav-end {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-nav-outline {
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: var(--surface);
  font-size: 13.5px;
  font-weight: 600;
  font-family: var(--font-body);
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: .18s;
}

.btn-nav-outline:hover { border-color: var(--accent); color: var(--accent); background: var(--surface); }

/* ------------------------------------------------------------
   4. Hero
   ------------------------------------------------------------ */
.hero-section {
  position: relative;
  overflow: hidden;
  background: var(--bg);
  padding: clamp(48px, 7vw, 80px) 0 0;
}

/* Brilho azul radial discreto no canto superior direito */
.hero-section::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -80px;
  width: 520px;
  height: 520px;
  background: radial-gradient(50% 50% at 50% 50%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 70%);
  filter: blur(20px);
  pointer-events: none;
}

.hero-section > .container {
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-ink);
  font-weight: 500;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 22px;
}

.hero-eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pos);
  box-shadow: 0 0 0 4px var(--pos-soft);
  flex-shrink: 0;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(44px, 6.5vw, 76px);
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.04em;
  line-height: .96;
  margin-bottom: 18px;
}

.hero-title span { color: var(--accent); }

.hero-sub {
  color: var(--ink-soft);
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.5;
  max-width: 48ch;
}

/* ------------------------------------------------------------
   5. Filter card
   ------------------------------------------------------------ */
.filter-card {
  background: var(--surface);
  border-radius: 24px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-top: clamp(36px, 5vw, 56px);
  position: relative;
  z-index: 5;
}

.filter-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 7px;
  padding-left: 2px;
}

.filter-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--ink);
  background: var(--surface-2);
  outline: none;
  transition: .18s;
  appearance: none;
}

select.filter-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2367788A' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 34px;
}

.filter-input::placeholder { color: var(--faint); }

.filter-input:focus {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.btn-search {
  padding: 13px 18px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: .18s;
  box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--accent) 65%, transparent);
}

.btn-search:hover { background: var(--accent-press); transform: translateY(-1px); }

/* ------------------------------------------------------------
   6. Seção principal
   ------------------------------------------------------------ */
.main-section { padding: 2rem 0 2.5rem; }

.section-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--accent-ink);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.section-label::before { content: ""; width: 20px; height: 1.5px; background: var(--accent); }

/* ------------------------------------------------------------
   7. Stat cards
   ------------------------------------------------------------ */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  padding: 20px 22px;
  height: 100%;
}

.stat-card-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 8px;
}

.stat-card-value {
  font-family: var(--font-mono);
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1;
  font-feature-settings: "tnum" 1;
}

.stat-card-sub {
  font-size: 11px;
  color: var(--pos);
  font-weight: 500;
  margin-top: 3px;
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  flex: none;
}
.stat-icon svg { stroke: var(--accent); }

/* ------------------------------------------------------------
   8. Mapa
   ------------------------------------------------------------ */
.map-panel {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 24px;
  min-height: 420px;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.map-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 38px 38px;
  opacity: 0.6;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(80% 80% at 50% 50%, #000 40%, transparent 100%);
          mask-image: radial-gradient(80% 80% at 50% 50%, #000 40%, transparent 100%);
}

.map-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 50% at 50% 45%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%);
}

.map-center {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.map-pin {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(150deg, var(--accent-2), var(--accent));
  display: grid;
  place-items: center;
  box-shadow: 0 12px 26px -8px color-mix(in srgb, var(--accent) 70%, transparent);
  animation: pinFloat 3s ease-in-out infinite;
}

@keyframes pinFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.map-badge-float {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 8px 16px;
  box-shadow: var(--shadow-sm);
}

.map-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 8px 15px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
}

/* ------------------------------------------------------------
   9. Cards de imóveis
   ------------------------------------------------------------ */
.imovel-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: .18s;
  color: inherit;
  position: relative;
}

.imovel-card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow); }

.imovel-card::after {
  content: "→";
  position: absolute;
  top: 14px;
  right: 16px;
  color: var(--faint);
  font-size: 15px;
  opacity: 0;
  transition: .18s;
}
.imovel-card:hover::after { opacity: 1; color: var(--accent); transform: translateX(2px); }

.imovel-addr {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
  letter-spacing: -0.01em;
  padding-right: 18px;
}

.imovel-bairro {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
  text-transform: capitalize;
}

.imovel-value {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  text-align: right;
  white-space: nowrap;
  font-feature-settings: "tnum" 1;
}

.imovel-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--faint);
  text-align: right;
  margin-top: 3px;
}

/* ------------------------------------------------------------
   10. Pills / badges de status
   ------------------------------------------------------------ */
.pill {
  font-family: var(--font-mono);
  display: inline-flex;
  align-items: center;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.pill-pago      { background: var(--pos-soft); color: #18815a; }
.pill-cancelado { background: var(--neg-soft); color: #b23b25; }
.pill-parcelado { background: #fff5e0; color: #8a6200; }
.pill-area      { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.imovel-card .pill:first-of-type { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }

/* ------------------------------------------------------------
   11. Rodapé
   ------------------------------------------------------------ */
.footer-strip {
  background: var(--surface);
  padding: clamp(40px, 5vw, 56px) 0 28px;
  margin-top: 8px;
  border-top: 1px solid var(--line);
}

.footer-source-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-source-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--pos-soft);
  display: grid;
  place-items: center;
  flex: none;
}

.footer-title-text {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.footer-body-text {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.55;
  max-width: 52ch;
}

.footer-source-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14.5px;
  color: var(--ink);
}

.footer-source-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}

.footer-nav {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.footer-nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 4px;
}

.footer-nav-links a {
  font-size: 13px;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: .18s;
}

.footer-nav-links a:hover {
  color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--faint);
}

@media (prefers-reduced-motion: reduce) {
  .map-pin { animation: none; }
  .imovel-card:hover, .btn-search:hover { transform: none; }
}

/* ------------------------------------------------------------
   12. Página de resultados
   ------------------------------------------------------------ */
.page-inner { min-height: calc(100vh - 60px); }

.breadcrumb-bar {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}

.bcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.bcrumb a { color: var(--pri); }
.bcrumb a:hover { text-decoration: underline; }
.bcrumb-sep { color: var(--border); }

.results-filter-bar {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

.results-count-label {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.results-clear-link {
  font-size: 12px;
  color: var(--pri-muted);
  margin-left: 10px;
  text-decoration: underline;
}

.results-page-info {
  font-size: 12px;
  color: var(--text-muted);
}

/* Tabela */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card-bg);
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.results-table thead tr {
  border-bottom: 1px solid var(--border);
  background: #f7fafd;
}

.results-table th {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 14px;
  white-space: nowrap;
}

.results-row {
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
}

.results-row:last-child { border-bottom: none; }
.results-row:hover { background: #f4f9fd; }

.results-table td { padding: 11px 14px; vertical-align: middle; }

.td-date    { color: var(--text-muted); white-space: nowrap; }
.td-logradouro { font-weight: 500; color: var(--text-main); display: block; }
.td-unidade { font-size: 11px; color: var(--text-muted); }
.td-bairro  { color: var(--text-muted); white-space: nowrap; }
.td-area    { color: var(--text-muted); white-space: nowrap; }
.td-perc    { color: var(--text-muted); }
.td-value   {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--pri);
  white-space: nowrap;
}

/* Estado vazio */
.results-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 4rem 2rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* Paginação */
.pagination-bar {
  display: flex;
  align-items: center;
  gap: 4px;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  color: var(--text-body);
  font-size: 13px;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}

.page-btn:hover { border-color: var(--pri-muted); background: var(--pri-light); }

.page-btn--active {
  background: var(--pri);
  border-color: var(--pri);
  color: #fff;
  font-weight: 600;
  pointer-events: none;
}

/* ------------------------------------------------------------
   13. Utilitários
   ------------------------------------------------------------ */
.text-pri    { color: var(--pri); }
.text-tert   { color: var(--tert); }
.text-muted2 { color: var(--text-muted); font-size: 13px; }
.bg-page     { background: var(--page-bg); }



/* ============================================================
   imovel.php — adicionar ao final de main.css
   ============================================================ */

/* Galeria */
.imovel-galeria {}
.galeria-main {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--neu-light);
  max-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.galeria-main img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  display: block;
}
.galeria-thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.galeria-thumb {
  width: 72px;
  height: 52px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  opacity: .7;
  transition: opacity .15s, border-color .15s;
}
.galeria-thumb:hover { opacity: 1; }
.galeria-thumb.active { border-color: var(--pri); opacity: 1; }

/* Cabeçalho do imóvel */
.imovel-titulo {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -.3px;
  margin-bottom: 4px;
}
.imovel-complemento {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 17px;
}
.imovel-subtitulo {
  font-size: 13px;
  color: var(--text-muted);
}

/* Bloco genérico de card */
.card-bloco {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
}
.bloco-titulo {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 14px;
}

/* Características */
.caract-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.caract-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.caract-icon { font-size: 18px; line-height: 1.4; }
.caract-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .4px;
}
.caract-valor {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

/* Empreendimento */
.emp-grid { display: flex; flex-direction: column; gap: 8px; }
.emp-item { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.emp-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .4px;
  flex-shrink: 0;
}
.emp-valor {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  text-align: right;
}

/* Análise de valorização */
.analise-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}
@media (max-width: 576px) { .analise-grid { grid-template-columns: 1fr; } }
.analise-item {
  background: var(--page-bg);
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: center;
}
.analise-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: 6px;
}
.analise-valor {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
}
.analise-valor.positivo { color: var(--pos); }
.analise-valor.negativo { color: var(--neg); }
.analise-valor.neutro   { color: var(--ink); }
.analise-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}
.analise-disclaimer {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  margin-bottom: 0;
  font-style: italic;
}

/* Votos de veracidade */
.votos-barra {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--page-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
}
.votos-bloco {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
  gap: 2px;
}
.votos-bloco.confirma { border-right: 1px solid var(--border); }
.votos-num {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
}
.votos-bloco.confirma .votos-num { color: var(--pos); }
.votos-bloco.questiona .votos-num { color: var(--neg); }
.votos-rotulo { font-size: 11px; color: var(--text-muted); }
.votos-divisor { width: 1px; background: var(--border); align-self: stretch; }

/* Botões de voto */
.btn-voto {
  height: 38px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.btn-confirma {
  background: #e6f9ed;
  color: #1a7a3c;
  border-color: #b7e8c8;
}
.btn-confirma:hover { background: #c8f0d8; }
.btn-questiona {
  background: #fdecea;
  color: #b71c1c;
  border-color: #f5c6c6;
}
.btn-questiona:hover { background: #fad4d4; }

/* Botão sugestão */
.btn-sugestao {
  height: 36px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  background: var(--pri-light);
  color: var(--pri);
  border: 1px solid var(--neu-light);
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
  flex-shrink: 0;
}
.btn-sugestao:hover { background: var(--neu-light); }

/* Modal */
.modal-custom {
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
}

/* AdSense */
.adsense-bloco {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--card-bg);
}
.adsense-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 6px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--page-bg);
}
.adsense-placeholder { padding: 8px; }
.adsense-mock {
  background: var(--page-bg);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 12px;
  min-height: 260px;
}


/* ============================================================
   cidades.php + cidade.php
   ============================================================ */

/* Cabeçalho da listagem de cidades */
.cidades-header { }
.cidades-titulo {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -.4px;
  margin-bottom: 4px;
}
.cidades-sub {
  font-size: 14px;
  color: var(--text-muted);
}

/* Grade de cards de cidades */
.cidades-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

/* Card-hero de cidade (foto de fundo + overlay + stats) */
.cidade-hero {
  position: relative;
  display: block;
  min-height: 210px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  /* fallback: gradiente da marca quando não há foto */
  background: linear-gradient(135deg, var(--pri) 0%, var(--pri-muted) 100%);
  box-shadow: 0 2px 8px rgba(27,73,101,.10);
  transition: transform .2s cubic-bezier(.22,1,.36,1), box-shadow .2s ease;
}
.cidade-hero:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(27,73,101,.22);
}

/* Camada de foto (só renderizada quando o arquivo existe) */
.cidade-hero-foto {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform .4s cubic-bezier(.22,1,.36,1);
}
.cidade-hero:hover .cidade-hero-foto { transform: scale(1.05); }

/* Overlay para legibilidade do texto sobre a foto/gradiente */
.cidade-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(11,42,58,.20) 0%,
    rgba(11,42,58,.55) 55%,
    rgba(11,42,58,.88) 100%
  );
}

.cidade-hero-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  min-height: 210px;
  padding: 16px 18px;
  gap: 10px;
}

/* Topo: sigla + seta */
.cidade-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cidade-hero-sigla {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.30);
  backdrop-filter: blur(4px);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
}
.cidade-hero-arrow {
  color: rgba(255,255,255,.75);
  transition: transform .2s ease, color .2s ease;
}
.cidade-hero:hover .cidade-hero-arrow {
  color: #fff;
  transform: translateX(3px);
}

/* Rodapé do card: nome, stats, atualização */
.cidade-hero-info { display: flex; flex-direction: column; gap: 10px; }

.cidade-hero-nome {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.15;
  margin: 0;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.cidade-hero-uf {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  background: rgba(255,255,255,.20);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  padding: 2px 8px;
  border-radius: 99px;
  letter-spacing: .02em;
}

.cidade-hero-stats {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  flex-wrap: wrap;
}
.cidade-hero-stat { display: flex; flex-direction: column; gap: 1px; }
.cidade-hero-stat-valor {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.cidade-hero-stat-label {
  font-size: 11px;
  color: rgba(255,255,255,.72);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.cidade-hero-rodape {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: rgba(255,255,255,.70);
  border-top: 1px solid rgba(255,255,255,.15);
  padding-top: 8px;
  margin-top: 2px;
}
.cidade-hero-rodape svg { flex-shrink: 0; opacity: .85; }

@media (prefers-reduced-motion: reduce) {
  .cidade-hero,
  .cidade-hero-foto,
  .cidade-hero-arrow { transition: none; }
  .cidade-hero:hover { transform: none; }
  .cidade-hero:hover .cidade-hero-foto { transform: none; }
  .cidade-hero:hover .cidade-hero-arrow { transform: none; }
}

/* Cabeçalho da página de cidade */
.cidade-page-sigla {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  background: var(--pri);
  color: #fff;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-transform: uppercase;
}
.cidade-page-titulo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -.3px;
  margin-bottom: 2px;
}
.cidade-page-sub {
  font-size: 13px;
  color: var(--text-muted);
}

/* Distribuição por tipo */
.distrib-item { margin-bottom: 12px; }
.distrib-item:last-child { margin-bottom: 0; }
.distrib-label {
  font-size: 12px;
  color: var(--text-body);
  font-weight: 500;
}
.distrib-perc {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
}
.distrib-barra-bg {
  height: 6px;
  background: var(--page-bg);
  border-radius: 99px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.distrib-barra-fill {
  height: 100%;
  background: var(--pri);
  border-radius: 99px;
  transition: width .4s ease;
}
/* R$/m² por bairro */
.m2-lista { display: flex; flex-direction: column; gap: 12px; }
.m2-item  { }
.m2-valor {
  font-size: 12px;
  font-weight: 700;
  color: var(--pri);
  white-space: nowrap;
}
.m2-fill  { background: var(--tert); }
.m2-sub   {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 3px;
}


/* ============================================================
   sobre.php — adicionar ao final de main.css
   ============================================================ */

/* Hero da página sobre */
.sobre-hero {
  background: var(--pri);
  padding: 3rem 0 2.5rem;
}

.sobre-titulo {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.5px;
  line-height: 1.2;
  margin-bottom: 12px;
}

.sobre-sub {
  font-size: 15px;
  color: rgba(255,255,255,.65);
  line-height: 1.7;
  max-width: 540px;
  margin: 0 auto;
}

/* Stat cards do hero */
.sobre-stat-card {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1rem;
  text-align: center;
}
.sobre-stat-num {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}
.sobre-stat-label {
  font-size: 11px;
  color: rgba(255,255,255,.5);
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* Seções de conteúdo */
.sobre-secao {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.sobre-secao-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--pri-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.sobre-secao-titulo {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -.2px;
  margin-bottom: 10px;
}
.sobre-secao-texto {
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.75;
  margin-bottom: 10px;
}
.sobre-secao-texto:last-child { margin-bottom: 0; }

/* Card de fonte */
.sobre-fonte-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--page-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-top: 12px;
}
.sobre-fonte-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(0,200,83,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sobre-fonte-nome {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}
.sobre-fonte-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Steps do processo */
.sobre-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}
.sobre-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.sobre-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--pri);
  color: #fff;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sobre-step-titulo {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}
.sobre-step-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Lista de limitações */
.sobre-lista {
  padding-left: 18px;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sobre-lista li {
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.6;
}

/* ============================================================
   Mapa Leaflet em resultados.php — adicionar ao final de main.css
   ============================================================ */

/* Abas lista / mapa */
.results-abas {
  display: flex;
  gap: 4px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 3px;
}
.aba-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: calc(var(--radius-md) - 2px);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: background .15s, color .15s;
  cursor: pointer;
  border: none;
  background: transparent;
}
.aba-btn:hover { color: var(--text-main); background: var(--page-bg); }
.aba-btn--active {
  background: var(--pri);
  color: #fff;
}
.aba-btn--active:hover { background: var(--pri); color: #fff; }
.aba-btn--disabled {
  color: var(--text-muted);
  opacity: .45;
  cursor: not-allowed;
  pointer-events: none;
}

/* Container do mapa */
.mapa-container {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--neu-light);
}
#mapa-leaflet {
  height: 520px;
  width: 100%;
  z-index: 1;
}

/* Loading overlay */
.mapa-loading {
  position: absolute;
  inset: 0;
  background: rgba(238,244,250,.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.mapa-loading-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.mapa-spin { animation: spin 1s linear infinite; }

/* Legenda */
.mapa-legenda {
  position: absolute;
  bottom: 14px;
  right: 14px;
  z-index: 500;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 12px;
  min-width: 160px;
}
.mapa-legenda-titulo {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: 8px;
}
.mapa-legenda-item {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-body);
  margin-bottom: 4px;
}
.mapa-legenda-item:last-child { margin-bottom: 0; }
.mapa-legenda-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,.6);
}

/* Estado vazio do mapa */
.mapa-vazio {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  z-index: 10;
  pointer-events: none;
  line-height: 1.7;
}

/* Disclaimer */
.mapa-disclaimer {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
}

/* Cluster icon customizado */
.mapa-cluster-icon {
  background: var(--pri);
  color: #fff;
  border: 2px solid #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  box-shadow: 0 2px 8px rgba(27,73,101,.35);
}

/* Popup do marcador */
.mapa-popup { min-width: 180px; }
.mapa-popup-bairro {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
}
.mapa-popup-linha {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  color: var(--text-body);
  margin-bottom: 4px;
}
.mapa-popup-linha span { color: var(--text-muted); }
.mapa-popup-link {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--pri);
  text-decoration: none;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}
.mapa-popup-link:hover { text-decoration: underline; }

/* Sobrescreve estilos padrão do Leaflet popup */
.leaflet-popup-content-wrapper {
  border-radius: var(--radius-md) !important;
  box-shadow: 0 4px 16px rgba(0,0,0,.12) !important;
  border: 1px solid var(--border) !important;
  padding: 0 !important;
}
.leaflet-popup-content {
  margin: 14px 16px !important;
}
.leaflet-popup-tip-container { display: none; }

/* ------------------------------------------------------------
   Publicidade — ad-bar
   ------------------------------------------------------------ */
.ad-bar {
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}
.ad-slot--horizontal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 60px;
  position: relative;
}
.ad-label {
  position: absolute;
  top: 2px;
  right: 0;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  opacity: .7;
}
.ad-placeholder {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 728px;
  height: 60px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  justify-content: center;
  color: var(--text-muted);
  font-size: 12px;
  background: var(--page-bg);
}
@media (max-width: 767px) {
  .ad-placeholder { max-width: 100%; height: 50px; }
}

/* ------------------------------------------------------------
   Tabela — colunas ordenáveis
   ------------------------------------------------------------ */
.th-sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color .15s;
}
.th-sort:hover { color: var(--pri); }
.th-sort--active { color: var(--pri); font-weight: 700; }
.th-sort-icon {
  font-size: 11px;
  opacity: .6;
  font-style: normal;
}
.th-sort--active .th-sort-icon { opacity: 1; }

/* Coluna R$/m² */
.td-m2 { white-space: nowrap; }
.m2-badge {
  display: inline-block;
  background: var(--pri-light);
  color: var(--pri);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 20px;
  white-space: nowrap;
}
.td-nd { color: var(--text-muted); }