.ls-hero {
  width: 100%;
  background-color: #64C3BB;
}

.ls-hero__inner {
  display: flex;
  align-items: center;
  gap: 48px;
}

.ls-hero__media {
  flex: 0 0 auto;
  width: 40%;
  max-width: 388px;
  align-self: flex-end;
}

.ls-hero__img {
  display: block;
  width: 100%;
  height: auto;
}

.ls-hero__text {
  flex: 1 1 auto;
}

.ls-hero .ls-hero__heading {
  font-family: Poppins, sans-serif !important;
  font-size: 52px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  letter-spacing: 0.6px !important;
  color: #ffffff !important;
  text-align: left !important;
  margin: 0 !important;
}

@media (max-width: 749px) {
  .ls-hero__inner {
    flex-direction: column;
    text-align: center;
    gap: 16px;
    padding-top: 24px;
  }
  .ls-hero__media {
    width: 70%;
    max-width: 280px;
    align-self: center;
  }
  .ls-hero .ls-hero__heading {
    font-size: 32px !important;
    text-align: center !important;
    line-height: 1.25 !important;
  }
}

.ls-page {
  max-width: 780px;
  margin-inline: auto;
  padding: 40px 0 56px;
  text-align: center;
}

.ls-page__title {
  display: none !important;
}

.ls-page__content > div:has(img[src*="lice-school-1"]) {
  display: none !important;
}

.ls-page__content h1 {
  display: none;
}

.ls-page__content h2 {
  font-family: Poppins, sans-serif !important;
  font-size: 24px !important;
  font-weight: 400 !important;
  line-height: 1.3 !important;
  letter-spacing: 0.6px !important;
  color: #535353 !important;
  text-align: center;
  margin: 48px 0 16px !important;
}

.ls-page__content h3,
.ls-page__content h4 {
  font-family: Parkinsans, "parkinsans-regular", sans-serif !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  letter-spacing: 0.6px !important;
  color: #535353 !important;
  text-align: center;
  margin: 16px 0 !important;
}

.ls-page__content p {
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: 0.6px;
  text-align: center;
}

.ls-page__content ul,
.ls-page__content ol {
  display: inline-block;
  text-align: left;
  margin: 12px auto;
}

.ls-page__content li {
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: 0.6px;
}

.ls-page__content img {
  max-width: 100%;
  height: auto;
}

/* --- Body image rows: image beside the text, alternating sides (matches live image_with_text) --- */
/* The live image_with_text block survived migration as a nested wrapper tree,
   so the REAL two-column row is the div that holds the image-wrapper and the
   text-wrapper as two SEPARATE children. Every ancestor wraps only a single
   child, so they are excluded via :not(:has(> :only-child)); the row itself
   has two element children and is the only match.                            */
.ls-page__content div:has(img[src*="lice-school-2"]):has(:is(h2, h3, p)):not(:has(> :only-child)),
.ls-page__content div:has(img[src*="lice-school-3"]):has(:is(h2, h3, p)):not(:has(> :only-child)) {
  display: flex;
  align-items: center;
  gap: 44px;
  margin: 44px 0;
  clear: both;
  text-align: left;
}
/* "How Do Lice Spread?" (lice-school-3) — image on the RIGHT */
.ls-page__content div:has(img[src*="lice-school-3"]):has(:is(h2, h3, p)):not(:has(> :only-child)) {
  flex-direction: row-reverse;
}
/* image column */
.ls-page__content div:has(img[src*="lice-school-2"]):has(:is(h2, h3, p)):not(:has(> :only-child)) > div:has(img[src*="lice-school-2"]),
.ls-page__content div:has(img[src*="lice-school-3"]):has(:is(h2, h3, p)):not(:has(> :only-child)) > div:has(img[src*="lice-school-3"]) {
  flex: 0 0 42%;
  max-width: 42%;
}
/* text column */
.ls-page__content div:has(img[src*="lice-school-2"]):has(:is(h2, h3, p)):not(:has(> :only-child)) > div:not(:has(img[src*="lice-school-2"])),
.ls-page__content div:has(img[src*="lice-school-3"]):has(:is(h2, h3, p)):not(:has(> :only-child)) > div:not(:has(img[src*="lice-school-3"])) {
  flex: 1 1 auto;
  min-width: 0;
}
/* image sizing */
.ls-page__content img[src*="lice-school-2"],
.ls-page__content img[src*="lice-school-3"] {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}
/* the text now sits beside the image, so left-align it */
.ls-page__content div:has(img[src*="lice-school-2"]):has(:is(h2, h3, p)):not(:has(> :only-child)) :is(h2, h3, h4, p, li),
.ls-page__content div:has(img[src*="lice-school-3"]):has(:is(h2, h3, p)):not(:has(> :only-child)) :is(h2, h3, h4, p, li) {
  text-align: left !important;
}
.ls-page__content div:has(img[src*="lice-school-2"]):has(:is(h2, h3, p)):not(:has(> :only-child)) :is(ul, ol),
.ls-page__content div:has(img[src*="lice-school-3"]):has(:is(h2, h3, p)):not(:has(> :only-child)) :is(ul, ol) {
  display: block;
  margin-inline: 0;
}

@media (max-width: 749px) {
  .ls-page__title {
    font-size: 36px;
  }
  .ls-page__content h2 {
    font-size: 22px !important;
  }
  /* stack image + text on mobile */
  .ls-page__content div:has(img[src*="lice-school-2"]):has(:is(h2, h3, p)):not(:has(> :only-child)),
  .ls-page__content div:has(img[src*="lice-school-3"]):has(:is(h2, h3, p)):not(:has(> :only-child)) {
    flex-direction: column;
    gap: 18px;
    text-align: center;
  }
  .ls-page__content div:has(img[src*="lice-school-2"]):has(:is(h2, h3, p)):not(:has(> :only-child)) > div:has(img[src*="lice-school-2"]),
  .ls-page__content div:has(img[src*="lice-school-3"]):has(:is(h2, h3, p)):not(:has(> :only-child)) > div:has(img[src*="lice-school-3"]) {
    flex: none;
    width: 100%;
    max-width: 360px;
    margin-inline: auto;
  }
  .ls-page__content div:has(img[src*="lice-school-2"]):has(:is(h2, h3, p)):not(:has(> :only-child)) :is(h2, h3, h4, p, li),
  .ls-page__content div:has(img[src*="lice-school-3"]):has(:is(h2, h3, p)):not(:has(> :only-child)) :is(h2, h3, h4, p, li) {
    text-align: center !important;
  }
}

/* Closing quiz/handout pair. Live renders these through the banner block as two
   pill buttons side by side; the CMS body gives us bare anchors in a plain
   wrapper, so the row is matched structurally — it is the only div in the page
   body holding two adjacent links. The hairline ring reproduces live's button
   ::after shadow (the buttons carry no real border there). */
.ls-page__content div:has(> a + a) {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}
.ls-page__content div:has(> a + a) > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  min-height: 45px;
  padding: 0 30px;
  border-radius: 52px;
  background: #fffaee;
  box-shadow: 0 0 0 0.3px #64c3bb;
  color: #64c3bb;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 1px;
  text-align: center;
  text-decoration: none;
}

@media (max-width: 749px) {
  .ls-page__content div:has(> a + a) > a {
    min-width: min(220px, 100%);
  }
}
