/* ==========================================================================
   PanoRA Documentation Stylesheet (marketing/docs.css)
   Clean, Modern, Linear / Stripe-style Developer Documentation
   ========================================================================== */

.docs-body {
  background: #07090e;
  color: #f8fafc;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

/* --- Dokümantasyon Header --- */
.docs-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 9, 14, 0.88);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 24px;
}

.container-fluid {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.docs-badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: #818cf8;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
}

.docs-search-wrapper {
  flex: 1;
  max-width: 540px;
  position: relative;
  display: flex;
  align-items: center;
}

.docs-search-wrapper .search-icon {
  position: absolute;
  left: 14px;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  pointer-events: none;
}

.docs-search-wrapper .search-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.docs-search-wrapper input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 9px 40px 9px 38px;
  color: #ffffff;
  font-size: 0.88rem;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.docs-search-wrapper input:focus {
  outline: none;
  background: rgba(15, 20, 34, 0.95);
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.search-shortcut {
  position: absolute;
  right: 12px;
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 2px 6px;
  border-radius: 4px;
  color: #94a3b8;
  font-family: ui-monospace, monospace;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-back-link {
  font-size: 0.85rem;
  color: #94a3b8;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-back-link:hover {
  color: #ffffff;
}

.btn-sm-primary {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
  transition: transform 0.15s ease;
}

.btn-sm-primary:hover {
  transform: translateY(-1px);
}

/* --- 3 Sütunlu Dokümantasyon Grid Layout --- */
.docs-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 220px;
  max-width: 1600px;
  margin: 0 auto;
  min-height: calc(100vh - 65px);
}

/* --- Sol Kenar Çubuğu (Sidebar) --- */
.docs-sidebar {
  position: sticky;
  top: 65px;
  height: calc(100vh - 65px);
  overflow-y: auto;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  padding: 24px 16px 40px;
}

.docs-sidebar::-webkit-scrollbar {
  width: 4px;
}
.docs-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.nav-group {
  margin-bottom: 24px;
}

.nav-group-title {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  padding-left: 8px;
}

.nav-group ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-group .nav-link {
  display: block;
  font-size: 0.84rem;
  color: #94a3b8;
  padding: 6px 10px;
  border-radius: 6px;
  font-weight: 500;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.nav-group .nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

.nav-group .nav-link.active {
  color: #818cf8;
  background: rgba(99, 102, 241, 0.12);
  font-weight: 600;
}

/* --- Orta Ana İçerik Alanı --- */
.docs-content {
  padding: 40px 48px 80px;
  max-width: 900px;
}

.docs-section {
  padding-bottom: 48px;
  margin-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

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

.section-kicker {
  font-size: 0.8rem;
  font-weight: 600;
  color: #818cf8;
  margin-bottom: 8px;
}

.docs-section h1 {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin-bottom: 16px;
  line-height: 1.15;
}

.docs-section h2 {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-top: 12px;
  margin-bottom: 14px;
}

.docs-section h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: #e2e8f0;
  margin-top: 24px;
  margin-bottom: 10px;
}

.lead-text {
  font-size: 1.08rem;
  line-height: 1.65;
  color: #cbd5e1;
  margin-bottom: 24px;
}

.docs-section p {
  font-size: 0.94rem;
  color: #94a3b8;
  line-height: 1.65;
  margin-bottom: 16px;
}

/* --- Callout Kutuları --- */
.callout {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 10px;
  margin: 20px 0;
  font-size: 0.88rem;
  line-height: 1.55;
}

.callout-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.callout-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.callout-info {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: #c7d2fe;
}

.callout-tip {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #a7f3d0;
}

.callout-security {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: #fde68a;
}

/* --- Feature Grid --- */
.feature-highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.doc-card {
  background: rgba(15, 20, 34, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 18px;
}

.doc-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: #818cf8;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.doc-card-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.doc-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 6px;
}

.doc-card p {
  font-size: 0.82rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.45;
}

/* --- Görsel Kutuları --- */
.docs-image-box {
  background: rgba(15, 20, 34, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px;
  margin: 20px 0;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
}

.docs-image-box img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

.image-caption {
  font-size: 0.78rem;
  color: #64748b;
  text-align: center;
  margin-top: 8px;
}

/* --- Kısayol Tabloları --- */
.table-wrapper {
  overflow-x: auto;
  margin: 20px 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(15, 20, 34, 0.4);
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}

.docs-table th, .docs-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.docs-table th {
  background: rgba(255, 255, 255, 0.03);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.docs-table td {
  color: #cbd5e1;
}

kbd {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
  color: #f1f5f9;
  display: inline-block;
  font-size: 0.76rem;
  font-family: ui-monospace, monospace;
  font-weight: 600;
  line-height: 1;
  padding: 3px 6px;
  margin: 0 2px;
}

/* --- Adım Zaman Çizelgesi --- */
.steps-timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 20px 0;
}

.step-item {
  display: flex;
  gap: 14px;
  background: rgba(15, 20, 34, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 16px;
  border-radius: 10px;
  min-width: 0;
  max-width: 100%;
}

.step-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #6366f1;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-content {
  flex: 1;
  min-width: 0;
  max-width: 100%;
}

.step-content h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 4px;
}

.step-content p {
  font-size: 0.84rem;
  color: #94a3b8;
  margin-bottom: 6px;
  word-break: break-word;
}

.step-content code {
  font-size: 0.78rem;
  color: #818cf8;
  word-break: break-all;
  display: inline-block;
}

/* --- Kod Blokları --- */
.code-block-wrapper {
  background: #0d121f;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  margin: 14px 0;
  overflow: hidden;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  padding: 8px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.78rem;
  color: #94a3b8;
  font-family: ui-monospace, monospace;
}

.copy-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.code-block-wrapper pre {
  padding: 14px;
  margin: 0;
  overflow-x: auto;
  max-width: 100%;
  box-sizing: border-box;
  font-family: ui-monospace, monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #e2e8f0;
  white-space: pre-wrap;
  word-break: break-all;
}

/* --- Listeler --- */
.docs-list, .docs-ordered-list {
  padding-left: 20px;
  margin: 14px 0;
  color: #94a3b8;
  font-size: 0.92rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.docs-list strong, .docs-ordered-list strong {
  color: #f1f5f9;
}

/* --- SSS Kutuları --- */
.faq-item {
  background: rgba(15, 20, 34, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 16px 18px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.faq-item h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 6px;
}

.faq-item p {
  font-size: 0.86rem;
  color: #94a3b8;
  margin: 0;
}

/* --- Sağ Kenar Çubuğu (On This Page - TOC) --- */
.docs-toc {
  position: sticky;
  top: 65px;
  height: calc(100vh - 65px);
  padding: 24px 16px;
  overflow-y: auto;
}

.toc-wrapper {
  border-left: 1px solid rgba(255, 255, 255, 0.07);
  padding-left: 14px;
}

.toc-title {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toc-list a {
  display: block;
  font-size: 0.8rem;
  color: #94a3b8;
  transition: color 0.15s ease;
  line-height: 1.4;
}

.toc-list a:hover {
  color: #ffffff;
}

.toc-list a.active {
  color: #818cf8;
  font-weight: 600;
}

/* --- Docs Mobile Toggle & Header --- */
.docs-mobile-toggle {
  display: none;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 6px 12px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 8px;
  color: #c7d2fe;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, color 0.2s ease;
  touch-action: manipulation;
  user-select: none;
}

.docs-mobile-toggle:active {
  transform: scale(0.95);
  background: rgba(99, 102, 241, 0.25);
  color: #ffffff;
}

.docs-sidebar-mobile-header {
  display: none;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.docs-sidebar-mobile-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
}

.docs-sidebar-close-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: #ffffff;
  font-size: 1.1rem;
  cursor: pointer;
  touch-action: manipulation;
}

.docs-sidebar-close-btn:active {
  background: rgba(255, 255, 255, 0.2);
}

body.docs-mobile-lock {
  overflow: hidden;
}

/* --- Responsive Görünüm --- */
@media (max-width: 1200px) {
  .docs-layout {
    grid-template-columns: 240px minmax(0, 1fr);
  }
  .docs-toc {
    display: none;
  }
}

@media (max-width: 768px) {
  .docs-layout {
    grid-template-columns: 1fr;
  }
  .docs-header {
    padding: 10px 14px;
  }
  .docs-header-inner {
    flex-wrap: wrap;
    gap: 10px;
  }
  .docs-search-wrapper {
    order: 3;
    width: 100%;
    max-width: 100%;
  }
  .docs-search-wrapper input {
    font-size: 16px !important; /* Prevents iOS auto-zoom */
    padding: 10px 36px 10px 36px;
  }
  .docs-mobile-toggle {
    display: inline-flex;
  }
  .docs-sidebar {
    display: none;
  }
  .docs-sidebar.mobile-open {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background: rgba(7, 9, 14, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 24px 20px 80px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .docs-sidebar.mobile-open .docs-sidebar-mobile-header {
    display: flex;
  }
  .docs-sidebar.mobile-open .docs-nav .nav-link {
    min-height: 48px;
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 2px;
  }
  .docs-content {
    padding: 20px 14px 60px;
  }
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
    margin: 16px 0;
  }
  .copy-btn {
    min-height: 40px;
    min-width: 64px;
    padding: 6px 14px;
  }
}

/* --- Language Switcher UI in Docs --- */
.lang-dropdown {
  position: relative;
  display: inline-block;
}


.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 6px 12px;
  color: #f1f5f9;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, color 0.2s ease;
  user-select: none;
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #818cf8;
  color: #ffffff;
}

.lang-globe-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.lang-btn-flag {
  font-size: 1rem;
  line-height: 1;
}

.lang-btn-name {
  font-size: 0.82rem;
}

.lang-arrow {
  width: 9px;
  height: 9px;
  color: #94a3b8;
  transition: transform 0.2s ease;
}

.lang-dropdown.open .lang-arrow {
  transform: rotate(180deg);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 8px;
  width: 270px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(16px);
  z-index: 150;
  display: none;
}

.lang-dropdown.open .lang-menu {
  display: block;
}

.lang-menu-header {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  padding: 6px 10px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 6px;
}

.lang-options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
  max-height: 320px;
  overflow-y: auto;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.lang-option:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.lang-option.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.4);
  color: #818cf8;
  font-weight: 700;
}

.lang-opt-flag {
  font-size: 1.1rem;
  line-height: 1;
}

.lang-opt-native {
  flex: 1;
}

.lang-opt-code {
  font-family: ui-monospace, monospace;
  font-size: 0.7rem;
  color: #64748b;
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
}

/* --- RTL (Right-To-Left) Support in Docs (العربية) --- */
[dir="rtl"] {
  text-align: right;
}

[dir="rtl"] .docs-header-inner {
  flex-direction: row-reverse;
}

[dir="rtl"] .docs-layout {
  grid-template-columns: minmax(0, 1fr) 260px;
}

[dir="rtl"] .docs-sidebar {
  border-right: none;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

[dir="rtl"] .docs-toc {
  display: none;
}

[dir="rtl"] .lang-menu {
  right: auto;
  left: 0;
}

[dir="rtl"] .lang-option {
  text-align: right;
  flex-direction: row-reverse;
}

[dir="rtl"] .step-item {
  flex-direction: row-reverse;
}

[dir="rtl"] .docs-list, [dir="rtl"] .docs-ordered-list {
  padding-left: 0;
  padding-right: 20px;
}

/* --- Erişilebilirlik: Prefers Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.docs-section h1, .docs-section h2, .docs-section h3 {
  text-wrap: balance;
}

.docs-table, .shortcut-badge, .port-badge, .status-badge {
  font-variant-numeric: tabular-nums;
}

