/* ============================================================
   DENTAIX — Full responsive overrides (loads last)
   ============================================================ */

html, body {
  overflow-x: clip;
  max-width: 100%;
}

body.theme {
  overflow-x: clip;
}

img, video, svg, iframe {
  max-width: 100%;
  height: auto;
}

/* ── Mobile design tokens ───────────────────────────────── */
@media (max-width: 991px) {
  :root {
    --dx-mob-pad: 20px;
    --dx-mob-gap: 20px;
    --dx-mob-section-y: 52px;
  }
}

@media (max-width: 575px) {
  :root {
    --dx-mob-pad: 18px;
    --dx-mob-gap: 16px;
    --dx-mob-section-y: 44px;
  }
}

/* ── Containers & section spacing ───────────────────────── */
@media (max-width: 991px) {
  body.theme .container,
  body.theme .th-container,
  .th-header.header-layout2 .menu-area > .container,
  .th-header.header-layout2 .menu-area > .container-fluid,
  .th-hero-wrapper.hero-2 > .container,
  body.theme .footer-wrapper > .container,
  .footer-wrapper .container,
  .contact-sec > .container.th-container4 {
    padding-left: var(--dx-mob-pad, 20px) !important;
    padding-right: var(--dx-mob-pad, 20px) !important;
    max-width: 100% !important;
  }

  body.theme .space,
  body.theme .space-top,
  body.theme .space-bottom {
    padding-top: var(--dx-mob-section-y, 52px) !important;
    padding-bottom: var(--dx-mob-section-y, 52px) !important;
  }

  body.theme .space-extra,
  body.theme .space-extra-top,
  body.theme .space-extra-bottom {
    padding-top: calc(var(--dx-mob-section-y, 52px) + 8px) !important;
    padding-bottom: calc(var(--dx-mob-section-y, 52px) + 8px) !important;
  }

  /* Kill desktop-only Bootstrap offsets on mobile */
  [class*="pe-xl"],
  [class*="ps-xl"],
  [class*="pe-xxl"],
  [class*="ps-xxl"],
  [class*="me-xl"],
  [class*="ms-xl"],
  [class*="me-xxl"],
  [class*="ms-xxl"] {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .row {
    --bs-gutter-x: 1.25rem;
    --bs-gutter-y: 1.25rem;
  }
}

@media (max-width: 575px) {
  body.theme .space,
  body.theme .space-top,
  body.theme .space-bottom {
    padding-top: var(--dx-mob-section-y, 44px) !important;
    padding-bottom: var(--dx-mob-section-y, 44px) !important;
  }

  body.theme .space-extra,
  body.theme .space-extra-top,
  body.theme .space-extra-bottom {
    padding-top: calc(var(--dx-mob-section-y, 44px) + 4px) !important;
    padding-bottom: calc(var(--dx-mob-section-y, 44px) + 4px) !important;
  }
}

/* ── Global mobile typography & titles ──────────────────── */
@media (max-width: 991px) {
  .title-area,
  .dx-sys-header,
  .dx-rm-header {
    text-align: center !important;
    margin-left: auto;
    margin-right: auto;
    max-width: 36rem;
  }

  .sub-title,
  .dx-sys-badge,
  .dx-rm-badge {
    display: inline-block;
    margin-bottom: 10px;
  }

  .sec-title,
  .hero-title {
    text-align: center !important;
    margin-left: auto;
    margin-right: auto;
  }

  .dx-sys-sub,
  .dx-rm-sub,
  .dx-cc-lead,
  .title-area .fs-18,
  .wow.fs-18,
  .box-text {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    max-width: 34rem;
  }

  /* Buttons — stacked, centered, same width */
  .btn-group {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    width: 100%;
  }

  .btn-group .th-btn,
  .btn-group .th-btn2,
  .btn-group .th-btn2.style2,
  .btn-group .th-btn2.style3 {
    width: 100% !important;
    max-width: 300px !important;
    justify-content: center !important;
    text-align: center;
    margin: 0 auto !important;
  }
}

@media (max-width: 767px) {
  .sec-title {
    font-size: clamp(1.375rem, 5.5vw, 1.875rem) !important;
    line-height: 1.2 !important;
  }
}

/* ── Hero ───────────────────────────────────────────────── */
@media (max-width: 1199px) {
  .hero-style2 {
    text-align: center;
    max-width: 36rem;
    margin: 0 auto;
  }

  .hero-style2 .btn-group,
  .hero-style2 .client-box {
    justify-content: center !important;
  }

  .hero-2 .hero-image2 {
    padding-bottom: 0 !important;
    margin-top: 20px;
  }

  .hero-dashboard-wrap {
    width: min(100%, 440px) !important;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-2 .hero-bottom-text,
  .hero-2 .hero-bottom-text.style2 {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    display: block !important;
    max-width: 280px;
    margin: 12px auto 0 !important;
    padding: 14px 18px !important;
    text-align: left;
  }
}

@media (max-width: 767px) {
  .th-hero-wrapper.hero-2 {
    padding-top: 76px !important;
    padding-bottom: 36px !important;
  }

  .th-hero-wrapper.hero-2 > .container > .row {
    justify-content: center;
  }

  .hero-style2 .hero-title {
    font-size: clamp(1.5rem, 7vw, 2.125rem) !important;
    line-height: 1.15 !important;
    margin-bottom: 1rem !important;
    padding: 0 2px;
  }

  .hero-style2 .hero-text {
    font-size: 0.9375rem !important;
    line-height: 1.65 !important;
    margin-bottom: 1.35rem !important;
    padding: 0 4px;
  }

  .hero-style2 .client-box {
    flex-direction: column !important;
    align-items: center !important;
    gap: 10px !important;
    margin-top: 8px !important;
  }

  .hero-style2 .client-wrapp {
    text-align: center;
  }

  .hero-dashboard {
    padding: 12px !important;
    border-radius: 16px !important;
  }

  .hd-header {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 8px;
  }

  .hd-header-right {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }

  .hd-pills {
    display: none !important;
  }

  .hd-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  .hd-card-value {
    font-size: 22px !important;
  }

  .hd-chart-wrap {
    height: 88px !important;
  }

  .hd-bottom-row {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .hd-footer {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px;
  }

  .hd-toast-stack {
    width: 100%;
  }

  .hd-toast {
    max-width: 100% !important;
  }

  .hero-2 .hero-bottom-text,
  .hero-2 .hero-bottom-text.style2 {
    display: none !important;
  }
}

@media (max-width: 400px) {
  .hd-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ── About ──────────────────────────────────────────────── */
@media (max-width: 991px) {
  #about-sec .title-area {
    padding: 0 !important;
    margin-bottom: 1.5rem !important;
  }

  #about-sec .img-box1 {
    max-width: 340px;
    margin: 0 auto 8px;
  }

  #about-sec .img-box1 .img1 {
    border-radius: 16px;
    overflow: hidden;
  }

  #about-sec .about-checklist ul {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    text-align: left;
    max-width: 300px;
    margin: 0 auto !important;
    padding: 0 !important;
  }

  #about-sec .checklist.list-two-column ul {
    columns: 1 !important;
  }

  #about-sec .btn-group.mt-45 {
    margin-top: 28px !important;
  }
}

/* ── Command center ─────────────────────────────────────── */
@media (max-width: 991px) {
  .dx-command-section .dx-cc-copy {
    text-align: center;
    margin-bottom: 28px;
  }

  .dx-command-section .dx-cc-bullets {
    text-align: left;
    display: inline-block;
    margin: 0 auto 20px;
    padding-left: 0;
    list-style: none;
  }

  .dx-command-section .dx-cc-bullets li {
    margin-bottom: 8px;
  }

  .dx-cc-wrap {
    max-width: 100%;
    margin: 0 auto;
  }

  .dx-cc-dashboard {
    border-radius: 16px !important;
  }
}

@media (max-width: 575px) {
  .dx-cc-kpis {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .dx-cc-main {
    grid-template-columns: 1fr !important;
  }

  .dx-cc-bottom {
    grid-template-columns: 1fr !important;
  }

  .dx-cc-kpi-value {
    font-size: 1.25rem !important;
  }
}

/* ── Services grid ──────────────────────────────────────── */
@media (max-width: 991px) {
  .dx-sys-section .dx-sys-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    max-width: 400px;
    margin: 0 auto;
  }

  .dx-sys-card {
    text-align: center;
    padding: 20px 18px !important;
  }

  .dx-sys-icon {
    margin: 0 auto 12px !important;
  }
}

/* ── Features ───────────────────────────────────────────── */
@media (max-width: 991px) {
  #features-sec .row.gy-4 {
    max-width: 420px;
    margin: 0 auto;
  }

  #features-sec .feature-box {
    text-align: center;
    margin: 0 auto;
    padding: 20px 16px !important;
  }

  #features-sec .feature-box .box-img {
    margin-top: 16px;
  }

  #features-sec .feature-box .box-img img {
    border-radius: 12px;
    width: 100%;
    height: 200px !important;
    object-fit: cover;
  }
}

/* ── Brand carousel ─────────────────────────────────────── */
@media (max-width: 575px) {
  .dx-brand-section .brand-item {
    min-height: 56px;
    padding: 8px 10px !important;
  }

  .dx-brand-section .brand-item img {
    max-width: 100px !important;
    height: 28px !important;
    max-height: 28px !important;
  }

  .dx-brand-slider-wrap {
    padding-bottom: 12px !important;
  }
}

/* ── Case studies ───────────────────────────────────────── */
#case-studies-sec .service-box {
  margin-top: 0 !important;
}

@media (max-width: 991px) {
  #case-studies-sec .row.justify-content-lg-between {
    text-align: center;
  }

  #case-studies-sec .col-auto {
    width: 100%;
    text-align: center;
  }

  #case-studies-sec .col-auto .btn-group {
    justify-content: center !important;
    margin-bottom: 24px !important;
  }

  #case-studies-sec .service-box {
    text-align: center;
    max-width: 400px;
    margin: 0 auto !important;
  }

  #case-studies-sec .service-box .box-content {
    padding-right: 0 !important;
  }

  #case-studies-sec .service-box .icon-btn {
    position: static !important;
    margin: 12px auto 0;
    display: inline-flex;
  }

  #case-studies-sec .slider-area {
    padding: 0 4px;
  }
}

@media (max-width: 767px) {
  #case-studies-sec .service-box .box-img img {
    height: 180px !important;
    max-height: 180px !important;
    object-fit: cover;
    border-radius: 12px;
  }
}

/* ── Roadmap ──────────────────────────────────────────────── */
@media (max-width: 991px) {
  .dx-rm-steps {
    padding-left: 0 !important;
  }

  .dx-rm-card {
    text-align: left;
  }

  .dx-rm-header {
    padding: 0 4px;
  }
}

/* ── CTA robot (legacy row — panel uses dx-cta-grid) ───── */
@media (max-width: 991px) {
  .dx-cta-panel .dx-cta-content .btn-group {
    flex-direction: row !important;
  }
}

/* ── Testimonials ───────────────────────────────────────── */
@media (max-width: 991px) {
  #testi-sec .title-area {
    margin-bottom: 24px !important;
  }

  #testi-sec .testi-box {
    text-align: center;
    max-width: 400px;
    margin: 0 auto;
  }

  #testi-sec .slider-wrap {
    padding: 0 4px;
  }
}

/* ── Integration ────────────────────────────────────────── */
@media (max-width: 991px) {
  .integration-area {
    text-align: center;
    overflow: hidden;
    padding: 0 8px;
  }

  .integration-area .integration-wrapp {
    transform: scale(0.85);
    margin: 0 auto;
  }

  .integration-area .box-wrapp {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 12px !important;
    margin-top: 24px !important;
    position: relative !important;
    height: auto !important;
    width: 100% !important;
  }

  .integration-area .integration-icon {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    margin: 0 !important;
    min-width: 56px !important;
    width: 56px !important;
    height: 56px !important;
    line-height: 56px !important;
    flex-shrink: 0;
  }

  .integration-area .integration-icon:nth-child(n) {
    margin: 0 !important;
  }

  .integration-area .integration-icon img {
    max-width: 28px;
    max-height: 28px;
  }

  .integration-area .btn-group.mt-80 {
    margin-top: 32px !important;
  }
}

/* ── FAQ ────────────────────────────────────────────────── */
@media (max-width: 991px) {
  #faq-sec .faq-card {
    text-align: left;
    max-width: 100%;
    margin: 0 auto;
    padding: 20px 18px !important;
  }

  #faq-sec .row.gy-4 {
    max-width: 480px;
    margin: 0 auto;
  }
}

/* ── Blog ───────────────────────────────────────────────── */
@media (max-width: 991px) {
  #blog-sec .blog-card {
    max-width: 400px;
    margin: 0 auto;
  }

  #blog-sec .slider-area {
    padding: 0 4px;
  }
}

/* ── Contact ────────────────────────────────────────────── */
@media (max-width: 1199px) {
  .contact-sec .row.gx-80 {
    --bs-gutter-x: 1.5rem;
  }
}

@media (max-width: 991px) {
  .contact-sec {
    margin: 0 14px 20px !important;
    border-radius: 28px 28px 20px 20px !important;
  }

  .contact-sec .contact-area {
    padding: 28px 20px !important;
    border-radius: 20px !important;
  }

  .contact-sec .contact-review {
    margin-top: 16px;
    padding: 24px 20px !important;
    text-align: center;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }

  .contact-sec .contact-form .form-btn {
    flex-direction: column;
    align-items: stretch !important;
    gap: 12px;
  }

  .contact-sec .contact-form .form-btn .th-btn {
    width: 100%;
    justify-content: center;
  }

  .contact-sec .contact-form .title {
    text-align: center;
  }
}

@media (max-width: 575px) {
  .contact-sec {
    margin: 0 10px 18px !important;
  }

  .contact-sec .contact-area {
    padding: 22px 16px !important;
  }

  .contact-sec .contact-form .title {
    font-size: 1.375rem !important;
  }
}

/* Contact page */
@media (max-width: 991px) {
  .breadcumb-wrapper {
    padding-top: 110px !important;
    padding-bottom: 40px !important;
    text-align: center;
  }

  .breadcumb-content {
    text-align: center;
  }
}

@media (max-width: 575px) {
  .breadcumb-wrapper {
    padding-top: 96px !important;
    padding-bottom: 32px !important;
  }

  .contact-media {
    padding: 22px 16px !important;
    text-align: center;
  }

  .contact-media .media-body {
    text-align: center;
  }

  .contact-media:not(:last-child) {
    margin-bottom: 0 !important;
  }
}

/* ── Footer ─────────────────────────────────────────────── */
@media (max-width: 991px) {
  .footer-wrapper .footer-top .row {
    text-align: center;
    justify-content: center !important;
  }

  .footer-wrapper .footer-top .ps-xl-5 {
    padding: 0 !important;
    text-align: center;
  }

  .footer-wrapper .footer-top .btn-group {
    justify-content: center !important;
  }

  .footer-wrapper .footer-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
  }
}

@media (max-width: 767px) {
  .footer-wrapper .row.gy-40 {
    text-align: center;
  }

  .footer-wrapper .footer-widget {
    margin-bottom: 12px;
  }

  .footer-wrapper .widget_nav_menu .menu {
    display: inline-block;
    text-align: left;
  }

  .footer-wrapper .th-social {
    justify-content: center !important;
  }

  .footer-wrapper .copyright-wrap {
    text-align: center;
  }
}

/* ── Swiper / sliders ───────────────────────────────────── */
@media (max-width: 767px) {
  .slider-area,
  .swiper.th-slider {
    overflow: hidden;
  }

  .icon-box.mt-60 {
    margin-top: 28px !important;
    display: flex;
    justify-content: center;
    gap: 12px;
  }
}

/* ── Hero overflow ──────────────────────────────────────── */
.th-hero-wrapper.hero-2 {
  overflow: visible !important;
}

/* ── Tables / wide content safety ───────────────────────── */
.table-responsive,
.wow,
.title-area {
  max-width: 100%;
}

/* ── Shape mockups off on mobile ────────────────────────── */
@media (max-width: 991px) {
  .shape-mockup {
    display: none !important;
  }
}
