/*
 * Hernandez-Gil mobile contract.
 *
 * This file is intentionally loaded last. It only owns the phone layout and
 * prevents desktop/editor rules from leaking into viewports below 768px.
 */

@media (max-width: 767px) {
  html {
    height: auto !important;
    min-height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  body.hg-compact-site {
    width: 100% !important;
    height: auto !important;
    min-height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
  }

  /* Header: logo and tools always fit inside the viewport. */
  body.hg-compact-site .hg-site-header,
  body.hg-compact-site .hg-site-header__inner {
    min-height: 64px !important;
  }

  body.hg-compact-site .hg-site-header,
  body.hg-compact-site .hg-site-header.is-hidden {
    transform: translateY(0) !important;
  }

  body.hg-compact-site .hg-site-header__inner {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 10px 14px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 8px !important;
    box-sizing: border-box !important;
  }

  body.hg-compact-site .hg-site-header__logo,
  body.hg-compact-site .hg-site-header__logo img {
    width: clamp(116px, 36vw, 136px) !important;
    max-width: clamp(116px, 36vw, 136px) !important;
  }

  body.hg-compact-site .hg-site-header__mobile-tools {
    min-width: 0 !important;
    margin-left: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 10px !important;
  }

  body.hg-compact-site .hg-site-header__mobile-cta {
    flex: 0 0 auto !important;
    min-width: 94px !important;
    min-height: 34px !important;
    height: 34px !important;
    padding-inline: 13px !important;
    font-size: 10.5px !important;
  }

  body.hg-compact-site .hg-site-header__toggle {
    flex: 0 0 26px !important;
    width: 26px !important;
    height: 26px !important;
    gap: 4px !important;
  }

  body.hg-compact-site .hg-site-header__toggle-bar {
    width: 18px !important;
    height: 2px !important;
  }

  /* On phones the CTA is centred and the slide selector forms a second row. */
  body.hg-compact-site.home.page-id-34 .elementor-34 .hg-hero-v2 {
    --hg-hero-viewport-h: clamp(740px, 100dvh, 800px) !important;
  }

  body.hg-compact-site.home.page-id-34 .elementor-34
    .hg-hero-v2__slide--clinic .hg-hero-v2__title,
  body.hg-compact-site.home.page-id-34 .elementor-34
    .hg-hero-v2__slide--online .hg-hero-v2__tele-title {
    top: 0 !important;
    top: 16% !important;
    width: calc(100% - 32px) !important;
    max-width: 390px !important;
    margin-inline: auto !important;
  }

  body.hg-compact-site.home.page-id-34 .elementor-34
    .hg-hero-v2__slide--clinic :is(.hg-hero-v2__line1, .hg-hero-v2__line2) {
    font-size: 35px !important;
    line-height: 1.06 !important;
  }

  body.hg-compact-site.home.page-id-34 .elementor-34
    .hg-hero-v2__slide--online :is(
      .hg-hero-v2__tele-line1,
      .hg-hero-v2__tele-line2,
      .hg-hero-v2__tele-line3
    ) {
    font-size: 25px !important;
    line-height: 1.18 !important;
  }

  body.hg-compact-site.home.page-id-34 .elementor-34 :is(
    .hg-hero-v2__slide--clinic .hg-hero-v2__copy,
    .hg-hero-v2__slide--online .hg-hero-v2__tele-copy
  ) {
    width: calc(100% - 32px) !important;
    max-width: 358px !important;
    font-size: 17px !important;
    line-height: 1.38 !important;
    letter-spacing: .025em !important;
    word-spacing: normal !important;
  }

  body.hg-compact-site.home.page-id-34 .elementor-34
    .hg-hero-v2__slide--clinic .hg-hero-v2__cta,
  body.hg-compact-site.home.page-id-34 .elementor-34
    .hg-hero-v2__slide--online .hg-hero-v2__cta--light {
    left: 50% !important;
    width: 178px !important;
    min-width: 0 !important;
    transform: translateX(-50%) !important;
    padding-inline: 12px !important;
  }

  body.hg-compact-site.home.page-id-34 .elementor-34 .hg-hero-v2__switcher {
    left: 50% !important;
    right: auto !important;
    width: min(220px, calc(100vw - 32px)) !important;
    min-width: 0 !important;
    transform: translateX(-50%) !important;
  }

  body.hg-compact-site.home.page-id-34 .elementor-34 .hg-hero-v2__switcher-link {
    width: 100% !important;
    font-size: 15px !important;
  }

  body.hg-compact-site.home.page-id-34 .elementor-34
    .hg-hero-v2.is-slide-online .hg-hero-v2__switcher .hg-hero-v2__arrow {
    left: 0 !important;
    right: auto !important;
  }

  body.hg-compact-site.home.page-id-34 .elementor-34 .hg-hero-v2__switcher-dots {
    gap: 7px !important;
  }

  /* The clinic media is a separate, centred row below the complete title. */
  body.hg-compact-site.home.page-id-34 .elementor-34
    .hg-hero-v2__slide--clinic .hg-hero-v2__line2 > span {
    position: static !important;
    left: auto !important;
  }

  /*
   * Fluid mobile hero (SE through large Pro phones).
   *
   * The slide remains layered for the cross-fade, but its contents use normal
   * grid flow.  No element depends on a viewport percentage or a JS-calculated
   * top value.  A bounded content stage keeps the composition visually stable;
   * any extra height becomes breathing room above the marquee.
   */
  body.hg-compact-site.home.page-id-34 .elementor-34 .hg-hero-v2 {
    --hg-mobile-hero-stage: clamp(555px, calc(720px - 42vw), 580px);
    --hg-hero-marquee-h: 42px !important;
    --hg-hero-scroll-cue-h: 56px !important;
    --hg-hero-viewport-h: 100svh !important;
    display: grid !important;
    grid-template-rows:
      var(--hg-mobile-hero-stage)
      auto
      16px
      var(--hg-hero-marquee-h)
      var(--hg-hero-scroll-cue-h) !important;
    min-height: 0 !important;
    height: auto !important;
    gap: 0 !important;
    background: var(--hgc-paper, #FFFCFA) !important;
  }

  body.hg-compact-site.home.page-id-34 .elementor-34 .hg-hero-v2.is-slide-online {
    background:
      linear-gradient(rgba(60, 37, 22, .08), rgba(60, 37, 22, .08)),
      url('/wp-content/uploads/2026/07/telemedicina-hero.jpg') 50% 50% / cover no-repeat !important;
  }

  body.hg-compact-site.home.page-id-34 .elementor-34 .hg-hero-v2.is-scroll-cue-hidden {
    grid-template-rows:
      var(--hg-mobile-hero-stage)
      auto
      16px
      var(--hg-hero-marquee-h)
      0 !important;
    height: auto !important;
    min-height: 0 !important;
  }

  body.hg-compact-site.home.page-id-34 :is(
    .elementor-element-heroPixel2,
    .elementor-element-heroPixel2 > .e-con-inner,
    .elementor-element-heroPixelHtml2,
    .elementor-element-heroPixelHtml2 > .elementor-widget-container
  ) {
    min-height: 0 !important;
    height: auto !important;
  }

  body.hg-compact-site.home.page-id-34 .elementor-34 .hg-hero-v2__slides {
    grid-row: 1 !important;
    position: relative !important;
    width: 100% !important;
    height: var(--hg-mobile-hero-stage) !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body.hg-compact-site.home.page-id-34 .elementor-34 .hg-hero-v2__slide {
    height: 100% !important;
    min-height: 0 !important;
  }

  body.hg-compact-site.home.page-id-34 .elementor-34
    .hg-hero-v2__slide--online .hg-hero-v2__slide-bg {
    display: none !important;
  }

  body.hg-compact-site.home.page-id-34 .elementor-34
    .hg-hero-v2.is-slide-online :is(
      .hg-hero-v2__slides,
      .hg-hero-v2__slide--online,
      .hg-hero-v2__slide--online .hg-hero-v2__inner
    ) {
    background: transparent !important;
  }

  body.hg-compact-site.home.page-id-34 .elementor-34 .hg-hero-v2__inner {
    position: relative !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-auto-rows: max-content !important;
    justify-items: center !important;
    align-content: start !important;
    row-gap: clamp(9px, 1.4svh, 13px) !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: clamp(98px, 26vw, 106px) 16px 8px !important;
  }

  body.hg-compact-site.home.page-id-34 .elementor-34 :is(
    .hg-hero-v2__title,
    .hg-hero-v2__tele-title,
    .hg-hero-v2__copy,
    .hg-hero-v2__tele-copy,
    .hg-hero-v2__device,
    .hg-hero-v2__tele-phone-wrap,
    .hg-hero-v2__cta
  ) {
    position: relative !important;
    inset: auto !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    margin: 0 !important;
  }

  body.hg-compact-site.home.page-id-34 .elementor-34 :is(
    .hg-hero-v2__title,
    .hg-hero-v2__tele-title,
    .hg-hero-v2__copy,
    .hg-hero-v2__tele-copy,
    .hg-hero-v2__cta,
    .hg-hero-v2__tele-phone-wrap
  ) {
    transform: none !important;
  }

  body.hg-compact-site.home.page-id-34 .elementor-34
    .hg-hero-v2__slide--clinic .hg-hero-v2__title,
  body.hg-compact-site.home.page-id-34 .elementor-34
    .hg-hero-v2__slide--online .hg-hero-v2__tele-title {
    width: min(100%, 380px) !important;
    max-width: 380px !important;
    text-align: center !important;
  }

  body.hg-compact-site.home.page-id-34 .elementor-34
    .hg-hero-v2__slide--clinic .hg-hero-v2__title {
    margin-top: 20px !important;
  }

  body.hg-compact-site.home.page-id-34 .elementor-34
    .hg-hero-v2__slide--clinic :is(.hg-hero-v2__line1, .hg-hero-v2__line2) {
    font-size: clamp(27px, 7.7vw, 30px) !important;
    line-height: 1.04 !important;
  }

  body.hg-compact-site.home.page-id-34 .elementor-34
    .hg-hero-v2__slide--clinic .hg-hero-v2__line2 {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 0 .24em !important;
    margin-top: 4px !important;
  }

  body.hg-compact-site.home.page-id-34 .elementor-34
    .hg-hero-v2__slide--clinic .hg-hero-v2__line2 > span {
    display: inline !important;
  }

  body.hg-compact-site.home.page-id-34 .elementor-34
    .hg-hero-v2__slide--online :is(
      .hg-hero-v2__tele-line1,
      .hg-hero-v2__tele-line2,
      .hg-hero-v2__tele-line3
    ) {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    margin-top: 3px !important;
    font-size: clamp(20px, 5.7vw, 22px) !important;
    line-height: 1.16 !important;
  }

  body.hg-compact-site.home.page-id-34 .elementor-34
    .hg-hero-v2__slide--online .hg-hero-v2__tele-line1 {
    margin-top: 0 !important;
  }

  body.hg-compact-site.home.page-id-34 .elementor-34
    .hg-hero-v2__slide--online :is(
      .hg-hero-v2__tele-line1,
      .hg-hero-v2__tele-line2,
      .hg-hero-v2__tele-line3
    ) span {
    display: inline !important;
  }

  body.hg-compact-site.home.page-id-34 .elementor-34
    .hg-hero-v2__slide--clinic .hg-hero-v2__device {
    top: 0 !important;
    width: clamp(70px, 19vw, 80px) !important;
    height: auto !important;
    justify-self: center !important;
    animation: hg-home-device-float 8s ease-in-out infinite !important;
  }

  body.hg-compact-site.home.page-id-34 .elementor-34
    .hg-hero-v2__slide--online .hg-hero-v2__tele-phone-wrap {
    top: 12px !important;
    width: clamp(45px, 12vw, 52px) !important;
    height: auto !important;
    justify-self: center !important;
    margin-top: 14px !important;
  }

  body.hg-compact-site.home.page-id-34 .elementor-34 :is(
    .hg-hero-v2__slide--clinic .hg-hero-v2__copy,
    .hg-hero-v2__slide--online .hg-hero-v2__tele-copy
  ) {
    top: 0 !important;
    width: min(calc(100% - 12px), 350px) !important;
    max-width: 350px !important;
    font-size: clamp(16px, 4.2vw, 17px) !important;
    line-height: 1.28 !important;
    letter-spacing: .02em !important;
    word-spacing: normal !important;
    text-align: center !important;
  }

  body.hg-compact-site.home.page-id-34 .elementor-34
    .hg-hero-v2__slide--online .hg-hero-v2__tele-copy {
    margin-top: 12px !important;
  }

  body.hg-compact-site.home.page-id-34 .elementor-34
    .hg-hero-v2__slide--clinic .hg-hero-v2__cta,
  body.hg-compact-site.home.page-id-34 .elementor-34
    .hg-hero-v2__slide--online .hg-hero-v2__cta--light {
    position: absolute !important;
    inset: auto !important;
    left: 50% !important;
    right: auto !important;
    top: clamp(396px, calc(100vw + 21px), 415px) !important;
    bottom: auto !important;
    transform: translateX(-50%) !important;
    width: 178px !important;
    min-width: 178px !important;
    height: 44px !important;
    margin-top: clamp(18px, 2.6svh, 22px) !important;
    padding: 0 18px !important;
    border-width: 2px !important;
    font-size: 15px !important;
    justify-self: center !important;
  }

  body.hg-compact-site.home.page-id-34 .elementor-34 .hg-hero-v2__switcher {
    grid-row: 2 !important;
    position: relative !important;
    inset: auto !important;
    left: auto !important;
    right: auto !important;
    top: -36px !important;
    bottom: auto !important;
    width: min(230px, calc(100% - 32px)) !important;
    height: auto !important;
    margin: 0 auto !important;
    padding: 2px 0 6px !important;
    transform: none !important;
    align-items: center !important;
    gap: 5px !important;
    align-self: start !important;
  }

  body.hg-compact-site.home.page-id-34 .elementor-34 .hg-hero-v2__switcher-link {
    width: 100% !important;
    min-height: 22px !important;
    height: auto !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 10px !important;
    font-size: clamp(14px, 4vw, 16px) !important;
    line-height: 1.15 !important;
  }

  body.hg-compact-site.home.page-id-34 .elementor-34 .hg-hero-v2__switcher-dots {
    width: auto !important;
    gap: 8px !important;
  }

  body.hg-compact-site.home.page-id-34 .elementor-34 .hg-hero-v2__switcher-dots button {
    width: 8px !important;
    height: 8px !important;
    min-width: 8px !important;
    min-height: 8px !important;
    margin: 0 !important;
  }

  body.hg-compact-site.home.page-id-34 .elementor-34 .hg-hero-v2__marquee {
    grid-row: 4 !important;
    position: relative !important;
    inset: auto !important;
    bottom: auto !important;
    width: 100% !important;
    height: var(--hg-hero-marquee-h) !important;
    align-self: end !important;
  }

  body.hg-compact-site.home.page-id-34 .elementor-34 .hg-hero-v2__scroll-cue {
    grid-row: 5 !important;
    position: relative !important;
    inset: auto !important;
    bottom: auto !important;
    width: 100% !important;
    height: var(--hg-hero-scroll-cue-h) !important;
    min-height: var(--hg-hero-scroll-cue-h) !important;
  }

  body.hg-compact-site.home.page-id-34 .elementor-34
    .hg-hero-v2.is-scroll-cue-hidden .hg-hero-v2__scroll-cue {
    height: 0 !important;
    min-height: 0 !important;
  }

  

  /* Section widths: never inherit the narrow desktop comparison measure. */
  body.hg-compact-site .elementor-34 :is(
    .hg-specialties,
    .hg-treatments,
    .hg-contact
  ) > .e-con-inner {
    width: 100% !important;
    max-width: none !important;
  }

  /* Team: one useful card, with its portrait contained inside it. */
  body.hg-compact-site .hg-team-carousel {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-right: 0 !important;
    margin-left: calc(50% - 50vw) !important;
    padding-inline: clamp(40px, 11vw, 48px) !important;
    box-sizing: border-box !important;
  }

  body.hg-compact-site .hg-team-carousel__viewport {
    width: 100% !important;
  }

  body.hg-compact-site .hg-team-carousel__card {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 420px !important;
    padding: 26px 18px 24px !important;
    box-sizing: border-box !important;
  }

  body.hg-compact-site .hg-team-carousel__photo {
    width: 150px !important;
    height: 150px !important;
    max-width: calc(100% - 16px) !important;
    aspect-ratio: 1 !important;
  }

  body.hg-compact-site .hg-team-carousel__name {
    height: auto !important;
    min-height: 2.4em !important;
  }

  body.hg-compact-site .hg-team-carousel__role {
    min-height: 0 !important;
    margin-bottom: 16px !important;
  }

  /* Contact: use the available phone width consistently. */
  body.hg-compact-site .elementor-34 .hg-contact {
    padding-right: 16px !important;
    padding-left: 16px !important;
  }

  body.hg-compact-site .elementor-34 .hg-contact-row {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin-inline: 0 !important;
    gap: 48px !important;
    transform: none !important;
    box-sizing: border-box !important;
  }

  body.hg-compact-site .elementor-34 :is(.hg-contact-left, .hg-contact-right) {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin-inline: 0 !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
    --padding-right: 0px !important;
    --padding-left: 0px !important;
    transform: none !important;
    box-sizing: border-box !important;
  }

  body.hg-compact-site .elementor-34 :is(.hg-contact-left, .hg-contact-right) > *,
  body.hg-compact-site .elementor-34 .hg-contact :is(
    .elementor-widget-container,
    .fluentform-widget-wrapper,
    .ff-el-group,
    .ff-t-container,
    .hg-hours,
    .hg-map-embed,
    .hg-parking,
    .hg-contact-chips
  ) {
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  body.hg-compact-site .elementor-34 .hg-contact-left >
    .elementor-widget-fluent-form-widget,
  body.hg-compact-site .elementor-34 .hg-contact-left form,
  body.hg-compact-site .elementor-34 .hg-contact-left .fluentform,
  body.hg-compact-site .elementor-34 .hg-contact-left .frm-fluent-form {
    width: 100% !important;
    max-width: none !important;
    margin-inline: 0 !important;
  }

  body.hg-compact-site .elementor-34 .hg-contact :is(
    .ff-el-form-control,
    input,
    select,
    textarea
  ) {
    max-width: 100% !important;
  }

  body.hg-compact-site .elementor-34 .hg-contact-right :is(
    .hg-hours,
    .hg-map-embed,
    .hg-parking,
    .hg-contact-chips
  ),
  body.hg-compact-site .elementor-34 .hg-contact-right > :is(
    .elementor-widget-heading,
    .elementor-widget-text-editor
  ) {
    width: 100% !important;
    max-width: none !important;
  }

  /* Keep treatment copy justified, including the lines that flow beside the
     editorial corner image. */
  body.hg-treatment-template .hg-treatment-article__body,
  body.hg-treatment-template .hg-treatment-article__body p,
  body.hg-treatment-template .hg-treatment-article__body li {
    text-align: justify !important;
    text-align-last: left !important;
    text-justify: inter-word;
    line-height: 1.58 !important;
    word-spacing: normal !important;
  }
}

@media (max-width: 767px) {
  html body.hg-compact-site .elementor.elementor-34 .hg-specialties {
    padding-bottom: 12px !important;
  }

  html body.hg-compact-site .elementor.elementor-34 .hg-treatments {
    min-height: 0 !important;
    margin-top: 0 !important;
    padding: 0 16px 36px !important;
  }

  html body.hg-compact-site .elementor.elementor-34
    .hg-treatments > .e-con-inner {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
    padding: 10px 0 24px !important;
    gap: 0 !important;
  }

  html body.hg-compact-site .elementor.elementor-34 .hg-treatments-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    margin: 28px 0 0 !important;
    gap: 7px !important;
  }

  html body.hg-compact-site .elementor.elementor-34
    .hg-treatments-grid > .hg-pill-col {
    display: contents !important;
  }

  html body.hg-compact-site .elementor.elementor-34
    .hg-treatments-grid .hg-pill {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 44px !important;
    min-height: 44px !important;
    margin: 0 !important;
  }

  html body.hg-compact-site .elementor.elementor-34
    .hg-treatments-grid .hg-pill > .elementor-widget-container,
  html body.hg-compact-site .elementor.elementor-34
    .hg-treatments-grid .hg-pill .elementor-button-wrapper {
    width: 100% !important;
    height: 100% !important;
  }

  html body.hg-compact-site .elementor.elementor-34
    .hg-treatments-grid .hg-pill .elementor-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 3px 6px !important;
  font-size: 10.75px !important;
    line-height: 1.08 !important;
    letter-spacing: .01em !important;
    text-align: center !important;
  }

  html body.hg-compact-site .elementor.elementor-34
    .hg-treatments-grid .hg-pill .elementor-button-text {
    font-size: inherit !important;
    line-height: 1.08 !important;
    letter-spacing: .01em !important;
  }
}

@media (max-width: 767px) {
  html body.hg-compact-site.hg-treatment-template
    .hg-treatment-shared .elementor.elementor-34 .hg-specialties-grid {
    gap: 16px !important;
  }

  html body.hg-compact-site.hg-treatment-template
    .hg-treatment-shared .elementor.elementor-34
    .hg-specialties-grid .hg-speciality-card {
    padding: 12px !important;
    gap: 6px !important;
  }

  html body.hg-compact-site.hg-treatment-template
    .hg-treatment-shared .elementor.elementor-34
    .hg-specialties-grid .hg-speciality-card :is(.hg-card-image, .hg-card-image img) {
    width: clamp(176px, 47vw, 184px) !important;
    height: clamp(176px, 47vw, 184px) !important;
  }

  html body.hg-compact-site.hg-treatment-template
    .hg-treatment-shared .elementor.elementor-34
    .hg-specialties-grid .hg-speciality-card .hg-card-title {
    min-height: 30px !important;
    margin: 8px 0 0 !important;
  }

  html body.hg-compact-site.hg-treatment-template
    .hg-treatment-shared .elementor.elementor-34
    .hg-specialties-grid .hg-speciality-card
    .hg-card-title .elementor-heading-title {
    font-size: 20px !important;
    line-height: 1.12 !important;
  }

  html body.hg-compact-site.hg-treatment-template
    .hg-treatment-shared .elementor.elementor-34
    .hg-specialties-grid .hg-speciality-card :is(.hg-card-copy, .hg-card-copy p) {
    font-size: 15px !important;
    line-height: 1.32 !important;
  }

  html body.hg-compact-site.hg-treatment-template
    .hg-treatment-shared .elementor.elementor-34
    .hg-specialties-grid .hg-speciality-card .hg-card-btn {
    margin: 4px 0 0 !important;
  }

  html body.hg-compact-site.hg-treatment-template
    .hg-treatment-shared .elementor.elementor-34
    .hg-specialties-grid .hg-speciality-card .hg-card-btn .elementor-button {
    min-height: 36px !important;
    height: 36px !important;
    padding: 6px 20px !important;
  }
}

@media (max-width: 767px) {
  html body.hg-compact-site.page-id-34 .elementor.elementor-34
    .hg-specialties-grid {
    gap: 16px !important;
  }

  html body.hg-compact-site.page-id-34 .elementor.elementor-34
    .hg-specialties-grid .hg-speciality-card,
  html body.hg-compact-site.hg-treatment-template
    .hg-treatment-tail .hg-specialties-grid .hg-speciality-card {
    padding: 12px !important;
    gap: 6px !important;
  }

  html body.hg-compact-site.page-id-34 .elementor.elementor-34
    .hg-specialties-grid .hg-speciality-card .hg-card-image,
  html body.hg-compact-site.page-id-34 .elementor.elementor-34
    .hg-specialties-grid .hg-speciality-card .hg-card-image img,
  html body.hg-compact-site.hg-treatment-template
    .hg-treatment-tail .hg-specialties-grid .hg-speciality-card .hg-card-image,
  html body.hg-compact-site.hg-treatment-template
    .hg-treatment-tail .hg-specialties-grid .hg-speciality-card .hg-card-image img {
    width: clamp(176px, 47vw, 184px) !important;
    height: clamp(176px, 47vw, 184px) !important;
  }

  html body.hg-compact-site.page-id-34 .elementor.elementor-34
    .hg-specialties-grid .hg-speciality-card .hg-card-title,
  html body.hg-compact-site.hg-treatment-template
    .hg-treatment-tail .hg-specialties-grid .hg-speciality-card .hg-card-title {
    min-height: 30px !important;
    margin: 8px 0 0 !important;
  }

  html body.hg-compact-site.page-id-34 .elementor.elementor-34
    .hg-specialties-grid .hg-speciality-card .hg-card-title .elementor-heading-title,
  html body.hg-compact-site.hg-treatment-template
    .hg-treatment-tail .hg-specialties-grid .hg-speciality-card
    .hg-card-title .elementor-heading-title {
    font-size: 20px !important;
    line-height: 1.12 !important;
  }

  html body.hg-compact-site.page-id-34 .elementor.elementor-34
    .hg-specialties-grid .hg-speciality-card .hg-card-copy,
  html body.hg-compact-site.page-id-34 .elementor.elementor-34
    .hg-specialties-grid .hg-speciality-card .hg-card-copy p,
  html body.hg-compact-site.hg-treatment-template
    .hg-treatment-tail .hg-specialties-grid .hg-speciality-card .hg-card-copy,
  html body.hg-compact-site.hg-treatment-template
    .hg-treatment-tail .hg-specialties-grid .hg-speciality-card .hg-card-copy p {
    font-size: 15px !important;
    line-height: 1.32 !important;
  }

  html body.hg-compact-site.page-id-34 .elementor.elementor-34
    .hg-specialties-grid .hg-speciality-card .hg-card-btn,
  html body.hg-compact-site.hg-treatment-template
    .hg-treatment-tail .hg-specialties-grid .hg-speciality-card .hg-card-btn {
    margin: 4px 0 0 !important;
  }

  html body.hg-compact-site.page-id-34 .elementor.elementor-34
    .hg-specialties-grid .hg-speciality-card .hg-card-btn .elementor-button,
  html body.hg-compact-site.hg-treatment-template
    .hg-treatment-tail .hg-specialties-grid .hg-speciality-card
    .hg-card-btn .elementor-button {
    min-height: 36px !important;
    height: 36px !important;
    padding: 6px 20px !important;
  }
}

@media (max-width: 359px) {
  body.hg-compact-site .hg-site-header__inner {
    padding-inline: 10px !important;
  }

  body.hg-compact-site .hg-site-header__logo,
  body.hg-compact-site .hg-site-header__logo img {
    width: 116px !important;
    max-width: 116px !important;
  }

  body.hg-compact-site .hg-site-header__mobile-cta {
    min-width: 92px !important;
    padding-inline: 12px !important;
    font-size: 10.5px !important;
  }

  body.hg-compact-site.home.page-id-34 .elementor-34 .hg-hero-v2__switcher-link {
    font-size: 13.5px !important;
  }
}

@media (max-width: 340px) {
  body.hg-compact-site.home.page-id-34 .elementor-34 .hg-hero-v2 {
    --hg-mobile-hero-stage: 580px !important;
  }

  body.hg-compact-site.home.page-id-34 .elementor-34
    .hg-hero-v2__slide--clinic :is(.hg-hero-v2__line1, .hg-hero-v2__line2) {
    font-size: 26px !important;
  }

  body.hg-compact-site.home.page-id-34 .elementor-34 :is(
    .hg-hero-v2__slide--clinic .hg-hero-v2__copy,
    .hg-hero-v2__slide--online .hg-hero-v2__tele-copy
  ) {
    width: calc(100% - 34px) !important;
    font-size: 15.5px !important;
  }

  body.hg-compact-site.home.page-id-34 .elementor-34
    .hg-hero-v2__slide--clinic .hg-hero-v2__copy {
    min-height: 80px !important;
  }

  body.hg-compact-site.home.page-id-34 .elementor-34
    .hg-hero-v2__slide--clinic .hg-hero-v2__cta,
  body.hg-compact-site.home.page-id-34 .elementor-34
    .hg-hero-v2__slide--online .hg-hero-v2__cta--light {
    top: 420px !important;
    margin-top: 14px !important;
  }
}

@media (max-width: 767px) and (prefers-reduced-motion: no-preference) {
  html.hg-js body.hg-compact-site .hg-animate-child {
    opacity: calc(.66 + var(--hg-progress-child, 0) * .34) !important;
    transform: translate3d(
      0,
      calc(22px * (1 - var(--hg-progress-child, 0))),
      0
    ) !important;
    filter: none !important;
  }
}

@media (max-width: 767px) and (hover: none) {
  body.hg-compact-site :is(
    a,
    button,
    [role="button"],
    input[type="button"],
    input[type="submit"]
  ) {
    -webkit-tap-highlight-color: transparent !important;
  }

  body.hg-compact-site :is(
    a,
    button,
    summary,
    [role="button"],
    input[type="button"],
    input[type="submit"],
    input[type="reset"]
  ):is(:hover, :focus, :focus-visible, :active) {
    outline: none !important;
    box-shadow: none !important;
    filter: none !important;
  }

  body.hg-compact-site .hg-touch-released {
    outline: none !important;
    box-shadow: none !important;
    filter: none !important;
  }

  /* Restore every button family to its real resting appearance after touch. */
  body.hg-compact-site :is(
    .hg-site-header__mobile-cta,
    .hg-site-drawer__cta
  ):is(:hover, :focus, :focus-visible, :active) {
    background-color: var(--hgc-brown, #4D3420) !important;
    border-color: var(--hgc-paper, #FFFCFA) !important;
    color: var(--hgc-paper, #FFFCFA) !important;
  }

  body.hg-compact-site.home.page-id-34 .elementor-34
    .hg-hero-v2__slide--clinic .hg-hero-v2__cta:is(:hover, :focus, :focus-visible, :active) {
    background-color: transparent !important;
    border-color: var(--hgc-olive, #72765B) !important;
    color: var(--hgc-olive, #72765B) !important;
    box-shadow: none !important;
  }

  body.hg-compact-site.home.page-id-34 .elementor-34
    .hg-hero-v2__slide--online .hg-hero-v2__cta--light:is(:hover, :focus, :focus-visible, :active) {
    background-color: transparent !important;
    border-color: var(--hgc-paper, #FFFCFA) !important;
    color: var(--hgc-paper, #FFFCFA) !important;
    box-shadow: none !important;
  }

  body.hg-compact-site :is(
    .hg-hero-v2__switcher-link,
    .hg-site-header__toggle,
    .hg-site-drawer__close,
    .hg-team-modal__close,
    .hg-specialty-accordion__trigger
  ):is(:hover, :focus, :focus-visible, :active) {
    background-color: transparent !important;
    box-shadow: none !important;
  }

  body.hg-compact-site .hg-team-carousel__nav:is(:hover, :focus, :focus-visible, :active) {
    background-color: rgba(255, 252, 250, .16) !important;
    border-color: rgba(255, 252, 250, .82) !important;
    color: var(--hgc-paper, #FFFCFA) !important;
  }

  body.hg-compact-site :is(
    .hg-team-carousel__more,
    .hg-team-modal__cta
  ):is(:hover, :focus, :focus-visible, :active) {
    background-color: var(--hgc-paper, #FFFCFA) !important;
    border-color: var(--hgc-brown, #4D3420) !important;
    color: var(--hgc-brown, #4D3420) !important;
  }

  body.hg-compact-site .hg-team-modal__cta {
    background-color: var(--hgc-paper, #FFFCFA) !important;
  }

  body.hg-compact-site .hg-review-bubbles__more:is(:hover, :focus, :focus-visible, :active) {
    background-color: var(--hgc-brown, #4D3420) !important;
    color: var(--hgc-paper, #FFFCFA) !important;
  }

  body.hg-compact-site .ff-btn-submit:is(:hover, :focus, :focus-visible, :active) {
    background-color: var(--hgc-olive, #72765B) !important;
    border-color: var(--hgc-olive, #72765B) !important;
    color: var(--hgc-paper, #FFFCFA) !important;
    transform: none !important;
  }

  body.hg-compact-site .elementor-button:is(:hover, :focus, :focus-visible, :active) {
    background-color: transparent !important;
    color: var(--hgc-brown, #4D3420) !important;
    box-shadow: none !important;
    filter: none !important;
  }

  body.hg-compact-site .hg-specialty-hero__cta:is(:hover, :focus, :focus-visible, :active) {
    background-color: transparent !important;
    border-color: var(--hgc-paper, #FFFCFA) !important;
    color: var(--hgc-paper, #FFFCFA) !important;
  }

  body.hg-compact-site .hg-specialty-accordion__pill:is(:hover, :focus, :focus-visible, :active) {
    background-color: transparent !important;
    border-color: #B7AFA2 !important;
    color: var(--hgc-brown, #4D3420) !important;
  }

  body.hg-compact-site .hg-treatment-article__cta:is(:hover, :focus, :focus-visible, :active) {
    background-color: rgba(114, 118, 91, .78) !important;
    border-color: #FFF !important;
    color: #FFF !important;
  }
}

@media (max-width: 767px) {
  body.hg-compact-site :is(
    .elementor-34 .hg-specialties-grid,
    .hg-treatment-tail .hg-specialties-grid
  ) {
    width: min(300px, calc(100vw - 28px)) !important;
    max-width: 300px !important;
    margin-inline: auto !important;
    gap: 18px !important;
  }

  body.hg-compact-site :is(
    .elementor-34 .hg-speciality-card,
    .hg-treatment-tail .hg-speciality-card
  ) {
    width: 100% !important;
    max-width: 300px !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 14px 14px 16px !important;
    gap: 8px !important;
  }

  body.hg-compact-site :is(
    .elementor-34 .hg-speciality-card,
    .hg-treatment-tail .hg-speciality-card
  ) .hg-card-image,
  body.hg-compact-site :is(
    .elementor-34 .hg-speciality-card,
    .hg-treatment-tail .hg-speciality-card
  ) .hg-card-image img {
    width: clamp(176px, 48vw, 188px) !important;
    height: clamp(176px, 48vw, 188px) !important;
  }

  body.hg-compact-site :is(
    .elementor-34 .hg-speciality-card,
    .hg-treatment-tail .hg-speciality-card
  ) .hg-card-title {
    width: 100% !important;
    min-height: 32px !important;
    margin: 10px 0 0 !important;
  }

  body.hg-compact-site :is(
    .elementor-34 .hg-speciality-card,
    .hg-treatment-tail .hg-speciality-card
  ) .hg-card-title .elementor-heading-title {
    font-size: 21px !important;
    line-height: 1.12 !important;
  }

  body.hg-compact-site :is(
    .elementor-34 .hg-speciality-card,
    .hg-treatment-tail .hg-speciality-card
  ) .hg-card-copy {
    width: min(100%, 260px) !important;
    max-width: 260px !important;
    min-height: 0 !important;
  }

  body.hg-compact-site :is(
    .elementor-34 .hg-speciality-card,
    .hg-treatment-tail .hg-speciality-card
  ) .hg-card-copy,
  body.hg-compact-site :is(
    .elementor-34 .hg-speciality-card,
    .hg-treatment-tail .hg-speciality-card
  ) .hg-card-copy p {
    font-size: 15.5px !important;
    line-height: 1.35 !important;
  }

  body.hg-compact-site :is(
    .elementor-34 .hg-speciality-card,
    .hg-treatment-tail .hg-speciality-card
  ) .hg-card-btn {
    width: 100% !important;
    margin: 6px 0 0 !important;
  }

  body.hg-compact-site :is(
    .elementor-34 .hg-speciality-card,
    .hg-treatment-tail .hg-speciality-card
  ) .hg-card-btn .elementor-button {
    min-height: 38px !important;
    height: 38px !important;
    padding: 7px 22px !important;
    font-size: 13px !important;
  }
}

/* Specialty detail mobile: overlap the image beneath the curved panel without
   exposing the page background, then let the accordion define its full height
   as items open. */
@media (max-width: 767px) {
  body.hg-specialty-template .hg-specialty-hero {
    overflow: visible !important;
  }

  body.hg-specialty-template .hg-specialty-hero__media {
    min-height: 0 !important;
    margin-top: -72px !important;
  }

  body.hg-specialty-template .hg-specialty-hero__media-overlay {
    min-height: 0 !important;
    padding: 108px 16px 36px !important;
  }

  body.hg-specialty-template .hg-specialty-accordion {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  body.hg-specialty-template .hg-specialty-accordion__item,
  body.hg-specialty-template .hg-specialty-accordion__panel {
    height: auto !important;
    max-height: none !important;
  }

  body.hg-specialty-template .hg-specialty-accordion__trigger {
    pointer-events: auto !important;
    touch-action: manipulation;
  }
}

/* iOS/Safari guard: the contact columns must never retain Elementor's
   desktop row sizing when an older responsive stylesheet is cached. */
@media (max-width: 767px) {
  html,
  body.hg-compact-site,
  body.hg-compact-site .elementor-34 {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  body.hg-compact-site .elementor-34 .hg-contact,
  body.hg-compact-site .elementor-34 .hg-contact > .e-con-inner {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  body.hg-compact-site .elementor-34 .hg-contact > .e-con-inner,
  body.hg-compact-site .elementor-34 .hg-contact-left,
  body.hg-compact-site .elementor-34 .hg-contact-right {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }

  body.hg-compact-site .elementor-34 .hg-contact-left,
  body.hg-compact-site .elementor-34 .hg-contact-right {
    flex: 0 0 auto !important;
    align-self: stretch !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  body.hg-compact-site .elementor-34 .hg-contact-left > *,
  body.hg-compact-site .elementor-34 .hg-contact-right > *,
  body.hg-compact-site .elementor-34 .hg-contact .fluentform,
  body.hg-compact-site .elementor-34 .hg-contact .fluentform form,
  body.hg-compact-site .elementor-34 .hg-contact .ff-el-group,
  body.hg-compact-site .elementor-34 .hg-contact .ff-t-container,
  body.hg-compact-site .elementor-34 .hg-contact .ff-t-cell,
  body.hg-compact-site .elementor-34 .hg-contact .hg-hours,
  body.hg-compact-site .elementor-34 .hg-contact .hg-map-embed,
  body.hg-compact-site .elementor-34 .hg-contact .hg-parking {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  body.hg-compact-site .elementor-34 .hg-contact .ff-t-container {
    display: flex !important;
    flex-direction: column !important;
  }

  body.hg-compact-site .elementor-34 .hg-contact .ff-t-cell {
    flex: 0 0 100% !important;
  }

  body.hg-compact-site .elementor-34 .hg-contact :is(input, select, textarea, iframe) {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}
