/* FamGateway Modular Documentation Design System
 * Path: docs/includes/docs.css
 * Zero emojis, clean typography, responsive layout
 */

:root {
  --docs-primary: #2563eb;
  --docs-primary-hover: #1d4ed8;
  --docs-primary-light: #eff6ff;
  --docs-border: #e2e8f0;
  --docs-border-light: #f1f5f9;
  --docs-text-dark: #0f172a;
  --docs-text-muted: #64748b;
  --docs-bg-page: #f8fafc;
  --docs-bg-card: #ffffff;
  --docs-code-bg: #0f172a;
  --docs-sidebar-w: 280px;
}

body {
  background-color: var(--docs-bg-page);
  color: #334155;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  padding: 0;
}

.docs-layout-wrap {
  padding-top: 92px;
  padding-bottom: 80px;
  max-width: 1360px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* Hub Full-Width Layout (Clears fixed 64px navbar) */
.docs-hub-wrap {
  max-width: 1200px;
  margin: 0 auto 80px;
  padding: 92px 24px 0;
}
@media (max-width: 640px) {
  .docs-hub-wrap {
    padding: 84px 16px 0;
  }
}

.hub-header {
  text-align: center;
  margin: 36px auto 44px;
}
.hub-title {
  font-size: clamp(34px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -1.2px;
  color: #0f172a;
  margin: 0 0 12px 0;
}
.hub-lead {
  font-size: 18px;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

/* Document Article Reading Container (Centered & Readable) */
.docs-article-wrap {
  max-width: 860px;
  margin: 0 auto;
}

.docs-main-grid {
  display: grid;
  grid-template-columns: var(--docs-sidebar-w) minmax(0, 1fr);
  gap: 32px;
  align-items: flex-start;
}

/* Sidebar Navigation */
.docs-sidebar {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding: 20px;
  background: var(--docs-bg-card);
  border: 1px solid var(--docs-border);
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.02);
}

.docs-sidebar::-webkit-scrollbar {
  width: 5px;
}
.docs-sidebar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.sidebar-group {
  margin-bottom: 22px;
}
.sidebar-group:last-child {
  margin-bottom: 0;
}

.sidebar-group-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #94a3b8;
  margin-bottom: 8px;
  padding-left: 8px;
}

.sidebar-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: #475569;
  text-decoration: none;
  transition: all 0.15s ease;
}

.sidebar-icon {
  width: 16px;
  height: 16px;
  color: #64748b;
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.sidebar-link:hover .sidebar-icon,
.sidebar-link.active .sidebar-icon {
  color: var(--docs-primary);
}

.sidebar-link:hover {
  background: #f1f5f9;
  color: var(--docs-text-dark);
}

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

.sidebar-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: #e2e8f0;
  color: #475569;
}
.sidebar-link.active .sidebar-badge {
  background: #bfdbfe;
  color: var(--docs-primary);
}

/* Main Content Column */
.docs-content-area {
  min-width: 0;
}

.docs-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--docs-text-muted);
  margin-bottom: 16px;
}
.docs-breadcrumb a {
  color: var(--docs-text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.docs-breadcrumb a:hover {
  color: var(--docs-primary);
}
.docs-breadcrumb-sep {
  color: #cbd5e1;
}

/* Page Header Hero (Clean, Typography-driven, Unboxed) */
.docs-page-hero,
.docs-article-header {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--docs-border);
  box-shadow: none;
}

.hero-meta-bar,
.hero-pill-group {
  display: none !important;
}

.docs-hero-title,
.docs-article-title {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 800;
  color: var(--docs-text-dark);
  letter-spacing: -0.025em;
  margin: 0 0 12px 0;
  line-height: 1.25;
}

.docs-hero-desc,
.docs-article-desc {
  font-size: 16px;
  color: #64748b;
  line-height: 1.65;
  margin: 0;
  max-width: 820px;
}

/* Document Sections & Cards (Clean, Flowing Content, Unboxed) */
.docs-card,
.docs-section {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  margin-bottom: 40px;
  box-shadow: none;
}

.docs-card-title,
.docs-section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--docs-text-dark);
  letter-spacing: -0.3px;
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.docs-card-desc,
.docs-section-desc {
  font-size: 15px;
  color: #334155;
  line-height: 1.7;
  margin: 0 0 16px 0;
}

/* Quickstart Grid Cards (Hub Page) */
.framework-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
  margin: 24px 0 40px;
}

.framework-card {
  background: #ffffff;
  border: 1px solid var(--docs-border);
  border-radius: 16px;
  padding: 24px;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}
.framework-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.08), 0 4px 8px -4px rgba(0, 0, 0, 0.03);
  border-color: #cbd5e1;
}

.framework-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.framework-icon-wrap {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.framework-card:hover .framework-icon-wrap {
  transform: translateY(-2px);
}
.framework-icon-wrap svg {
  width: 22px;
  height: 22px;
  display: block;
}

.framework-card-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--docs-text-dark);
  margin: 0 0 8px 0;
  line-height: 1.35;
}
.framework-card-desc {
  font-size: 14px;
  color: #64748b;
  line-height: 1.6;
  margin: 0 0 18px 0;
  flex-grow: 1;
}

.framework-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--docs-primary);
  padding-top: 14px;
}

/* Code Snippet Box & Tabs */
.code-box {
  background: var(--docs-code-bg);
  border-radius: 12px;
  overflow: hidden;
  margin: 18px 0;
  border: 1px solid #1e293b;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #1e293b;
  border-bottom: 1px solid #334155;
}

.code-tabs {
  display: flex;
  gap: 6px;
}
.code-tab {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 12.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}
.code-tab.active {
  background: #334155;
  color: #ffffff;
}

.copy-btn {
  background: #334155;
  border: 1px solid #475569;
  color: #e2e8f0;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s;
}
.copy-btn:hover {
  background: #475569;
  color: #ffffff;
}

.code-content {
  margin: 0;
  padding: 18px;
  color: #e2e8f0;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 13.5px;
  line-height: 1.65;
  overflow-x: auto;
}

/* Callout Alert Boxes (Calm Slate Design - Zero Harsh Colors) */
.docs-callout {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 3px solid #2563eb;
  border-radius: 8px;
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 14px;
  line-height: 1.65;
  color: #334155;
}
.docs-callout strong {
  display: block;
  font-size: 14.5px;
  font-weight: 700;
  color: #0f172a !important;
  margin-bottom: 6px;
}
.docs-callout.info,
.docs-callout.tip,
.docs-callout.warning {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  border-left: 3px solid #2563eb !important;
  color: #334155 !important;
}
.docs-callout.warning strong,
.docs-callout.tip strong,
.docs-callout.info strong {
  color: #0f172a !important;
}

/* Parameter & Data Tables */
.docs-table-wrap {
  overflow-x: auto;
  margin: 18px 0;
  border: 1px solid var(--docs-border);
  border-radius: 12px;
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: left;
}
.docs-table th {
  background: #f8fafc;
  color: var(--docs-text-dark);
  font-weight: 700;
  padding: 12px 16px;
  border-bottom: 1px solid var(--docs-border);
}
.docs-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  vertical-align: top;
}
.docs-table tr:last-child td {
  border-bottom: none;
}

.param-name {
  font-family: 'Consolas', monospace;
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
}
.param-type {
  font-size: 11.5px;
  color: #64748b;
  font-family: monospace;
}
.param-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}
.param-badge.required {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}
.param-badge.optional {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

/* Page Navigation Footer */
.docs-page-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--docs-border);
}
.nav-page-btn {
  display: flex;
  flex-direction: column;
  padding: 12px 20px;
  border-radius: 10px;
  border: 1px solid var(--docs-border);
  background: #ffffff;
  text-decoration: none;
  transition: all 0.15s ease;
  min-width: 160px;
}
.nav-page-btn:hover {
  border-color: #93c5fd;
  transform: translateY(-1px);
}
.nav-page-sub {
  font-size: 11px;
  color: var(--docs-text-muted);
  text-transform: uppercase;
  font-weight: 700;
}
.nav-page-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--docs-text-dark);
}

/* Responsive */
@media (max-width: 992px) {
  .docs-main-grid {
    grid-template-columns: 1fr;
  }
  .docs-sidebar {
    display: none;
  }
}

/* Founder & Platform Bio Block (Matching Blog Hub) */
.author-bio {
  margin-top: 60px;
  padding: 30px;
  background: #f8fafc;
  border: 1px solid var(--docs-border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  align-items: center;
}

.author-bio h4 {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.author-bio p {
  margin: 0;
  font-size: 14.5px;
  color: #475569;
  line-height: 1.6;
}

.author-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
  justify-content: center;
}

.author-socials a {
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  padding: 7px 14px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid var(--docs-border);
  color: #0f172a;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.author-socials a:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.author-socials a.whatsapp { color: #16a34a; }
.author-socials a.telegram { color: #0284c7; }
.author-socials a.youtube { color: #dc2626; }

