/* Materials Academy — learning channels & module hierarchy */

.ma-learning-layout {
  align-items: flex-start;
}

.ma-channel-nav {
  position: sticky;
  top: 1rem;
}

.ma-channel-nav .card-header {
  background: #f4f6f9;
  border-bottom: 1px solid #dee2e6;
  font-weight: 600;
  font-size: .9rem;
  letter-spacing: .02em;
}

.ma-channel-nav .nav-link {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  padding: .75rem 1rem;
  color: #495057;
  border-left: 3px solid transparent;
  border-radius: 0;
  transition: background .15s, border-color .15s;
}

.ma-channel-nav .nav-link:hover {
  background: #f8f9fa;
  color: #1b3a5a;
}

.ma-channel-nav .nav-link.active {
  background: #eef4fb;
  border-left-color: #007bff;
  color: #1b3a5a;
  font-weight: 600;
}

.ma-channel-nav .nav-link.active.channel-sim {
  border-left-color: #fd7e14;
  background: #fff8f0;
}

.ma-channel-nav .nav-link.active.channel-delivery {
  border-left-color: #6f42c1;
  background: #f5f0ff;
}

.ma-channel-nav .nav-link.active.channel-software {
  border-left-color: #28a745;
  background: #f0fff4;
}

.ma-channel-nav .nav-icon {
  width: 2rem;
  height: 2rem;
  border-radius: .45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: .95rem;
}

.ma-channel-nav .nav-icon.digital {
  background: #e7f1ff;
  color: #007bff;
}

.ma-channel-nav .nav-icon.sim {
  background: #fff0e0;
  color: #fd7e14;
}

.ma-channel-nav .nav-icon.software {
  background: #e8f8ee;
  color: #28a745;
}

.ma-channel-nav .nav-icon.delivery {
  background: #ede5ff;
  color: #6f42c1;
}

.ma-channel-nav .nav-icon.ai {
  background: #e7f9fc;
  color: #17a2b8;
}

.ma-channel-nav .nav-icon.data {
  background: #eceff1;
  color: #343a40;
}

.ma-channel-nav .nav-icon.research {
  background: #f1f3f5;
  color: #6c757d;
}

.ma-channel-nav .nav-icon.all {
  background: #e9ecef;
  color: #6c757d;
}

.ma-channel-nav .nav-meta {
  flex: 1;
  min-width: 0;
}

.ma-channel-nav .nav-title {
  display: block;
  line-height: 1.3;
}

.ma-channel-nav .nav-sub {
  display: block;
  font-size: .75rem;
  color: #6c757d;
  font-weight: 400;
  margin-top: .15rem;
}

.ma-channel-nav .nav-badge {
  font-size: .7rem;
  margin-top: .25rem;
}

.ma-breadcrumb-bar {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: .35rem;
  padding: .55rem 1rem;
  margin-bottom: 1rem;
}

.ma-breadcrumb-bar .breadcrumb {
  background: transparent;
  padding: 0;
  margin: 0;
}

.ma-channel-hero {
  border: 0;
  border-radius: .5rem;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.ma-channel-hero.digital {
  background: linear-gradient(135deg, #e7f1ff 0%, #f8fbff 55%, #fff 100%);
  border-left: 4px solid #007bff;
}

.ma-channel-hero.sim {
  background: linear-gradient(135deg, #fff3e6 0%, #fffaf5 55%, #fff 100%);
  border-left: 4px solid #fd7e14;
}

.ma-channel-hero.software {
  background: linear-gradient(135deg, #e8f8ee 0%, #f5fff8 55%, #fff 100%);
  border-left: 4px solid #28a745;
}

.ma-channel-hero.delivery {
  background: linear-gradient(135deg, #f0eaff 0%, #faf8ff 55%, #fff 100%);
  border-left: 4px solid #6f42c1;
}

.ma-channel-hero.ai {
  background: linear-gradient(135deg, #e7f9fc 0%, #f5fdff 55%, #fff 100%);
  border-left: 4px solid #17a2b8;
}

.ma-channel-hero.data {
  background: linear-gradient(135deg, #eceff1 0%, #f7f9fa 55%, #fff 100%);
  border-left: 4px solid #343a40;
}

.ma-channel-hero.research {
  background: linear-gradient(135deg, #f1f3f5 0%, #f8f9fa 55%, #fff 100%);
  border-left: 4px solid #6c757d;
}

.ma-channel-hero .hero-icon {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: .65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-right: 1rem;
}

.ma-channel-hero.digital .hero-icon {
  background: #007bff;
  color: #fff;
}

.ma-channel-hero.sim .hero-icon {
  background: #fd7e14;
  color: #fff;
}

.ma-channel-hero.software .hero-icon {
  background: #28a745;
  color: #fff;
}

.ma-channel-hero.delivery .hero-icon {
  background: #6f42c1;
  color: #fff;
}

.ma-channel-hero.ai .hero-icon {
  background: #17a2b8;
  color: #fff;
}

.ma-channel-hero.data .hero-icon {
  background: #343a40;
  color: #fff;
}

.ma-channel-hero.research .hero-icon {
  background: #6c757d;
  color: #fff;
}

.ma-channel-hero h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: .35rem;
  color: #1b3a5a;
}

.ma-channel-hero .hero-sub {
  color: #5a6268;
  margin-bottom: .75rem;
}

.ma-channel-hero .hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: .85rem;
  color: #495057;
}

.ma-channel-overview-grid .ma-overview-card {
  border: 1px solid #dee2e6;
  border-radius: .5rem;
  padding: 1.25rem;
  height: 100%;
  background: #fff;
  transition: box-shadow .15s, transform .15s;
}

.ma-channel-overview-grid .ma-overview-card:hover {
  box-shadow: 0 .35rem 1rem rgba(0, 0, 0, .08);
  transform: translateY(-2px);
}

.ma-channel-overview-grid .ma-overview-card.digital {
  border-top: 3px solid #007bff;
}

.ma-channel-overview-grid .ma-overview-card.sim {
  border-top: 3px solid #fd7e14;
}

.ma-channel-overview-grid .ma-overview-card.software {
  border-top: 3px solid #28a745;
}

.ma-channel-overview-grid .ma-overview-card.delivery {
  border-top: 3px solid #6f42c1;
}

.ma-channel-overview-grid .ma-overview-card.ai {
  border-top: 3px solid #17a2b8;
}

.ma-channel-overview-grid .ma-overview-card.data {
  border-top: 3px solid #343a40;
}

.ma-channel-overview-grid .ma-overview-card.research {
  border-top: 3px solid #6c757d;
}

.bg-purple {
  background-color: #6f42c1 !important;
}

.ma-module-steps {
  position: relative;
  padding-left: 0;
}

.ma-module-step {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.1rem;
  margin-bottom: .75rem;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: .45rem;
  transition: border-color .15s, box-shadow .15s;
}

.ma-module-step:hover {
  border-color: #c8d6e5;
  box-shadow: 0 .2rem .6rem rgba(0, 0, 0, .05);
}

.ma-module-step.is-current {
  border-color: #007bff;
  box-shadow: 0 0 0 1px rgba(0, 123, 255, .15);
}

.ma-module-step .step-index {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: #e9ecef;
  color: #495057;
  font-weight: 700;
  font-size: .9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ma-module-step.done .step-index {
  background: #28a745;
  color: #fff;
}

.ma-module-step.in-progress .step-index {
  background: #007bff;
  color: #fff;
}

.ma-module-step .step-body {
  flex: 1;
  min-width: 0;
}

.ma-module-step .step-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: .25rem;
  color: #1b3a5a;
}

.ma-module-step .step-desc {
  font-size: .875rem;
  color: #6c757d;
  margin-bottom: .5rem;
}

.ma-module-step .step-meta code {
  font-size: .75rem;
}

.ma-module-step .step-actions {
  flex-shrink: 0;
  align-self: center;
  text-align: right;
}

.ma-unit-nav .list-group-item {
  border-left: 3px solid transparent;
  padding: .55rem .85rem;
  font-size: .875rem;
}

.ma-unit-nav .list-group-item.active {
  background: #eef4fb;
  border-left-color: #007bff;
  color: #1b3a5a;
  font-weight: 600;
}

.ma-unit-nav .list-group-item.done:not(.active) {
  color: #28a745;
}

.ma-section-label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #6c757d;
  margin-bottom: .65rem;
}

@media (max-width: 767.98px) {
  .ma-channel-nav {
    position: static;
    margin-bottom: 1rem;
  }

  .ma-module-step {
    flex-direction: column;
  }

  .ma-module-step .step-actions {
    align-self: stretch;
    text-align: left;
  }
}

/* Public preview & nav emphasis */
.ma-preview-banner {
  border-left: 4px solid #007bff;
}

.ma-frontier-teaser {
  border-top: 3px solid #007bff;
}

.nav-dropdown-enhanced .dropdown-item.nav-item-emphasis {
  font-weight: 600;
  color: #0056b3;
}

.nav-dropdown-enhanced .dropdown-item.nav-item-emphasis:hover {
  background: #eef4fb;
  color: #004085;
}

/* In-portal lesson reader */
.ma-lesson-body {
  font-size: 1rem;
  line-height: 1.65;
  color: #212529;
}

.ma-lesson-body h1,
.ma-lesson-body h2,
.ma-lesson-body h3 {
  color: #1b3a5a;
  margin-top: 1.25rem;
  margin-bottom: .75rem;
}

.ma-lesson-body pre,
.ma-lesson-body code {
  font-family: Consolas, "Courier New", monospace;
  font-size: .9em;
}

.ma-lesson-body pre {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: .25rem;
  padding: .75rem 1rem;
  overflow-x: auto;
}

.ma-lesson-body table {
  width: 100%;
  margin: 1rem 0;
}

.ma-lesson-body table th,
.ma-lesson-body table td {
  border: 1px solid #dee2e6;
  padding: .4rem .6rem;
}

.ma-lesson-fallback {
  white-space: pre-wrap;
  font-size: .875rem;
}

/* —— Tools & downloads page —— */
.ma-channel-nav .nav-link.active.channel-ai {
  border-left-color: #17a2b8;
  background: #eefcff;
}

.ma-channel-nav .nav-link.active.channel-data {
  border-left-color: #343a40;
  background: #f4f5f6;
}

.ma-channel-nav .nav-link.active.channel-research {
  border-left-color: #6c757d;
  background: #f7f7f8;
}

.ma-channel-nav .nav-link.active.channel-career {
  border-left-color: #20c997;
  background: #eafaf6;
}

.ma-tool-card {
  border: 1px solid #e9ecef;
  border-radius: .5rem;
  padding: 1rem 1.05rem;
  height: 100%;
  background: #fff;
  transition: box-shadow .15s, transform .15s;
}

.ma-tool-card:hover {
  box-shadow: 0 .3rem .85rem rgba(0, 0, 0, .07);
  transform: translateY(-1px);
}

.ma-tool-card.locked {
  background: #f8f9fa;
}

.ma-tool-card.digital { border-top: 3px solid #007bff; }
.ma-tool-card.software { border-top: 3px solid #28a745; }
.ma-tool-card.delivery { border-top: 3px solid #6f42c1; }
.ma-tool-card.sim { border-top: 3px solid #fd7e14; }
.ma-tool-card.ai { border-top: 3px solid #17a2b8; }
.ma-tool-card.data { border-top: 3px solid #343a40; }
.ma-tool-card.research { border-top: 3px solid #6c757d; }
.ma-tool-card.career { border-top: 3px solid #20c997; }

/* Bootstrap-like teal for career progress bars */
.progress-bar.bg-teal { background-color: #20c997 !important; }
.ma-tool-card.all { border-top: 3px solid #6c757d; }

.ma-tool-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: .5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: .75rem;
  flex-shrink: 0;
}

.ma-tool-icon.digital { background: #e7f1ff; color: #007bff; }
.ma-tool-icon.software { background: #e8f8ee; color: #28a745; }
.ma-tool-icon.delivery { background: #ede5ff; color: #6f42c1; }
.ma-tool-icon.sim { background: #fff0e0; color: #fd7e14; }
.ma-tool-icon.ai { background: #e7f9fc; color: #17a2b8; }
.ma-tool-icon.data { background: #eceff1; color: #343a40; }
.ma-tool-icon.research { background: #f1f3f5; color: #6c757d; }
.ma-tool-icon.career { background: #e6f9f3; color: #20c997; }
.ma-tool-icon.all { background: #e9ecef; color: #6c757d; }

.ma-tools-section .ma-section-label {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #6c757d;
  margin-bottom: .75rem;
}

.ma-tutorial-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  padding: .7rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.ma-tutorial-row:last-child {
  border-bottom: 0;
}

.ma-tutorial-module {
  padding: .85rem 0;
  border-bottom: 1px solid #eee;
}

.ma-tutorial-module:last-child {
  border-bottom: 0;
}

.ma-tutorial-module-label {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .03em;
  color: #6c757d;
  margin-bottom: .35rem;
}

.ma-tutorial-row-more {
  padding-left: .25rem;
}

.ma-more-docs {
  margin-top: .35rem;
}

.ma-more-docs-summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .875rem;
  font-weight: 600;
  color: #495057;
  user-select: none;
  padding: .35rem .55rem;
  border-radius: .35rem;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
}

.ma-more-docs-summary::-webkit-details-marker {
  display: none;
}

.ma-more-docs-summary::before {
  content: '\f078';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  font-size: .65rem;
  color: #6c757d;
  transition: transform .15s ease;
}

.ma-more-docs[open] > .ma-more-docs-summary::before {
  transform: rotate(180deg);
}

.ma-more-docs-tools {
  padding: .5rem 0;
}
