.flow-subject-block {
  /* padding: 1.5rem;
  border-radius: 1rem; */
  padding: 0 0 1.5rem 0;
  border-radius: 0;
  border-bottom: 2px dotted var(--border-color);
  margin-bottom: 1.5rem;
}

.flow-subject-block .content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
  padding: 0;
}

/* --- Mobile 16:9 Image --- */
.subject-image-mobile {
  overflow: hidden;
}

.subject-image-mobile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
  border-radius: 0.5rem;
  aspect-ratio: 4 / 3;
}

/* --- Content Block --- */
.subject-content-block {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.subject-text {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
}

.subject-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--almost-black);
  margin: 0;
}

.subject-description {
  line-height: 1.6;
  color: var(--text-color);
}

.subject-description p:first-child {
  margin-bottom: 1rem;
}

.subject-text .btn {
  align-self: start;
}

/* --- Desktop Square Image (hidden on mobile) --- */
.subject-image-desktop {
  display: none;
}

.subject-image-desktop img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 0.9rem;
  display: block;
  aspect-ratio: 1 / 1;
}

/* moved to accessibility.css */

.flow-main-content > .flow-school-subject:last-child {
  margin-bottom: 0;
  border-bottom: none;
}

/* Adjust so anchored sections don't hide behind the fixed header */
.flow-subject-block[id] {
  scroll-margin-top: 136px;
}

@media (min-width: 64rem) {
  .flow-subject-block {
    padding: 1.5rem;
    padding: 1.5rem;
    margin-bottom: 2.4rem;
    border: 2px solid var(--border-color);
    border-radius: 1rem;
  }

  .subject-content-block {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
  }

  .subject-text {
    flex: 3;
  }

  .topic-text i {
    display: none;
  }

  .subject-image-desktop {
    flex: 1;
    display: block;
    min-width: 320px;
    width: 100%;
  }

  .subject-image-mobile {
    display: none;
  }

  .subject-title {
    font-size: 1.75rem;
    line-height: 1.4;
    margin-top: 0;
    margin-bottom: 1.125rem;
  }
}
