/* Final homepage-only recovery pass. Loaded last by index.html. */
html,
body {
  max-width: 100%;
  overflow-x: clip;
}

.mobile-lang,
.mobile-schedule,
.carousel-dots {
  display: none;
}

.cd-lang {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cd-lang button,
.mobile-lang button {
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.cd-hero-video {
  background: #073f75 url("media/dentist-patient-new.jpg") center / cover no-repeat;
}

.cd-hero-video video {
  display: block;
  width: 100%;
}

.cd-hero-video video.show-fallback {
  opacity: 0;
}

.cd-award-inner {
  justify-content: center;
  text-align: center;
}

.award-badge-img {
  max-width: min(330px, 30vw);
}

.cd-service-row,
.cd-review-row {
  touch-action: pan-y;
  transition: transform 0.38s ease;
  will-change: transform;
}

.cd-service-row a {
  flex: 0 0 calc((100% - 48px) / 4);
}

.service-line img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.slider-arrow:disabled,
.review-arrow:disabled {
  opacity: 0.28;
  cursor: default;
}

.all-services-btn {
  display: inline-grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-width: 270px;
  gap: 16px;
}

.all-services-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
}

.button-arrow {
  font-size: 24px;
}

.review-viewport {
  overflow: hidden;
}

.cd-review-row {
  display: flex !important;
  grid-template-columns: none !important;
  gap: 24px;
}

.review-bubble {
  flex: 0 0 calc((100% - 48px) / 3);
}

@media (max-width: 1100px) {
  .cd-service-row a,
  .review-bubble {
    flex-basis: calc((100% - 16px) / 2);
  }

  .cd-review-row {
    gap: 16px;
  }
}

@media (max-width: 640px) {
  body {
    display: flex;
    flex-direction: column;
  }

  .cd-header {
    order: 1;
    position: relative;
    z-index: 30;
  }

  .cd-topbar {
    order: 2;
  }

  main {
    order: 3;
  }

  .cd-footer {
    order: 4;
  }

  .cd-header-inner {
    display: grid !important;
    grid-template-columns: 42px minmax(92px, 1fr) auto auto;
    grid-template-areas: "menu logo lang schedule";
    gap: 8px;
    min-height: 68px;
    padding: 8px 14px;
    align-items: center;
  }

  .menu-toggle {
    grid-area: menu;
    display: flex !important;
    width: 40px;
    height: 40px;
    padding: 9px 7px;
    border: 0;
    border-radius: 0;
    flex-direction: column;
    justify-content: space-around;
    background: transparent;
  }

  .menu-toggle span {
    display: block;
    width: 26px;
    height: 2px;
    background: #064a82;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .menu-toggle::before {
    content: none !important;
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .cd-logo {
    grid-area: logo;
    min-width: 0;
  }

  .cd-logo-main {
    font-size: clamp(17px, 5.2vw, 23px) !important;
    white-space: nowrap;
  }

  .cd-logo small {
    font-size: 8px !important;
    letter-spacing: 0.12em;
  }

  .mobile-lang {
    grid-area: lang;
    display: flex;
    align-items: center;
    gap: 3px;
    color: #064a82;
    font-size: 11px;
    font-weight: 800;
  }

  .mobile-schedule {
    grid-area: schedule;
    display: flex;
    min-height: 38px;
    padding: 7px 9px;
    border-radius: 3px;
    align-items: center;
    gap: 5px;
    background: #f99a1c;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
  }

  .mobile-schedule .schedule-icon {
    width: 18px;
    height: 18px;
  }

  .mobile-schedule svg {
    width: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
  }

  .cd-main-nav {
    grid-area: nav;
  }

  .cd-topbar-inner {
    min-height: 45px;
    padding: 6px 16px;
  }

  .cd-topbar .cd-lang,
  .cd-topbar .cd-schedule {
    display: none !important;
  }

  .cd-location-pill {
    width: 100%;
    justify-content: center;
    font-size: 11px;
    line-height: 1.25;
    text-align: left;
  }

  .cd-hero-video {
    min-height: clamp(215px, 60vw, 290px);
  }

  .cd-hero-video video {
    width: 100%;
    height: clamp(215px, 60vw, 290px) !important;
    object-fit: cover !important;
    object-position: center;
  }

  .cd-intro {
    padding-left: 20px;
    padding-right: 20px;
  }

  .cd-award {
    padding: 46px 20px !important;
  }

  .cd-award-inner {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .award-badge-img {
    width: min(220px, 68vw) !important;
    max-width: none;
    margin: 0 auto;
  }

  .cd-award h2 {
    margin: 0 auto;
    max-width: 330px;
    font-size: clamp(25px, 7vw, 31px) !important;
    line-height: 1.22 !important;
    letter-spacing: 0.025em !important;
  }

  .cd-services-strip {
    padding-left: 0;
    padding-right: 0;
  }

  .cd-services-strip .section-head {
    padding: 0 20px;
  }

  .cd-carousel-shell {
    padding: 0 42px !important;
  }

  .cd-service-viewport {
    width: 100%;
  }

  .cd-service-row {
    gap: 0 !important;
  }

  .cd-service-row a {
    flex: 0 0 100% !important;
    min-height: 390px !important;
    padding: 38px 26px 30px !important;
  }

  .service-line {
    width: 130px !important;
    height: 130px !important;
  }

  .slider-arrow {
    display: none !important;
    width: 30px !important;
    height: 30px !important;
    border-left-width: 5px !important;
    border-bottom-width: 5px !important;
  }

  .slider-arrow.left {
    left: 8px !important;
  }

  .slider-arrow.right {
    right: 8px !important;
  }

  .carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 22px auto 26px;
    padding: 0 20px;
  }

  .carousel-dots button {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 1px solid #0b568f;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
  }

  .carousel-dots button.is-active {
    background: #0b568f;
    transform: scale(1.25);
  }

  .all-services-btn {
    width: calc(100% - 40px);
    max-width: 340px;
  }

  .cd-content-block {
    display: flex !important;
    flex-direction: column;
  }

  .story-block img {
    order: 1;
  }

  .story-block .cd-copy {
    order: 2;
  }

  .tech-block img { order: 1; object-fit: cover; object-position: center 35%; }
  .tech-block .cd-copy { order: 2; }

  .home-treatment-photo img { width: 100%; height: auto; max-height: 520px; object-fit: cover; object-position: center; display: block; }

  .treatments-block img {
    display: none;
  }

  .treatments-block .cd-copy {
    width: 100%;
  }

  .cd-reviews .wrap {
    padding-left: 42px;
    padding-right: 42px;
  }

  .cd-review-row {
    gap: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .review-bubble {
    flex: 0 0 100% !important;
    min-width: 0;
  }

  .review-arrow {
    display: none !important;
    top: 48% !important;
    width: 27px !important;
    height: 27px !important;
    border-left-width: 5px !important;
    border-bottom-width: 5px !important;
  }

  .review-left {
    left: 8px !important;
  }

  .review-right {
    right: 8px !important;
  }

  .review-dots button {
    border-color: #fff;
  }

  .review-dots button.is-active {
    background: #fff;
  }

  .cd-promo-split {
    display: flex !important;
    flex-direction: column;
  }

  .cd-promo-split > div {
    order: 1;
  }

  .cd-promo-split > img {
    order: 2;
  }

  .cd-braces-insurance {
    display: flex !important;
    flex-direction: column;
  }

  .insurance-copy {
    order: 1;
  }

  .love-smile {
    order: 2;
  }

  .cd-social {
    padding-top: 30px;
    padding-bottom: 24px;
  }

  .cd-footer-grid {
    display: block !important;
    padding: 0 20px 28px;
  }

  .cd-footer-grid > div {
    border-top: 1px solid rgba(255, 255, 255, 0.35);
  }

  .cd-footer-grid > div:last-child {
    border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  }

  .cd-footer-grid h3 {
    position: relative;
    margin: 0 !important;
    padding: 17px 34px 17px 0;
    cursor: pointer;
  }

  .cd-footer-grid h3::after {
    content: "+";
    position: absolute;
    top: 50%;
    right: 4px;
    transform: translateY(-50%);
    font-size: 25px;
    font-weight: 400;
  }

  .cd-footer-grid > div.is-open h3::after {
    content: "-";
  }

  .cd-footer-grid > div > :not(h3) {
    display: none !important;
  }

  .cd-footer-grid > div.is-open > :not(h3) {
    display: block !important;
  }

  .cd-footer-grid > div.is-open > a {
    margin-bottom: 11px;
  }

  .cd-footer-grid .provider-badge {
    padding-bottom: 18px;
  }
}

.home-treatment-photo { width: 100%; overflow: hidden; background: #fff; }
.home-treatment-photo img { display: block; width: 100%; height: clamp(320px, 48vw, 660px); object-fit: cover; object-position: center 35%; }
