/* ════════════════════════════════════════════════════════
   DOCS PAGE STYLES
   ════════════════════════════════════════════════════════ */

/* ─── LAYOUT ─── */
.docs-layout {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  padding-top: 64px;
  min-height: 100vh;
}

/* ─── SIDEBAR ─── */
.docs-sidebar {
  width: 260px;
  flex-shrink: 0;
  padding: 32px 24px;
  border-right: 1px solid var(--border);
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
}
.docs-sidebar-header {
  margin-bottom: 24px;
}
.docs-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.docs-nav-link {
  display: block;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}
.docs-nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}
.docs-nav-link.active {
  color: var(--accent);
  background: rgba(0, 212, 255, 0.06);
}
.docs-nav-link.sub {
  font-size: 13px;
  padding-left: 28px;
  color: var(--text-dim);
}
.docs-nav-link.sub:hover {
  color: var(--text-secondary);
}

/* ─── CONTENT ─── */
.docs-content {
  flex: 1;
  padding: 48px 64px;
  max-width: 900px;
}

.docs-section {
  padding-bottom: 64px;
  margin-bottom: 48px;
  border-bottom: 1px solid var(--border);
}
.docs-section:last-child {
  border-bottom: none;
}
.docs-section h1 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.docs-lead {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 40px;
}
.docs-subsection {
  margin-top: 48px;
}
.docs-subsection h2,
.docs-section h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  margin-top: 40px;
}
.docs-section h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  margin-top: 32px;
}
.docs-section p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

/* ─── STEPS ─── */
.docs-steps {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 24px 0;
}
.docs-step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.docs-step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}
.docs-step h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}
.docs-step p {
  font-size: 14px;
  margin-bottom: 8px;
}

/* ─── CODE BLOCKS ─── */
.docs-code {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 12px 0 20px;
  overflow-x: auto;
}
.docs-code code {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ─── CALLOUTS ─── */
.docs-callout {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  margin: 20px 0;
  font-size: 14px;
  line-height: 1.6;
}
.docs-callout strong {
  color: var(--text-primary);
}
.docs-callout-info {
  background: rgba(0, 212, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.15);
  color: var(--text-secondary);
}
.docs-callout-tip {
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.15);
  color: var(--text-secondary);
}

/* ─── LISTS ─── */
.docs-list {
  list-style: none;
  margin: 16px 0;
}
.docs-list li {
  font-size: 14px;
  color: var(--text-secondary);
  padding: 6px 0 6px 24px;
  position: relative;
  line-height: 1.6;
}
.docs-list li::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 14px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.docs-ordered-list {
  margin: 16px 0;
  padding-left: 24px;
}
.docs-ordered-list li {
  font-size: 14px;
  color: var(--text-secondary);
  padding: 4px 0;
  line-height: 1.6;
}
.docs-ordered-list li::marker {
  color: var(--accent);
  font-weight: 700;
}

.docs-link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(0, 212, 255, 0.3);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.2s;
}
.docs-link:hover {
  text-decoration-color: var(--accent);
}

/* ─── SEARCH BAR ─── */
.docs-search-bar {
  margin-bottom: 32px;
}
.docs-search-bar input {
  width: 100%;
  padding: 12px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}
.docs-search-bar input:focus {
  border-color: var(--accent-dim);
}
.docs-search-bar input::placeholder {
  color: var(--text-dim);
}

/* ─── TOOL CATEGORIES ─── */
.docs-tool-category {
  margin-bottom: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s;
}
.docs-tool-category:hover {
  border-color: var(--border-hover);
}
.docs-tool-cat-header h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
  margin-top: 0;
  text-transform: lowercase;
}
.docs-tool-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(0, 212, 255, 0.08);
  padding: 2px 10px;
  border-radius: 100px;
  margin-left: 8px;
  vertical-align: middle;
}
.docs-tool-cat-header p {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 16px;
}
.docs-tool-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.docs-tool-tag {
  font-size: 12px;
  padding: 4px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-secondary);
  font-family: 'SF Mono', 'Fira Code', monospace;
  transition: all 0.15s;
}
.docs-tool-tag:hover {
  border-color: var(--accent-dim);
  color: var(--accent);
}

/* ─── ARCHITECTURE FLOW ─── */
.docs-arch-flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin: 32px 0;
}
.docs-arch-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 24px;
  text-align: center;
  width: 100%;
  max-width: 500px;
}
.docs-arch-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
}
.docs-arch-step p {
  font-size: 13px;
  margin-bottom: 0;
}
.docs-arch-arrow {
  color: var(--accent-dim);
  font-size: 18px;
  line-height: 1;
  padding: 4px 0;
}

/* ─── STATS ─── */
.docs-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 24px 0;
}
.docs-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: center;
}
.docs-stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.03em;
}
.docs-stat-label {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* ─── FAQ ─── */
.docs-faq-item {
  margin-bottom: 32px;
}
.docs-faq-item h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  margin-top: 0;
}
.docs-faq-item p {
  font-size: 14px;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .docs-layout {
    flex-direction: column;
  }
  .docs-sidebar {
    width: 100%;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 16px;
  }
  .docs-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
  }
  .docs-nav-link {
    font-size: 12px;
    padding: 6px 10px;
  }
  .docs-nav-link.sub {
    display: none;
  }
  .docs-content {
    padding: 32px var(--side-pad);
  }
  .docs-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
