/* ========================================
   Full-width container override (Astra)
   ======================================== */
body.page-template-page-docs .site-content .ast-container,
body.page-template-page-docs #content .ast-container {
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body.page-template-page-docs #primary {
  margin: 0 !important;
  padding: 0 !important;
}
body.page-template-page-docs .nx-header .nx-container,
body.page-template-page-docs .nx-footer .nx-container {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
}

body.page-template-page-docs .nx-header .nx-header-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}

body.page-template-page-docs .nx-header .nx-header-nav {
  margin-left: auto;
}

/* ========================================
   Main Layout
   ======================================== */
.nd-docs {
  display: flex !important;
  flex-direction: row !important;
  min-height: calc(100vh - 120px) !important;
  background: #f8fafc !important;
  width: 100% !important;
  position: relative !important;
}

/* ========================================
   Sidebar
   ======================================== */
.nd-docs__sidebar {
  width: 280px !important;
  min-width: 280px !important;
  max-width: 280px !important;
  flex: 0 0 280px !important;
  background: #ffffff !important;
  border-right: 1px solid #e2e8f0 !important;
  height: calc(100vh - 64px) !important;
  position: sticky !important;
  top: 64px !important;
  overflow-y: auto !important;
  transition: transform 0.3s ease !important;
  z-index: 50 !important;
}

.nd-docs__sidebar-header {
  padding: 24px 20px 16px !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

.nd-docs__sidebar-logo {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  font-weight: 600 !important;
  font-size: 15px !important;
  color: #0f172a !important;
}

.nd-docs__sidebar-logo svg {
  color: #3b82f6 !important;
  width: 20px !important;
  height: 20px !important;
}

/* ========================================
   Navigation
   ======================================== */
.nd-docs__nav {
  padding: 16px 12px !important;
}

.nd-docs__section {
  margin-bottom: 20px !important;
}

.nd-docs__section-title {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 8px 12px !important;
  font-weight: 500 !important;
  font-size: 13px !important;
  color: #64748b !important;
  text-transform: uppercase !important;
  letter-spacing: 0.025em !important;
}

.nd-docs__section-title svg {
  width: 16px !important;
  height: 16px !important;
  opacity: 0.7 !important;
}

.nd-docs__items {
  list-style: none !important;
  margin: 4px 0 0 !important;
  padding: 0 !important;
}

.nd-docs__items li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.nd-docs__item {
  display: block !important;
  padding: 10px 12px 10px 36px !important;
  border-radius: 8px !important;
  color: #475569 !important;
  text-decoration: none !important;
  font-size: 14px !important;
  transition: all 0.15s ease !important;
  background: transparent !important;
  border: none !important;
}

.nd-docs__item:hover {
  background: #f1f5f9 !important;
  color: #1e293b !important;
  text-decoration: none !important;
}

.nd-docs__item.is-active {
  background: rgba(59, 130, 246, 0.1) !important;
  color: #2563eb !important;
  font-weight: 500 !important;
}

/* ========================================
   Main Content
   ======================================== */
.nd-docs__main {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  padding: 32px 48px !important;
  max-width: calc(100% - 280px) !important;
}
/* Wider content while keeping comfortable line length */
@media (min-width: 1024px) {
  .nd-docs__content { max-width: 1100px; }
}
@media (min-width: 1440px) {
  .nd-docs__content { max-width: 1200px; }
}
.nd-docs__content {
  max-width: 900px !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  padding: 32px 40px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}
/* Docs page header/footer centering */
body.page-template-page-docs .site-header .ast-container,
body.page-template-page-docs .site-footer .ast-container {
  max-width: 72rem;     /* ~1152px */
  margin: 0 auto;
  padding: 0 1rem;
}
.nd-docs__breadcrumb {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  font-size: 13px !important;
  color: #64748b !important;
  margin-bottom: 16px !important;
}

.nd-docs__breadcrumb .sep {
  display: flex !important;
  align-items: center !important;
  margin: 0 4px !important;
}

.nd-docs__breadcrumb .sep svg {
  width: 14px !important;
  height: 14px !important;
}

.nd-docs__breadcrumb .current {
  color: #0f172a !important;
  font-weight: 500 !important;
}

.nd-docs__title {
  margin: 0 0 24px !important;
  font-size: 36px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  line-height: 1.2 !important;
  padding: 0 !important;
}

.nd-docs__body {
  font-size: 15px !important;
  line-height: 1.7 !important;
  color: #334155 !important;
}

.nd-docs__body h3 {
  font-size: 18px !important;
  font-weight: 600 !important;
  color: #0f172a !important;
  margin: 28px 0 16px !important;
  padding: 0 !important;
}

.nd-docs__body h3:first-child {
  margin-top: 0 !important;
}

.nd-docs__body p {
  margin: 0 0 16px !important;
}

/* ========================================
   Typography
   ======================================== */
.nd-lead {
  font-size: 17px !important;
  color: #64748b !important;
  line-height: 1.7 !important;
  margin-bottom: 24px !important;
}

.nd-text {
  color: #64748b !important;
  margin-bottom: 20px !important;
}

.nd-text-sm {
  font-size: 14px !important;
  color: #64748b !important;
  line-height: 1.6 !important;
  margin: 0 !important;
}

.nd-text-xs {
  font-size: 12px !important;
  color: #94a3b8 !important;
  margin-top: 16px !important;
}

/* ========================================
   Cards
   ======================================== */
.nd-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  padding: 20px !important;
  margin-bottom: 16px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

.nd-card h4 {
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #0f172a !important;
  margin: 0 0 8px !important;
  padding: 0 !important;
}

.nd-card p {
  margin: 0 !important;
}

.nd-card--padded {
  padding: 24px !important;
}

.nd-card--center {
  text-align: center !important;
}

.nd-card--command {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
}

.nd-card--command code {
  background: #f1f5f9 !important;
  padding: 8px 14px !important;
  border-radius: 8px !important;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace !important;
  font-size: 13px !important;
  color: #0f172a !important;
  white-space: nowrap !important;
}

/* ========================================
   Grids
   ======================================== */
.nd-grid {
  display: grid !important;
  gap: 16px !important;
  margin-bottom: 24px !important;
}

.nd-grid--2 {
  grid-template-columns: repeat(2, 1fr) !important;
}

.nd-grid--3 {
  grid-template-columns: repeat(3, 1fr) !important;
}

/* ========================================
   Lists
   ======================================== */
.nd-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.nd-list li {
  padding: 4px 0 !important;
  color: #64748b !important;
  font-size: 14px !important;
  list-style: none !important;
  margin: 0 !important;
}

.nd-list--icon li {
  display: flex !important;
  align-items: flex-start !important;
  gap: 8px !important;
}

.nd-list--icon svg {
  color: #3b82f6 !important;
  flex-shrink: 0 !important;
  margin-top: 2px !important;
  width: 16px !important;
  height: 16px !important;
}

.nd-list--dots li {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.nd-list--dots li::before {
  content: "" !important;
  width: 6px !important;
  height: 6px !important;
  background: #3b82f6 !important;
  border-radius: 50% !important;
  flex-shrink: 0 !important;
}

/* ========================================
   Steps
   ======================================== */
.nd-steps {
  margin-bottom: 24px !important;
}

.nd-step {
  display: flex !important;
  gap: 16px !important;
  margin-bottom: 20px !important;
  align-items: flex-start !important;
}

.nd-step__number {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%) !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  flex-shrink: 0 !important;
}

.nd-step__number--muted {
  background: #f1f5f9 !important;
  color: #64748b !important;
}

.nd-step__content h4 {
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #0f172a !important;
  margin: 0 0 4px !important;
  padding: 0 !important;
}

.nd-step__content p {
  font-size: 14px !important;
  color: #64748b !important;
  margin: 0 !important;
}

.nd-step--simple {
  align-items: center !important;
}

.nd-step--simple p {
  color: #64748b !important;
  margin: 0 !important;
}

/* ========================================
   Notes / Alerts
   ======================================== */
.nd-note {
  padding: 16px 20px !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  margin: 24px 0 !important;
}

.nd-note strong {
  display: inline !important;
}

.nd-note--info {
  background: rgba(59, 130, 246, 0.08) !important;
  border: 1px solid rgba(59, 130, 246, 0.2) !important;
  color: #1e40af !important;
}

.nd-note--warning {
  background: rgba(234, 179, 8, 0.08) !important;
  border: 1px solid rgba(234, 179, 8, 0.2) !important;
  color: #a16207 !important;
}

.nd-note--success {
  background: rgba(34, 197, 94, 0.08) !important;
  border: 1px solid rgba(34, 197, 94, 0.2) !important;
  color: #166534 !important;
}

/* ========================================
   Badges
   ======================================== */
.nd-badge {
  display: inline-block !important;
  padding: 4px 10px !important;
  background: #3b82f6 !important;
  color: #ffffff !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  border-radius: 6px !important;
  margin-bottom: 12px !important;
}

.nd-badge--secondary {
  background: #64748b !important;
}

.nd-badge--outline {
  background: transparent !important;
  border: 1px solid #e2e8f0 !important;
  color: #64748b !important;
  margin-right: 8px !important;
  margin-bottom: 8px !important;
}

.nd-badges {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin-bottom: 24px !important;
}

/* ========================================
   Code
   ======================================== */
.nd-code {
  background: #f1f5f9 !important;
  padding: 12px 16px !important;
  border-radius: 8px !important;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace !important;
  font-size: 13px !important;
  color: #0f172a !important;
  margin-top: 12px !important;
}

/* ========================================
   Chat Example
   ======================================== */
.nd-chat-example {
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
  background: #f8fafc !important;
  padding: 12px !important;
  border-radius: 8px !important;
  margin: 16px 0 !important;
}

.nd-chat-avatar {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #ffffff !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  flex-shrink: 0 !important;
}

.nd-chat-avatar--blue {
  background: #3b82f6 !important;
}

.nd-chat-avatar--purple {
  background: #8b5cf6 !important;
}

.nd-chat-name {
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #0f172a !important;
}

.nd-chat-content p {
  font-size: 13px !important;
  color: #64748b !important;
  margin: 2px 0 0 !important;
}

/* ========================================
   Pricing Cards
   ======================================== */
.nd-pricing-cards {
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
}

.nd-card--pricing {
  padding: 24px !important;
}

.nd-pricing-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 20px !important;
}

.nd-pricing-header h4 {
  font-size: 18px !important;
  margin: 0 !important;
}

.nd-price span {
  font-size: 24px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
}

.nd-price {
  color: #64748b !important;
  font-size: 14px !important;
}

.nd-pricing-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 16px !important;
  text-align: center !important;
}

.nd-stat-value {
  font-size: 16px !important;
  font-weight: 600 !important;
  color: #0f172a !important;
  margin: 0 0 2px !important;
}

.nd-stat-label {
  font-size: 12px !important;
  color: #94a3b8 !important;
  margin: 0 !important;
}

.nd-big-number {
  font-size: 36px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  margin: 8px 0 !important;
}

/* ========================================
   Mobile Toggle Button
   ======================================== */
.nd-docs__mobile-toggle {
  display: none !important;
  position: fixed !important;
  bottom: 20px !important;
  right: 20px !important;
  z-index: 1000 !important;
  width: 52px !important;
  height: 52px !important;
  border-radius: 50% !important;
  background: #3b82f6 !important;
  border: none !important;
  cursor: pointer !important;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4) !important;
  align-items: center !important;
  justify-content: center !important;
  transition: transform 0.2s ease !important;
}

.nd-docs__mobile-toggle:hover {
  transform: scale(1.05) !important;
}

.nd-docs__mobile-toggle svg {
  color: #ffffff !important;
}

.nd-docs__mobile-toggle .icon-close {
  display: none !important;
}

.nd-docs__mobile-toggle.is-active .icon-menu {
  display: none !important;
}

.nd-docs__mobile-toggle.is-active .icon-close {
  display: block !important;
}

/* ========================================
   Mobile Overlay
   ======================================== */
.nd-docs__overlay {
  display: none !important;
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0, 0, 0, 0.5) !important;
  z-index: 40 !important;
  opacity: 0 !important;
  transition: opacity 0.3s ease !important;
}

.nd-docs__overlay.is-visible {
  opacity: 1 !important;
}

/* ========================================
   Responsive - Tablet
   ======================================== */
@media (max-width: 1024px) {
  .nd-docs__main {
    padding: 24px !important;
  }

  .nd-docs__content {
    padding: 24px !important;
  }

  .nd-docs__title {
    font-size: 28px !important;
  }

  .nd-grid--2,
  .nd-grid--3 {
    grid-template-columns: 1fr !important;
  }
}

/* ========================================
   Responsive - Mobile
   ======================================== */
@media (max-width: 768px) {
  .nd-docs {
    flex-direction: column !important;
  }

  .nd-docs__mobile-toggle {
    display: flex !important;
  }

  .nd-docs__overlay {
    display: block !important;
  }

  .nd-docs__sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    height: 100vh !important;
    z-index: 50 !important;
    transform: translateX(-100%) !important;
  }

  .nd-docs__sidebar.is-open {
    transform: translateX(0) !important;
  }

  .nd-docs__main {
    padding: 16px !important;
    max-width: 100% !important;
  }

  .nd-docs__content {
    padding: 20px !important;
    border-radius: 12px !important;
  }

  .nd-docs__title {
    font-size: 24px !important;
    margin-bottom: 20px !important;
  }

  .nd-docs__breadcrumb {
    flex-wrap: wrap !important;
    font-size: 12px !important;
  }

  .nd-pricing-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .nd-step {
    gap: 12px !important;
  }

  .nd-step__number {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    font-size: 13px !important;
  }
}
/* Center docs article in the main column */
.nd-docs__content {
  margin-left: auto !important;
  margin-right: auto !important;
}
