body.category-child {
  background-color: #f7f8f4;
  background-image: url('../../img/backing.png');
  background-repeat: repeat;
}

.child-hub {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-bottom: 32px;
  color: #303030;
}

.child-hub .container {
  max-width: 1216px;
}

.child-hub__hero,
.child-hub__essentials,
.child-hub__services,
.child-hub__intro,
.child-hub__topics,
.child-hub__more-tools,
.child-hub__ad,
.child-hub__faq,
.child-hub__feedback {
  padding: 0;
}

.child-hub__hero,
.child-hub__ad,
.child-hub__faq {
  padding: 32px 0;
}

.child-hub__hero-card {
  position: relative;
  min-height: clamp(11.25rem, 22.94vw, 17.4375rem);
  max-height: 17.4375rem;
  overflow: hidden;
  border-radius: 0.5rem;
  background-image: url('../../img/category-child/child-desktop-banner.svg');
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.child-hub__hero-copy {
  position: relative;
  z-index: 1;
  max-width: 30rem;
  padding: 2.5rem 0 0 2.5rem;
}

.child-hub__title {
  margin: 0;
  color: #ffffff;
  font-family: Cinzel, var(--font-heading);
  font-size: clamp(2rem, 3.29vw, 2.5rem);
  font-weight: 400;
  letter-spacing: -0.006em;
  line-height: 1;
}

.child-hub__description {
  max-width: 30rem;
  margin: 0.25rem 0 0;
  color: #ffffff;
  font-family: 'Source Sans 3', var(--font-primary);
  font-size: clamp(0.875rem, 1.32vw, 1rem);
  font-weight: 400;
  line-height: 1.2;
}

.child-hub__section-title {
  margin: 0;
  color: #303030;
  font-family: 'Source Sans 3', var(--font-primary);
  font-size: 26px;
  font-weight: 500;
  line-height: 32px;
  text-align: center;
}

.child-hub__essentials-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 24px;
}

.child-hub-essential-card {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  min-height: 132px;
  padding: 12px 8px;
  border-radius: 8px;
  background: #ffffff;
  color: inherit;
  text-align: center;
  text-decoration: none;
}

.child-hub-essential-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: var(--child-essential-color, #6e4f95);
}

.child-hub-essential-card__icon img {
  display: block;
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.child-hub-essential-card__copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.child-hub-essential-card__title {
  color: #303030;
  font-family: Cinzel, var(--font-heading);
  font-size: 15px;
  font-weight: 400;
  line-height: 16px;
  text-align: center;
}

.child-hub-essential-card__desc {
  color: #4d4d4d;
  font-family: 'Source Sans 3', var(--font-primary);
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
  text-align: center;
}

.child-hub .dl-section-title {
  margin: 0;
  color: #303030;
  font-family: 'Source Sans 3', var(--font-primary);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 32px;
  text-align: center;
}

.child-hub__intro-card h2 {
  margin: 0;
  color: #6e4f95;
  font-family: 'Source Sans 3', var(--font-primary);
  font-size: 26px;
  font-weight: 500;
  line-height: 32px;
  text-align: center;
}

.child-hub__intro-card p {
  max-width: 100%;
  margin: 16px 0 0;
  color: #303030;
  font-family: 'Source Sans 3', var(--font-primary);
  font-size: 16px;
  font-weight: 400;
  line-height: 20px;
  text-indent: 32px;
}

.child-hub__intro-card p + p {
  margin-top: 12px;
}

.child-hub__topics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.child-hub__topics .container > .child-hub__topics-grid:first-child {
  margin-top: 0;
}

.child-hub .pregnancy-hub__topics-action,
.child-hub__inline-topics {
  display: none;
}

.child-hub__topics--mobile-late {
  display: none;
}

.child-hub .pregnancy-hub__topics-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border: 0;
  border-radius: 10px;
  background: #6e4f95;
  color: #ffffff;
  cursor: pointer;
  font-family: 'Source Sans 3', var(--font-primary);
  font-size: 16px;
  font-weight: 500;
  line-height: 20px;
}

.child-hub .pregnancy-hub-topic {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 100%;
  border-radius: 12px;
  background: #ffffff;
  color: inherit;
  text-decoration: none;
}

.child-hub .pregnancy-hub-topic.child-hub-topic--mobile-extra {
  display: none;
}

.child-hub .pregnancy-hub-topic__image-wrap {
  display: block;
  overflow: hidden;
  width: 100%;
  max-height: 188px;
  border-radius: 12px;
  background: var(--topic-bg, #f5f1f7);
  line-height: 0;
}

.child-hub .pregnancy-hub-topic__image {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 188px;
  padding: 20px;
  object-fit: contain;
}

.child-hub .pregnancy-hub-topic__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px 21px;
  background: #ffffff;
}

.child-hub .pregnancy-hub-topic__title {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  color: #000000;
  font-family: Cinzel, var(--font-heading);
  font-size: 16px;
  font-weight: 400;
  line-height: 20px;
  text-align: center;
}

.child-hub .pregnancy-hub-topic__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  padding: 10px 16px;
  border-radius: 10px;
  background: #8fb56c;
  color: #ffffff;
  font-family: 'Source Sans 3', var(--font-primary);
  font-size: 16px;
  font-weight: 500;
  line-height: 20px;
}

.child-hub__ad .marketplace-ad {
  margin: 0;
}

.child-hub__feedback .height-predictor__suggest {
  padding: 0;
}

@media (max-width: 767px) {
  .child-hub {
    gap: 24px;
  }

  .child-hub__hero-card {
    aspect-ratio: 336 / 448;
    min-height: 0;
    max-height: none;
    border-radius: 0.75rem;
    background-image: url('../../img/category-child/child-mobile-banner.svg');
  }

  .child-hub__hero-copy {
    max-width: min(30rem, calc(100% - 0.5rem));
    padding: 1.5rem 0 0 1.5rem;
  }

  .child-hub__title {
    font-size: clamp(2rem, 10.67vw, 2.5rem);
    line-height: 1.2;
  }

  .child-hub__description {
    margin-top: 0.75rem;
    font-size: clamp(0.875rem, 4.27vw, 1rem);
    line-height: clamp(1.125rem, 5.33vw, 1.25rem);
  }

  .child-hub__section-title {
    margin-bottom: 16px;
  }

  .child-hub__essentials-grid {
    display: flex;
    gap: 0;
    width: calc(100% + var(--spacing-4));
    margin-top: 0;
    margin-right: calc(var(--spacing-4) * -1);
    overflow-x: auto;
    background: transparent;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
  }

  .child-hub__essentials-grid::-webkit-scrollbar {
    display: none;
  }

  .child-hub-essential-card {
    flex: 0 0 20%;
    gap: 6px;
    min-height: auto;
    padding: 0 2px;
    background: transparent;
    opacity: 0.55;
    scroll-snap-align: start;
  }

  .child-hub-essential-card__icon {
    width: 40px;
    height: 40px;
  }

  .child-hub-essential-card__icon img {
    width: 26px;
    height: 26px;
  }

  .child-hub-essential-card__title {
    font-size: 13px;
    line-height: 16px;
  }

  .child-hub-essential-card__desc {
    display: none;
  }

  .child-hub-essential-card__title {
    display: -webkit-box;
    overflow: hidden;
    font-size: 10px;
    line-height: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .child-hub__topics-grid {
    gap: 8px;
    margin-top: 16px;
  }

  .child-hub .pregnancy-hub__topics-action {
    display: flex;
    justify-content: center;
    margin-top: 16px;
  }

  .child-hub__inline-topics:not([hidden]) {
    display: block;
    margin-top: 16px;
  }

  .child-hub__topics--secondary {
    display: none;
  }

  .child-hub__topics--mobile-late {
    order: 80 !important;
    display: block;
  }

  .child-hub__essentials--preteen {
    order: 79 !important;
  }

  .child-hub__essentials--teen {
    order: 81 !important;
  }

  .child-hub__faq {
    order: 90 !important;
  }

  .child-hub__feedback {
    order: 100 !important;
  }

  .child-hub .pregnancy-hub-topic.child-hub-topic--mobile-extra {
    display: flex;
  }

  .child-hub .pregnancy-hub-topic__image {
    height: 105px;
  }

  .child-hub__ad {
    order: 78 !important;
    padding: 24px 0;
  }

  .child-hub__ad .marketplace-ad--list {
    padding: 13px 10px;
  }

  .child-hub__ad .marketplace-ad__leaf {
    display: none;
  }

  .child-hub__ad .marketplace-ad__slide {
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }

  .child-hub__ad .marketplace-ad__slide.is-active {
    display: flex;
  }

  .child-hub__ad .marketplace-ad__media {
    position: relative;
    flex: 0 0 127px;
    width: 127px;
    max-width: 127px;
    margin: 0;
  }

  .child-hub__ad .marketplace-ad__image-link {
    max-width: 127px;
    aspect-ratio: 1 / 1;
  }

  .child-hub__ad .marketplace-ad__arrow--prev {
    left: 0;
    right: auto;
  }

  .child-hub__ad .marketplace-ad__arrow--next {
    left: auto;
    right: 0;
  }

  .child-hub__ad .marketplace-ad__body {
    display: grid;
    flex: 1;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0 8px;
    min-width: 0;
  }

  .child-hub__ad .marketplace-ad__title,
  .child-hub__ad .marketplace-ad__description {
    grid-column: 1 / -1;
  }

  .child-hub__ad .marketplace-ad__title {
    font-size: 14px;
    line-height: 20px;
  }

  .child-hub__ad .marketplace-ad__description {
    margin-top: 4px;
    margin-bottom: 12px;
    font-size: 12px;
    line-height: 16px;
  }

  .child-hub__ad .marketplace-ad__offer,
  .child-hub__ad .marketplace-ad__footer {
    display: contents;
  }

  .child-hub__ad .marketplace-ad__price {
    grid-column: 1;
    grid-row: 3;
    margin: 0;
    font-size: 16px;
    line-height: 20px;
  }

  .child-hub__ad .marketplace-ad__cta {
    grid-column: 2;
    grid-row: 3;
    justify-self: end;
    justify-content: center;
    width: auto;
    margin-top: 0;
    padding: 6px 10px;
    font-size: 12px;
    line-height: 16px;
    white-space: nowrap;
  }

  .child-hub__ad .marketplace-ad__brand {
    grid-column: 1 / -1;
    grid-row: 4;
    justify-content: flex-start;
    flex-wrap: nowrap;
    margin-top: 0.75rem;
    font-size: 0.75rem;
    line-height: 1rem;
  }

  .child-hub__ad .marketplace-ad__brand-logo {
    width: 1rem;
    height: 1rem;
    flex: 0 0 1rem;
  }
}

@media (max-width: 380px) {
  .child-hub__ad .marketplace-ad__slide.is-active {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
  }

  .child-hub__ad .marketplace-ad__media {
    align-self: center;
    flex: 0 0 auto;
  }

  .child-hub__ad .marketplace-ad__body {
    align-self: stretch;
    width: 100%;
  }

  .child-hub__ad .marketplace-ad__footer {
    display: contents;
  }

  .child-hub__ad .marketplace-ad__brand {
    grid-column: 2;
    justify-self: end;
    width: max-content;
  }
}

@media (min-width: 768px) {
  .child-hub__topics-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
  }
}
