/**
 * ADX UI Components - Premium SaaS, Directory & Web3 Aesthetics
 *
 * @package ADX_Theme
 */

/* Buttons */
.adx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--adx-radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  line-height: 1.4;
  white-space: nowrap;
}

.adx-btn:active {
  transform: scale(0.98);
}

.adx-btn-primary {
  background: linear-gradient(135deg, #4F46E5 0%, #6366F1 50%, #4338CA 100%);
  color: #FFFFFF !important;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.32);
}

.adx-btn-primary:hover {
  background: linear-gradient(135deg, #4338CA 0%, #4F46E5 100%);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.45);
  transform: translateY(-2px);
}

.adx-btn-secondary {
  background-color: var(--adx-color-surface);
  border-color: var(--adx-color-border);
  color: var(--adx-color-heading) !important;
  box-shadow: var(--adx-shadow-xs);
}

.adx-btn-secondary:hover {
  background-color: var(--adx-color-surface-hover);
  border-color: var(--adx-color-border-hover);
  color: var(--adx-color-primary) !important;
  transform: translateY(-2px);
  box-shadow: var(--adx-shadow-sm);
}

.adx-btn-outline {
  background-color: transparent;
  border-color: var(--adx-color-border);
  color: var(--adx-color-body) !important;
}

.adx-btn-outline:hover {
  border-color: var(--adx-color-primary);
  color: var(--adx-color-primary) !important;
  background: var(--adx-color-primary-light);
}

.adx-btn-dark {
  background: #1E293B;
  color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.adx-btn-dark:hover {
  background: #334155;
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.adx-btn-sm {
  padding: 7px 16px;
  font-size: 0.85rem;
  border-radius: 6px;
}

.adx-btn-lg {
  padding: 14px 30px;
  font-size: 1.05rem;
  border-radius: var(--adx-radius);
}

/* Badges & Pills */
.adx-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--adx-radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.2;
}

.adx-badge-free {
  background-color: #ECFDF5;
  color: #059669;
  border: 1px solid #A7F3D0;
}

.adx-badge-freemium {
  background-color: #EEF2FF;
  color: #4F46E5;
  border: 1px solid #C7D2FE;
}

.adx-badge-paid {
  background-color: #FEF3C7;
  color: #92400E;
  border: 1px solid #FDE68A;
}

.adx-badge-free_trial {
  background-color: #EFF6FF;
  color: #2563EB;
  border: 1px solid #BFDBFE;
}

.adx-badge-contact_sales {
  background-color: #F1F5F9;
  color: #475569;
  border: 1px solid #CBD5E1;
}

.adx-badge-verified {
  background-color: #ECFDF5;
  color: #059669;
  border: 1px solid #A7F3D0;
}

.adx-badge-featured {
  background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
  color: #B45309;
  border: 1px solid #F59E0B;
}

/* Hero Section with Rich Ambient Glow */
.adx-hero-mesh {
  background: var(--adx-gradient-hero);
  color: #FFFFFF;
  padding: clamp(64px, 8vw, 108px) 0 clamp(48px, 6vw, 84px) 0;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.adx-hero-mesh::before {
  content: '';
  position: absolute;
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 450px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, rgba(6, 182, 212, 0.12) 50%, transparent 70%);
  pointer-events: none;
  filter: blur(60px);
}

.adx-hero-mesh .adx-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--adx-radius-pill);
  font-size: 0.85rem;
  font-weight: 700;
  color: #A5B4FC;
  margin-bottom: 24px;
}

.adx-hero-mesh .adx-hero-title {
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin-bottom: 20px;
  color: #FFFFFF;
}

.adx-hero-mesh .adx-hero-title span {
  background: linear-gradient(135deg, #818CF8 0%, #38BDF8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.adx-hero-mesh .adx-hero-subtitle {
  font-size: clamp(1.05rem, 1.8vw, 1.18rem);
  color: #94A3B8;
  margin: 0 0 28px 0;
  line-height: 1.65;
}

/* 2-Column Hero Split Grid */
.adx-hero-split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.95fr);
  gap: 48px;
  align-items: center;
}

.adx-hero-left {
  text-align: left;
}

.adx-hero-right {
  position: relative;
}

@media (max-width: 992px) {
  .adx-hero-split-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .adx-hero-left {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .adx-hero-badge {
    margin-left: auto;
    margin-right: auto;
  }
  .adx-hero-title {
    text-align: center;
  }
  .adx-hero-subtitle {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }
  .adx-search-box-wrap {
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: 600px;
  }
  .adx-popular-tags {
    justify-content: center;
  }
  .adx-hero-right {
    width: 100%;
    display: flex;
    justify-content: center;
  }
  .adx-hero-hub-card {
    width: 100%;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Hero Interactive Hub Showcase Card */
.adx-hero-hub-card {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.adx-hero-hub-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #4F46E5, #06B6D4, #10B981);
}

.adx-hero-hub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.adx-hero-tool-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 10px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.adx-hero-tool-item:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateX(4px);
}

.adx-hero-tool-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 800;
  font-size: 0.95rem;
}

/* Search Box Form */
.adx-search-box-wrap {
  width: 100%;
  margin-bottom: 20px;
  position: relative;
}

.adx-search-form {
  display: flex;
  align-items: center;
  background: #FFFFFF;
  border: 2px solid transparent;
  border-radius: var(--adx-radius-pill);
  padding: 6px 8px 6px 20px;
  box-shadow: 0 16px 36px -6px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: all 0.25s ease;
}

.adx-search-form:focus-within {
  border-color: #6366F1;
  box-shadow: 0 0 0 5px rgba(99, 102, 241, 0.25), 0 16px 36px -6px rgba(0, 0, 0, 0.35);
}

.adx-search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1.02rem;
  color: #0F172A;
  outline: none;
  padding-right: 12px;
  font-family: inherit;
}

/* Stats Ticker (Hero Metrics) */
.adx-hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
  .adx-hero-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

.adx-hero-stat-item {
  text-align: left;
}

@media (max-width: 992px) {
  .adx-hero-stat-item {
    text-align: center;
  }
}

.adx-hero-stat-item .stat-num {
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.2;
}

.adx-hero-stat-item .stat-lbl {
  font-size: 0.75rem;
  font-weight: 600;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

/* Card Grids */
.adx-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
}

@media (max-width: 640px) {
  .adx-card-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Tool Cards */
.adx-card {
  background: #FFFFFF;
  border: 1px solid var(--adx-color-border);
  border-radius: var(--adx-radius-lg);
  padding: 26px;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
  box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.03), 0 2px 4px -2px rgba(15, 23, 42, 0.03);
  position: relative;
}

.adx-card:hover {
  transform: translateY(-5px);
  border-color: #CBD5E1;
  box-shadow: 0 20px 32px -8px rgba(15, 23, 42, 0.08), 0 4px 8px -2px rgba(15, 23, 42, 0.04);
}

.adx-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.adx-card-logo {
  width: 52px;
  height: 52px;
  border-radius: var(--adx-radius);
  background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--adx-color-primary);
  border: 1px solid var(--adx-color-border-subtle);
  overflow: hidden;
}

.adx-card-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.adx-card-info {
  flex: 1;
  min-width: 0;
}

.adx-card-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 4px;
  line-height: 1.35;
  color: #0F172A;
}

.adx-card-title a {
  color: #0F172A;
  text-decoration: none;
  transition: color 0.15s ease;
}

.adx-card-title a:hover {
  color: var(--adx-color-primary);
}

.adx-card-category {
  font-size: 0.825rem;
  color: var(--adx-color-muted);
  font-weight: 600;
}

.adx-card-desc {
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 22px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.adx-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #F1F5F9;
  padding-top: 18px;
  margin-top: auto;
}

/* Category Discovery Grid */
.adx-category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

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

@media (max-width: 768px) {
  .adx-category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

@media (max-width: 480px) {
  .adx-category-grid {
    grid-template-columns: 1fr;
  }
}

.adx-category-card {
  background: #FFFFFF;
  border: 1px solid var(--adx-color-border);
  border-radius: var(--adx-radius-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--adx-color-heading);
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.02);
}

.adx-category-card:hover {
  transform: translateY(-4px);
  border-color: #C7D2FE;
  box-shadow: 0 16px 28px -6px rgba(79, 70, 229, 0.12);
}

.adx-category-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.adx-category-name {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 4px;
  color: #0F172A;
}

.adx-category-count {
  font-size: 0.85rem;
  color: #64748B;
  line-height: 1.4;
}

/* Built-in Showcase Cards Grid */
.adx-tools-showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.adx-showcase-card {
  background: #FFFFFF;
  border: 1px solid var(--adx-color-border);
  border-radius: var(--adx-radius-lg);
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.02);
}

.adx-showcase-card:hover {
  transform: translateY(-4px);
  border-color: #CBD5E1;
  box-shadow: 0 16px 28px -6px rgba(15, 23, 42, 0.08);
}

.adx-card-badge-type {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.adx-card-badge-type.ai {
  background: #EEF2FF;
  color: #4F46E5;
}

.adx-card-badge-type.utility {
  background: #ECFDF5;
  color: #059669;
}

/* Filter Controls Header */
.adx-directory-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
  padding: 16px 20px;
  background: #FFFFFF;
  border: 1px solid var(--adx-color-border);
  border-radius: var(--adx-radius);
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.02);
}

.adx-filter-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.adx-filter-btn {
  background: transparent;
  border: 1px solid var(--adx-color-border);
  border-radius: var(--adx-radius-pill);
  padding: 6px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
}

.adx-filter-btn:hover {
  background: #F1F5F9;
  color: #0F172A;
}

.adx-filter-btn.active {
  background: #4F46E5;
  color: #FFFFFF;
  border-color: #4F46E5;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.28);
}

/* FAQ Accordion */
.adx-accordion {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.adx-accordion-item {
  background: #FFFFFF;
  border: 1px solid var(--adx-color-border);
  border-radius: var(--adx-radius);
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.02);
  transition: border-color 0.2s ease;
}

.adx-accordion-item.is-open {
  border-color: #C7D2FE;
}

.adx-accordion-trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 26px;
  background: transparent;
  border: none;
  text-align: left;
  font-size: 1.1rem;
  font-weight: 700;
  color: #0F172A;
  cursor: pointer;
  font-family: inherit;
}

.adx-accordion-trigger:hover {
  background: #F8FAFC;
}

.adx-accordion-body {
  display: none;
  padding: 0 26px 22px 26px;
  font-size: 0.98rem;
  color: #475569;
  line-height: 1.7;
}

.adx-accordion-item.is-open .adx-accordion-body {
  display: block;
}

.adx-accordion-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748B;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.adx-accordion-item.is-open .adx-accordion-icon {
  transform: rotate(180deg);
  background: #EEF2FF;
  color: #4F46E5;
}

/* Breadcrumbs */
.adx-breadcrumbs {
  padding: 12px 0;
  font-size: 0.88rem;
  color: var(--adx-color-muted);
}

.adx-breadcrumbs-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  gap: 8px;
}

.adx-breadcrumbs-list li {
  display: inline-flex;
  align-items: center;
  list-style: none !important;
  margin: 0;
  padding: 0;
}

.adx-breadcrumbs-list a {
  color: #64748B;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

.adx-breadcrumbs-list a:hover {
  color: var(--adx-color-primary);
}

.adx-breadcrumbs-list [aria-current="page"] {
  color: var(--adx-color-heading);
  font-weight: 700;
}

.adx-crumb-sep {
  color: #CBD5E1;
  font-size: 0.85rem;
}

/* Pagination */
.adx-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
}

.adx-pagination .nav-links,
.adx-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.adx-pagination a,
.adx-pagination span.current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border-radius: var(--adx-radius-sm);
  border: 1px solid var(--adx-color-border);
  background: #FFFFFF;
  color: var(--adx-color-body);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.adx-pagination a:hover {
  border-color: var(--adx-color-primary);
  color: var(--adx-color-primary);
  background: var(--adx-color-primary-light);
}

.adx-pagination span.current {
  background: var(--adx-color-primary);
  border-color: var(--adx-color-primary);
  color: #FFFFFF;
}

/* ==========================================================================
   Editorial Article & Rich Typography Styles (.adx-article-body)
   ========================================================================== */
.adx-article-body,
.adx-rich-content {
  font-size: 1.1rem;
  line-height: 1.85;
  color: #334155;
  word-break: break-word;
}

.adx-article-body h2,
.adx-rich-content h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 850;
  color: #0F172A;
  letter-spacing: -0.025em;
  margin: 44px 0 18px 0;
  line-height: 1.25;
  padding-bottom: 8px;
  border-bottom: 1px solid #F1F5F9;
}

.adx-article-body h3,
.adx-rich-content h3 {
  font-size: clamp(1.3rem, 2.2vw, 1.55rem);
  font-weight: 800;
  color: #0F172A;
  letter-spacing: -0.02em;
  margin: 34px 0 14px 0;
  line-height: 1.35;
}

.adx-article-body h4,
.adx-rich-content h4 {
  font-size: 1.2rem;
  font-weight: 750;
  color: #1E293B;
  margin: 28px 0 12px 0;
}

.adx-article-body h5,
.adx-rich-content h5 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #334155;
  margin: 22px 0 10px 0;
}

.adx-article-body p,
.adx-rich-content p {
  margin-bottom: 22px;
}

.adx-article-body p.lead {
  font-size: 1.22rem;
  font-weight: 500;
  color: #1E293B;
  line-height: 1.75;
}

/* Styled Blockquotes */
.adx-article-body blockquote,
.adx-rich-content blockquote {
  margin: 32px 0;
  padding: 24px 30px;
  background: #F8FAFC;
  border-left: 4px solid #4F46E5;
  border-radius: 0 14px 14px 0;
  position: relative;
}

.adx-article-body blockquote p,
.adx-rich-content blockquote p {
  font-size: 1.15rem;
  font-style: italic;
  color: #1E293B;
  line-height: 1.7;
  margin-bottom: 8px;
}

.adx-article-body blockquote cite,
.adx-rich-content blockquote cite {
  display: block;
  font-size: 0.88rem;
  font-style: normal;
  font-weight: 700;
  color: #6366F1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Styled Responsive Tables */
.adx-article-body table,
.adx-rich-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 32px 0;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(15,23,42,0.02);
}

.adx-article-body th,
.adx-rich-content th {
  background: #F8FAFC;
  color: #0F172A;
  font-weight: 800;
  font-size: 0.95rem;
  text-align: left;
  padding: 14px 18px;
  border-bottom: 2px solid #E2E8F0;
}

.adx-article-body td,
.adx-rich-content td {
  padding: 14px 18px;
  border-bottom: 1px solid #F1F5F9;
  font-size: 0.95rem;
  color: #475569;
}

.adx-article-body tr:last-child td,
.adx-rich-content tr:last-child td {
  border-bottom: none;
}

.adx-article-body tr:hover td,
.adx-rich-content tr:hover td {
  background: #F8FAFC;
}

/* Code Blocks & Inline Syntax */
.adx-article-body code,
.adx-rich-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.88em;
  color: #4338CA;
  background: #EEF2FF;
  border: 1px solid #E0E7FF;
  padding: 2px 7px;
  border-radius: 6px;
  font-weight: 600;
}

.adx-article-body pre,
.adx-rich-content pre {
  background: #0F172A;
  color: #E2E8F0;
  border-radius: 14px;
  padding: 22px 26px;
  overflow-x: auto;
  margin: 28px 0;
  box-shadow: 0 8px 24px -4px rgba(15,23,42,0.15);
  position: relative;
}

.adx-article-body pre code,
.adx-rich-content pre code {
  background: transparent;
  border: none;
  padding: 0;
  color: #E2E8F0;
  font-size: 0.92rem;
  line-height: 1.65;
  font-weight: 400;
}

/* Lists */
.adx-article-body ul,
.adx-rich-content ul {
  list-style: disc;
  margin: 20px 0 24px 28px;
}

.adx-article-body ol,
.adx-rich-content ol {
  list-style: decimal;
  margin: 20px 0 24px 28px;
}

.adx-article-body li,
.adx-rich-content li {
  margin-bottom: 10px;
  padding-left: 4px;
}

/* Callouts / Alert Boxes */
.adx-callout {
  padding: 22px 26px;
  border-radius: 14px;
  margin: 30px 0;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.adx-callout-info {
  background: #EEF2FF;
  border: 1px solid #C7D2FE;
  color: #3730A3;
}

.adx-callout-success {
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #065F46;
}

.adx-callout-warning {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  color: #92400E;
}

.adx-callout-title {
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.adx-callout p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Horizontal Rule */
.adx-article-body hr,
.adx-rich-content hr {
  border: 0;
  height: 1px;
  background: #E2E8F0;
  margin: 40px 0;
}

/* Heading Scroll Anchor Offset for smooth navigation */
.adx-article-body h1[id],
.adx-article-body h2[id],
.adx-article-body h3[id],
.adx-article-body h4[id],
.adx-article-body h5[id],
.adx-article-body h6[id] {
  scroll-margin-top: 100px;
}

/* ==========================================================================
   Sticky Table of Contents (TOC) & Sidebar Component
   ========================================================================== */
.adx-article-sidebar {
  position: -webkit-sticky;
  position: sticky;
  top: 96px;
  z-index: 10;
}

.adx-sticky-toc-widget {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 18px;
  padding: 22px 20px;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
  max-height: 520px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #CBD5E1 transparent;
  position: relative;
  transition: all 0.2s ease;
}

/* Subtle Top Indigo Glow Accent Line */
.adx-sticky-toc-widget::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20px;
  right: 20px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, #4F46E5 0%, #6366F1 50%, #38BDF8 100%);
}

.adx-sticky-toc-widget::-webkit-scrollbar {
  width: 4px;
}

.adx-sticky-toc-widget::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 9999px;
}

.adx-toc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #F1F5F9;
}

.adx-toc-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: -0.01em;
}

.adx-toc-count {
  font-size: 0.725rem;
  font-weight: 700;
  color: #4F46E5;
  background: #EEF2FF;
  padding: 2px 8px;
  border-radius: 9999px;
  border: 1px solid #E0E7FF;
}

.adx-toc-nav {
  margin: 0;
  padding: 0;
  position: relative;
}

.adx-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  position: relative;
}

.adx-toc-item {
  margin: 0;
  padding: 0;
  list-style: none;
  position: relative;
}

/* Sub-items (H3, H4) Hierarchy Tree Styling */
.adx-toc-item-sub {
  margin-left: 14px;
  padding-left: 8px;
  border-left: 1.5px solid #F1F5F9;
}

.adx-toc-depth-2 {
  margin-left: 24px;
  padding-left: 8px;
  border-left: 1.5px solid #F1F5F9;
}

.adx-toc-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.865rem;
  line-height: 1.45;
  color: #64748B;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.18s ease;
  position: relative;
  border: 1px solid transparent;
}

.adx-toc-bullet {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #CBD5E1;
  flex-shrink: 0;
  transition: all 0.18s ease;
}

.adx-toc-link:hover {
  color: #0F172A;
  background: #F8FAFC;
  border-color: #E2E8F0;
}

.adx-toc-link:hover .adx-toc-bullet {
  background: #4F46E5;
  transform: scale(1.3);
}

/* Active Highlighted State via ScrollSpy (Easy TOC Premium Style) */
.adx-toc-link.is-active {
  color: #4338CA !important;
  font-weight: 700 !important;
  background: #EEF2FF !important;
  border-color: #C7D2FE !important;
  box-shadow: 0 1px 3px rgba(79, 70, 229, 0.08);
}

.adx-toc-link.is-active .adx-toc-bullet {
  background: #4F46E5 !important;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.25) !important;
  transform: scale(1.35) !important;
}

/* Author Box Social Icon Pills */
.adx-social-pill {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  color: #64748B;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.adx-social-pill:hover {
  background: #4F46E5;
  border-color: #4F46E5;
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
}

/* ==========================================================================
   Comprehensive Mobile Responsiveness, Icon & Overflow Optimization
   ========================================================================== */

/* Keep Icons Inline with Text - Prevent Awkward Line Wrapping */
.adx-btn svg,
.adx-badge svg,
.adx-spec-item svg,
.adx-check-icon svg,
.adx-feature-list svg,
.adx-social-pill svg,
.adx-sidebar-widget h3 svg,
.adx-toc-header-title svg,
.adx-header-actions svg,
.adx-crumb-sep {
  flex-shrink: 0 !important;
  display: inline-block !important;
  vertical-align: middle;
}

.adx-btn,
.adx-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* Prevent Content, Pre/Code & Table Overflow on Mobile */
.adx-article-body pre,
.adx-tool-rich-content pre,
.adx-rich-content pre {
  max-width: 100%;
  overflow-x: auto;
  border-radius: 10px;
  padding: 14px;
  font-size: 0.88rem;
  box-sizing: border-box;
}

.adx-article-body table,
.adx-tool-rich-content table,
.adx-rich-content table {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  display: block;
}

.adx-article-body img,
.adx-tool-rich-content img,
.adx-rich-content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

/* Hide Table of Contents completely on Mobile and Tablets as requested */
@media (max-width: 1024px) {
  .adx-sticky-toc-widget,
  #adx-sidebar-toc,
  .adx-toc-box,
  .adx-toc-container,
  .adx-toc-wrapper,
  .adx-toc,
  .easy-table-of-contents,
  #ez-toc-container,
  .ez-toc-v2_0_88 {
    display: none !important;
  }
}

/* Mobile Typography & Compact Box Padding Scaling (Down to 320px) */
@media (max-width: 768px) {
  .adx-single-article,
  article.adx-single-article {
    padding: 16px 14px !important;
    border-radius: 14px !important;
  }

  .adx-article-header h1 {
    font-size: clamp(1.35rem, 4.5vw, 1.65rem) !important;
    margin-bottom: 10px !important;
    line-height: 1.25 !important;
  }

  .adx-article-header p {
    font-size: 0.95rem !important;
    line-height: 1.55 !important;
    margin-bottom: 14px !important;
  }

  .adx-article-body {
    font-size: 0.95rem !important;
    line-height: 1.65 !important;
  }

  .adx-article-body h2 {
    font-size: 1.25rem !important;
    margin-top: 20px !important;
    margin-bottom: 10px !important;
  }

  .adx-article-body h3 {
    font-size: 1.08rem !important;
    margin-top: 16px !important;
    margin-bottom: 8px !important;
  }

  .adx-author-box-card {
    padding: 14px 12px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    border-radius: 12px !important;
  }

  .adx-author-box {
    margin-top: 32px !important;
    padding: 16px 14px !important;
    border-radius: 14px !important;
    gap: 12px !important;
  }

  .adx-author-box-top {
    gap: 12px !important;
  }

  .adx-author-box-avatar {
    width: 52px !important;
    height: 52px !important;
  }

  .adx-author-box-badge {
    font-size: 0.65rem !important;
    padding: 2px 8px !important;
  }

  .adx-author-box-name {
    font-size: 1.05rem !important;
  }

  .adx-author-box-socials {
    gap: 6px !important;
    margin-top: 2px !important;
  }

  .adx-author-box-bio {
    font-size: 0.88rem !important;
    line-height: 1.55 !important;
  }

  .adx-author-box-link {
    font-size: 0.82rem !important;
    width: 100% !important;
    justify-content: center !important;
    padding: 9px 12px !important;
    box-sizing: border-box !important;
  }

  .adx-hero-mesh {
    padding: 28px 0 !important;
  }

  .adx-hero-title {
    font-size: clamp(1.5rem, 5.5vw, 1.95rem) !important;
  }

  .adx-hero-subtitle,
  .adx-hero-lead {
    font-size: 0.92rem !important;
    line-height: 1.55 !important;
  }

  .adx-tool-hero-box {
    padding: 16px 14px !important;
    border-radius: 14px !important;
    margin-bottom: 20px !important;
  }

  .adx-tool-hero-title {
    font-size: clamp(1.4rem, 4.5vw, 1.7rem) !important;
  }

  .adx-author-hero {
    padding: 18px 14px !important;
    border-radius: 14px !important;
    margin-bottom: 20px !important;
  }

  .adx-content-card,
  .adx-tool-section,
  .adx-sidebar-widget {
    padding: 16px 14px !important;
    border-radius: 12px !important;
    margin-bottom: 18px !important;
  }

  .adx-content-card h2,
  .adx-tool-section h2 {
    font-size: 1.22rem !important;
    margin-bottom: 12px !important;
    padding-bottom: 8px !important;
  }
}

@media (max-width: 480px) {
  .adx-single-article,
  article.adx-single-article {
    padding: 14px 12px !important;
    border-radius: 12px !important;
  }

  .adx-article-meta-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
  }

  .adx-article-meta-row .adx-btn {
    width: 100% !important;
    justify-content: center !important;
  }

  .adx-tool-hero-box {
    padding: 14px 12px !important;
  }

  .adx-content-card,
  .adx-tool-section,
  .adx-sidebar-widget {
    padding: 14px 12px !important;
  }

  .adx-btn {
    padding: 8px 16px !important;
    font-size: 0.86rem !important;
  }

  .adx-btn-sm {
    padding: 6px 12px !important;
    font-size: 0.8rem !important;
  }
}

/* Specific 320px - 360px Ultra-Compact Viewports */
@media (max-width: 360px) {
  .adx-single-article,
  article.adx-single-article,
  .adx-tool-hero-box,
  .adx-content-card,
  .adx-tool-section,
  .adx-sidebar-widget,
  .adx-author-hero {
    padding: 12px 10px !important;
    border-radius: 10px !important;
  }

  .adx-article-header h1,
  .adx-tool-hero-title {
    font-size: 1.35rem !important;
  }

  .adx-article-body,
  .adx-tool-rich-content,
  .adx-rich-content {
    font-size: 0.9rem !important;
    line-height: 1.55 !important;
  }

  .adx-btn {
    padding: 7px 12px !important;
    font-size: 0.82rem !important;
  }
}

/* ==========================================================================
   ADX Author Box (Single Article Bottom)
   ========================================================================== */
.adx-author-box {
  margin-top: 48px;
  padding: 28px 32px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 4px 20px -4px rgba(15, 23, 42, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.adx-author-box:hover {
  border-color: #CBD5E1;
  box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.07);
}

.adx-author-box-top {
  display: flex;
  align-items: center;
  gap: 18px;
}

.adx-author-box-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #EEF2FF;
  flex-shrink: 0;
  background: #FFFFFF;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.12);
  display: block;
}

.adx-author-box-avatar img,
.adx-author-box-avatar .avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.adx-author-box-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-grow: 1;
  min-width: 0;
}

.adx-author-box-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #4F46E5;
  background: #EEF2FF;
  padding: 2px 10px;
  border-radius: 9999px;
  display: inline-flex;
  align-self: flex-start;
  line-height: 1.4;
}

.adx-author-box-name {
  font-size: 1.22rem;
  font-weight: 800;
  color: #0F172A;
  margin: 0;
  line-height: 1.25;
}

.adx-author-box-name a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.adx-author-box-name a:hover {
  color: #4F46E5;
}

.adx-author-box-socials {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.adx-author-box-bio {
  font-size: 0.94rem;
  color: #475569;
  line-height: 1.62;
  margin: 0;
}

.adx-author-box-link {
  font-size: 0.86rem;
  font-weight: 700;
  color: #4F46E5;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #EEF2FF;
  border-radius: 8px;
  align-self: flex-start;
  transition: all 0.2s ease;
}

.adx-author-box-link:hover {
  background: #4F46E5;
  color: #FFFFFF;
  transform: translateX(2px);
}
