/* Shared top navigation for course landing pages */

.course-top-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background: rgba(253, 250, 246, 0.96);
  border-bottom: 1px solid #e0d5c7;
  backdrop-filter: blur(8px);
}

.course-top-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.875rem 1.5rem;
}

.course-top-nav__brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.course-top-nav__brand img {
  display: block;
  width: auto;
  height: 42px;
  max-width: min(202px, 42vw);
}

.course-top-nav__links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.course-top-nav__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.875rem;
  font-family: "Instrument Sans", "Work Sans", system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: #2d2d2d;
  text-decoration: none;
  border-radius: 999px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.course-top-nav__link:hover {
  background: #f5f0e8;
  color: #2d2d2d;
}

.course-top-nav__link--home {
  border: 1px solid #e0d5c7;
}

.course-top-nav__link--login {
  border: 1px solid #e0d5c7;
  color: #5a5a5a;
}

.course-top-nav__link--login:hover {
  background: #2d2d2d;
  border-color: #2d2d2d;
  color: #fff;
}

html[data-theme="7stages"] body.course-coming-soon-body .course-top-nav__link--primary,
.course-top-nav__link--primary {
  background: #2563eb;
  border: 1px solid #2563eb;
  color: #fff;
}

html[data-theme="7stages"] body.course-coming-soon-body .course-top-nav__link--primary:hover,
.course-top-nav__link--primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}

/* MCAS page: hide legacy fixed login when header is present */
body.has-course-top-nav .login-link {
  display: none !important;
}

@media (max-width: 640px) {
  .course-top-nav__inner {
    padding: 0.75rem 1rem;
  }

  .course-top-nav__brand img {
    height: 36px;
  }

  .course-top-nav__link {
    padding: 0.45rem 0.7rem;
    font-size: 0.82rem;
  }
}
