/* ============================================
   DXIP Whitepaper – Styles específicos
   ============================================ */

.whitepaper-container {
  display: flex;
  min-height: 100vh;
  padding-top: 70px;
  position: relative;
  z-index: 1;
}

/* --- Sidebar Navigation --- */
.whitepaper-sidebar {
  position: fixed;
  left: 0;
  top: 70px;
  width: 280px;
  height: calc(100vh - 70px);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-subtle);
  overflow-y: auto;
  padding: 2rem 0;
  z-index: 100;
}

.whitepaper-sidebar::-webkit-scrollbar {
  width: 4px;
}

.whitepaper-sidebar::-webkit-scrollbar-thumb {
  background: var(--accent-orange);
  border-radius: 2px;
}

.sidebar-header {
  padding: 0 1.5rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1.5rem;
}

.sidebar-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.sidebar-header .version {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.sidebar-nav {
  list-style: none;
  padding: 0;
}

.sidebar-nav > li {
  margin-bottom: 0.25rem;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  padding: 0.65rem 1.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.3s;
  border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.sidebar-nav a.active {
  color: var(--accent-orange);
  background: rgba(255, 107, 43, 0.08);
  border-left-color: var(--accent-orange);
}

.sidebar-nav .section-number {
  min-width: 24px;
  font-weight: 700;
  color: var(--accent-orange);
  font-size: 0.8rem;
}

/* Mobile sidebar toggle */
.sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 2rem;
  left: 1rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-orange), #e55a1b);
  border: none;
  color: white;
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(255, 107, 43, 0.4);
  transition: var(--transition-smooth);
}

.sidebar-toggle:hover {
  transform: scale(1.1);
}

/* --- Content Area --- */
.whitepaper-content {
  flex: 1;
  margin-left: 280px;
  padding: 3rem;
  max-width: 900px;
}

.wp-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--border-subtle);
}

.wp-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-orange-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.wp-meta {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.wp-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.wp-meta-item strong {
  color: var(--text-secondary);
}

/* --- Content Sections --- */
.wp-section {
  margin-bottom: 4rem;
  scroll-margin-top: 100px;
}

.wp-section h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.wp-section h2 .section-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 107, 43, 0.15), rgba(255, 107, 43, 0.05));
  border: 1px solid rgba(255, 107, 43, 0.2);
  font-size: 1rem;
  color: var(--accent-orange);
}

.wp-section h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 2rem 0 1rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.wp-section h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 1.5rem 0 0.75rem;
  color: var(--accent-orange);
}

.wp-section p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.wp-section strong {
  color: var(--text-primary);
  font-weight: 600;
}

.wp-section ul,
.wp-section ol {
  margin: 1rem 0 1.5rem 1.5rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.wp-section li {
  margin-bottom: 0.5rem;
  padding-left: 0.5rem;
}

.wp-section ul li::marker {
  color: var(--accent-orange);
}

/* --- Code blocks --- */
.wp-section pre {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.wp-section code {
  background: rgba(255, 107, 43, 0.1);
  color: var(--accent-orange);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.875em;
}

.wp-section pre code {
  background: none;
  color: inherit;
  padding: 0;
}

/* --- Tables --- */
.wp-section table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  overflow: hidden;
}

.wp-section thead {
  background: rgba(255, 107, 43, 0.08);
}

.wp-section th {
  padding: 0.875rem;
  text-align: left;
  font-weight: 700;
  color: var(--accent-orange);
  border-bottom: 1px solid var(--border-subtle);
}

.wp-section td {
  padding: 0.875rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.wp-section tbody tr:last-child td {
  border-bottom: none;
}

.wp-section tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* --- Blockquotes / Callouts --- */
.wp-section blockquote {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, rgba(255, 107, 43, 0.08), rgba(255, 107, 43, 0.03));
  border-left: 4px solid var(--accent-orange);
  border-radius: 8px;
  font-style: italic;
  color: var(--text-secondary);
}

/* --- Warning/Risk boxes --- */
.risk-box {
  margin: 2rem 0;
  padding: 1.5rem;
  background: rgba(255, 200, 50, 0.05);
  border: 1px solid rgba(255, 200, 50, 0.2);
  border-radius: 12px;
  border-left: 4px solid #fbbf24;
}

.risk-box h4 {
  color: #fbbf24;
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.risk-box p {
  margin-bottom: 0.75rem;
}

.risk-box p:last-child {
  margin-bottom: 0;
}

/* --- Important/Highlight boxes --- */
.important-box {
  margin: 2rem 0;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(145, 94, 255, 0.08), rgba(145, 94, 255, 0.03));
  border: 1px solid rgba(145, 94, 255, 0.2);
  border-radius: 12px;
  border-left: 4px solid var(--accent-purple);
}

.important-box strong {
  color: var(--accent-purple);
}

/* --- Success/Check boxes --- */
.success-list {
  list-style: none;
  margin-left: 0 !important;
  padding-left: 0 !important;
}

.success-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.5rem 0;
}

.success-list li::before {
  content: "✅";
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

/* --- Back to top button --- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-orange), #e55a1b);
  border: none;
  color: white;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
  z-index: 999;
  box-shadow: 0 4px 20px rgba(255, 107, 43, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 25px rgba(255, 107, 43, 0.5);
}

/* --- Download CTA --- */
.download-cta {
  margin: 3rem 0;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(255, 107, 43, 0.1), rgba(145, 94, 255, 0.05));
  border: 1px solid var(--border-accent);
  border-radius: 16px;
  text-align: center;
}

.download-cta h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.download-cta p {
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .whitepaper-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
  }

  .whitepaper-sidebar.open {
    transform: translateX(0);
  }

  .sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .whitepaper-content {
    margin-left: 0;
    padding: 2rem 1.5rem;
  }

  .wp-header h1 {
    font-size: 1.8rem;
  }

  .wp-section h2 {
    font-size: 1.5rem;
  }

  .wp-section h3 {
    font-size: 1.2rem;
  }
}

@media (max-width: 768px) {
  .whitepaper-content {
    padding: 1.5rem 1rem;
  }

  .wp-meta {
    flex-direction: column;
    gap: 0.5rem;
  }

  .wp-section {
    margin-bottom: 3rem;
  }

  .wp-section table {
    font-size: 0.8rem;
  }

  .wp-section th,
  .wp-section td {
    padding: 0.5rem;
  }

  .back-to-top {
    bottom: 5rem;
    right: 1rem;
  }
}
