#index {
  margin: 0 auto;
  padding: 50px 0;
  width: 80vw;
  height: fit-content;

  display: flex;
  flex-direction: column;
  gap: 30px;
}

.header-wrapper {
  width: 100%;
  height: fit-content;
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 5px;
}

.header {
  font-size: var(--fontsize-header);
  font-weight: 700;
  color: black;
  text-transform: uppercase;
}

.filter-wrapper {
  border: 2px solid lightgray;
  border-radius: 5px;

  width: fit-content;
  height: fit-content;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;

  /* 1. Constrain the parent so it's forced to scroll */
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;

  /* 2. Fix for Mac/iOS momentum scrolling */
  -webkit-overflow-scrolling: touch;
}

.filter-button {
  border-right: 2px solid lightgray;
  padding: 7px;
  height: max-content;
  aspect-ratio: 1/1;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: var(--apple-animation);
}

.filter-wrapper ul {
  display: flex;
  flex-direction: row;
  align-items: center;

  /* 3. THIS IS THE KEY: Prevent the list from shrinking */
  flex-shrink: 0;
  flex-wrap: nowrap;
}

.filter-wrapper ul a {
  padding: 7px 20px;
  font-size: 16px;
  font-weight: 600;
  color: black;
  text-transform: uppercase;
  transition: var(--apple-animation);

  /* 4. Prevent text from breaking into multiple lines */
  white-space: nowrap;
  /* 5. Ensure the link acts as a solid block for the flex container */
  display: block;
}

.filter-button:hover,
.filter-wrapper ul a:hover {
  background-color: lightgray;
  transition: var(--apple-animation);
}

.scholarships-wrapper {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.scholarship-card {
  padding: 20px 15px;
  box-sizing: border-box;
  border: 3px solid lightgray;
  border-radius: 15px;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.scholarship-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.scholarship-logo {
  box-sizing: border-box;
  padding: 5px;
  margin-bottom: 5px;
  width: 100px;
  aspect-ratio: 1/1;
  object-fit: contain;
  object-position: center;
  height: auto;
}

.scholarship-name {
  width: 100%;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  font-size: 18px;
  font-weight: 600;
  color: black;
}

.scholarship-type {
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  font-size: 16px;
  font-weight: 500;
  color: gray;
}

.scholarship-status {
  margin-top: 30px;
  margin-bottom: 5px;
  width: fit-content;
  height: fit-content;
  padding: 5px 8px;

  background-color: transparent;
  color: transparent;

  font-size: 14px;
  font-weight: 600;
  border-radius: 5px;
}

.status-accept {
  background-color: #def7eb;
  color: #00bf63;
}

.status-reject {
  background-color: #ffeaea;
  color: #ff3131;
}

.scholarship-details {
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  font-size: 14x;
  font-weight: 400;
  color: gray;
}

.scholarship-details span {
  padding: 3px;
  color: black;
}