/*
Theme Name: Hub Site Corretor
Theme URI: https://hubimob.local
Author: Dante Testa
Description: Tema WordPress para imobiliária. Visual claro, clean e profissional; paleta configurável (Personalizar). Imóveis alimentados pelo plugin Hub Sync; leads do single vão para o Kanban do hub.
Version: 0.8.8
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hub-site-corretor
*/

/* ============================================================
   Tokens — só --accent e --ink vêm do Personalizar; o resto deriva.
   ============================================================ */
:root {
  --accent: #12946a;
  --ink: #16202e;

  /* derivados (fallback literal + color-mix p/ acompanhar o Personalizar) */
  --accent-600: #0f7c59;
  --accent-600: color-mix(in srgb, var(--accent) 84%, #000);
  --accent-700: #0c664a;
  --accent-700: color-mix(in srgb, var(--accent) 70%, #000);
  --accent-050: #e9f5f0;
  --accent-050: color-mix(in srgb, var(--accent) 9%, #fff);
  --accent-100: #d5ebe3;
  --accent-100: color-mix(in srgb, var(--accent) 16%, #fff);

  --ink-2: #45505f;
  --ink-2: color-mix(in srgb, var(--ink) 76%, #fff);
  --muted: #6b7686;
  --muted: color-mix(in srgb, var(--ink) 54%, #fff);
  --line: #e6e9ee;
  --line: color-mix(in srgb, var(--ink) 11%, #fff);
  --dark: #131b27;
  --dark: color-mix(in srgb, var(--ink) 96%, #000);
  --dark-muted: rgba(255, 255, 255, .64);
  --dark-line: rgba(255, 255, 255, .10);

  --bg: #ffffff;
  --bg-soft: #f5f7fa;
  --bg-soft: color-mix(in srgb, var(--ink) 4%, #fff);
  --card: #ffffff;

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

  --shadow: 0 18px 50px -22px rgba(24, 34, 52, .22);
  --shadow-sm: 0 8px 24px -14px rgba(24, 34, 52, .18);
  --shadow-card: 0 1px 3px rgba(24, 34, 52, .06), 0 8px 24px -18px rgba(24, 34, 52, .18);

  --wrap: 1200px;
  --header-h: 76px;

  --font-head: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ============================================================
   Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; font-family: var(--font-body); color: var(--ink); background: var(--bg);
  line-height: 1.65; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.12; color: var(--ink); margin: 0 0 .5em; letter-spacing: -.02em; }
a { color: var(--accent-600); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
p { margin: 0 0 1rem; }
::selection { background: var(--accent); color: #fff; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }
.section { padding-block: clamp(52px, 7vw, 92px); }
.section.soft { background: var(--bg-soft); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-body);
  font-weight: 600; font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-600);
}
.eyebrow::before { content: ""; width: 24px; height: 2px; border-radius: 2px; background: currentColor; }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 40px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 800; margin: 14px 0 8px; }
.section-head p { color: var(--muted); margin: 0; max-width: 54ch; }
/* 2ª palavra do título em cor de destaque suave */
.tt-accent { color: var(--accent); }

/* ============================================================
   Botões
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-body); font-weight: 600; font-size: .95rem; line-height: 1;
  padding: 13px 22px; border-radius: var(--pill); border: 1.5px solid transparent; cursor: pointer;
  transition: transform .2s var(--ease), background .2s, color .2s, border-color .2s, box-shadow .2s; white-space: nowrap;
}
.btn .ico { width: 18px; height: 18px; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 10px 22px -12px color-mix(in srgb, var(--accent) 80%, transparent); }
.btn-primary:hover { background: var(--accent-600); color: #fff; }
.btn-wa { background: #25d366; color: #04351f; }
.btn-wa:hover { background: #1fc35d; color: #04351f; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-600); background: var(--accent-050); }
.btn-block { width: 100%; }
.btn-lg { padding: 15px 26px; font-size: 1rem; }

/* ============================================================
   Header — sticky, claro, sombra ao rolar
   ============================================================ */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s, background .3s; }
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 24px -18px rgba(24,34,52,.5); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); font-family: var(--font-head); font-weight: 800; }
.brand:hover { color: var(--ink); }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--accent); color: #fff; font-size: 1.25rem; font-weight: 800; }
.brand > span { display: flex; flex-direction: column; line-height: 1.05; }
.brand small { font-family: var(--font-body); font-weight: 500; font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
/* Logo retangular 2:1 — é a identidade do header (sem nome ao lado). */
.custom-logo, .custom-logo-link img { max-height: 52px; width: auto; }
.brand-text { font-size: 1.15rem; }

.main-nav ul { list-style: none; display: flex; align-items: center; gap: 30px; margin: 0; padding: 0; }
.main-nav a { color: var(--ink-2); font-weight: 500; font-size: .95rem; position: relative; }
.main-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -6px; height: 2px; border-radius: 2px; background: var(--accent); transition: right .3s var(--ease); }
.main-nav a:hover { color: var(--ink); } .main-nav a:hover::after { right: 0; }
.main-nav .current-menu-item > a { color: var(--ink); }

.header-cta { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; background: transparent; border: 0; width: 44px; height: 44px; cursor: pointer; padding: 10px; }
.nav-toggle span { display: block; height: 2px; background: var(--ink); border-radius: 2px; margin: 4px 0; transition: transform .3s, opacity .3s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ============================================================
   Hero (claro)
   ============================================================ */
/* Imagem de fundo (Personalizar) + faixa de busca ancorada embaixo. Sem imagem = visual claro. */
.hero-home { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: clamp(400px, 58vh, 600px); padding-bottom: clamp(36px, 5vw, 72px); background: var(--bg) center / cover no-repeat; }
.hero-home::before { content: ""; position: absolute; inset: 0; z-index: 0; background:
  radial-gradient(60% 80% at 85% -10%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%),
  linear-gradient(180deg, var(--bg-soft), var(--bg) 46%); }
.hero-home.has-bg::before { background: linear-gradient(180deg, rgba(12,16,22,.45) 0%, rgba(12,16,22,.18) 40%, rgba(12,16,22,.72) 100%); }
.hero-search { position: relative; z-index: 1; }
.hero-search .wrap { display: grid; grid-template-columns: minmax(150px, 235px) 1fr; gap: 24px; align-items: end; }
/* Caixa da busca: boxed (não vaza pra borda), translúcida sobre a foto. */
.hero-home.has-bg .hero-search { padding-inline: 24px; }
.hero-home.has-bg .hero-search .wrap {
  background: rgba(12,16,22,.42); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius); padding: 28px 30px;
  box-shadow: 0 24px 60px -30px rgba(0,0,0,.7);
}
.hero-copy h1 { font-size: clamp(1.35rem, 2.2vw, 1.9rem); font-weight: 800; line-height: 1.12; margin: 0; text-wrap: balance; }
.hero-copy .lead { margin: 8px 0 0; font-size: .95rem; color: var(--muted); }
.hero-home h1 em { font-style: normal; color: var(--accent); }
.hero-home.has-bg .hero-copy h1 { color: #fff; }
.hero-home.has-bg .hero-copy .lead { color: rgba(255,255,255,.78); }
/* Sobre a imagem o card da busca some — ficam só os campos, como uma barra. */
.hero-home.has-bg .search-card { background: transparent; border: 0; box-shadow: none; padding: 0; }
.hero-home.has-bg .search-grid label { color: rgba(255,255,255,.9); }

/* Faixa de topo (arquivo, single, blog) */
.hero-band { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding-block: clamp(34px, 5vw, 52px); }
.hero-band h1 { font-size: clamp(1.7rem, 3.8vw, 2.7rem); font-weight: 800; }
.hero-band .lead { color: var(--muted); margin: 0; max-width: 60ch; }

/* Search card */
.search-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.hero-band .search-card { margin-top: 22px; }
.search-grid { display: grid; grid-template-columns: repeat(5, 1fr) auto; gap: 12px; align-items: end; }
.search-grid .field { display: flex; flex-direction: column; gap: 6px; }
.search-grid label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding-left: 2px; }
.search-grid select {
  width: 100%; appearance: none; -webkit-appearance: none; font-family: var(--font-body); font-size: .9rem; color: var(--ink);
  text-overflow: ellipsis;
  padding: 13px 30px 13px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236b7686' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; cursor: pointer; transition: border-color .2s, box-shadow .2s;
}
.search-grid input[type="text"] {
  width: 100%; font-family: var(--font-body); font-size: .95rem; color: var(--ink);
  padding: 13px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.search-grid select:focus,
.search-grid input[type="text"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-050); }
.field-submit { align-self: end; }
.field-submit .btn { padding-block: 13px; }

/* ============================================================
   Cards de imóvel
   ============================================================ */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 26px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-card); transition: transform .35s var(--ease), box-shadow .35s, border-color .35s; }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.card-media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-soft); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card-media img { transform: scale(1.05); }
.card-media .placeholder { display: grid; place-items: center; width: 100%; height: 100%; font-size: 3rem; color: #c8d2ce; }
.card-badges { position: absolute; top: 14px; left: 14px; display: flex; gap: 8px; }
.badge { padding: 6px 12px; border-radius: var(--pill); font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; background: rgba(255,255,255,.92); color: var(--ink); box-shadow: var(--shadow-sm); }
.badge.accent { background: var(--accent); color: #fff; }
.card-fav { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: var(--ink); display: grid; place-items: center; cursor: pointer; transition: background .2s, color .2s, transform .2s; }
.card-fav:hover { background: var(--accent); color: #fff; transform: scale(1.08); }
.card-body { padding: 20px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-ref { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.card-body h3 { font-size: 1.15rem; font-weight: 700; margin: 4px 0; }
.card-body h3 a { color: var(--ink); } .card-body h3 a:hover { color: var(--accent-600); }
.card-loc { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .9rem; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.card-loc .ico { width: 16px; height: 16px; color: var(--accent); flex: none; }
.card-price { font-family: var(--font-head); font-weight: 800; font-size: 1.45rem; color: var(--ink); margin-top: auto; }
.card-price .per { font-family: var(--font-body); font-size: .85rem; font-weight: 500; color: var(--muted); }
.card-specs { display: flex; flex-wrap: wrap; gap: 16px; margin: 12px 0 16px; color: var(--ink-2); }
.card-specs span { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; }
.card-specs .ico { width: 17px; height: 17px; color: var(--accent); }
.card .card-cta { margin-top: auto; }

/* ============================================================
   Cards de notícia
   ============================================================ */
.post-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-card); transition: transform .35s var(--ease), box-shadow .35s; }
.post-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.post-card .card-media { aspect-ratio: 16 / 10; }
.post-card .card-body { padding: 20px; }
.post-meta { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.post-card h3 { font-size: 1.12rem; margin: 0 0 8px; }
.post-card h3 a { color: var(--ink); }
.post-card p { color: var(--muted); font-size: .94rem; margin: 0 0 14px; }
.read { color: var(--accent-600); font-weight: 600; font-size: .9rem; display: inline-flex; align-items: center; gap: 6px; }
.read .ico { width: 16px; height: 16px; }

/* ============================================================
   Perfil do corretor (home, entre o hero e as notícias)
   ============================================================ */
.corretor-foto { aspect-ratio: 1 / 1; border-radius: var(--radius); overflow: hidden; background: var(--bg-soft); box-shadow: var(--shadow); }
.corretor-foto img { width: 100%; height: 100%; object-fit: cover; }
.corretor-creci { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-700); background: var(--accent-050); border-radius: var(--pill); padding: 6px 14px; }
.corretor-bio { color: var(--muted); margin-top: 18px; max-width: 68ch; }
.corretor-bio p:last-child { margin-bottom: 0; }
/* Bloco da home = o painel sem formulário. Aqui a tela é larga, então tudo que é texto
   (identidade + apresentação) fica na coluna da direita, ao lado da foto. */
.corretor-card { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 10px clamp(28px, 4vw, 52px); align-items: start; }
.corretor-card .painel-topo { display: contents; }
/* A foto atravessa as duas linhas para a apresentação encostar nos ícones. */
.corretor-card .corretor-foto { grid-row: 1 / span 2; }
.corretor-card .painel-bio { grid-column: 2; margin-top: 4px; }
.corretor-card .painel-id h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); margin: 14px 0 6px; }
.corretor-card .painel-bio .corretor-bio { font-size: 1rem; -webkit-line-clamp: 4; }
.corretor-card .bio-toggle { font-size: .92rem; }

/* Item de menu que abre o off-canvas — tem cara de link, não de botão */
.menu-corretor button {
  font-family: var(--font-body); font-size: .95rem; font-weight: 600; color: var(--accent-600);
  background: none; border: 0; padding: 0; cursor: pointer; transition: color .2s;
}
.menu-corretor button:hover { color: var(--accent); }

/* Off-canvas do perfil (fica no footer, disponível em todas as páginas) */
body.oc-aberto { overflow: hidden; }
.oc { position: fixed; inset: 0; z-index: 200; }
.oc-backdrop { position: absolute; inset: 0; background: rgba(10,14,20,.5); opacity: 0; transition: opacity .3s var(--ease); }
.oc.in .oc-backdrop { opacity: 1; }
.oc-panel { position: absolute; top: 0; right: 0; height: 100%; width: clamp(360px, 40vw, 760px); overflow-y: auto;
  background: var(--bg); padding: 30px 32px 40px; box-shadow: -30px 0 70px -30px rgba(24,34,52,.5);
  transform: translateX(100%); transition: transform .35s var(--ease); }
.oc.in .oc-panel { transform: translateX(0); }
.oc-close { position: absolute; top: 14px; right: 16px; width: 38px; height: 38px; border: 0; border-radius: 50%;
  background: var(--bg-soft); color: var(--ink); font-size: 1.4rem; line-height: 1; cursor: pointer; transition: background .2s; }
.oc-close:hover { background: var(--accent-050); color: var(--accent-700); }
/* Painel: topo em 2 colunas (foto | identidade), bio dobrável e formulário embaixo. */
.painel-topo { display: grid; grid-template-columns: minmax(120px, 200px) 1fr; gap: 22px; align-items: start; margin-top: 6px; }
.painel-id h2 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); margin: 10px 0 6px; }
/* Contato só com ícone — o dado vai no title/aria-label. */
.contato-icones { display: flex; gap: 10px; margin-top: 14px; }
.ico-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; color: var(--ink); transition: all .2s var(--ease); }
.ico-btn:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--accent-600); background: var(--accent-050); }
.ico-btn.wa { background: #25d366; border-color: #25d366; color: #04351f; }
.ico-btn.wa:hover { background: #1fc35d; border-color: #1fc35d; color: #04351f; }

.painel-bio { margin-top: 24px; }
.painel-bio .corretor-bio { margin-top: 0; font-size: .93rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.painel-bio .corretor-bio.aberta { display: block; }
.bio-toggle { margin-top: 6px; padding: 0; border: 0; background: none; cursor: pointer;
  font-family: var(--font-body); font-size: .88rem; font-weight: 600; color: var(--accent-600); }
.bio-toggle:hover { color: var(--accent); }

.painel-form { margin-top: 26px; }
.painel-form .lead-form label { font-size: .95rem; color: var(--ink); font-family: var(--font-head); font-weight: 700; }

/* Bloco de destaque: 1 notícia com a foto de fundo + 3 compactas dividindo a mesma altura */
.news-hero { display: grid; grid-template-columns: 1.45fr 1fr; gap: 26px; align-items: stretch; }
.news-lead { position: relative; display: flex; min-height: 460px; border-radius: var(--radius); overflow: hidden; background: var(--bg-soft); box-shadow: var(--shadow-card); transition: transform .35s var(--ease), box-shadow .35s; }
.news-lead:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.lead-media { position: absolute; inset: 0; display: block; overflow: hidden; }
.lead-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.news-lead:hover .lead-media img { transform: scale(1.04); }
.lead-media .placeholder { display: grid; place-items: center; width: 100%; height: 100%; font-size: 3rem; color: #c8d2ce; }
.lead-badge { position: absolute; top: 16px; left: 16px; z-index: 2; }
/* Texto sobre a foto, ancorado embaixo. O gradiente garante contraste em foto clara. */
.lead-body { position: relative; z-index: 1; margin-top: auto; width: 100%; padding: 110px 28px 26px;
  background: linear-gradient(180deg, transparent 0%, rgba(10,14,20,.55) 42%, rgba(10,14,20,.92) 100%); pointer-events: none; }
.lead-body > * { pointer-events: auto; }
.lead-body .post-meta { color: rgba(255,255,255,.72); margin-bottom: 6px; }
.lead-body h3 { font-size: clamp(1.3rem, 2.1vw, 1.75rem); margin: 0 0 10px; color: #fff; }
.lead-body h3 a { color: #fff; }
.lead-body h3 a:hover { color: var(--accent-100); }
.lead-body p { color: rgba(255,255,255,.8); margin: 0 0 14px; max-width: 52ch; }
.lead-body .read { color: #fff; }
.lead-body .read:hover { color: var(--accent-100); }

/* Coluna direita: 3 cards dividindo a altura do destaque, foto colada na borda */
.news-side { display: grid; grid-template-rows: repeat(3, 1fr); gap: 14px; }
.post-mini { display: grid; grid-template-columns: 42% 1fr; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; transition: border-color .25s, box-shadow .25s, transform .25s var(--ease); }
.post-mini:hover { border-color: transparent; box-shadow: var(--shadow-card); transform: translateX(3px); }
.mini-media { display: block; height: 100%; overflow: hidden; background: var(--bg-soft); }
.mini-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.post-mini:hover .mini-media img { transform: scale(1.05); }
.mini-media .placeholder { display: grid; place-items: center; width: 100%; height: 100%; font-size: 1.5rem; color: #c8d2ce; }
.mini-body { padding: 14px 16px; align-self: center; min-width: 0; }
/* meta em 1 linha e resumo em 2: mantém os 3 cards com a mesma cara */
.mini-body .post-meta { margin-bottom: 4px; font-size: .68rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-mini h4 { font-size: .98rem; line-height: 1.25; margin: 0 0 4px; }
.post-mini h4 a { color: var(--ink); }
.post-mini h4 a:hover { color: var(--accent-600); }
.post-mini p { color: var(--muted); font-size: .84rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Listagem com tabs — largura cheia; "Todos os artigos" fecha o bloco embaixo */
.feed-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; }
.feed-more { display: flex; justify-content: center; margin-top: 38px; }
.feed-title { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; margin: 0; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab { font-family: var(--font-body); font-size: .86rem; font-weight: 600; color: var(--ink-2); background: #fff; border: 1px solid var(--line); border-radius: var(--pill); padding: 9px 15px; cursor: pointer; transition: all .2s var(--ease); }
.tab:hover { border-color: var(--accent); color: var(--accent-600); }
.tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.news-feed .cards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.news-feed .post-card h3 { font-size: 1.05rem; }
.news-feed .post-card p { font-size: .89rem; }
.feed-item[hidden] { display: none; }
.feed-empty { text-align: center; color: var(--muted); padding: 40px 0 0; }

/* ============================================================
   Paginação / vazio
   ============================================================ */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 48px; flex-wrap: wrap; }
.pagination .page-numbers { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); color: var(--ink); font-weight: 600; transition: all .2s; }
.pagination .page-numbers:hover, .pagination .current { background: var(--accent); color: #fff; border-color: var(--accent); }
.empty-state { text-align: center; padding: 70px 20px; }
.empty-state .big { font-size: 3.4rem; margin-bottom: 10px; }
.empty-state h2 { font-size: 1.6rem; }
.empty-state p { color: var(--muted); }

/* ============================================================
   Single imóvel
   ============================================================ */
.breadcrumbs { font-size: .86rem; color: var(--muted); margin-bottom: 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumbs a { color: var(--muted); } .breadcrumbs a:hover { color: var(--accent); }
/* Preço saiu do topo (0.8.7) — já vive na aside sticky, repetir lá em cima só disputava
   atenção com o título logo abaixo dele. Header agora é: badge + tipo/ref → título → local. */
.prop-title-row h1 { font-size: clamp(1.7rem, 3.4vw, 2.7rem); margin: 0 0 10px; }
.prop-kicker { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.prop-kicker-txt { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-600); }
.prop-loc { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 1rem; }
.prop-loc .ico { color: var(--accent); }

/* Galeria — carrossel full-bleed (fora do .wrap, ocupa 100% da viewport), 3 fotos visíveis
   por vez (2 no tablet, 1 no mobile) em loop automático infinito, puro CSS.
   --track-slides (PHP) = nº de <div> no trilho = 2x as fotos (conjunto duplicado, pra emendar
   sem costura) ou só 1 quando não há loop. --visible = quantas ficam à mostra por vez.
   O trilho fica largo o bastante pra caber TODAS as fatias ao mesmo tempo/tamanho
   (largura = track-slides * 100%/visible) e cada fatia ocupa 1/track-slides desse trilho —
   assim 1 fatia sempre mede exatamente 100%/visible do CONTAINER, em qualquer breakpoint.
   A animação anda -50% do trilho = exatamente a largura de UM conjunto original de fotos,
   então ao voltar a 0% a imagem já é idêntica: sem salto, loop de verdade. */
.gallery-carousel { position: relative; overflow: hidden; background: var(--bg-soft); --visible: 1; }
.carousel-track { display: flex; width: calc(var(--track-slides, 1) * 100% / var(--visible, 1)); }
.gallery-carousel.is-loop .carousel-track { animation: hsc-carousel-scroll var(--carousel-dur, 24s) linear infinite; }
.gallery-carousel.is-loop:hover .carousel-track { animation-play-state: paused; }
/* Fatia é um <button> (abre o lightbox) — zera o reset padrão de botão. */
.carousel-slide { flex: 0 0 calc(100% / var(--track-slides, 1)); aspect-ratio: 16 / 9; border: 0; padding: 0; margin: 0; background: none; cursor: pointer; overflow: hidden; position: relative; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s var(--ease); }
.carousel-slide:hover img { transform: scale(1.04); }
.carousel-slide .placeholder { width: 100%; height: 100%; display: grid; place-items: center; font-size: 4rem; color: #c1ccc7; }

/* Lightbox — reusa .oc/.oc-backdrop/.oc-close (mesmo padrão do off-canvas do corretor),
   só troca o painel lateral por um estágio centralizado com nav + contador. */
body.lightbox-aberto { overflow: hidden; }
.lightbox-panel { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 60px 70px; opacity: 0; transition: opacity .3s var(--ease); }
.oc.in .lightbox-panel { opacity: 1; }
.lightbox-stage { position: relative; width: 100%; max-width: 1100px; aspect-ratio: 16 / 9; }
.lightbox-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .3s var(--ease); }
.lightbox-stage img.active { opacity: 1; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: var(--ink); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-sm); transition: background .2s, color .2s; }
.lightbox-nav:hover { background: var(--accent); color: #fff; }
.lightbox-nav.prev { left: -8px; transform: translateY(-50%) rotate(180deg); }
.lightbox-nav.next { right: -8px; }
.lightbox-count { position: absolute; bottom: -36px; left: 50%; transform: translateX(-50%); color: #fff; font-size: .85rem; font-weight: 600; }
.lightbox .oc-close { top: 20px; right: 20px; background: rgba(255,255,255,.92); z-index: 2; }
.gallery-badge { position: absolute; top: 16px; left: 16px; z-index: 2; }
@keyframes hsc-carousel-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

@media (min-width: 700px) {
  .gallery-carousel.is-loop { --visible: 2; }
}
@media (min-width: 1000px) {
  .gallery-carousel.is-loop { --visible: 3; }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-carousel.is-loop .carousel-track { animation: none; }
}

/* Layout do single */
.property-layout { display: grid; grid-template-columns: 1fr 372px; gap: 44px; align-items: start; padding-block: 48px 76px; }
.prop-main > * + * { margin-top: 38px; }
.prop-block h2 { font-size: 1.4rem; margin-bottom: 16px; }
.prop-block h2::after { content: ""; display: block; width: 42px; height: 3px; background: var(--accent); border-radius: 3px; margin-top: 10px; }
.spec-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(116px, 1fr)); gap: 14px; list-style: none; margin: 0; padding: 0; }
.spec-tiles li { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px 14px; text-align: center; }
.spec-tiles .ico { width: 26px; height: 26px; color: var(--accent); margin: 0 auto 8px; }
.spec-tiles .v { font-family: var(--font-head); font-weight: 800; font-size: 1.3rem; color: var(--ink); }
.spec-tiles .k { font-size: .82rem; color: var(--muted); }
.prop-desc { color: var(--ink-2); line-height: 1.8; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 30px; margin: 0; }
.facts div { display: flex; justify-content: space-between; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); } .facts dd { margin: 0; font-weight: 600; color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 10px 15px; border-radius: var(--pill); background: var(--accent-050); color: var(--accent-700); font-size: .9rem; font-weight: 600; }
.chip .ico { width: 16px; height: 16px; }
.prop-map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.prop-map iframe { display: block; width: 100%; height: 360px; border: 0; }

/* Sidebar */
.prop-aside { position: sticky; top: calc(var(--header-h) + 16px); display: flex; flex-direction: column; gap: 16px; }
.aside-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-card); }
.aside-price { font-family: var(--font-head); font-weight: 800; font-size: 1.9rem; color: var(--ink); }
.aside-price .per { font-family: var(--font-body); font-size: .95rem; font-weight: 500; color: var(--muted); }
.aside-sub { color: var(--muted); font-size: .9rem; margin: 2px 0 0; }
.aside-loc { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .92rem; margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.aside-loc .ico { color: var(--accent); }
.broker { display: flex; align-items: center; gap: 14px; margin: 4px 0 18px; }
/* Tom suave (não o verde cheio do accent) — ao lado do CTA do WhatsApp, um avatar accent
   sólido competia demais por atenção com o botão. */
.broker-av { width: 50px; height: 50px; border-radius: 50%; background: var(--accent-100); color: var(--accent-700); display: grid; place-items: center; font-family: var(--font-head); font-weight: 800; font-size: 1.25rem; overflow: hidden; }
.broker-av img { width: 100%; height: 100%; object-fit: cover; }
.broker b { display: block; color: var(--ink); } .broker span { font-size: .84rem; color: var(--muted); }
.contact-lines { list-style: none; margin: 14px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.contact-lines li { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: .92rem; }
.contact-lines .ico { color: var(--accent); flex: none; }

/* Painel de contato: agrupa form + telefone/e-mail num bloco visualmente separado do
   preço/corretor/WhatsApp acima — antes tudo saía numa pilha só de caixas brancas iguais. */
.aside-contact-panel { background: var(--bg-soft); border-radius: var(--radius-sm); padding: 18px 18px 16px; margin-top: 18px; }
.aside-contact-panel .lead-form { margin-top: 0; padding-top: 0; border-top: 0; }
.aside-contact-panel .contact-lines { border-top-color: var(--line); }

/* Form de lead */
.lead-form { margin-top: 16px; padding-top: 18px; border-top: 1px solid var(--line); }
.lead-form label { display: block; font-size: .8rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--accent-700); margin-bottom: 10px; }
.lead-form input, .lead-form textarea, .lead-form select { width: 100%; margin: 0 0 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: var(--font-body); font-size: .94rem; color: var(--ink); background: #fff; }
.lead-form input:focus, .lead-form textarea:focus, .lead-form select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-050); }
/* DDI + telefone viram UM controle só (borda compartilhada) em vez de duas caixas soltas
   lado a lado — ficava parecendo dois campos sem relação nenhuma. */
.lead-form .tel-group { display: flex; margin: 0 0 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.lead-form .tel-group:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-050); }
.lead-form .tel-group select, .lead-form .tel-group input { margin: 0; border: 0; border-radius: 0; background: transparent; }
.lead-form .tel-group select:focus, .lead-form .tel-group input:focus { box-shadow: none; }
.lead-form .ddi-select { flex: 0 0 auto; width: auto; max-width: 92px; padding-left: 10px; padding-right: 6px; border-right: 1px solid var(--line); }
.lead-form .tel-group input[name="telefone"] { flex: 1 1 auto; min-width: 0; }
.lead-msg { margin: 10px 0 0; padding: 12px 14px; border-radius: var(--radius-sm); font-size: .9rem; display: none; }
.lead-msg.show { display: block; }
.lead-msg.ok { background: var(--accent-050); color: var(--accent-700); }
.lead-msg.err { background: #fdecec; color: #b42318; }
.lead-form button[disabled] { opacity: .6; cursor: progress; }

/* ============================================================
   Single post
   ============================================================ */
.article { max-width: 760px; margin-inline: auto; padding-block: 52px 76px; }
.article-content { font-size: 1.06rem; line-height: 1.85; color: var(--ink-2); }
.article-content h2, .article-content h3 { margin-top: 1.6em; color: var(--ink); }
.featured-media { border-radius: var(--radius); overflow: hidden; margin: 0 0 30px; box-shadow: var(--shadow-sm); }
.related-box { display: grid; grid-template-columns: 120px 1fr; gap: 18px; align-items: center; margin: 30px 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-soft); transition: transform .25s var(--ease), box-shadow .25s; }
.related-box:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.related-box .thumb { width: 120px; height: 90px; border-radius: 10px; object-fit: cover; background: #dfe6e2; }
.related-box h4 { margin: 4px 0; color: var(--ink); }
.related-box p { margin: 0; color: var(--muted); font-size: .9rem; }

/* ============================================================
   Footer (escuro = --dark)
   ============================================================ */
.site-footer { background: var(--dark); color: #fff; padding-block: 64px 28px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid var(--dark-line); }
.site-footer .brand { color: #fff; margin-bottom: 16px; }
.site-footer .brand small { color: var(--dark-muted); }
.site-footer p { color: var(--dark-muted); }
.site-footer h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: rgba(255,255,255,.55); margin-bottom: 16px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.footer-links a, .footer-links li { color: rgba(255,255,255,.78); font-size: .95rem; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 22px; color: var(--dark-muted); font-size: .86rem; }

/* WhatsApp flutuante */
.wa-float { position: fixed; right: 22px; bottom: 22px; z-index: 90; width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #04351f; display: grid; place-items: center; box-shadow: 0 14px 30px -10px rgba(37,211,102,.6); transition: transform .25s var(--ease); }
.wa-float:hover { transform: scale(1.08) translateY(-2px); color: #04351f; }
.wa-float .ico { width: 28px; height: 28px; }

/* ============================================================
   Reveal
   ============================================================ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
[data-reveal-stagger] > * { opacity: 0; transform: translateY(22px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
[data-reveal-stagger].in > * { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, [data-reveal-stagger] > * { opacity: 1 !important; transform: none !important; transition: none; }
  .card:hover, .post-card:hover, .btn:hover { transform: none; }
}

/* ============================================================
   Responsivo
   ============================================================ */
@media (max-width: 1000px) {
  .property-layout { grid-template-columns: 1fr; }
  .prop-aside { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-search .wrap { grid-template-columns: 1fr; gap: 18px; }
  .search-grid { grid-template-columns: repeat(3, 1fr); }
  .field-submit { grid-column: 1 / -1; }
  .news-hero { grid-template-columns: 1fr; }
  .news-lead { min-height: 340px; }
  .news-side { grid-template-rows: none; }
  .corretor-card { grid-template-columns: minmax(160px, 220px) 1fr; }
}
@media (max-width: 620px) {
  .painel-topo { grid-template-columns: 1fr; }
  .corretor-card { grid-template-columns: 1fr; }
  .corretor-card .painel-bio { grid-column: 1; margin-top: 18px; }
  .corretor-foto { max-width: 220px; }
}
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .main-nav { position: fixed; inset: 0 0 0 auto; width: min(320px, 82vw); background: #fff; padding: calc(var(--header-h) + 20px) 28px 28px; transform: translateX(100%); transition: transform .35s var(--ease); box-shadow: -20px 0 60px -20px rgba(24,34,52,.3); }
  .main-nav.open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; align-items: flex-start; gap: 22px; }
  .main-nav a { font-size: 1.1rem; }
  .header-cta > .btn { display: none; }
  .search-grid { grid-template-columns: 1fr 1fr; }
  .field-submit { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .search-grid { grid-template-columns: 1fr; }
  .lightbox-panel { padding: 20px 44px; }
  .lightbox-nav { width: 38px; height: 38px; }
  .lightbox-nav.prev { left: -4px; } .lightbox-nav.next { right: -4px; }
}
