/* Convert & Count - Guides Knowledge Hub Modern Styles */

.guides-hub {
  padding: 40px 0 70px;
}

.guides-hero {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 42px;
}

.hub-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 18px;
  border: 1px solid #dbeafe;
}

.hub-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3b82f6;
}

.guides-hero h1 {
  font-size: clamp(34px, 4.5vw, 48px);
  line-height: 1.15;
  letter-spacing: -0.04em;
  color: #0f172a;
  margin-bottom: 14px;
}

.guides-hero p {
  font-size: 16.5px;
  line-height: 1.6;
  color: #64748b;
  margin: 0 auto;
}

/* Search & Filter Bar */
.guides-controls {
  max-width: 880px;
  margin: 0 auto 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.guides-search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.guides-search-box .search-icon {
  position: absolute;
  left: 18px;
  width: 18px;
  height: 18px;
  color: #94a3b8;
  pointer-events: none;
}

.guides-search-input {
  width: 100%;
  font-size: 15px;
  padding: 13px 44px 13px 48px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  transition: all 0.2s ease;
  outline: none;
}

.guides-search-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15), 0 4px 12px rgba(15, 23, 42, 0.05);
}

.guides-search-clear {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}

.guides-search-clear:hover {
  color: #475569;
}

/* Category Filter Tabs */
.guides-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.filter-tab {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 15px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.filter-tab:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

.filter-tab.is-active {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
}

/* Featured Guide Spotlight */
.featured-guide-card {
  background: linear-gradient(135deg, #f8fafc 0%, #edf4ff 100%);
  border: 1px solid #dbeafe;
  border-radius: 20px;
  padding: 32px 36px;
  margin-bottom: 38px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.04);
}

.featured-guide-card:hover {
  border-color: #bfdbfe;
  box-shadow: 0 12px 28px -6px rgba(37, 99, 235, 0.1);
  transform: translateY(-2px);
}

.featured-top-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.featured-pill {
  background: #3b82f6;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 6px;
}

.guide-read-time {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

.featured-guide-card h2 {
  font-size: clamp(22px, 2.5vw, 28px);
  line-height: 1.3;
  margin: 0;
}

.featured-guide-card h2 a {
  color: #0f172a;
  text-decoration: none;
}

.featured-guide-card h2 a:hover {
  color: #2563eb;
}

.featured-guide-card p {
  font-size: 15px;
  line-height: 1.65;
  color: #475569;
  max-width: 820px;
  margin: 0;
}

.featured-cta {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: #2563eb;
  text-decoration: none;
}

.featured-cta:hover {
  color: #1d4ed8;
  gap: 10px;
}

.featured-cta .arrow {
  transition: transform 0.2s ease;
}

.featured-guide-card:hover .featured-cta .arrow {
  transform: translateX(4px);
}

/* Modern Guides Grid */
.modern-guide-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.guide-card-modern {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  text-decoration: none;
}

.guide-card-modern:hover {
  transform: translateY(-4px);
  border-color: #cbd5e1;
  box-shadow: 0 10px 24px -5px rgba(15, 23, 42, 0.08);
}

.guide-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 8px;
}

/* Category Badges */
.cat-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: 6px;
}

.cat-badge.math { background: #eff6ff; color: #1d4ed8; border: 1px solid #dbeafe; }
.cat-badge.finance { background: #ecfdf5; color: #047857; border: 1px solid #d1fae5; }
.cat-badge.stats { background: #faf5ff; color: #7e22ce; border: 1px solid #f3e8ff; }
.cat-badge.algebra { background: #fffbeb; color: #b45309; border: 1px solid #fef3c7; }
.cat-badge.geometry { background: #f0fdfa; color: #0f766e; border: 1px solid #ccfbf1; }
.cat-badge.conversions { background: #fdf2f8; color: #be185d; border: 1px solid #fce7f3; }

.guide-card-modern h3 {
  font-size: 18px;
  line-height: 1.38;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.guide-card-modern h3 a {
  color: #0f172a;
  text-decoration: none;
  transition: color 0.15s ease;
}

.guide-card-modern:hover h3 a {
  color: #2563eb;
}

.guide-card-modern p {
  font-size: 13.5px;
  line-height: 1.6;
  color: #64748b;
  margin: 0 0 18px;
  flex: 1;
}

.guide-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #f1f5f9;
  padding-top: 14px;
  margin-top: auto;
}

.guide-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 700;
  color: #2563eb;
  transition: gap 0.15s ease;
}

.guide-card-modern:hover .guide-link-btn {
  gap: 8px;
  color: #1d4ed8;
}

/* Empty Search State */
.guides-empty-state {
  text-align: center;
  padding: 48px 20px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  margin-top: 16px;
}

.guides-empty-state h3 {
  font-size: 18px;
  color: #1e293b;
  margin-bottom: 6px;
}

.guides-empty-state p {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 16px;
}

/* Individual Guide Page Styling */
.guide-article {
  max-width: 800px;
  margin: 0 auto;
  padding: 30px 0 60px;
}

.guide-formula-box {
  background: #f8fafc;
  border-left: 4px solid #3b82f6;
  border-radius: 0 12px 12px 0;
  padding: 18px 22px;
  margin: 22px 0;
}

.guide-formula-box strong {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #3b82f6;
  margin-bottom: 6px;
}

.guide-formula-box .formula-math {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
}

.guide-example-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 22px 24px;
  margin: 24px 0;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
}

.guide-example-box .eyebrow {
  color: #059669;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.guide-example-box h4 {
  font-size: 16px;
  margin-bottom: 10px;
  color: #0f172a;
}

.guide-tools-strip {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 22px 24px;
  margin: 32px 0;
}

.guide-tools-strip h3 {
  font-size: 15px;
  margin-bottom: 12px;
  color: #0f172a;
}

.guide-tools-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.guide-tool-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  text-decoration: none;
  transition: all 0.15s ease;
}

.guide-tool-pill:hover {
  border-color: #3b82f6;
  color: #2563eb;
  transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 900px) {
  .modern-guide-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .modern-guide-grid {
    grid-template-columns: 1fr;
  }
  .featured-guide-card {
    padding: 22px 20px;
  }
  .guides-filter-tabs {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 6px;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .filter-tab {
    flex-shrink: 0;
  }
}

/* --- Dark Theme Support for Guides Hub & Articles --- */
[data-theme="dark"] .guides-hero h1 {
  color: #ffffff;
}

[data-theme="dark"] .guides-hero p {
  color: #94a3b8;
}

[data-theme="dark"] .hub-badge {
  background: #16264c;
  border-color: #263c70;
  color: #93c5fd;
}

[data-theme="dark"] .hub-badge .dot {
  background: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

[data-theme="dark"] .guides-search-input {
  background: #101c38;
  border-color: #26385d;
  color: #f1f5f9;
  box-shadow: none;
}

[data-theme="dark"] .guides-search-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

[data-theme="dark"] .guides-search-box .search-icon {
  color: #64748b;
}

[data-theme="dark"] .guides-search-clear {
  color: #94a3b8;
}

[data-theme="dark"] .guides-search-clear:hover {
  color: #ffffff;
}

[data-theme="dark"] .filter-tab {
  background: #142240;
  border-color: #26385d;
  color: #94a3b8;
}

[data-theme="dark"] .filter-tab:hover {
  background: #1e3158;
  border-color: #3b82f6;
  color: #ffffff;
}

[data-theme="dark"] .filter-tab.is-active {
  background: var(--blue, #3b82f6);
  border-color: var(--blue, #3b82f6);
  color: #ffffff;
}

[data-theme="dark"] .featured-guide-card {
  background: linear-gradient(135deg, #132247 0%, #162955 100%);
  border-color: #2b4277;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .featured-guide-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
}

[data-theme="dark"] .featured-guide-card h2 a {
  color: #ffffff;
}

[data-theme="dark"] .featured-guide-card h2 a:hover {
  color: #60a5fa;
}

[data-theme="dark"] .featured-guide-card p {
  color: #94a3b8;
}

[data-theme="dark"] .guide-read-time {
  color: #94a3b8;
}

[data-theme="dark"] .featured-cta {
  color: #60a5fa;
}

[data-theme="dark"] .guide-card-modern {
  background: var(--white, #131f38);
  border-color: var(--line, #223253);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .guide-card-modern:hover {
  border-color: #3b82f6;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .guide-card-modern h3 a {
  color: #ffffff;
}

[data-theme="dark"] .guide-card-modern h3 a:hover {
  color: #60a5fa;
}

[data-theme="dark"] .guide-card-modern p {
  color: #94a3b8;
}

[data-theme="dark"] .guide-card-foot {
  border-top-color: var(--line, #223253);
}

[data-theme="dark"] .guide-link-btn {
  color: #60a5fa;
}

[data-theme="dark"] .guide-card-modern:hover .guide-link-btn {
  color: #93c5fd;
}

[data-theme="dark"] .guides-empty-state {
  background: #101c38;
  border-color: #26385d;
}

[data-theme="dark"] .guides-empty-state h3 {
  color: #ffffff;
}

[data-theme="dark"] .guides-empty-state p {
  color: #94a3b8;
}

/* Category Badges in Dark Mode */
[data-theme="dark"] .cat-badge.math { background: #16264c; color: #93c5fd; border-color: #263c70; }
[data-theme="dark"] .cat-badge.finance { background: #133327; color: #6ee7b7; border-color: #1b4d3a; }
[data-theme="dark"] .cat-badge.stats { background: #261f4a; color: #d8b4fe; border-color: #3f2f77; }
[data-theme="dark"] .cat-badge.algebra { background: #3a2518; color: #fcd34d; border-color: #5c3b24; }
[data-theme="dark"] .cat-badge.geometry { background: #123330; color: #5eead4; border-color: #1a4d48; }
[data-theme="dark"] .cat-badge.conversions { background: #3b1b2f; color: #f9a8d4; border-color: #5d2b4b; }

/* Individual Guide Page in Dark Mode */
[data-theme="dark"] .guide-formula-box {
  background: #101c38;
  border-left-color: #3b82f6;
}

[data-theme="dark"] .guide-formula-box .formula-math {
  color: #93c5fd;
}

[data-theme="dark"] .guide-example-box {
  background: var(--white, #131f38);
  border-color: var(--line, #223253);
}

[data-theme="dark"] .guide-example-box h4 {
  color: #ffffff;
}

[data-theme="dark"] .guide-example-box p {
  color: #cbd5e1;
}

[data-theme="dark"] .guide-tools-strip {
  background: #101c38;
  border-color: var(--line, #223253);
}

[data-theme="dark"] .guide-tools-strip h3 {
  color: #ffffff;
}

[data-theme="dark"] .guide-tool-pill {
  background: #142240;
  border-color: #26385d;
  color: #cbd5e1;
}

[data-theme="dark"] .guide-tool-pill:hover {
  border-color: #3b82f6;
  color: #60a5fa;
}

