
/* Additions for course pages. Keep css/styles.css as the original Start Bootstrap file. */

body {
  padding-top: 4.5rem;
}

section[id],
h2[id],
h3[id] {
  scroll-margin-top: 5rem;
}

#top {
  scroll-margin-top: 5rem;
}

.course-page {
  max-width: 1120px;
  padding-top: 1.25rem;
}

.course-banner {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 1.5rem;
  border-radius: 0.5rem;
}

.course-header {
  margin-bottom: 2rem;
}

.course-header h1 {
  margin-bottom: 0.4rem;
}

.course-title-small {
  font-size: 1.3rem;
  line-height: 1.35;
  font-weight: 500;
  margin-top: 1rem;
  margin-bottom: 0.25rem;
}

.course-subtitle {
  color: #6c757d;
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}

.course-meta {
  border-top: 1px solid #dee2e6;
  border-bottom: 1px solid #dee2e6;
  padding-top: 0.9rem;
  padding-bottom: 0.4rem;
  margin-bottom: 0;
}

.course-meta dt {
  font-weight: 600;
}

.course-meta dd {
  margin-bottom: 0.5rem;
}

/* Left course navigation */

.course-page .course-sidebar-column {
  max-width: 210px;
}

.course-sidebar {
  position: fixed;
  padding: 1rem;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.04);
}

.course-sidebar-title {
  font-weight: 700;
  color: #212529;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #dee2e6;
  line-height: 1.25;
}

.course-sidebar-heading {
  margin-top: 1rem;
  margin-bottom: 0.4rem;
  padding-top: 0.75rem;
  border-top: 1px solid #dee2e6;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6c757d;
}

.course-sidebar a {
  display: block;
  width: 100%;
  padding: 0.35rem 0.5rem;
  margin: 0.1rem 0;
  border-radius: 0.35rem;
  color: #212529;
  text-decoration: none;
  line-height: 1.25;
}

.course-sidebar a:hover,
.course-sidebar a:focus {
  background: #e9ecef;
  color: #000;
  text-decoration: none;
}

.course-content {
  min-width: 0;
}

@media (min-width: 768px) {
  .course-sidebar {
    position: fixed;
    width: 180px;
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
  }

  .course-content {
    margin-left: 160px;
  }
}


@media (max-width: 767.98px) {
  .course-page .course-sidebar-column {
    max-width: none;
  }

  .course-sidebar {
    position: static;
  }
}

.textbook-block {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.textbook-cover {
  width: 150px;
  height: auto;
  border: 1px solid #dee2e6;
  border-radius: 0.25rem;
}

.textbook-info {
  flex: 1;
  min-width: 0;
}

@media (max-width: 767.98px) {
  .textbook-block {
    display: block;
  }

  .textbook-cover {
    width: 140px;
    margin-bottom: 1rem;
  }
}

#policies h3 {
  font-size: 1.08rem;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid #e9ecef;
  color: #212529;
}

.staff-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4rem;              /* controls space between Instructor and TA */
  align-items: flex-start;
}

.staff-card {
  width: 165px;           /* one fixed width for the whole card */
  text-align: center;
}

.staff-role {
  width: 100%;
  text-align: center;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.staff-photo {
  display: block;
  width: 150px;
  height: auto;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0.45rem;
  border-radius: 0.35rem;
}

.staff-name {
  width: 100%;
  text-align: center;
  font-size: 1rem;
  line-height: 1.3;
}
