/* Tutorial Page Styles */

/* Override header to have dark background on tutorial pages */
.header {
  background-color: var(--primary-color, #00265e);
}

.tutorial-main {
  padding-top: 100px;
  min-height: 100vh;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.tutorial-container {
  display: flex;
  flex-wrap: wrap;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  gap: 40px;
}

/* Mobile Language Selector - hidden on desktop */
.mobile-language-selector {
  display: none;
  width: 100%;
  padding: 16px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 38, 94, 0.08);
  margin-bottom: 20px;
}

.mobile-language-selector label {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  margin-right: 12px;
}

.mobile-language-selector select {
  flex: 1;
  padding: 10px 14px;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  color: #1f2937;
  cursor: pointer;
  min-width: 160px;
}

.mobile-language-selector select:focus {
  outline: none;
  border-color: var(--primary-color, #00265e);
  box-shadow: 0 0 0 3px rgba(0, 38, 94, 0.1);
}

/* Sidebar */
.tutorial-sidebar {
  position: sticky;
  top: 100px;
  width: 280px;
  flex-shrink: 0;
  height: fit-content;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding: 24px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 38, 94, 0.08);
}

.language-selector {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e5e7eb;
}

.language-selector label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.language-selector select {
  width: 100%;
  padding: 10px 14px;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  color: #1f2937;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.language-selector select:hover {
  border-color: var(--secondary-color, #a7cbff);
}

.language-selector select:focus {
  outline: none;
  border-color: var(--primary-color, #00265e);
  box-shadow: 0 0 0 3px rgba(0, 38, 94, 0.1);
}

.tutorial-toc h3 {
  font-family: 'Murecho', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 16px 0;
}

.tutorial-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tutorial-toc li {
  margin-bottom: 4px;
}

.toc-link {
  display: block;
  padding: 8px 12px;
  font-size: 14px;
  color: #4b5563;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s;
}

.toc-link:hover {
  color: var(--primary-color, #00265e);
  background: #f3f4f6;
}

.toc-link.active {
  color: var(--primary-color, #00265e);
  background: var(--secondary-color, #a7cbff);
  font-weight: 600;
}

/* Sidebar toggle - hidden on all devices (mobile uses language selector only) */
.sidebar-toggle {
  display: none;
}

/* Main Content */
.tutorial-content {
  flex: 1;
  min-width: 0;
  padding-bottom: 60px;
}

.tutorial-content h1 {
  font-family: 'Murecho', sans-serif;
  font-size: 36px;
  font-weight: 700;
  color: var(--primary-color, #00265e);
  margin: 0 0 12px 0;
}

.tutorial-intro {
  font-size: 18px;
  color: #6b7280;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 2px solid #e5e7eb;
}

.tutorial-content section {
  margin-bottom: 48px;
  padding-top: 24px;
}

.tutorial-content h2 {
  font-family: 'Murecho', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-color, #00265e);
  margin: 0 0 16px 0;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--secondary-color, #a7cbff);
}

.tutorial-content h3 {
  font-family: 'Murecho', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  margin: 24px 0 12px 0;
}

.tutorial-content p {
  font-size: 16px;
  line-height: 1.7;
  color: #4b5563;
  margin: 0 0 16px 0;
}

.tutorial-content ul,
.tutorial-content ol {
  margin: 0 0 16px 0;
  padding-left: 24px;
}

.tutorial-content li {
  font-size: 16px;
  line-height: 1.7;
  color: #4b5563;
  margin-bottom: 8px;
}

.tutorial-content code {
  font-family: 'SF Mono', 'Menlo', monospace;
  font-size: 14px;
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 4px;
  color: #1f2937;
}

/* Screenshots */
.screenshot {
  margin: 20px 0;
  text-align: center;
}

.screenshot img {
  max-width: 300px;
  width: 100%;
  height: auto;
  border-radius: 24px;
  box-shadow: 0 8px 40px rgba(0, 38, 94, 0.15);
  /* High-res source images scale down crisp on retina displays */
}

.screenshot-row {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 20px 0;
}

.screenshot-row .screenshot {
  margin: 0;
}

.screenshot-row .screenshot img {
  max-width: 200px;
}

/* Tips and Notes */
.tip,
.note {
  padding: 16px 20px;
  border-radius: 12px;
  margin: 16px 0;
  font-size: 14px;
}

.tip {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border-left: 4px solid #10b981;
  color: #065f46;
}

.note {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-left: 4px solid #f59e0b;
  color: #92400e;
}

/* Table */
.format-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 38, 94, 0.08);
}

.format-table th,
.format-table td {
  padding: 12px 16px;
  text-align: left;
  font-size: 14px;
}

.format-table th {
  background: var(--primary-color, #00265e);
  color: #ffffff;
  font-weight: 600;
}

.format-table td {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  color: #4b5563;
}

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

/* Footer */
.tutorial-footer {
  margin-top: 60px;
  padding-top: 24px;
  border-top: 2px solid #e5e7eb;
  text-align: center;
}

.tutorial-footer p {
  color: #9ca3af;
  font-size: 14px;
}

/* Active nav link - white on dark header */
.nav-link.active {
  color: #ffffff !important;
  font-weight: 600;
  background-color: rgba(255, 255, 255, 0.15) !important;
}

/* Responsive */
@media (max-width: 991px) {
  .tutorial-container {
    flex-direction: column;
  }

  .mobile-language-selector {
    display: flex;
    align-items: center;
  }

  /* Hide sidebar completely on mobile - users scroll instead */
  .tutorial-sidebar {
    display: none;
  }

  .tutorial-content h1 {
    font-size: 28px;
  }

  .tutorial-content h2 {
    font-size: 22px;
  }
}

@media (max-width: 600px) {
  .tutorial-main {
    padding-top: 80px;
  }

  .tutorial-container {
    padding: 0 16px;
  }

  .tutorial-content h1 {
    font-size: 24px;
  }

  .screenshot img {
    max-width: 240px;
    border-radius: 20px;
  }

  .screenshot-row .screenshot img {
    max-width: 160px;
  }

  .format-table th,
  .format-table td {
    padding: 10px 12px;
    font-size: 13px;
  }
}
