/* =========================================================
   BaseFortify Docs Resources Page (scoped)
   ========================================================= */

/* Hero */
.bf-docs-hero {
  padding-top: 96px; /* account for fixed navbar */
  padding-bottom: 32px;
}

.bf-docs-hero-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 750;
  letter-spacing: -0.02em;
  margin: 0;
  color: #ffffff;
  opacity: 1 !important;
  text-shadow: 0 2px 18px rgba(0,0,0,0.75);
}

.bf-docs-hero-actions { margin-top: 14px; }

.bf-docs-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #f4f6f8;
  text-decoration: none;
  opacity: 0.9;
}
.bf-docs-back:hover { opacity: 1; text-decoration: underline; }

/* Body grid */
.bf-docs-body {
  padding-top: 28px;
  padding-bottom: 54px;
}

.bf-docs-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 280px;
  gap: 24px;
  overflow: visible; /* helps sticky in normal cases */
}

/* Sidebar */
.bf-docs-sidebar {
  position: sticky;
  top: 96px;
  align-self: start;
}

/* Nav */
.bf-docs-nav {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px;
  padding: 10px;
}

.bf-docs-nav-item {
  display: block;
  padding: 10px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: rgba(244,246,248,0.90);
  font-size: 14px;
  border: 1px solid transparent;
}

.bf-docs-nav-item:hover {
  background: rgba(255,255,255,0.06);
  color: #ffffff;
}

.bf-docs-nav-item.bf-active{
  background: linear-gradient(
    90deg,
    rgba(255,191,0,0.28),
    rgba(255,191,0,0.12)
  );
  border: 1px solid rgba(255,191,0,0.55);
  color: #ffffff;
  position: relative;
  box-shadow:
    inset 0 0 0 1px rgba(255,191,0,0.25),
    0 0 18px rgba(255,191,0,0.25);
}

.bf-docs-nav-group {
  width: 100%;
  margin-top: 6px;
  padding: 10px 10px;
  border-radius: 10px;
  border: 0;
  cursor: pointer;
  background: rgba(255,255,255,0.03);
  color: rgba(244,246,248,0.92);
  font-size: 14px;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bf-docs-nav-chevron {
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(244,246,248,0.7);
  border-bottom: 2px solid rgba(244,246,248,0.7);
  transform: rotate(45deg);
  margin-left: 10px;
}

.bf-docs-nav-sub{
  margin-top: 6px;
  padding-left: 0;      /* was 6px */
  border-left: 0;       /* remove guide rail */
}

/* Content */
.bf-docs-content{
  background: rgba(11, 15, 20, 0.82); /* ↑ from ~0.03 */
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  padding: 26px 26px;

  /* subtle depth */
  box-shadow:
    0 20px 60px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.06);
}

.bf-docs-breadcrumb {
  font-size: 13px;
  color: rgba(244,246,248,0.72);
  margin-bottom: 14px;
}

.bf-docs-breadcrumb-sep {
  margin: 0 8px;
  opacity: 0.65;
}

/* Panel switching */
.bf-docs-panel { display: none; }
.bf-docs-panel.bf-panel-active { display: block; }

/* Sections */
.bf-docs-section {
  padding: 6px 0 28px 0;
}

/* Headings: more breathing room */
.bf-docs-content h2,
.bf-docs-content h3,
.bf-docs-content h4{
  color: #ffffff;
  opacity: 1;
  text-shadow: 0 1px 10px rgba(0,0,0,0.55);
}

.bf-docs-content h2 {
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -0.01em;
  margin: 16px 0 18px;
}

.bf-docs-content h3 {
  font-size: 19px;
  font-weight: 650;
  margin: 28px 0 12px;
}

.bf-docs-content h4 {
  font-size: 15px;
  font-weight: 650;
  margin: 22px 0 10px;
  color: rgba(255,255,255,0.92);
}

/* Paragraph spacing to reduce “wall of text” */
.bf-docs-content p {
  color: rgba(244,246,248,0.88);
  line-height: 1.7;
  font-size: 14px;
  margin: 0 0 14px 0;
}

.bf-docs-muted { color: rgba(244,246,248,0.68); }

.bf-docs-list {
  margin: 10px 0 18px 18px;
  color: rgba(244,246,248,0.88);
}
.bf-docs-list li { margin-bottom: 7px; }

.bf-docs-code {
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px;
  padding: 12px 14px;
  overflow: auto;
  font-size: 13px;
  color: rgba(244,246,248,0.92);
  margin: 14px 0 16px;
}

/* “KV” cards (moved from HTML) */
.bf-docs-kv{
  display:grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 16px 0 22px 0;
}
.bf-docs-kv-item{
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px;
  padding: 12px 14px;
}
.bf-docs-kv-title{
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}
.bf-docs-kv-text{
  color: rgba(244,246,248,0.85);
  margin: 0;
  line-height: 1.55;
  font-size: 14px;
}

/* Table */
.bf-docs-table-wrap {
  margin: 18px 0 14px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.10);
}

.bf-docs-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255,255,255,0.02);
}

.bf-docs-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 14px;
  color: rgba(244,246,248,0.88);
}
.bf-docs-table tr:last-child td { border-bottom: 0; }

.bf-docs-td-key {
  width: 140px;
  color: #ffffff;
  font-weight: 600;
}
.bf-docs-status-table td { vertical-align: top; }

/* Right TOC */
.bf-docs-toc {
  position: sticky;
  top: 96px;
  align-self: start;
  width: 280px;
}

.bf-docs-toc-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px;
  padding: 14px 14px;
  max-height: calc(100vh - 96px - 24px);
  overflow: auto;
}

.bf-docs-toc-title {
  font-size: 13px;
  font-weight: 700;
  color: rgba(244,246,248,0.85);
  margin-bottom: 10px;
}

/* Panel-specific TOC switching */
.bf-docs-toc-links { display: none; }
.bf-docs-toc-links.bf-toc-active { display: block; }

.bf-docs-toc-links a {
  display: block;
  text-decoration: none;
  font-size: 13px;
  padding: 7px 8px;
  border-radius: 10px;
  color: rgba(244,246,248,0.78);
}
.bf-docs-toc-links a:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
}

/* Responsive */
@media (max-width: 1200px) {
  .bf-docs-grid { grid-template-columns: 240px minmax(0, 1fr); }
  .bf-docs-toc { display: none; }
}
@media (max-width: 820px) {
  .bf-docs-grid { grid-template-columns: 1fr; }
  .bf-docs-sidebar { position: relative; top: auto; }
}

/* ===== GitHub-style source chip (OpenCVE-like) ===== */
.bf-docs-source{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:6px 12px;
  border-radius:999px;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.14);
  color: rgba(244,246,248,0.92);
  text-decoration:none;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.bf-docs-source:hover{
  background: rgba(255,255,255,0.07);
  color:#fff;
  border-color: rgba(255,255,255,0.20);
}

.bf-docs-source__icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:18px;
  height:18px;
  opacity:0.95;
}

.bf-docs-source__repo{
  font-weight:700;
  letter-spacing:0.01em;
}

/* Keep the hero meta row neat */
.bf-docs-hero-meta{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

/* Ensure Back + GitHub badge align perfectly on one row */
.bf-docs-hero-actions-split{
  display: flex;
  align-items: center;   /* ← key fix */
  justify-content: space-between;
  gap: 12px;
}

/* Normalize Back link vertical alignment */
.bf-docs-back{
  display: inline-flex;
  align-items: center;
  line-height: 1;        /* ← prevents baseline drop */
}

/* Normalize GitHub source chip */
.bf-docs-source{
  display: inline-flex;
  align-items: center;
  line-height: 1;        /* ← keeps it centered */
}

/* --- Repo badges --- */
.bf-docs-badge{
  display:inline-flex;
  align-items:center;
  padding:4px 10px;
  border-radius:999px;
  font-size:11px;
  font-weight:700;
  letter-spacing:0.02em;
  border:1px solid transparent;
  background: rgba(255,255,255,0.06);
  color:#fff;
}

.bf-docs-badge--license{
  background: rgba(82,176,92,0.18);
  border-color: rgba(82,176,92,0.45);
}

.bf-docs-badge--python{
  background: rgba(59,130,246,0.18);
  border-color: rgba(59,130,246,0.45);
}

.bf-docs-badge--status{
  background: rgba(255,191,0,0.22);
  border-color: rgba(255,191,0,0.55);
  box-shadow: 0 0 0 1px rgba(255,191,0,0.15);
}

.bf-docs-nav-item.bf-active::before{
  content:'';
  position:absolute;
  left:-10px;
  top:8px;
  bottom:8px;
  width:4px;
  border-radius:4px;
  background: linear-gradient(
    180deg,
    #ffbf00,
    #ff9f00
  );
  box-shadow: 0 0 12px rgba(255,191,0,0.85);
}

/* ===== GitHub-style shield badges (label + value) ===== */

.bf-docs-hero-meta{
  display:flex;
  flex-direction:column;      /* repo chip on top, badges under it */
  align-items:flex-end;       /* keep it right-aligned like now */
  gap:8px;
}

.bf-docs-shields{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

/* Badge container */
.bf-docs-shield{
  display:inline-flex;
  align-items:stretch;
  border-radius:999px;
  overflow:hidden;

  /* “README badge” feel */
  border:1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.10);

  font-size:11px;
  line-height:1;
  letter-spacing:0.01em;
}

/* Left segment = label (dark grey) */
.bf-docs-shield__label{
  padding:4px 8px;
  background: rgba(255,255,255,0.08);
  color: rgba(244,246,248,0.88);
  border-right: 1px solid rgba(255,255,255,0.14);
  font-weight:700;
  text-transform:lowercase;
}

/* Right segment = value (colored) */
.bf-docs-shield__value{
  padding:4px 8px;
  color:#fff;
  font-weight:800;
  text-transform:none;
}

/* Colors that mimic typical shields.io vibes */
.bf-docs-shield--license .bf-docs-shield__value{
  background: rgba(141, 187, 5, 0.85);   /* green */
}

.bf-docs-shield--python .bf-docs-shield__value{
  background: rgba(14, 127, 192,0.85);  /* blue */
}

.bf-docs-shield--status .bf-docs-shield__value{
  background: rgba(75, 198, 29, 0.90);   /* orange-ish "active" */
}

/* Optional muted badge style */
.bf-docs-shield--muted .bf-docs-shield__value{
  background: rgba(216, 98, 75); /* grey */
  color: rgba(255,255,255,0.95);
}

/* Hover: subtle, like README images don’t “glow” */
.bf-docs-shield:hover{
  border-color: rgba(255,255,255,0.28);
  transform: translateY(-1px);
}

/* Docs content should sit above welcome bg */
.bf-docs-shell {
  position: relative;
}

.bf-docs-shell > .bf-docs-hero,
.bf-docs-shell > .bf-docs-body {
  position: relative;
  z-index: 1;
}

.bf-docs-content{
  backdrop-filter: blur(3px);
}

.bf-docs-nav-sub .bf-docs-nav-item{
  padding-left: 18px;
}

/* ===== Introduction hero (logo + 2x2 screenshots) ===== */

.bf-docs-intro-hero{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap: 16px;
  margin: 8px 0 18px;
}

/* Logo / icon area */
.bf-docs-intro-mark{
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.bf-docs-intro-mark__text{
  font-weight: 850;
  letter-spacing: 0.12em;
  font-size: 14px;
  color: rgba(255,255,255,0.92);
}

/* 2x2 image grid */
.bf-docs-intro-grid{
  width: 100%;
  max-width: 720px;
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.bf-docs-intro-shot{
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 10px;
  cursor: zoom-in;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  transition: transform 140ms ease, border-color 140ms ease;
}

.bf-docs-intro-shot:hover{
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.22);
}

/* Responsive: stack into one column on small screens */
@media (max-width: 680px){
  .bf-docs-intro-grid{
    grid-template-columns: 1fr;
    max-width: 520px;
  }
}

.bf-docs-intro-mark__svg{
  width: 200px;
  height: 200px;
  display: block;
}

/* ===== Intro divider ===== */
.bf-docs-intro-divider{
  border: 0;
  height: 1px;
  margin: 26px 0 30px;

  background: linear-gradient(
    to right,
    rgba(255,255,255,0.05),
    rgba(255,255,255,0.45),
    rgba(255,255,255,0.05)
  );
}