.subject-item {
  background: var(--soft-bg);
  border: 3px solid var(--off-white);
  border-radius: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  gap: 1.25rem;
  padding: 1rem;
  transition: box-shadow 0.2s ease, background 0.2s ease;

  &:hover {
    text-decoration: none;
    background: #fffdf7;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  @media (max-width: 768px) {
    padding: 0.5rem;
  }
}

.subject-item-description .trix-content {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 4.5em;
}

.subject-item-graphic {
  border-radius: 0.7rem;
  flex-shrink: 0;
  height: 100px;
  overflow: hidden;
  width: 100px;

  @media (max-width: 768px) {
    width: 4rem;
    height: 4rem;

    svg {
      width: 4rem;
      height: 4rem;
    }
  }
}

.subject-item-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.subject-item-title {
  font-size: 1.2rem;
  margin: 0;
  font-weight: 800;
}

.locale-badge {
  background: #e0e7ff;
  border-radius: 0.25rem;
  color: #4338ca;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.4rem;
  text-transform: uppercase;
}

.subject-item-description {
  font-size: 1rem;
  margin: 0.5rem 0 0;
  line-height: 1.5;
  color: var(--dark-text);

  @media (max-width: 768px) {
    margin-top: 0.3rem;
  }
}

.subject-item-meta-items {
  display: flex;
  gap: 0.3rem;
  font-size: 0.9rem;
  opacity: 0.8;
}

.subject-item-meta-items .meta-item {
  font-weight: 500;
  padding: 0.3rem 0.6rem;
  border-radius: 0.3rem;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
  background-color: rgba(0, 0, 0, 0.025);
  color: var(--dark-text);
}

.subject-item-rating {
  align-items: center;
  background: var(--off-white);
  border-radius: 1rem;
  border: 1px solid var(--off-white);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-shrink: 0;
  justify-content: center;
  margin-left: auto;
  width: 6rem;
  height: 6rem;

  .subject-item-rating-value {
    font-size: 1.5rem;
    font-weight: 800;
  }

  @media (max-width: 768px) {
    width: 4rem;
    height: 4rem;

    .subject-item-rating-value {
      font-size: 1.2rem;
    }
  }
}

.session-card-date {
  color: var(--gray);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.session-card-lessons {
  align-items: center;
  background: var(--off-white);
  border-radius: 1rem;
  border: 1px solid var(--off-white);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  justify-content: center;
  margin-left: auto;
  width: 6rem;
  height: 6rem;

  .session-card-lessons-value {
    color: var(--purple);
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
  }

  .session-card-lessons-label {
    color: var(--gray);
    font-size: 0.7rem;
    font-weight: 500;
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
  }

  @media (max-width: 768px) {
    width: 4rem;
    height: 4rem;

    .session-card-lessons-value {
      font-size: 1.2rem;
    }

    .session-card-lessons-label {
      font-size: 0.55rem;
      margin-top: 0.15rem;
    }
  }
}
