/* =========================================
   Games Page Components
   Used on: games.html
   Follow BEM naming: .block__element--modifier
   ========================================= */

/* =========================================
   Games Banner
   ========================================= */
.games-banner {
  /* background-image: url("../assets/images/backgrounds/background-games-main-web.png");
                            background-size: 100% 100%;
                            background-repeat: no-repeat;
                            background-position: center; */
  width: 100%;
  aspect-ratio: 6/2.16;
}

.games-banner video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: inset(2px 0 2px 0) !important;
  background: transparent;
}
@media (max-width: 990px) {
  .games-banner {
    aspect-ratio: 6/4.9;
  }
}

.games-banner__video--web {
  display: block;
}
.games-banner__video--mobile {
  display: none;
}

@media (max-width: 990px) {
  .games-banner__video--web {
    display: none;
  }
  .games-banner__video--mobile {
    display: block;
  }
}

.games-banner__inner {
  width: 100%;
  height: 100%;
  padding-top: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

@media (max-width: 990px) {
  .games-banner__inner {
    padding-top: 25px;
    gap: 10px;
  }
}

.games-banner__title {
  font-size: 68px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0px;
  color: var(--color-white);
}

@media (max-width: 990px) {
  .games-banner__title {
    font-size: 24px;
  }
}

.games-banner__desc {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0px;
  text-align: center;
  color: var(--color-white);
  opacity: 0.9;
}

@media (max-width: 990px) {
  .games-banner__desc {
    font-size: 16px;
    max-width: 70%;
  }
}
/* =========================================
                                       Games List
                                       ========================================= */
.games-list {
  padding: 72px 0;
  background-color: var(--color-white);
  overflow: hidden;
}

.games-list__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.games-list__title {
  font-weight: 900;
  font-size: 40px;
  line-height: 1;
  letter-spacing: 0px;
  text-align: center;
  color: var(--color-brand-primary);
  margin-bottom: 48px;
}

.games-list__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 60px 40px;
}

/* --- Game Card ------------------------------------------------ */
.game-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.game-card {
  background-color: var(--color-white-titanic);
  border: 2px solid var(--color-lavender-blue);
  box-shadow: 0px 2px 16px 0px #00000012;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease-in-out;
  cursor: pointer;
  height: 100%;
}

/* .game-card:hover {
  transform: scale(1.05);
} */

.game-card__image-wrap {
  width: 100%;
  overflow: hidden;
}

.game-card__image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.game-card__body {
  padding: 16px 20px 49px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  position: relative;
}

.game-card__title {
  font-size: 18px;
  font-weight: 800;
  color: var(--color-text-primary);
  text-align: center;
}

.game-card__desc {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text-secondary);
  text-align: center;
}

.game-card__view-more {
  align-self: flex-end;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--color-solid-blue);
  font-weight: 600;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  position: absolute;
  right: 26px;
  bottom: 18px;
}
.game-card__view-more img {
  width: 6px;
  height: 10px;
  object-fit: contain;
}

@media (max-width: 990px) {
  .games-list {
    padding: 40px 0;
    padding-top: 70px;
  }

  .games-list__inner {
    padding: 0 20px;
  }

  .games-list__title {
    font-weight: 900;
    font-size: 28px;
    letter-spacing: 0px;
    text-align: center;
    margin-bottom: 48px;
  }

  .games-list__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .game-card__body {
    padding: 14px 14px 54px;
  }

  .game-card__title {
    font-size: 17px;
  }

  .game-card:hover {
    transform: initial;
  }
}
@media (min-width: 550px) and (max-width: 990px) {
  .games-list {
    padding: 40px 0;
    padding-top: 80px;
  }
}
/* =========================================
                                       Worksheets Banner
                                       ========================================= */
.worksheets-banner {
  width: 100%;
  aspect-ratio: 6/1.69;
  margin-top: 48px;
}

.worksheets-banner__inner {
  width: 100%;
  height: 100%;
  background-image: url("../assets/images/banners/worksheets-banner-web.webp");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

@media (max-width: 550px) {
  .worksheets-banner {
    aspect-ratio: 6/4.79;
    /* padding: 24px; */
    margin: 49px auto;
    /* margin-top: 30px;
                  max-width: 500px; */
  }

  .worksheets-banner__inner {
    background-image: url("../assets/images/banners/worksheets-banner-mobile.webp");
    /* border-radius: 16px; */
    /* overflow: hidden; */
    /* border: 1px solid #0a4fb6; */
  }
}

/* =========================================
                                       Features Flexbox
                                       ========================================= */
.features-flexbox {
  width: 100%;
}

.features-flexbox__inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px;
  gap: 60px;
}

.features-flexbox__row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
}

.features-flexbox__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.features-flexbox__item img {
  width: 82px;
  height: 82px;
  object-fit: contain;
}

.features-flexbox__item-label {
  font-weight: 400;
  font-size: 18.08px;
  line-height: 24.59px;
  letter-spacing: 0px;
  text-align: center;
  color: var(--color-text-secondary);
}

@media (max-width: 990px) {
  .features-flexbox__inner {
    padding: 32px 10px;
    gap: 36px;
    flex-direction: column;
  }

  .features-flexbox__row {
    gap: 40px;
    align-items: flex-start;
  }

  .features-flexbox__item {
    width: 30%;
  }
}

/* =========================================
                                       Skills
                                       ========================================= */
.skills {
  position: relative;
  overflow: hidden;
  width: 100%;
  background-image: url("../assets/images/backgrounds/background-skills-web.svg");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
}

/* Orbit container - aspect-ratio drives the section height on desktop */
.skills__orbit {
  position: relative;
  width: 100%;
  aspect-ratio: 1440 / 950;
}

/* --- Center mascot -------------------------------------------- */
.skills__center {
  position: absolute;
  left: 50%;
  top: 40%;
  transform: translate(-50%, -60%);
  width: 20%;
  z-index: 2;

  display: flex;
  align-items: center;
  justify-content: center;
}

.skills__center img {
  width: 100%;
  aspect-ratio: 4/6;
  flex-shrink: 0;
  object-fit: contain;
}

/* --- Skill items --------------------------------------------- */
.skills__item {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 12%;
}

.skills__item img {
  width: 83%;
  aspect-ratio: 1/1;
}

.skills__item-label {
  font-weight: 700;
  font-size: 24px;
  line-height: 1;
  letter-spacing: 0px;
  text-align: center;
}

/* --- Desktop semicircle positions (top-half open) ------------- */
/* Left column */
.skills__item--1 {
  left: 20%;
  top: 26%;
} /* Fine Motor Skills */
.skills__item--2 {
  left: 23%;
  top: 51%;
} /* Curiosity */
/* Bottom arc */
.skills__item--3 {
  left: 34%;
  top: 72%;
} /* Critical Thinking */
.skills__item--4 {
  left: 50%;
  top: 79%;
} /* Social-Emotional Skills */
.skills__item--5 {
  left: 68%;
  top: 73%;
} /* Literacy & Numeracy */
/* Right column */
.skills__item--6 {
  left: 81%;
  top: 26%;
} /* Focus & Attention */
.skills__item--7 {
  left: 78%;
  top: 51%;
} /* Creativity */

/* --- Mobile: full circle ------------------------------------- */
@media (max-width: 990px) {
  .skills {
    background-image: url("../assets/images/backgrounds/background-skill-mobile.svg");
    margin-top: 48px;
  }

  .skills__orbit {
    aspect-ratio: 394 / 436;
    max-width: 520px;
    margin: 0 auto;
  }

  .skills__center {
    top: 50%;
    width: 32%;
  }

  .skills__center img {
    width: 116px;
    height: 146px;
  }

  .skills__item {
    width: 20%;
    gap: 5px;
  }

  .skills__item img {
    width: 60px;
    height: 60px;
  }

  .skills__item-label {
    font-weight: 700;
    font-size: 14px;
    line-height: 1.2;
    letter-spacing: 0px;
    text-align: center;
  }

  /* Full circle positions */
  .skills__item--1 {
    left: 19%;
    top: 32%;
  } /* Fine Motor Skills  - left */
  .skills__item--2 {
    left: 15%;
    top: 60%;
  } /* Curiosity          - lower-left */
  .skills__item--3 {
    left: 84%;
    top: 62%;
  } /* Critical Thinking  - lower-right */
  .skills__item--4 {
    left: 82%;
    top: 32%;
  } /* Social-Emotional   - right */
  .skills__item--5 {
    left: 34%;
    top: 82%;
  } /* Literacy & Numeracy - bottom-left */
  .skills__item--6 {
    left: 63%;
    top: 82%;
  } /* Focus & Attention  - bottom-right */
  .skills__item--7 {
    left: 50%;
    top: 15%;
  } /* Creativity         - top */
}

/* =========================================
                                       Simple Awards
                                       ========================================= */
.simple-awards--games {
  margin-top: 0px;
}

@media (max-width: 990px) {
  .simple-awards--games {
    margin-top: 0px;
  }
}

.simple-awards-wrap {
  width: 100%;
}
@media (max-width: 990px) {
  .simple-awards-wrap {
    padding: 24px 0;
    background: url("../assets/images/backgrounds/background-awards-mobile.webp");
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    margin-bottom: 24px;
  }
}

/* =========================================
                                       Parent Reviews
                                       ========================================= */
.parent-reviews {
  position: relative;
  overflow: hidden;
  padding: 80px 60px;
  margin-top: 30px;
}

/* Decorative star sparkles */
.parent-reviews__deco {
  position: absolute;
  pointer-events: none;
  user-select: none;
}

.parent-reviews__deco--tl {
  top: 56px;
  left: 108px;
  width: 38px;
}

.parent-reviews__deco--tll {
  top: 43px;
  left: 198px;
  width: 15px;
}
.parent-reviews__deco--tlt {
  display: none;
}

.parent-reviews__deco--tr {
  top: 40px;
  right: 102px;
  width: 33px;
}

.parent-reviews__deco--bl {
  top: 152px;
  left: 70px;
  width: 28px;
}

.parent-reviews__deco--br {
  top: 94px;
  right: 75px;
  width: 19px;
}

.parent-reviews__inner {
  max-width: 1100px;
  margin: 0 auto;
}

.parent-reviews__title {
  font-weight: 900;
  font-size: 40px;
  line-height: 1;
  color: var(--color-brand-primary);
  text-align: center;
  margin-bottom: 48px;
}

/* --- Desktop: 3-column flex ---------------------------------- */
.parent-reviews__carousel {
  display: flex;
  gap: 24px;
  align-items: stretch;
}

.parent-reviews__card {
  flex: 1;
  border-radius: 24px;
  padding: 24px 20px;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.parent-reviews__card--1 {
  background: linear-gradient(135deg, #ff3a6e 0%, #ff80b0 58%, #ffb347 100%);
  box-shadow: 4px 6px 0px 0px #ff5f5f;
}

.parent-reviews__card--2 {
  background: linear-gradient(135deg, #5536ea 0%, #8457f4 58%, #ba7ffb 100%);
  box-shadow: 4px 6px 0px 0px #603dec;
}

.parent-reviews__card--3 {
  background: linear-gradient(135deg, #ff7306 0%, #fe9f29 58%, #ffd359 100%);
  box-shadow: 4px 6px 0px 0px #ff7709;
}

.parent-reviews__stars {
  font-size: 18px;
  color: #ffffff;
  letter-spacing: 3px;
  line-height: 1;
}

.parent-reviews__quote {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.35;
  color: #ffffff;
  flex: 1;
}

.parent-reviews__author {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

.parent-reviews__body {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.parent-reviews__mascot {
  height: 98px;
  width: auto;
}

@media (min-width: 750px) and (max-width: 990px) {
  .games-list__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }
}
@media (min-width: 580px) and (max-width: 990px) {
  .parent-reviews__deco--tl {
    top: 56px;
    left: 108px;
    width: 38px;
  }
  .parent-reviews__deco--tlt {
    top: 56px;
    left: 108px;
    width: 38px;
  }
}

/* --- Mobile: stacked deck ------------------------------------ */
@media (max-width: 980px) {
  .parent-reviews {
    margin-top: 40px;
    padding: 48px 24px 56px;
    overflow: visible;
    /* background-color: var(--color-white-titanic); */
  }

  .parent-reviews__inner {
    max-width: 450px;
  }
  .parent-reviews__title {
    font-size: 26px;
    margin-bottom: 40px;
  }
  .parent-reviews__deco--tll {
    bottom: 80px;
    left: 19px;
    width: 14px;
    top: initial;
  }
  .parent-reviews__deco--tl {
    width: 31px;
    top: 45px;
    left: 17px;
  }
  .parent-reviews__deco--tlt {
    top: 29px;
    left: 74px;
    width: 12px;
    display: block;
  }
  .parent-reviews__deco--tr {
    width: 22px;
    top: 26px;
    right: 16px;
  }

  .parent-reviews__deco--bl {
    /* display: none; */
    width: 13px;
    top: 49px;
    left: initial;
    right: 32px;
  }

  .parent-reviews__deco--br {
    width: 19px;
    bottom: 71px;
    right: 20px;
    top: initial;
  }

  /* Grid stacking: all cards occupy the same cell so the tallest
                                           card defines the container height; transforms create the depth.
                                           margin-left gives the leftward back-cards room within the section padding. */
  .parent-reviews__carousel {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    padding-bottom: 44px;
    margin-right: 36px;
  }

  .parent-reviews__card {
    grid-column: 1;
    grid-row: 1;
    border-radius: 24px;
    padding: 17px 20px;
    gap: 8px;
    will-change: transform;
    transition:
      transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
      opacity 0.4s ease;
  }

  /* Stack positions driven by JS data-pos attribute.
                                           Both back cards fan consistently to the lower-left. */
  .parent-reviews__card[data-pos="0"] {
    z-index: 3;
    transform: translateY(0) translateX(0) rotate(0deg);
    cursor: grab;
  }

  .parent-reviews__card[data-pos="1"] {
    z-index: 2;
    transform: translateY(9px) translateX(12px) rotate(-4deg);
  }

  .parent-reviews__card[data-pos="2"] {
    z-index: 1;
    transform: translateY(19px) translateX(19px) rotate(-7deg);
  }

  /* Card being dragged */
  .parent-reviews__card--dragging {
    transition: none !important;
    cursor: grabbing !important;
    z-index: 4 !important;
  }

  /* Fly-off to the left */
  .parent-reviews__card--fly-left {
    transition:
      transform 0.35s ease-in,
      opacity 0.35s ease-in !important;
    transform: translateX(-120vw) rotate(-25deg) !important;
    opacity: 0 !important;
    z-index: 4 !important;
  }

  /* Fly-off to the right */
  .parent-reviews__card--fly-right {
    transition:
      transform 0.35s ease-in,
      opacity 0.35s ease-in !important;
    transform: translateX(120vw) rotate(25deg) !important;
    opacity: 0 !important;
    z-index: 4 !important;
  }

  .parent-reviews__mascot {
    height: 88px;
    width: auto;
  }
}
