/* CodeClick — CSS v2 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ── Variáveis ───────────────────────────────────────────────────────────── */
:root {
  --blue:       #007BFF;
  --blue-dark:  #0056b3;
  --blue-light: #E6F2FF;
  --text:       #111827;
  --text-2:     #374151;
  --text-muted: #6B7280;
  --text-light: #9CA3AF;
  --bg:         #F0F4F8;
  --border:     #E5E7EB;
  --radius:     12px;
  --shadow:     0 2px 12px rgba(0,0,0,0.08);
}

/* ── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; overflow-y: scroll; scrollbar-gutter: stable; }
body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── Navbar ──────────────────────────────────────────────────────────────── */
.nav { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; height: 60px; display: flex; align-items: center; flex-direction: column; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 24px; width: 100%; display: flex; align-items: center; justify-content: space-between; height: 60px; }
.nav-logo { display: flex; align-items: center; gap: 8px; font-size: 1.2rem; font-weight: 700; color: var(--text); white-space: nowrap; }
.nav-logo .logo-icon { width: 36px; height: 36px; background: var(--blue); border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-link { padding: 8px 16px; font-size: 0.9rem; font-weight: 500; color: var(--text-muted); border-radius: 8px; transition: color 0.15s; }
.nav-link:hover, .nav-link.active { color: var(--blue); }

/* Hamburger (UX-01) */
.nav-hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; padding: 6px; cursor: pointer; border-radius: 8px; transition: background 0.15s; }
.nav-hamburger:hover { background: var(--bg); }
.nav-hamburger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.25s, opacity 0.25s; }
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Menu mobile drawer */
.nav-mobile { display: none; flex-direction: column; background: #fff; border-top: 1px solid var(--border); width: 100%; padding: 8px 16px 12px; }
.nav-mobile.open { display: flex; }
.nav-mobile-link { padding: 12px 8px; font-size: 0.95rem; font-weight: 500; color: var(--text-muted); border-bottom: 1px solid var(--border); transition: color 0.15s; }
.nav-mobile-link:last-child { border-bottom: none; }
.nav-mobile-link:hover, .nav-mobile-link.active { color: var(--blue); }

/* ── Eyebrow / section labels ────────────────────────────────────────────── */
.eyebrow { display: block; text-align: center; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--blue); margin-bottom: 12px; }
.section { padding: 72px 24px; }
.section-inner { max-width: 1100px; margin: 0 auto; }
.section-white { background: #fff; }
.section-gray  { background: var(--bg); }
.section-title { font-size: clamp(1.5rem,3.5vw,2rem); font-weight: 800; text-align: center; margin-bottom: 14px; color: var(--text); }
.section-sub   { font-size: 0.95rem; color: var(--text-muted); text-align: center; max-width: 500px; margin: 0 auto 52px; line-height: 1.7; }

/* ── Tool cards ──────────────────────────────────────────────────────────── */
.tools-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.tool-card { background: #fff; border: 1.5px solid var(--border); border-radius: var(--radius); padding: 28px 24px; text-decoration: none; color: inherit; transition: box-shadow 0.2s, transform 0.2s; display: flex; flex-direction: column; gap: 10px; }
.tool-card:hover { box-shadow: 0 8px 24px rgba(0,123,255,0.12); transform: translateY(-2px); }
.tool-card-icon { width: 54px; height: 54px; background: var(--blue); border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.tool-card-icon svg { width: 28px; height: 28px; }
.tool-card-cat   { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--blue); }
.tool-card-title { font-size: 1.05rem; font-weight: 800; color: var(--text); line-height: 1.3; }
.tool-card-desc  { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 0.875rem; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.form-control { width: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 0.9rem; color: var(--text); background: #fff; outline: none; transition: border-color 0.15s, box-shadow 0.15s; }
.form-control:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,123,255,0.1); }
.form-control::placeholder { color: var(--text-light); }
textarea.form-control { min-height: 90px; resize: vertical; }
select.form-control { cursor: pointer; }
.form-row  { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-hint { font-size: 0.75rem; color: var(--text-light); margin-top: 4px; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; border-radius: 8px; font-size: 0.9rem; font-weight: 600; border: none; cursor: pointer; font-family: inherit; transition: all 0.15s; text-decoration: none; white-space: nowrap; }
.btn-primary   { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-secondary { background: #fff; color: var(--text); border: 1.5px solid var(--border); }
.btn-secondary:hover { border-color: var(--blue); color: var(--blue); }
.btn-danger    { background: #EF4444; color: #fff; }
.btn-danger:hover { background: #DC2626; }
.btn-block { width: 100%; }
.btn-sm  { padding: 8px 16px; font-size: 0.8rem; }
.btn-lg  { padding: 14px 28px; font-size: 0.95rem; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ── Alerts ──────────────────────────────────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: 8px; font-size: 0.875rem; margin-bottom: 16px; }
.alert-error { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.alert-info  { background: var(--blue-light); color: #1E40AF; border: 1px solid #BFDBFE; }

/* ── Cards genéricos ─────────────────────────────────────────────────────── */
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }

/* ── Page header (ferramentas/consultas internas) ────────────────────────── */
.proposta-page-header { background: var(--bg); padding: 52px 24px 44px; text-align: center; border-bottom: 1px solid var(--border); }
.proposta-page-header .eyebrow { margin-bottom: 10px; }
.proposta-page-header h1 { font-size: clamp(1.8rem,4vw,2.6rem); font-weight: 800; margin-bottom: 10px; }
.proposta-page-header p  { font-size: 0.9rem; color: var(--text-muted); }

/* ── Proposta form ───────────────────────────────────────────────────────── */
.proposta-form-wrap { max-width: 780px; margin: 0 auto; padding: 32px 24px; }
.form-section { background: #fff; border: 1.5px solid var(--border); border-radius: var(--radius); padding: 24px 28px; margin-bottom: 20px; }
.form-section-title { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 20px; }

/* Items table */
.items-header { display: grid; grid-template-columns: 1fr 80px 130px 32px; gap: 8px; font-size: 0.78rem; font-weight: 600; color: var(--text-muted); padding: 0 0 8px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.item-row     { display: grid; grid-template-columns: 1fr 80px 130px 32px; gap: 8px; align-items: center; margin-bottom: 8px; }
.item-row input { width: 100%; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 0.88rem; font-family: inherit; color: var(--text); outline: none; transition: border-color 0.15s; }
.item-row input:focus { border-color: var(--blue); }
.item-row input::placeholder { color: var(--text-light); }
.remove-item-btn { background: none; border: none; cursor: pointer; color: #EF4444; padding: 4px; display: flex; align-items: center; justify-content: center; border-radius: 4px; transition: background 0.15s; }
.remove-item-btn:hover { background: #FEF2F2; }
.add-item-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 1.5px solid var(--border); color: var(--text-2); font-size: 0.85rem; font-weight: 600; padding: 8px 14px; border-radius: 8px; cursor: pointer; font-family: inherit; transition: border-color 0.15s, color 0.15s; margin-top: 4px; }
.add-item-btn:hover { border-color: var(--blue); color: var(--blue); }
.totais-wrap { border-top: 2px solid var(--border); margin-top: 16px; padding-top: 4px; }
.totais-row  { display: flex; align-items: center; justify-content: space-between; padding: 8px 4px; border-bottom: 1px solid var(--border); font-size: 0.9rem; gap: 12px; }
.totais-row:last-child { border-bottom: none; }
.totais-total { background: var(--bg); border-radius: 8px; padding: 10px 4px !important; font-size: 1rem !important; font-weight: 700 !important; color: var(--blue) !important; border-bottom: none !important; }

/* ── Result card ─────────────────────────────────────────────────────────── */
.result-wrap { max-width: 480px; margin: 0 auto; }
.result-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 36px 28px; text-align: center; }
.result-icon { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 16px; display: flex; align-items: center; justify-content: center; font-size: 1.7rem; background: #ECFDF5; }
.result-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }

/* ── Table (resultado CNPJ, etc.) ────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; }
thead th { padding: 10px 14px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; color: var(--text-muted); background: var(--bg); border-bottom: 1px solid var(--border); text-align: left; }
tbody td { padding: 12px 14px; font-size: 0.855rem; border-bottom: 1px solid var(--border); }
tbody tr:last-child td { border-bottom: none; }

/* ── Badges ──────────────────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 20px; font-size: 0.68rem; font-weight: 600; }

/* ── Misc utils ──────────────────────────────────────────────────────────── */
hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.mb-3 { margin-bottom: 24px; }
.hidden { display: none !important; }

/* ── Animações ───────────────────────────────────────────────────────────── */
@keyframes pageEnter { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeUp    { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
@keyframes spin      { to { transform: rotate(360deg); } }
.page-transition { animation: pageEnter 0.55s cubic-bezier(0.16,1,0.3,1) both; }
.fade-up { animation: fadeUp 0.3s ease; }
.btn-loading { position: relative; pointer-events: none; opacity: 0.75; }
.btn-loading::after { content: ''; display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff; border-radius: 50%; animation: spin 0.6s linear infinite; margin-left: 8px; vertical-align: middle; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer { background: #1A1A1A; color: #ccc; }
.site-footer-top { height: 3px; background: var(--blue); }
.site-footer-inner { max-width: 1080px; margin: 0 auto; padding: 44px 24px 32px; display: grid; grid-template-columns: 2fr 1fr 1.4fr; gap: 40px; }
.footer-col-title { font-size: 0.75rem; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.footer-logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; margin-bottom: 12px; }
.footer-logo-icon { width: 30px; height: 30px; background: var(--blue); border-radius: 7px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.footer-logo-icon span { color: #fff; font-size: 0.85rem; font-weight: 900; line-height: 1; }
.footer-logo-text { font-size: 1rem; font-weight: 800; letter-spacing: -0.3px; white-space: nowrap; }
.footer-logo-text span { color: #fff; }
.footer-logo-text em  { font-style: normal; color: var(--blue); }
.footer-slogan { font-size: 0.82rem; color: #999; line-height: 1.55; margin: 0 0 10px; max-width: 220px; }
.footer-copy   { font-size: 0.75rem; color: #555; }
.footer-links  { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: 0.82rem; color: #999; text-decoration: none; transition: color 0.15s; }
.footer-links a:hover { color: var(--blue); }
.footer-security { display: flex; align-items: flex-start; gap: 7px; margin-top: 14px; padding: 10px 12px; background: rgba(0,123,255,0.07); border: 1px solid rgba(0,123,255,0.15); border-radius: 7px; }
.footer-security svg  { flex-shrink: 0; margin-top: 1px; }
.footer-security span { font-size: 0.74rem; color: #888; line-height: 1.5; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .tools-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .proposta-form-wrap { padding: 20px 14px; }
  .items-header, .item-row { grid-template-columns: 1fr 70px 110px 32px; }
  .result-actions { flex-direction: column; }
  .site-footer-inner { grid-template-columns: 1fr 1fr; gap: 28px; }
}
@media (max-width: 480px) {
  .nav-inner { padding: 0 14px; }
  .nav-links  { display: none; }          /* oculta links desktop */
  .nav-hamburger { display: flex; }       /* exibe botão hamburger */
  .nav { height: auto; }
  .tools-grid { grid-template-columns: 1fr; }
  .site-footer-inner { grid-template-columns: 1fr; gap: 24px; padding: 36px 20px 28px; }
}

/* ── Banner publicidade ───────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .ad-banner-wrap {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .ad-banner-img {
    border-radius: 0 !important;
    max-width: 100% !important;
  }
}

/* ── Hero ferramentas e consultas ────────────────────────────────────────────── */
.tool-hero {
  background: linear-gradient(135deg, #005cbf 0%, #007BFF 60%, #3399ff 100%);
  padding: 52px 24px 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.tool-hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 280px; height: 280px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}
.tool-hero-inner {
  max-width: 680px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.tool-hero-cat {
  display: inline-block;
  background: rgba(255,255,255,0.18);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.tool-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
  line-height: 1.2;
  letter-spacing: -0.3px;
}
.tool-hero p {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.7;
  margin: 0;
}
