/**
 * Amphibious 2.0 Documentation Styles
 * Additional styles specific to the documentation pages
 */

/* ============================================================================
   Base Documentation Styles
   ============================================================================ */

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #fff;
}

/* Container override for docs */
.aiab-container {
  max-width: 1200px;
  width: 96%;
  margin: 0 auto;
  padding: 0 20px;
}

/* Lead text */
.lead {
  font-size: 1.25rem;
  font-weight: 300;
  color: #6c757d;
  margin-bottom: 1.5rem;
}

/* ============================================================================
   Documentation Navigation
   ============================================================================ */

/* Site Navigation */
.aiab-site-nav {
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.aiab-site-nav .aiab-container {
  position: relative;
}

/* Horizontal Navigation */
.aiab-horizontal.aiab-branded {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.aiab-horizontal.aiab-branded > li {
  position: relative;
}

.aiab-horizontal.aiab-branded a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s;
}

.aiab-horizontal.aiab-branded a:hover,
.aiab-horizontal.aiab-branded li.aiab-active > a {
  color: #667eea;
}

.aiab-site-logo {
  font-size: 1.25rem;
  font-weight: 600;
  color: #667eea;
}

/* Dropdown menus */
.aiab-horizontal.aiab-branded ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-radius: 0.5rem;
  padding: 0.5rem 0;
  min-width: 200px;
  list-style: none;
  margin-top: 0.5rem;
  z-index: 1000;
}

.aiab-horizontal.aiab-branded li:hover > ul {
  display: block;
}

.aiab-horizontal.aiab-branded ul a {
  padding: 0.5rem 1rem;
  display: block;
  font-weight: normal;
  font-size: 0.925rem;
}

.aiab-horizontal.aiab-branded ul a:hover {
  background: #f8f9fa;
}

.docs-nav {
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  padding: 1rem 0;
  margin-bottom: 2rem;
}

.docs-nav .aiab-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.docs-nav h1 {
  margin: 0;
  font-size: 1.5rem;
  color: #343a40;
}

.docs-nav .nav-links,
.docs-nav .aiab-nav-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.docs-nav .nav-links a,
.docs-nav .aiab-nav-links a {
  color: #6c757d;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  transition: all 0.2s ease;
}

.docs-nav .nav-links a:hover,
.docs-nav .nav-links a.aiab-active,
.docs-nav .aiab-nav-links a:hover,
.docs-nav .aiab-nav-links a.aiab-active {
  background: #fff;
  color: #007bff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ============================================================================
   Section Styles
   ============================================================================ */

.section {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #eee;
}

.section:last-child {
  border-bottom: none;
}

.section h2 {
  color: #2c5f2d;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #97bc62;
  font-size: 2rem;
}

.section h3 {
  color: #495057;
  margin: 1.5rem 0 1rem 0;
  font-size: 1.5rem;
}

.section h4 {
  color: #6c757d;
  margin: 1rem 0 0.5rem 0;
  font-size: 1.25rem;
}

/* ============================================================================
   Example Containers
   ============================================================================ */

.example {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  padding: 1.5rem;
  margin: 1rem 0;
}

.example-title {
  font-weight: 600;
  margin-bottom: 1rem;
  color: #495057;
  font-size: 1rem;
}

/* ============================================================================
   Code Blocks
   ============================================================================ */

.code-block {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  padding: 1rem;
  margin: 1rem 0;
  overflow-x: auto;
}

.code-block pre {
  margin: 0;
  font-family: "Monaco", "Menlo", "Ubuntu Mono", "Courier New", monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #212529;
}

.code-block code {
  background: none;
  padding: 0;
  border: none;
  font-size: inherit;
  color: inherit;
}

/* Inline code */
code {
  background: #e9ecef;
  padding: 0.125rem 0.25rem;
  border-radius: 0.125rem;
  font-size: 0.875em;
  font-family: "Monaco", "Menlo", "Ubuntu Mono", "Courier New", monospace;
  color: #e83e8c;
}

/* ============================================================================
   Typography Enhancements
   ============================================================================ */

header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: #212529;
}

header p {
  font-size: 1.25rem;
  color: #6c757d;
}

/* Lists */
ul,
ol {
  margin: 1rem 0;
  padding-left: 2rem;
}

li {
  margin-bottom: 0.5rem;
}

/* Links */
a {
  color: #007bff;
  text-decoration: none;
}

a:hover {
  color: #0056b3;
  text-decoration: underline;
}

/* ============================================================================
   Responsive Adjustments
   ============================================================================ */

@media (max-width: 768px) {
  .docs-nav .aiab-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .docs-nav h1 {
    margin-bottom: 1rem;
  }

  .docs-nav .nav-links {
    width: 100%;
  }

  .section h2 {
    font-size: 1.75rem;
  }

  .section h3 {
    font-size: 1.25rem;
  }

  header h1 {
    font-size: 2rem;
  }
}

/* ============================================================================
   Print Styles
   ============================================================================ */

@media print {
  .aiab-site-nav,
  .docs-nav {
    display: none;
  }

  .example {
    border: 1px solid #000;
    page-break-inside: avoid;
  }

  .code-block {
    border: 1px solid #000;
    page-break-inside: avoid;
  }
}
