/* Section frame copied from the What's New section (.home-whats-new) and card rules from the
   Events slider (.tab-events__upcoming-events__event), under this widget's own class names so it
   does not depend on either of those stylesheets being loaded on the page. Differences from the
   Events card: description shown in full, no date row, optional button label, equal-height cards. */

.academics-grid {
  position: relative;
  overflow: hidden;
  padding: 80px 0;
  background: #F2F3F4;
}

.academics-grid__bg {
  position: absolute;
  right: 0;
  bottom: 0;
  max-width: 8%;
  line-height: 0;
}

.academics-grid__bg img {
  width: 100%;
  height: auto;
}

.academics-grid__title {
  margin: 0 0 12px;
  font-family: "Oxygen", sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
  color: #0D1834;
}

.academics-grid__description {
  max-width: 820px;
  margin: 0;
  font-family: "Oxygen", sans-serif;
  font-size: 15px;
  line-height: 28px;
  color: #0D1834;
}

.academics-grid__slider {
  position: relative;
  padding-top: 35px;
}

.academics-grid__swiper {
  overflow: hidden;
  padding: 1px;
}

/* Slides stretch so every card in a row is as tall as the longest one. */
.academics-grid .swiper-slide {
  height: auto;
  display: flex;
}

.ag-card-wrap {
  position: relative;
  width: 100%;
  display: flex;
}

.ag-card__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999;
}

.ag-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 320px;
  padding: 31.3px 23px 29.5px 36px;
  border: 1px solid #DEDEDE;
  background: #fff;
}

.ag-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #00A217;
  opacity: 0;
  transition: 0.4s ease-in-out all;
}

.ag-card__head {
  z-index: 99;
  margin-bottom: 18px;
}

.ag-card__eyebrow {
  display: block;
  margin-bottom: 16.6px;
  font-family: "Ubuntu", sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: #BE5753;
}

.ag-card__title {
  z-index: 99;
  margin-bottom: 0;
  font-family: "Ubuntu", sans-serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 24px;
  color: #0D1834;
  transition: 0.4s ease-in-out all;
}

.ag-card__text {
  z-index: 99;
  margin: 0;
  font-family: "Oxygen", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 26px;
  color: #0D1834;
}

/* Button label at the foot of a linked card; the card itself is the link. */
.ag-card__link {
  display: inline-block;
  margin-top: auto;
  padding-top: 20px;
  font-family: "Ubuntu", sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #158825;
  z-index: 99;
}

.ag-card__link::after {
  content: "\2192";
  display: inline-block;
  margin-left: 6px;
  transition: transform 0.3s ease-in-out;
}

.ag-card__overlay:hover + .ag-card::after {
  opacity: 1;
}

.ag-card__overlay:hover + .ag-card .ag-card__title {
  color: #BE5753;
}

.ag-card__overlay:hover + .ag-card .ag-card__eyebrow {
  opacity: 0.6;
}

.ag-card__overlay:hover + .ag-card .ag-card__link::after {
  transform: translateX(4px);
}

.academics-grid__pagination {
  margin-top: 40px;
}

/* Swiper adds these when every slide already fits (watchOverflow). */
.academics-grid .swiper-btn-floor-prev.swiper-button-lock,
.academics-grid .swiper-btn-floor-next.swiper-button-lock,
.academics-grid .academics-grid__pagination.swiper-pagination-lock {
  display: none;
}

@media (max-width: 1599.98px) {
  .academics-grid .btn-floor-wrap .swiper-btn-floor-prev {
    left: -30px;
  }
  .academics-grid .btn-floor-wrap .swiper-btn-floor-next {
    right: -30px;
  }
}

@media (max-width: 1199.98px) {
  .academics-grid {
    padding: 60px 0;
  }
  .academics-grid__title {
    font-size: 18px;
  }
  .academics-grid__slider {
    padding-top: 30px;
  }
  .ag-card {
    padding: 35px 25px;
  }
}

@media (max-width: 991.98px) {
  .academics-grid__bg {
    max-width: 80px;
  }
  .academics-grid__slider {
    padding-top: 25px;
  }
}

@media (max-width: 767.98px) {
  .academics-grid {
    padding: 50px 0 60px;
  }
  .academics-grid__bg {
    display: none;
  }
  .academics-grid__title {
    font-size: 15px;
  }
  .academics-grid__slider {
    padding-top: 15px;
  }
  .ag-card {
    min-height: 0;
    padding: 25px;
  }
  .ag-card__title {
    font-size: 16px;
  }
  /* No room for arrows outside the container on small screens; dots and swipe remain. */
  .academics-grid .btn-floor-wrap {
    display: none;
  }
  .academics-grid__pagination {
    margin-top: 25px;
  }
}
