/* ========== Guide / Module Page Styles - MathCompass Blue Theme ========== */

body {
  background-image: none;
  background: #f8fafc;
  min-height: 100vh;
}

main {
  padding: 0;
}

.guide-layout {
  display: flex;
  min-height: calc(100vh - 80px);
  max-width: 1400px;
  margin: 0 auto;
}

/* ----- Sidebar Navigation ----- */
.guide-sidebar {
  width: 260px;
  min-width: 260px;
  background: white;
  border-right: 1px solid #e2e8f0;
  padding: 24px 0;
  overflow-y: auto;
  max-height: calc(100vh - 80px);
  position: sticky;
  top: 80px;
}

.sidebar-section {
  margin-bottom: 20px;
}

.sidebar-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  padding: 10px 20px 6px;
  letter-spacing: 0.8px;
}

.sidebar-category {
  font-size: 14px;
  font-weight: 600;
  color: #1a0a0a;
  padding: 8px 20px 4px;
  margin-top: 6px;
}

.sidebar-module {
  display: block;
  font-size: 14px;
  color: #475569;
  text-decoration: none;
  padding: 7px 20px 7px 36px;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  position: relative;
}

.sidebar-module::before {
  content: '▸';
  position: absolute;
  left: 22px;
  color: #94a3b8;
  font-size: 11px;
  transition: transform 0.2s;
}

.sidebar-module:hover {
  background: #f1f5f9;
  color: #DC143C;
}

.sidebar-module:hover::before {
  transform: translateX(3px);
  color: #DC143C;
}

.sidebar-module.active {
  background: #fef2f2;
  color: #B22222;
  font-weight: 600;
  border-left: 3px solid #DC143C;
  padding-left: 33px;
}

.sidebar-module.active::before {
  color: #DC143C;
}

/* ----- Main Content ----- */
.guide-content {
  flex: 1;
  padding: 40px 56px 60px;
  max-width: 920px;
  background: white;
  margin: 24px;
  margin-left: 0;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.module-title {
  font-size: 34px;
  margin-top: 0;
  margin-bottom: 8px;
  color: #1a0a0a;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.module-meta {
  color: #64748b;
  font-size: 14px;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e2e8f0;
}

.module-difficulty {
  display: inline-block;
  background: #dcfce7;
  color: #166534;
  padding: 3px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  margin-left: 10px;
}

.module-difficulty.medium {
  background: #fef3c7;
  color: #92400e;
}

.module-difficulty.hard {
  background: #fee2e2;
  color: #991b1b;
}

/* Prerequisites */
.prerequisites {
  background: #fef2f2;
  border-left: 4px solid #DC143C;
  padding: 16px 22px;
  margin-bottom: 30px;
  border-radius: 0 10px 10px 0;
}

.prerequisites h4 {
  margin: 0 0 8px;
  color: #991b1b;
  font-size: 15px;
  font-weight: 600;
}

.prerequisites ul {
  margin: 0;
  padding-left: 20px;
  font-size: 14px;
  color: #334155;
}

/* Section Headings */
.guide-content h2 {
  font-size: 24px;
  margin-top: 40px;
  margin-bottom: 16px;
  color: #1a0a0a;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 10px;
  font-weight: 700;
}

.guide-content h3 {
  font-size: 19px;
  margin-top: 28px;
  margin-bottom: 12px;
  color: #1e293b;
  font-weight: 600;
}

.guide-content p {
  line-height: 1.8;
  margin-bottom: 16px;
  color: #334155;
}

.guide-content ul, .guide-content ol {
  line-height: 1.85;
  margin-bottom: 16px;
  color: #334155;
}

/* Example Problem Box */
.example-problem {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 12px;
  padding: 20px 24px;
  margin: 24px 0;
}

.example-problem h4 {
  margin: 0 0 10px;
  color: #92400e;
  font-size: 16px;
  font-weight: 600;
}

.problem-statement {
  font-size: 17px;
  margin-bottom: 14px;
  color: #334155;
}

.solution-toggle {
  background: linear-gradient(135deg, #DC143C, #B22222);
  border: none;
  color: white;
  cursor: pointer;
  font-size: 13px;
  padding: 7px 18px;
  border-radius: 6px;
  transition: all 0.2s;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(220, 20, 60, 0.25);
}

.solution-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 20, 60, 0.35);
}

.solution-content {
  display: none;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed #fde68a;
}

.solution-content.show {
  display: block;
}

/* Practice Problems Table */
.practice-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 14px;
  font-size: 14px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.practice-table th {
  background: #f8fafc;
  text-align: left;
  padding: 12px 14px;
  font-weight: 600;
  color: #1a0a0a;
  border-bottom: 2px solid #e2e8f0;
}

.practice-table td {
  padding: 11px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
}

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

.practice-table tr:hover {
  background: #f8fafc;
}

.stars {
  color: #f59e0b;
  letter-spacing: 2px;
}

.difficulty-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
}

.diff-easy { background: #dcfce7; color: #166534; }
.diff-normal { background: #fef3c7; color: #92400e; }
.diff-hard { background: #fee2e2; color: #991b1b; }

.source-tag {
  color: #64748b;
  font-size: 13px;
}

/* Warning / Tip boxes */
.tip-box {
  background: #f0fdf4;
  border-left: 4px solid #22c55e;
  padding: 16px 22px;
  margin: 20px 0;
  border-radius: 0 10px 10px 0;
}

.warning-box {
  background: #fffbeb;
  border-left: 4px solid #f59e0b;
  padding: 16px 22px;
  margin: 20px 0;
  border-radius: 0 10px 10px 0;
}

/* Mobile */
@media (max-width: 900px) {
  .guide-layout {
    flex-direction: column;
  }
  .guide-sidebar {
    width: 100%;
    max-height: none;
    position: static;
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
  }
  .guide-content {
    margin: 16px;
    padding: 24px;
  }
}
