:root {
  --navy: #0B1629;
  --navy2: #0f1e38;
  --navy3: #152344;
  --blue: #1D4ED8;
  --blue-light: #3B82F6;
  --blue-pale: #EFF6FF;
  --orange: #F97316;
  --orange-dark: #EA580C;
  --gold: #F59E0B;
  --green: #16A34A;
  --green-light: #DCFCE7;
  --red: #DC2626;
  --white: #FFFFFF;
  --off-white: #F8FAFC;
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --text: #0F172A;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.12), 0 4px 10px rgba(0,0,0,0.06);
  --shadow-xl: 0 20px 50px rgba(0,0,0,0.15);
  --radius: 12px;
  --radius-lg: 16px;
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--gray-50);
  line-height: 1.6;
  font-size: 15px;
}

/* HEADER */
#site-header {
  background: var(--navy);
  padding: 0 24px;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 20px rgba(0,0,0,0.25);
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 62px; gap: 20px;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark {
  width: 36px; height: 36px; background: var(--blue-light);
  border-radius: 9px; display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 900; color: #fff; flex-shrink: 0;
}
.logo-text { font-size: 17px; font-weight: 700; color: #fff; letter-spacing: -0.3px; }
.logo-text span { color: var(--blue-light); }
.header-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.header-nav a {
  color: rgba(255,255,255,0.7); font-size: 13px; font-weight: 500;
  text-decoration: none; padding: 5px 12px; border-radius: 6px; transition: all 0.15s;
}
.header-nav a:hover, .header-nav a.active { color: #fff; background: rgba(255,255,255,0.1); }
.header-cta {
  background: var(--blue-light); color: #fff !important;
  border-radius: 8px !important; padding: 7px 16px !important;
  font-weight: 600 !important; transition: background 0.15s !important;
}
.header-cta:hover { background: var(--blue) !important; }

/* HERO */
#page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy2) 60%, #1a2a50 100%);
  padding: 64px 24px 56px;
  position: relative; overflow: hidden;
}
#page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.025'%3E%3Ccircle cx='30' cy='30' r='1'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-inner { max-width: 820px; margin: 0 auto; text-align: center; position: relative; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(59,130,246,0.15); border: 1px solid rgba(59,130,246,0.35);
  color: #93C5FD; font-size: 12px; font-weight: 600; letter-spacing: 1px;
  text-transform: uppercase; border-radius: 20px; padding: 5px 14px; margin-bottom: 18px;
}
.hero-title {
  font-family: var(--font-display); font-size: clamp(30px, 5vw, 48px);
  color: #fff; line-height: 1.2; margin-bottom: 14px; letter-spacing: -0.5px;
}
.hero-title em { color: var(--blue-light); font-style: italic; }
.hero-sub {
  font-size: 17px; color: rgba(255,255,255,0.72); line-height: 1.7;
  max-width: 700px; margin: 0 auto 28px;
}
.hero-stats { display: flex; justify-content: center; gap: 32px; flex-wrap: wrap; }
.hero-stat { text-align: center; }
.hero-stat-num { font-size: 28px; font-weight: 700; color: #fff; line-height: 1; }
.hero-stat-label { font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 3px; }

/* DISCLOSURE */
.disclosure-bar {
  background: #FFFBEB; border-bottom: 1px solid #FDE68A;
  padding: 10px 24px; text-align: center;
}
.disclosure-bar p { font-size: 12px; color: #92400E; max-width: 1200px; margin: 0 auto; }
.disclosure-bar strong { color: #78350F; }
.disclosure-bar a { color: #92400E; }

/* CATEGORY NAV */
#cat-nav {
  background: #fff; border-bottom: 1px solid var(--gray-200);
  padding: 0 24px; position: sticky; top: 62px; z-index: 90;
  box-shadow: var(--shadow-sm);
}
.cat-nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; gap: 4px;
  overflow-x: auto; padding: 10px 0;
  scrollbar-width: none;
}
.cat-nav-inner::-webkit-scrollbar { display: none; }
.cat-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 14px; border-radius: 20px; border: 1px solid var(--gray-200);
  background: transparent; color: var(--gray-600); font-size: 13px; font-weight: 500;
  cursor: pointer; white-space: nowrap; transition: all 0.15s; font-family: var(--font-body);
}
.cat-btn:hover { background: var(--blue-pale); color: var(--blue); border-color: #BFDBFE; }
.cat-btn.active { background: var(--blue); color: #fff; border-color: var(--blue); }

/* MAIN */
#main { max-width: 1200px; margin: 0 auto; padding: 48px 24px 80px; }

/* FEATURED HERO */
.featured-hero {
  background: linear-gradient(135deg, #0B1629 0%, #162A52 50%, #1D3A6B 100%);
  border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 56px;
  border: 1px solid rgba(59,130,246,0.2);
  box-shadow: var(--shadow-xl);
  position: relative;
}
.featured-hero::before {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 400px; height: 100%;
  background: radial-gradient(ellipse at right center, rgba(59,130,246,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.featured-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: linear-gradient(90deg, var(--gold), #FBBF24);
  color: #78350F; font-size: 11px; font-weight: 800; letter-spacing: 1px;
  text-transform: uppercase; padding: 4px 12px; border-radius: 4px;
}
.featured-inner { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 32px; padding: 40px 44px; }
.featured-content .featured-badge { margin-bottom: 14px; }
.featured-title { font-family: var(--font-display); font-size: 30px; color: #fff; margin-bottom: 8px; line-height: 1.25; }
.featured-sub { font-size: 15px; color: rgba(255,255,255,0.68); margin-bottom: 18px; line-height: 1.65; max-width: 560px; }
.featured-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.pill {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.8); font-size: 12px; font-weight: 500;
  padding: 4px 12px; border-radius: 20px;
}
.featured-cta-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: #fff; font-size: 14px; font-weight: 700;
  padding: 12px 24px; border-radius: 10px; text-decoration: none;
  box-shadow: 0 4px 15px rgba(249,115,22,0.4);
  transition: all 0.2s; white-space: nowrap;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(249,115,22,0.5); }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.85); font-size: 13px; font-weight: 500;
  padding: 11px 18px; border-radius: 10px; text-decoration: none;
  transition: all 0.2s;
}
.btn-secondary:hover { background: rgba(255,255,255,0.18); }
.featured-trust { font-size: 12px; color: rgba(255,255,255,0.45); margin-top: 10px; }
.featured-side { text-align: center; }
.semrush-iframe-wrap {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px; padding: 16px; overflow: hidden;
}
.semrush-iframe-wrap iframe { border-radius: 8px; display: block; }

/* CATEGORY SECTION */
.cat-section { margin-bottom: 56px; scroll-margin-top: 130px; }
.cat-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.cat-icon-wrap {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.cat-title { font-family: var(--font-display); font-size: 24px; color: var(--navy); }
.cat-desc { font-size: 14px; color: var(--gray-500); margin-left: auto; max-width: 300px; text-align: right; }

/* NEW: Intro paragraph for each category */
.cat-intro {
  margin: 0 0 20px 0;
  padding: 0 4px;
  font-size: 15px;
  color: var(--gray-600);
  line-height: 1.6;
  border-left: 3px solid var(--blue-light);
  padding-left: 16px;
}
.cat-intro p { margin: 0; }

/* TOOL GRID */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.tool-grid.cols-2 { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }

/* TOOL CARD */
.tool-card {
  background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
  padding: 24px; display: flex; flex-direction: column; gap: 14px;
  transition: all 0.2s; position: relative; overflow: hidden;
}
.tool-card:hover { border-color: var(--blue-light); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.tool-card.featured-card { border-color: var(--orange); border-width: 2px; }
.tool-card.featured-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--orange), var(--gold));
}
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.card-tool-info { display: flex; align-items: center; gap: 10px; }
.tool-logo {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--gray-100); display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0; border: 1px solid var(--gray-200);
}
.tool-logo img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}
.tool-logo[data-replaceable-logo='true'] {
  border-style: dashed;
}
.tool-name { font-size: 16px; font-weight: 700; color: var(--navy); line-height: 1.2; }
.tool-tagline { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.card-badges { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.badge {
  font-size: 10px; font-weight: 700; letter-spacing: 0.5px;
  padding: 3px 8px; border-radius: 4px; white-space: nowrap; text-transform: uppercase;
}
.badge-affiliate { background: #FEF3C7; color: #92400E; border: 1px solid #FDE68A; }
.badge-free { background: var(--green-light); color: #166534; border: 1px solid #BBF7D0; }
.badge-best { background: linear-gradient(90deg,#FEF3C7,#FDE68A); color: #78350F; border: 1px solid #FCD34D; }
.badge-popular { background: #EDE9FE; color: #5B21B6; border: 1px solid #C4B5FD; }
.badge-new { background: #DBEAFE; color: #1E40AF; border: 1px solid #BFDBFE; }

.card-rating { display: flex; align-items: center; gap: 6px; }
.stars { color: var(--gold); font-size: 13px; letter-spacing: 1px; }
.rating-num { font-size: 13px; font-weight: 700; color: var(--gray-700); }
.rating-count { font-size: 11px; color: var(--gray-400); }

.card-use-case {
  background: var(--gray-50); border: 1px solid var(--gray-100);
  border-radius: 8px; padding: 10px 14px;
}
.use-case-label { font-size: 10px; font-weight: 700; color: var(--blue); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 3px; }
.use-case-text { font-size: 13px; color: var(--gray-600); line-height: 1.5; }

.why-title { font-size: 11px; font-weight: 700; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 6px; }
.why-list { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.why-list li { font-size: 13px; color: var(--gray-600); display: flex; align-items: flex-start; gap: 7px; line-height: 1.45; }
.why-list li::before { content: '✓'; color: var(--green); font-weight: 800; font-size: 12px; margin-top: 1px; flex-shrink: 0; }

.card-pricing { display: flex; align-items: center; justify-content: space-between; padding-top: 2px; }
.price-label { font-size: 12px; color: var(--gray-400); }
.price-val { font-size: 14px; font-weight: 700; color: var(--navy); }

.card-cta { margin-top: auto; }
.btn-cta {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%; padding: 11px 16px; border-radius: 9px;
  font-size: 14px; font-weight: 700; text-decoration: none;
  transition: all 0.18s; border: none; cursor: pointer; font-family: var(--font-body);
}
.btn-cta-orange {
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: #fff;
  box-shadow: 0 3px 12px rgba(249,115,22,0.3);
}
.btn-cta-orange:hover { transform: translateY(-1px); box-shadow: 0 5px 18px rgba(249,115,22,0.45); }
.btn-cta-blue {
  background: linear-gradient(135deg, var(--blue-light), var(--blue));
  color: #fff;
  box-shadow: 0 3px 12px rgba(59,130,246,0.25);
}
.btn-cta-blue:hover { transform: translateY(-1px); box-shadow: 0 5px 18px rgba(59,130,246,0.4); }
.btn-cta-outline {
  background: transparent; color: var(--blue);
  border: 2px solid var(--blue-light);
}
.btn-cta-outline:hover { background: var(--blue-pale); }
.btn-cta-green {
  background: linear-gradient(135deg, #22C55E, var(--green));
  color: #fff;
  box-shadow: 0 3px 12px rgba(22,163,74,0.25);
}
.btn-cta-green:hover { transform: translateY(-1px); box-shadow: 0 5px 18px rgba(22,163,74,0.4); }
.affiliate-note { font-size: 10px; color: var(--gray-400); text-align: center; margin-top: 5px; }

.review-link {
  display: block;
  text-align: center;
  margin-top: 8px;
  font-size: 12px;
  color: var(--gray-500);
  text-decoration: none;
  font-weight: 600;
}
.review-link:hover { color: var(--blue); text-decoration: underline; }

.pdf-awin-block {
  background: var(--gray-50); border-radius: 10px; padding: 14px;
  display: flex; align-items: center; gap: 12px; margin-top: 4px;
  border: 1px solid var(--gray-200); overflow: hidden;
}
.pdf-awin-block img { max-width: 100%; border-radius: 6px; }

/* CONVERSION BANNER */
.conversion-banner {
  background: linear-gradient(135deg, var(--navy) 0%, #1E3A6E 100%);
  border-radius: var(--radius-lg); padding: 36px 44px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap; margin: 48px 0;
  border: 1px solid rgba(59,130,246,0.2);
}
.banner-text h2,
.banner-text h3 { font-family: var(--font-display); font-size: 22px; color: #fff; margin-bottom: 6px; }
.banner-text p { font-size: 14px; color: rgba(255,255,255,0.6); }
.banner-cta { flex-shrink: 0; }

/* SEMRUSH SEARCH */
.semrush-search-block {
  background: linear-gradient(135deg, #0B1629, #162A52);
  border-radius: var(--radius-lg); padding: 36px 40px;
  margin-bottom: 56px; border: 1px solid rgba(59,130,246,0.2);
  text-align: center;
}
.semrush-search-block h2 { font-family: var(--font-display); font-size: 26px; color: #fff; margin-bottom: 8px; }
.semrush-search-block p { font-size: 14px; color: rgba(255,255,255,0.6); margin-bottom: 22px; }
.semrush-search-form { display: flex; gap: 0; max-width: 600px; margin: 0 auto 14px; }
.semrush-search-input {
  flex: 1; padding: 14px 18px; border-radius: 10px 0 0 10px;
  border: 2px solid rgba(255,255,255,0.15); border-right: none;
  background: rgba(255,255,255,0.07); color: #fff; font-size: 15px;
  font-family: var(--font-body); outline: none;
}
.semrush-search-input::placeholder { color: rgba(255,255,255,0.35); }
.semrush-search-input:focus { border-color: var(--blue-light); background: rgba(255,255,255,0.1); }
.semrush-search-btn {
  padding: 14px 24px; background: var(--orange); border: none;
  border-radius: 0 10px 10px 0; color: #fff; font-size: 14px;
  font-weight: 700; cursor: pointer; font-family: var(--font-body);
  transition: background 0.15s; white-space: nowrap;
}
.semrush-search-btn:hover { background: var(--orange-dark); }
.semrush-search-sub { font-size: 12px; color: rgba(255,255,255,0.4); }
.semrush-search-sub a { color: rgba(255,255,255,0.65); }

/* TRUST BAR */
.trust-bar {
  background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius);
  padding: 18px 28px; display: flex; align-items: center; justify-content: center;
  gap: 32px; flex-wrap: wrap; margin-bottom: 48px;
}
.trust-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--gray-600); }
.trust-icon { font-size: 18px; }

/* FOOTER */
#site-footer {
  background: var(--navy); color: rgba(255,255,255,0.5);
  text-align: center; padding: 24px; font-size: 12px; line-height: 1.7;
}
#site-footer a { color: rgba(255,255,255,0.7); }

/* CATEGORY COLORS */
.cat-email .cat-icon-wrap { background: #FEE2E2; }
.cat-crm .cat-icon-wrap { background: #E0E7FF; }
.cat-seo .cat-icon-wrap { background: #D1FAE5; }
.cat-pdf .cat-icon-wrap { background: #FEF3C7; }
.cat-pm .cat-icon-wrap { background: #F3E8FF; }
.cat-finance .cat-icon-wrap { background: #DCFCE7; }
.cat-payments .cat-icon-wrap { background: #FFF7ED; }
.cat-web .cat-icon-wrap { background: #DBEAFE; }
.cat-ai .cat-icon-wrap { background: #F0FDFB; }
.cat-auto .cat-icon-wrap { background: #FEF9C3; }
.cat-comm .cat-icon-wrap { background: #E0F2FE; }

@media (max-width: 768px) {
  .featured-inner { grid-template-columns: 1fr; }
  .featured-side { display: none; }
  .cat-desc { display: none; }
  .hero-stats { gap: 20px; }
  .conversion-banner { padding: 28px; }
  .semrush-search-block { padding: 28px 20px; }
  .semrush-search-form { flex-direction: column; }
  .semrush-search-input { border-radius: 10px; border-right: 2px solid rgba(255,255,255,0.15); }
  .semrush-search-btn { border-radius: 10px; }
  #main { padding: 32px 16px 60px; }
}

.fade-in { opacity: 0; transform: translateY(16px); animation: fadeUp 0.5s ease forwards; }
@keyframes fadeUp { to { opacity:1; transform:translateY(0); } }
