/* Styling rules for Documentation Article Pages (Getting Started, etc.) */

/* ===== Docs Article Hero ===== */
.docs-article-hero {
  padding: 130px 0 50px 0;
  background: var(--hero-gradient);
  text-align: center;
  border-bottom: none;
  position: relative;
  z-index: 10;
}

.docs-article-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(92, 26, 195, 0) 0%, rgba(92, 26, 195, 0.3) 50%, rgba(92, 26, 195, 0) 100%);
}

body.light-mode .docs-article-hero::after {
  background: linear-gradient(90deg, rgba(69, 73, 117, 0) 0%, rgba(69, 73, 117, 0.2) 50%, rgba(69, 73, 117, 0) 100%);
}

.docs-article-breadcrumbs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  animation: fadeInUp 0.8s ease forwards;
}

.docs-article-breadcrumbs a {
  color: var(--text-muted);
  transition: var(--transition-smooth);
}

.docs-article-breadcrumbs a:hover {
  color: var(--accent-cyan);
}

body.light-mode .docs-article-breadcrumbs a:hover {
  color: var(--accent-cyan-dark);
}

.docs-article-hero-title {
  font-size: 2.5rem;
  font-weight: var(--fw-black);
  color: var(--text-white);
  margin-bottom: 15px;
  animation: fadeInUp 0.8s ease 0.1s forwards;
  opacity: 0;
}

.docs-article-hero-meta {
  font-size: 0.95rem;
  color: var(--accent-cyan);
  font-weight: var(--fw-medium);
  animation: fadeInUp 0.8s ease 0.2s forwards;
  opacity: 0;
}

body.light-mode .docs-article-hero-meta {
  color: var(--accent-cyan-dark);
}

/* ===== Main 3-Column Layout ===== */
.docs-article-section {
  padding: 60px 0 100px 0;
  background-color: var(--bg-dark);
}

.docs-article-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 50px;
  align-items: start;
}

/* ===== Left Navigation Sidebar ===== */
.docs-sidebar-nav {
  position: sticky;
  top: 110px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  scrollbar-width: thin;
  padding-inline-end: 10px;
}

.docs-sidebar-card {
  background-color: transparent;
  border: none;
}

.docs-sidebar-nav-title {
  font-size: 0.85rem;
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-gray);
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color-soft);
}

.docs-sidebar-categories {
  display: flex;
  flex-direction: column;
  gap: 15px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.docs-sidebar-cat-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.docs-sidebar-cat-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: inherit;
  font-size: 1rem;
  font-weight: var(--fw-bold);
  color: var(--text-white);
  cursor: pointer;
  padding: 6px 0;
  background: none;
  border: none;
  outline: none;
  transition: var(--transition-smooth);
}

.docs-sidebar-cat-toggle:hover {
  color: var(--accent-cyan);
}

body.light-mode .docs-sidebar-cat-toggle:hover {
  color: var(--accent-cyan-dark);
}

.docs-sidebar-cat-toggle .docs-sidebar-cat-icon {
  font-size: 16px;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-gray);
  transition: var(--transition-smooth);
  transform: rotate(0deg); /* Points left in RTL collapsed */
}

/* In LTR, collapsed chevron points right (rotate 180deg) */
html[dir="ltr"] .docs-sidebar-cat-toggle .docs-sidebar-cat-icon {
  transform: rotate(180deg);
}

/* Expanded state: chevron points down */
/* In RTL: rotate -90deg (left to down) */
.docs-sidebar-cat-group.active .docs-sidebar-cat-toggle .docs-sidebar-cat-icon {
  transform: rotate(-90deg);
}

/* In LTR: rotate 90deg (right to down) */
html[dir="ltr"] .docs-sidebar-cat-group.active .docs-sidebar-cat-toggle .docs-sidebar-cat-icon {
  transform: rotate(90deg);
}

.docs-sidebar-articles {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding-inline-start: 15px;
  border-inline-start: 1px solid var(--border-color-medium);
  margin-inline-start: 5px;
  list-style: none;
  padding: 0;
  margin: 0;
  padding-inline-start: 15px;
}

.docs-sidebar-cat-group.active .docs-sidebar-articles {
  display: flex;
}

.docs-sidebar-articles li {
  position: relative;
  list-style: none;
  padding: 0;
  margin: 0;
}

.docs-sidebar-articles a {
  display: block;
  font-size: 0.9rem;
  font-weight: var(--fw-medium);
  color: var(--text-muted);
  padding: 4px 0;
  line-height: 1.4;
  transition: var(--transition-smooth);
}

.docs-sidebar-articles a:hover {
  color: var(--accent-cyan);
}

body.light-mode .docs-sidebar-articles a:hover {
  color: var(--accent-cyan-dark);
}

.docs-sidebar-articles li.active a {
  color: var(--accent-cyan);
  font-weight: var(--fw-bold);
}

body.light-mode .docs-sidebar-articles li.active a {
  color: var(--accent-cyan-dark);
}

/* Active indicator line */
.docs-sidebar-articles li::before {
  content: '';
  position: absolute;
  top: 50%;
  inset-inline-start: -16px;
  transform: translateY(-50%);
  width: 2px;
  height: 0;
  background-color: var(--accent-cyan);
  transition: var(--transition-smooth);
}

body.light-mode .docs-sidebar-articles li::before {
  background-color: var(--accent-cyan-dark);
}

.docs-sidebar-articles li.active::before {
  height: 60%;
}

/* ===== Center Article Content ===== */
.docs-article-content {
  max-width: 800px;
  width: 100%;
}

.docs-article-lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 40px;
}

.docs-content-block {
  scroll-margin-top: 110px;
  padding-bottom: 40px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border-color-soft);
}

.docs-content-block:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
}

.docs-content-block h2 {
  font-size: 1.7rem;
  color: var(--text-white);
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
}

.docs-content-block h2::after {
  content: '';
  position: absolute;
  bottom: -6px;
  inset-inline-start: 0;
  width: 35px;
  height: 3px;
  background-color: var(--accent-cyan);
  border-radius: 1.5px;
}

body.light-mode .docs-content-block h2::after {
  background-color: var(--accent-cyan-dark);
}

.docs-content-block p {
  color: var(--text-muted);
  font-size: 1.02rem;
  line-height: 1.85;
  margin-bottom: 25px;
  white-space: pre-line;
}

/* ===== Callouts (Alerts) ===== */
.docs-callout {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 20px;
  border-radius: var(--border-radius-sm);
  margin-bottom: 25px;
  border: 1px solid;
}

.docs-callout-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.docs-callout-icon svg, .docs-callout-icon i {
  font-size: 22px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.docs-callout-text {
  font-size: 0.98rem;
  line-height: 1.7;
  text-align: start;
}

/* Info Callout */
.docs-callout-info {
  background-color: rgba(37, 212, 227, 0.04);
  border-color: rgba(37, 212, 227, 0.15);
  color: var(--text-muted);
}

.docs-callout-info .docs-callout-icon svg,
.docs-callout-info .docs-callout-icon i {
  color: var(--accent-cyan);
}

body.light-mode .docs-callout-info {
  background-color: rgba(0, 180, 216, 0.03);
  border-color: rgba(0, 180, 216, 0.15);
}

body.light-mode .docs-callout-info .docs-callout-icon svg,
body.light-mode .docs-callout-info .docs-callout-icon i {
  color: var(--accent-cyan-dark);
}

/* Warning Callout */
.docs-callout-warning {
  background-color: rgba(255, 94, 94, 0.04);
  border-color: rgba(255, 94, 94, 0.15);
  color: var(--text-muted);
}

.docs-callout-warning .docs-callout-icon svg,
.docs-callout-warning .docs-callout-icon i {
  color: var(--error-red);
}

body.light-mode .docs-callout-warning {
  background-color: rgba(255, 94, 94, 0.03);
  border-color: rgba(255, 94, 94, 0.15);
}

/* ===== Copyable Code Blocks ===== */
.docs-code-wrapper {
  margin: 25px 0;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-color-medium);
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.docs-code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #0c0722;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border-color-medium);
}

body.light-mode .docs-code-header {
  background-color: #f1f2f6;
}

.docs-code-lang {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.85rem;
  font-weight: var(--fw-bold);
  color: var(--text-gray);
}

.docs-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
  padding: 4px 8px;
  border-radius: 4px;
}

.docs-copy-btn:hover {
  color: var(--accent-cyan);
  background-color: rgba(255, 255, 255, 0.05);
}

body.light-mode .docs-copy-btn:hover {
  color: var(--accent-cyan-dark);
  background-color: rgba(25, 30, 58, 0.05);
}

.docs-copy-btn.copied {
  color: #2ec4b6 !important;
}

.docs-code-pre {
  background-color: #12092c;
  padding: 20px;
  overflow-x: auto;
  margin: 0;
}

body.light-mode .docs-code-pre {
  background-color: #fafbfc;
}

.docs-code-pre code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
  text-align: start;
  direction: ltr;
  display: block;
}

body.light-mode .docs-code-pre code {
  color: #24292e;
}

/* ===== Prev / Next Navigation ===== */
.docs-article-navigation {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid var(--border-color-medium);
  gap: 20px;
}

.docs-nav-link {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 24px;
  border: 1px solid var(--border-color-medium);
  border-radius: var(--border-radius-sm);
  background-color: rgba(255, 255, 255, 0.015);
  transition: var(--transition-smooth);
}

.docs-nav-link:hover {
  border-color: var(--accent-cyan);
  background-color: rgba(37, 212, 227, 0.03);
  box-shadow: 0 8px 30px rgba(37, 212, 227, 0.08);
}

body.light-mode .docs-nav-link {
  background-color: rgba(25, 30, 58, 0.015);
  border-color: rgba(25, 30, 58, 0.08);
}

body.light-mode .docs-nav-link:hover {
  border-color: var(--accent-cyan-dark);
  background-color: rgba(0, 180, 216, 0.03);
  box-shadow: 0 8px 30px rgba(0, 180, 216, 0.05);
}

.docs-nav-link svg, .docs-nav-link i {
  font-size: 22px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  transition: var(--transition-smooth);
}

body.light-mode .docs-nav-link svg, body.light-mode .docs-nav-link i {
  color: var(--accent-cyan-dark);
}

.docs-nav-link:hover svg, .docs-nav-link:hover i {
  color: var(--text-white);
}

body.light-mode .docs-nav-link:hover svg, body.light-mode .docs-nav-link:hover i {
  color: var(--text-dark);
}

.docs-nav-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.prev-link {
  text-align: start;
}

.next-link {
  text-align: end;
  justify-content: flex-end;
}

.nav-label {
  font-size: 0.8rem;
  color: var(--text-gray);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.nav-title {
  font-size: 0.98rem;
  font-weight: var(--fw-bold);
  color: var(--text-white);
}

.docs-nav-link:hover .nav-title {
  color: var(--accent-cyan);
}

body.light-mode .docs-nav-link:hover .nav-title {
  color: var(--accent-cyan-dark);
}

.prev-link:hover svg, .prev-link:hover i {
  transform: translateX(-4px); /* Moves left in LTR */
}

.next-link:hover svg, .next-link:hover i {
  transform: translateX(4px); /* Moves right in LTR */
}



/* ===== Responsive Breakpoints ===== */
@media (max-width: 1200px) {
  .docs-article-grid {
    grid-template-columns: 220px 1fr;
    gap: 30px;
  }
}

@media (max-width: 992px) {
  .docs-article-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  .docs-sidebar-nav {
    position: static;
    max-height: none;
    margin-bottom: 40px;
    padding-inline-end: 0;
  }
  
  .docs-article-hero {
    padding: 120px 0 45px 0;
  }
  
  .docs-article-hero-title {
    font-size: 2.2rem;
  }
  
  .docs-content-block h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 768px) {
  .docs-article-navigation {
    flex-direction: column;
    gap: 15px;
  }
  
  .docs-nav-link {
    width: 100%;
  }
}

@media (max-width: 576px) {
  .docs-article-hero-title {
    font-size: 1.8rem;
  }
  
  .docs-article-lead {
    font-size: 1rem;
    margin-bottom: 30px;
  }
  
  .docs-content-block p {
    font-size: 0.95rem;
    line-height: 1.75;
  }
  
  .docs-callout {
    padding: 15px;
    gap: 10px;
  }
  
  .docs-code-pre {
    padding: 15px;
  }
}

/* ===== Image & Video Preview Blocks ===== */
.docs-image-wrapper, .docs-video-wrapper {
  margin: 35px 0;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color-medium);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  background-color: var(--bg-card);
}

.docs-image-preview {
  width: 100%;
  height: auto;
  display: block;
}

.docs-image-caption, .docs-video-caption {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  font-size: 0.9rem;
  font-weight: var(--fw-medium);
  color: var(--text-muted);
  text-align: start;
  border-top: 1px solid var(--border-color-medium);
  background-color: #0c0722;
}

body.light-mode .docs-image-caption,
body.light-mode .docs-video-caption {
  background-color: #f1f2f6;
  border-top-color: rgba(25, 30, 58, 0.08);
}

.caption-icon {
  font-size: 18px;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  flex-shrink: 0;
}

body.light-mode .caption-icon {
  color: var(--accent-cyan-dark);
}

.docs-video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #000000;
  cursor: pointer;
}

.docs-video-element {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.docs-video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.docs-video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(6, 8, 24, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none; /* Let clicks pass through */
}

.docs-video-play-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background-color: var(--accent-cyan);
  color: var(--text-dark);
  border: none;
  outline: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 30px rgba(37, 212, 227, 0.5);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease, box-shadow 0.3s ease;
  pointer-events: auto; /* Catch clicks on button */
}

.docs-video-play-btn svg, .docs-video-play-btn i {
  font-size: 26px;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-inline-start: 4px; /* visually center play triangle */
}

.docs-video-play-btn:hover {
  transform: scale(1.08);
  background-color: var(--text-white);
  box-shadow: 0 0 40px rgba(255, 255, 255, 0.8);
}

.docs-video-container.playing .docs-video-overlay {
  opacity: 0;
  visibility: hidden;
}

body.light-mode .docs-image-wrapper,
body.light-mode .docs-video-wrapper {
  box-shadow: 0 10px 30px rgba(25, 30, 58, 0.04);
  border-color: rgba(25, 30, 58, 0.08);
}

body.light-mode .docs-image-caption,
body.light-mode .docs-video-caption {
  background-color: rgba(25, 30, 58, 0.01);
  border-top-color: rgba(25, 30, 58, 0.04);
}

body.light-mode .docs-video-play-btn {
  background-color: var(--accent-cyan-dark);
  color: var(--text-white);
  box-shadow: 0 0 25px rgba(0, 180, 216, 0.4);
}

body.light-mode .docs-video-play-btn:hover {
  background-color: var(--text-dark);
  box-shadow: 0 0 35px rgba(24, 11, 61, 0.5);
}

/* Link styling inside article paragraphs */
.docs-content-block p a {
  color: var(--accent-cyan);
  text-decoration: underline;
  font-weight: var(--fw-medium);
  transition: var(--transition-smooth);
}

.docs-content-block p a:hover {
  color: var(--text-white);
  text-decoration: none;
}

body.light-mode .docs-content-block p a {
  color: var(--accent-cyan-dark);
}

body.light-mode .docs-content-block p a:hover {
  color: var(--text-dark);
}

/* ===== RTL / Language overrides for arrow directions ===== */
/* RTL Pagination SVG Base Rotation */
html[dir="rtl"] .docs-nav-link svg, html[dir="rtl"] .docs-nav-link i {
  transform: rotate(180deg);
}

/* RTL Pagination Hover Animation */
html[dir="rtl"] .prev-link:hover svg, html[dir="rtl"] .prev-link:hover i {
  transform: translateX(4px) rotate(180deg); /* Moves right on screen */
}

html[dir="rtl"] .next-link:hover svg, html[dir="rtl"] .next-link:hover i {
  transform: translateX(-4px) rotate(180deg); /* Moves left on screen */
}

/* ===== Simple Documentation Steps Block ===== */
.docs-steps-list {
  padding-inline-start: 25px;
  margin: 25px 0;
  list-style-type: decimal;
}

/* Also support list wrapper if it's a ul container for custom step items */
ul.docs-steps-list {
  list-style-type: none;
  padding-inline-start: 0;
}

.docs-steps-list li {
  margin-bottom: 18px;
  color: var(--text-muted);
  font-size: 1.02rem;
  line-height: 1.85;
}

.docs-steps-list li:last-child {
  margin-bottom: 0;
}

.docs-steps-list li::marker {
  color: var(--accent-cyan);
  font-weight: var(--fw-bold);
  font-size: 1.1rem;
}

body.light-mode .docs-steps-list li::marker {
  color: var(--accent-cyan-dark);
}

/* Fallback styling for custom step items markup inside database */
.docs-steps-list .docs-step-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}

.docs-steps-list .docs-step-item:last-child {
  margin-bottom: 0;
}

.docs-steps-list .docs-step-badge {
  color: var(--accent-cyan) !important;
  font-weight: var(--fw-bold) !important;
  font-size: 1.1rem !important;
  min-width: 24px;
  display: inline-flex !important;
  align-items: center;
  justify-content: flex-start;
  margin-top: 2px;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  width: auto !important;
  height: auto !important;
  position: static !important;
  border-radius: 0 !important;
  transition: none !important;
}

body.light-mode .docs-steps-list .docs-step-badge {
  color: var(--accent-cyan-dark) !important;
}

.docs-steps-list .docs-step-content {
  padding-inline-start: 0 !important;
  flex: 1;
}

.docs-steps-list .docs-step-text {
  margin-bottom: 0 !important;
  color: var(--text-muted) !important;
  font-size: 1.02rem !important;
  line-height: 1.85 !important;
}



