/* Shared phone and tablet refinements. Desktop layout retains the original design. */
@media (max-width: 1024px) {
  html { scroll-padding-top: 88px; }
  body { padding-bottom: 48px; }
  .elementor .e-con, .elementor .elementor-widget, .elementor .e-con-inner { min-width: 0; }
  .elementor .elementor-widget-heading .elementor-heading-title { overflow-wrap: break-word; text-wrap: balance; }
  .elementor .elementor-widget-heading h1.elementor-heading-title { font-size: clamp(30px, 4.8vw, 48px) !important; line-height: 1.15 !important; }
  .elementor .elementor-widget-heading h2.elementor-heading-title { font-size: clamp(26px, 4vw, 38px) !important; line-height: 1.2 !important; }
  .elementor .elementor-widget-text-editor p { text-align: start; line-height: 1.65; overflow-wrap: break-word; }
  .elementor .elementor-widget-text-editor { max-width: 100%; }
  .elementor .elementor-widget-image img { height: auto !important; max-height: none !important; max-width: 100% !important; object-fit: contain !important; transform: none !important; }
  .elementor .elementor-widget-image a { max-width: 100%; }
  .elementor .swiper-slide img { object-fit: contain !important; }
  .elementor .elementor-widget-button .elementor-button,
  .elementor .e-form__buttons .elementor-button { min-height: 44px; padding: 14px 22px !important; font-size: 13px !important; line-height: 1.35 !important; letter-spacing: 1px !important; max-width: 100%; width: auto; }
  .elementor .elementor-button-content-wrapper { align-items: center; }
  .elementor .elementor-button-text { white-space: normal; }
  /* A compact, stable header with room for every existing quick action. */
  .elementor-666 .elementor-element.elementor-element-e51ffe7 { padding: 10px 16px !important; }
  .elementor-666 .elementor-element.elementor-element-b1561f6 { min-height: 58px; align-items: center; flex-wrap: nowrap; }
  .elementor-666 .elementor-element.elementor-element-3a72479 { width: 164px !important; flex: 0 0 164px !important; padding: 6px 10px !important; }
  .elementor-666 .elementor-element.elementor-element-d8fd50a { width: 100% !important; transform: none !important; }
  .elementor-666 .elementor-element.elementor-element-d8fd50a img { width: 140px !important; max-height: 48px !important; height: auto !important; }
  .elementor-666 .elementor-element.elementor-element-8a4ce6d { flex: 1 1 auto !important; width: auto !important; min-width: 0; padding: 4px 8px !important; align-items: center; }
  .elementor-666 .elementor-menu-toggle { min-width: 44px; min-height: 44px; padding: 10px !important; font-size: 22px !important; }
  .elementor-666 nav.elementor-nav-menu--dropdown.elementor-nav-menu__container { background: #fff; border-radius: 0 0 16px 16px; box-shadow: 0 10px 24px #0002; overflow-y: auto !important; overscroll-behavior: contain; }
  .elementor-666 .elementor-nav-menu--dropdown a { min-height: 44px; padding: 12px 22px !important; line-height: 1.4 !important; white-space: normal !important; }
  .elementor-666 .elementor-nav-menu--dropdown .sub-menu { width: 100% !important; position: static !important; }
  .elementor-666 .elementor-nav-menu--dropdown .sub-menu a { padding-left: 34px !important; }
  /* Home hero: remove nested full-screen heights and frame the building lower. */
  .elementor-2 .elementor-element.elementor-element-0a8f20c { min-height: clamp(540px, 82svh, 760px) !important; background-position: center 70% !important; }
  .elementor-2 .elementor-element.elementor-element-e72d9a1 { min-height: inherit !important; }
  .elementor-2 .elementor-element.elementor-element-6ec5ec5 { min-height: inherit !important; padding: 100px 24px 60px !important; justify-content: center; }
  .elementor-2 .elementor-element.elementor-element-bb856ed .elementor-heading-title { font-size: clamp(20px, 2.8vw, 28px) !important; }
  .elementor-2 .elementor-element.elementor-element-623fd36 .elementor-heading-title { font-size: clamp(34px, 5vw, 50px) !important; }
  /* Page and PPC logos use intrinsic proportions, even without the shared header. */
  .elementor:not(.elementor-666) .elementor-widget-image img[src*="dental-wellness-maryville"] { width: 160px !important; max-height: 60px !important; object-fit: contain !important; }
  .elementor-motion-effects-element, .elementor-motion-effects-layer { transform: none !important; }
  .elementor .animated { animation-duration: .5s !important; }
}
@media (max-width: 767px) {
  .elementor-666 .elementor-element.elementor-element-e51ffe7 { padding: 8px 10px !important; }
  .elementor-666 .elementor-element.elementor-element-3a72479 { width: 136px !important; flex-basis: 136px !important; padding: 6px 8px !important; }
  .elementor-666 .elementor-element.elementor-element-d8fd50a img { width: 120px !important; max-height: 44px !important; }
  .elementor-666 .elementor-element.elementor-element-b1561f6 { min-height: 52px; }
  .elementor .elementor-widget-text-editor p { font-size: 16px; }
  .elementor-2 .elementor-element.elementor-element-0a8f20c { border-radius: 0 0 24px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  .elementor *, .elementor *::before, .elementor *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .elementor .elementor-invisible { visibility: visible !important; }
}
.responsive-canvas-header { display: none; }
@media (max-width: 1024px) {
  .responsive-canvas-header { display: block; position: sticky; top: 0; z-index: 9998; background: #fff; }
  .responsive-canvas-header .elementor-location-header { position: relative !important; }
}
@media (max-width: 1024px) {
  .elementor-666 .elementor-element.elementor-element-8a4ce6d { flex-direction: row !important; flex-wrap: nowrap !important; justify-content: flex-end !important; gap: 8px !important; }
  .elementor-666 .elementor-element.elementor-element-40e1257 { width: auto !important; flex: 1 1 auto !important; flex-direction: row !important; flex-wrap: nowrap !important; gap: 12px !important; padding: 0 !important; }
  .elementor-666 .elementor-element.elementor-element-9a008d9 { width: 44px !important; flex: 0 0 44px !important; margin: 0 !important; }
  .elementor .elementor-widget-text-editor table { display: block; max-width: 100%; overflow-x: auto; }
  .elementor .elementor-widget-text-editor iframe { max-width: 100%; }
}
@media (max-width: 1024px) {
  body:has(.responsive-canvas-header) .elementor-widget-image:has(img[src*="/logo-1-1.webp"]) { display: none; }
}
@media (max-width: 1024px) {
  .elementor-666 nav.elementor-nav-menu--dropdown ul.sub-menu.e-n-open { display: block !important; visibility: visible !important; opacity: 1 !important; max-height: none !important; transform: none !important; }
}
@media (max-width: 1024px) {
  /* Landing-page form cards need the full column once the hero stacks. */
  .elementor .elementor-element:is(.elementor-element-15ccbb2b,.elementor-element-45824af3,.elementor-element-59a1759d) { width: 100% !important; max-width: 640px !important; margin-inline: auto !important; padding: 28px !important; background-color: #fffffff2 !important; }
  .elementor .elementor-element:is(.elementor-element-388be808,.elementor-element-666f11fe,.elementor-element-7bb8fe01) { flex-direction: column !important; align-items: center !important; gap: 12px !important; }
  .elementor .elementor-element:is(.elementor-element-388be808,.elementor-element-666f11fe,.elementor-element-7bb8fe01) > .elementor-element { width: 100% !important; text-align: center !important; }
  .elementor .elementor-element:is(.elementor-element-6cc36c55,.elementor-element-6833240,.elementor-element-719cf636) .elementor-heading-title { font-size: 15px !important; line-height: 1.5 !important; letter-spacing: 1px !important; text-align: center; }
}
@media (max-width: 1024px) {
  .elementor .elementor-element:is(.elementor-element-5738c6a6,.elementor-element-46751e6d,.elementor-element-22953779) { flex-direction: column !important; align-items: stretch !important; }
  .elementor .elementor-element:is(.elementor-element-5738c6a6,.elementor-element-46751e6d,.elementor-element-22953779) > .e-con { width: 100% !important; max-width: 100% !important; flex: 0 0 auto !important; margin-inline: 0 !important; }
  .elementor .elementor-element:is(.elementor-element-4e5aefe5,.elementor-element-16bb4dd3,.elementor-element-542c1ef1) { width: 100% !important; --width: 100%; flex-direction: column !important; align-items: center !important; padding: 28px 20px !important; }
}
/* Elementor pages define their own boxed sections; the theme must not box the entire page. */
body main.site-main:has(> .page-content > .elementor) {
  width: 100%;
  max-width: none !important;
  margin-inline: 0;
}
/* Keep the copyright together; wrap the credit as a separate item when needed. */
.elementor-682 .elementor-element.elementor-element-657be50 {
  display: flex;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 14px 24px;
}
.elementor-682 .elementor-element.elementor-element-40a44492 {
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: 100%;
}
.elementor-682 .elementor-element.elementor-element-40a44492 p {
  flex-wrap: nowrap !important;
  white-space: nowrap;
}
.elementor-682 .elementor-element.elementor-element-4e82246e {
  flex: 0 1 300px !important;
  min-width: 0;
}
@media (max-width: 1024px) {
  .elementor-682 .elementor-element.elementor-element-657be50 { justify-content: center !important; }
  .elementor-682 .elementor-element.elementor-element-40a44492 { text-align: center; }
  .elementor-682 .elementor-element.elementor-element-4e82246e { max-width: 260px !important; }
}
/* Tablet content must start below the compact header, and CTA labels stay intact. */
@media (min-width: 768px) and (max-width: 1024px) {
  .elementor.elementor-location-header { height: 88px !important; min-height: 88px !important; }
  .elementor-666 .elementor-element.elementor-element-e51ffe7 { margin-block: 0 !important; }
  .elementor.elementor-location-single { padding-top: 24px !important; }
  .elementor.elementor-location-single > .e-con:first-child { margin-top: 0 !important; }
  .elementor .e-con:has(> .elementor-widget-image):has(> .e-con .elementor-widget-heading),
  .elementor .e-con:has(> .e-con > .elementor-widget-image):has(> .e-con .elementor-widget-heading) { align-items: center; }
  /* Shared doctor-profile hero: image above biography instead of two narrow columns. */
  .elementor-927 .elementor-element.elementor-element-7b3968e0 > .e-con-inner { flex-direction: column !important; gap: 28px !important; }
  .elementor-927 .elementor-element.elementor-element-7b3968e0 > .e-con-inner > .e-con { width: 100% !important; max-width: 100% !important; flex-basis: auto !important; }
  .elementor-927 .elementor-widget-image img { max-width: 560px !important; width: 100%; }
}
@media (max-width: 1024px) {
  /* All direct button groups, including saved CTA templates and profile links. */
  .elementor .e-con:has(> .elementor-widget-button + .elementor-widget-button),
  .elementor .e-con-inner:has(> .elementor-widget-button + .elementor-widget-button) { display: flex !important; flex-direction: row !important; flex-wrap: wrap !important; justify-content: center !important; gap: 12px !important; }
  .elementor .e-con:has(> .elementor-widget-button + .elementor-widget-button) > .elementor-widget-button,
  .elementor .e-con-inner:has(> .elementor-widget-button + .elementor-widget-button) > .elementor-widget-button { width: auto !important; flex: 0 1 auto !important; max-width: 100% !important; margin: 0 !important; }
  .elementor .elementor-widget-button .elementor-button { min-width: 136px; white-space: nowrap; }
  .elementor .elementor-widget-button .elementor-button-text { white-space: nowrap !important; }
  .elementor .elementor-widget-button .elementor-button-content-wrapper { flex-wrap: nowrap; }
}
@media (min-width: 768px) and (max-width: 1024px) {
  .elementor-927 .elementor-element.elementor-element-7b3968e0 { margin-top: 0 !important; padding: 24px !important; }
  .elementor :is(.e-con,.e-con-inner):has(> .e-con > .elementor-widget-image):has(> .e-con > .elementor-widget-text-editor) { flex-direction: column !important; gap: 28px !important; }
  .elementor :is(.e-con,.e-con-inner):has(> .e-con > .elementor-widget-image):has(> .e-con > .elementor-widget-text-editor) > .e-con { width: 100% !important; max-width: 100% !important; flex: 0 0 auto !important; }
  .elementor :is(.e-con,.e-con-inner):has(> .e-con > .elementor-widget-image):has(> .e-con > .elementor-widget-text-editor) > .e-con > .elementor-widget-image { max-width: 640px; margin-inline: auto; }
}
/* Keep header actions in one horizontal row, including narrow iPhones. */
@media (max-width: 1024px) {
  .elementor-666 .elementor-element.elementor-element-b1561f6 { display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important; gap: 0 !important; }
  .elementor-666 .elementor-element.elementor-element-40e1257 { display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important; justify-content: flex-end !important; align-items: center !important; }
  .elementor-666 .elementor-element.elementor-element-40e1257 > .elementor-widget { width: auto !important; flex: 0 0 auto !important; margin: 0 !important; }
  .elementor-666 .elementor-element.elementor-element-40e1257 .elementor-button { min-width: 0 !important; min-height: 36px !important; width: 28px !important; padding: 8px 4px !important; border-radius: 0 !important; }
  .elementor-666 .elementor-element.elementor-element-40e1257 .elementor-button-text { display: none; }
}
@media (max-width: 767px) {
  .elementor.elementor-location-header { height: 76px !important; min-height: 76px !important; }
  .elementor-666 .elementor-element.elementor-element-e51ffe7 { margin-block: 0 !important; }
  .elementor-666 .elementor-element.elementor-element-3a72479 { flex: 0 0 120px !important; width: 120px !important; }
  .elementor-666 .elementor-element.elementor-element-d8fd50a img { width: 104px !important; }
  .elementor-666 .elementor-element.elementor-element-8a4ce6d { gap: 2px !important; padding-inline: 4px !important; }
  .elementor-666 .elementor-element.elementor-element-40e1257 { gap: 2px !important; }
}
@media (max-width: 1024px) {
  .elementor-666 .elementor-element.elementor-element-40e1257 > .e-con-inner { display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important; align-items: center !important; justify-content: flex-end !important; gap: 2px !important; width: auto !important; }
  .elementor-666 .elementor-element.elementor-element-40e1257 > .e-con-inner > .elementor-widget { width: auto !important; flex: 0 0 auto !important; margin: 0 !important; }
}
/* Unified mobile header: one white surface with a tidy dark control group. */
@media (max-width: 767px) {
  .elementor-666 .elementor-element.elementor-element-e51ffe7 { width: 100% !important; max-width: 100% !important; padding: 8px 12px !important; }
  .elementor-666 .elementor-element.elementor-element-b1561f6 { width: 100% !important; min-height: 60px !important; margin: 0 !important; padding: 6px !important; background: #fff !important; border-radius: 18px !important; box-shadow: 0 2px 12px #00000012; }
  .elementor-666 .elementor-element.elementor-element-3a72479 { flex: 0 0 132px !important; width: 132px !important; background: transparent !important; border-radius: 0 !important; padding: 0 8px 0 2px !important; }
  .elementor-666 .elementor-element.elementor-element-d8fd50a img { width: 122px !important; max-height: 45px !important; }
  .elementor-666 .elementor-element.elementor-element-8a4ce6d { background: #2c2c2c !important; border-radius: 13px !important; min-height: 46px !important; padding: 2px 4px !important; }
  .elementor-666 .elementor-menu-toggle { background: transparent !important; border-radius: 10px !important; }
}
@media (max-width: 1024px) {
  .elementor.elementor-666 .elementor-element.elementor-element-40e1257 { flex-direction: row !important; flex-wrap: nowrap !important; gap: 2px !important; justify-content: flex-end !important; }
  .elementor.elementor-666 .elementor-element.elementor-element-40e1257 > .elementor-widget-button { flex: 0 0 28px !important; width: 28px !important; }
}
@media (max-width: 767px) {
  .elementor.elementor-666 .elementor-element.elementor-element-b1561f6 { display: grid !important; grid-template-columns: 132px minmax(0,1fr); align-items: center; }
  .elementor.elementor-666 .elementor-element.elementor-element-3a72479,
  .elementor.elementor-666 .elementor-element.elementor-element-8a4ce6d { margin: 0 !important; transform: none !important; }
  .elementor.elementor-666 .elementor-element.elementor-element-d8fd50a,
  .elementor.elementor-666 .elementor-element.elementor-element-d8fd50a img { border-radius: 0 !important; background: transparent !important; transform: none !important; }
}
/* Match the tablet pill on phones without a white logo block overlapping it. */
@media (max-width: 767px) {
  .elementor.elementor-666 .elementor-element.elementor-element-b1561f6 { background: #fff !important; border-radius: 999px !important; box-shadow: none !important; padding: 4px !important; overflow: visible; }
  .elementor.elementor-666 .elementor-element.elementor-element-3a72479 { position: relative !important; z-index: 1; overflow: hidden; border-radius: 999px 0 0 999px !important; }
  .elementor.elementor-666 .elementor-element.elementor-element-d8fd50a { --container-widget-width: 100%; overflow: hidden; }
  .elementor.elementor-666 .elementor-element.elementor-element-d8fd50a > .elementor-widget-container { margin: 0 !important; padding: 0 !important; border-radius: 0 !important; background: transparent !important; transform: none !important; }
  .elementor.elementor-666 .elementor-element.elementor-element-d8fd50a a { display: block; margin: 0 !important; padding: 0 !important; border-radius: 0 !important; background: transparent !important; }
  .elementor.elementor-666 .elementor-element.elementor-element-8a4ce6d { position: relative; z-index: 2; border-radius: 999px !important; overflow: visible; }
  .elementor.elementor-666 .elementor-element.elementor-element-8a4ce6d::before,
  .elementor.elementor-666 .elementor-element.elementor-element-3a72479::before { display: none !important; }
}
/* Compact mobile homepage hero: keep the message and action visible together. */
@media (max-width: 767px) {
  .elementor-2 .elementor-element.elementor-element-8c144ae { padding: 0 10px !important; margin-top: 8px !important; }
  .elementor-2 .elementor-element.elementor-element-0a8f20c {
    min-height: clamp(450px, 72svh, 580px) !important;
    background-position: center 78% !important;
    border-radius: 24px !important;
    overflow: hidden;
  }
  .elementor-2 .elementor-element.elementor-element-e72d9a1 { min-height: inherit !important; padding: 0 !important; }
  .elementor-2 .elementor-element.elementor-element-6ec5ec5 {
    min-height: inherit !important;
    padding: 40px 20px 56px !important;
    justify-content: center !important;
    gap: 20px !important;
  }
  .elementor-2 .elementor-element.elementor-element-bb856ed .elementor-heading-title { font-size: 18px !important; line-height: 1.4 !important; }
  .elementor-2 .elementor-element.elementor-element-623fd36 .elementor-heading-title { font-size: clamp(32px, 8.5vw, 38px) !important; line-height: 1.15 !important; }
  .elementor-2 .elementor-element.elementor-element-df3a740 { margin-top: 8px !important; }
  .elementor-2 .elementor-element.elementor-element-df3a740 .elementor-button { padding: 15px 26px !important; min-height: 48px; }
}
@media (max-width: 767px) {
  .elementor-2 .elementor-element.elementor-element-0a8f20c { height: clamp(450px, 68svh, 560px) !important; min-height: 0 !important; }
  .elementor-2 .elementor-element.elementor-element-0a8f20c > .e-con-inner,
  .elementor-2 .elementor-element.elementor-element-e72d9a1,
  .elementor-2 .elementor-element.elementor-element-e72d9a1 > .e-con-inner,
  .elementor-2 .elementor-element.elementor-element-6ec5ec5 { height: 100% !important; min-height: 0 !important; border-radius: 24px !important; }
}
