/* Plinkly API Docs - Modern Theme 2026 */

.docs-wrapper {
  --d-sidebar-w: 260px;
  --d-code-bg: #0d1117;
  --d-code-text: #e6edf3;
  --d-primary: var(--clr-primary-1);
  --d-accent: var(--clr-accent);
  
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  font-family: var(--ff);
}

/* --- Hero Section --- */
.docs-hero {
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
  text-align: center; /* يمكن تغييره لـ left حسب التفضيل */
}
.docs-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 1rem;
}
.docs-intro {
  font-size: 1.15rem;
  color: var(--text-dim);
  max-width: 700px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}
.docs-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}
.docs-btn {
  padding: 0.7rem 1.4rem;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.docs-btn.primary {
  background: var(--d-primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37,96,236,0.25);
}
.docs-btn.primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(37,96,236,0.35); }
.docs-btn.secondary {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}
.docs-btn.secondary:hover { border-color: var(--d-primary); color: var(--d-primary); }

/* --- Layout (Sidebar + Content) --- */
.docs-layout {
  display: grid;
  grid-template-columns: var(--d-sidebar-w) 1fr;
  gap: 3rem;
  margin-bottom: 5rem;
  align-items: start;
}

/* Sidebar Navigation */
.docs-sidebar {
  position: sticky;
  top: 2rem;
  height: fit-content;
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
  padding-right: 1rem; /* Space for scrollbar */
}
.nav-group { margin-bottom: 2rem; }
.nav-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  font-weight: 700;
  margin-bottom: 0.8rem;
  display: block;
}
.nav-link {
  display: block;
  padding: 0.5rem 0.8rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  border-radius: 8px;
  margin-bottom: 0.2rem;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}
.nav-link:hover { background: var(--clr-bg-light); color: var(--d-primary); }
.nav-link.active {
  background: rgba(37,96,236,0.08);
  color: var(--d-primary);
  font-weight: 600;
  border-left-color: var(--d-primary);
}

/* Content Area */
.docs-content {
  min-width: 0; /* Prevents code blocks from overflowing grid */
}

/* Typography & Elements */
.doc-section {
  margin-bottom: 4rem;
  scroll-margin-top: 6rem; /* Offset for sticky header */
}
.doc-section h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border);
}
.doc-section h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin: 2rem 0 1rem;
}
.doc-section p {
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 1rem;
  font-size: 1.05rem;
}
.doc-section ul {
  padding-left: 1.5rem;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}
.doc-section li { margin-bottom: 0.5rem; }

/* Code Blocks */
.code-block {
  position: relative;
  background: var(--d-code-bg);
  border-radius: 12px;
  margin: 1.5rem 0;
  border: 1px solid rgba(255,255,255,0.1);
  overflow: hidden;
}
.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1rem;
  background: rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.code-lang {
  color: #8b949e;
  font-size: 0.8rem;
  font-family: monospace;
  font-weight: 600;
}
.btn-copy {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  color: #c9d1d9;
  font-size: 0.75rem;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-copy:hover { background: rgba(255,255,255,0.1); color: #fff; }

.code-block pre {
  margin: 0;
  padding: 1.2rem;
  overflow-x: auto;
  color: var(--d-code-text);
  font-family: 'Fira Code', monospace;
  font-size: 0.9rem;
  line-height: 1.5;
}
code {
  font-family: 'Fira Code', monospace;
}
p > code, li > code {
  background: rgba(37,96,236,0.08);
  color: var(--d-primary);
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  font-size: 0.9em;
}

/* API Badges */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-right: 0.5rem;
}
.badge.get { background: rgba(34, 197, 94, 0.15); color: #15803d; }
.badge.post { background: rgba(37, 96, 236, 0.15); color: var(--d-primary); }
.badge.delete { background: rgba(239, 68, 68, 0.15); color: #b91c1c; }

/* Info Cards (Key-Value) */
.kv-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1rem;
  align-items: baseline;
}
.kv-label { font-weight: 700; color: var(--text); }
.kv-value { color: var(--text-dim); font-family: monospace; font-size: 0.95rem; }

/* Footer Note */
.docs-footer-note {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px dashed var(--border);
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 900px) {
  .docs-layout { grid-template-columns: 1fr; gap: 2rem; }
  .docs-sidebar {
    position: relative;
    top: 0;
    max-height: none;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
  }
  .kv-list { grid-template-columns: 1fr; gap: 0.5rem; }
  .kv-label { margin-top: 1rem; color: var(--d-primary); }
}