/* On Teddy v2.9 — centered mobile hero + guaranteed one-card testimonial slider. */
@media (max-width: 767px) {
  /* Hero stays within the visible mobile viewport. */
  body.on-teddy-theme .on-teddy-front-page .elementor-element-428c2a2,
  body.on-teddy-theme .on-teddy-front-page .elementor-element-428c2a2 > .elementor-container {
    height: calc(100svh - 70px) !important;
    min-height: 540px !important;
    max-height: 820px !important;
  }

  body.on-teddy-theme .on-teddy-front-page .elementor-element-428c2a2 {
    background-position: 72% center !important;
  }

  /* Vertically center all hero copy and prevent button/text overlap. */
  body.on-teddy-theme .on-teddy-front-page .elementor-element-d05d1b4 {
    display: flex !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    align-items: center !important;
    padding: 24px 24px 30px !important;
  }

  body.on-teddy-theme .on-teddy-front-page .elementor-element-d05d1b4 > .elementor-element-populated,
  body.on-teddy-theme .on-teddy-front-page .elementor-element-d05d1b4 > .elementor-widget-wrap {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    justify-content: center !important;
    align-content: flex-start !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    padding: 0 !important;
  }

  body.on-teddy-theme .on-teddy-front-page .elementor-element-d05d1b4 h1.elementor-heading-title {
    max-width: 292px !important;
    margin: 0 0 16px !important;
    font-size: clamp(32px, 8.3vw, 38px) !important;
    line-height: 1.01 !important;
  }

  body.on-teddy-theme .on-teddy-front-page .elementor-element-d05d1b4 .elementor-widget-text-editor,
  body.on-teddy-theme .on-teddy-front-page .elementor-element-d05d1b4 .elementor-widget-text-editor p {
    max-width: 300px !important;
    margin: 0 0 10px !important;
  }

  body.on-teddy-theme .on-teddy-front-page .elementor-element-d05d1b4 .elementor-widget-button {
    display: block !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 0 0 12px !important;
  }

  body.on-teddy-theme .on-teddy-front-page .elementor-element-d05d1b4 .elementor-button {
    display: inline-flex !important;
    width: auto !important;
  }

  body.on-teddy-theme .on-teddy-front-page .elementor-element-d05d1b4 .on-teddy-secondary-button {
    margin-top: 2px !important;
  }

  /* Completely remove Scroll to Discover on mobile. */
  body.on-teddy-theme .on-teddy-front-page .elementor-element-d05d1b4 .on-teddy-scroll-label,
  body.on-teddy-theme .on-teddy-front-page .elementor-element-d05d1b4 .elementor-widget:has(.on-teddy-scroll-label) {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  /* Testimonials heading remains compact. */
  body.on-teddy-theme .on-teddy-front-page .elementor-element-94043be h2.elementor-heading-title {
    max-width: 330px !important;
    margin-right: auto !important;
    margin-left: auto !important;
    font-size: clamp(27px, 7vw, 32px) !important;
    line-height: 1.04 !important;
  }

  /* Guaranteed horizontal one-card-at-a-time track, even before JS runs. */
  body.on-teddy-theme .on-teddy-front-page .elementor-element-2b75a8d {
    width: 100% !important;
    overflow: hidden !important;
    padding: 0 0 28px !important;
  }

  body.on-teddy-theme .on-teddy-front-page .elementor-element-2b75a8d > .elementor-container,
  body.on-teddy-theme .on-teddy-front-page .elementor-element-2b75a8d > .e-con-inner,
  body.on-teddy-theme .on-teddy-front-page .elementor-element-2b75a8d .on-teddy-review-carousel-v29 {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    width: 100% !important;
    max-width: none !important;
    gap: 14px !important;
    margin: 0 !important;
    padding: 4px 20px 12px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory !important;
    scroll-padding-inline: 20px !important;
    scroll-behavior: smooth !important;
    overscroll-behavior-x: contain !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    touch-action: pan-x pinch-zoom !important;
    cursor: grab !important;
  }

  body.on-teddy-theme .on-teddy-front-page .elementor-element-2b75a8d > .elementor-container::-webkit-scrollbar,
  body.on-teddy-theme .on-teddy-front-page .elementor-element-2b75a8d > .e-con-inner::-webkit-scrollbar,
  body.on-teddy-theme .on-teddy-front-page .on-teddy-review-carousel-v29::-webkit-scrollbar {
    display: none !important;
  }

  body.on-teddy-theme .on-teddy-front-page .elementor-element-2b75a8d > .elementor-container > .elementor-column,
  body.on-teddy-theme .on-teddy-front-page .elementor-element-2b75a8d > .e-con-inner > .e-con,
  body.on-teddy-theme .on-teddy-front-page .elementor-element-2b75a8d .on-teddy-review-carousel-v29 > .elementor-column,
  body.on-teddy-theme .on-teddy-front-page .elementor-element-2b75a8d .on-teddy-review-carousel-v29 > .e-con,
  body.on-teddy-theme .on-teddy-front-page .elementor-element-2b75a8d .on-teddy-review-carousel-v29 > [data-element_type="column"] {
    display: block !important;
    flex: 0 0 calc(100% - 34px) !important;
    width: calc(100% - 34px) !important;
    min-width: calc(100% - 34px) !important;
    max-width: calc(100% - 34px) !important;
    margin: 0 !important;
    scroll-snap-align: center !important;
    scroll-snap-stop: always !important;
  }

  body.on-teddy-theme .on-teddy-front-page .elementor-element-2b75a8d .on-teddy-review-carousel-v29.is-dragging {
    scroll-behavior: auto !important;
    cursor: grabbing !important;
  }

  body.on-teddy-theme .on-teddy-front-page :is(.elementor-element-b6c1b5c,.elementor-element-b55d753,.elementor-element-ad2f426) .elementor-widget-container {
    min-height: 235px !important;
    height: 100% !important;
    padding: 22px 20px !important;
    border: 1px solid #eadfd4 !important;
    border-radius: 24px !important;
    background: rgba(255,255,255,.92) !important;
    box-shadow: 0 12px 30px rgba(83,63,47,.07) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
  }

  .on-teddy-review-carousel-v29__dots {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    margin: 5px 0 0 !important;
  }

  .on-teddy-review-carousel-v29__dot {
    width: 7px !important;
    height: 7px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: #d9cbbd !important;
    transition: width .25s ease, background .25s ease !important;
  }

  .on-teddy-review-carousel-v29__dot.is-active {
    width: 23px !important;
    background: #d56b08 !important;
  }
}

@media (max-width: 360px) {
  body.on-teddy-theme .on-teddy-front-page .elementor-element-d05d1b4 h1.elementor-heading-title {
    font-size: 30px !important;
  }
  body.on-teddy-theme .on-teddy-front-page .elementor-element-2b75a8d > .elementor-container > .elementor-column,
  body.on-teddy-theme .on-teddy-front-page .elementor-element-2b75a8d .on-teddy-review-carousel-v29 > .elementor-column {
    flex-basis: calc(100% - 26px) !important;
    width: calc(100% - 26px) !important;
    min-width: calc(100% - 26px) !important;
    max-width: calc(100% - 26px) !important;
  }
}
