/* Homepage course cards (index.qmd) */

.fpmi-course-card {
  border: 1px solid #e6e3ec;
  border-radius: 10px;
  padding: 1.1rem 1.2rem 0.9rem;
  background: #fff;
  margin: 1.4rem 0;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.fpmi-course-card:hover {
  box-shadow: 0 6px 22px rgba(0, 58, 65, 0.13);
  transform: translateY(-2px);
}

/* Title row: course-title link + semester badge in one flex paragraph */
.fpmi-course-card > p:has(> a.fpmi-course-title) {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.6rem 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}

/* Теория вероятностей: a wide, unboxed "flagship" widget that breaks out
   to .column-page width, so it can't sit inside the padded/bordered
   .fpmi-course-card box like the other three -- header and footer keep
   the same title/badge/caption/toc classes and spacing, just without the
   card wrapper in between. */
.fpmi-flagship-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.6rem 1rem;
  flex-wrap: wrap;
  margin: 1.8rem 0 0.6rem;
}
.fpmi-flagship-footer {
  margin: 0.6rem 0 1.8rem;
}

a.fpmi-course-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #003a41;
  text-decoration: none;
}
a.fpmi-course-title:hover {
  color: #ff7500;
  text-decoration: none;
}

.fpmi-course-badge {
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  padding: 0.25em 0.75em;
  border-radius: 999px;
}
.fpmi-badge-autumn {
  color: #b35400;
  background: #fff3e8;
  border: 1px solid #ffd9b8;
}
.fpmi-badge-spring {
  color: #1e7a43;
  background: #eaf6ee;
  border: 1px solid #bfe5cc;
}

a.fpmi-course-caption {
  display: block;
  text-align: center;
  font-size: 0.92rem;
  color: #0c5963;
  text-decoration: none;
  margin-top: 0.45rem;
  font-style: italic;
}
a.fpmi-course-caption:hover {
  color: #ff7500;
}

.fpmi-course-widget {
  width: 100%;
  height: 300px;
}

.fpmi-widget-controls {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.85rem;
  color: #52514e;
  margin-top: 0.3rem;
}
.fpmi-widget-controls .fpmi-widget-value {
  min-width: 8em;
  text-align: right;
  white-space: nowrap;
}
.fpmi-widget-controls input[type="range"] {
  flex: 1 1 auto;
  accent-color: #ff7500;
}
.fpmi-play-btn {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: #003a41;
  color: #fff;
  font-size: 10px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.fpmi-play-btn:hover {
  background: #ff7500;
}

.fpmi-course-toc {
  margin-top: 0.8rem;
  border-top: 1px solid #eeecf3;
  padding-top: 0.7rem;
  font-size: 0.88rem;
}
.fpmi-course-toc p {
  margin: 0.3rem 0 0.35rem;
  color: #52514e;
}
.fpmi-course-toc ul {
  columns: 2;
  column-gap: 2.2rem;
  list-style: none;
  padding-left: 0;
  margin: 0 0 0.4rem;
}
.fpmi-course-toc li {
  break-inside: avoid;
  margin: 0.15rem 0;
  padding-left: 0.9rem;
  text-indent: -0.9rem;
}
.fpmi-course-toc a {
  color: #0c5963;
  text-decoration: none;
}
.fpmi-course-toc a:hover {
  color: #ff7500;
}
@media (max-width: 576px) {
  .fpmi-course-toc ul {
    columns: 1;
  }
}

.fpmi-asym-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px 0;
}
.fpmi-asym-plot {
  width: 100%;
  height: 185px;
}
.fpmi-asym-title {
  text-align: center;
  font-size: 13px;
  color: #003a41;
  margin-bottom: 2px;
}
@media (max-width: 700px) {
  .fpmi-asym-plot {
    height: 150px;
  }
}
