:root{
  --max:1120px;
  --heroMax:720px;
  --pagePad:20px;
  --line:#e5e7eb;
  --bg:#ffffff;
  --text:#0f172a;
  --muted:#64748b;
  --accent:#2563eb;
  --accent-weak:rgba(37,99,235,.14);
  --err:#dc2626;
  --shadow: 0 10px 24px rgba(2,6,23,.08);
  --radius:14px;
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--text);
  background: var(--bg);
}

/* Estrutura por seções (todas brancas) */
.section{background:#fff;}
.container{max-width:var(--max);margin:0 auto;padding:16px var(--pagePad);}

/* Reusable containers */
.containerWide{
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pagePad);
}

.containerNarrow{
  max-width: var(--heroMax);
  margin: 0 auto;
  padding: 0 var(--pagePad);
}

/* Header separado com linha inferior discreta */
.headerWrap{
  position: sticky;
  top: 0;
  z-index: 50;

  background: var(--bg);      /* importante para não ficar transparente */
  border-bottom: 1px solid var(--line);
}
header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:8px 0;
}
.brandRow{
  display:flex;
  align-items:center;
  gap:10px;
  min-width: 220px;
}
.brandName{
  font-weight:900;
  letter-spacing:.2px;
  font-size:16px;
}
.hint{color:var(--muted);font-size:13px;}

/* “Logo” inline (substitua pelo logo real quando quiser) */
.logo{width:30px;height:30px;display:block;border-radius:8px;}

/* tamanho padrão para o logo usado no header e footer */
.siteLogo{width:36px;height:auto;display:block;max-height:48px;background:#fff;padding:4px;border-radius:8px;object-fit:contain}

/* Brand name as image - same size as siteLogo */
.brandNameImg{width:80px;height:auto;display:block;object-fit:contain}

/* Hero: centralizado, sem borda */
.heroWrap{ border-bottom:none;}
body.has-results .heroWrap{
  border-bottom:1px solid var(--line);
}
.hero{
  max-width: var(--heroMax);
  margin: 0 auto;
  text-align:center;
  padding: 18px 0 14px;
}
h1{margin:0 0 8px;font-size:28px;line-height:1.15;}
h2{margin:0 0 22px;font-weight:600;font-size:14px;color:var(--muted);} /* espaçamento amigável */

.searchCol{
  display:flex;
  flex-direction:column;
  gap:10px;
  align-items:center;
}

/* Label invisível (acessibilidade), sem label visível */
.srOnly{
  position:absolute !important;
  width:1px;height:1px;
  padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);
  white-space:nowrap;border:0;
}

input{
  width:min(var(--heroMax), 100%);
  padding:12px 12px;
  border-radius: var(--radius);
  border:1px solid var(--line);
  background:#fff;
  color:var(--text);
  outline:none;
  box-shadow: var(--shadow);
}
input:focus{
  border-color: rgba(37,99,235,.55);
  box-shadow: 0 0 0 4px var(--accent-weak);
}

/* Botão buscar do mesmo tamanho do input */
button{
  width:min(var(--heroMax), 100%);
  padding:12px 16px;
  border-radius: var(--radius);
  border:1px solid rgba(37,99,235,.25);
  background: var(--accent);
  color:#fff;
  font-weight:900;
  cursor:pointer;
  box-shadow: var(--shadow);
}
button:focus{
  outline:none;
  box-shadow: 0 0 0 4px var(--accent-weak);
}
button:disabled{opacity:.55;cursor:not-allowed}

/* Contador: não mostrar em sessão nova */
.statusBar{
  margin-top:14px;
  display:flex;
  justify-content:center;
  align-items:center;
  min-height: 18px;
}
#contador{
  color:var(--muted);
  font-size:13px;
  display:none; /* só aparece após buscar */
}

/* Mensagem de localização: sutil, menor, sem borda, abaixo do botão */
#mensagemLocalizacao{
  margin:10px auto 0;
  max-width: var(--heroMax);
  display:none;
  color: var(--muted);
  font-size:12.5px;
  line-height:1.35;
}
.geoRow{
  display:flex;
  gap:8px;
  align-items:flex-start;
  justify-content:center;
}
.geoIcon{
  width:16px;height:16px;
  flex:0 0 auto;
  margin-top:1px;
  color: var(--muted);
}

/* Mensagem geral (carregando / empty / erro) — sutil e sem borda */
#mensagem{
  margin:10px auto 0;
  max-width: var(--heroMax);
  display:none;
  font-size:13px;
  line-height:1.35;
  text-align:center;
}
#mensagem.msg-info{
  color: var(--muted);
}

/* Dica / estado vazio (ex: sem resultados) */
#mensagem.msg-hint{
  color: var(--muted); /* slate-700: mais suave que texto principal */
}

#mensagem.msg-warn{
  color: #b45309; /* âmbar discreto */
}

/* Erro real */
#mensagem.msg-err{
  color: var(--err);
}

/* Resultados */
.resultsWrap{border-bottom:1px solid var(--line);}
#resultados.cards{
  padding: 16px 0 18px;
  display:grid;
  gap:12px;
}

/* Grid adaptativo + classes por quantidade (desktop) */
#resultados.grid{
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items:stretch;
}
#resultados.cols-1{grid-template-columns: minmax(280px, 520px); justify-content:center;}
#resultados.cols-2{grid-template-columns: repeat(2, minmax(220px, 1fr));}
#resultados.cols-3{grid-template-columns: repeat(3, minmax(220px, 1fr));}
#resultados.cols-4{grid-template-columns: repeat(4, minmax(210px, 1fr));}
#resultados.cols-5{grid-template-columns: repeat(5, minmax(200px, 1fr));}

/* Cards */
.card{
  border:1px solid var(--line);
  border-radius: var(--radius);
  background:#fff;
  padding:12px;
  box-shadow: var(--shadow);
  min-height: 120px;
}
.cardTop{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
.title{
  font-size:14.5px;
  font-weight:950;
  margin:0;
  line-height:1.2;
}
.meta{
  margin-top:4px;
  color:var(--muted);
  font-size:12.5px;
  line-height:1.35;
}
.distance{
  font-size:12px;
  padding:6px 10px;
  border-radius: 999px;
  border:1px solid var(--line);
  color:var(--muted);
  background:#fff;
  white-space:nowrap;
}

/* Botões pequenos e agradáveis com ícones */
.actions{
  margin-top:10px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
a.btn{
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 9px;
  border-radius: 12px;
  border:1px solid var(--line);
  background:#fff;
  color:#0b1b4a;
  font-weight:900;
  font-size:12.5px;
  line-height:1;
}
a.btn:hover{background: rgba(37,99,235,.06);}
a.btn:focus{
  outline:none;
  box-shadow: 0 0 0 4px var(--accent-weak);
}
.btnIcon{width:16px;height:16px;flex:0 0 auto;}



/* New site footer styles (MVP product vibe) */
.siteFooter{border-top:1px solid var(--line);background:var(--bg);color:#555;padding:28px 0;font-size:13px;line-height:20px}
/* limit footer width to match hero */
.siteFooter .container{max-width:none;margin:0;padding:0 20px}
.footerSimple{display:flex;flex-direction:column;gap:12px;align-items:flex-start}
.footerRow{display:flex;justify-content:space-between;align-items:center;width:100%;gap:20px;flex-wrap:wrap}
.footerMain{display:flex;gap:12px;align-items:center}
.footerMain .siteLogo{width:28px;height:auto;display:block;background:transparent;padding:0;border-radius:0;vertical-align:middle}
.brandName{font-weight:600;font-size:14px;color:#222}
.footerTag{font-size:13px;color:var(--muted);margin-top:2px;line-height:18px}
/* contact secondary, less prominent */
.footerContact{margin-left:0}
.footerEmail{color:var(--muted);text-decoration:none;font-weight:500;font-size:13px}
.footerEmail:hover,.footerEmail:focus{text-decoration:underline;color:var(--text)}
/* copyright spacing and tone */
.footerBottom{margin-top:18px;padding-top:0;text-align:left;font-size:12px;color:var(--muted);line-height:18px;opacity:.85}
/* Avoid global !important rule: control box-shadow explicitly when needed */
.siteFooter, .siteFooter * { box-shadow: none; }

/* Mobile: reduce padding */
@media (max-width:740px){
  :root{
    --pagePad: 16px;
  }
}

/* Footer responsive rules */
@media (max-width:740px){
  .siteFooter{padding:20px 0}
  .footerRow{flex-direction:column;align-items:flex-start;gap:8px}
  .footerMain{flex-direction:row;align-items:center}
  .footerText{align-items:flex-start}
}

/* General responsive rules */
@media (max-width:740px){
  h1{font-size:24px}
  #resultados.grid{grid-template-columns: 1fr !important;}
  #resultados.cols-1,#resultados.cols-2,#resultados.cols-3,#resultados.cols-4,#resultados.cols-5{grid-template-columns:1fr !important;}
  header{flex-direction:column;align-items:flex-start}
  .hint{align-self:flex-start}
}
