.seo-tool-header { text-align: center; margin-bottom: 25px; }
.seo-tool-header h2 { color: #1a1a1a; font-size: 28px; margin: 0 0 10px 0; font-weight: 700; }
.seo-tool-header p { color: #666; font-size: 16px; margin: 0; }
.input-group { margin-bottom: 20px; }
.input-group label { display: block; margin-bottom: 8px; font-weight: 600; color: #333; font-size: 14px; }
.input-group input { width: 100%; padding: 12px; border: 2px solid #eee; border-radius: 6px; font-size: 16px; box-sizing: border-box; transition: border-color 0.3s ease; }
.input-group input:focus { border-color: #007cba; outline: none; }
.seo-btn { background-color: #007cba; color: white; border: none; padding: 15px 25px; font-size: 16px; font-weight: 600; border-radius: 6px; cursor: pointer; width: 100%; transition: background-color 0.3s ease; }
.seo-btn:hover { background-color: #0067a3; }
#seo-result-area { margin-top: 25px; padding: 20px; background-color: #f9f9f9; border-radius: 8px; display: none; border-left: 5px solid #007cba; }
.result-title { font-weight: 700; color: #1a1a1a; margin-bottom: 10px; font-size: 18px; }
.result-item { margin-bottom: 8px; font-size: 15px; color: #444; }
.result-highlight { color: #007cba; font-weight: bold; }
function calculateGrowth() {
var volume = document.getElementById('monthly-searches').value;
var position = document.getElementById('current-position').value;
var resultDiv = document.getElementById('seo-result-area');
var resultContent = document.getElementById('results-content');
if (!volume || !position) {
alert('Please enter valid numbers in both fields.');
return;
}
var volNum = parseFloat(volume);
var posNum = parseInt(position);
// Estimated CTRs based on Position
var currentCTR = 0;
if (posNum <= 1) currentCTR = 0.31;
else if (posNum <= 3) currentCTR = 0.15;
else if (posNum <= 5) currentCTR = 0.06;
else if (posNum <= 10) currentCTR = 0.02;
else currentCTR = 0.005;
var targetCTR = 0.31; // Position 1 target
var currentVisits = Math.round(volNum * currentCTR);
var potentialVisits = Math.round(volNum * targetCTR);
var netGain = potentialVisits – currentVisits;
var html = '
SEO Potential Calculator
Estimate your monthly traffic growth potential based on keyword rankings.
Projected Growth Metrics:
Current Estimated Monthly Visits: ' + currentVisits.toLocaleString() + '
';
html += 'Potential Monthly Visits (Position #1): ' + potentialVisits.toLocaleString() + '
';
html += 'Estimated Monthly Traffic Increase: +' + netGain.toLocaleString() + ' visits
';
html += '*Estimation based on industry standard CTR averages. Actual results may vary by industry and search intent.
'; resultContent.innerHTML = html; resultDiv.style.display = 'block'; }