/* ===============================================
   DOCUMENTATION STYLES
   =============================================== */

/* Documentation Layout */
.docs-main {
  position: relative;
  z-index: 1;
}

.docs-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.docs-header {
  text-align: center;
  padding: var(--space-3xl) 0 var(--space-2xl);
  margin-bottom: var(--space-2xl);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.docs-title {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-lg);
  background: linear-gradient(135deg, #ffffff 0%, #ffffff 50%, #f0f0f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.02em;
  font-family: 'JetBrains Mono', monospace;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.docs-subtitle {
  font-size: var(--font-size-lg);
  color: rgba(255, 255, 255, 0.8);
  max-width: 700px;
  margin: 0 auto;
  opacity: 0.9;
}

.docs-layout {
  display: block;
  margin-bottom: 5rem;
}

/* Documentation Sidebar */
.docs-sidebar {
  position: fixed;
  top: 120px; /* Back to header level since title moved */
  left: calc((100vw - 1400px) / 2 + 2rem); /* Align with container but offset */
  width: 280px;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(25px) saturate(120%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  z-index: 100;
}

.docs-nav-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.docs-nav-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0;
}

.docs-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.docs-nav-link {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-weight: 500;
  font-size: 0.875rem;
  position: relative;
  border-left: 2px solid transparent;
}

.docs-nav-link:hover,
.docs-nav-link:focus {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border-left-color: #ffffff;
  transform: translateX(4px);
}

.docs-nav-link.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  border-left-color: #ffffff;
  font-weight: 600;
  transform: translateX(4px);
}

/* Documentation Content */
.docs-content {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(25px) saturate(120%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 3rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  margin-left: 320px; /* Adjusted for better positioning */
  max-width: calc(100% - 340px);
  margin-top: 2rem; /* Add top margin to create space from header */
}

.docs-section {
  margin-bottom: 4rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.docs-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.docs-section-title {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: #ffffff;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.02em;
  position: relative;
}

.docs-section-title::before {
  content: '# ';
  color: rgba(255, 255, 255, 0.6);
  font-weight: normal;
}

.docs-subsection-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 2rem 0 1rem;
  color: #ffffff;
  position: relative;
}

.docs-subsection-title::before {
  content: '## ';
  color: rgba(255, 255, 255, 0.4);
  font-weight: normal;
  font-size: 0.8em;
}

.docs-text {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.8;
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.docs-list {
  color: rgba(255, 255, 255, 0.8);
  margin-left: 2rem;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.docs-list li {
  margin-bottom: 0.75rem;
  position: relative;
}

.docs-list li::marker {
  color: #ffffff;
}

/* Documentation Code Blocks */
.code-block {
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  overflow-x: auto;
  position: relative;
  backdrop-filter: blur(10px);
}

.code-block::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
}

.code-block pre {
  margin: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  color: #ffffff;
  white-space: pre;
  line-height: 1.6;
}

.code-block code {
  font-family: 'JetBrains Mono', monospace;
  color: #e8e8e8;
}

/* Documentation Warning/Info Boxes */
.docs-warning {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid #ffffff;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  position: relative;
  backdrop-filter: blur(10px);
}

.docs-warning::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: #ffffff;
  border-radius: 4px 0 0 4px;
}

.docs-warning h3,
.docs-warning h4 {
  color: #ffffff;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.docs-info {
  background: rgba(230, 126, 34, 0.1);
  border: 1px solid #e67e22;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  position: relative;
  backdrop-filter: blur(10px);
}

.docs-info::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: #e67e22;
  border-radius: 4px 0 0 4px;
}

.docs-info h4 {
  color: #e67e22;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

/* Documentation Grids */
.intelligence-sources-grid,
.opsec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.source-item,
.opsec-item {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(15px);
  position: relative;
  overflow: hidden;
}

.source-item::before,
.opsec-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.source-item:hover,
.opsec-item:hover {
  border-color: #ffffff;
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.source-item:hover::before,
.opsec-item:hover::before {
  opacity: 1;
}

.source-title,
.opsec-item h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 1;
}

.source-description,
.opsec-item p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

/* API Documentation */
.api-endpoint {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  backdrop-filter: blur(15px);
}

.api-method {
  font-family: 'JetBrains Mono', monospace;
  color: #ffffff;
  margin-bottom: 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.api-description {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1rem;
  line-height: 1.6;
}

/* Troubleshooting */
.troubleshooting-item {
  margin-bottom: 2rem;
}

.troubleshooting-item h4 {
  color: #ffffff;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.troubleshooting-item p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1rem;
  line-height: 1.7;
}

/* Documentation Responsive */
@media (max-width: 1024px) {
  .docs-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .docs-sidebar {
    position: fixed;
    top: 120px;
    left: 1rem;
    right: 1rem;
    width: auto;
    z-index: 1000;
  }
  
  .docs-content {
    margin-left: 0;
    max-width: 100%;
    margin-top: 250px; /* Space for fixed sidebar */
  }
  
  .docs-nav-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
  }
}

@media (max-width: 768px) {
  .docs-container {
    padding: 0 1rem;
  }
  
  .docs-content {
    padding: 2rem;
    margin-left: 0;
    max-width: 100%;
    margin-top: 250px; /* Space for fixed sidebar on mobile */
  }
  
  .docs-sidebar {
    position: fixed;
    top: 120px;
    left: 1rem;
    right: 1rem;
    width: auto;
    max-height: 180px;
    z-index: 1000;
  }
  
  .docs-title {
    font-size: 2.25rem;
  }
  
  .docs-section-title {
    font-size: 1.875rem;
  }
  
  .intelligence-sources-grid,
  .opsec-grid {
    grid-template-columns: 1fr;
  }
}
