/* ==========================================================================
   Hot Deals: Black Friday 2026 skin
   Loaded on the Hot Deals page only (see inc/enqueue.php) and scoped to
   .deals-main--bf, so the home page banner and the spooky sale page are not
   affected. Images: assets/img/promo/bf/ts-bf-*.webp
   ========================================================================== */

.deals-main--bf {
  --bf-red: #e60000;
  --bf-red-dark: #b30000;
}

.deals-main--bf section {
  position: relative;
}

/* ---------- Hero banner ---------- */
.deals-main--bf .deals-banner img {
  aspect-ratio: 1771 / 888;
}

/* Hit-area over the "BFD7 | COPY" pill painted in ts-bf-deals-hero.webp.
   The pill spans x 704–1052 and y 508–570 of the 1771 × 888 artwork, so the
   area is placed by its centre in percentages and stays on the pill at any
   width. The minimum size keeps it easy to tap on phones. */
.deals-main--bf .deals-banner__copy {
  left: 49.6%;
  top: 60.7%;
  width: max(19.7%, 96px);
  height: max(7%, 30px);
  border-radius: 999px;
  transform: translate(-50%, -50%);
}

.deals-main--bf .deals-banner__copy:hover {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.6), 0 6px 16px rgba(230, 0, 0, 0.35);
}

/* ---------- Organisations: red boxes with a bow on the corner ---------- */
.deals-main--bf .deals-organisations {
  padding-top: 34px;
}

.deals-main--bf .ts-organisations__title {
  margin-bottom: 0;
}

.deals-main--bf .ts-organisations__slider {
  padding-top: 44px;
}

.deals-main--bf .ts-organisations__box {
  position: relative;
  overflow: visible;
  background: #fff;
  border: 3px solid var(--bf-red);
  border-radius: 28px 0 28px 0;
}

.deals-main--bf .ts-organisations__box::after {
  content: "";
  position: absolute;
  top: -40px;
  right: -36px;
  width: 104px;
  height: 100px;
  background: url("../img/promo/bf/ts-bf-bow.webp") center / contain no-repeat;
  pointer-events: none;
}

/* ---------- Gift decorations beside section titles ---------- */
.deals-main--bf .deals-trending::before,
.deals-main--bf .deals-trending::after,
.deals-main--bf .deals-accreditation::before,
.deals-main--bf .deals-accreditation::after {
  content: "";
  position: absolute;
  top: 2px;
  width: 250px;
  height: 96px;
  background: center / contain no-repeat;
  pointer-events: none;
  z-index: 1;
}

.deals-main--bf .deals-trending::before {
  left: calc(50% - 670px);
  background-image: url("../img/promo/bf/ts-bf-gifts-l.webp");
}

.deals-main--bf .deals-trending::after {
  right: calc(50% - 670px);
  background-image: url("../img/promo/bf/ts-bf-gifts-r.webp");
}

.deals-main--bf .deals-accreditation::before {
  left: calc(50% - 720px);
  top: 4px;
  background-image: url("../img/promo/bf/ts-bf-gifts-ribbon-l.webp");
}

.deals-main--bf .deals-accreditation::after {
  right: calc(50% - 720px);
  top: 4px;
  background-image: url("../img/promo/bf/ts-bf-gifts-ribbon-r.webp");
}

/* ---------- Trending courses: red cards with a Black Friday corner ---------- */
.deals-main--bf .deals-trending {
  padding-top: 30px;
}

.deals-main--bf .ts-trending__title {
  position: relative;
  z-index: 2;
  margin-bottom: 44px;
}

.deals-main--bf .ts-course-card {
  border: 1.5px solid var(--bf-red);
  background: var(--ts-cream);
}

.deals-main--bf .ts-course-card:hover {
  box-shadow: 0 12px 24px rgba(230, 0, 0, 0.18);
}

.deals-main--bf .ts-course-card__media::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 62%;
  aspect-ratio: 329 / 219;
  background: url("../img/promo/bf/ts-bf-corner.webp") left top / contain no-repeat;
  pointer-events: none;
}

.deals-main--bf .ts-card-divider {
  height: 2px;
  background: var(--bf-red);
}

.deals-main--bf .ts-course-card__actions .ts-btn--outline {
  background:
    linear-gradient(var(--ts-fill), var(--ts-fill)) padding-box,
    linear-gradient(var(--bf-red), var(--bf-red)) border-box;
}

/* ---------- Accreditation: red boxes ---------- */
.deals-main--bf .deals-accreditation {
  padding-top: 40px;
}

.deals-main--bf .ts-accreditation__title {
  position: relative;
  z-index: 2;
}

.deals-main--bf .ts-accreditation__box {
  background: #fff;
  border: 3px solid var(--bf-red);
  border-radius: 28px 0 28px 0;
}

/* ---------- Certificate offer ---------- */
.deals-main--bf .deals-certificate {
  padding-bottom: 110px;
}

.deals-main--bf .ts-certificate__frame {
  overflow: visible;
  background: #fff;
  border: 3px solid var(--bf-red);
}

/* Bow on the top-left corner, gifts at the bottom-left of the frame */
.deals-main--bf .ts-certificate__frame::before,
.deals-main--bf .ts-certificate__frame::after {
  content: "";
  position: absolute;
  z-index: 2;
  background: center / contain no-repeat;
  pointer-events: none;
}

.deals-main--bf .ts-certificate__frame::before {
  top: -46px;
  left: -40px;
  width: 116px;
  height: 110px;
  background-image: url("../img/promo/bf/ts-bf-bow.webp");
  transform: scaleX(-1);
}

.deals-main--bf .ts-certificate__frame::after {
  bottom: -64px;
  left: -64px;
  width: 170px;
  height: 150px;
  background-image: url("../img/promo/bf/ts-bf-gifts-pair.webp");
}

.deals-main--bf .deals-certificate::after {
  content: "";
  position: absolute;
  right: calc(50% - 700px);
  bottom: 40px;
  width: 360px;
  height: 136px;
  background: url("../img/promo/bf/ts-bf-gifts-ribbon-r.webp") center / contain no-repeat;
  pointer-events: none;
}

/* Shopping bags either side of the title, red "20% Off" */
.deals-main--bf .ts-certificate__title {
  position: relative;
  max-width: 440px;
}

.deals-main--bf .ts-certificate__title::before,
.deals-main--bf .ts-certificate__title::after {
  content: "";
  position: absolute;
  top: -8px;
  width: 50px;
  height: 66px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 66' fill='none' stroke='%23e60000' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M4 20h42l-3 44H7z'/%3E%3Cpath d='M15 26V12a10 10 0 0 1 20 0v14'/%3E%3Cpath d='M11 20l2-6h24l2 6' stroke-width='1.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.deals-main--bf .ts-certificate__title::before {
  left: -62px;
}

.deals-main--bf .ts-certificate__title::after {
  right: -46px;
}

.deals-main--bf .ts-certificate__title strong {
  color: var(--bf-red);
  font-weight: 800;
  -webkit-text-stroke: 1px var(--ts-dark);
  paint-order: stroke fill;
}

.deals-main--bf .ts-certificate__list .bi {
  color: var(--bf-red);
}

.deals-main--bf .ts-certificate__btn {
  background: var(--bf-red);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1399.98px) {
  .deals-main--bf .deals-trending::before,
  .deals-main--bf .deals-accreditation::before {
    left: 0;
  }

  .deals-main--bf .deals-trending::after,
  .deals-main--bf .deals-accreditation::after {
    right: 0;
  }

  .deals-main--bf .deals-trending::before,
  .deals-main--bf .deals-trending::after,
  .deals-main--bf .deals-accreditation::before,
  .deals-main--bf .deals-accreditation::after {
    width: 200px;
    height: 78px;
  }

  .deals-main--bf .deals-certificate::after {
    right: 0;
    width: 280px;
  }
}

@media (max-width: 991.98px) {
  .deals-main--bf .deals-trending::before,
  .deals-main--bf .deals-trending::after,
  .deals-main--bf .deals-accreditation::before,
  .deals-main--bf .deals-accreditation::after {
    width: 130px;
    height: 52px;
    top: 0;
  }

  .deals-main--bf .ts-certificate__title::before,
  .deals-main--bf .ts-certificate__title::after {
    display: none;
  }
}

@media (max-width: 767.98px) {
  .deals-main--bf .ts-organisations__slider {
    padding-top: 34px;
  }

  .deals-main--bf .ts-organisations__box::after {
    top: -30px;
    right: -26px;
    width: 76px;
    height: 72px;
  }

  .deals-main--bf .deals-trending,
  .deals-main--bf .deals-accreditation {
    padding-top: 58px;
  }

  .deals-main--bf .deals-trending::before,
  .deals-main--bf .deals-trending::after,
  .deals-main--bf .deals-accreditation::before,
  .deals-main--bf .deals-accreditation::after {
    width: 110px;
    height: 44px;
    top: 6px;
  }

  .deals-main--bf .ts-certificate__frame::before {
    top: -32px;
    left: -26px;
    width: 80px;
    height: 76px;
  }

  .deals-main--bf .ts-certificate__frame::after {
    bottom: -40px;
    left: -30px;
    width: 110px;
    height: 98px;
  }

  .deals-main--bf .deals-certificate::after {
    width: 180px;
    height: 70px;
    bottom: 16px;
  }
}
