/* Documentation Page Styles */

/* Ensure container and section don't overflow on documentation page */
section.section {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

section.section .container {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding-left: 20px;
  padding-right: 20px;
}

.documentation-wrapper {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 40px;
  max-width: 100%;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

/* Sidebar Navigation */
.documentation-sidebar {
  position: sticky;
  top: 100px;
  align-self: start;
  height: fit-content;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.doc-nav {
  background: var(--color-bg-light);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.doc-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.doc-nav-link {
  display: block;
  padding: 10px 14px;
  color: var(--color-text);
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.doc-nav-link:hover {
  background: var(--color-bg-lighter);
  color: var(--color-accent);
  border-color: var(--color-border);
}

.doc-nav-link.active {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
  font-weight: 600;
}

/* Main Content */
.documentation-content {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-wrap: break-word;
  min-width: 0;
  overflow-x: hidden;
}

.doc-section {
  margin-bottom: 60px;
  scroll-margin-top: 120px;
  width: 100%;
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.doc-section:last-child {
  margin-bottom: 0;
}

.doc-section h2 {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-border);
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  max-width: 100%;
}

.doc-section h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-primary);
  margin: 24px 0 12px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  max-width: 100%;
}

.doc-section p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-text-light);
  margin: 0 0 20px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  max-width: 100%;
}

.doc-section ul {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}

.doc-section li {
  font-size: 15px;
  line-height: 1.8;
  color: var(--color-text-light);
  margin-bottom: 12px;
  padding-left: 24px;
  position: relative;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  max-width: 100%;
}

.doc-section li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 700;
  font-size: 16px;
}

.doc-section li strong {
  color: var(--color-text);
  font-weight: 600;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Responsive Design */
@media (max-width: 968px) {
  section.section .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .documentation-wrapper {
    grid-template-columns: 1fr;
    gap: 24px;
    width: 100%;
    max-width: 100%;
    padding: 0;
    box-sizing: border-box;
    min-width: 0;
  }

  .documentation-sidebar {
    position: relative;
    top: 0;
    width: 100%;
    box-sizing: border-box;
  }

  .doc-nav {
    position: sticky;
    top: 80px;
    z-index: 10;
    width: 100%;
    box-sizing: border-box;
  }

  .doc-nav-list {
    flex-direction: row;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .doc-nav-link {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .doc-section {
    scroll-margin-top: 100px;
    width: 100%;
    box-sizing: border-box;
    padding: 0;
  }

  .doc-section h2,
  .doc-section h3,
  .doc-section p,
  .doc-section li {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  section.section .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  section.hero .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .documentation-wrapper {
    padding: 0;
    min-width: 0;
  }

  .doc-section h2 {
    font-size: 26px;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .doc-section h3 {
    font-size: 18px;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .doc-section p,
  .doc-section li {
    font-size: 14px;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
}

@media (max-width: 480px) {
  section.section .container {
    padding-left: 12px;
    padding-right: 12px;
  }

  section.hero .container {
    padding-left: 12px;
    padding-right: 12px;
  }

  .documentation-wrapper {
    padding: 0;
    min-width: 0;
  }

  .doc-nav {
    padding: 12px;
  }

  .doc-nav-link {
    padding: 8px 12px;
    font-size: 13px;
  }

  .doc-section h2 {
    font-size: 22px;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .doc-section h3 {
    font-size: 16px;
  }

  .doc-section {
    margin-bottom: 40px;
    padding: 0;
  }

  .doc-section p,
  .doc-section li {
    font-size: 13px;
  }
}

/* Hero section fixes for documentation page only */
section.hero .hero-content h1 {
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  max-width: 100%;
  box-sizing: border-box;
}

section.hero .hero-content {
  max-width: 100%;
  box-sizing: border-box;
  width: 100%;
}

section.hero .hero-content p.sub {
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

@media (max-width: 768px) {
  section.hero .hero-content h1 {
    font-size: clamp(24px, 6vw, 32px) !important;
    line-height: 1.2;
  }

  section.hero .hero-content p.sub {
    font-size: clamp(14px, 3vw, 16px) !important;
  }
}

