/*
Theme Name: AI GEO Toolkit
Theme URI: https://aigeotoolkit.com
Author: AI GEO Toolkit
Description: Professional SaaS theme for AI GEO Toolkit - Track AI Search Visibility
Version: 1.0.0
License: GNU General Public License v2 or later
Tags: saas, seo, ai, business, modern
*/

/* =============================================
   RESET & BASE
============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --brand: #4F46E5;
  --brand-dark: #3730A3;
  --brand-light: #818CF8;
  --brand-bg: #EEF2FF;
  --brand-border: #C7D2FE;
  --text-primary: #111827;
  --text-secondary: #6B7280;
  --text-muted: #9CA3AF;
  --bg-primary: #ffffff;
  --bg-secondary: #F9FAFB;
  --bg-tertiary: #F3F4F6;
  --border: #E5E7EB;
  --border-dark: #D1D5DB;
  --green: #10B981;
  --amber: #F59E0B;
  --red: #EF4444;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.10);
}
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-primary);
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }
ul { list-style: none; }

/* =============================================
   TYPOGRAPHY
============================================= */
h1 { font-size: clamp(28px, 5vw, 42px); font-weight: 600; line-height: 1.15; }
h2 { font-size: clamp(22px, 3vw, 32px); font-weight: 600; line-height: 1.25; }
h3 { font-size: 18px; font-weight: 600; }
h4 { font-size: 15px; font-weight: 600; }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* =============================================
   LAYOUT
============================================= */
.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 760px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }
.section-badge {
  display: inline-block;
  background: var(--brand-bg);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 14px;
  border: 1px solid var(--brand-border);
  letter-spacing: .03em;
}
.section-title { margin-bottom: 12px; }
.section-sub { font-size: 17px; color: var(--text-secondary); max-width: 560px; }
.text-center { text-align: center; }
.text-center .section-sub { margin: 0 auto; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }

/* =============================================
   BUTTONS
============================================= */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: var(--radius-md);
  font-size: 14px; font-weight: 600; cursor: pointer;
  border: none; transition: all .15s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-outline {
  background: var(--bg-primary); color: var(--text-primary);
  border: 1.5px solid var(--border-dark);
}
.btn-outline:hover { background: var(--bg-secondary); border-color: var(--brand-light); }
.btn-ghost { background: transparent; color: var(--text-secondary); border: none; }
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-secondary); }
.btn-lg { padding: 13px 28px; font-size: 15px; }
.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-white { background: #fff; color: var(--brand); }
.btn-white:hover { background: var(--brand-bg); }

/* =============================================
   NAVBAR
============================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.navbar {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-logo { display: flex; align-items: center; text-decoration: none; }
.nav-logo-img { height: 38px; width: auto; object-fit: contain; display: block; max-width: 160px; }
.nav-logo-icon {
  width: 34px; height: 34px; background: var(--brand);
  border-radius: 9px; display: flex; align-items: center;
  justify-content: center; color: #fff; font-size: 18px;
}
.nav-menu { display: flex; align-items: center; gap: 4px; }
.nav-item { font-size: 14px; color: var(--text-secondary); padding: 7px 12px; border-radius: 6px; font-weight: 500; cursor: pointer; }
.nav-item:hover, .nav-item.current { color: var(--text-primary); background: var(--bg-secondary); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-login { font-size: 14px; font-weight: 500; color: var(--text-secondary); padding: 8px 14px; }
.nav-login:hover { color: var(--text-primary); }
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
@media(max-width:768px){
  .nav-menu { display: none; }
  .hamburger { display: flex; flex-direction: column; gap: 5px; }
  .hamburger span { display: block; width: 22px; height: 2px; background: var(--text-primary); border-radius: 2px; }
  .nav-actions .nav-login { display: none; }
}

/* =============================================
   HERO
============================================= */
.hero-section {
  padding: 88px 0 72px;
  text-align: center;
  background: linear-gradient(180deg, #F8F7FF 0%, #fff 100%);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--brand-bg); color: var(--brand-dark);
  font-size: 12px; font-weight: 600;
  padding: 6px 14px; border-radius: 20px; margin-bottom: 24px;
  border: 1px solid var(--brand-border);
}
.hero-title { margin-bottom: 20px; color: var(--text-primary); }
.hero-title .highlight { color: var(--brand); }
.hero-subtitle {
  font-size: 18px; color: var(--text-secondary);
  max-width: 600px; margin: 0 auto 36px; line-height: 1.65;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 40px; }
.hero-trust {
  display: flex; align-items: center; justify-content: center;
  gap: 24px; flex-wrap: wrap;
}
.trust-item {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-secondary);
}
.trust-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex-shrink: 0; }

/* =============================================
   STATS BAR
============================================= */
.stats-bar {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 36px 0;
}
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.stat-item { text-align: center; padding: 16px; }
.stat-number { font-size: 32px; font-weight: 700; color: var(--brand); }
.stat-label { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }

/* =============================================
   FEATURE CARDS
============================================= */
.feature-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: box-shadow .2s, border-color .2s;
}
.feature-card:hover { box-shadow: var(--shadow-md); border-color: var(--brand-border); }
.feature-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--brand-bg); display: flex;
  align-items: center; justify-content: center;
  font-size: 20px; margin-bottom: 16px;
}
.feature-title { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.feature-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin: 0; }

/* =============================================
   TESTIMONIALS
============================================= */
.testi-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.testi-stars { color: #F59E0B; font-size: 15px; margin-bottom: 12px; }
.testi-text { font-size: 14px; color: var(--text-secondary); line-height: 1.65; margin-bottom: 18px; }
.testi-author { display: flex; align-items: center; gap: 12px; }
.testi-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--brand-bg); color: var(--brand-dark);
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.testi-name { font-size: 13px; font-weight: 600; }
.testi-role { font-size: 12px; color: var(--text-muted); }

/* =============================================
   PRICING
============================================= */
.pricing-section { background: var(--bg-secondary); }
.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 0; width: 100%; }
.pricing-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
}
.pricing-card.featured { border: 2px solid var(--brand); }
.popular-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--brand); color: #fff;
  font-size: 11px; font-weight: 700; padding: 4px 14px;
  border-radius: 20px; white-space: nowrap;
}
.plan-name { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.plan-price { font-size: 36px; font-weight: 700; margin-bottom: 6px; }
.plan-price span { font-size: 14px; font-weight: 400; color: var(--text-secondary); }
.plan-desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 20px; }
.plan-divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.plan-features { margin-bottom: 24px; }
.plan-feature {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 13px; color: var(--text-secondary);
  padding: 5px 0;
}
.plan-feature .check { color: var(--green); flex-shrink: 0; margin-top: 2px; }
.plan-feature .cross { color: var(--text-muted); flex-shrink: 0; margin-top: 2px; }
.plan-btn { width: 100%; text-align: center; justify-content: center; }

/* =============================================
   FAQ
============================================= */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}
.faq-question {
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer; font-size: 15px; font-weight: 600;
  color: var(--text-primary);
}
.faq-question .icon { font-size: 20px; color: var(--text-muted); transition: transform .2s; }
.faq-item.open .faq-question .icon { transform: rotate(45deg); }
.faq-answer {
  font-size: 14px; color: var(--text-secondary);
  line-height: 1.7; padding-top: 12px; display: none;
}
.faq-item.open .faq-answer { display: block; }

/* =============================================
   CTA SECTION
============================================= */
.cta-section {
  background: var(--brand-bg);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-xl);
  padding: 64px 40px;
  text-align: center;
  margin: 0 0 80px;
}
.cta-title { color: #1E1B4B; margin-bottom: 12px; }
.cta-subtitle { font-size: 16px; color: #4338CA; margin-bottom: 28px; }
.cta-form { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; max-width: 460px; margin: 0 auto; }
.cta-input {
  flex: 1; min-width: 220px;
  padding: 12px 16px; border: 1px solid var(--brand-border);
  border-radius: var(--radius-md); font-size: 14px;
  background: #fff; color: var(--text-primary);
}
.cta-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79,70,229,.12); }

/* =============================================
   FOOTER
============================================= */
.site-footer { border-top: 1px solid var(--border); padding-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 40px; padding-bottom: 48px; }
.footer-brand p { font-size: 14px; color: var(--text-secondary); margin-top: 12px; line-height: 1.6; }
.footer-col-title { font-size: 13px; font-weight: 700; color: var(--text-primary); margin-bottom: 16px; letter-spacing: .03em; text-transform: uppercase; }
.footer-link {
  display: block; font-size: 14px; color: var(--text-secondary);
  padding: 4px 0; transition: color .1s;
}
.footer-link:hover { color: var(--brand); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 12px;
}
.footer-copy { font-size: 13px; color: var(--text-muted); }
.footer-legal { display: flex; gap: 20px; }
.footer-legal a { font-size: 13px; color: var(--text-muted); }
.footer-legal a:hover { color: var(--text-primary); }
@media(max-width:768px){
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1/-1; }
}

/* =============================================
   TOOL PAGES
============================================= */
.tool-page-header {
  background: linear-gradient(135deg, var(--brand-bg) 0%, #fff 100%);
  border-bottom: 1px solid var(--border);
  padding: 48px 0;
}
.tool-page-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin-bottom: 16px;
}
.form-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 16px; }
.form-group { display: flex; flex-direction: column; gap: 7px; }
.form-label { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.form-input, .form-select, .form-textarea {
  padding: 10px 14px; border: 1px solid var(--border-dark);
  border-radius: var(--radius-md); font-size: 14px;
  background: var(--bg-primary); color: var(--text-primary);
  width: 100%; transition: border-color .15s, box-shadow .15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}
.form-textarea { min-height: 140px; resize: vertical; line-height: 1.6; }
.score-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-bottom: 24px; }
.score-card {
  background: var(--bg-secondary); border-radius: var(--radius-lg);
  padding: 20px; text-align: center;
}
.score-value { font-size: 36px; font-weight: 700; }
.score-value.great { color: var(--green); }
.score-value.good { color: var(--brand); }
.score-value.ok { color: var(--amber); }
.score-value.bad { color: var(--red); }
.score-label { font-size: 12px; color: var(--text-secondary); margin-top: 5px; }
.score-bar-track { height: 5px; background: var(--border); border-radius: 3px; margin-top: 10px; overflow: hidden; }
.score-bar-fill { height: 100%; border-radius: 3px; }
.result-card {
  background: var(--bg-primary); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 22px; margin-bottom: 16px;
}
.result-card-title {
  font-size: 14px; font-weight: 700; color: var(--text-primary);
  margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.bar-label { font-size: 13px; color: var(--text-secondary); width: 80px; flex-shrink: 0; }
.bar-track { flex: 1; height: 7px; background: var(--bg-tertiary); border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; }
.bar-pct { font-size: 12px; color: var(--text-secondary); min-width: 32px; text-align: right; font-weight: 600; }
.rec-list { list-style: none; }
.rec-list li {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
  font-size: 14px; color: var(--text-secondary);
}
.rec-list li:last-child { border-bottom: none; }
.rec-list .check { color: var(--brand); flex-shrink: 0; margin-top: 2px; }
.tag {
  display: inline-block; font-size: 11px; font-weight: 600;
  padding: 3px 9px; border-radius: 20px;
}
.tag-red { background: #FEE2E2; color: #991B1B; }
.tag-amber { background: #FEF3C7; color: #92400E; }
.tag-green { background: #D1FAE5; color: #065F46; }
.tag-blue { background: var(--brand-bg); color: var(--brand-dark); }

/* =============================================
   DASHBOARD
============================================= */
.dashboard-wrapper { display: flex; min-height: calc(100vh - 64px); }
.dashboard-sidebar {
  width: 230px; flex-shrink: 0;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: 20px 0;
  position: sticky; top: 64px; height: calc(100vh - 64px);
  overflow-y: auto;
}
.sidebar-section-label {
  font-size: 10px; font-weight: 700; color: var(--text-muted);
  letter-spacing: .08em; text-transform: uppercase;
  padding: 8px 16px 4px;
}
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px; font-size: 14px;
  color: var(--text-secondary); cursor: pointer;
  transition: background .1s, color .1s;
}
.sidebar-link:hover { background: var(--bg-primary); color: var(--text-primary); }
.sidebar-link.active {
  background: var(--bg-primary); color: var(--brand);
  font-weight: 600; border-right: 2px solid var(--brand);
}
.sidebar-link .icon { font-size: 17px; flex-shrink: 0; }
.dashboard-main { flex: 1; padding: 28px; overflow: hidden; }
.dash-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.dash-title { font-size: 20px; font-weight: 700; }
.metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-bottom: 24px; }
.metric-card { background: var(--bg-secondary); border-radius: var(--radius-lg); padding: 18px; }
.metric-value { font-size: 26px; font-weight: 700; color: var(--text-primary); }
.metric-label { font-size: 12px; color: var(--text-secondary); margin-top: 3px; }
.metric-change { font-size: 12px; margin-top: 5px; display: flex; align-items: center; gap: 4px; }
.metric-change.up { color: var(--green); }
.metric-change.down { color: var(--red); }
@media(max-width:768px){
  .dashboard-sidebar { display: none; }
  .dashboard-main { padding: 16px; }
}

/* =============================================
   BLOG
============================================= */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.blog-card {
  background: var(--bg-primary); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: box-shadow .2s, transform .2s; cursor: pointer;
}
.blog-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.blog-thumb {
  height: 150px; display: flex; align-items: center;
  justify-content: center; font-size: 36px;
}
.blog-content { padding: 20px; }
.blog-cat {
  font-size: 11px; font-weight: 700; padding: 3px 10px;
  border-radius: 20px; background: var(--brand-bg);
  color: var(--brand-dark); display: inline-block; margin-bottom: 10px;
}
.blog-title { font-size: 15px; font-weight: 600; margin-bottom: 8px; line-height: 1.45; color: var(--text-primary); }
.blog-meta { font-size: 12px; color: var(--text-muted); }

/* =============================================
   UTILITIES
============================================= */
.hidden { display: none !important; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

/* =============================================
   PRICING GRID — RESPONSIVE FIX
============================================= */
@media (max-width: 1024px) {
  .pricing-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 600px) {
  .pricing-grid { grid-template-columns: 1fr !important; }
}

/* =============================================
   BLOG FILTER — ALL POSTS FIX
============================================= */
.blog-filter-btn {
  padding: 7px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  border: 1.5px solid var(--border);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .15s ease;
}
.blog-filter-btn.active,
.blog-filter-btn:hover {
  background: var(--brand) !important;
  color: #fff !important;
  border-color: var(--brand) !important;
}
