/* ==========================================================================
   Ferramentas Tech — estilo compartilhado
   Leve, sem frameworks, sem fontes externas (carrega instantâneo)
   ========================================================================== */

:root {
  --verde: #0f8a5f;
  --verde-escuro: #0b6547;
  --verde-claro: #e7f6ef;
  --texto: #1c2b26;
  --texto-suave: #5b6b64;
  --borda: #e2e8e4;
  --fundo: #f7faf8;
  --branco: #ffffff;
  --erro: #c0392b;
  --sombra: 0 1px 3px rgba(16, 40, 30, .08), 0 6px 20px rgba(16, 40, 30, .06);
  --raio: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--texto);
  background: var(--fundo);
  line-height: 1.6;
  font-size: 17px;
}

a { color: var(--verde); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 720px; margin: 0 auto; padding: 0 20px; }

/* ---------- Cabeçalho ---------- */
.topo {
  background: var(--branco);
  border-bottom: 1px solid var(--borda);
  position: sticky; top: 0; z-index: 10;
}
.topo .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 62px;
}
.logo { font-size: 1.3rem; font-weight: 800; color: var(--texto); letter-spacing: -.5px; }
.logo span { color: var(--verde); }
.topo nav a { color: var(--texto-suave); font-weight: 600; font-size: .95rem; margin-left: 18px; }

/* menu com dropdown (details nativo, sem JS) */
.topo nav.menu { display: flex; align-items: center; gap: 22px; }
.topo nav.menu > a { margin-left: 0; }
.drop { position: relative; }
.drop > summary {
  list-style: none; cursor: pointer; user-select: none;
  color: var(--texto-suave); font-weight: 600; font-size: .95rem;
  display: inline-flex; align-items: center; gap: 5px;
}
.drop > summary::-webkit-details-marker { display: none; }
.drop > summary::after { content: "▾"; font-size: .75em; transition: transform .15s; }
.drop[open] > summary::after { transform: rotate(180deg); }
.drop-menu {
  position: absolute; top: calc(100% + 12px); right: 0;
  background: var(--branco); border: 1px solid var(--borda); border-radius: 12px;
  box-shadow: var(--sombra); padding: 8px; min-width: 232px; z-index: 30;
  display: flex; flex-direction: column; gap: 2px;
}
.drop-menu a {
  padding: 11px 13px; border-radius: 9px; color: var(--texto);
  font-weight: 600; font-size: .95rem; white-space: nowrap;
}
.drop-menu a:hover { background: var(--verde-claro); text-decoration: none; }

/* seções de categoria (home) */
.cat-secao { margin-top: 38px; scroll-margin-top: 82px; }
.cat-secao > h2 { margin-bottom: 14px; }

/* ---------- Conteúdo ---------- */
main { padding: 34px 0 60px; }

h1 {
  font-size: 1.9rem; line-height: 1.25; letter-spacing: -.5px;
  margin-bottom: 10px;
}
h2 { font-size: 1.3rem; margin: 32px 0 12px; letter-spacing: -.3px; }
h3 { font-size: 1.05rem; margin: 20px 0 8px; }
p { margin-bottom: 14px; color: var(--texto-suave); }
.lead { font-size: 1.08rem; color: var(--texto-suave); margin-bottom: 26px; }

.breadcrumb { font-size: .9rem; color: var(--texto-suave); margin-bottom: 18px; }

/* ---------- Card / calculadora ---------- */
.card {
  background: var(--branco);
  border: 1px solid var(--borda);
  border-radius: var(--raio);
  box-shadow: var(--sombra);
  padding: 26px;
}

.campo { margin-bottom: 18px; }
.campo:last-child { margin-bottom: 0; }
label {
  display: block; font-weight: 600; font-size: .95rem;
  margin-bottom: 6px; color: var(--texto);
}
.dica { font-weight: 400; color: var(--texto-suave); font-size: .85rem; }

input[type=number], input[type=time], select {
  width: 100%;
  padding: 13px 14px;
  font-size: 1.05rem;
  border: 1.5px solid var(--borda);
  border-radius: 10px;
  background: var(--branco);
  color: var(--texto);
  transition: border-color .15s;
  -moz-appearance: textfield;
}
input:focus, select:focus { outline: none; border-color: var(--verde); }

textarea {
  width: 100%;
  padding: 13px 14px;
  font-size: 1.05rem;
  border: 1.5px solid var(--borda);
  border-radius: 10px;
  background: var(--branco);
  color: var(--texto);
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
  transition: border-color .15s;
}
textarea:focus { outline: none; border-color: var(--verde); }
textarea[readonly] { background: var(--fundo); }

.linha { display: flex; gap: 14px; flex-wrap: wrap; }
.linha .campo { flex: 1; min-width: 140px; }

.botao {
  width: 100%;
  padding: 15px;
  font-size: 1.08rem; font-weight: 700;
  color: #fff; background: var(--verde);
  border: none; border-radius: 10px;
  cursor: pointer; margin-top: 8px;
  transition: background .15s, transform .05s;
}
.botao:hover { background: #0c774f; }
.botao:active { transform: translateY(1px); }

.botao-copiar {
  margin-top: 16px; width: 100%; padding: 12px;
  background: var(--branco); color: var(--verde);
  border: 1.5px solid var(--verde); border-radius: 10px;
  font-weight: 700; font-size: .98rem; cursor: pointer;
  transition: background .12s;
}
.botao-copiar:hover { background: var(--verde-claro); }

/* ---------- Resultado ---------- */
.resultado { margin-top: 22px; display: none; }
.resultado.mostra { display: block; }

.destaque {
  background: var(--verde-claro);
  border: 1px solid #c5e8d7;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  margin-bottom: 16px;
}
.destaque .rotulo { font-size: .9rem; color: var(--texto-suave); font-weight: 600; }
.destaque .valor { font-size: 2.3rem; font-weight: 800; color: var(--verde); letter-spacing: -1px; }

.detalhes { border: 1px solid var(--borda); border-radius: 12px; overflow: hidden; }
.detalhes .item {
  display: flex; justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--borda);
  font-size: .98rem;
}
.detalhes .item:last-child { border-bottom: none; }
.detalhes .item .nome { color: var(--texto-suave); }
.detalhes .item .num { font-weight: 700; font-variant-numeric: tabular-nums; }
.detalhes .item.desconto .num { color: var(--erro); }
.detalhes .item.total { background: #fafcfb; font-weight: 700; }
.detalhes .item.total .nome { color: var(--texto); }

/* ---------- Lista de calculadoras (home) ---------- */
.grade { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 8px; }
.ferramenta {
  display: block;
  background: var(--branco);
  border: 1px solid var(--borda);
  border-radius: var(--raio);
  padding: 22px;
  box-shadow: var(--sombra);
  transition: transform .12s, box-shadow .12s;
}
.ferramenta:hover { transform: translateY(-2px); text-decoration: none; box-shadow: 0 6px 24px rgba(16,40,30,.12); }
.ferramenta .icone { font-size: 1.8rem; }
.ferramenta .nome { font-weight: 700; color: var(--texto); margin: 8px 0 4px; font-size: 1.1rem; }
.ferramenta .desc { color: var(--texto-suave); font-size: .92rem; }
.ferramenta.embreve { opacity: .6; pointer-events: none; }
.tag { display:inline-block; font-size:.72rem; font-weight:700; background:#eef1ef; color:var(--texto-suave); padding:2px 8px; border-radius:20px; margin-top:8px; }

/* ---------- Artigo de apoio (SEO) ---------- */
.artigo { margin-top: 40px; }
.artigo p, .artigo li { color: var(--texto-suave); }
.artigo ul, .artigo ol { margin: 0 0 14px 22px; }
.artigo li { margin-bottom: 6px; }
.post-meta { font-size:.88rem; color: var(--texto-suave); margin-bottom: 20px; }
.tabela-inss { width: 100%; border-collapse: collapse; margin: 12px 0 20px; font-size: .95rem; }
.tabela-inss th, .tabela-inss td { padding: 10px 12px; border: 1px solid var(--borda); text-align: left; }
.tabela-inss th { background: var(--verde-claro); }

.cta-ferramenta {
  position: relative; display: block;
  background: linear-gradient(135deg, var(--verde-claro), #dcf0e6);
  border: 1px solid #b6e2cd; border-left: 5px solid var(--verde);
  border-radius: 14px; padding: 20px 22px; margin: 28px 0;
  box-shadow: var(--sombra);
  transition: transform .12s, box-shadow .12s;
}
.cta-ferramenta:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 10px 26px rgba(15,138,95,.20); }
.cta-ferramenta strong { display: block; color: var(--verde-escuro); font-size: 1.12rem; line-height: 1.35; }
.cta-ferramenta span { display: block; color: var(--texto-suave); font-size: .92rem; margin-top: 4px; }
/* deixa todo o card clicável quando o link está aninhado (forma <div><a>) */
.cta-ferramenta > a { color: inherit; }
.cta-ferramenta > a::after { content: ""; position: absolute; inset: 0; }

.aviso {
  background: #fff8e6; border: 1px solid #ffe2a8;
  border-radius: 10px; padding: 12px 16px; font-size: .9rem;
  color: #8a6d1a; margin-top: 18px;
}

/* ---------- Lista de artigos (blog) ---------- */
.post-lista { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 10px; }
.post-item {
  --cat: var(--verde);
  position: relative;
  display: flex; flex-direction: column;
  background: var(--branco); border: 1px solid var(--borda);
  border-radius: var(--raio); padding: 22px 24px; box-shadow: var(--sombra);
  overflow: hidden;
  transition: transform .14s, box-shadow .14s, border-color .14s;
}
.post-item::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--cat);
}
.post-item:hover {
  transform: translateY(-3px); text-decoration: none;
  box-shadow: 0 10px 30px rgba(16,40,30,.14); border-color: var(--cat);
}
.post-item.cat-ferias { --cat: #2a7de1; }
.post-item.cat-horas { --cat: #e08a1e; }
.post-item.cat-trabalhista { --cat: #7c5cd6; }

.post-item .post-cat {
  display: inline-flex; align-items: center; align-self: flex-start;
  font-size: .7rem; font-weight: 800; letter-spacing: .6px; text-transform: uppercase;
  color: #fff; background: var(--cat);
  padding: 4px 10px; border-radius: 20px; margin-bottom: 12px;
}
.post-item .post-titulo {
  font-weight: 700; color: var(--texto); font-size: 1.14rem;
  line-height: 1.35; margin-bottom: 8px; letter-spacing: -.3px;
}
.post-item .post-desc { color: var(--texto-suave); font-size: .94rem; flex-grow: 1; }
.post-item .post-ler {
  margin-top: 14px; font-size: .9rem; font-weight: 700; color: var(--cat);
  opacity: .65; transition: opacity .14s, transform .14s;
}
.post-item:hover .post-ler { opacity: 1; transform: translateX(3px); }

.paginacao { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 30px; flex-wrap: wrap; }
.paginacao button {
  min-width: 42px; height: 42px; padding: 0 14px; border: 1.5px solid var(--borda);
  background: var(--branco); border-radius: 10px; cursor: pointer; font-size: .95rem; font-weight: 700;
  color: var(--texto); display: inline-flex; align-items: center; justify-content: center;
  transition: border-color .12s, color .12s;
}
.paginacao button:hover:not(:disabled):not(.ativo) { border-color: var(--verde); color: var(--verde); }
.paginacao button:disabled { opacity: .4; cursor: default; }
.paginacao button.ativo { background: var(--verde); color: #fff; border-color: var(--verde); cursor: default; }

/* ---------- FAQ (acordeão) ---------- */
.faq { margin-top: 40px; }
.faq > h2 { margin-bottom: 14px; }
.faq details {
  border: 1px solid var(--borda); border-radius: 12px; background: var(--branco);
  margin-bottom: 10px; padding: 0 18px; box-shadow: var(--sombra);
}
.faq summary {
  list-style: none; cursor: pointer; font-weight: 700; color: var(--texto);
  padding: 16px 0; display: flex; justify-content: space-between; align-items: center; gap: 14px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--verde); font-weight: 400; flex-shrink: 0; }
.faq details[open] summary::after { content: "\2212"; }
.faq details > p { color: var(--texto-suave); padding: 0 0 16px; margin: 0; }

/* ---------- Rodapé ---------- */
.rodape {
  border-top: 1px solid var(--borda);
  padding: 26px 0; text-align: center;
  color: var(--texto-suave); font-size: .9rem;
  background: var(--branco);
}
.rodape a { color: var(--texto-suave); margin: 0 8px; }

/* ---------- Responsivo ---------- */
/* imagens e mídia nunca estouram a largura */
img, video, iframe { max-width: 100%; height: auto; }

@media (max-width: 560px) {
  h1 { font-size: 1.55rem; }
  .grade { grid-template-columns: 1fr; }
  .post-lista { grid-template-columns: 1fr; }
  .destaque .valor { font-size: 1.9rem; }
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .card { padding: 20px 16px; }
  /* menu suspenso ocupa a largura da tela no celular, com rolagem própria
     para não estourar a viewport em telas baixas (14 categorias no menu) */
  .drop-menu { position: fixed; left: 10px; right: 10px; top: 58px; min-width: 0; max-height: calc(100vh - 74px); overflow-y: auto; }
  /* tabelas largas rolam na horizontal em vez de estourar a tela */
  .tabela-inss { display: block; overflow-x: auto; white-space: nowrap; font-size: .88rem; -webkit-overflow-scrolling: touch; }
  /* inputs com 16px evitam o zoom automático do iOS ao focar */
  input[type=number], input[type=time], input[type=date], select, textarea { font-size: 16px; }
  .linha { gap: 10px; }
  .detalhes .item { padding: 11px 13px; font-size: .93rem; }
}
