/*-------- HOME HEADER --------*/
header.homepage {
  position: relative;
  overflow: hidden;
}

.home-hero {
  padding-block: 6.25rem;
  text-align: center;
  display: flex;
  gap: 3.75rem;
  flex-direction: column;
}

.home-content {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  z-index: 2;
}

.home-content h1 {
  max-width: 730px;
  color: var(--dark-green);
}

.search-cta {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  align-items: center;
  z-index: 2;
}

.search-bar {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 600px;
  height: 60px;
  background-color: var(--white);
  border: 1px solid var(--campus-green);
  border-radius: 50px;
  padding: 0 1rem 0 1.5rem;
}

.search-bar input {
  flex-grow: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 1rem;
  font-family: "Manrope", sans-serif;
  color: var(--font-body);
}

.search-bar input::placeholder {
  color: #4e5764;
}

.search-bar button {
  position: relative;
  background: #e6f6eb;
  border: none;
  cursor: pointer;
  width: 2.5rem;
  height: 2.5rem;
  color: var(--campus-green);
  border-radius: 2.5rem;
  transition: background 0.3s ease;
}

.search-bar svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  width: 1rem;
  height: 1rem;
  transition: opacity 0.3s ease-in;
}

.search-bar svg.arrow-icon {
  opacity: 0;
}

.search-bar button:hover {
  background: var(--dark-green);
}

.search-bar button:hover svg.search-icon {
  opacity: 0;
}

.search-bar button:hover svg.arrow-icon {
  opacity: 1;
}

.home-hero .svg-overlay {
  z-index: 0;
}

.home-hero .svg-overlay svg.top {
  position: absolute;
  top: calc(-131px / 522.79px * 100%);
  right: calc(-115px / 1440px * 100%);
  width: calc(878.16px / 1440px * 100%);
  max-width: 878.16px;
  height: auto;
  transform: rotate(-8.35deg);
}

.home-hero .svg-overlay svg.bottom {
  position: absolute;
  bottom: calc(-10px / 577.42px * 100%);
  left: calc(-314px / 1440px * 100%);
  width: calc(933px / 1440px * 100%);
  max-width: 933px;
  height: auto;
}

@media (min-width: 1024px) {
  .home-hero {
    height: calc(90vh - 140px);
    justify-content: center;
  }
}

@media screen and (max-width: 1024px) {
  .home-hero .svg-overlay svg.top {
    top: calc(-50px / 522.79px * 100%);
    right: calc(-115px / 1024px * 100%);
    width: calc(878.16px / 1024px * 100%);
    max-width: 680px;
  }

  .home-hero .svg-overlay svg.bottom {
    left: calc(-314px / 1024px * 100%);
    width: calc(933px / 1024px * 100%);
    bottom: calc(40px / 577.42px * 100%);
    max-width: 750px;
  }
}

@media screen and (max-width: 480px) {
  .home-hero {
    overflow: hidden;
  }

  .home-hero .svg-overlay svg.top,
  .home-hero .svg-overlay svg.bottom {
    width: auto;
  }

  .home-hero .svg-overlay svg.top {
    top: calc(-50px / 522.79px * 100%);
    right: calc(-510px / 1440px * 100%);
  }

  .home-hero .svg-overlay svg.bottom {
    left: calc(-510px / 1440px * 100%);
  }
}

/* Animations */
@media (min-width: 1025px) and (prefers-reduced-motion: no-preference) {
  .home-hero.animated .home-content h1,
  .browse-scholarships-header.animated h1 {
    animation: 1s cubic-bezier(0.83, 0, 0.17, 1) fade-in-ttb both;
  }

  .home-hero.animated .home-content p,
  .home-hero.animated .search-bar,
  .home-hero.animated .call-to-action,
  .browse-scholarships-header.animated p,
  .browse-scholarships-header.animated .browse-scholarships.search-bar {
    animation: 1s cubic-bezier(0.83, 0, 0.17, 1) fade-in both;
  }

  .home-hero.animated .search-bar,
  .browse-scholarships-header.animated .browse-scholarships.search-bar {
    animation-delay: 0.3s;
  }

  .home-hero.animated .call-to-action {
    animation-delay: 0.6s;
  }

  .home-hero.animated svg.top .top-path,
  .browse-scholarships-header.animated svg.top .top-path {
    --draw-length: 3068.895px;
    opacity: 0.2;
    stroke-dasharray: var(--draw-length);
    stroke-dashoffset: var(--draw-length);
    animation: draw-svg 2s ease-in forwards;
    animation-delay: 0.3s;
  }

  .home-hero.animated svg.bottom .bottom-path,
  .browse-scholarships-header.animated svg.bottom .bottom-path {
    --draw-length: 3088.09px;
    opacity: 0.2;
    stroke-dasharray: var(--draw-length);
    stroke-dashoffset: var(--draw-length);
    animation: draw-svg 1.2s ease-in forwards;
    animation-delay: 0.6s;
  }

  .svg-overlay.animated .main-svg .main-svg-path {
    --draw-length: 2774.063px;
    stroke-dasharray: var(--draw-length);
    stroke-dashoffset: var(--draw-length);
    animation: draw-svg 2s ease-in forwards;
    animation-delay: 1s;
  }
}

/*-------- HOW IT WORKS SECTION --------*/
section.how-it-works {
  position: relative;
  background-color: #fefbe9;
  margin-inline: 1.5rem;
  padding-block: 3rem;
  border-radius: 8px;
}

.content-header {
  text-align: center;
  color: var(--dark-green);
}

.content-header p {
  color: var(--dark-green);
  font-family: "Kanit", sans-serif;
  font-size: var(--font-h6);
  line-height: var(--line-height-thinner);
  font-weight: 500;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.content-header h2 {
  max-width: 700px;
  margin-inline: auto;
}

.how-it-works-steps {
  --column-count: 1;
  --gap-x: 24px;
  --gap-x-sum: (var(--gap-x) * (var(--column-count) - 1));
  --item-width: calc((100% - var(--gap-x-sum)) / var(--column-count));
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  margin-top: 3rem;
  gap: var(--gap-x);
}

.steps-item {
  border-radius: 20px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--white);
  background-image: url("images/gradient.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  max-width: 290px;
  width: var(--item-width);
}

.steps-item p:nth-of-type(1) {
  color: #fafdfc;
  font-size: var(--font-small);
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.steps-item h3 {
  color: #fafdfc;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.steps-item p:last-of-type {
  color: #fbfcfd;
  font-size: 14px;
}

@media (min-width: 768px) {
  .how-it-works {
    padding: 6.25rem 0;
  }

  .how-it-works-steps {
    --column-count: 2;
  }

  .steps-item {
    padding: 3rem 2rem;
  }
}

@media (min-width: 1024px) {
  section.how-it-works {
    padding-block: 6rem;
  }
  .how-it-works-steps {
    --column-count: 3;
  }
}

@media (min-width: 1200px) {
  .how-it-works-steps {
    margin-top: 5rem;
    --column-count: 4;
  }
}

@media (min-width: 1025px) and (prefers-reduced-motion: no-preference) {
  .how-it-works.animated .content-header p {
    animation: 0.4s cubic-bezier(0.83, 0, 0.17, 1) fade-in both;
  }

  .how-it-works.animated .content-header h2 {
    animation: 0.4s cubic-bezier(0.83, 0, 0.17, 1) fade-in both;
    animation-delay: 0.2s;
  }

  .how-it-works.animated .steps-item {
    --x: 100px;
    animation: 0.6s ease-out fade-in-ttb both;
  }

  .how-it-works.animated .steps-item:nth-child(2) {
    animation-delay: 0.2s;
  }

  .how-it-works.animated .steps-item:nth-child(3) {
    animation-delay: 0.4s;
  }

  .how-it-works.animated .steps-item:nth-child(4) {
    animation-delay: 0.6s;
  }
}

/*-------- ABOUT SECTION --------*/
section.about {
  position: relative;
  padding-block: 6.25rem;
}

section.about h2 {
  color: var(--dark-green);
  margin-bottom: 1.5rem;
  max-width: 568px;
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.about-items-left {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  overflow: hidden;
}

.about-items-left img {
  max-width: 500px;
}

.about-items-right {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.about-items-right .button {
  margin-top: 1rem;
  margin-right: auto;
}

.svg-overlay svg.about-svg {
  position: absolute;
  bottom: calc(-60px / 1337.84px * 100%);
  left: calc(50px / 1440px * 100%);
  width: calc(1308.54px / 1440px * 100%);
  max-width: 1308.54px;
  transform: rotate(-61.81deg);
  height: auto;
}

@media (min-width: 768px) {
  section.about h2 {
    margin-bottom: 3.75rem;
  }

  .about-content {
    flex-direction: row;
    gap: 2.5rem;
  }

  .about-items-left {
    width: 350px;
  }

  .about-items-right {
    width: calc(100% - 390px);
  }
}

@media (min-width: 1200px) {
  .about-content {
    gap: 7.5rem;
  }

  .about-items-left {
    width: 500px;
  }

  .about-items-right {
    width: calc(100% - 620px);
  }

  .about-items-right .button {
    align-self: flex-end;
    margin-top: 1.5rem;
  }
}

@media screen and (max-width: 1024px) {
  .svg-overlay svg.about-svg {
    top: calc(-200px / 1337.84px * 100%);
  }
}

@media screen and (max-width: 769px) {
  section.about {
    overflow: hidden;
  }

  .svg-overlay svg.about-svg {
    top: calc(-50px / 1337.84px * 100%);
    right: calc(-510px / 1440px * 100%);
    width: auto;
  }
}

/* Animations */
@media (min-width: 1025px) and (prefers-reduced-motion: no-preference) {
  .about.animate .svg-overlay svg.about-svg .about-svg-path {
    opacity: 0;
  }

  .about.animated .svg-overlay svg.about-svg .about-svg-path {
    --draw-length: 2774.063px;
    opacity: 0.2;
    stroke-dasharray: var(--draw-length);
    stroke-dashoffset: var(--draw-length);
    animation: draw-svg 1.8s ease-in forwards;
    animation-delay: 0.3s;
  }

  .about.animated h2 {
    animation: 1s cubic-bezier(0.83, 0, 0.17, 1) fade-in-ttb both;
  }

  .about.animated .about-items-left img {
    animation: 1s cubic-bezier(0.83, 0, 0.17, 1) scale-out both;
  }

  .about-items-left::after {
    position: absolute;
    content: "";
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--white);
    transform-origin: 0% 50%;
    transform-origin: right center;
  }

  .about.animated .about-items-left::after {
    animation: 1s cubic-bezier(0.83, 0, 0.17, 1) slide-out-x both;
  }

  .about.animated .about-items-right p,
  .about.animated .about-items-right .button {
    animation: 1s cubic-bezier(0.83, 0, 0.17, 1) fade-in both;
    animation-delay: 0.3s;
  }

  .about.animated .about-items-right .button {
    animation-delay: 0.6s;
  }
}

/*-------- FEATURED SCHOLARSHIPS SECTION --------*/
section.scholarships {
  text-align: center;
  margin-bottom: 4rem;
}

section.scholarships .featured {
  margin-top: 2.5rem;
}

.scholarship-list {
  --column-count: 1;
  --gap-x: 1.25rem;
  --gap-x-sum: (var(--gap-x) * (var(--column-count) - 1));
  --item-width: calc((100% - var(--gap-x-sum)) / var(--column-count));
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  gap: var(--gap-x);
}

.scholarship-list-item {
  position: relative;
  border-radius: 24px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background-image: url("images/gradient.jpg");
  background-size: cover;
  background-position: right;
  background-repeat: no-repeat;
  width: var(--item-width);
  max-width: 387px;
  transition: background-position 0.3s ease;
}

.scholarship-list-item h3 {
  font-family: "Kanit", sans-serif;
  color: #fff7c2;
  line-height: var(--line-height-thinner);
  margin-bottom: 1rem;
}

.scholarship-list-item h4 {
  color: #fbfcfd;
  font-size: var(--font-h6);
  line-height: var(--line-height-thin);
  text-align: left;
  margin-bottom: 0.5rem;
}

.scholarship-list-item p:last-of-type {
  color: #fbfcfd;
  margin-bottom: 2rem;
}

.scholarship-list-item .btn-apply {
  margin-top: auto;
  color: #fbfcfd;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.scholarship-list-item .btn-apply div.apply-arrow-icon {
  position: relative;
  width: 30px;
  height: 30px;
  border: 1px solid #e0e5eb;
  background-color: transparent;
  border-radius: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.3s ease, border-color 0.3s ease,
    transform 0.3s ease;
}

.scholarship-list-item .btn-apply svg {
  width: 10px;
  height: 10px;
}

.scholarship-list-item .btn-apply svg path {
  stroke: #fbfefc;
  transition: stroke 0.3s ease;
}

.scholarship-list-item:hover {
  background-position: left;
}

.scholarship-list-item:hover .btn-apply div.apply-arrow-icon {
  background-color: var(--light-yellow);
  border-color: var(--light-yellow);
  transform: translateX(4px);
}

.scholarship-list-item:hover .btn-apply svg path {
  stroke: var(--campus-green);
}

@media (min-width: 768px) {
  .scholarships {
    padding-block: 6.25rem;
  }

  .scholarship-list {
    --column-count: 2;
  }
}

@media (min-width: 1024px) {
  section.scholarships .featured {
    margin-top: 5rem;
  }

  .scholarship-list {
    --column-count: 3;
  }
}

@media (min-width: 1025px) and (prefers-reduced-motion: no-preference) {
  .scholarships.animated .content-header p {
    animation: 0.4s cubic-bezier(0.83, 0, 0.17, 1) fade-in both;
  }

  .scholarships.animated .content-header h2 {
    animation: 0.4s cubic-bezier(0.83, 0, 0.17, 1) fade-in both;
    animation-delay: 0.2s;
  }

  .scholarships.animated .scholarship-list-item {
    --x: 100px;
    animation: 0.6s ease-out fade-in-ttb both;
  }

  .scholarships.animated .scholarship-list-item:nth-child(2) {
    animation-delay: 0.2s;
  }

  .scholarships.animated .scholarship-list-item:nth-child(3) {
    animation-delay: 0.4s;
  }
}

/* CALL TO ACTION SECTION */
.cta {
  position: relative;
  padding: 7.5rem 0;
  text-align: center;
}

.cta .container {
  position: relative;
  z-index: 2;
}

.cta h2 {
  font-family: "Kanit", sans-serif;
  font-size: var(--font-h1);
  color: var(--dark-green);
  line-height: var(--line-height-thinnest);
  margin-bottom: 1.25rem;
  max-width: 870px;
  margin-inline: auto;
  text-transform: uppercase;
}

.cta p {
  max-width: 500px;
  margin: 0 auto;
}

.cta .button-group {
  margin-top: 3rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.cta .svg-overlay svg.top {
  position: absolute;
  top: calc(-120px / 500px * 100%);
  right: calc(-155px / 1440px * 100%);
  width: calc(811.69px / 1440px * 100%);
  max-width: 800px;
  height: auto;
  transform: rotate(170deg);
}

.cta .svg-overlay svg.bottom {
  position: absolute;
  bottom: calc(-40px / 436.85px * 100%);
  left: calc(-315px / 1440px * 100%);
  width: calc(827.5px / 1440px * 100%);
  max-width: 830px;
  height: auto;
  transform: rotate(-20deg);
}

@media screen and (max-width: 769px) {
  .cta .svg-overlay svg.top {
    right: calc(-155px / 1024px * 100%);
    width: calc(811.69px / 1024px * 100%);
    top: -20px;
  }

  .cta .svg-overlay svg.bottom {
    left: calc(-315px / 1024px * 100%);
    width: calc(827.5px / 1024px * 100%);
  }
}

@media screen and (max-width: 480px) {
  .cta {
    overflow: hidden;
  }
  .cta .svg-overlay svg.top,
  .cta .svg-overlay svg.bottom {
    width: auto;
  }
}

/* Animations */
@media (min-width: 1025px) and (prefers-reduced-motion: no-preference) {
  .cta.animate svg.top .top-path,
  .cta.animate svg.bottom .bottom-path {
    opacity: 0;
  }
  .cta.animated svg.top .top-path {
    --draw-length: 2686.301px;
    opacity: 0.4;
    stroke-dasharray: var(--draw-length);
    stroke-dashoffset: var(--draw-length);
    animation: draw-svg 1.4s ease-in forwards;
    animation-delay: 0.3s;
  }

  .cta.animated svg.bottom .bottom-path {
    --draw-length: 2350.703px;
    opacity: 0.4;
    stroke-dasharray: var(--draw-length);
    stroke-dashoffset: var(--draw-length);
    animation: draw-svg 1s ease-in forwards;
    animation-delay: 0.6s;
  }

  .cta.animated h2 {
    animation: 1s cubic-bezier(0.83, 0, 0.17, 1) fade-in-ttb both;
  }

  .cta.animated p,
  .cta.animated .button-group {
    animation: 1s cubic-bezier(0.83, 0, 0.17, 1) fade-in both;
  }

  .cta.animated .button-group {
    animation-delay: 0.3s;
  }
}

/*-------- Browse-scholarships --------*/
.browse-scholarships-header {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-block: 6.25rem;
  text-align: center;
}

.browse-scholarships-header h1 {
  margin-bottom: 0.75rem;
  color: var(--dark-green);
}

.browse-scholarships.search-bar {
  margin-top: 2.5rem;
}

.browse-scholarships-header .svg-overlay svg.top {
  position: absolute;
  top: calc(-131px / 522.79px * 100%);
  right: calc(-115px / 1440px * 100%);
  width: calc(878.16px / 1440px * 100%);
  max-width: 878.16px;
  height: auto;
  transform: rotate(-23.98deg);
}

.browse-scholarships-header .svg-overlay svg.bottom {
  position: absolute;
  bottom: calc(-10px / 577.42px * 100%);
  left: calc(-314px / 1440px * 100%);
  width: calc(933px / 1440px * 100%);
  max-width: 933px;
  height: auto;
  transform: rotate(40deg);
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 0.625rem;
  margin-top: 1.125rem;
}

.page-link {
  padding: 0.625rem;
  border: solid 1px var(--border);
  text-decoration: none;
  color: var(--dark-green);
}

.page-link.active {
  background-color: var(--campus-green);
  color: var(--white);
  border-color: var(--campus-green);
}

@media screen and (max-width: 1024px) {
  .browse-scholarships-header .svg-overlay svg.top {
    top: calc(-50px / 522.79px * 100%);
    right: calc(-115px / 1024px * 100%);
    width: calc(878.16px / 1024px * 100%);
    max-width: 680px;
  }

  .browse-scholarships-header .svg-overlay svg.bottom {
    left: calc(-314px / 1024px * 100%);
    width: calc(933px / 1024px * 100%);
    bottom: calc(40px / 577.42px * 100%);
    max-width: 750px;
  }
}

@media screen and (max-width: 480px) {
  .browse-scholarships-header .svg-overlay svg.top,
  .browse-scholarships-header .svg-overlay svg.bottom {
    width: auto;
  }

  .browse-scholarships-header .svg-overlay svg.top {
    top: calc(-50px / 522.79px * 100%);
    right: calc(-510px / 1440px * 100%);
  }

  .browse-scholarships-header .svg-overlay svg.bottom {
    left: calc(-510px / 1440px * 100%);
  }
}

/* SSCHOLARSHIPS LISTS */
.results-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding-block: 4rem;
  padding-inline: 4rem;
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 1.5rem; /* distance from top of viewport */
  align-self: flex-start;
  background: #f0f0f0;
  padding: 1.5rem;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
}

.sidebar-close-btn {
  display: none;
}

.sidebar p.form-title {
  color: var(--dark-green);
  font-size: var(--font-h6);
  font-weight: 700;
  margin-bottom: 1rem;
}

.open_to_anyone,
.input-group.checkbox {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-direction: row-reverse;
}

.open_to_anyone label {
  display: none;
}

.sidebar input[type="checkbox"] {
  position: relative;
  appearance: none; /* important */
  -webkit-appearance: none; /* Safari */

  margin: 0;
  border-radius: 0.5rem;
  background-color: transparent;
  border: 1.5px solid #687284;
  height: 24px;
  width: 24px;
  cursor: pointer;
}

.sidebar input[type="checkbox"]:checked {
  background-color: var(--campus-green);
  border: none;
}

.sidebar input[type="checkbox"]::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("images/checked.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px 14px;
  opacity: 0; /* hidden by default */
  transition: opacity 0.15s ease-in-out;
}

.sidebar input[type="checkbox"]:checked::after {
  opacity: 1;
}

.sidebar label,
.input-group p {
  font-size: var(--font-small);
  color: var(--font-body);
  margin-bottom: 0.5rem;
}

.sidebar select {
  position: relative;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  outline: none;
  border: 0;
  width: 100%;
  padding: 1rem 1.25rem;
  border-radius: 50px;
  background: var(--white);
  color: var(--font-body);
  font-family: "Manrope", sans-serif;
}

.sidebar select::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 22px; /* ← EXACT 16px from padding */
  width: 8px;
  height: 8px;
  border-bottom-right-radius: 2px;
  border-right: 2px solid var(--font-body);
  border-bottom: 2px solid var(--font-body);
  transform: translateY(-50%) rotate(45deg);
  pointer-events: none; /* so clicks go to select */
}

.filter-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
}

.filter-buttons button {
  padding: 0.6rem 1rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
}

.input-group.select-field {
  position: relative;
  display: flex;
  flex-direction: column;
  margin-top: 1.5rem;
}

.input-group.select-field::after {
  content: "";
  position: absolute;
  bottom: 20px;
  right: 20px; /* ← EXACT 16px from padding */
  width: 8px;
  height: 8px;
  border-bottom-right-radius: 2px;
  border-right: 2px solid var(--font-body);
  border-bottom: 2px solid var(--font-body);
  transform: rotate(45deg);
  pointer-events: none; /* so clicks go to select */
}

.requirements {
  margin-top: 1.5rem;
}

.input-group.checkbox {
  padding-block: 0.75rem;
}

.input-group.checkbox label {
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.action-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.action-buttons a {
  color: var(--font-body);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  white-space: nowrap;
  transition: border-color 0.3s ease, color 0.3s ease;
}

.action-buttons a:hover {
  border-color: var(--dark-green);
  color: var(--dark-green);
}

@media (min-width: 1024px) {
  .results-wrapper {
    grid-template-columns: 320px 1fr;
    padding-inline: 3rem;
  }

  .action-buttons a {
    font-size: var(--font-small);
  }
}

@media (min-width: 1200px) {
  .results-wrapper {
    grid-template-columns: 360px 1fr;
    padding-inline: 5rem;
  }
}

/* SCHOLARSHIP SORTING */
.results .sort-wrapper {
  position: relative;
  display: inline-block;
}

.results .sort-wrapper label {
  opacity: 0;
}

.results-header {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.results-header .results-count {
  color: var(--dark-green);
  font-weight: 700;
}

.sort-wrapper {
  position: relative;
  display: inline-block;
}

.sort-wrapper label {
  opacity: 0;
}

.sort-wrapper select#sort {
  position: relative;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  outline: none;
  border: 0;
  color: var(--font-body);
  font-size: var(--font-body);
  background-color: #f0f0f0;
  border-radius: 60px;
  padding: 0.5rem 1.2rem;
  height: 3rem;
  width: 100%;
  min-width: 200px;
}

.filter-toggle-btn {
  height: 3rem;
}

.sort-wrapper::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 22px; /* ← EXACT 16px from padding */
  width: 8px;
  height: 8px;
  border-bottom-right-radius: 2px;
  border-right: 2px solid var(--font-body);
  border-bottom: 2px solid var(--font-body);
  transform: translateY(-50%) rotate(45deg);
  pointer-events: none; /* so clicks go to select */
}

.results {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.result-item-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.result-item {
  display: flex;
  gap: 1rem;
  border-bottom: solid 1px var(--subtle);
  padding-block: 2.5rem;
}

.bookmark-form {
  --width: 42px;
  width: var(--width);
}

.bookmark-form .btn-bookmark {
  display: flex;
  aspect-ratio: 1 / 1;
  justify-content: center;
  align-items: center;
  width: var(--width);
  border-radius: 100%;
  background-color: transparent;
  border: 1px solid transparent;
  border-color: transparent;
  transition: border 0.3s ease, background-color 0.3s ease;
}

.btn-bookmark svg {
  height: 18px;
  width: 14px;
}

.btn-bookmark svg path {
  transition: stroke 0.3s ease;
}

.btn-bookmark:hover {
  background-color: var(--lightgreen);
  border-color: var(--campus-green);
}

.btn-bookmark:hover svg path {
  stroke: #687284;
}

.result-items-info {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  flex: 1 1;
}

.item-info-header {
  display: flex;
  gap: 8px;
}

.item-info-header h3 {
  color: var(--dark-green);
  font-size: var(--font-h5);
}

.item-info-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.item-info-details a {
  display: flex;
  align-items: center;
  margin-top: 1.25rem;
}

.item-info-details .visit-link-arrow {
  position: relative;
  display: inline-block;
  background-image: url("images/arrow-right.svg");
  background-size: 14px;
  background-position: center;
  background-repeat: no-repeat;
  height: 16px;
  width: 16px;
  margin-left: 8px;
  transform: translateX(-6px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.item-info-details a:hover .visit-link-arrow {
  opacity: 1;
  transform: translateX(0);
}

.result-item .btn-apply {
  margin-block: auto;
}

.result-item .btn-apply svg {
  height: 10px;
  width: 0;
  margin-left: 8px;
  transition: width 0.3s ease;
}

.plus-icon path {
  stroke: var(--white);
  transition: stroke 0.3s ease;
}

.result-item .btn-apply:hover svg {
  width: 10px;
}

.fa-arrow-right-long {
  margin-left: 0.5rem;
  padding: 0.5rem;
  /* border: solid 1px var(--white); */
  border-radius: 50px;
}

@media screen and (max-width: 769px) {
  .item-info-header {
    flex-wrap: wrap;
  }
}

@media (min-width: 1025px) and (prefers-reduced-motion: no-preference) {
  .results-wrapper.animated {
    animation: 1s cubic-bezier(0.83, 0, 0.17, 1) fade-in-btt both;
    animation-delay: 0.3s;
  }
}

/*-------- SCHOLARSHIP PAGE --------*/
.scholarship-details-page {
  position: relative;
}

.back.button {
  --border: #c7d0da;
  --text: #444;
  --bg-hover: transparent;
  --text-hover: var(--campus-green);
  margin-top: 3.75rem;
}

.back.button svg {
  height: 12px;
  width: 12px;
  margin-right: 8px;
  transform: rotate(-135deg);
}

.grid-scholarship {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: 2.5rem;
  margin-bottom: 7.5rem;
  gap: 6.25rem;
}

.scholarship-wrapper h1 {
  color: var(--dark-green);
  line-height: 105%;
  margin-bottom: 2.5rem;
}

.scholarship-wrapper h2 {
  color: var(--dark-green);
  font-size: var(--font-h5);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.scholarship-wrapper p {
  margin-bottom: 1.5rem;
}

.scholarship-wrapper ul {
  list-style-type: disc;
  margin-left: 1.5rem;
}

.scholarship-wrapper ul li {
  line-height: var(--line-height-thicker);
  margin-bottom: 0.75rem;
}

/*Indention of bullet in Scholarships Page*/
.bullet-indent {
  padding: 1rem 0 1rem 1rem;
}

.note-bold {
  font-weight: 800;
  margin-top: 0.625rem;
}

.sidebar-scholarship {
  background: #fefbe9;
  border-radius: 20px;
  border: 1px solid var(--victory-gold);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2.5rem;
  max-width: 360px;
  align-self: start;
}

.sidebar-scholarship > div p {
  font-size: 1.125rem;
  font-weight: 500;
}

.span-scholarship-details {
  display: block;
  color: var(--dark-green);
  font-size: var(--font-xsmall);
  font-weight: 800;
  text-transform: uppercase;
}

.sidebar-scholarship .btn-apply {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.sidebar-scholarship .btn-apply svg {
  height: 12px;
  width: 12px;
  transform: rotate(45deg);
  transition: transform 0.3s ease;
}

.sidebar-scholarship .btn-apply:hover svg {
  transform: rotate(0);
}

.requirements-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.requirement {
  --bg-color: #e6f6eb;
  --text: var(--campus-green);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.75rem 1.25rem 0.75rem 1rem;
  background-color: var(--bg-color);
  color: var(--text);
  border-radius: 30px;
  margin-right: auto;
}

.requirement.game {
  --bg-color: #ffecca;
  --text: #b36500;
}

.requirement.dollar {
  --bg-color: #e6f6eb;
}

.requirement.star {
  --bg-color: var(--light-yellow);
  --text: #ab6400;
}

.requirement.medal {
  --bg-color: #f4eeff;
  --text: #764bb4;
}

.requirement.earth {
  --bg-color: #ffe5f9;
  --text: #b13c90;
}

.requirements-wrapper p.tag-title {
  font-size: var(--font-p);
  color: var(--text);
}

.scholarship-details-page .svg-overlay svg.top {
  position: absolute;
  top: -100px;
  right: calc(-446px / 1440px * 100%);
  width: calc(1308.54px / 1440px * 100%);
  max-width: 1308.54px;
  height: auto;
  transform: rotate(9.98deg);
}

@media (min-width: 1024px) {
  .grid-scholarship {
    grid-template-columns: 1fr 360px;
  }
}

@media screen and (max-width: 1024px) {
  .scholarship-details-page .svg-overlay svg.top {
    right: calc(-446px / 1024px * 100%);
    width: calc(1308.54px / 1024px * 100%);
    max-width: 880px;
  }
}

@media screen and (max-width: 1024px) {
  .back.button {
    margin-top: 2rem;
  }

  .grid-scholarship {
    gap: 1rem;
    margin-bottom: 3rem;
  }

  .scholarship-wrapper h1 {
    margin-bottom: 1.5rem;
  }

  .scholarship-wrapper h2 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
  }

  .sidebar-scholarship {
    gap: 1.25rem;
  }
}

@media screen and (max-width: 480px) {
  .scholarship-details-page .svg-overlay svg.top {
    width: auto;
    top: 200px;
    right: calc(-446px / 480px * 100%);
  }
}

/* Animations */
@media (min-width: 1025px) and (prefers-reduced-motion: no-preference) {
  .scholarship-details-page.animate .svg-overlay svg.top .top-path {
    opacity: 0;
  }
  .scholarship-details-page.animated .svg-overlay svg.top .top-path {
    --draw-length: 2774.063px;
    stroke-dasharray: var(--draw-length);
    stroke-dashoffset: var(--draw-length);
    animation: draw-svg 2s ease-in forwards;
  }
}

.call-to-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

@media (min-width: 768px) {
  .above-footer {
    padding: 5rem 2.25rem;
  }

  .call-to-action {
    flex-direction: row;
  }

  .cards-list article {
    flex: 1 1 calc(50% - 1.5rem);
  }

  .footer-items > .container {
    flex-direction: row;
    align-items: center;
  }

  .footer-disclaimer > .container {
    flex-direction: row;
    justify-content: space-between;
  }
}

@media (min-width: 1024px) {
  .cards-list > .container {
    flex-direction: row;
  }

  .cards-list article {
    flex: 1 1 calc(33.333% - 1.5rem);
  }

  .footer-items {
    flex-direction: row;
    justify-content: space-between;
  }

  .granted {
    font-size: 12rem;
    line-height: 100%;
  }
}

/* DEFAULT: button hidden on desktop */
.filter-toggle-btn {
  display: none;
}

/* SIDEBAR COLLAPSE */
@media (max-width: 1024px) {
  .results-wrapper {
    display: block; /* Stack content; sidebar becomes overlay */
    padding-inline: 2.5rem;
  }

  .sidebar {
    position: fixed;
    inset: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    height: 95%;
    border-radius: 0;
    margin-top: auto;
    z-index: 1001;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s ease;
  }

  .sidebar label {
    font-size: 1rem;
  }

  .sidebar p.form-title {
    text-align: center;
    margin-bottom: 2.5rem;
  }

  .sidebar-close-btn {
    display: block;
    position: absolute;
    top: 2rem;
    text-align: right;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1;
  }

  /* When filter is open (body gets a class via JS) */
  body.filter-open .sidebar {
    transform: translateY(0);
    padding-top: 2rem;
  }

  /* Show the toggle button on small screens */
  .filter-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.25rem;
    border-radius: 999px;
    border: 1px solid #e0e0e0;
    background: #fff;
    font-size: var(--font-small);
    cursor: pointer;
    gap: 0.5rem;
    margin-left: auto;
  }

  /* Backdrop behind sidebar */
  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
  }

  body.filter-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  /* Lock scrolling on page when filter is open */
  html.filter-open,
  body.filter-open {
    overflow: hidden;
  }

  .sort-wrapper select#sort {
    font-size: var(--font-small);
  }

  .results-header .results-count {
    order: -1;
  }
}

@media (max-width: 769px) {
  .results-wrapper {
    padding-inline: 1.5rem;
  }

  .item-info-details {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .filter-toggle-btn,
  form.sort-form,
  .results .sort-wrapper {
    width: 100%;
  }

  .results-header .results-count {
    order: 1;
    margin-top: 1rem;
  }

  .results {
    gap: 0;
  }
}

/* -------- UTILITIES -------- */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 400px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid;
  border-color: var(--border-color);
  background-color: var(--bg-color);
  box-shadow: 0 4px 10px -2px rgba(16, 24, 40, 0.03),
    0 12px 16px -4px rgba(16, 24, 40, 0.08);
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 9999;
  font-size: 14px;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.toast-icon {
  flex-shrink: 0;
  margin-top: 4px;
}

.toast-icon svg {
  width: 20px;
  height: 20px;
}

.toast-content p {
  font-size: var(--font-small);
  color: var(--font-body);
}

.toast-content a {
  color: var(--campus-green);
  text-decoration: underline;
}

.toast-content p.title {
  font-weight: 800;
  font-size: var(--font-p);
  margin-bottom: 8px;
}

.toast-close {
  font-family: inherit;
  margin-left: 8px;
  border: none;
  background-image: url("./images/close.svg");
  line-height: 1;
  cursor: pointer;
  width: 20px;
  height: 20px;
  margin-left: auto;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

/* States – tweak colors to your Granted greens */
.toast--success {
  --bg-color: #e6f6eb;
  --border-color: rgba(17, 93, 51, 0.5);
}

.toast--info {
  --bg-color: #fefbe9;
  --border-color: #ffc53d;
}

.toast--error {
  border-left: 4px solid #dc2626;
}

@media screen and (max-width: 481px) {
  .toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
    width: auto;
    max-width: calc(100% - 32px);
  }
}
