/* Site-wide call-to-action colours. Navigation links and FAQ controls are excluded. */
html body.page-id-38 .gd-hero-book-link {
  display: none !important;
}

/* Keep Divi's button chevrons optically centred with their labels at every size. */
html body #page-container .et_pb_button::after {
  content: "\203A" !important;
  position: absolute !important;
  top: 0 !important;
  right: 10px !important;
  bottom: 0 !important;
  display: flex !important;
  width: 24px !important;
  height: 100% !important;
  margin: 0 !important;
  align-items: center !important;
  justify-content: center !important;
  transform: none !important;
  font-family: Arial, sans-serif !important;
  font-size: 30px !important;
  font-weight: 400 !important;
  font-style: normal !important;
  line-height: 1 !important;
}

html body .gd-home-hero .et_pb_button,
html body .gd-home-about .et_pb_button,
html body .gd-home-procedures .et_pb_button,
html body .gd-home-billing .et_pb_button,
html body.page .et_pb_section .gd-contact-button,
html body .gd-hero-book-link,
html body .gravity-contact .gform_wrapper input.gform_button,
html body .gravity-contact .gform_wrapper button.gform_button {
  background: #0d5f63 !important;
  border-color: #0d5f63 !important;
  color: #fff !important;
  font-family: Lato, Arial, sans-serif !important;
  font-size: 16px !important;
  font-weight: 400 !important;
  line-height: 1.2 !important;
}

html body .gd-home-hero .et_pb_button:hover,
html body .gd-home-hero .et_pb_button:focus,
html body .gd-home-about .et_pb_button:hover,
html body .gd-home-about .et_pb_button:focus,
html body .gd-home-procedures .et_pb_button:hover,
html body .gd-home-procedures .et_pb_button:focus,
html body .gd-home-billing .et_pb_button:hover,
html body .gd-home-billing .et_pb_button:focus,
html body.page .et_pb_section .gd-contact-button:hover,
html body.page .et_pb_section .gd-contact-button:focus,
html body .gd-hero-book-link:hover,
html body .gd-hero-book-link:focus,
html body .gravity-contact .gform_wrapper input.gform_button:hover,
html body .gravity-contact .gform_wrapper input.gform_button:focus,
html body .gravity-contact .gform_wrapper button.gform_button:hover,
html body .gravity-contact .gform_wrapper button.gform_button:focus {
  background: #084b4e !important;
  border-color: #084b4e !important;
  color: #fff !important;
}

/* The homepage FAQ panel already uses the gold background, so its CTA stays green. */
html body .gd-home-faq .et_pb_button,
html body .gd-home-faq .gd-home-faq-link {
  background: #0d5f63 !important;
  border-color: #0d5f63 !important;
  color: #fff !important;
}

html body .gd-home-faq .et_pb_button:hover,
html body .gd-home-faq .et_pb_button:focus,
html body .gd-home-faq .gd-home-faq-link:hover,
html body .gd-home-faq .gd-home-faq-link:focus {
  background: #084b4e !important;
  border-color: #084b4e !important;
  color: #fff !important;
}

/* Divi emits page-specific selectors after enqueued styles; the page-container ID
   keeps these shared CTA settings authoritative without affecting navigation. */
html body #page-container .gd-home-hero .et_pb_button,
html body #page-container .gd-home-about .et_pb_button,
html body #page-container .gd-home-procedures .et_pb_button,
html body #page-container .gd-home-billing .et_pb_button,
html body #page-container .et_pb_section .gd-contact-button,
html body #page-container .gd-hero-book-link,
html body #page-container .gform_wrapper input.gform_button,
html body #page-container .gform_wrapper button.gform_button {
  background: #0d5f63 !important;
  border-color: #0d5f63 !important;
  color: #fff !important;
  font-family: Lato, Arial, sans-serif !important;
  font-size: 16px !important;
  font-weight: 400 !important;
  line-height: 1.2 !important;
  min-height: 48px !important;
  padding: 12px 28px !important;
  box-sizing: border-box !important;
  align-items: center !important;
  justify-content: center !important;
}

html body #page-container .gd-home-faq .et_pb_button,
html body #page-container .gd-home-faq .gd-home-faq-link {
  background: #0d5f63 !important;
  border-color: #0d5f63 !important;
  color: #fff !important;
  font-family: Lato, Arial, sans-serif !important;
  font-size: 16px !important;
  font-weight: 400 !important;
  line-height: 1.2 !important;
  min-height: 48px !important;
  padding: 12px 28px !important;
  box-sizing: border-box !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Procedure "Learn more" items are text links, not CTA buttons. */
html body #page-container .gd-home-procedures .et_pb_button {
  display: inline-block !important;
  min-height: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  color: #c9aa7e !important;
  font-size: 21px !important;
  font-weight: 400 !important;
  line-height: 1.2 !important;
}

html body #page-container .gd-home-procedures .et_pb_button:hover,
html body #page-container .gd-home-procedures .et_pb_button:focus {
  background: transparent !important;
  border: 0 !important;
  color: #e0c59d !important;
}

/* Arthroscopic Surgery: the final contact CTA uses the design's green. */
html body.page-id-36 #page-container .gd-contact-button {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 52px !important;
  padding: 14px 44px !important;
  background: #0d5f63 !important;
  border-color: #0d5f63 !important;
  color: #fff !important;
  line-height: 1.2 !important;
  text-align: center !important;
}

html body.page-id-36 #page-container .gd-contact-button::after {
  content: "" !important;
  position: absolute !important;
  top: 50% !important;
  right: 18px !important;
  bottom: auto !important;
  display: block !important;
  width: 10px !important;
  height: 10px !important;
  margin: 0 !important;
  border: 0 !important;
  border-top: 3px solid #fff !important;
  border-right: 3px solid #fff !important;
  transform: translateY(-50%) rotate(45deg) !important;
  font-size: 0 !important;
  line-height: 0 !important;
}

html body.page-id-36 #page-container .gd-contact-button:hover,
html body.page-id-36 #page-container .gd-contact-button:focus {
  background: #084b4e !important;
  border-color: #084b4e !important;
  color: #fff !important;
}

/* Gold is retained only where the surrounding panel is dark teal/green. */
html body #page-container .gd-inner-body .gd-contact-button,
html body #page-container .gd-hip-contact .gd-contact-button,
html body #page-container .gd-knee-contact .gd-contact-button,
html body #page-container .gd-inner-body .gform_wrapper input.gform_button,
html body #page-container .gd-inner-body .gform_wrapper button.gform_button,
html body #page-container .gravity-contact .gform_wrapper input.gform_button,
html body #page-container .gravity-contact .gform_wrapper button.gform_button {
  background: #c9aa7e !important;
  border-color: #c9aa7e !important;
  color: #fff !important;
}

html body #page-container .gd-inner-body .gd-contact-button:hover,
html body #page-container .gd-inner-body .gd-contact-button:focus,
html body #page-container .gd-hip-contact .gd-contact-button:hover,
html body #page-container .gd-hip-contact .gd-contact-button:focus,
html body #page-container .gd-knee-contact .gd-contact-button:hover,
html body #page-container .gd-knee-contact .gd-contact-button:focus,
html body #page-container .gd-inner-body .gform_wrapper input.gform_button:hover,
html body #page-container .gd-inner-body .gform_wrapper input.gform_button:focus,
html body #page-container .gd-inner-body .gform_wrapper button.gform_button:hover,
html body #page-container .gd-inner-body .gform_wrapper button.gform_button:focus,
html body #page-container .gravity-contact .gform_wrapper input.gform_button:hover,
html body #page-container .gravity-contact .gform_wrapper input.gform_button:focus,
html body #page-container .gravity-contact .gform_wrapper button.gform_button:hover,
html body #page-container .gravity-contact .gform_wrapper button.gform_button:focus {
  background: #b89564 !important;
  border-color: #b89564 !important;
  color: #fff !important;
}

/* The dedicated FAQ page uses the inner-body class on a gold panel, so it
   deliberately returns to the primary green instead of inheriting the dark-panel exception. */
html body.page-id-40 #page-container .gd-inner-body .gd-contact-button {
  background: #0d5f63 !important;
  border-color: #0d5f63 !important;
  color: #fff !important;
}

html body.page-id-40 #page-container .gd-inner-body .gd-contact-button:hover,
html body.page-id-40 #page-container .gd-inner-body .gd-contact-button:focus {
  background: #084b4e !important;
  border-color: #084b4e !important;
  color: #fff !important;
}

/* Preserve white button copy on the gold hip and knee contrast variants. */
html body.page-id-32 #page-container .gd-hip-contact .gd-contact-button,
html body.page-id-34 #page-container .gd-knee-contact .gd-contact-button {
  color: #fff !important;
}

/* Inner hero images already contain the button artwork. Match that exact desktop
   rectangle so the live link covers it cleanly instead of creating a double edge. */
@media (min-width: 768px) {
  html body #page-container .gd-inner-hero .gd-hero-book-link {
    left: 4.2% !important;
    bottom: 16.6% !important;
    width: 19.6% !important;
    height: 8.7% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
  }

  /* The About artwork already includes its title on desktop. */
  html body.page-id-30 #page-container .gd-inner-hero .et_pb_text {
    display: none !important;
  }
}

@media (max-width: 767px) {
  /* On narrow screens the artwork title is cropped out, so provide one clean,
     responsive title with guaranteed space above the appointment button. */
  html body.page-id-30 #page-container .gd-inner-hero {
    background-size: auto 125% !important;
    background-position: right center !important;
  }

  html body.page-id-30 #page-container .gd-inner-hero > .et_pb_row {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  html body.page-id-30 #page-container .gd-inner-hero .et_pb_column,
  html body.page-id-30 #page-container .gd-inner-hero .et_pb_text,
  html body.page-id-30 #page-container .gd-inner-hero .et_pb_text_inner {
    position: static !important;
  }

  html body.page-id-30 #page-container .gd-inner-hero h1 {
    position: absolute !important;
    left: 24px !important;
    bottom: 105px !important;
    width: auto !important;
    max-width: calc(100% - 48px) !important;
    margin: 0 !important;
    padding: 10px 16px !important;
    background: rgba(0, 55, 58, 0.88) !important;
    color: #fff !important;
    font-size: clamp(26px, 7vw, 32px) !important;
    line-height: 1.05 !important;
    letter-spacing: 1px !important;
    white-space: nowrap !important;
  }
}
