/* ==========================================================================
   BIZSTACK 商智匯 — Design System
   ========================================================================== */

/* ---------- CSS Custom Properties ---------- */
:root {
  --primary: #1B4F72;
  --primary-dark: #164060;
  --secondary: #2E86C1;
  --accent: #17A2B8;
  --success: #27AE60;
  --warning: #E67E22;
  --danger: #E74C3C;
  --bg: #FFFFFF;
  --bg-alt: #F8F9FA;
  --text: #2C3E50;
  --text-light: #6C757D;
  --border: #E0E0E0;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12);
  --radius: 8px;
  --radius-sm: 6px;
  --radius-lg: 12px;
  --max-width: 1200px;
  --header-height: 64px;
  --announcement-height: 36px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--secondary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary); }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
table { border-collapse: collapse; width: 100%; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: 'Plus Jakarta Sans', 'Noto Sans TC', sans-serif;
  color: var(--primary);
  line-height: 1.25;
}
h1 { font-size: 2.25rem; font-weight: 700; margin-bottom: 1rem; }
h2 { font-size: 1.75rem; font-weight: 700; margin-bottom: 0.75rem; }
h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.5rem; }
h4 { font-size: 1.125rem; font-weight: 600; margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; }
.text-light { color: var(--text-light); }
.text-sm { font-size: 0.8125rem; }

/* ---------- Layout ---------- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }
.section-title { text-align: center; margin-bottom: 48px; }
.section-title h2 { margin-bottom: 8px; }
.section-title p { color: var(--text-light); font-size: 1.0625rem; }

/* ---------- Grid ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
  .grid-2-mobile { grid-template-columns: repeat(2, 1fr); }
  .grid-3-mobile { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4, .grid-5 { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: background 0.2s, transform 0.1s;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #138496; color: #fff; }
.btn-outline { border: 2px solid var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-sm { padding: 6px 16px; font-size: 0.8125rem; }
.btn-lg { padding: 14px 32px; font-size: 1.0625rem; }
.btn-block { display: flex; justify-content: center; width: 100%; text-align: center; }

/* ---------- Cards ---------- */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.card-body { padding: 20px; }
.card-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }

/* ---------- Announcement Bar ---------- */
.announcement-bar {
  background: var(--primary);
  color: #fff;
  text-align: center;
  padding: 8px 24px;
  font-size: 0.8125rem;
  line-height: 1.4;
  position: relative;
}
.announcement-bar a { color: #fff; text-decoration: underline; font-weight: 600; }
.announcement-bar a:hover { opacity: 0.9; color: #fff; }
.announcement-bar .announcement-dismiss {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  opacity: 0.7;
  font-size: 1.125rem;
  line-height: 1;
  padding: 4px;
}
.announcement-bar .announcement-dismiss:hover { opacity: 1; }
.announcement-bar.hidden { display: none; }

/* ---------- Header / Nav ---------- */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary);
}
.site-logo:hover { color: var(--primary); }
.site-logo svg, .site-logo img { height: 32px; width: auto; }

.nav-main { display: flex; align-items: center; gap: 32px; }
.nav-main a {
  color: var(--text);
  font-weight: 500;
  font-size: 0.9375rem;
  padding: 8px 0;
  position: relative;
}
.nav-main a:hover { color: var(--primary); }

/* Mega Menu */
.nav-dropdown { position: relative; }
.nav-dropdown-trigger { cursor: pointer; display: flex; align-items: center; gap: 4px; }
.nav-dropdown-trigger::after {
  content: '';
  border: 4px solid transparent;
  border-top-color: currentColor;
  margin-top: 2px;
}
.mega-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: -24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  padding: 24px;
  min-width: 480px;
  z-index: 200;
}
.mega-menu.active { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mega-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9375rem;
}
.mega-menu a:hover { background: var(--bg-alt); color: var(--primary); }
.mega-menu-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  color: var(--primary);
  flex-shrink: 0;
}
.mega-menu-text { display: flex; flex-direction: column; }
.mega-menu-text span:first-child { font-weight: 600; }
.mega-menu-text span:last-child { font-size: 0.75rem; color: var(--text-light); }

/* Mobile Nav */
.nav-toggle {
  display: none;
  width: 32px;
  height: 32px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-main {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px 24px;
    gap: 8px;
    box-shadow: var(--shadow);
  }
  .nav-main.active { display: flex; }
  .mega-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding: 8px 0 8px 16px;
    min-width: auto;
  }
  .mega-menu.active { display: flex; flex-direction: column; }
}

/* ---------- Hero (Dark variant matching bizstackhk.com) ---------- */
.hero {
  text-align: center;
  padding: 80px 0 64px;
}
.hero-dark {
  background: var(--primary);
  color: #fff;
  min-height: 500px;
  display: flex;
  align-items: center;
  padding: 80px 0;
}
.hero-dark h1 {
  color: #fff;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  max-width: 800px;
  margin: 0 auto 20px;
}
.hero-dark p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto 36px;
}
.hero-highlight { color: #5DADE2; }
.hero-trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 100px;
  padding: 8px 20px;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 28px;
}
.hero-trust-check {
  color: var(--success);
  font-weight: 700;
}
.hero-search {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 560px;
  margin: 0 auto;
}
.hero-search-bar {
  position: relative;
  width: 100%;
}
.hero-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  pointer-events: none;
}
.hero-search-bar input {
  width: 100%;
  padding: 16px 16px 16px 48px;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 1.0625rem;
  font-family: inherit;
  outline: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  transition: box-shadow 0.2s;
}
.hero-search-bar input:focus {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), 0 0 0 3px rgba(93, 173, 226, 0.4);
}
.hero-search-bar input::placeholder { color: #999; }

@media (max-width: 768px) {
  .hero-dark { min-height: 400px; padding: 48px 0; }
  .hero-dark h1 { font-size: 1.625rem; }
  .hero-trust-badge { font-size: 0.75rem; padding: 6px 14px; }
}

/* ---------- Category Grid (4-column with descriptions) ---------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 28px 16px 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
  text-decoration: none;
  color: var(--text);
}
.category-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
  border-color: var(--accent);
  color: var(--primary);
}
.category-emoji {
  font-size: 2.5rem;
  line-height: 1;
  transition: transform 0.2s;
}
.category-card:hover .category-emoji { transform: scale(1.15); }
.category-name { font-weight: 600; font-size: 0.9375rem; line-height: 1.3; color: var(--text); }
.category-desc { font-size: 0.75rem; color: var(--text-light); line-height: 1.4; }

@media (max-width: 1024px) { .category-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .category-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Popular Comparisons (featured cards redesign) ---------- */
.popular-card {
  display: flex;
  flex-direction: column;
  padding: 28px 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: box-shadow 0.2s, transform 0.2s;
  position: relative;
}
.popular-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.popular-badge {
  position: absolute;
  top: -1px;
  right: 20px;
  background: var(--success);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 12px 6px;
  border-radius: 0 0 6px 6px;
}
.popular-card-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  margin-bottom: 4px;
}
.popular-card-category {
  font-size: 0.8125rem;
  color: var(--text-light);
  margin-bottom: 16px;
}
.popular-card-divider {
  height: 1px;
  background: var(--border);
  margin-bottom: 16px;
}
.popular-card-stats {
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
}
.popular-card-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.popular-card-stat-label {
  font-size: 0.6875rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.popular-card-stat-value {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}
.rating-value { color: var(--warning); }
.star-rating { color: #F59E0B; letter-spacing: 2px; }
.popular-card-best-for {
  font-size: 0.8125rem;
  color: var(--text-light);
  margin-bottom: 20px;
  flex-grow: 1;
}
.popular-card .btn { margin-top: auto; }

/* ---------- How It Works (emoji icons) ---------- */
.how-it-works {
  display: flex;
  justify-content: center;
  gap: 48px;
  text-align: center;
}
.how-step { max-width: 280px; }
.how-step-icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 16px;
}
.how-step h3 { color: var(--text); font-size: 1.0625rem; }
.how-step p { color: var(--text-light); font-size: 0.9375rem; }

@media (max-width: 768px) {
  .how-it-works { flex-direction: column; align-items: center; gap: 32px; }
}

/* ---------- Trust Bar (text-based brands) ---------- */
.trust-bar {
  text-align: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
  margin: -64px -24px;
  padding: 40px 24px;
}
.trust-bar h3 { color: var(--text-light); font-weight: 500; font-size: 0.875rem; margin-bottom: 20px; text-transform: uppercase; letter-spacing: 0.05em; }
.trust-brands {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.trust-brands span {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  opacity: 0.65;
}
.trust-dot {
  font-size: 1.5rem;
  opacity: 0.5 !important;
}
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--success);
  font-weight: 600;
  font-size: 0.875rem;
  background: #fff;
  padding: 6px 16px;
  border-radius: 100px;
  border: 1px solid var(--border);
}

/* ---------- Newsletter Signup (dark card variant) ---------- */
.newsletter { text-align: center; max-width: 520px; margin: 0 auto; }
.newsletter h2 { margin-bottom: 8px; }
.newsletter p { color: var(--text-light); margin-bottom: 24px; }
.newsletter-dark {
  background: var(--primary);
  color: #fff;
  border-radius: 20px;
  padding: 48px 40px;
  max-width: 640px;
}
.newsletter-dark h2 { color: #fff; }
.newsletter-dark p { color: rgba(255, 255, 255, 0.8); }
.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 440px;
  margin: 0 auto;
}
.newsletter-form input[type="email"] {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.newsletter-dark .newsletter-form input[type="email"]::placeholder { color: rgba(255, 255, 255, 0.5); }
.newsletter-dark .newsletter-form input[type="email"]:focus { border-color: var(--accent); background: rgba(255, 255, 255, 0.15); }
.newsletter-privacy { color: rgba(255, 255, 255, 0.7) !important; margin-top: 16px; }
@media (max-width: 480px) {
  .newsletter-form { flex-direction: column; }
  .newsletter-dark { padding: 32px 24px; }
}

/* ---------- Guide Cards (3-column, minimal) ---------- */
.guide-card {
  padding: 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: box-shadow 0.2s, transform 0.2s;
}
.guide-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.guide-card-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}
.guide-tag-guides, .guide-tag-guide { background: #E8F0FE; color: var(--primary); }
.guide-tag-comparison { background: #E0F2FE; color: var(--secondary); }
.guide-tag-versus { background: #E0F7FA; color: var(--accent); }
.guide-tag-business-banking { background: #E8F0FE; color: var(--primary); }
.guide-tag-payment-gateways { background: #E0F2FE; color: var(--secondary); }
.guide-tag-cross-border-payments { background: #E0F7FA; color: var(--accent); }
.guide-tag-virtual-banks { background: #F3E5F5; color: #7B1FA2; }
.guide-tag-company-formation { background: #E8F5E9; color: #2E7D32; }
.guide-tag-saas-tools { background: #FFF3E0; color: #E65100; }
.guide-card-date {
  display: block;
  font-size: 0.75rem;
  color: var(--text-light);
  margin-bottom: 8px;
}
.guide-card-title { font-size: 1rem; line-height: 1.4; margin-bottom: 0; }
.guide-card-title a { color: var(--text); }
.guide-card-title a:hover { color: var(--secondary); }

/* ---------- Post Card (fallback for other templates) ---------- */
.post-card { display: flex; flex-direction: column; }
.post-card .card-img { aspect-ratio: 16/10; }
.post-card .card-body { display: flex; flex-direction: column; flex-grow: 1; }
.post-card-meta {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.post-card-tag {
  background: var(--bg-alt);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  color: var(--primary);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.post-card h3 { font-size: 1.0625rem; margin-bottom: 8px; }
.post-card h3 a { color: var(--text); }
.post-card h3 a:hover { color: var(--primary); }
.post-card p { font-size: 0.875rem; color: var(--text-light); flex-grow: 1; }
.post-card .read-more {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 12px;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--primary); color: #fff; padding: 64px 0 32px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 48px;
}
.footer-brand p { color: rgba(255, 255, 255, 0.7); font-size: 0.875rem; margin-top: 12px; line-height: 1.6; }
.footer-social { display: flex; gap: 12px; margin-top: 16px; }
.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: background 0.2s;
}
.footer-social a:hover { background: var(--accent); color: #fff; }
.footer-col h4 { color: #fff; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 16px; }
.footer-col a { color: rgba(255, 255, 255, 0.7); font-size: 0.875rem; display: block; padding: 4px 0; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.7);
}
.footer-badges { display: flex; gap: 16px; }
.footer-badges span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* ---------- Comparison Table ---------- */
.comparison-table-wrap { overflow-x: auto; margin: 0 0 36px; -webkit-overflow-scrolling: touch; }
.comparison-table {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.875rem;
}
.comparison-table thead tr { background: var(--primary); }
.comparison-table th {
  padding: 14px 16px;
  text-align: left;
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
}
.comparison-table td { padding: 14px 16px; color: var(--text); vertical-align: middle; }
.comparison-table tbody tr { border-bottom: 1px solid var(--border); }
.comparison-table tbody tr:nth-child(even) { background: var(--bg-alt); }
.comparison-table tbody tr:hover { background: #EBF5FB; }
.comparison-table .provider-name { font-weight: 700; }
.comparison-table .provider-sub { font-size: 0.75rem; color: var(--text-light); }

/* ---------- FAQ Accordion ---------- */
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-question {
  width: 100%;
  text-align: left;
  padding: 18px 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
}
.faq-question::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--text-light);
  flex-shrink: 0;
  transition: transform 0.2s;
}
.faq-item.active .faq-question::after { content: '\2212'; }
.faq-answer {
  display: none;
  padding: 0 0 18px;
  font-size: 0.9375rem;
  color: var(--text-light);
  line-height: 1.7;
}
.faq-item.active .faq-answer { display: block; }

/* ---------- Pros / Cons ---------- */
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 24px 0; }
.pros-box, .cons-box { padding: 20px; border-radius: var(--radius); }
.pros-box { background: #E8F8F0; border: 1px solid #A3D9B1; }
.cons-box { background: #FDEDEC; border: 1px solid #F5B7B1; }
.pros-box h4 { color: var(--success); }
.cons-box h4 { color: var(--danger); }
.pros-box ul, .cons-box ul { padding-left: 20px; list-style: disc; margin-top: 12px; font-size: 0.9375rem; }
.pros-box li, .cons-box li { margin-bottom: 6px; }
@media (max-width: 600px) { .pros-cons { grid-template-columns: 1fr; } }

/* ---------- Affiliate Disclosure ---------- */
.affiliate-disclosure {
  background: #FFF8E1;
  border: 1px solid #FFE082;
  border-radius: var(--radius);
  padding: 14px 20px;
  margin: 0 0 32px;
  font-size: 0.8125rem;
  color: #5D4037;
  line-height: 1.6;
}
.affiliate-disclosure a { color: var(--primary); font-weight: 600; }

/* ---------- Top Picks Box ---------- */
.top-picks {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 12px;
  padding: 24px 28px;
  margin: 0 0 36px;
  color: #fff;
}
.top-picks h3 { color: #fff; font-size: 1.25rem; margin-bottom: 18px; }
.top-picks-item { margin-bottom: 12px; font-size: 0.9375rem; }
.top-picks-item:last-child { margin-bottom: 0; }
.top-picks-item strong { font-weight: 700; }

/* ---------- Product Review Card ---------- */
.review-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: start;
}
.review-card-logo {
  width: 60px;
  height: 60px;
  border-radius: var(--radius);
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
}
.review-card-info h3 { margin-bottom: 4px; }
.review-card-features { margin-top: 12px; padding-left: 18px; list-style: disc; font-size: 0.875rem; }
.review-card-features li { margin-bottom: 4px; }
.review-card-action { text-align: center; }
.review-card-action .rating-badge { display: block; margin-bottom: 12px; font-size: 1.25rem; padding: 6px 16px; }
@media (max-width: 600px) {
  .review-card { grid-template-columns: 1fr; }
}

/* ---------- Rating Badge ---------- */
.rating-badge {
  display: inline-block;
  background: var(--success);
  color: #fff;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 0.8125rem;
  font-weight: 700;
}

/* ---------- Guide / Article Content ---------- */
.post-content { max-width: 720px; margin: 0 auto; }
.post-content h2 { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); }
.post-content h2:first-child { margin-top: 0; border-top: none; padding-top: 0; }
.post-content h3 { margin-top: 32px; }
.post-content p { font-size: 1.0625rem; line-height: 1.75; }
.post-content ul, .post-content ol { padding-left: 24px; margin-bottom: 1rem; list-style: disc; }
.post-content ol { list-style: decimal; }
.post-content li { margin-bottom: 8px; font-size: 1.0625rem; line-height: 1.65; }
.post-content blockquote {
  border-left: 4px solid var(--accent);
  padding: 16px 20px;
  margin: 24px 0;
  background: var(--bg-alt);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text-light);
}
.post-content code {
  background: var(--bg-alt);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.875em;
}
.post-content pre {
  background: #1a1a2e;
  color: #e0e0e0;
  padding: 20px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 24px 0;
}
.post-content img { border-radius: var(--radius); margin: 24px 0; }

/* ---------- Post Content Tables (Clean Comparison Design) ---------- */
.post-content .table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 24px 0 32px;
}
.post-content table {
  width: 100%;
  background: white;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.875rem;
}
.post-content table th,
.post-content table td {
  border: none;
}
.post-content thead tr {
  border-bottom: 1px solid #e5e7eb;
}
.post-content thead th {
  text-align: left;
  padding: 16px;
  font-size: 0.875rem;
  font-weight: 700;
  color: #1B2E4B;
  background: white;
}
.post-content tbody tr {
  border-bottom: 1px solid #f3f4f6;
}
.post-content tbody tr:last-child {
  border-bottom: none;
}
.post-content tbody tr:hover {
  background: rgba(249, 250, 251, 0.5);
}
.post-content tbody td {
  padding: 16px;
  font-size: 0.875rem;
  color: #374151;
  vertical-align: middle;
}

/* Rating cells: orange for star ratings */
.post-content table td .rating,
.post-content table td .stars {
  color: #E67E22;
  font-weight: 600;
}

/* ---------- CTA Button (Green, pill style) ---------- */
.btn-cta-green,
.btn-register {
  background: #1B6B4A;
  color: #fff;
  padding: 8px 20px;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  white-space: nowrap;
  transition: background 0.2s;
  border: none;
  cursor: pointer;
  line-height: 1.4;
}
.btn-cta-green:hover,
.btn-register:hover {
  background: #155A3E;
  color: #fff;
}

/* Mobile responsive table wrapper */
@media (max-width: 768px) {
  .post-content .table-responsive {
    margin: 16px -24px 24px;
    padding: 0 24px;
  }
  .post-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .post-content thead th {
    white-space: nowrap;
  }
  .post-content thead th {
    padding: 12px;
    font-size: 0.8125rem;
  }
  .post-content tbody td {
    padding: 12px;
    font-size: 0.8125rem;
  }
}

/* ---------- Table of Contents ---------- */
.toc {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 36px;
}
.toc h4 { margin-bottom: 12px; color: var(--text); font-size: 0.9375rem; }
.toc ul { padding-left: 16px; list-style: none; }
.toc li { margin-bottom: 6px; }
.toc a { color: var(--secondary); font-size: 0.9375rem; }
.toc a:hover { color: var(--primary); }
.toc .toc-h3 { padding-left: 16px; }

/* ---------- Author Bio ---------- */
.author-bio {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 32px 0;
}
.author-bio img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.author-bio-text { font-size: 0.875rem; }
.author-bio-text strong { font-size: 0.9375rem; display: block; margin-bottom: 2px; }
.author-bio-text span { color: var(--text-light); }

/* ---------- Related Posts ---------- */
.related-posts { margin-top: 48px; padding-top: 48px; border-top: 1px solid var(--border); }
.related-posts h2 { margin-bottom: 24px; }

/* ---------- Error Page ---------- */
.error-page {
  text-align: center;
  padding: 120px 24px;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.error-code { font-size: 6rem; font-weight: 700; color: var(--primary); opacity: 0.3; line-height: 1; }
.error-page h1 { margin-top: 16px; font-size: 1.5rem; }
.error-page p { color: var(--text-light); margin-bottom: 24px; }

/* ---------- Post Header ---------- */
.post-header { text-align: center; padding: 48px 0 32px; max-width: 720px; margin: 0 auto; }
.post-header h1 { font-size: 2.25rem; }
.post-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--text-light);
  font-size: 0.875rem;
  margin-top: 16px;
}
.post-meta time { display: flex; align-items: center; gap: 4px; }
.post-featured-image { max-width: 960px; margin: 0 auto 40px; border-radius: var(--radius); overflow: hidden; }
.post-featured-image img { width: 100%; }

/* ---------- Versus Template ---------- */
.versus-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
  text-align: center;
  padding: 32px 0;
}
.versus-vs {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text-light);
}
.verdict-box {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 0 0 36px;
  text-align: center;
}
.verdict-box h3 { color: #fff; margin-bottom: 8px; }
.verdict-box p { margin: 0; opacity: 0.9; }

/* ---------- Utility ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

/* ---------- Ghost Koenig Editor Width Classes ---------- */
.kg-width-wide {
  position: relative;
  width: 85vw;
  min-width: 100%;
  margin: auto calc(50% - 42.5vw);
}
.kg-width-full {
  position: relative;
  width: 100vw;
  min-width: 100%;
  margin: auto calc(50% - 50vw);
}
.kg-width-full img,
.kg-width-wide img {
  max-width: 100%;
}

/* ==========================================================================
   Category / Comparison Page Components
   ========================================================================== */

/* ---------- Top Picks Section (dark gradient container) ---------- */
.top-picks-section {
  background: linear-gradient(to bottom, #1B2E4B, #243B5C);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 40px;
}
.top-picks-section h2 {
  color: white;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.top-picks-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* ---------- Top Pick Cards (white cards inside dark container) ---------- */
.top-pick-card {
  background: white;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: box-shadow 0.2s;
}
.top-pick-card:hover {
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}
.top-pick-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.top-pick-card-name {
  font-weight: 700;
  font-size: 1rem;
  color: #1B2E4B;
}
.top-pick-card-label {
  font-size: 0.75rem;
  color: #6b7280;
  margin-bottom: 8px;
}
.top-pick-card-features {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}
.top-pick-card-features li {
  font-size: 0.8125rem;
  color: #374151;
  padding: 2px 0;
}
.top-pick-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
}

/* ---------- Provider Abbreviation Circles ---------- */
.provider-abbrev {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #1B2E4B;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
}
.provider-abbrev-green { background: #1B6B4A; }
.provider-abbrev-blue { background: #2563EB; }
.provider-abbrev-purple { background: #7C3AED; }
.provider-abbrev-orange { background: #EA580C; }

/* ---------- Category Filter Bar (SaaS tools page) ---------- */
.category-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}
.category-filter-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 150px;
  height: 90px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: white;
  color: #4b5563;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
  text-decoration: none;
}
.category-filter-btn:hover {
  border-color: #d1d5db;
  background: #f9fafb;
  color: #4b5563;
}
.category-filter-btn.active {
  border-color: #1B6B4A;
  background: #f0fdf4;
  color: #1B6B4A;
}
.category-filter-btn .filter-icon {
  font-size: 1.5rem;
  line-height: 1;
}

/* ---------- Tool Cards (SaaS browse view) ---------- */
.tool-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.tool-card {
  background: white;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: box-shadow 0.2s;
}
.tool-card:hover {
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}
.tool-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.tool-card-name {
  font-weight: 700;
  font-size: 1rem;
  color: #1B2E4B;
}
.tool-card-desc {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 16px;
  line-height: 1.5;
}
.tool-card-features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.tool-card .feature-pill {
  background: #f3f4f6;
  color: #374151;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
}
.tool-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #f3f4f6;
}
.tool-card-price {
  font-size: 0.875rem;
  color: #6b7280;
}
.tool-card-price strong {
  color: #1B2E4B;
  font-size: 1rem;
}

/* ---------- Mobile Responsive: Category/Comparison Components ---------- */
@media (max-width: 768px) {
  .top-picks-grid {
    grid-template-columns: 1fr;
  }
  .top-picks-section {
    padding: 16px;
    margin-bottom: 24px;
  }
  .tool-cards-grid {
    grid-template-columns: 1fr;
  }
  .category-filter-bar {
    gap: 8px;
  }
  .category-filter-btn {
    width: 120px;
    height: 76px;
    font-size: 0.8125rem;
  }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .top-picks-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .tool-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- Directory Hero (SaaS Tools page) ---------- */
.directory-hero {
  background: #1B2E4B;
  border-radius: 16px;
  padding: 56px 32px 64px;
  margin-bottom: 40px;
}
.directory-hero-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  margin-bottom: 32px;
}
.directory-hero-breadcrumb a {
  color: #d1d5db;
  text-decoration: none;
  transition: color 0.2s;
}
.directory-hero-breadcrumb a:hover {
  color: white;
}
.directory-hero-breadcrumb .sep {
  color: #9ca3af;
}
.directory-hero-breadcrumb .current {
  color: #d1d5db;
}
.directory-hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: 16px;
  line-height: 1.15;
}
.directory-hero p {
  color: #d1d5db;
  font-size: 1.0625rem;
  max-width: 640px;
  margin-bottom: 32px;
  line-height: 1.6;
}
.directory-hero-search {
  max-width: 720px;
  position: relative;
}
.directory-hero-search-inner {
  display: flex;
  align-items: center;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}
.directory-hero-search-icon {
  padding: 0 12px 0 20px;
  color: #9ca3af;
  display: flex;
  align-items: center;
}
.directory-hero-search-inner input {
  flex: 1;
  padding: 16px 16px 16px 0;
  border: none;
  outline: none;
  font-size: 1rem;
  color: #374151;
  background: transparent;
  font-family: inherit;
}
.directory-hero-search-inner input::placeholder {
  color: #9ca3af;
}
@media (max-width: 768px) {
  .directory-hero {
    padding: 32px 20px 40px;
  }
  .directory-hero h1 {
    font-size: 1.75rem;
  }
  .directory-hero p {
    font-size: 0.9375rem;
  }
}

/* ---------- SaaS Directory Extras ---------- */
.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1B2E4B;
  margin-bottom: 20px;
}
.directory-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding: 12px 0;
  border-bottom: 1px solid #e5e7eb;
}
#tool-count {
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 500;
}
.tool-card { text-decoration: none; }
.tool-card-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}
.tool-card-rating .stars {
  color: #F59E0B;
  font-size: 0.8125rem;
  letter-spacing: 1px;
}
.tool-card-rating .review-count {
  font-size: 0.75rem;
  color: #9ca3af;
}
.tool-card-region {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
  background: #f0f9ff;
  color: #0369a1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.tool-card-cta {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #2563EB;
}
.tool-card.hidden { display: none; }
.category-filter-btn .filter-icon svg {
  width: 24px;
  height: 24px;
}

/* ---------- Clickable Guide Cards ---------- */
a.guide-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}
a.guide-card-link:hover {
  color: inherit;
}
a.guide-card-link:hover .guide-card-title {
  color: var(--secondary);
}

/* ---------- Mobile: Fix inline-styled 3-col grids in post content ---------- */
@media (max-width: 768px) {
  .post-content div[style*="grid-template-columns:repeat(3"] {
    grid-template-columns: 1fr !important;
  }
  .post-content div[style*="grid-template-columns: repeat(3"] {
    grid-template-columns: 1fr !important;
  }
}
