/* ==========================================================================
   Home page (templates/pages/home.html, templates/home/) — our design, live's content.
   Rules are scoped to .page-home sections so they never leak; colours and type come from tokens.css.
   ========================================================================== */

/* --- hero: the promise on the photo, the booking panel on orange --------------------------------- */
/* As live: the photo at its own height (1400 x 520), pinned to the left edge so the trainee's face shows;
   the booking panel sits on an orange shape that runs to the screen's right edge, its left side the arc of
   a 1100px circle starting 100px before the panel. */
.home-hero {
  position: relative;
  overflow: hidden;
  background: var(--c-blue-dark) url("../../site/page-templates/img/target-zero-header.49628ed2e168.webp") left center / auto 100% no-repeat;
  color: var(--c-white);
}
.home-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 40px;
  align-items: center;
  min-height: 520px;
}
.home-hero__text { text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); }  /* as live */
.home-hero__title {
  max-width: 560px;
  margin: 0 0 16px;
  font-size: clamp(34px, 3.3vw, 55px);
  line-height: 1;
  font-weight: var(--fw-black);  /* live's Poppins Black */
}
.home-hero__sub { max-width: 520px; margin: 0; font-size: var(--fs-regular); line-height: var(--lh-regular); font-weight: var(--fw-medium); }
.home-hero__sub a { color: inherit; text-decoration: underline; }
.home-hero__booking {
  position: relative;
  z-index: 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 32px;
}
.home-hero__booking::before,
.home-hero__booking::after {
  content: "";
  position: absolute;
  z-index: -1;
  background: var(--c-orange);
}
.home-hero__booking::before {  /* the arc */
  left: -100px;
  top: calc(52% - 550px);
  width: 1100px;
  height: 1100px;
  border-radius: 50%;
}
.home-hero__booking::after { left: 450px; right: -100vw; top: 0; bottom: 0; }  /* on to the screen edge */
.home-hero__heading { margin: 0 0 6px; font-size: 22px; line-height: 28px; font-weight: var(--fw-extrabold); }
.home-hero__bodies { margin: 0 0 12px; font-size: 14px; font-weight: var(--fw-medium); }

/* Course search (site.js): a white box with the search icon, the text field and the caret; its suggestions
   open under it. Then, once a course is chosen, the three narrowing lists and "Search NOW". */
.course-search { position: relative; display: flex; flex-direction: column; gap: 10px; }
.course-search__combo {
  position: relative;
  display: flex;
  align-items: center;
  height: 46px;
  padding: 0 0 0 12px;
  border-radius: 10px;
  background: var(--c-white);
}
.course-search__combo[hidden] { display: none; }
.course-search__icon { flex: 0 0 auto; width: 20px; height: 20px; fill: var(--c-text); }
.course-search__input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 2px 44px 0 10px;
  border: 0;
  border-radius: 10px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23d97f35' d='m12 15-4.24-4.24 1.41-1.42L12 12.17l2.83-2.83 1.41 1.42z'/%3E%3C/svg%3E") right 4px center / 36px no-repeat;
  color: var(--c-text);
  font: inherit;
  font-size: 16px;
  outline: none;
  cursor: pointer;
}
.course-search__input::placeholder { color: #6b6b6b; }
.course-search__combo:focus-within { box-shadow: 0 0 0 3px rgba(33, 52, 111, 0.35); }
.course-search__list {
  position: absolute;
  z-index: 20;
  top: calc(100% - 6px);
  left: 0;
  right: 0;
  max-height: 300px;
  margin: 0;
  padding: 6px 0 0;
  overflow-y: auto;
  list-style: none;
  border: 1px solid #ccc;
  border-top: 0;
  border-radius: 0 0 10px 10px;
  background: var(--c-white);
  color: var(--c-text);
  font-size: 15px;
}
.course-search__list li { padding: 8px 12px; border-bottom: 1px solid #eee; cursor: pointer; }
.course-search__list li:last-child { border-bottom: 0; }
.course-search__list li[aria-selected="true"], .course-search__list li:hover { background: #f0f0f0; }
.course-search__list .course-search__none { color: #888; cursor: default; }
.course-search__list .course-search__none:hover { background: none; }
.course-search__details { display: flex; flex-direction: column; gap: 10px; }
.course-search__details[hidden] { display: none; }
.course-search__native,
.course-search__details select {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 32px 0 12px;
  border: 0;
  border-radius: var(--radius);
  background: var(--c-white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23e77b1b' d='m12 15-4.24-4.24 1.41-1.42L12 12.17l2.83-2.83 1.41 1.42z'/%3E%3C/svg%3E") right 8px center / 22px no-repeat;
  color: var(--c-text);
  font: inherit;
  font-size: 14px;
  appearance: none;
  cursor: pointer;
}
.course-search__details select { flex: none; }  /* full height in the column */
.course-search__native { flex: none; height: 46px; border-radius: 10px; font-size: 16px; }
.course-search__native[hidden] { display: none; }
.course-search__submit {
  height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--radius);
  background: var(--c-blue-dark);
  color: var(--c-white);
  font: inherit;
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  cursor: pointer;
}
.course-search__submit:hover { background: var(--c-blue); }
.course-search__submit[hidden] { display: none; }
.course-search__error { margin: 0; text-align: center; font-weight: var(--fw-bold); }
.course-search__error[hidden] { display: none; }

/* The NVQ part, under a white rule; it steps aside while a course search is under way (site.js). */
.home-hero__nvq-block { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--c-white); }
.home-hero__nvq-block[hidden] { display: none; }
.home-hero__nvq-block .home-hero__nvqs { margin-top: 10px; }
.home-hero__nvqs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 22px 10px; }  /* as live: */
/* one-list cards (Blue, CPCS) in the narrow column, two-list cards (Gold, Black) in the wide one, so every list
   comes out the same width */
.home-hero__nvq { min-width: 0; }
.home-hero__card { margin: 0 0 8px; font-size: 14px; line-height: 1; font-weight: var(--fw-regular); text-align: center; text-transform: uppercase; white-space: nowrap; }
.home-hero__levels { display: flex; gap: 6px; padding: 4px; border: 1px solid var(--c-white); border-radius: 10px; }
.home-hero__levels select {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 28px 0 12px;
  border: 0;
  border-radius: 7px;
  background: #f3f3f3 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23c8782a' d='m12 15-4.24-4.24 1.41-1.42L12 12.17l2.83-2.83 1.41 1.42z'/%3E%3C/svg%3E") right 6px center / 22px no-repeat;
  color: #212529;
  font: inherit;
  font-size: 0.9rem;  /* as live renders them: 14.4px, medium */
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  appearance: none;
  cursor: pointer;
}
.home-hero__levels select:hover { background-color: #ececec; }
.home-hero__levels option { background: var(--c-white); color: #000; font-weight: var(--fw-regular); text-transform: none; }
.home-hero__reset { display: block; margin: 12px auto 0; padding: 0; border: 0; background: none; color: var(--c-white); font: inherit; font-size: 14px; cursor: pointer; }
.home-hero__reset:hover { text-decoration: underline; }
/* Tablets and phones: the photo behind the title (centred on the trainee), the booking panel below it as an
   orange card. */
@media (max-width: 991px) {
  .home-hero { background-size: cover; background-position: 58% center; }
  .home-hero__inner { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-block: 40px 0; text-align: center; }
  .home-hero__title, .home-hero__sub { margin-inline: auto; }
  .home-hero__booking { margin: 32px 0; padding: 28px 32px; border-radius: var(--radius); background: var(--c-orange); text-align: left; }
  .home-hero__booking::before, .home-hero__booking::after { content: none; }
}
@media (max-width: 575px) {
  .home-hero__booking { padding: 20px; }  /* still inside the margins, corners rounded */
  .home-hero__nvqs { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .home-hero__card { font-size: 13px; }
}

/* --- "Need more advice?" callback strip ---------------------------------------------------------- */
/* As live: a 100px orange band, its 140px badge rising 73px into the hero above. */
.home-advice { position: relative; z-index: 1; background: var(--c-orange); }
.home-advice__inner {
  display: flex;
  align-items: center;
  gap: 0;
  width: var(--content-share);
  max-width: var(--content-width);
  min-height: 100px;
  margin: 0 auto;
  padding: 30px 0;
}
.home-advice__img {
  flex: 0 0 auto;
  align-self: flex-start;
  width: 140px;
  height: 140px;
  margin: -73px 0 -27px 40px;  /* 73px into the hero; the band keeps its height */
}
.home-advice__form { display: flex; flex: 1; flex-wrap: wrap; gap: 10px; margin-left: 10px; }  /* a little air after the badge */
.home-advice__form input {
  flex: 1 1 160px;
  min-width: 0;
  height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  font: inherit;
}
.home-advice__form button {
  flex: 0 0 auto;
  height: 38px;
  padding: 0 24px;
  border: 0;
  border-radius: 8px;
  background: var(--c-blue-dark);
  color: var(--c-white);
  font: inherit;
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  cursor: pointer;
}
.home-advice__form button:hover { background: var(--c-blue); }
@media (max-width: 991px) {
  .home-advice__img { margin: -40px 0 0; align-self: center; width: 110px; height: 110px; }
  .home-advice__inner { flex-direction: column; gap: 10px; padding: 0 0 24px; }
  .home-advice__form { margin-left: 0; width: 100%; }
}
/* Phones: no badge; the button runs the full width under the fields. */
@media (max-width: 767px) {
  .home-advice__img { display: none; }
  .home-advice__inner { padding: 24px 0; }
  .home-advice__form button { flex-basis: 100%; }
}

/* --- reviews -------------------------------------------------------------------------------------- */
.home-reviews { padding: 20px 0; }
/* The widget's 140px is held from the start, so nothing jumps when it loads. */
.home-reviews__box { display: flex; align-items: center; justify-content: center; gap: 24px 60px; min-height: 140px; }
.home-reviews .tp-rating { color: var(--c-text); }
.home-reviews__link { color: var(--c-blue); font-weight: var(--fw-bold); }

/* --- promos on blue ------------------------------------------------------------------------------- */
.home-promos {
  padding: 60px 0;
  background: var(--c-blue) url("../../site/page-templates/img/circles-bg.35fdb346aa0b.svg") center bottom / auto no-repeat fixed;  /* the circles stay put while the page scrolls, as live */
}
.home-promos__inner { width: var(--content-share); max-width: 1180px; margin: 0 auto; }  /* live's width */
.home-promos .promo { margin: 0; }
.home-promos__inner + .home-promos__inner { margin-top: 32px; }  /* no offers today: the two promos meet */

/* "Exclusive Offers": live's orange band between the promos, three 400px cards in a 1200px row. */
.home-offers { margin: 100px 0; padding-bottom: 20px; background: var(--c-orange); }
.home-offers__inner { position: relative; max-width: 1200px; margin: 0 auto; }
.home-offers__title { margin: 0; padding: 20px 0 10px; color: var(--c-white); font-size: 28px; line-height: 34px; font-weight: var(--fw-extrabold); text-align: center; }
.home-offers__viewport { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.home-offers__viewport::-webkit-scrollbar { display: none; }
.home-offers__track { display: flex; margin: 0; padding: 0; list-style: none; }
.offer-card {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 0 0 400px;
  min-height: 200px;
  padding: 10px;
  border: 10px solid var(--c-orange);
  background: var(--c-white) padding-box;
  color: var(--c-text);
  font-size: 14px;
  line-height: 20px;
  scroll-snap-align: start;
}
.offer-card p { margin: 0; }
.offer-card__badge {
  position: absolute;
  top: 25px;
  right: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: #d00028;
  box-shadow: 0 0 8px grey;
  color: var(--c-white);
  font-size: 22px;
  line-height: 24px;
  font-weight: 800;
  text-align: center;
  rotate: -10deg;
}
.offer-card__name { width: 70%; color: #3750a4; font-weight: 800; }
.offer-card__date { font-weight: var(--fw-medium); }
.offer-card .offer-card__place {
  align-self: flex-start;
  margin: 10px 0 20px;
  padding: 3px 10px;
  border-radius: 5px;
  background: green;
  color: var(--c-white);
  font-weight: var(--fw-bold);
}
.offer-card__foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: auto -10px 0;
  padding: 10px 10px 0;
  border-top: 1px solid #ccc;
  font-weight: var(--fw-semibold);
}
.offer-card__price { width: 50%; border-right: 1px solid #ccc; color: #d00028; font-size: 14px; line-height: 18px; text-align: center; }
.offer-card__price strong { font-size: 18px; font-weight: 800; }
.offer-card__price s { color: #2c4287; }
.offer-card__details {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 47%;
  padding: 0 20px;
  border-radius: 4px;
  background: #3750a4;
  color: var(--c-white);
  text-decoration: none;
}
.offer-card__details:hover { background: var(--c-orange); }
.home-offers__arrow {
  position: absolute;
  top: 60%;
  z-index: 1;
  width: 32px;
  height: 48px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.home-offers__arrow::before { content: ""; display: block; margin: auto; border: 12px solid transparent; }
.home-offers__arrow--prev { left: -48px; }
.home-offers__arrow--prev::before { border-right-color: var(--c-white); border-left-width: 0; }
.home-offers__arrow--next { right: -48px; }
.home-offers__arrow--next::before { border-left-color: var(--c-white); border-right-width: 0; }
.home-offers__dots { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.home-offers__dots button { width: 12px; height: 12px; padding: 0; border: 0; border-radius: 50%; background: #ccc; cursor: pointer; }
.home-offers__dots button[aria-current="true"] { background: #3750a4; }
@media (max-width: 1300px) {
  .home-offers__arrow--prev { left: 0; }
  .home-offers__arrow--next { right: 0; }
}
@media (max-width: 767px) {
  .home-offers { margin: 70px 0; }
  .offer-card { flex-basis: 100%; }
  .home-offers__arrow { display: none; }
}
@media (min-width: 768px) {
  .home-offers__dots { display: none; }
}
/* Live's homepage circles are larger than the shared promo's: 240px, the "200+" at 80px, "10% off" at 70px. */
@media (min-width: 769px) {
  .home-promos .promo__circle { flex-basis: 240px; height: 240px; margin: -10px 0 0 20px; font-size: 70px; line-height: 60px; }
  .home-promos .promo__circle--stack { font-size: 32px; line-height: 32px; }
  .home-promos .promo__big { font-size: 80px; line-height: 80px; }
  .home-promos .promo__title { font-size: 32px; line-height: 38px; }
  .home-promos .promo__subtitle { font-size: 20px; line-height: 26px; }
}

/* --- free mock tests ------------------------------------------------------------------------------ */
.home-mocks { padding: 60px 0; text-align: center; }
.home-mocks .container { max-width: 1180px; }  /* live's width: four cards a row */
.home-mocks__title { margin: 0 0 8px; color: var(--c-orange); font-size: var(--fs-medium); line-height: var(--lh-medium); font-weight: var(--fw-extrabold); }
.home-mocks__sub { margin: 0 0 24px; color: var(--c-blue-dark); font-size: var(--fs-regular); line-height: var(--lh-regular); font-weight: var(--fw-bold); }
.home-mocks__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 16px 10px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}
.home-mocks__card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 20px 18px;
  border-radius: var(--radius);
  background: var(--c-blue-dark);
  color: var(--c-white);
  text-decoration: none;
}
.home-mocks__card:hover { background: var(--c-blue); }
.home-mocks__name { margin: 0 0 8px; font-size: 16px; line-height: 20px; font-weight: var(--fw-bold); }
.home-mocks__card p { flex: 1; margin: 0 0 16px; font-size: 13px; line-height: 20px; font-weight: var(--fw-light); }
.home-mocks__cta {
  align-self: center;
  padding: 6px 18px;
  border-radius: var(--radius);
  background: var(--c-white);
  color: var(--c-text);
  font-size: 14px;
  text-transform: uppercase;
}

/* --- solutions for businesses, on navy ------------------------------------------------------------ */
.home-solutions {
  padding: 60px 0;
  background: var(--c-blue-dark) url("../../site/page-templates/img/circles-bg.35fdb346aa0b.svg") center bottom / auto no-repeat;
  color: var(--c-white);
  text-align: center;
}
.home-solutions .container { max-width: 1600px; }  /* live's band */
.home-solutions__title { margin: 0 0 8px; font-size: var(--fs-medium); line-height: var(--lh-medium); font-weight: var(--fw-bold); }
.home-solutions__intro { max-width: 520px; margin: 0 auto 32px; font-size: 18px; line-height: 22px; font-weight: var(--fw-light); }
.home-solutions__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
  gap: 24px;
  max-width: 1440px;  /* live's six columns span about 1435px */
  margin: 0 auto;
  padding: 0;
  list-style: none;
}
.home-solutions__item img { width: auto; height: 64px; }
.home-solutions__item p { margin: 0; font-size: 15px; line-height: 20px; font-weight: var(--fw-light); }
.home-solutions__item .home-solutions__name { margin: 8px 0 4px; font-size: 18px; line-height: 22px; font-weight: var(--fw-bold); }

/* --- book online (chat) and the classroom pitch, in the white content box ------------------------ */
.page-home .home-book { max-width: 1271px; margin-top: -40px; position: relative; }  /* live's text runs 1171px */
.home-book__chat { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 32px; }
.home-book__chat p { margin: 0; }
.home-book__title { color: var(--c-orange); font-size: var(--fs-medium); line-height: var(--lh-medium); font-weight: var(--fw-extrabold); }
.home-book__text { max-width: 560px; color: var(--c-blue-dark); font-size: var(--fs-regular); line-height: var(--lh-regular); font-weight: var(--fw-extrabold); }
.home-book__chat .help-boxes__chats { margin: 0; }
.home-book__classroom { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.home-book__classroom img { width: 100%; height: auto; border-radius: var(--radius); }
@media (max-width: 768px) {
  .home-book__classroom { grid-template-columns: minmax(0, 1fr); }
}

/* --- the two logo rails --------------------------------------------------------------------------- */
.page-home .trusted-by { padding: 20px 0 48px; }
.page-home .trusted-by:has(h3) .container { max-width: 1100px; }  /* "Accredited by": live's width */

/* --- sectors band on the scaffolding photo -------------------------------------------------------- */
.home-sectors {
  padding: 70px 0;
  background: linear-gradient(rgba(25, 48, 127, 0.85), rgba(25, 48, 127, 0.85)),
              url("../../site/page-templates/img/safety-courses.f63c8d566a6a.webp") center / cover no-repeat;
  color: var(--c-white);
  text-align: center;
}
.home-sectors__inner { max-width: calc(var(--content-width) + 2 * var(--gutter)); }  /* live's text: 1060px */
.home-sectors__title { margin: 0 0 12px; font-size: var(--fs-medium); line-height: var(--lh-medium); font-weight: var(--fw-extrabold); }
.home-sectors p { margin: 0 0 24px; font-size: 16px; line-height: 22px; font-weight: var(--fw-light); }
.home-sectors__book {
  display: inline-block;
  padding: 12px 22px;
  border-radius: var(--radius);
  background: var(--c-orange);
  color: var(--c-white);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  text-decoration: none;
}
.home-sectors__book:hover { background: var(--c-white); color: var(--c-orange); }

/* --- latest posts --------------------------------------------------------------------------------- */
.home-posts { width: var(--content-share); max-width: var(--content-width); margin: 0 auto; padding: 60px 0; }
.home-posts__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.home-posts__title { margin: 0; color: var(--c-heading); font-size: var(--fs-medium); line-height: var(--lh-medium); font-weight: var(--fw-extrabold); }
.home-posts__all { color: var(--c-orange); font-weight: var(--fw-semibold); text-decoration: none; }
.home-posts__all:hover { text-decoration: underline; }
.home-posts__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));  /* live's three newest posts */
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.home-posts__card { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--c-white); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06); }
.home-posts__card img { display: block; width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }
.home-posts__name { margin: 16px 20px 8px; font-size: 17px; line-height: 22px; font-weight: var(--fw-medium); }
.home-posts__name a { color: var(--c-text); text-decoration: none; }
.home-posts__name a::after { content: ""; position: absolute; inset: 0; }  /* the whole card opens the post */
.home-posts__card:hover .home-posts__name a { color: var(--c-orange); }
.home-posts__date { margin: 0 20px 20px; color: var(--c-blue-dark); font-size: 14px; }
@media (max-width: 768px) {
  .home-posts__list { grid-template-columns: minmax(0, 1fr); }
}
