/* ==========================================================================
   Home page
   ========================================================================== */

/* ---------- Hero ---------- */
.home-hero {
  padding: 28px 0 0;
  background-position: calc(50% - 368px) 3px;
}

.home-hero__content {
  padding-top: 6px;
}

.home-hero__title {
  font-family: var(--ts-font-head);
  font-size: 43px;
  line-height: 50px;
  color: var(--ts-black);
  margin: 0 0 18px;
}

.home-hero__title span {
  display: block;
}

.home-hero__title-light {
  font-weight: 400;
}

.home-hero__title-bold {
  font-weight: 600;
}

.home-hero__text {
  font-weight: 300;
  font-size: 13.5px;
  line-height: 16.5px;
  max-width: 345px;
  margin: 0 0 19px 2px;
}

.home-hero__search {
  width: 421px;
  max-width: 100%;
  height: 33px;
  margin-left: 2px;
}

.home-hero__search .ts-search__btn {
  flex-basis: 76px;
  height: 26px;
}

.home-hero__media img {
  display: block;
  width: 479px;
  margin-left: 66px;
}

/* ---------- Promo cards ---------- */
.home-promo {
  padding-top: 52px;
}

.home-promo__track {
  position: relative;
  display: flex;
  justify-content: space-between;
  padding: 0 7px;
}

.home-promo__card {
  display: block;
  width: 334px;
  height: 414px;
  border: 5px solid transparent;
  background:
    linear-gradient(#fff, #fff) padding-box,
    var(--ts-gradient) border-box;
  box-shadow: 12px 14px 22px rgba(0, 0, 0, 0.16);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.home-promo__card:hover {
  transform: translateY(-4px);
  box-shadow: 14px 18px 28px rgba(0, 0, 0, 0.2);
}

.home-promo__card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-promo__card--first {
  border-radius: 62px 0 0 0;
}

.home-promo__card--last {
  border-radius: 0 0 62px 0;
}

/* ---------- Big banner ---------- */
.home-banner {
  padding-top: 68px;
}

.home-banner__frame {
  position: relative;
  margin: 0 7px;
  aspect-ratio: 1148 / 576;
  border: 6px solid transparent;
  border-radius: 64px 0 64px 0;
  background:
    linear-gradient(#f6ead7, #f6ead7) padding-box,
    var(--ts-gradient) border-box;
  box-shadow: 14px 18px 26px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.home-banner__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Invisible hit-area over the "COPY" pill painted in the banner art */
.home-banner__copy {
  left: 49.6%;
  top: 56.6%;
  width: 9.4%;
  height: 6.6%;
}

/* ---------- Features ---------- */
.home-features {
  padding-top: 28px;
}

.home-features__title {
  margin-bottom: 39px;
}

.home-features__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 27px;
}

.home-features__card {
  background: var(--ts-cream);
  border-radius: var(--ts-leaf-lg) 0 var(--ts-leaf-lg) 0;
  min-height: 242px;
  padding: 21px 14px 20px 21px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.home-features__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(230, 109, 36, 0.14);
}

.home-features__icon {
  width: 45px;
  height: 45px;
  display: block;
  margin-bottom: 10px;
}

.home-features__card-title {
  font-family: var(--ts-font-body);
  font-weight: 500;
  font-size: 21px;
  line-height: 25px;
  min-height: 50px;
  margin: 0 0 8px;
}

.home-features__card-text {
  font-weight: 300;
  font-size: 16px;
  line-height: 19.5px;
  margin: 0;
  padding-right: 10px;
}

/* ---------- Trending courses (shared .ts-trending in sections.css) ---------- */
.home-trending {
  margin-top: 38px;
}

/* ---------- Recent blogs ---------- */
.home-blogs {
  padding: 22px 0 26px;
}

.home-blogs__title {
  margin-bottom: 40px;
}

/* One-by-one carousel: 4 cards visible (2 on tablet / phone) */
.home-blogs__viewport {
  --blog-per-view: 4;
  --blog-gap: 22px;
  overflow: hidden;
  padding: 8px 0 24px; /* room for the card hover lift + shadow */
  margin: -8px 0 -24px;
}

.home-blogs__track {
  display: flex;
  gap: var(--blog-gap);
  will-change: transform;
}

.home-blogs__track > * {
  flex: 0 0 calc((100% - (var(--blog-per-view) - 1) * var(--blog-gap)) / var(--blog-per-view));
}

.home-blogs__dots {
  margin: 39px 0 22px;
}

.home-blogs__btn {
  height: 52px;
  padding: 0 22px;
  background: var(--ts-gradient);
  color: var(--ts-white);
  font-weight: 600;
  font-size: 15px;
  border-radius: 26px 0 26px 0;
  min-width: 160px;
}

.home-blogs__btn:hover {
  color: var(--ts-white);
}



/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1199.98px) {
  .home-hero__media img {
    width: 100%;
    margin-left: 0;
  }

  .home-promo__track {
    gap: 24px;
  }

  .home-promo__card {
    width: auto;
    flex: 1;
    height: auto;
    aspect-ratio: 334 / 414;
  }

  .home-features__card-title {
    font-size: 18px;
    line-height: 22px;
    min-height: 44px;
  }

  .home-features__card-text {
    font-size: 14px;
  }

}

@media (max-width: 991.98px) {
  .home-hero__title {
    font-size: 34px;
    line-height: 40px;
  }

  .home-hero__media {
    margin-top: 40px;
  }

  .home-features__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .home-blogs__viewport {
    --blog-per-view: 2;
  }

}

@media (max-width: 767.98px) {
  .home-hero {
    padding-top: 50px;
    --chevron-y: 0px;
  }

  .home-hero__content {
    padding-top: 0;
  }

  .home-hero__title {
    font-size: 36px;
    line-height: 44px;
    margin-bottom: 18px;
  }

  .home-hero__text {
    font-size: 11px;
    line-height: 13px;
    max-width: 300px;
    margin-bottom: 26px;
  }

  .home-hero__search {
    width: 310px;
    height: 32px;
  }

  .home-hero__search .ts-search__btn {
    flex-basis: 76px;
    height: 25px;
  }

  .home-hero__media {
    margin-top: 76px;
  }

  /* Promo cards: centred carousel, neighbours peek out smaller */
  .home-promo {
    padding-top: 110px;
  }

  .home-promo .ts-container {
    padding-inline: 0;
  }

  .home-promo__track {
    gap: 0;
    padding: 0 9.5vw 40px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .home-promo__track::-webkit-scrollbar {
    display: none;
  }

  .home-promo__card {
    flex: 0 0 81vw;
    aspect-ratio: 345 / 430;
    scroll-snap-align: center;
    border-radius: 0;
    transition: transform 0.35s ease;
  }

  .home-promo__card:hover {
    transform: none;
  }

  .home-promo__card.is-prev {
    transform: scale(0.82);
    transform-origin: right center;
  }

  .home-promo__card.is-next {
    transform: scale(0.82);
    transform-origin: left center;
  }

  .home-promo__card.is-active {
    position: relative;
    z-index: 2;
  }

  .home-banner {
    display: none;
  }

  .home-features {
    padding-top: 30px;
  }

  .home-features__title {
    margin-bottom: 22px;
  }

  .home-features__grid {
    gap: 26px 14px;
  }

  .home-features__card {
    min-height: 175px;
    padding: 14px 10px 14px 14px;
    border-radius: 34px 0 34px 0;
  }

  .home-features__icon {
    width: 30px;
    height: 30px;
    margin-bottom: 10px;
  }

  .home-features__card-title {
    font-size: 15px;
    line-height: 18px;
    min-height: 36px;
    margin-bottom: 12px;
  }

  .home-features__card-text {
    font-size: 11px;
    line-height: 13px;
    padding-right: 0;
  }

  .home-trending {
    margin-top: 40px;
  }

  .home-blogs__viewport {
    --blog-gap: 12px;
  }

  .home-blogs {
    padding-top: 40px;
  }

  .home-blogs__title {
    margin-bottom: 22px;
  }

  .home-blogs__dots {
    margin: 30px 0 24px;
  }

  .home-blogs__btn {
    height: 50px;
    font-size: 14px;
    min-width: 158px;
  }
}


