/* ============================================================
   Alatus Advisory — LMS / Learn Section Styles
   ============================================================ */

/* ── Lab Landing Page ── */

.lab-hero {
  background-color: var(--navy);
  background-image:
    linear-gradient(rgba(15,23,42,0.88), rgba(15,23,42,0.95)),
    url('https://images.unsplash.com/photo-1555066931-4365d14bab8c?auto=format&fit=crop&w=2000&q=80');
  background-size: cover;
  background-position: center;
  padding: 80px var(--side-pad) 80px;
}

.lab-hero .hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.lab-hero h1 {
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  line-height: 1.15;
}

.lab-hero .hero-sub {
  font-size: 1.125rem;
  color: #cbd5e1;
  line-height: 1.65;
  max-width: 600px;
  margin-bottom: 36px;
}

.lab-hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

/* NotebookLM resource card */
.notebook-card {
  background-color: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  align-items: flex-start;
  gap: 24px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.notebook-card:hover {
  box-shadow: 0 8px 32px rgba(15,23,42,0.08);
  transform: translateY(-2px);
}

.notebook-icon {
  width: 52px;
  height: 52px;
  background-color: rgba(13,148,136,0.1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--teal);
}

.notebook-card-content h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.notebook-card-content p {
  font-size: 0.9375rem;
  color: var(--slate);
  line-height: 1.6;
  margin-bottom: 16px;
}

.notebook-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
  transition: color 0.2s ease, gap 0.2s ease;
}

.notebook-link:hover {
  color: var(--teal-dark);
  gap: 10px;
}

/* Module cards grid */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.module-card {
  background-color: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  text-decoration: none;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.module-card:hover {
  box-shadow: 0 6px 24px rgba(15,23,42,0.08);
  transform: translateY(-2px);
  border-color: var(--teal);
}

.module-num-badge {
  width: 44px;
  height: 44px;
  background-color: var(--navy);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--teal);
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.module-card-content {
  flex: 1;
}

.module-card-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 6px;
}

.module-card-desc {
  font-size: 0.875rem;
  color: var(--slate);
  line-height: 1.55;
}

/* ── LMS Layout (module pages) ── */

.lms-wrap {
  display: flex;
  min-height: calc(100vh - var(--nav-height));
  align-items: stretch;
  background-color: var(--off-white);
}

/* Sidebar */
.lms-sidebar {
  width: 280px;
  flex-shrink: 0;
  background-color: var(--navy);
  border-right: 1px solid rgba(255,255,255,0.06);
  position: sticky;
  top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}

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

.lms-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.lms-sidebar::-webkit-scrollbar-thumb {
  background-color: rgba(255,255,255,0.15);
  border-radius: 2px;
}

.lms-sidebar-inner {
  padding: 28px 0 40px;
}

.lms-sidebar-header {
  padding: 0 24px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 8px;
}

.lms-back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 16px;
  transition: color 0.2s ease;
}

.lms-back-link:hover {
  color: var(--white);
}

.lms-sidebar-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 4px;
}

.lms-sidebar-sub {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
}

/* Notebook link in sidebar */
.lms-notebook-link {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 24px;
  padding: 10px 14px;
  background-color: rgba(13,148,136,0.12);
  border: 1px solid rgba(13,148,136,0.25);
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 600;
  color: #5eead4;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.lms-notebook-link:hover {
  background-color: rgba(13,148,136,0.2);
  color: #5eead4;
}

.lms-notebook-link::after {
  display: none !important;
}

/* Module navigation list */
.lms-module-list {
  padding: 8px 0;
}

.lms-module-item {
  display: block;
}

.lms-module-item a,
.lms-module-item span {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 24px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  line-height: 1.4;
  transition: color 0.2s ease, background-color 0.2s ease;
  cursor: pointer;
}

.lms-module-item a:hover {
  color: rgba(255,255,255,0.85);
  background-color: rgba(255,255,255,0.04);
}

.lms-module-item.active a,
.lms-module-item.active span {
  color: var(--white);
  background-color: rgba(13,148,136,0.12);
  border-right: 2px solid var(--teal);
  font-weight: 600;
}

.lms-module-num {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: 0.04em;
  flex-shrink: 0;
  margin-top: 1px;
}

.lms-module-item.active .lms-module-num {
  color: var(--teal);
}

/* Sidebar reference link */
.lms-sidebar-footer {
  padding: 20px 24px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 8px;
}

.lms-ref-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  transition: color 0.2s ease;
}

.lms-ref-link:hover {
  color: rgba(255,255,255,0.85);
}

.lms-ref-link::after {
  display: none !important;
}

/* ── Main Content ── */

.lms-main {
  flex: 1;
  min-width: 0;
  padding: 48px 56px 96px;
}

.lms-content {
  max-width: 760px;
  margin: 0 auto;
}

/* Breadcrumb */
.lms-breadcrumb {
  font-size: 0.8125rem;
  color: var(--slate);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.lms-breadcrumb a {
  color: var(--slate);
  text-decoration: none;
  transition: color 0.2s ease;
}

.lms-breadcrumb a:hover {
  color: var(--teal);
}

.lms-breadcrumb span {
  color: var(--muted);
}

/* Module header */
.module-header {
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}

.module-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background-color: var(--navy);
  color: var(--teal);
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.module-title {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 16px;
}

.module-intro {
  font-size: 1.0625rem;
  color: var(--slate);
  line-height: 1.75;
}

/* Module progress bar (top strip) */
.module-progress-strip {
  height: 3px;
  background-color: var(--border);
  position: sticky;
  top: var(--nav-height);
  z-index: 100;
}

.module-progress-fill {
  height: 100%;
  background-color: var(--teal);
  transition: width 0.3s ease;
}

/* Module body sections */
.module-body h2 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  margin: 44px 0 16px;
  line-height: 1.3;
}

.module-body h2:first-child {
  margin-top: 0;
}

.module-body h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.35;
  margin: 28px 0 10px;
}

.module-body p {
  font-size: 1rem;
  color: var(--slate);
  line-height: 1.75;
  margin-bottom: 16px;
}

.module-body p:last-child {
  margin-bottom: 0;
}

.module-body ul,
.module-body ol {
  margin: 0 0 20px 0;
  padding-left: 0;
  list-style: none;
  list-style-position: outside;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.module-body ul li,
.module-body ol li {
  font-size: 1rem;
  color: var(--slate);
  line-height: 1.65;
  padding-left: 24px;
  position: relative;
}

.module-body ul li::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--teal);
}

.module-body ol {
  list-style: decimal;
  padding-left: 1.45em;
}

.module-body ol li {
  padding-left: 8px;
}

.module-body ol li::before {
  content: none !important;
  display: none !important;
}

.module-body ol li::marker {
  font-weight: 700;
  color: var(--teal);
  font-size: 0.875rem;
  font-family: var(--font-sans);
}

.module-body strong {
  font-weight: 700;
  color: var(--text);
}

.module-body code {
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'SF Mono', Consolas, monospace;
  font-size: 0.875em;
  background-color: rgba(15,23,42,0.07);
  color: var(--navy);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* Code blocks */
.code-block {
  background-color: var(--navy-mid);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 28px 0;
  border: 1px solid rgba(255,255,255,0.07);
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background-color: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.code-lang {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}

.code-copy-btn {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255,255,255,0.4);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 4px;
  transition: background-color 0.2s ease, color 0.2s ease;
  font-family: var(--font-sans);
}

.code-copy-btn:hover {
  background-color: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.75);
}

.code-block pre {
  margin: 0;
  padding: 20px 20px;
  overflow-x: auto;
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'SF Mono', Consolas, monospace;
  font-size: 0.875rem;
  line-height: 1.65;
  color: #e2e8f0;
}

.code-block pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
  border-radius: 0;
}

/* Architect tip callout */
.architect-tip {
  background-color: rgba(13,148,136,0.06);
  border: 1px solid rgba(13,148,136,0.2);
  border-left: 3px solid var(--teal);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 28px 0;
}

.tip-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-dark);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tip-label::before {
  content: '★';
  font-size: 0.7em;
}

.architect-tip p,
.architect-tip ul li {
  font-size: 0.9375rem;
  color: #374151;
  line-height: 1.7;
}

.architect-tip p + p {
  margin-top: 10px;
}

.architect-tip ul {
  margin: 0;
  gap: 6px;
}

/* Lab notebook download banner */
.lab-download {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  margin: 0 0 32px;
  background-color: rgba(13,148,136,0.06);
  border: 1px solid rgba(13,148,136,0.25);
  border-left: 3px solid var(--teal);
  border-radius: var(--radius-md);
  color: var(--text);
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.lab-download:hover {
  background-color: rgba(13,148,136,0.12);
  border-color: rgba(13,148,136,0.4);
}

.lab-download-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--teal);
  color: var(--white);
  border-radius: var(--radius-sm);
}

.lab-download-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lab-download-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-dark);
}

.lab-download-file {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

.lab-download-arrow {
  flex-shrink: 0;
  color: var(--teal-dark);
  transition: transform 0.2s ease;
}

.lab-download:hover .lab-download-arrow {
  transform: translateY(2px);
}

/* Table */
.table-wrap {
  overflow-x: auto;
  margin: 24px 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.module-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.module-body table thead {
  background-color: var(--navy);
}

.module-body table thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  white-space: nowrap;
}

.module-body table tbody tr {
  border-top: 1px solid var(--border);
  transition: background-color 0.15s ease;
}

.module-body table tbody tr:first-child {
  border-top: none;
}

.module-body table tbody tr:hover {
  background-color: rgba(13,148,136,0.04);
}

.module-body table tbody td {
  padding: 12px 16px;
  vertical-align: top;
  color: var(--slate);
  line-height: 1.6;
}

.module-body table tbody td strong {
  color: var(--text);
}

/* Key-value pair list */
.kv-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 20px 0;
}

.kv-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0;
  border-bottom: 1px solid var(--border);
}

.kv-item:last-child {
  border-bottom: none;
}

.kv-key {
  padding: 12px 16px;
  background-color: var(--off-white);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
  border-right: 1px solid var(--border);
}

.kv-value {
  padding: 12px 16px;
  font-size: 0.9rem;
  color: var(--slate);
  line-height: 1.6;
}

/* Bottom navigation */
.module-bottom-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 48px;
  margin-top: 64px;
  border-top: 1px solid var(--border);
  gap: 16px;
}

.module-bottom-nav a.prev-link,
.module-bottom-nav a.next-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 2px solid var(--border);
  color: var(--slate);
}

.module-bottom-nav a.prev-link:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.module-bottom-nav a.next-link {
  background-color: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.module-bottom-nav a.next-link:hover {
  background-color: var(--teal);
  border-color: var(--teal);
  color: var(--white);
  transform: translateX(2px);
}

/* Sidebar toggle for mobile */
.lms-sidebar-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background-color: var(--navy);
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

/* ── Responsive ── */

@media (max-width: 1024px) {
  .lms-main {
    padding: 40px 36px 80px;
  }
}

@media (max-width: 768px) {
  /* Lab landing */
  .modules-grid {
    grid-template-columns: 1fr;
  }

  .notebook-card {
    flex-direction: column;
  }

  /* LMS layout */
  .lms-wrap {
    flex-direction: column;
  }

  .lms-sidebar {
    width: 100%;
    position: static;
    height: auto;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .lms-sidebar.open {
    max-height: 600px;
  }

  .lms-sidebar-toggle {
    display: flex;
  }

  .lms-main {
    padding: 28px 20px 64px;
  }

  .module-bottom-nav {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .module-bottom-nav a.prev-link,
  .module-bottom-nav a.next-link {
    justify-content: center;
  }
}

/* ── Reference / Cheat Sheet page ── */

.reference-page .section-title {
  margin-bottom: 28px;
}

.ref-table-section {
  margin-bottom: 64px;
}

.ref-table-section h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--teal);
  display: inline-block;
}

.ref-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.ref-col-card {
  background-color: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.ref-col-card h3 {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-dark);
  margin-bottom: 14px;
}

.ref-col-card ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ref-col-card ul li {
  font-size: 0.9rem;
  color: var(--slate);
  line-height: 1.55;
  padding-left: 16px;
  position: relative;
}

.ref-col-card ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--teal);
  font-size: 0.8em;
  font-weight: 700;
}

.ref-col-card.not-eligible ul li::before {
  content: '✗';
  color: #dc2626;
}

@media (max-width: 640px) {
  .ref-two-col {
    grid-template-columns: 1fr;
  }
}
