/* Docs — extends landing.css design system */

/* ========================================
   Layout: sidebar + content
   ======================================== */
.docs-layout {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  gap: 48px;
  min-height: calc(100vh - 200px);
}

/* ========================================
   Sidebar
   ======================================== */
.docs-sidebar {
  width: 260px;
  flex-shrink: 0;
  position: sticky;
  top: 80px;
  align-self: flex-start;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

.docs-sidebar-title {
  font-family: 'DM Serif Display', serif;
  font-size: 18px;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.docs-sidebar-category {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-top: 20px;
  margin-bottom: 8px;
}

.docs-sidebar-link {
  display: block;
  padding: 6px 12px;
  font-size: 14px;
  color: var(--fg);
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s;
  margin-bottom: 2px;
}

.docs-sidebar-link:hover {
  background: var(--accent-light);
  color: var(--accent);
}

.docs-sidebar-link.active {
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 600;
}

/* ========================================
   Main content area
   ======================================== */
.docs-main {
  flex: 1;
  min-width: 0;
}

/* ========================================
   Docs Hero (index page)
   ======================================== */
.docs-hero {
  margin-bottom: 48px;
}

.docs-hero h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 40px;
  margin-bottom: 12px;
}

.docs-hero p {
  color: var(--muted);
  font-size: 18px;
}

/* ========================================
   Category sections (index)
   ======================================== */
.docs-category-section {
  margin-bottom: 40px;
}

.docs-category-heading {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.docs-article-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.docs-article-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  text-decoration: none;
  color: var(--fg);
  transition: all 0.3s;
}

.docs-article-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(45, 91, 255, 0.06);
}

.docs-article-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.docs-article-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

/* ========================================
   Article page
   ======================================== */
.docs-article-header {
  margin-bottom: 40px;
}

.docs-breadcrumb {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}

.docs-breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}

.docs-breadcrumb a:hover {
  text-decoration: underline;
}

.docs-article-header h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 36px;
  line-height: 1.2;
  margin-bottom: 12px;
}

.docs-article-desc {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.5;
}

/* ========================================
   Docs Content — prose styling (mirrors blog-content)
   ======================================== */
.docs-content h1 { font-size: 32px; margin: 48px 0 16px; font-family: 'DM Serif Display', serif; }
.docs-content h2 { font-size: 26px; margin: 40px 0 14px; font-family: 'DM Serif Display', serif; }
.docs-content h3 { font-size: 20px; margin: 32px 0 12px; font-weight: 600; }
.docs-content h4 { font-size: 17px; margin: 24px 0 10px; font-weight: 600; }

.docs-content p {
  font-size: 16px;
  line-height: 1.75;
  margin-bottom: 20px;
  color: #333;
}

.docs-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.docs-content a:hover { text-decoration-thickness: 2px; }

.docs-content ul,
.docs-content ol {
  margin: 16px 0 20px 24px;
  line-height: 1.75;
  font-size: 16px;
}

.docs-content li { margin-bottom: 6px; }

.docs-content code {
  background: #f0eeed;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 14px;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.docs-content pre {
  margin: 20px 0;
  border-radius: 12px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
}

.docs-content pre code {
  background: none;
  padding: 0;
  border-radius: 0;
}

.docs-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 12px 20px;
  margin: 20px 0;
  background: var(--accent-light);
  border-radius: 0 8px 8px 0;
  color: #555;
  font-style: italic;
}

.docs-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 15px;
}

.docs-content th,
.docs-content td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  text-align: left;
}

.docs-content th {
  background: #f5f4f2;
  font-weight: 600;
}

.docs-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

.docs-content strong { font-weight: 600; }

/* ========================================
   Prev / Next navigation
   ======================================== */
.docs-prev-next {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.docs-prev,
.docs-next {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: all 0.2s;
  max-width: 50%;
}

.docs-next {
  text-align: right;
  margin-left: auto;
}

.docs-prev:hover,
.docs-next:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.docs-pn-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.docs-pn-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 900px) {
  .docs-layout {
    flex-direction: column;
    padding: 24px 20px 60px;
    gap: 32px;
  }

  .docs-sidebar {
    width: 100%;
    position: static;
    max-height: none;
    border-bottom: 1px solid var(--border);
    padding-bottom: 24px;
  }

  .docs-article-list {
    grid-template-columns: 1fr;
  }

  .docs-hero h1 { font-size: 32px; }
  .docs-article-header h1 { font-size: 28px; }
}

@media (max-width: 480px) {
  .docs-prev-next {
    flex-direction: column;
  }

  .docs-prev,
  .docs-next {
    max-width: 100%;
  }

  .docs-next {
    text-align: left;
    margin-left: 0;
  }
}
