/*
Theme Name: JeepDTC Pro
Theme URI: https://jeepdtc.com
Author: JeepDTC
Description: Exact replica of jeepdtc.com built for WordPress + Elementor
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
License: Private
Text Domain: jeepdtc
*/

/* ============================================
   DESIGN TOKENS (matching Horizons source)
============================================ */
:root {
  --background: #ffffff;
  --foreground: #0a0f1e;
  --card: #ffffff;
  --card-foreground: #0a0f1e;
  --muted: #f1f5f9;
  --muted-foreground: #64748b;
  --primary: #0f172a;
  --primary-foreground: #f8fafc;
  --border: #e2e8f0;
  --input: #e2e8f0;
  --radius: 0.75rem;
  --orange: #f97316;
  --blue: #3b82f6;
  --purple: #a855f7;
  --emerald: #10b981;
  --destructive: #ef4444;
  --warning: #eab308;
  --font-main: 'Outfit', sans-serif;
}

/* ============================================
   BASE RESET & TYPOGRAPHY
============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-family: var(--font-main);
}

body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-main);
  font-weight: 700;
  line-height: 1.2;
  text-wrap: balance;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

/* ============================================
   LAYOUT
============================================ */
.jdtc-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 640px) { .jdtc-container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .jdtc-container { padding: 0 2rem; } }

/* ============================================
   HEADER
============================================ */
.jdtc-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.jdtc-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.jdtc-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--foreground);
}

.jdtc-logo-icon {
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.jdtc-logo-icon svg { width: 20px; height: 20px; }
.jdtc-logo span { color: var(--primary); }

.jdtc-nav {
  display: none;
  align-items: center;
  gap: 24px;
}

@media (min-width: 768px) { .jdtc-nav { display: flex; } }

.jdtc-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  transition: color 0.2s;
}

.jdtc-nav a:hover,
.jdtc-nav a.active { color: var(--primary); }

.jdtc-header-actions { display: flex; align-items: center; gap: 8px; }

.jdtc-icon-btn {
  width: 36px; height: 36px;
  border-radius: 8px;
  border: none;
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--muted-foreground);
  transition: background 0.2s, color 0.2s;
}
.jdtc-icon-btn:hover { background: var(--muted); color: var(--foreground); }
.jdtc-icon-btn svg { width: 20px; height: 20px; }

/* Mobile menu */
.jdtc-mobile-menu-btn { display: flex; }
@media (min-width: 768px) { .jdtc-mobile-menu-btn { display: none; } }

.jdtc-mobile-nav {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--background);
  padding: 8px 16px 24px;
}
.jdtc-mobile-nav.open { display: block; }
.jdtc-mobile-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--muted-foreground);
  transition: background 0.2s, color 0.2s;
}
.jdtc-mobile-nav a:hover { background: var(--muted); color: var(--foreground); }
.jdtc-mobile-nav a.active { background: rgba(15,23,42,0.08); color: var(--primary); }

/* ============================================
   FOOTER
============================================ */
.jdtc-footer {
  background: var(--muted);
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
}

.jdtc-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

@media (min-width: 768px) {
  .jdtc-footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
}

.jdtc-footer-brand p {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  line-height: 1.7;
  margin: 16px 0 24px;
}

.jdtc-footer-socials { display: flex; gap: 16px; }
.jdtc-footer-socials a {
  color: var(--muted-foreground);
  transition: color 0.2s;
}
.jdtc-footer-socials a:hover { color: var(--foreground); }
.jdtc-footer-socials svg { width: 20px; height: 20px; }

.jdtc-footer-col h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 16px;
}

.jdtc-footer-col ul { list-style: none; }
.jdtc-footer-col ul li + li { margin-top: 12px; }
.jdtc-footer-col ul a {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  transition: color 0.2s;
}
.jdtc-footer-col ul a:hover { color: var(--primary); }

.jdtc-footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}
@media (min-width: 768px) { .jdtc-footer-bottom { flex-direction: row; } }

.jdtc-footer-bottom p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* ============================================
   BUTTONS
============================================ */
.jdtc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: var(--font-main);
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}

.jdtc-btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}
.jdtc-btn-primary:hover { background: #1e293b; }

.jdtc-btn-outline {
  background: transparent;
  color: var(--foreground);
  border-color: var(--border);
}
.jdtc-btn-outline:hover { background: var(--muted); }

.jdtc-btn-lg { padding: 14px 32px; font-size: 1rem; border-radius: 12px; }
.jdtc-btn-sm { padding: 6px 14px; font-size: 0.8125rem; }

/* ============================================
   BADGES
============================================ */
.jdtc-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
}
.jdtc-badge-critical { background: var(--destructive); color: #fff; }
.jdtc-badge-warning  { background: var(--warning); color: #fff; }
.jdtc-badge-high     { background: #ea580c; color: #fff; }
.jdtc-badge-moderate { background: #d97706; color: #fff; }
.jdtc-badge-safe     { background: var(--emerald); color: #fff; }
.jdtc-badge-info     { background: var(--blue); color: #fff; }

/* ============================================
   SEARCH BAR
============================================ */
.jdtc-search-wrap {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
}

.jdtc-search-wrap svg.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px; height: 20px;
  color: var(--muted-foreground);
  pointer-events: none;
}

.jdtc-search-input {
  width: 100%;
  height: 56px;
  padding: 0 120px 0 52px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  font-size: 1rem;
  font-family: var(--font-main);
  background: var(--background);
  color: var(--foreground);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.jdtc-search-input::placeholder { color: var(--muted-foreground); }
.jdtc-search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15,23,42,0.08);
}

.jdtc-search-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary);
  color: var(--primary-foreground);
  border: none;
  border-radius: 10px;
  padding: 8px 18px;
  font-weight: 600;
  font-family: var(--font-main);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s;
  height: 44px;
}
.jdtc-search-btn:hover { background: #1e293b; }

/* ============================================
   HERO SECTION
============================================ */
.jdtc-hero {
  position: relative;
  padding: 96px 0 128px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: var(--background);
  text-align: center;
}

.jdtc-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top, rgba(15,23,42,0.06) 0%, transparent 70%);
  z-index: 0;
}

.jdtc-hero-inner { position: relative; z-index: 1; }

.jdtc-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--muted);
  border: 1px solid var(--border);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  margin-bottom: 32px;
}
.jdtc-hero-pill svg { width: 16px; height: 16px; color: var(--primary); }

.jdtc-hero h1 {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--foreground);
  margin-bottom: 24px;
  line-height: 1.05;
}

.jdtc-hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, rgba(15,23,42,0.5) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.jdtc-hero p {
  font-size: 1.25rem;
  color: var(--muted-foreground);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.jdtc-hero-popular {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  align-items: center;
}

.jdtc-hero-popular a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: opacity 0.2s;
}
.jdtc-hero-popular a:hover { opacity: 0.7; }

/* ============================================
   CODE CARDS (Premium)
============================================ */
.jdtc-code-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.jdtc-code-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.1);
  border-color: rgba(15,23,42,0.15);
}

.jdtc-code-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.jdtc-code-num {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--primary);
}

.jdtc-code-system {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted-foreground);
  margin-top: 2px;
}

.jdtc-code-type {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted-foreground);
  background: var(--muted);
  padding: 3px 10px;
  border-radius: 999px;
}

.jdtc-code-desc {
  font-size: 0.9375rem;
  color: var(--muted-foreground);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.jdtc-code-arrow {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: 4px;
}
.jdtc-code-arrow svg { width: 16px; height: 16px; transition: transform 0.2s; }
.jdtc-code-card:hover .jdtc-code-arrow svg { transform: translateX(4px); }

/* ============================================
   CATEGORY CARDS
============================================ */
.jdtc-cat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 768px) { .jdtc-cat-grid { grid-template-columns: 1fr 1fr; } }

.jdtc-cat-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.jdtc-cat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.jdtc-cat-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.jdtc-cat-icon {
  width: 64px; height: 64px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
}
.jdtc-cat-icon svg { width: 32px; height: 32px; }
.jdtc-cat-icon.orange { background: rgba(249,115,22,0.1); color: #f97316; border: 1px solid rgba(249,115,22,0.2); }
.jdtc-cat-icon.blue   { background: rgba(59,130,246,0.1); color: #3b82f6; border: 1px solid rgba(59,130,246,0.2); }
.jdtc-cat-icon.purple { background: rgba(168,85,247,0.1); color: #a855f7; border: 1px solid rgba(168,85,247,0.2); }
.jdtc-cat-icon.emerald{ background: rgba(16,185,129,0.1); color: #10b981; border: 1px solid rgba(16,185,129,0.2); }

.jdtc-cat-prefix {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-foreground);
  transition: color 0.2s;
}
.jdtc-cat-card:hover .jdtc-cat-prefix { color: var(--primary); }

.jdtc-cat-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
  transition: color 0.2s;
}
.jdtc-cat-card:hover h3 { color: var(--primary); }

.jdtc-cat-card p {
  font-size: 0.9375rem;
  color: var(--muted-foreground);
  line-height: 1.7;
  flex: 1;
  margin-bottom: 32px;
}

.jdtc-cat-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--primary);
  font-size: 0.9375rem;
}
.jdtc-cat-link svg { width: 16px; height: 16px; transition: transform 0.2s; }
.jdtc-cat-card:hover .jdtc-cat-link svg { transform: translateX(4px); }

/* ============================================
   SECTION HEADERS
============================================ */
.jdtc-section { padding: 96px 0; }
.jdtc-section-muted { background: rgba(241,245,249,0.5); }
.jdtc-section-border { border-bottom: 1px solid rgba(226,232,240,0.5); }

.jdtc-section-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 48px;
}
@media (min-width: 768px) {
  .jdtc-section-head { flex-direction: row; align-items: flex-end; justify-content: space-between; }
}

.jdtc-section-head-center { text-align: center; align-items: center; justify-content: center; }
.jdtc-section-head-center * { text-align: center; }

.jdtc-section-head h2 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.jdtc-section-head p {
  font-size: 1.0625rem;
  color: var(--muted-foreground);
  max-width: 540px;
  line-height: 1.7;
}

/* ============================================
   CODES GRID
============================================ */
.jdtc-codes-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 640px) { .jdtc-codes-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .jdtc-codes-grid { grid-template-columns: repeat(3, 1fr); } }

/* ============================================
   CODE DETAIL PAGE
============================================ */
.jdtc-code-hero {
  background: var(--muted);
  border-bottom: 1px solid var(--border);
  padding: 48px 0 64px;
}

.jdtc-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  margin-bottom: 24px;
  transition: color 0.2s;
  cursor: pointer;
  background: none;
  border: none;
}
.jdtc-back-btn:hover { color: var(--foreground); }
.jdtc-back-btn svg { width: 16px; height: 16px; }

.jdtc-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  margin-bottom: 24px;
}
.jdtc-breadcrumb a { transition: color 0.2s; }
.jdtc-breadcrumb a:hover { color: var(--primary); }
.jdtc-breadcrumb svg { width: 12px; height: 12px; }

.jdtc-code-header-top {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
@media (min-width: 768px) { .jdtc-code-header-top { flex-direction: row; align-items: flex-start; justify-content: space-between; } }

.jdtc-code-title-area {}

.jdtc-code-title-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.jdtc-code-big {
  font-size: clamp(3rem, 8vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--primary);
}

.jdtc-code-detail-h1 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 700;
  max-width: 600px;
  line-height: 1.35;
}

.jdtc-code-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.jdtc-meta-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--foreground);
}
.jdtc-meta-chip svg { width: 14px; height: 14px; color: var(--muted-foreground); }

/* ============================================
   CODE DETAIL CONTENT LAYOUT
============================================ */
.jdtc-code-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding: 48px 0;
}
@media (min-width: 1024px) { .jdtc-code-layout { grid-template-columns: 1fr 320px; } }

.jdtc-code-main {}

.jdtc-code-sidebar {}

.jdtc-content-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 24px;
}

.jdtc-content-card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.jdtc-content-card h2 svg { width: 20px; height: 20px; color: var(--primary); }

.jdtc-content-card .content-body {
  font-size: 0.9375rem;
  color: var(--muted-foreground);
  line-height: 1.75;
}
.jdtc-content-card .content-body p + p { margin-top: 12px; }
.jdtc-content-card .content-body ul, 
.jdtc-content-card .content-body ol { padding-left: 20px; margin-top: 8px; }
.jdtc-content-card .content-body li { margin-bottom: 6px; }
.jdtc-content-card .content-body h3 { font-size: 1rem; font-weight: 600; color: var(--foreground); margin: 16px 0 8px; }
.jdtc-content-card .content-body table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.jdtc-content-card .content-body table th { background: var(--muted); padding: 10px 14px; text-align: left; font-weight: 600; border: 1px solid var(--border); }
.jdtc-content-card .content-body table td { padding: 10px 14px; border: 1px solid var(--border); }

/* Quick Answer Box */
.jdtc-quick-answer {
  background: linear-gradient(135deg, rgba(15,23,42,0.04) 0%, transparent 100%);
  border: 1.5px solid rgba(15,23,42,0.12);
  border-radius: 16px;
  padding: 24px 28px;
  margin-bottom: 24px;
}
.jdtc-quick-answer h2 {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  margin-bottom: 12px;
}

/* Sidebar Widgets */
.jdtc-sidebar-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 20px;
}
.jdtc-sidebar-card h3 {
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.jdtc-sidebar-card h3 svg { width: 16px; height: 16px; color: var(--primary); }

/* Trust signals */
.jdtc-trust {
  background: rgba(16,185,129,0.05);
  border: 1px solid rgba(16,185,129,0.15);
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Prev/Next navigation */
.jdtc-code-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 32px;
}

.jdtc-code-nav-btn {
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
}
.jdtc-code-nav-btn:hover { border-color: var(--primary); background: var(--muted); }
.jdtc-code-nav-btn small { font-size: 0.75rem; color: var(--muted-foreground); margin-bottom: 4px; }
.jdtc-code-nav-btn span { font-weight: 700; font-size: 1rem; }
.jdtc-code-nav-btn.next { text-align: right; }

/* ============================================
   FILTER BAR (Codes Listing Page)
============================================ */
.jdtc-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 24px 0 16px;
}

.jdtc-filter-pill {
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  background: var(--background);
  color: var(--muted-foreground);
  font-family: var(--font-main);
}
.jdtc-filter-pill:hover { background: var(--muted); color: var(--foreground); }
.jdtc-filter-pill.active {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}

/* ============================================
   FEATURES SECTION
============================================ */
.jdtc-features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 64px;
  align-items: center;
}
@media (min-width: 1024px) { .jdtc-features-grid { grid-template-columns: 1fr 1fr; } }

.jdtc-feature-list { list-style: none; margin: 32px 0; }
.jdtc-feature-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  font-size: 0.9375rem;
  padding: 8px 0;
}
.jdtc-feature-list li .check-icon {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(15,23,42,0.08);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.jdtc-feature-list li .check-icon svg { width: 14px; height: 14px; color: var(--primary); }

/* ============================================
   BLOG PAGE
============================================ */
.jdtc-blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
@media (min-width: 640px) { .jdtc-blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .jdtc-blog-grid { grid-template-columns: repeat(3, 1fr); } }

.jdtc-blog-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.25s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.jdtc-blog-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,0.1); }

.jdtc-blog-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--muted);
}

.jdtc-blog-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }

.jdtc-blog-cat {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  margin-bottom: 10px;
}

.jdtc-blog-title {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.4;
  flex: 1;
}

.jdtc-blog-excerpt {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.jdtc-blog-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: auto;
}

/* ============================================
   PAGINATION
============================================ */
.jdtc-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 48px;
}

.jdtc-page-btn {
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--background);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font-main);
  color: var(--foreground);
  transition: all 0.15s;
}
.jdtc-page-btn:hover { background: var(--muted); }
.jdtc-page-btn.active { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }
.jdtc-page-btn svg { width: 16px; height: 16px; }

/* ============================================
   ANIMATIONS
============================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.jdtc-fade-up { animation: fadeUp 0.55s cubic-bezier(0.16,1,0.3,1) both; }
.jdtc-delay-1 { animation-delay: 0.1s; }
.jdtc-delay-2 { animation-delay: 0.2s; }
.jdtc-delay-3 { animation-delay: 0.3s; }

/* ============================================
   ELEMENTOR OVERRIDES
============================================ */
.elementor-section { width: 100% !important; }
.elementor-page .jdtc-header { z-index: 9999; }

/* Ensure WP body doesn't override fonts */
.wp-block-post-content,
.entry-content,
.wp-block-group { font-family: var(--font-main) !important; }

/* ============================================
   UTILITY
============================================ */
.sr-only { position: absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }
.text-balance { text-wrap: balance; }
.font-outfit { font-family: var(--font-main) !important; }
/* ============================================
   CONTRAST & COLOR FIXES
============================================ */
:root {
  --muted-foreground: #475569;
}
.jdtc-code-desc   { color: #374151; }
.jdtc-code-system { color: #475569; font-size: 0.8rem; }
.jdtc-code-arrow  { color: #0f172a; font-weight: 700; font-size: 0.875rem; display:flex;align-items:center;gap:6px; }
.jdtc-code-num    { color: #0f172a; }
.jdtc-section-head p { color: #374151; }
.jdtc-breadcrumb  { color: #475569; font-size:0.8125rem; }

/* Badges - proper contrast */
.jdtc-badge-critical { background:#dc2626; color:#fff; }
.jdtc-badge-high     { background:#ea580c; color:#fff; }
.jdtc-badge-warning  { background:#d97706; color:#fff; }
.jdtc-badge-moderate { background:#d97706; color:#fff; }
.jdtc-badge-safe     { background:#16a34a; color:#fff; }
.jdtc-badge-info     { background:#2563eb; color:#fff; }

/* Meta chips on code detail page */
.jdtc-meta-chip {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  font-weight: 600;
  font-size: 0.8125rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 8px;
}
.jdtc-meta-chip svg { color: #64748b; }
.jdtc-meta-chip-danger  { background:#fef2f2; border-color:#fca5a5; color:#991b1b; }
.jdtc-meta-chip-safe    { background:#f0fdf4; border-color:#86efac; color:#166534; }
.jdtc-meta-chip-warn    { background:#fffbeb; border-color:#fcd34d; color:#92400e; }

/* Category icon colors */
.jdtc-cat-icon.orange { background:#fff7ed; color:#c2410c; border:1px solid #fed7aa; }
.jdtc-cat-icon.blue   { background:#eff6ff; color:#1d4ed8; border:1px solid #bfdbfe; }
.jdtc-cat-icon.purple { background:#faf5ff; color:#7e22ce; border:1px solid #e9d5ff; }
.jdtc-cat-icon.emerald{ background:#f0fdf4; color:#15803d; border:1px solid #bbf7d0; }

/* Filter pills */
.jdtc-filter-pill { color:#374151; border-color:#d1d5db; }
.jdtc-filter-pill:hover { background:#f1f5f9; color:#0f172a; border-color:#94a3b8; }
.jdtc-filter-pill.active { background:#0f172a; color:#fff; border-color:#0f172a; }

/* ============================================
   PREV / NEXT — COMPACT & CLEAN
============================================ */
.jdtc-code-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 32px;
}

.jdtc-code-nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: border-color .18s, background .18s, box-shadow .18s;
  min-width: 0;
}
.jdtc-code-nav-btn:hover {
  border-color: #0f172a;
  background: #f8fafc;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}
.jdtc-code-nav-next { justify-content: flex-end; text-align: right; }

.jdtc-nav-arrow {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: #f1f5f9;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background .18s;
}
.jdtc-nav-arrow svg { width:16px; height:16px; color:#0f172a; }
.jdtc-code-nav-btn:hover .jdtc-nav-arrow { background:#0f172a; }
.jdtc-code-nav-btn:hover .jdtc-nav-arrow svg { color:#fff; }

.jdtc-nav-label { font-size:0.7rem; font-weight:600; text-transform:uppercase; letter-spacing:.05em; color:#64748b; display:block; margin-bottom:2px; }
.jdtc-nav-code  { font-size:0.9375rem; font-weight:800; color:#0f172a; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:block; }

@media (max-width:480px) {
  .jdtc-code-nav { grid-template-columns:1fr; }
  .jdtc-code-nav-next { justify-content:flex-start; text-align:left; }
}

/* ============================================
   PAGINATION — CLEAN SMALL BUTTONS
============================================ */
.jdtc-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px;
  margin-top: 40px;
}

/* paginate_links outputs <a> and <span> directly */
.jdtc-pagination a,
.jdtc-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: var(--font-main);
  color: #374151;
  text-decoration: none;
  transition: all .15s;
  cursor: pointer;
}
.jdtc-pagination a:hover { background:#f1f5f9; border-color:#94a3b8; color:#0f172a; }
.jdtc-pagination .current,
.jdtc-pagination span.current { background:#0f172a; color:#fff; border-color:#0f172a; }
.jdtc-pagination .dots { background:transparent; border-color:transparent; color:#94a3b8; cursor:default; }
.jdtc-pagination .prev,
.jdtc-pagination .next { padding:0 14px; font-size:0.8125rem; }

/* ============================================
   SIDEBAR IMPROVEMENTS
============================================ */
.jdtc-trust {
  background:#f0fdf4; border:1px solid #bbf7d0; border-radius:10px;
  padding:12px 14px; display:flex; flex-direction:column; gap:6px;
}
.jdtc-trust-item { font-size:0.8125rem; color:#166534; font-weight:500; display:flex; gap:6px; align-items:center; }
.jdtc-trust-check { color:#16a34a; font-weight:800; }

.jdtc-related-list { list-style:none; display:flex; flex-direction:column; gap:6px; }
.jdtc-related-list a {
  display:flex; align-items:center; justify-content:space-between;
  padding:8px 12px; background:#f8fafc; border:1px solid #e2e8f0;
  border-radius:7px; text-decoration:none; transition:all .15s;
}
.jdtc-related-list a:hover { background:#0f172a; border-color:#0f172a; }
.jdtc-related-code { font-size:0.875rem; font-weight:700; color:#0f172a; transition:color .15s; }
.jdtc-related-list a:hover .jdtc-related-code,
.jdtc-related-list a:hover svg { color:#fff; }
.jdtc-related-list svg { color:#94a3b8; transition:color .15s; flex-shrink:0; }

.jdtc-sidebar-cta {
  background:linear-gradient(135deg,#0f172a,#1e293b);
  border-radius:12px; padding:20px; color:#fff; text-align:center;
}
.jdtc-sidebar-cta h3 { font-size:0.9375rem; font-weight:700; color:#fff; margin-bottom:6px; }
.jdtc-sidebar-cta p  { font-size:0.8125rem; color:rgba(255,255,255,.7); line-height:1.6; margin-bottom:14px; }
.jdtc-sidebar-cta-btn {
  display:block; background:#fff; color:#0f172a; font-weight:700;
  font-size:0.875rem; padding:9px 18px; border-radius:8px;
  text-decoration:none; transition:background .15s; font-family:var(--font-main);
}
.jdtc-sidebar-cta-btn:hover { background:#f1f5f9; }
