/* ============================
   CSS Global — ResolvaRápido
   ============================ */

:root {
  --primary:       #2563eb;
  --primary-dark:  #1e40af;
  --accent:        #f59e0b;
  --bg:            #ffffff;
  --bg-secondary:  #f8fafc;
  --border:        #e5e7eb;
  --text:          #111827;
  --text-secondary:#6b7280;
  --radius:        8px;
  --radius-card:   12px;
  --max-width:     900px;
}

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

body {
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

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

/* Typography */
h1 { font-size: 28px; font-weight: 700; line-height: 1.3; }
h2 { font-size: 22px; font-weight: 600; line-height: 1.4; }
h3 { font-size: 18px; font-weight: 600; }
p  { margin-bottom: 16px; }
p:last-child { margin-bottom: 0; }

/* Wrapper */
.wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================
   Header
   ============================ */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
}

.logo-tagline {
  font-size: 12px;
  color: var(--text-secondary);
}

.header-nav {
  display: flex;
  gap: 24px;
  list-style: none;
}

.header-nav a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.header-nav a:hover { color: var(--primary); }

/* ============================
   Anúncios
   ============================ */
.ad-container {
  margin: 28px 0;
  padding: 12px;
  background: var(--bg-secondary);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  text-align: center;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================
   Main / Página
   ============================ */
main { padding: 32px 0; }

.page-header { margin-bottom: 28px; }

.page-header h1 { margin-bottom: 8px; }

.page-description {
  color: var(--text-secondary);
  font-size: 16px;
}

/* ============================
   Card da Ferramenta
   ============================ */
.tool-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 24px;
  margin-bottom: 32px;
}

/* ============================
   Formulário
   ============================ */
.form-group { margin-bottom: 16px; }

label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--text);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
  display: block;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
  -webkit-appearance: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

textarea {
  resize: vertical;
  min-height: 160px;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

/* ============================
   Botões
   ============================ */
.btn-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover  { background: var(--primary-dark); color: white; }
.btn-primary:active { transform: translateY(1px); }

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover { background: var(--border); color: var(--text); }

/* ============================
   Resultado
   ============================ */
.result-box {
  display: none;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 20px;
}

.result-box.visible { display: block; }

.result-label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.result-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
}

.result-copy-btn {
  margin-top: 12px;
}

/* Stats em grade */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.stat-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 30px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.stat-label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Tabela de resultado */
.result-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 15px;
}

.result-table th,
.result-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.result-table th {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  background: var(--bg-secondary);
}

.result-table td:last-child {
  font-weight: 600;
  color: var(--primary);
  text-align: right;
}

.result-table tr:last-child td {
  border-bottom: none;
  font-size: 18px;
}

/* Alerta de aviso */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-top: 12px;
}

.alert-info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

.alert-warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

/* ============================
   Conteúdo SEO
   ============================ */
.seo-content {
  border-top: 1px solid var(--border);
  padding-top: 32px;
  margin-top: 8px;
}

.seo-content h2 { margin-bottom: 16px; margin-top: 32px; }
.seo-content h2:first-child { margin-top: 0; }
.seo-content p { color: var(--text-secondary); }

/* FAQ */
.faq-list { list-style: none; margin-top: 8px; }

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 16px;
  background: var(--bg);
  border: none;
  text-align: left;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  transition: background 0.15s;
}

.faq-question:hover { background: var(--bg-secondary); }

.faq-chevron {
  font-size: 14px;
  color: var(--text-secondary);
  flex-shrink: 0;
  margin-left: 12px;
  transition: transform 0.2s;
}

.faq-answer {
  padding: 0 16px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, padding 0.25s ease;
  color: var(--text-secondary);
  font-size: 15px;
}

.faq-answer.open {
  max-height: 400px;
  padding: 0 16px 16px;
}

/* ============================
   Ferramentas relacionadas
   ============================ */
.related-tools {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.related-tools h2 { margin-bottom: 16px; }

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}

.tool-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.tool-link:hover {
  border-color: var(--primary);
  background: #eff6ff;
  color: var(--primary);
}

.tool-icon { font-size: 20px; flex-shrink: 0; }

.tool-name { font-size: 14px; font-weight: 600; }

/* ============================
   Home — Hero e Categorias
   ============================ */
.hero {
  text-align: center;
  padding: 48px 0 32px;
}

.hero h1 { font-size: 36px; margin-bottom: 12px; }

.hero p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 24px;
}

.hero-search {
  display: flex;
  max-width: 480px;
  margin: 0 auto;
  gap: 0;
}

.hero-search input {
  border-radius: var(--radius) 0 0 var(--radius);
  border-right: none;
}

.hero-search .btn {
  border-radius: 0 var(--radius) var(--radius) 0;
  white-space: nowrap;
}

.category-section { margin-bottom: 40px; }

.category-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
  color: var(--text);
}

.category-icon { font-size: 22px; }

/* ============================
   Footer
   ============================ */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 32px 0 0;
  margin-top: 48px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
}

.footer-brand .logo-name { font-size: 18px; color: var(--primary); font-weight: 700; }
.footer-brand p { color: var(--text-secondary); font-size: 14px; margin-top: 8px; }

.footer-col h4 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul a { text-decoration: none; color: var(--text-secondary); font-size: 14px; transition: color 0.15s; }
.footer-col ul a:hover { color: var(--primary); }

.footer-bottom {
  text-align: center;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
}

/* ============================
   Utilitários
   ============================ */
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-16 { margin-bottom: 16px; }
.mb-32 { margin-bottom: 32px; }
.text-secondary { color: var(--text-secondary); }
.text-center { text-align: center; }
.hidden { display: none !important; }

/* ============================
   Responsivo
   ============================ */
@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .header-nav { display: none; }

  .hero h1 { font-size: 28px; }
  .hero p  { font-size: 16px; }

  .hero-search { flex-direction: column; }
  .hero-search input { border-radius: var(--radius); border-right: 1px solid var(--border); }
  .hero-search .btn { border-radius: var(--radius); width: 100%; }
}

@media (max-width: 600px) {
  h1 { font-size: 24px; }
  h2 { font-size: 20px; }

  .tool-card { padding: 16px; }

  .form-row { grid-template-columns: 1fr; }

  .btn { width: 100%; }
  .btn-group { flex-direction: column; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  .tools-grid { grid-template-columns: 1fr 1fr; }

  .result-value { font-size: 22px; }
}
