/* ============================================================
   Ferramentas de SEO Gratuitas — São Paulo SEO
   Base (header/nav/footer) + componentes das ferramentas
   Paleta: Coral #E85A4F / Terracota #8E4A3B / Areia #F5E6D3
   ============================================================ */

:root {
    --primary: #E85A4F;
    --primary-dark: #D14940;
    --secondary: #F5E6D3;
    --accent: #8E4A3B;
    --dark: #2D1810;
    --light-bg: #FBF8F5;
    --white: #FFFFFF;
    --text-gray: #4A4A4A;
    --success: #4CAF50;
    --shadow: 0 4px 20px rgba(232, 90, 79, 0.15);
    --shadow-hover: 0 8px 30px rgba(232, 90, 79, 0.25);
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--light-bg);
    color: var(--dark);
    line-height: 1.6;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- Header / nav (desktop) ---------- */
.header { position: fixed; top: 0; left: 0; right: 0; background: var(--white); box-shadow: 0 2px 20px rgba(0,0,0,0.08); z-index: 1000; transition: var(--transition); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 15px 20px; max-width: 1200px; margin: 0 auto; }
.logo { display: flex; align-items: center; text-decoration: none; gap: 10px; }
.logo svg { height: 40px; width: auto; }
.logo-text { font-size: 1.4rem; font-weight: 700; color: var(--dark); }
.logo-text span { color: var(--primary); }
.nav { display: flex; align-items: center; gap: 30px; }
.nav-links { display: flex; list-style: none; gap: 25px; align-items: center; }
.nav-links a { text-decoration: none; color: var(--dark); font-weight: 500; font-size: 0.95rem; transition: var(--transition); position: relative; padding: 5px 0; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.nav-links a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--primary); transition: var(--transition); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.dropdown { position: relative; }
.dropdown-toggle { display: flex; align-items: center; gap: 5px; cursor: pointer; }
.dropdown-toggle svg { width: 12px; height: 12px; transition: var(--transition); }
.dropdown:hover .dropdown-toggle svg { transform: rotate(180deg); }
.dropdown-menu { position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(10px); background: var(--white); border-radius: 12px; box-shadow: var(--shadow-hover); padding: 15px 0; min-width: 240px; opacity: 0; visibility: hidden; transition: var(--transition); z-index: 100; }
.dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.dropdown-menu a { display: block; padding: 10px 20px; color: var(--dark); text-decoration: none; font-size: 0.9rem; transition: var(--transition); }
.dropdown-menu a:hover { background: var(--secondary); color: var(--primary); }
.dropdown-menu a::after { display: none; }

/* ---------- Buttons ---------- */
.tbtn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 22px; border-radius: 12px; font-weight: 600; font-size: 0.95rem; font-family: inherit; cursor: pointer; border: none; text-decoration: none; transition: var(--transition); white-space: nowrap; }
.tbtn svg { width: 18px; height: 18px; }
.tbtn-primary { background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%); color: var(--white); }
.tbtn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(232,90,79,0.3); }
.tbtn-ghost { background: var(--white); color: var(--primary); border: 2px solid rgba(232,90,79,0.25); }
.tbtn-ghost:hover { background: rgba(232,90,79,0.06); }
.tbtn-light { background: rgba(255,255,255,0.16); color: #fff; border: 1px solid rgba(255,255,255,0.3); }
.tbtn-light:hover { background: rgba(255,255,255,0.26); }

/* ---------- Tool hero ---------- */
.tool-hero { padding: 130px 20px 50px; background: linear-gradient(135deg, var(--light-bg) 0%, var(--secondary) 100%); }
.tool-hero .breadcrumbs { max-width: 1160px; margin: 0 auto 18px; font-size: 0.85rem; color: var(--text-gray); }
.tool-hero .breadcrumbs a { color: var(--primary); text-decoration: none; }
.tool-hero .breadcrumbs a:hover { text-decoration: underline; }
.tool-hero .breadcrumbs span { margin: 0 6px; color: #b7a998; }
.tool-hero-inner { max-width: 1160px; margin: 0 auto; }
.tool-eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; background: rgba(232,90,79,0.1); color: var(--primary); border-radius: 30px; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 14px; }
.tool-hero h1 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); font-weight: 800; color: var(--dark); line-height: 1.15; margin-bottom: 14px; max-width: 820px; }
.tool-hero h1 span { color: var(--primary); }
.tool-hero .lead { font-size: 1.12rem; color: var(--text-gray); max-width: 700px; line-height: 1.7; }

/* ---------- Tool layout ---------- */
.tool-wrap { padding: 50px 20px; }
.tool-layout { max-width: 1160px; margin: 0 auto; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 30px; align-items: start; }
.tool-panel { background: var(--white); border-radius: 20px; padding: 30px; box-shadow: var(--shadow); }
.tool-panel h2 { font-size: 1.2rem; font-weight: 800; color: var(--dark); margin-bottom: 22px; }
.tool-panel h2 .sub { display: block; font-size: 0.85rem; font-weight: 500; color: var(--text-gray); margin-top: 5px; }

/* Fields */
.tool-field { margin-bottom: 22px; }
.tool-field:last-child { margin-bottom: 0; }
.tool-field label { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; font-size: 0.92rem; color: var(--dark); margin-bottom: 9px; }
.tool-field label .val { color: var(--primary); font-weight: 800; font-variant-numeric: tabular-nums; }
.tool-field .hint { font-size: 0.78rem; color: #a99f92; font-weight: 500; }
.tool-input, .tool-select, .tool-textarea { width: 100%; padding: 13px 16px; border: 2px solid var(--secondary); border-radius: 12px; font-size: 0.98rem; font-family: inherit; color: var(--dark); background: var(--light-bg); transition: var(--transition); }
.tool-input:focus, .tool-select:focus, .tool-textarea:focus { outline: none; border-color: var(--primary); background: var(--white); }
.tool-textarea { min-height: 120px; resize: vertical; line-height: 1.6; }

/* Range */
input[type="range"].tool-range { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 30px; background: var(--secondary); outline: none; margin: 4px 0; }
input[type="range"].tool-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--primary); cursor: pointer; border: 3px solid #fff; box-shadow: 0 2px 6px rgba(232,90,79,0.45); transition: transform 0.1s ease; }
input[type="range"].tool-range::-webkit-slider-thumb:hover { transform: scale(1.12); }
input[type="range"].tool-range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--primary); cursor: pointer; border: 3px solid #fff; box-shadow: 0 2px 6px rgba(232,90,79,0.45); }
.range-scale { display: flex; justify-content: space-between; font-size: 0.72rem; color: #a99f92; margin-top: 2px; }

/* Checks */
.tool-check { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; cursor: pointer; }
.tool-check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.tool-check span { font-size: 0.92rem; color: var(--dark); line-height: 1.45; }
.tool-check span small { display: block; color: #a99f92; font-size: 0.78rem; }

/* Result panel */
.tool-result { background: linear-gradient(160deg, #3a1f14 0%, #8E4A3B 55%, #E85A4F 130%); color: #fff; border-radius: 20px; padding: 30px; box-shadow: 0 14px 40px rgba(142,74,59,0.35); position: sticky; top: 90px; }
.tool-result h2 { color: #fff; font-size: 1.2rem; font-weight: 800; margin-bottom: 6px; }
.tool-result .muted { color: rgba(255,255,255,0.8); }
.big-metric { margin: 16px 0 20px; }
.big-metric .label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.72); font-weight: 700; }
.big-metric .value { font-size: clamp(2.2rem, 5vw, 3rem); font-weight: 900; line-height: 1.05; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: #FFE8D6; }
.metric-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.metric-mini { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.16); border-radius: 14px; padding: 14px 16px; }
.metric-mini .mlabel { font-size: 0.7rem; color: rgba(255,255,255,0.72); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
.metric-mini .mval { font-size: 1.45rem; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 3px; }

/* Output box */
.output-box { position: relative; background: #2D1810; color: #f0e6dc; border-radius: 14px; padding: 18px; font-family: 'SF Mono','Fira Code',Consolas,monospace; font-size: 0.82rem; line-height: 1.65; white-space: pre-wrap; word-break: break-word; max-height: 340px; overflow: auto; border: 1px solid #4a2c1c; }
.output-box .tok-tag { color: #ff9d8f; } .output-box .tok-attr { color: #ffd27f; } .output-box .tok-str { color: #b8e0a0; }
.output-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.copied-flash { position: absolute; top: 10px; right: 10px; background: var(--success); color: #fff; font-size: 0.72rem; font-weight: 700; padding: 4px 10px; border-radius: 30px; opacity: 0; transform: translateY(-4px); transition: opacity 0.2s ease, transform 0.2s ease; pointer-events: none; font-family: 'Inter', sans-serif; }
.copied-flash.show { opacity: 1; transform: translateY(0); }

/* SERP preview */
.serp-preview { background: #fff; border: 1px solid var(--secondary); border-radius: 14px; padding: 18px 20px; font-family: arial, sans-serif; }
.serp-preview .serp-url { color: #202124; font-size: 0.82rem; display: flex; align-items: center; gap: 6px; }
.serp-preview .serp-url .fav { width: 16px; height: 16px; border-radius: 50%; background: var(--secondary); display: inline-block; flex-shrink: 0; }
.serp-preview .serp-url .path { color: #5f6368; }
.serp-preview .serp-title { color: #1a0dab; font-size: 1.2rem; line-height: 1.3; margin: 4px 0; font-weight: 400; }
.serp-preview .serp-desc { color: #4d5156; font-size: 0.875rem; line-height: 1.58; }

.counter { font-variant-numeric: tabular-nums; font-weight: 700; }
.counter.ok { color: var(--success); } .counter.warn { color: #d97706; } .counter.over { color: #dc2626; }

/* Keyword density */
.kd-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 22px; }
.kd-stat { background: var(--light-bg); border: 1px solid var(--secondary); border-radius: 14px; padding: 14px 16px; text-align: center; }
.kd-stat .n { font-size: 1.6rem; font-weight: 800; color: var(--primary); line-height: 1; font-variant-numeric: tabular-nums; }
.kd-stat .l { font-size: 0.72rem; color: var(--text-gray); margin-top: 5px; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.kd-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.kd-tab { padding: 8px 16px; border-radius: 30px; border: 2px solid var(--secondary); background: #fff; color: var(--text-gray); font-weight: 700; font-size: 0.82rem; cursor: pointer; }
.kd-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.kd-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid #f3ece3; }
.kd-row .kw { font-weight: 600; color: var(--dark); font-size: 0.9rem; }
.kd-row .bar-wrap { display: flex; align-items: center; gap: 10px; }
.kd-bar { height: 8px; border-radius: 30px; background: linear-gradient(90deg, var(--primary), #f4a08f); min-width: 4px; }
.kd-row .cnt { font-size: 0.82rem; color: var(--text-gray); font-variant-numeric: tabular-nums; min-width: 80px; text-align: right; }

.tool-empty { text-align: center; color: #a99f92; padding: 40px 16px; }
.tool-empty svg { width: 44px; height: 44px; margin-bottom: 12px; color: #d8ccbf; }
.tool-note { font-size: 0.8rem; color: #a99f92; margin-top: 16px; line-height: 1.5; }

/* CTA band with lead form */
.tool-cta { max-width: 1160px; margin: 0 auto; background: linear-gradient(135deg, var(--accent) 0%, var(--dark) 100%); color: #fff; border-radius: 24px; padding: 40px; display: grid; grid-template-columns: 1.35fr 1fr; gap: 36px; align-items: center; }
.tool-cta h2 { color: #fff; font-size: 1.7rem; font-weight: 800; margin-bottom: 10px; }
.tool-cta p { color: rgba(255,255,255,0.85); line-height: 1.6; }
.tool-cta-form { display: flex; flex-direction: column; gap: 12px; }
.tool-cta-form input { width: 100%; padding: 14px 16px; border-radius: 12px; border: none; font-family: inherit; font-size: 0.98rem; }
.tool-cta-form .msg { font-size: 0.88rem; min-height: 1.1rem; }
.tool-cta-form .msg.ok { color: #b6f0b8; } .tool-cta-form .msg.err { color: #ffcdc7; }

/* Educational text */
.tool-article { max-width: 820px; margin: 0 auto; padding: 0 20px 20px; }
.tool-article h2 { font-size: 1.6rem; font-weight: 800; color: var(--dark); margin-bottom: 16px; }
.tool-article p { color: var(--text-gray); line-height: 1.85; font-size: 1.05rem; margin-bottom: 16px; }
.tool-article a { color: var(--primary); font-weight: 600; text-decoration: none; }
.tool-article a:hover { text-decoration: underline; }

/* Related / hub cards */
.related { max-width: 1160px; margin: 0 auto; padding: 10px 20px 40px; }
.related h2 { font-size: 1.4rem; font-weight: 800; color: var(--dark); margin-bottom: 22px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.tool-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--secondary); border-radius: 18px; padding: 26px; text-decoration: none; transition: var(--transition); }
.tool-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: rgba(232,90,79,0.4); }
.tool-ico { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: #fff; margin-bottom: 16px; }
.tool-card h3 { font-size: 1.15rem; font-weight: 800; color: var(--dark); margin-bottom: 8px; }
.tool-card p { font-size: 0.92rem; color: var(--text-gray); line-height: 1.6; margin-bottom: 14px; flex-grow: 1; }
.tool-card .go { font-weight: 700; color: var(--primary); font-size: 0.9rem; display: inline-flex; align-items: center; gap: 6px; }
.tool-card:hover .go { gap: 10px; }
.ico-coral { background: linear-gradient(135deg, #E85A4F, #8E4A3B); }
.ico-terra { background: linear-gradient(135deg, #b5654a, #8E4A3B); }
.ico-amber { background: linear-gradient(135deg, #f0a868, #d97706); }
.ico-green { background: linear-gradient(135deg, #5cb85c, #2e7d32); }

/* ---------- Footer ---------- */
.footer { background: var(--dark); padding: 60px 20px 30px; margin-top: 60px; }
.footer-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; }
.footer-column h4 { color: var(--white); font-size: 1.1rem; margin-bottom: 20px; }
.footer-column p { color: rgba(255,255,255,0.7); font-size: 0.95rem; line-height: 1.7; }
.footer-column ul { list-style: none; }
.footer-column ul li { margin-bottom: 10px; }
.footer-column ul a { color: rgba(255,255,255,0.7); text-decoration: none; font-size: 0.95rem; transition: var(--transition); }
.footer-column ul a:hover { color: var(--primary); }
.footer-bottom { max-width: 1200px; margin: 40px auto 0; padding-top: 30px; border-top: 1px solid rgba(255,255,255,0.1); text-align: center; }
.footer-bottom p { color: rgba(255,255,255,0.5); font-size: 0.9rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) { .tool-layout { grid-template-columns: 1fr; } .tool-result { position: static; } .tool-cta { grid-template-columns: 1fr; } }
@media (max-width: 768px) { .nav-links.nav-desktop, .nav .nav-links { display: none; } .tool-hero h1 { font-size: 1.9rem; } .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .tool-panel, .tool-result { padding: 22px; } .metric-row { grid-template-columns: 1fr; } .kd-stats { grid-template-columns: 1fr; } .tool-cta { padding: 26px; } .footer-grid { grid-template-columns: 1fr; } }

/* ============================================================
   Páginas de nicho (SEO por segmento)
   ============================================================ */
.niche-stats { max-width: 1160px; margin: 0 auto; padding: 0 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: -30px; position: relative; z-index: 2; }
.niche-stat { background: #fff; border-radius: 18px; padding: 24px; box-shadow: var(--shadow); text-align: center; }
.niche-stat .n { font-size: 2.1rem; font-weight: 900; color: var(--primary); line-height: 1; letter-spacing: -0.02em; }
.niche-stat .l { font-size: 0.9rem; color: var(--text-gray); margin-top: 8px; line-height: 1.45; }

.niche-section { max-width: 1160px; margin: 0 auto; padding: 50px 20px; }
.niche-section h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); font-weight: 800; color: var(--dark); margin-bottom: 12px; }
.niche-section .section-intro { color: var(--text-gray); font-size: 1.05rem; line-height: 1.7; max-width: 720px; margin-bottom: 30px; }

.niche-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.niche-item { background: #fff; border: 1px solid var(--secondary); border-radius: 18px; padding: 26px; transition: var(--transition); }
.niche-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.niche-item .ni-ico { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; margin-bottom: 14px; }
.niche-item .ni-ico svg { width: 22px; height: 22px; }
.niche-item h3 { font-size: 1.08rem; font-weight: 800; color: var(--dark); margin-bottom: 7px; }
.niche-item p { font-size: 0.92rem; color: var(--text-gray); line-height: 1.6; }

.niche-pains { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.niche-pains li { display: flex; align-items: flex-start; gap: 10px; color: var(--text-gray); font-size: 0.98rem; line-height: 1.55; }
.niche-pains li svg { width: 20px; height: 20px; color: var(--primary); flex-shrink: 0; margin-top: 2px; }

.niche-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.niche-step { background: #fff; border: 1px solid var(--secondary); border-radius: 16px; padding: 22px; }
.niche-step .num { width: 38px; height: 38px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; margin-bottom: 12px; }
.niche-step h3 { font-size: 1rem; font-weight: 700; color: var(--dark); margin-bottom: 5px; }
.niche-step p { font-size: 0.88rem; color: var(--text-gray); line-height: 1.55; }

.niche-band { background: linear-gradient(135deg, var(--secondary) 0%, var(--light-bg) 100%); }
.niche-faq { max-width: 820px; margin: 0 auto; }
.niche-faq-item { background: #fff; border: 1px solid var(--secondary); border-radius: 14px; padding: 20px 24px; margin-bottom: 14px; }
.niche-faq-item h3 { font-size: 1.05rem; font-weight: 700; color: var(--dark); margin-bottom: 8px; }
.niche-faq-item p { color: var(--text-gray); line-height: 1.7; font-size: 0.97rem; }

@media (max-width: 900px) {
    .niche-stats { grid-template-columns: 1fr; margin-top: 0; }
    .niche-steps { grid-template-columns: repeat(2, 1fr); }
    .niche-pains { grid-template-columns: 1fr; }
}
@media (max-width: 480px) { .niche-steps { grid-template-columns: 1fr; } }
