/* =====================================================================
   LHQ Imóveis — estilos comuns (menu do celular, cards dos imóveis,
   botão do WhatsApp, formulários). Usado por todas as páginas.
   ===================================================================== */
:root {
  --l-teal: #1F5F5B;
  --l-teal-dark: #163F3D;
  --l-teal-lite: #EBF2F1;
  --l-ink: #1C2625;
  --l-ink-60: #637270;
  --l-ink-40: #8FA5A3;
  --l-line: rgba(28,38,37,0.09);
  --l-line-strong: rgba(28,38,37,0.18);
  --l-bg: #FFFFFF;
  --l-bg-off: #F7FAF9;
  --l-bg-warm: #F0F5F4;
  --l-wa: #25D366;
  --l-ease: cubic-bezier(0.23, 1, 0.32, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --l-ink: #E2EDEC; --l-ink-60: #7EA8A4; --l-ink-40: #4D7470;
    --l-line: rgba(200,230,228,0.09); --l-line-strong: rgba(200,230,228,0.18);
    --l-bg: #0D1918; --l-bg-off: #111F1E; --l-bg-warm: #152321; --l-teal-lite: #17302E;
  }
}
:root[data-theme="dark"] {
  --l-ink: #E2EDEC; --l-ink-60: #7EA8A4; --l-ink-40: #4D7470;
  --l-line: rgba(200,230,228,0.09); --l-line-strong: rgba(200,230,228,0.18);
  --l-bg: #0D1918; --l-bg-off: #111F1E; --l-bg-warm: #152321; --l-teal-lite: #17302E;
}

html { -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; }

/* ---------------- Botão do menu (só no celular) ---------------- */
.lhq-menu-btn {
  display: none;
  width: 44px; height: 44px;
  margin-left: 8px;
  margin-right: -8px;
  border: none; background: none; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
.lhq-menu-btn span {
  display: block; width: 22px; height: 2px; border-radius: 2px;
  background: var(--l-ink);
  transition: transform 220ms var(--l-ease), opacity 160ms ease;
}
.lhq-menu-open .lhq-menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.lhq-menu-open .lhq-menu-btn span:nth-child(2) { opacity: 0; }
.lhq-menu-open .lhq-menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.lhq-drawer {
  position: fixed; left: 0; right: 0; bottom: 0; top: 64px;
  z-index: 99;
  background: rgba(8,17,16,0.45);
  opacity: 0; visibility: hidden;
  transition: opacity 200ms ease, visibility 0s linear 200ms;
}
.lhq-menu-open .lhq-drawer { opacity: 1; visibility: visible; transition: opacity 200ms ease; }
.lhq-menu-open, .lhq-menu-open body { overflow: hidden; }

.lhq-drawer-panel {
  background: var(--l-bg);
  border-bottom: 1px solid var(--l-line);
  padding: 8px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  transform: translateY(-12px);
  transition: transform 260ms var(--l-ease);
  max-height: 100%; overflow-y: auto;
  font-family: 'Inter', system-ui, sans-serif;
}
.lhq-menu-open .lhq-drawer-panel { transform: none; }
.lhq-drawer ul { list-style: none; margin: 0; padding: 0; }
.lhq-drawer li a {
  display: block; padding: 14px 4px;
  font-family: 'Fraunces', Georgia, serif; font-size: 22px; font-weight: 400;
  color: var(--l-ink);
  border-bottom: 1px solid var(--l-line);
}
.lhq-drawer li a.active { color: var(--l-teal); }
.lhq-drawer-actions { display: grid; gap: 10px; margin-top: 20px; }

/* ---------------- Botões ---------------- */
.lhq-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 18px; border-radius: 12px;
  font-family: 'Inter', system-ui, sans-serif; font-size: 15px; font-weight: 600;
  text-align: center; text-decoration: none; cursor: pointer; border: none;
  transition: background 160ms ease, transform 160ms var(--l-ease);
  -webkit-tap-highlight-color: transparent;
}
.lhq-btn:active { transform: scale(0.97); }
.lhq-btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.lhq-btn-wa { background: var(--l-wa); color: #fff; }
.lhq-btn-wa:hover { background: #1fbd59; }
.lhq-btn-teal { background: var(--l-teal); color: #fff; }
.lhq-btn-teal:hover { background: var(--l-teal-dark); }
.lhq-btn-teal[disabled] { opacity: .6; cursor: wait; }
.lhq-btn-line { border: 1px solid var(--l-line-strong); color: var(--l-ink); background: transparent; }
.lhq-btn-line:hover { background: var(--l-bg-warm); }

/* ---------------- WhatsApp flutuante ---------------- */
.lhq-fab {
  position: fixed; z-index: 90;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--l-wa); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.22);
  transition: transform 180ms var(--l-ease);
}
.lhq-fab:active { transform: scale(0.94); }
.lhq-fab svg { width: 30px; height: 30px; }
.lhq-menu-open .lhq-fab { display: none; }

/* ---------------- Cards de imóveis ---------------- */
.lhq-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.lhq-card {
  display: flex; flex-direction: column;
  background: var(--l-bg);
  border: 1px solid var(--l-line);
  border-radius: 16px; overflow: hidden;
  color: var(--l-ink); text-decoration: none;
  transition: transform 220ms var(--l-ease), box-shadow 220ms var(--l-ease), border-color 220ms ease;
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) {
  .lhq-card:hover { transform: translateY(-4px); box-shadow: 0 16px 48px rgba(0,0,0,0.10); border-color: var(--l-line-strong); }
  .lhq-card:hover .lhq-card-img img { transform: scale(1.04); }
}
.lhq-card:active { transform: scale(0.99); }
.lhq-card-img {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden;
  background: var(--l-bg-warm);
}
.lhq-card-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 400ms var(--l-ease);
}
.lhq-noimg {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--l-ink-40); background: var(--l-bg-warm);
}
.lhq-noimg svg { width: 48px; height: 48px; opacity: .7; }
.lhq-card-badge, .lhq-card-flag {
  position: absolute; top: 12px; left: 12px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 5px;
  color: #1F5F5B; background: rgba(235,242,241,0.94);
}
.lhq-card-flag { left: auto; right: 12px; background: #B8862E; color: #fff; }
.lhq-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; font-family: 'Inter', system-ui, sans-serif; }
.lhq-card-price {
  font-family: 'Fraunces', Georgia, serif; font-size: 22px; font-weight: 400;
  letter-spacing: -0.01em; line-height: 1.2;
}
.lhq-card-price small { font-family: 'Inter', sans-serif; font-size: 12px; color: var(--l-ink-60); margin-left: 2px; }
.lhq-card-title {
  font-size: 14px; font-weight: 500; margin-top: 6px; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.lhq-card-place { font-size: 13px; color: var(--l-ink-60); margin-top: 2px; }
.lhq-card-specs {
  display: flex; flex-wrap: wrap; gap: 6px 16px;
  margin-top: auto; padding-top: 12px;
  font-size: 12px; color: var(--l-ink-60);
}
.lhq-card-specs:not(:empty) { border-top: 1px solid var(--l-line); margin-top: 14px; }
.lhq-spec { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.lhq-spec svg { width: 14px; height: 14px; color: var(--l-teal); flex-shrink: 0; }
.lhq-spec strong { font-weight: 600; color: var(--l-ink); }

.lhq-skel { pointer-events: none; }
.lhq-skel .lhq-card-img, .lhq-skel-line {
  background: linear-gradient(90deg, var(--l-bg-warm) 0%, var(--l-bg-off) 50%, var(--l-bg-warm) 100%);
  background-size: 200% 100%;
  animation: lhqShimmer 1.2s ease-in-out infinite;
}
.lhq-skel-line { height: 12px; border-radius: 6px; margin-bottom: 10px; }
@keyframes lhqShimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.lhq-empty {
  grid-column: 1 / -1;
  text-align: center; padding: 48px 20px;
  border: 1px dashed var(--l-line-strong); border-radius: 16px;
  color: var(--l-ink-60); font-family: 'Inter', system-ui, sans-serif; font-size: 15px;
}
.lhq-empty strong { display: block; color: var(--l-ink); font-family: 'Fraunces', Georgia, serif; font-size: 22px; font-weight: 400; margin-bottom: 6px; }
.lhq-empty .lhq-btn { display: inline-flex; margin-top: 16px; }

/* ---------------- Formulário de contato (CRM) ---------------- */
.lhq-form { display: grid; gap: 12px; font-family: 'Inter', system-ui, sans-serif; }
.lhq-form label { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--l-ink-60); display: block; margin-bottom: 5px; }
.lhq-input {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  border: 1.5px solid var(--l-line-strong); background: var(--l-bg);
  font: 16px/1.4 'Inter', system-ui, sans-serif; color: var(--l-ink);
  outline: none; transition: border-color 160ms ease;
  -webkit-appearance: none; appearance: none;
}
.lhq-input:focus { border-color: var(--l-teal); }
textarea.lhq-input { min-height: 96px; resize: vertical; }
.lhq-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--l-ink-60); line-height: 1.45; cursor: pointer; text-transform: none !important; letter-spacing: 0 !important; font-weight: 400 !important; }
.lhq-consent input { width: 20px; height: 20px; margin: 0; flex-shrink: 0; accent-color: var(--l-teal); }
.lhq-form-err { font-size: 13px; color: #c0392b; display: none; }
.lhq-form-ok { text-align: center; padding: 8px 0; font-family: 'Inter', system-ui, sans-serif; }
.lhq-form-ok .lhq-ok-icon { width: 52px; height: 52px; border-radius: 50%; background: var(--l-teal-lite); color: var(--l-teal); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.lhq-form-ok .lhq-ok-icon svg { width: 26px; height: 26px; }
.lhq-form-ok h3 { font-family: 'Fraunces', Georgia, serif; font-weight: 400; font-size: 22px; color: var(--l-ink); margin-bottom: 4px; }
.lhq-form-ok p { font-size: 14px; color: var(--l-ink-60); margin-bottom: 14px; }

/* ---------------- Celular ---------------- */
@media (max-width: 900px) {
  .lhq-menu-btn { display: flex; }
  .lhq-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}
@media (max-width: 600px) {
  .lhq-grid { grid-template-columns: 1fr; gap: 16px; }
  /* Evita o zoom automático do iPhone ao tocar nos campos */
  input, select, textarea { font-size: 16px !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Barra das páginas Sobre/Contato: no celular, botões encostam no menu */
@media (max-width: 900px) {
  nav .nav-right { margin-left: auto; }
}

/* Barra do topo no modo escuro (algumas páginas fixavam o fundo claro) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) nav { background: rgba(17,24,23,.92); border-bottom-color: rgba(237,242,241,.1); }
}
:root[data-theme="dark"] nav { background: rgba(17,24,23,.92); border-bottom-color: rgba(237,242,241,.1); }

/* Textos em verde-petróleo ficavam quase invisíveis no modo escuro */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) :is(.section-eyebrow, .section-link, .story-eyebrow, .agent-card-creci, .agent-role, .creci, .d-tag, .d-pill, .d-spec-ic, .f-clear, .legal a, .lhq-spec svg, .hours-note) { color: #7FC1BB !important; }
}
:root[data-theme="dark"] :is(.section-eyebrow, .section-link, .story-eyebrow, .agent-card-creci, .agent-role, .creci, .d-tag, .d-pill, .d-spec-ic, .f-clear, .legal a, .lhq-spec svg, .hours-note) { color: #7FC1BB !important; }
