/* Home page section refinements: quick finder, category cards, learner
   stories and the feedback form. Loaded after home-redesign.css; site-wide
   sheets restyle buttons, inputs and paragraphs with !important, so the same
   is used here where those sheets would otherwise win. */

/* ------------------------------------------------------------------ */
/* Quick finder                                                        */
/* ------------------------------------------------------------------ */
body#home .gx-search {
  border: 0;
  background: transparent;
}

body#home .gx-search__surface {
  position: relative;
  display: grid;
  grid-template-columns: clamp(120px, 15vw, 176px) minmax(0, 1fr) minmax(300px, 1.08fr);
  align-items: center;
  gap: 14px clamp(18px, 2.6vw, 36px);
  padding: 26px clamp(20px, 3vw, 38px);
  border-radius: 18px;
  background:
    radial-gradient(circle at 12% 18%, rgba(88, 160, 255, .32), transparent 34%),
    radial-gradient(circle at 96% 100%, rgba(40, 110, 255, .38), transparent 42%),
    linear-gradient(120deg, #062a86 0%, #0a3fbf 52%, #0531a0 100%);
  box-shadow: 0 18px 36px rgba(8, 44, 130, .22);
  color: #fff;
}

body#home .gx-search__art {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 12px 18px rgba(2, 18, 70, .38));
}

body#home .gx-search__copy { min-width: 0; }

body#home .gx-search .gx-kicker { color: #8fc2ff !important; }

body#home .gx-search h2 {
  margin: 4px 0 0;
  color: #fff !important;
}

body#home .gx-search__copy p {
  margin: 8px 0 0 !important;
  hyphens: manual;
  color: rgba(255, 255, 255, .86) !important;
}

body#home .gx-search__control { min-width: 0; }
body#home .gx-search__surface:has(.home-search-results:not([hidden])) { align-items: start; }

body#home .gx-search__form {
  align-items: center;
  min-height: 54px;
  padding: 5px 5px 5px 8px;
  border: 0;
  border-radius: 999px;
  overflow: visible;
  background: #fff;
  box-shadow: 0 10px 22px rgba(2, 18, 70, .28);
}

body#home .gx-search__form input {
  align-self: stretch;
  border-radius: 999px !important;
  background: transparent !important;
}

body#home .gx-search__form button[type="submit"] {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  min-height: 44px !important;
  padding: 0 22px !important;
  border-radius: 999px !important;
  background: linear-gradient(120deg, #1a6bff, #0a45d8) !important;
  box-shadow: 0 6px 14px rgba(10, 69, 216, .35) !important;
  color: #fff !important;
  font-weight: 700 !important;
  white-space: nowrap;
}

body#home .gx-search__form button[type="submit"] svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
}

/* The pill is the field: the input inside carries no border or ring of its
   own, and the browser's built-in clear cross is hidden so only one shows. */
body#home .gx-search__form:focus-within {
  box-shadow: 0 0 0 3px rgba(143, 194, 255, .7), 0 10px 22px rgba(2, 18, 70, .28);
}

body#home .gx-search__form input,
body#home .gx-search__form input:focus {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

body#home .gx-search__form input::-webkit-search-cancel-button,
body#home .gx-search__form input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

body#home .gx-search__form .gx-search-clear {
  flex: 0 0 30px !important;
  width: 30px !important;
  min-width: 30px !important;
  height: 30px !important;
  min-height: 30px !important;
  margin: 0 8px 0 4px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: #eef3fc !important;
  box-shadow: none !important;
  color: #42639e !important;
  font: 600 20px/1 Arial, sans-serif !important;
  transform: none !important;
}

body#home .gx-search__form .gx-search-clear:hover { background: #dfe9fb !important; }

/* Results sit inside the banner, three rows at a time; the banner grows by
   those three rows and the rest are reached by scrolling the list, which
   ends with a "No more results" line. */
body#home .gx-search__control .home-search-results {
  position: static;
  display: block;
  max-height: none;
  margin: 12px 0 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(2, 18, 70, .28);
}

body#home .gx-search__control .home-search-results[hidden] { display: none !important; }

body#home .home-search-results__count {
  margin: 0 !important;
  padding: 9px 14px;
  border-bottom: 1px solid #e6edf9;
  color: #4b6190 !important;
  font: 600 12px/1.3 Inter, Arial, sans-serif !important;
}

body#home .home-search-results__list {
  --gx-result-row: 52px;
  max-height: calc(var(--gx-result-row) * 3);
  padding: 0 4px 0 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-snap-type: y mandatory;
  scroll-padding: 0 !important;
  scrollbar-width: thin;
  scrollbar-color: #9fb6e6 #eef3fc;
}

body#home .home-search-results__list::-webkit-scrollbar { width: 8px; }
body#home .home-search-results__list::-webkit-scrollbar-track { margin: 6px 0; border-radius: 999px; background: #eef3fc; }
body#home .home-search-results__list::-webkit-scrollbar-thumb { border-radius: 999px; background: #9fb6e6; }
body#home .home-search-results__list::-webkit-scrollbar-thumb:hover { background: #6f90d6; }
body#home .home-search-results__list:focus-visible { outline: 2px solid #1257e0; outline-offset: -2px; }

/* Shown at once: the page's reveal-on-scroll effect is not used here. */
body#home .gx-search__control .home-search-result-card {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) 18px;
  grid-template-rows: auto auto;
  align-content: center;
  align-items: center;
  gap: 1px 12px;
  height: var(--gx-result-row);
  min-height: 0;
  padding: 0 8px;
  border: 0;
  border-radius: 9px;
  background: #fff;
  box-shadow: none;
  opacity: 1 !important;
  transform: none !important;
  scroll-snap-align: start;
  scroll-margin: 0 !important;
}

body#home .gx-search__control .home-search-result-card + .home-search-result-card {
  border-top: 1px solid #f0f4fb;
}

body#home .gx-search__control .home-search-result-card:hover,
body#home .gx-search__control .home-search-result-card:focus-visible {
  background: #f1f6ff;
  outline: 0;
}

body#home .gx-search__control .home-search-result-type {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: start;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body#home .gx-search__control .home-search-result-card strong,
body#home .gx-search__control .home-search-result-card p {
  grid-column: 2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body#home .gx-search__control .home-search-result-card strong {
  color: #12213f;
  font-size: 13px !important;
  line-height: 1.35;
}

body#home .gx-search__control .home-search-result-card p {
  margin: 0 !important;
  color: #6a7a99 !important;
  font-size: 11.5px !important;
  line-height: 1.35 !important;
}

body#home .gx-search__control .home-search-result-link {
  display: grid !important;
  grid-column: 3;
  grid-row: 1 / span 2;
  place-items: center;
  color: #9db3dc;
}

body#home .gx-search__control .home-search-result-card:hover .home-search-result-link { color: #1257e0; }

body#home .home-search-results__end {
  margin: 0 !important;
  padding: 10px 8px 12px;
  border-top: 1px solid #f0f4fb;
  color: #8a98b5 !important;
  font: 600 11px/1.2 Inter, Arial, sans-serif !important;
  letter-spacing: .06em;
  text-align: center;
  text-transform: uppercase;
  scroll-snap-align: end;
}

body#home .gx-search__control .home-search-empty { padding: 12px 14px; color: #1c2d4d; }
body#home .gx-search__control .home-search-empty p { margin: 4px 0 0 !important; color: #607090 !important; font-size: 12px !important; }

body#home .gx-search__trending {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

body#home .gx-search__trending > span {
  color: rgba(255, 255, 255, .88);
  font: 700 11px/1 Inter, Arial, sans-serif !important;
}

body#home .gx-search__chip {
  all: unset;
  box-sizing: border-box;
  display: inline-flex !important;
  align-items: center;
  min-height: 30px !important;
  padding: 0 12px !important;
  border: 1px solid rgba(255, 255, 255, .34) !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, .1) !important;
  box-shadow: none !important;
  color: #fff !important;
  font: 600 11px/1 Inter, Arial, sans-serif !important;
  cursor: pointer;
  transform: none !important;
  transition: background-color .15s ease, border-color .15s ease;
}

body#home .gx-search__chip:hover {
  border-color: rgba(255, 255, 255, .7) !important;
  background: rgba(255, 255, 255, .2) !important;
}

body#home .gx-search__chip:focus-visible,
body#home .gx-search__form button:focus-visible {
  outline: 2px solid #ffd45c;
  outline-offset: 2px;
}

/* The result count is announced from here for screen readers and shown as
   the heading of the results panel, so the banner does not change height. */
body#home .gx-search__status {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px !important;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ------------------------------------------------------------------ */
/* Category cards: larger, evenly sized artwork                        */
/* ------------------------------------------------------------------ */
body#home #categories-section .gx-category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

body#home #categories-section .gx-category-card img {
  width: 100%;
  height: 124px;
  object-fit: contain;
  object-position: center bottom;
  transform: none;
  filter: drop-shadow(0 6px 8px rgba(34, 83, 180, .16));
}

body#home #categories-section .gx-category-card strong { margin-top: 10px; }

/* ------------------------------------------------------------------ */
/* Learner stories                                                     */
/* ------------------------------------------------------------------ */
body#home .gx-testimonial-grid figure {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: start;
  gap: 4px 14px;
  padding: 18px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(28, 57, 108, .07);
}

body#home .gx-testimonial-grid figure.gx-testimonial-empty { display: block; }

body#home .gx-testimonial-avatar {
  grid-row: 1 / span 3;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #eaf2ff;
  object-fit: cover;
}

body#home .gx-testimonial-grid blockquote {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow: hidden;
  color: #1c2d4d;
  font-weight: 600;
  overflow-wrap: anywhere;
}

body#home .gx-testimonial-grid figcaption {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

body#home .gx-stars {
  display: flex;
  gap: 2px;
  margin-top: 4px;
}

body#home .gx-stars img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

body#home .gx-stars img.is-off {
  filter: grayscale(1);
  opacity: .28;
}

/* ------------------------------------------------------------------ */
/* Feedback                                                            */
/* ------------------------------------------------------------------ */
body#home .gx-feedback__surface {
  grid-template-columns: clamp(130px, 17vw, 210px) minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 20px clamp(18px, 2.6vw, 36px);
  border: 1px solid #e0e8f5;
  border-radius: 18px;
  background: linear-gradient(120deg, #eef4ff 0%, #f8fbff 60%, #eef4ff 100%);
}

body#home .gx-feedback__surface p { hyphens: manual; }

body#home .gx-feedback__art {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 16px rgba(28, 77, 170, .18));
}

body#home .gx-feedback .feedback-box {
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(28, 57, 108, .08);
}

body#home .gx-rating {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

body#home .gx-rating legend {
  float: left;
  padding: 0;
  color: #1c2d4d;
  font: 700 12px/1.2 Inter, Arial, sans-serif !important;
}

body#home .gx-rating__stars {
  display: inline-flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
}

/* Radios stay in the page for keyboard and screen-reader use; the star
   image on each label is what is seen. Stars are laid out right-to-left so
   "this star and every star before it" can be lit with a sibling selector. */
body#home .gx-rating__stars input {
  position: absolute;
  width: 1px !important;
  height: 1px !important;
  margin: -1px;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden;
  clip-path: inset(50%);
}

body#home .gx-rating__stars label {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  cursor: pointer;
}

body#home .gx-rating__stars label img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: grayscale(1);
  opacity: .3;
  transition: transform .12s ease, opacity .12s ease, filter .12s ease;
}

body#home .gx-rating__stars label:hover img,
body#home .gx-rating__stars label:hover ~ label img,
body#home .gx-rating__stars input:checked ~ label img {
  filter: none;
  opacity: 1;
}

body#home .gx-rating__stars label:hover img { transform: scale(1.12); }

body#home .gx-rating__stars input:focus-visible + label {
  outline: 2px solid #1257e0;
  outline-offset: 1px;
  border-radius: 8px;
}

body#home .gx-rating__required { color: #d92d3a; }

body#home .gx-rating__value {
  color: #5a6b8c;
  font: 600 12px/1.3 Inter, Arial, sans-serif !important;
}

body#home .gx-rating__value.is-error { flex: 1 1 100%; color: #c62434; }

body#home .gx-feedback #feedback-submit {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  min-height: 44px !important;
  padding: 0 22px !important;
  border-radius: 999px !important;
  background: linear-gradient(120deg, #1a6bff, #0a45d8) !important;
  color: #fff !important;
  font-weight: 700 !important;
}

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */
@media (max-width: 980px) {
  body#home .gx-search__surface {
    grid-template-columns: clamp(96px, 16vw, 130px) minmax(0, 1fr);
  }

  body#home .gx-search__control { grid-column: 1 / -1; }

  body#home .gx-feedback__surface {
    grid-template-columns: clamp(96px, 18vw, 150px) minmax(0, 1fr);
  }

  body#home .gx-feedback .feedback-box { grid-column: 1 / -1; }

  body#home #categories-section .gx-category-card img { height: 104px; }
}

@media (max-width: 680px) {
  body#home .gx-search__surface {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 12px 14px;
    padding: 18px 16px;
    border-radius: 14px;
  }

  body#home .gx-search__form { min-height: 50px; }
  body#home .gx-search__control .home-search-result-card { grid-template-columns: 100px minmax(0, 1fr) 16px; gap: 1px 8px; padding: 8px; }
  body#home .gx-search__form button[type="submit"] { padding: 0 16px !important; }
  body#home .gx-search__chip { min-height: 34px !important; }

  body#home #categories-section .gx-category-card img { height: 76px; }
  body#home #categories-section .gx-category-card strong { margin-top: 6px; }

  body#home .gx-testimonial-grid figure {
    grid-template-columns: 52px minmax(0, 1fr);
    padding: 14px;
  }

  body#home .gx-testimonial-avatar { width: 52px; height: 52px; }

  body#home .gx-feedback__surface {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 14px;
    padding: 18px 16px;
    border-radius: 14px;
  }

  body#home .gx-rating__stars label { width: 44px; height: 44px; }
  body#home .gx-rating__stars label img { width: 30px; height: 30px; }
  body#home .gx-feedback #feedback-submit { justify-self: stretch; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  body#home .gx-rating__stars label img,
  body#home .gx-search__chip { transition: none; }
  body#home .gx-rating__stars label:hover img { transform: none; }
}

/* Why Choose GYANEXIS: the four benefits now span the whole row. */
body#home .gx-why__layout { grid-template-columns: minmax(0, 1fr) !important; }
body#home .gx-why .gx-benefit-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 900px) {
  body#home .gx-why .gx-benefit-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Words are no longer split with hyphens at line ends on the home page. */
body#home p { hyphens: manual !important; }
