/*
Theme Name: Teaching Tools AI
Theme URI: https://teaching-tools-ai.com
Author: Teaching Tools AI
Author URI: https://teaching-tools-ai.com
Description: A modern, high-converting affiliate theme for AI education tool reviews. Features a JSON-powered comparison table, category filtering, SEO-optimized article templates, and a clean editorial design built for teacher audiences.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: teaching-tools-ai
Tags: education, affiliate, blog, clean, responsive
*/

/* =====================================================
   DESIGN SYSTEM — CSS VARIABLES
   ===================================================== */
:root {
  /* Brand */
  --brand-primary: #1a1a2e;
  --brand-secondary: #16213e;
  --brand-accent: #e8c547;
  --brand-accent-dark: #c9a832;

  /* Category colors */
  --cat-all-in-one: #6366f1;
  --cat-science: #10b981;
  --cat-math: #f59e0b;
  --cat-english: #ec4899;
  --cat-history: #8b5cf6;
  --cat-art: #ef4444;
  --cat-assessment: #0ea5e9;
  --cat-special-ed: #f97316;

  /* Neutrals */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  /* Text */
  --text-primary: #1a1a2e;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;

  /* Surfaces */
  --surface-white: #ffffff;
  --surface-light: #f9fafb;
  --surface-card: #ffffff;

  /* Borders */
  --border-light: #f0f0f0;
  --border-medium: #e5e7eb;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* Spacing */
  --container-max: 1140px;
  --section-gap: 80px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition: all 0.2s ease;
  --transition-slow: all 0.4s ease;
}

/* =====================================================
   RESET & BASE
   ===================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }

/* =====================================================
   TYPOGRAPHY
   ===================================================== */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--text-primary);
  font-weight: 700;
}
h1 { font-size: clamp(2rem, 4vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
h4 { font-size: 1.1rem; }
p { color: var(--text-secondary); line-height: 1.75; }
.text-muted { color: var(--text-muted); }
.text-small { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

/* =====================================================
   LAYOUT
   ===================================================== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: var(--section-gap) 0; }
.section-sm { padding: 48px 0; }

/* =====================================================
   SITE HEADER
   ===================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--brand-primary);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.site-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: var(--brand-accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.site-logo .logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
  line-height: 1.1;
}
.site-logo .logo-text span { color: var(--brand-accent); }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
  transition: var(--transition);
  white-space: nowrap;
}
.site-nav a:hover,
.site-nav a.current { background: rgba(255,255,255,0.1); color: #fff; }
.header-cta {
  background: var(--brand-accent);
  color: var(--brand-primary) !important;
  padding: 8px 18px !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 800 !important;
  font-size: 0.8rem !important;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.header-cta:hover { background: var(--brand-accent-dark) !important; transform: translateY(-1px); }
.mobile-menu-btn {
  display: none;
  color: #fff;
  font-size: 1.5rem;
  background: none;
  border: none;
}

/* =====================================================
   HERO — HOMEPAGE
   ===================================================== */
.hero {
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 60%, #0f3460 100%);
  padding: 80px 0 100px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,197,71,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: 10%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.1) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(232,197,71,0.15);
  border: 1px solid rgba(232,197,71,0.3);
  border-radius: var(--radius-full);
  padding: 5px 14px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand-accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.hero h1 {
  color: #fff;
  font-size: clamp(2.2rem, 5vw, 3.75rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 20px;
}
.hero h1 em {
  font-style: normal;
  color: var(--brand-accent);
}
.hero p {
  color: rgba(255,255,255,0.72);
  font-size: 1.1rem;
  max-width: 560px;
  margin-bottom: 36px;
}
.hero-stats {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.hero-stat .num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}
.hero-stat .label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
}
.hero-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.9rem;
  transition: var(--transition);
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-family: var(--font-body);
  white-space: nowrap;
}
.btn-primary {
  background: var(--brand-accent);
  color: var(--brand-primary);
}
.btn-primary:hover {
  background: var(--brand-accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(232,197,71,0.4);
}
.btn-outline {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.3);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.6);
}
.btn-dark {
  background: var(--gray-900);
  color: #fff;
}
.btn-dark:hover {
  background: var(--gray-700);
  transform: translateY(-1px);
}
.btn-sm { padding: 8px 16px; font-size: 0.8rem; }
.btn-lg { padding: 16px 32px; font-size: 1rem; }

/* =====================================================
   CATEGORY PILLS / FILTER BAR
   ===================================================== */
.category-filter {
  background: var(--surface-white);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 64px;
  z-index: 90;
  box-shadow: var(--shadow-sm);
}
.category-filter-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.category-filter-inner::-webkit-scrollbar { display: none; }
.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition);
  border: 1.5px solid var(--border-medium);
  background: var(--surface-white);
  color: var(--text-secondary);
}
.cat-pill:hover,
.cat-pill.active {
  border-color: transparent;
  color: #fff;
}
.cat-pill[data-cat="all"].active,
.cat-pill[data-cat="all"]:hover { background: var(--gray-900); }
.cat-pill[data-cat="all-in-one"].active { background: var(--cat-all-in-one); }
.cat-pill[data-cat="science"].active { background: var(--cat-science); }
.cat-pill[data-cat="math"].active { background: var(--cat-math); color: var(--gray-900); }
.cat-pill[data-cat="english"].active { background: var(--cat-english); }
.cat-pill[data-cat="history"].active { background: var(--cat-history); }
.cat-pill[data-cat="art"].active { background: var(--cat-art); }
.cat-pill[data-cat="assessment"].active { background: var(--cat-assessment); }
.cat-pill[data-cat="special-ed"].active { background: var(--cat-special-ed); }

/* =====================================================
   TOOLS TABLE / COMPARISON TABLE
   ===================================================== */
.tools-section { background: var(--surface-light); }
.tools-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.tools-header h2 { margin: 0; }
.tools-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.tools-search {
  position: relative;
}
.tools-search input {
  height: 38px;
  padding: 0 12px 0 36px;
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-family: var(--font-body);
  outline: none;
  width: 220px;
  transition: var(--transition);
  background: var(--surface-white);
}
.tools-search input:focus { border-color: var(--brand-accent); }
.tools-search svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}
.tools-select {
  height: 38px;
  padding: 0 12px;
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-family: var(--font-body);
  background: var(--surface-white);
  cursor: pointer;
  outline: none;
  color: var(--text-secondary);
  font-weight: 600;
}
.free-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}
.toggle-switch {
  width: 36px;
  height: 20px;
  background: var(--border-medium);
  border-radius: var(--radius-full);
  position: relative;
  transition: var(--transition);
}
.toggle-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: var(--transition);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.free-toggle.checked .toggle-switch { background: var(--cat-science); }
.free-toggle.checked .toggle-switch::after { left: 19px; }
.free-toggle.checked { color: var(--cat-science); }

/* Tools table */
.tools-table-wrap {
  background: var(--surface-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.tools-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.tools-table thead {
  background: var(--brand-primary);
  color: #fff;
}
.tools-table thead th {
  padding: 14px 16px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.8);
  white-space: nowrap;
}
.tools-table thead th:first-child { border-radius: 0; }
.tools-table thead th.sortable { cursor: pointer; }
.tools-table thead th.sortable:hover { color: var(--brand-accent); }
.tools-table thead th.sorted { color: var(--brand-accent); }
.sort-icon { margin-left: 4px; opacity: 0.5; font-size: 0.7rem; }
.tools-table tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}
.tools-table tbody tr:last-child { border-bottom: none; }
.tools-table tbody tr:hover { background: var(--gray-50); }
.tools-table tbody tr.featured { background: linear-gradient(90deg, rgba(232,197,71,0.04) 0%, transparent 100%); }
.tools-table td { padding: 16px; vertical-align: middle; }
.tool-name-cell { min-width: 220px; }
.tool-name-main {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.2;
}
.tool-tagline {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.3;
}
.tool-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 5px;
  color: #fff;
}
.cat-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.cat-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: var(--radius-full);
  background: var(--gray-100);
  color: var(--text-secondary);
}
.star-rating { display: flex; align-items: center; gap: 4px; }
.stars { display: flex; gap: 1px; }
.star { font-size: 12px; }
.star.filled { color: #f59e0b; }
.star.empty { color: var(--gray-300); }
.rating-num {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.875rem;
}
.rating-count {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.price-cell .price-main {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.9rem;
}
.price-cell .free-badge {
  display: inline-block;
  background: #dcfce7;
  color: #16a34a;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  letter-spacing: 0.04em;
}
.grade-levels { display: flex; flex-wrap: wrap; gap: 3px; }
.grade-tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--gray-100);
  color: var(--text-secondary);
}
.tool-actions { display: flex; gap: 8px; align-items: center; }
.btn-visit {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--brand-primary);
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-visit:hover {
  background: var(--gray-700);
  transform: translateY(-1px);
}
.btn-details {
  display: inline-flex;
  align-items: center;
  background: transparent;
  color: var(--text-muted);
  padding: 8px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  transition: var(--transition);
  border: 1.5px solid var(--border-medium);
}
.btn-details:hover { color: var(--text-primary); border-color: var(--gray-400); }
.tools-footer {
  padding: 14px 20px;
  background: var(--gray-50);
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.tools-count { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; }
.no-results {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-muted);
}
.no-results .icon { font-size: 3rem; margin-bottom: 12px; }
.no-results h4 { color: var(--text-primary); margin-bottom: 6px; }

/* =====================================================
   TOOL CARDS (Grid View)
   ===================================================== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.tool-card {
  background: var(--surface-white);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition-slow);
  display: flex;
  flex-direction: column;
}
.tool-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: var(--border-medium);
}
.tool-card-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-light);
}
.tool-card-body { padding: 16px 20px; flex: 1; }
.tool-card-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-light);
  background: var(--gray-50);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* =====================================================
   VIEW TOGGLE
   ===================================================== */
.view-toggle {
  display: flex;
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.view-btn {
  width: 36px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-white);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
}
.view-btn.active,
.view-btn:hover {
  background: var(--brand-primary);
  color: #fff;
}

/* =====================================================
   ARTICLE CARDS
   ===================================================== */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
.article-card {
  background: var(--surface-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition-slow);
  display: flex;
  flex-direction: column;
}
.article-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.article-card-img {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  overflow: hidden;
  position: relative;
}
.article-card-img .cat-indicator {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.article-card-img .emoji-bg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  opacity: 0.25;
}
.article-card-body { padding: 20px; flex: 1; }
.article-card-body h3 {
  font-size: 1.05rem;
  line-height: 1.3;
  margin-bottom: 8px;
  transition: var(--transition);
}
.article-card:hover .article-card-body h3 { color: var(--cat-all-in-one); }
.article-meta {
  display: flex;
  gap: 12px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 10px;
}
.article-card-body p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-card-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
}
.read-more {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}
.read-more:hover { gap: 8px; }

/* =====================================================
   SINGLE ARTICLE
   ===================================================== */
.article-header {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  padding: 60px 0 80px;
  position: relative;
  overflow: hidden;
}
.article-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--surface-white);
  clip-path: ellipse(55% 100% at 50% 100%);
}
.article-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-accent);
  margin-bottom: 14px;
}
.article-header h1 { color: #fff; margin-bottom: 16px; }
.article-header .article-meta { color: rgba(255,255,255,0.6); }
.article-content {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px 80px;
}
.article-content h2 {
  margin-top: 48px;
  margin-bottom: 16px;
  padding-top: 32px;
  border-top: 1px solid var(--border-light);
}
.article-content h2:first-of-type { border-top: none; padding-top: 0; margin-top: 40px; }
.article-content h3 { margin-top: 32px; margin-bottom: 12px; }
.article-content p { margin-bottom: 20px; }
.article-content ul, .article-content ol { margin: 0 0 20px 20px; }
.article-content li { color: var(--text-secondary); line-height: 1.75; margin-bottom: 8px; }
.article-content ul li { list-style: disc; }
.article-content ol li { list-style: decimal; }
.article-content strong { color: var(--text-primary); font-weight: 700; }
.article-content a { color: var(--cat-all-in-one); font-weight: 600; }
.article-content a:hover { text-decoration: underline; }
.article-content blockquote {
  border-left: 4px solid var(--brand-accent);
  padding: 16px 20px;
  background: var(--gray-50);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 24px 0;
  font-style: italic;
  color: var(--text-secondary);
}
.article-content .affiliate-notice {
  background: var(--gray-50);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}
/* Inline tool recommendation box */
.tool-recommend-box {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.tool-recommend-box .tool-info h4 { color: #fff; margin-bottom: 4px; }
.tool-recommend-box .tool-info p { color: rgba(255,255,255,0.7); font-size: 0.875rem; margin: 0; }
.comparison-table-shortcode { margin: 32px 0; }

/* =====================================================
   FEATURED TOOL HIGHLIGHT
   ===================================================== */
.featured-tools { background: var(--surface-white); }
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.featured-card {
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  background: var(--surface-white);
  transition: var(--transition-slow);
  position: relative;
}
.featured-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--brand-accent), transparent);
  opacity: 0;
  transition: var(--transition);
}
.featured-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.featured-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 14px;
}
.featured-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.featured-card p { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 16px; }

/* =====================================================
   SITE FOOTER
   ===================================================== */
.site-footer {
  background: var(--brand-primary);
  color: rgba(255,255,255,0.6);
  padding: 60px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand p { font-size: 0.875rem; margin-top: 12px; line-height: 1.7; }
.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.9);
  margin-bottom: 16px;
}
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a {
  color: rgba(255,255,255,0.55);
  font-size: 0.875rem;
  transition: var(--transition);
}
.footer-col ul li a:hover { color: #fff; }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.8rem;
}
.footer-bottom a { color: rgba(255,255,255,0.5); transition: var(--transition); }
.footer-bottom a:hover { color: #fff; }
.affiliate-disclaimer {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
  line-height: 1.6;
  margin-bottom: 32px;
}

/* =====================================================
   SIDEBAR
   ===================================================== */
.content-sidebar { display: grid; grid-template-columns: 1fr 300px; gap: 40px; align-items: start; }
.sidebar-widget {
  background: var(--surface-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
}
.sidebar-widget-header {
  padding: 14px 18px;
  background: var(--brand-primary);
  color: #fff;
  font-weight: 800;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.sidebar-widget-body { padding: 16px 18px; }

/* =====================================================
   BREADCRUMB
   ===================================================== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 16px;
}
.breadcrumb a { color: rgba(255,255,255,0.5); transition: var(--transition); }
.breadcrumb a:hover { color: var(--brand-accent); }
.breadcrumb span { color: rgba(255,255,255,0.3); }

/* =====================================================
   NEWSLETTER / CTA BANNER
   ===================================================== */
.cta-banner {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  border-radius: var(--radius-xl);
  padding: 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(232,197,71,0.1);
}
.cta-banner h2 { color: #fff; margin-bottom: 10px; }
.cta-banner p { color: rgba(255,255,255,0.7); margin-bottom: 24px; }
.cta-form { display: flex; gap: 10px; max-width: 420px; margin: 0 auto; flex-wrap: wrap; justify-content: center; }
.cta-form input {
  flex: 1;
  min-width: 200px;
  height: 48px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  border: none;
  font-size: 0.9rem;
  font-family: var(--font-body);
  outline: none;
}

/* =====================================================
   UTILITIES
   ===================================================== */
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.section-title { text-align: center; margin-bottom: 48px; }
.section-title h2 { margin-bottom: 10px; }
.section-title p { color: var(--text-secondary); max-width: 560px; margin: 0 auto; }

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .content-sidebar { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  :root { --section-gap: 48px; }
  .site-nav { display: none; }
  .site-nav.open { display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--brand-primary); padding: 16px; z-index: 200; border-top: 1px solid rgba(255,255,255,0.1); }
  .mobile-menu-btn { display: block; }
  .tools-table-wrap { overflow-x: auto; }
  .tools-controls { flex-direction: column; align-items: stretch; }
  .tools-search input { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .cta-banner { padding: 32px 24px; }
  .hero { padding: 48px 0 64px; }
  .tools-header { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: 2rem; }
  .hero-buttons { flex-direction: column; }
  .hero-buttons .btn { width: 100%; justify-content: center; }
}

/* =====================================================
   ANIMATIONS
   ===================================================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.animate-in { animation: fadeInUp 0.5s ease forwards; }
.tool-row { animation: fadeIn 0.3s ease forwards; }

/* =====================================================
   PRINT
   ===================================================== */
@media print {
  .site-header, .site-footer, .category-filter { display: none; }
  .article-content { max-width: 100%; }
}
