/* ==========================================================
   Base
   ========================================================== */
:root {
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --bg: #ffffff;
  --radius: 50px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

a { color: var(--brand); }

.container {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ==========================================================
   Cabeçalho / marca
   ========================================================== */
.site-header {
  padding: 28px 0 8px;
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  font-size: 22px;
  font-weight: 700;
  color: var(--brand);
  text-decoration: none;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.34em;
}

.brand-mark {
  height: 0.72em;
  width: auto;
  display: block;
  overflow: visible;
}

.site-header .search-wrap {
  margin: 0;
  flex: 1;
  min-width: 260px;
}

/* Home: bloco centralizado */
.home-hero {
  flex: 1;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 0;
}

.home-hero .brand {
  font-size: 40px;
  margin-bottom: 8px;
  gap: 0.3em;
}

.home-hero p {
  color: var(--muted);
  margin: 0 0 24px;
}

/* ==========================================================
   Campo de pesquisa
   ========================================================== */
.search-wrap {
  width: 100%;
  max-width: 600px;
  margin: 20px auto;
}

.search-form {
  display: flex;
  align-items: center;
  width: 100%;
  background: #ffffff;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid var(--brand);
}

.search-input {
  flex: 1;
  min-width: 0;
  padding: 14px 18px;
  font-size: 16px;
  color: var(--text);
  background: transparent;
  border: none;
  outline: none;
  font-family: inherit;
}

.search-button {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  background: var(--brand);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.search-button:hover { background: var(--brand-dark); }

.search-button:focus-visible {
  outline: 3px solid var(--brand-dark);
  outline-offset: 2px;
}

.search-icon {
  width: 22px;
  height: 22px;
  stroke: #ffffff;
}

/* ==========================================================
   Página de resultados
   ========================================================== */
.results-head {
  margin: 24px 0 4px;
}

.results-head h1 {
  font-size: 18px;
  font-weight: 600;
  color: var(--muted);
  margin: 0;
}

.results-head h1 strong {
  color: var(--text);
}

.results-area {
  flex: 1;
  min-height: 45vh;
  padding-bottom: 48px;
}

.empty-state {
  padding: 48px 0;
  color: var(--muted);
  text-align: center;
}

.loader {
  padding: 40px 0;
  color: var(--muted);
  font-size: 14px;
}

/* ==========================================================
   Rodapé
   ========================================================== */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: #f9fafb;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  padding-top: 32px;
  padding-bottom: 24px;
}

.footer-col { flex: 1 1 220px; }

.footer-brand {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.footer-col strong {
  display: block;
  color: var(--text);
  margin-bottom: 6px;
}

.footer-col address {
  font-style: normal;
  margin: 0;
}

.footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--brand);
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  padding-bottom: 24px;
  font-size: 12px;
}

/* ==========================================================
   Páginas de conteúdo (política de privacidade, termos)
   ========================================================== */
.legal {
  padding: 8px 0 56px;
  max-width: 760px;
}

.legal h1 {
  font-size: 30px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 24px 0 8px;
}

.legal .updated {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 32px;
}

.legal h2 {
  font-size: 20px;
  margin: 40px 0 10px;
  padding-top: 8px;
  letter-spacing: -0.01em;
}

.legal h3 {
  font-size: 16px;
  margin: 24px 0 6px;
}

.legal p,
.legal li { color: #374151; }

.legal ul { padding-left: 20px; }

.legal li { margin-bottom: 8px; }

.legal .callout {
  background: #eff6ff;
  border-left: 4px solid var(--brand);
  border-radius: 0 10px 10px 0;
  padding: 14px 18px;
  margin: 24px 0;
}

.legal .callout p { margin: 0; }

.legal table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
}

.legal th,
.legal td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.legal th {
  background: #f9fafb;
  font-weight: 600;
}

.legal .toc {
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 16px 16px 34px;
  margin-bottom: 8px;
}

.legal .toc li { margin-bottom: 4px; }

.table-scroll { overflow-x: auto; }

/* ==========================================================
   Ajustes visuais do Google Programmable Search
   ========================================================== */
.gsc-control-cse {
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  font-family: inherit !important;
}

.gsc-control-cse * { font-family: inherit !important; }

.gsc-above-wrapper-area {
  border-bottom: 1px solid var(--border) !important;
  padding: 0 0 8px !important;
}

.gsc-result-info {
  padding: 0 !important;
  color: var(--muted) !important;
  font-size: 13px !important;
}

.gsc-orderby-container { display: none !important; }

.gsc-webResult.gsc-result {
  border: none !important;
  border-bottom: 1px solid var(--border) !important;
  padding: 18px 0 !important;
  background: transparent !important;
}

.gsc-webResult.gsc-result:hover {
  border-color: var(--border) !important;
  background: transparent !important;
}

.gsc-table-result,
.gsc-thumbnail-inside,
.gsc-url-top { padding: 0 !important; }

.gs-title,
.gs-title * {
  color: var(--brand) !important;
  font-size: 19px !important;
  line-height: 1.35 !important;
  text-decoration: none !important;
  height: auto !important;
}

a.gs-title:hover,
a.gs-title:hover * { text-decoration: underline !important; }

.gs-visibleUrl,
.gsc-url-top .gs-visibleUrl {
  color: #15803d !important;
  font-size: 13px !important;
}

.gs-snippet {
  color: #374151 !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
}

.gsc-cursor-box {
  border: none !important;
  padding: 24px 0 !important;
  text-align: center;
}

.gsc-cursor-page {
  display: inline-block;
  min-width: 34px;
  padding: 6px 10px !important;
  margin: 0 3px !important;
  border-radius: 8px;
  color: var(--brand) !important;
  text-decoration: none !important;
  background: #f3f4f6;
}

.gsc-cursor-page:hover { background: #e5e7eb; }

.gsc-cursor-current-page {
  background: var(--brand) !important;
  color: #ffffff !important;
}

.gsc-results .gsc-cursor-box .gsc-cursor-page { border: none !important; }

.gs-no-results-result .gs-snippet,
.gs-error-result .gs-snippet {
  background: #f9fafb !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px;
  padding: 16px !important;
  color: var(--muted) !important;
}

/* Imagem/thumbnail dos resultados */
.gs-web-image-box,
.gs-promotion-image-box {
  width: 96px !important;
  padding-right: 14px !important;
}

.gs-web-image-box img.gs-image {
  max-width: 92px !important;
  max-height: 92px !important;
  border-radius: 8px;
  border: 1px solid var(--border) !important;
}

@media (max-width: 480px) {
  .gs-web-image-box { display: none !important; }
  .gs-title, .gs-title * { font-size: 17px !important; }
  .home-hero .brand { font-size: 32px; }
}
