/* ========================================
   FLUX DOCUMENTATION PAGE STYLES - REFINED
   ======================================== */

/* Documentation Hero Section */
.docs-hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  padding: 4rem 0;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(88, 70, 132, 0.15);
}

.docs-hero::before {
  content: '';
  position: absolute;
  top: -5%;
  right: -5%;
  width: 35%;
  height: 200%;
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(30deg);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
}

.docs-hero::after {
  content: '';
  position: absolute;
  bottom: -5%;
  left: -5%;
  width: 25%;
  height: 150%;
  background: rgba(255, 255, 255, 0.08);
  transform: rotate(20deg);
  border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
}

.docs-hero .page-title {
  color: var(--color-white);
  margin-top: var(--space-20);
  font-size: 2.5rem;
  font-weight: 700;
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.docs-hero .page-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.125rem;
  max-width: 650px;
  margin-top: var(--space-8);
  position: relative;
  z-index: 2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Base Styles */
:root {
  --sidebar-width: 300px;
  --sidebar-mobile-height: 350px;
  --header-height: 80px;
  --content-max-width: 900px;
  --desktop-container-padding: 2rem;
  --mobile-container-padding: 1rem;
  
  /* Custom documentation color palette */
  --doc-bg-color: #fafbff;
  --doc-sidebar-bg: #ffffff;
  --doc-code-bg: #1a1e3f;
  --doc-code-header: #131530;
  --doc-border-color: rgba(88, 70, 132, 0.1);
  --doc-box-shadow: 0 4px 12px rgba(88, 70, 132, 0.08);
  --doc-highlight-color: #7A64B6;
  --doc-muted-color: rgba(110, 101, 133, 0.8);
}

/* ===== LAYOUT STRUCTURE ===== */
.docs-section {
  padding: 2rem 0;
  min-height: calc(100vh - var(--header-height) - 120px);
  background-color: var(--doc-bg-color);
  width: 100%;
  box-sizing: border-box;
  /*overflow-x: hidden; */
}

.mobile-full-width {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.docs-wrapper {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--mobile-container-padding);
}

.docs-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  position: relative;
}

/* Sidebar CTA */
.sidebar-cta {
  margin-top: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(88, 70, 132, 0.05) 0%, rgba(122, 100, 182, 0.1) 100%);
  border-radius: 0.75rem;
  border: 1px solid var(--doc-border-color);
  text-align: center;
}

.sidebar-cta p {
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  color: var(--color-text-secondary);
}

.sidebar-cta .btn {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
}

/* ===== SIDEBAR STYLES ===== */
.docs-sidebar {
  background-color: var(--doc-sidebar-bg);
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: var(--doc-box-shadow);
  border-left: 4px solid var(--color-primary);
  max-height: var(--sidebar-mobile-height);
  position: sticky;
  backdrop-filter: blur(10px);
  border: 1px solid var(--doc-border-color);
}

.docs-sidebar h4 {
  font-size: 1.125rem;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--doc-border-color);
  letter-spacing: 0.5px;
}

.docs-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.docs-sidebar ul ul {
  margin: 0.5rem 0 0.5rem 1rem;
}

.docs-sidebar li {
  margin-bottom: 0.375rem;
}

.docs-sidebar a {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--color-text-secondary);
  border-radius: 0.375rem;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  position: relative;
  text-decoration: none;
  margin-bottom: 0.25rem;
}

.docs-sidebar a:hover {
  background-color: rgba(122, 100, 182, 0.08);
  color: var(--color-primary);
  padding-left: 1rem;
  box-shadow: 0 2px 5px rgba(88, 70, 132, 0.05);
}

.docs-sidebar a.active {
  background-color: rgba(122, 100, 182, 0.12);
  color: var(--color-primary);
  font-weight: 600;
  padding-left: 1rem;
  box-shadow: 0 2px 8px rgba(88, 70, 132, 0.08);
}

.docs-sidebar a.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3px;
  background-color: var(--color-primary);
  border-radius: 0 0.25rem 0.25rem 0;
}

/* Sidebar toggle button for mobile */
.sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  background: var(--color-brand);
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), 0 6px 20px rgba(88, 70, 132, 0.3);
  cursor: pointer;
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 1000;
  color: var(--color-white);
  transition: all 0.3s ease;
  -webkit-tap-highlight-color: transparent;
  display: none !important;
}

/* Only show toggle button on mobile */
@media screen and (max-width: 767px) {
  .sidebar-toggle {
    display: flex !important;
  }
}

.sidebar-toggle i {
  font-size: 1.25rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.sidebar-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25), 0 6px 25px rgba(88, 70, 132, 0.25);
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(19, 3, 57, 0.65);
  z-index: 98;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

body.sidebar-open {
  overflow: hidden;
}

/* Mobile Offcanvas Sidebar */
.offcanvas-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 85%;
  max-width: 320px;
  height: 100vh;
  background-color: var(--color-white);
  z-index: 100310; /* Higher than toggle button and overlay */
  transform: translateX(-100%);
  box-shadow: 5px 0 25px rgba(0, 0, 0, 0.15);
  overflow-y: auto;
  will-change: transform;
  transition-property: transform, visibility;
  transition-duration: 0.3s;
  transition-timing-function: ease-in-out;
  visibility: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: none !important; /* Hide by default */
}

/* Only show on mobile */
@media screen and (max-width: 767px) {
  .offcanvas-sidebar {
    display: block !important;
  }
}

.offcanvas-sidebar.active {
  transform: translateX(0);
  visibility: visible;
}

.offcanvas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--doc-border-color);
  background: var(--color-white);
  color: var(--color-heading);
}

.offcanvas-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.offcanvas-close {
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(0, 0, 0, 0.12);
  color: var(--color-heading);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10003; /* Higher than sidebar */
  margin-left: 5px;
  position: relative;
}

.offcanvas-close:hover {
  background: rgba(0, 0, 0, 0.15);
  transform: scale(1.05);
}

.offcanvas-close i {
  font-size: 1rem;
  line-height: 1;
}

.offcanvas-content {
  padding: 1rem 0;
}

.offcanvas-section {
  margin-bottom: 1.5rem;
  padding: 0 1.5rem;
}

.offcanvas-section h4 {
  font-size: 1rem;
  margin: 0 0 0.75rem;
  color: var(--color-primary);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(88, 70, 132, 0.1);
}

.offcanvas-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.offcanvas-section ul li {
  margin-bottom: 0.5rem;
}

.offcanvas-section ul li a {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--color-text-secondary);
  text-decoration: none;
  border-radius: 0.375rem;
  font-size: 0.9375rem;
  transition: all 0.2s ease;
  position: relative;
}

.offcanvas-section ul li a:hover,
.offcanvas-section ul li a:focus {
  background-color: rgba(88, 70, 132, 0.08);
  color: var(--color-primary);
  padding-left: 1rem;
}

.offcanvas-section ul li a.active {
  background-color: rgba(88, 70, 132, 0.12);
  color: var(--color-primary);
  font-weight: 500;
  padding-left: 1rem;
}

.offcanvas-section ul li a.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.375rem;
  bottom: 0.375rem;
  width: 3px;
  background-color: var(--color-brand);
  border-radius: 0 3px 3px 0;
}

/* Only show on mobile */
@media screen and (max-width: 767px) {
  .offcanvas-overlay {
    display: block !important;
  }
}

.offcanvas-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto !important;
}

body.offcanvas-open {
  overflow: hidden;
}

/* Mobile navigation dropdown - removed */
.mobile-navigation {
  display: none;
}

.mobile-nav-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--doc-border-color);
  background-color: var(--doc-sidebar-bg);
  color: var(--color-heading);
  font-size: 0.9375rem;
  font-weight: 500;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237A64B6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1rem;
  box-shadow: var(--doc-box-shadow);
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-nav-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(122, 100, 182, 0.25);
}

/* ===== CONTENT AREA ===== */
.docs-content {
  background-color: var(--doc-sidebar-bg);
  padding: 2rem;
  border-radius: 0.75rem;
  box-shadow: var(--doc-box-shadow);
  /*overflow-x: hidden; */
  width: 100%;
  border: 1px solid var(--doc-border-color);
  box-sizing: border-box;
}

.docs-content section {
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--doc-border-color);
}

.docs-content section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.docs-content h2 {
  font-size: 2rem;
  margin: 0 0 1.5rem;
  color: var(--color-heading);
  position: relative;
  padding-bottom: 0.75rem;
  letter-spacing: -0.5px;
}

.docs-content h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 60px;
  background: var(--gradient-primary);
  border-radius: 0.25rem;
}

.docs-content h3 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
  color: var(--color-heading);
  letter-spacing: -0.3px;
}

.docs-content h4 {
  font-size: 1.125rem;
  margin: 1.5rem 0 0.875rem;
  color: var(--color-heading);
}

.docs-content p {
  margin: 0 0 1rem;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

.docs-content ul, .docs-content ol {
  margin: 0 0 1.5rem;
  padding-left: 1.5rem;
}

.docs-content li {
  margin-bottom: 0.5rem;
}

.docs-content a {
  color: var(--color-primary);
  text-decoration: none;
}

.docs-content a:hover {
  text-decoration: underline;
}

/* Code formatting */
.docs-content code {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
  background-color: rgba(19, 3, 57, 0.05);
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
}

.docs-content pre {
  background-color: var(--doc-code-bg);
  border-radius: 0.75rem;
  margin: 1.5rem 0 2rem;
  padding: 0;
  position: relative;
  overflow: hidden;
  max-width: 100%;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.docs-content pre::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 35px;
  background-color: var(--doc-code-header);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem 0.75rem 0 0;
}

.docs-content pre::after {
  content: '';
  position: absolute;
  top: 10px;
  left: 12px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #EF4444;
  box-shadow: 20px 0 0 #F59E0B, 40px 0 0 #10B981;
  z-index: 1;
}

.docs-content pre code {
  color: #E2E8F0;
  padding: 40px 1rem 1rem;
  display: block;
  overflow-x: auto;
  background: none;
  border-radius: 0;
  line-height: 1.5;
  font-size: 0.875rem;
  tab-size: 2;
  -moz-tab-size: 2;
}

/* Tables */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin: 1.25rem 0 1.75rem;
}

.api-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.api-table th {
  background: linear-gradient(90deg, rgba(88, 70, 132, 0.12) 0%, rgba(122, 100, 182, 0.05) 100%);
  text-align: left;
  padding: 1rem 1.25rem;
  font-weight: 600;
  color: var(--color-heading);
  border-bottom: 1px solid var(--doc-border-color);
}

.api-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(19, 3, 57, 0.05);
  vertical-align: top;
}

.api-table tr:last-child td {
  border-bottom: none;
}

.api-table tbody tr:hover {
  background-color: rgba(19, 3, 57, 0.02);
}

/* Alert boxes */
.alert {
  padding: 1rem 1rem 1rem 3rem;
  border-radius: 0.375rem;
  margin-bottom: 1.5rem;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.alert::before {
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 1rem;
  top: 1rem;
  font-size: 1rem;
}

.alert h4 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.alert p {
  margin-bottom: 0;
}

.alert.alert-warning {
  background-color: rgba(245, 158, 11, 0.05);
  border-left: 4px solid #F59E0B;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.1);
}

.alert.alert-warning::before {
  content: '\f071';
  color: #F59E0B;
}

.alert.alert-info {
  background-color: rgba(14, 165, 233, 0.05);
  border-left: 4px solid #0EA5E9;
  box-shadow: 0 4px 15px rgba(14, 165, 233, 0.1);
}

.alert.alert-info::before {
  content: '\f05a';
  color: #0EA5E9;
}

/* Code tabs */
.code-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin: 1.5rem 0 0;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
  background-color: var(--doc-code-header);
  border-radius: 0.75rem 0.75rem 0 0;
  padding: 0.5rem 0.5rem 0;
}

.code-tabs::-webkit-scrollbar {
  display: none; /* Chrome */
}

.code-tab {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  border-top-left-radius: 0.375rem;
  border-top-right-radius: 0.375rem;
  transition: all 0.2s ease;
  white-space: nowrap;
  margin-right: 0.25rem;
}

.code-tab.active {
  color: white;
  background-color: var(--doc-code-bg);
  border-bottom: none;
  box-shadow: 0 -3px 10px rgba(0, 0, 0, 0.1);
}

.code-content {
  margin-top: 0;
}

/* Cards - Streamlined with Horizontal Scroll */
.card-grid-container {
  position: relative;
  margin-top: 2rem;
  padding: 0.5rem 0;
}

.card-grid {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  gap: 1.5rem;
  padding: 0.5rem 1rem;
  scroll-padding: 1rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.card-grid::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

/* Scroll indicators */
.scroll-indicator {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5rem;
  height: 2.5rem;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(88, 70, 132, 0.15);
  z-index: 5;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  color: var(--color-primary);
  border: 1px solid var(--doc-border-color);
}

.scroll-left {
  left: 0.5rem;
}

.scroll-right {
  right: 0.5rem;
}

.card-grid-container:hover .scroll-indicator {
  opacity: 1;
}

.scroll-indicator:hover {
  transform: translateY(-50%) scale(1.1);
  background-color: white;
}

.sdk-section .card-grid-container::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 3rem;
  background: linear-gradient(90deg, rgba(250, 251, 255, 0) 0%, var(--doc-bg-color) 90%);
  pointer-events: none;
  z-index: 4;
  opacity: 0.8;
}

.card {
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 0.75rem;
  padding: 1.75rem;
  border: 1px solid var(--doc-border-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  box-shadow: 0 4px 6px rgba(88, 70, 132, 0.05);
  backdrop-filter: blur(5px);
  min-width: 300px;
  flex: 0 0 auto;
  max-width: 90%;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(88, 70, 132, 0.1);
  border-color: rgba(88, 70, 132, 0.2);
}

.card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
}

.card pre {
  margin: 0.75rem 0;
}

/* Quick Navigation */
.quick-nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1.5rem 0 2.5rem;
}

.quick-nav-item {
  background-color: rgba(255, 255, 255, 0.6);
  border-radius: 0.75rem;
  padding: 1.25rem;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid var(--doc-border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(88, 70, 132, 0.05);
  backdrop-filter: blur(5px);
}

.quick-nav-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(88, 70, 132, 0.1);
  border-color: rgba(122, 100, 182, 0.3);
}

.quick-nav-item i {
  color: var(--color-primary);
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.quick-nav-item a {
  color: var(--color-heading);
  font-weight: 500;
  text-decoration: none;
  font-size: 0.9375rem;
}

.quick-nav-item a:hover {
  text-decoration: none;
  color: var(--color-primary);
}

/* Step Container */
.steps-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 1.5rem 0 2.5rem;
}

.step {
  display: flex;
  align-items: flex-start;
  background-color: rgba(255, 255, 255, 0.6);
  border-radius: 0.75rem;
  padding: 1.25rem;
  border: 1px solid var(--doc-border-color);
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(88, 70, 132, 0.05);
}

.step:hover {
  background-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 5px 15px rgba(88, 70, 132, 0.08);
  border-color: rgba(122, 100, 182, 0.2);
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--gradient-primary);
  color: var(--color-white);
  font-weight: 600;
  border-radius: 50%;
  flex-shrink: 0;
  margin-right: 1rem;
  box-shadow: 0 3px 8px rgba(88, 70, 132, 0.2);
}

.step-content {
  flex: 1;
}

.step-content h4 {
  margin: 0 0 0.375rem;
  font-size: 1.125rem;
  color: var(--color-heading);
}

.step-content p {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* Pagination for docs navigation */
.pagination {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  border-top: 1px solid rgba(19, 3, 57, 0.1);
  padding-top: 1.5rem;
}

.pagination-prev,
.pagination-next {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  background-color: rgba(19, 3, 57, 0.02);
  transition: all 0.2s ease;
  color: var(--color-text-secondary);
  text-decoration: none;
}

.pagination-prev:hover,
.pagination-next:hover {
  background-color: rgba(122, 100, 182, 0.1);
  color: var(--color-primary);
}

.pagination-prev .pagination-arrow {
  margin-right: 0.8rem;
}

.pagination-next .pagination-arrow {
  margin-left: 0.8rem;
}

/* ===== RESPONSIVE STYLES ===== */

/* Small mobile screens */
@media screen and (max-width: 480px) {
  .mobile-full-width {
    padding: 0;
    margin: 0;
  }
  
  .docs-section {
    padding: 0;
  }
  .docs-hero {
    padding: 3rem 0 2rem;
  }
  
  .docs-hero .page-title {
    font-size: 1.875rem;
    margin-top: var(--space-16);
  }
  
  .docs-hero .page-subtitle {
    font-size: 0.9375rem;
  }
  
  .docs-content {
    padding: 1rem 0.5rem;
  }
  
  .container {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  
  .docs-content h2 {
    font-size: 1.5rem;
  }
  
  .docs-content h3 {
    font-size: 1.25rem;
  }
  
  .docs-content pre {
    margin: 1rem 0 1.5rem;
  }
  
  .quick-nav {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .step {
    padding: 1rem;
  }
  
  .card {
    min-width: 260px;
    padding: 1.25rem;
  }
  
  .step-number {
    width: 2rem;
    height: 2rem;
    margin-right: 0.75rem;
  }
  
  .step-content h4 {
    font-size: 1rem;
  }
  
  .card-grid-container::after {
    width: 2rem;
  }
  
  .scroll-indicator {
    width: 2rem;
    height: 2rem;
  }
  
  .code-tabs {
    padding: 0.25rem 0.25rem 0;
  }
  
  .code-tab {
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
  }
  
  .alert {
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
  }
  
  .alert::before {
    left: 0.75rem;
  }
}

/* Tablet and mobile */
@media screen and (max-width: 992px) {
  .docs-wrapper {
    grid-template-columns: 1fr;
    padding: 0;
  }
  
  .container {
    max-width: 100%;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .docs-sidebar {
    position: fixed;
    left: -300px;
    width: 300px;
    z-index: 100;
    transition: left 0.3s ease, transform 0.3s ease;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.15);
    height: 100vh;
    overflow-y: auto;
    top: 0;
    padding-top: 2rem;
    transform: translateZ(0);
    will-change: transform;
    background: var(--color-white);
  }

  .docs-sidebar.open {
    left: 0;
  }

  .docs-content {
    padding: 1rem 0.5rem;
    max-width: 100%;
    border-radius: 0;
    border-left: none;
    border-right: none;
    margin: 0;
  }

  .sidebar-toggle {
    display: flex;
  }
  
  .docs-container {
    display: block;
    width: 100%;
    padding: 0;
  }
  
  .steps-container {
    grid-template-columns: 1fr;
  }
  
  .quick-nav-item i {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
  }
  
  .docs-content pre::before {
    height: 25px;
  }
  
  .docs-content pre::after {
    top: 8px;
  }
  
  .docs-content pre code {
    padding: 32px 0.75rem 0.75rem;
    font-size: 0.8125rem;
  }
}

@media screen and (min-width: 768px) {
  .docs-section {
    padding: 2rem 0;
  }

  .docs-wrapper {
    padding: 0 var(--desktop-container-padding);
  }
  
  .docs-content {
    padding: 1.5rem;
  }
  
  .alert {
    padding: 1.25rem 1.25rem 1.25rem 3.5rem;
  }
  
  .code-tab {
    padding: 0.625rem 1rem;
    font-size: 1rem;
  }
  
  .docs-content pre code {
    font-size: 0.9375rem;
    padding: 40px 1.25rem 1.25rem;
  }
  
  .card {
    min-width: 320px;
    max-width: 45%;
  }
  
  .quick-nav {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
  }
  
  .steps-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
  
  .docs-hero {
    padding: 5rem 0;
  }
  
  .docs-hero .page-title {
    font-size: 3rem;
  }
  
  .docs-hero .page-subtitle {
    font-size: 1.25rem;
  }
}

@media screen and (min-width: 992px) {
  .docs-section {
    padding: 3rem 0;
  }

  .docs-wrapper {
    padding: 0 var(--desktop-container-padding);
  }

  .docs-container {
    grid-template-columns: var(--sidebar-width) 1fr;
    gap: 2rem;
  }

  .docs-sidebar {
    position: sticky;
    top: calc(var(--header-height) + 2rem);
    height: calc(100vh - var(--header-height) - 4rem);
    max-height: none;
    overflow-y: auto;
  }

  .docs-content {
    padding: 2.5rem;
    max-width: var(--content-max-width);
    margin: 0 auto;
  }

  .card {
    min-width: 350px;
    max-width: 30%;
  }
  
  .steps-container {
    grid-template-columns: repeat(3, 1fr);
  }

  .sidebar-toggle {
    display: none;
  }
  
  .docs-hero {
    padding: 6rem 0;
  }
  
  .docs-hero .page-title {
    font-size: 3.5rem;
  }
}

@media screen and (min-width: 1280px) {
  .docs-wrapper {
    max-width: 1200px;
  }
}
