/* ==========================================================================
   Octelligence - Documentation Layouts
   Reuses tokens from /assets/site.css
   ========================================================================== */

/* ---------------------------------------------------------------
   Layout shell - matches site nav container width
   --------------------------------------------------------------- */
.docs-shell {
  max-width: 1200px;
}

/* ---------------------------------------------------------------
   Docs hero - matches releases/changelog/blog/resources dark navy
   --------------------------------------------------------------- */
.docs-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #0b1f3a 0%, #102a4f 100%);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 3.5rem 0 2.5rem;
}
.docs-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 90% 0%, rgba(28, 181, 185, 0.16) 0%, transparent 55%),
    radial-gradient(ellipse 50% 45% at 5% 100%, rgba(96, 165, 250, 0.10) 0%, transparent 55%);
}
.docs-hero .container { position: relative; z-index: 1; }

.docs-breadcrumbs {
  font-size: .85rem;
  color: rgba(255, 255, 255, 0.7);
}
.docs-breadcrumbs a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
}
.docs-breadcrumbs a:hover { color: #fff; }
.docs-breadcrumbs .separator {
  margin: 0 .55rem;
  color: rgba(255, 255, 255, 0.4);
}

.docs-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #5eead4;
  background: rgba(28, 181, 185, 0.12);
  border: 1px solid rgba(94, 234, 212, 0.3);
  padding: .32rem .8rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.docs-hero__title {
  font-family: var(--font-display);
  color: #fff;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 0.7rem;
  font-size: clamp(2rem, 3.8vw, 2.85rem);
}
.docs-hero__subtitle {
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
  max-width: 760px;
  margin: 0;
}

/* ---------------------------------------------------------------
   Main section
   --------------------------------------------------------------- */
.docs-section {
  padding: 3rem 0 5rem;
}

/* ---------------------------------------------------------------
   Sidebar navigation (persistent across docs pages)
   --------------------------------------------------------------- */
.docs-sidebar__inner {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding-right: .5rem;
}
.docs-sidebar__group {
  margin-bottom: 1.5rem;
}
.docs-sidebar__heading {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
  margin: 0 0 .55rem;
  padding: 0 .65rem;
}
.docs-sidebar__link {
  display: block;
  padding: .42rem .65rem;
  font-size: .92rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 6px;
  line-height: 1.4;
  transition: background-color 120ms ease, color 120ms ease;
}
.docs-sidebar__link:hover {
  color: var(--text);
  background: rgba(30, 64, 175, 0.04);
}
.docs-sidebar__link.is-active {
  color: var(--accent-primary);
  background: rgba(30, 64, 175, 0.08);
  font-weight: 600;
}

/* Sidebar on mobile - collapse to top, not sticky */
@media (max-width: 991.98px) {
  .docs-sidebar__inner {
    position: static;
    max-height: none;
    overflow: visible;
    padding-right: 0;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
  }
}

/* ---------------------------------------------------------------
   Content area
   --------------------------------------------------------------- */
.docs-content {
  max-width: 820px;
}
.docs-lede {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light);
}
.docs-content h2 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text);
  margin: 2.5rem 0 1rem;
  letter-spacing: -0.015em;
}
.docs-content h2:first-child { margin-top: 0; }
.docs-content h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin: 2rem 0 .75rem;
}
.docs-content p {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 1rem;
}
.docs-content ul,
.docs-content ol {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  padding-left: 1.4rem;
  margin-bottom: 1.25rem;
}
.docs-content li { margin-bottom: .35rem; }
.docs-content a {
  color: var(--accent-primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.docs-content a:hover { text-decoration-thickness: 2px; }

/* Numbered step blocks (e.g., "Step 1: ...") */
.docs-step {
  position: relative;
  padding: 1.5rem 1.5rem 1.5rem 3.5rem;
  background: #fafbfd;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  margin-bottom: 1.5rem;
}
.docs-step__num {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--accent-primary);
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.docs-step h3 {
  margin: 0 0 .65rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
}
.docs-step p:last-child { margin-bottom: 0; }

/* Note/tip callouts */
.docs-note {
  padding: 1rem 1.15rem;
  background: rgba(30, 64, 175, 0.04);
  border-left: 3px solid var(--accent-primary);
  border-radius: 0 8px 8px 0;
  margin: 1.5rem 0;
  font-size: .95rem;
  line-height: 1.55;
}
.docs-note strong { color: var(--accent-primary); }
.docs-note p:last-child { margin-bottom: 0; }

.docs-warning {
  padding: 1rem 1.15rem;
  background: rgba(185, 127, 28, 0.06);
  border-left: 3px solid var(--accent-amber);
  border-radius: 0 8px 8px 0;
  margin: 1.5rem 0;
  font-size: .95rem;
  line-height: 1.55;
}
.docs-warning strong { color: var(--accent-amber); }
.docs-warning p:last-child { margin-bottom: 0; }

/* Screenshot/image frame inside docs */
.docs-figure {
  margin: 1.5rem 0 2rem;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  overflow: hidden;
  background: #fafbfd;
}
.docs-figure img {
  display: block;
  width: 100%;
  height: auto;
}
.docs-figure figcaption {
  padding: .65rem 1rem;
  font-size: .85rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-light);
  background: #fff;
}

/* Hub page category cards */
/* Use a.docs-card to win specificity over .docs-content a underline rule */
a.docs-card,
.docs-content a.docs-card {
  display: block;
  height: 100%;
  padding: 1.4rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}
a.docs-card:hover,
.docs-content a.docs-card:hover {
  border-color: rgba(30, 64, 175, 0.35);
  box-shadow: 0 6px 24px -10px rgba(11, 18, 32, 0.12);
  color: var(--text);
  text-decoration: none;
  transform: translateY(-2px);
}
.docs-card__icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(30, 64, 175, 0.08);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: .85rem;
}
.docs-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 .45rem;
  color: var(--text);
}
.docs-card p {
  font-size: .92rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
}

/* Help/contact block at bottom of hub */
.docs-help {
  margin-top: 2rem;
  padding: 2rem;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f6f8fc 100%);
}
.docs-help h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 .5rem;
}
.docs-help p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

/* Prev/Next nav at bottom of article pages */
.docs-pagination {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
}
.docs-pagination__item {
  display: block;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 150ms ease, background 150ms ease;
}
.docs-pagination__item:hover {
  border-color: rgba(30, 64, 175, 0.35);
  background: rgba(30, 64, 175, 0.02);
  color: var(--text);
}
.docs-pagination__label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
  margin-bottom: .25rem;
}
.docs-pagination__title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
}
.docs-pagination__item--next {
  text-align: right;
}
.docs-pagination__item--prev .docs-pagination__label::before {
  content: "← ";
}
.docs-pagination__item--next .docs-pagination__label::after {
  content: " →";
}
@media (max-width: 575.98px) {
  .docs-pagination { grid-template-columns: 1fr; }
}

/* Feedback footer */
.docs-feedback {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  text-align: center;
  background: #fafbfd;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  font-size: .92rem;
  color: var(--text-secondary);
}
.docs-feedback a {
  color: var(--accent-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
