/* ==========================================================================
   LuxMed - responsive.css
   Loads AFTER style.css (handle: luxmed-responsive).
   Desktop-first (max-width), same direction as style.css.
   Breakpoints (Bootstrap 5): 1399.98 / 1199.98 / 991.98 / 767.98 / 575.98
   ========================================================================== */


/* ==========================================================================
   0. GLOBAL SAFETY
   ========================================================================== */

/* AOS fade-left / fade-right slide elements in from the side and cause a
   horizontal scrollbar on phones. "clip" avoids that without breaking
   position: sticky (unlike overflow-x: hidden). */
html,
body {
  max-width: 100%;
  overflow-x: clip;
}


/* ==========================================================================
   1. <= 1399.98px  (large laptops)
   ========================================================================== */
@media (max-width: 1399.98px) {
  .banner-heading { font-size: 54px; }

  .inner-sec-box { padding: 5rem 8rem; }
  .inner-sec-box.space-most { padding: 5rem 7rem; }
}


/* ==========================================================================
   2. <= 1199.98px  (small laptops / landscape tablets)
   ========================================================================== */
@media (max-width: 1199.98px) {

  /* ----- header ----- */
  a.navbar-brand img { width: 130px; }
  .navbar-ul { gap: 4px; }
  .navbar-nav .nav-link { padding-left: .5rem; padding-right: .5rem; font-size: 15px; }
  .navbar .btn.web-btn { padding: 10px 16px; font-size: 15px; }

  /* ----- home banner ----- */
  .home-banner {
    height: auto;
    min-height: 760px;
    padding: 100px 0;
  }
  .banner-heading { font-size: 48px; }

  figure.banner-right-img { max-width: 42%; }
  figure.banner-right-img img {
    max-height: 100%;
    width: auto;
    object-fit: contain;
    object-position: right bottom;
  }

  /* ----- shared ----- */
  .inner-sec-box { padding: 4rem 4rem; }
  .inner-sec-box.space-most { padding: 4rem 4rem; }
  .inner-sec-box h2 { font-size: 42px; }
  .content-box h2 { font-size: 44px; }
  .approach-content h3 { font-size: 42px; }
  .fact-item { padding: 0 3rem; }
  .stats { gap: 60px; }
  h4.stat-header { font-size: 72px; }
  .footer-heading { font-size: 32px; }
}


/* ==========================================================================
   3. <= 991.98px  (tablets and below - navbar collapses here)
   ========================================================================== */
@media (max-width: 991.98px) {

  /* ----- header / navbar ----- */
  .navbar > .container { row-gap: .75rem; }
  .navbar-brand { order: 1; margin-right: auto; }
  .navbar > .container > .btn.web-btn { order: 2; margin-right: .75rem; }
  .navbar-toggler { order: 3; }
  .navbar-collapse { order: 4; padding-bottom: 1rem; }

  .navbar-ul { gap: 0; }
  .navbar-nav .nav-link { padding: .3rem 0; font-size: 16px; }

  /* The "Buy a Practice" dropdown has no data-bs-toggle, so on touch screens
     it can never open. Keep its links visible inside the mobile menu. */
  .navbar .dropdown-menu {
    display: block;
    position: static;
    float: none;
    margin: 0;
    padding: 0 0 0 1rem;
    border: 0;
    background: transparent;
  }
  .navbar .dropdown-toggle::after { display: none; }

  /* ----- type scale ----- */
  .banner-heading { font-size: 40px; }
  h2.banner-small { font-size: 40px; }
  h3.outcome-title { font-size: 36px; }
  h2.hidden-cost { font-size: 40px; }
  .practice-trans h2 { font-size: 36px; }
  .julia-problem h2 { font-size: 40px; }
  .julia-match-heading { font-size: 36px; }
  .content-box h2 { font-size: 40px; }
  .approach-content h3 { font-size: 36px; }
  .inner-sec-box h2 { font-size: 38px; }
  section.buyer-signup-section h2 { font-size: 36px; }
  h3.current-header { font-size: 40px; }
  h3.fin-head { font-size: 40px; }
  p.fact-header { font-size: 40px; }
  h4.stat-header { font-size: 64px; }
  .steps h4 { font-size: 40px; }
  .success-stories h2 { font-size: 32px; }
  .why-luxmed-heading { font-size: 30px; }
  .resource-section .banner-heading { font-size: 34px; }

  .sec-py { padding: 4rem 0; }

  /* ----- home banner ----- */
  .home-banner {
    min-height: 0;
    padding: 90px 0;
    background-size: cover;
    background-position: center;
  }
  .home-banner .col-6 { flex: 0 0 auto; width: 100%; }
  figure.banner-right-img { display: none; }

  /* ----- process timeline: stacked, single column with a vertical line ----- */
  .process-timeline {
    margin-top: 40px;
    position: relative;
  }
  .process-timeline .pt-row,
  .process-timeline .pt-row.pt-row-rtl.pt-row-middle,
  .process-timeline .pt-row.pt-row-ltr.pt-row-last {
    flex-direction: column;
    height: auto;
    margin-top: 0;
    padding-top: 0;
    gap: 0;
  }
  .process-timeline .pt-row:not(:first-child) { padding-top: 0; }

  .process-timeline .pt-row::before,
  .process-timeline .pt-row::after,
  .process-timeline .middle-line,
  .process-timeline .lower-line { display: none; }

  .process-timeline .pt-item {
    padding: 0 0 0 5rem;
    text-align: left;
    min-height: 60px;
  }
  .process-timeline .pt-node {
    top: 0;
    left: 0;
    transform: none;
    width: 60px;
    height: 60px;
    font-size: 20px;
    border-width: 3px;
  }
  .process-timeline .pt-title {
    margin: 14px 0 .5rem;
    font-size: 22px;
  }
  .process-timeline .pt-desc {
    margin: 0 0 30px;
    max-width: none;
    font-size: 15px;
  }
  /* vertical connector from each node down to the next one */
  .process-timeline .pt-item::before {
    content: "";
    position: absolute;
    left: 27px;
    top: 60px;
    bottom: 0;
    width: 6px;
    background: linear-gradient(to bottom, #2b1d45, #81739b);
    z-index: 1;
  }
  .process-timeline .pt-row-last .pt-item:last-child::before { display: none; }

  /* ----- practices map ----- */
  .filter-bar {
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.25rem;
  }
  .filter-field { flex: 1 1 calc(50% - 1rem); }
  .practice-index > p.w-75 { width: 100% !important; }

  /* ----- "What Makes LuxMed Different" (5 boxes) ----- */
  section.understand-options { padding: 4rem 0; }
  .understand-options .row { justify-content: center; }
  .understand-options .row > .col {
    flex: 0 0 auto;
    width: 50%;
  }
  .seller-box { margin-top: 1rem; margin-bottom: 1rem; }

  /* ----- cards ----- */
  .julia-diff-card { padding: 1.5rem; }
  .pts-diff-card { height: auto; min-height: 220px; }
  h4.box-heading { height: auto; }
  p.box-para { height: auto; }
  .box-est { height: auto; min-height: 150px; padding: 1.25rem 1rem; }
  .outcome-box img { height: 420px; object-fit: cover; }
  .team-avatar { height: 340px; }
  .julia-match-card { flex-direction: column; align-items: flex-start; }

  /* ----- two-column sections ----- */
  .two-sections { flex-direction: column; align-items: stretch; }
  section.two-sections .box-item,
  .two-sec-full-width .box-item,
  section.two-sections.inner-two-sections .box-item {
    flex: 0 0 auto !important;
    width: 100%;
  }
  .inner-sec-box,
  .inner-sec-box.space-most { padding: 3.5rem 2rem; }
  .content-box { padding: 3rem 1.5rem; }

  /* ----- facts / stats ----- */
  .facts-boxes { flex-direction: column; margin: 2rem 0; }
  .fact-item { padding: 1.5rem 1rem; width: 100%; }
  .fact-item.fact-between {
    border-left: 0;
    border-right: 0;
    border-top: 1px solid rgba(255, 255, 255, .5);
    border-bottom: 1px solid rgba(255, 255, 255, .5);
  }
  .stats { flex-wrap: wrap; gap: 30px; }
  .stat-item { padding: 30px 0; }
  .revenue-boxes { flex-direction: column; gap: 1.5rem; }
  .revenue-boxes .rev:not(:last-child)::after { display: none; }
  .grey-box-logo { flex-wrap: wrap; gap: 24px; }

  /* ----- steps / grids ----- */
  .process-grid { grid-template-columns: 1fr; }
  .steps { border-right: 0; border-bottom: 1px solid rgb(211 216 222 / 20%); }

  /* ----- calculators ----- */
  .optimize-calc { padding: 20px; }
  .calc-row-2col { flex-direction: column; gap: .75rem; }
  .calc-cards-wrapper { flex-direction: column; gap: 1rem; }
  .calc-card.without-card {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .2);
    padding: 0 0 20px;
  }
  .calc-card.with-card { padding: 20px 0 0; }
  h3#fvResultValue { font-size: 44px; }

  /* ----- forms ----- */
  .buyer-form-row { flex-direction: column; gap: 1rem; }
  .profile-type-row { flex-direction: column; }
  .buyer-form-card form { padding: 1.5rem; }

  /* ----- tables ----- */
  .adv-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .compare-table { min-width: 720px; }

  /* ----- reviews slider ----- */
  .review-slider { padding: 20px 50px; margin: 0; }
  .review-slider .slick-arrow { width: 40px; height: 40px; }
  .review-slider .slick-prev { left: 0; }
  .review-slider .slick-next { right: 0; }
  h6.reviewer-name { font-size: 24px; }

  /* ----- resources / listings ----- */
  .resource-img { height: 240px; }
  .resource-tabs { gap: 10px; }
  .listing-prac { margin-top: 1.5rem; }

  /* ----- footer ----- */
  footer { padding-top: 3.5rem; }
  .footer-heading { font-size: 28px; }
}


/* ==========================================================================
   4. <= 768px  (map block - same breakpoint as style.css uses)
   ========================================================================== */
@media (max-width: 768px) {
  .map-embed { height: 350px; }
  #practicesLeafletMap { height: 100%; min-height: 350px; }
  .listings-panel { max-height: 320px; }
}


/* ==========================================================================
   5. <= 767.98px  (phones / portrait tablets)
   ========================================================================== */
@media (max-width: 767.98px) {

  /* ----- type scale ----- */
  .banner-heading { font-size: 34px; margin-bottom: 1rem; }
  h2.banner-small,
  h2.hidden-cost,
  .julia-problem h2 { font-size: 32px; }
  h3.outcome-title,
  .practice-trans h2,
  .julia-match-heading,
  .approach-content h3,
  .content-box h2,
  .inner-sec-box h2,
  section.buyer-signup-section h2 { font-size: 30px; }
  h3.current-header,
  h3.fin-head,
  p.fact-header { font-size: 34px; }
  h4.stat-header { font-size: 52px; }
  p.stat { font-size: 20px; }
  p.numbers { font-size: 34px; }
  .green-box-numbers { font-size: 36px; }
  .footer-heading { font-size: 26px; }
  .footer-links-title { font-size: 20px; margin-bottom: 1rem; }

  .sec-py { padding: 3rem 0; }

  /* ----- header ----- */
  a.navbar-brand img { width: 120px; }

  /* ----- home banner ----- */
  .home-banner { padding: 80px 0; }
  .banner-btns { flex-wrap: wrap; gap: 12px; }

  /* ----- marquee ----- */
  .marquee-item { font-size: 12px; padding: 0 1rem; gap: 10px; }

  /* ----- about section: image stops stretching to column height ----- */
  .understand-options figure.h-100 { height: auto !important; }
  .understand-options figure img {
    height: auto !important;
    max-height: 420px;
    object-fit: cover;
  }

  /* ----- practices map filters ----- */
  .filter-field { flex: 1 1 100%; }

  /* ----- "What Makes LuxMed Different" ----- */
  .understand-options .row > .col { width: 100%; }
  .seller-box h3 br { display: none; }

  /* ----- ready to explore ----- */
  .ready-to-explore .btn { display: block; margin: 0 auto 12px; max-width: 320px; }
  .ready-to-explore .btn.ms-2 { margin-left: auto !important; }

  /* ----- footer ----- */
  .footer-desc br { display: none; }
  .footer-form { max-width: 100%; }
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  .social-links { justify-content: center; flex-wrap: wrap; }
  .anchors-footer a { margin: 0 10px; }

  /* ----- other pages ----- */
  .why-cell { padding: 1rem; }
  .signup-reason { flex-direction: column; gap: .8rem; }
  .julia-match-heading { font-size: 28px; }
  .listing-stats li { flex-direction: column; align-items: flex-start; gap: .25rem; }
  .listing-stats-value { text-align: left; }
  .sell-fit-list { margin-top: 50px; }
  .success-stories .row { margin-bottom: 3rem; }
  .info-box-contact { padding: 2rem 1.25rem; }
  .card-inner-item { flex: 0 0 100%; margin-bottom: 8px; }
  .team-av { bottom: 50px; }
  .resource-search { margin-top: 1rem; }
  .resource-tabs .nav-link { padding: 8px 16px; font-size: 14px; }
  .faq-question h4 { font-size: 17px; }
  .faq-answer p { font-size: 14px; }
}


/* ==========================================================================
   6. <= 575.98px  (small phones)
   ========================================================================== */
@media (max-width: 575.98px) {
  .banner-heading { font-size: 30px; }

  .navbar .btn.web-btn { padding: 8px 12px; font-size: 13px; }

  .home-banner { padding: 70px 0; }
  .banner-btns .btn { flex: 1 1 100%; text-align: center; }

  .btn.web-btn { padding: 11px 16px; }

  .bg-insight-purple { padding: 1.5rem 1rem; }

  .map-wrapper { box-shadow: 0 4px 20px rgba(0, 0, 0, .15); }
  .listing-card { padding: .8rem 1rem; }

  .julia-diff-card,
  .pts-diff-card { padding: 1.25rem 1rem; }
  .pts-diff-card { min-height: 0; }

  .inner-sec-box,
  .inner-sec-box.space-most { padding: 3rem 1.25rem; }
  .content-box { padding: 2.5rem 1.25rem; }

  .review-slider { padding: 20px 0; }
  .review-slider .slick-slide { padding: 1rem .5rem; }
  .review-slider .slick-arrow { width: 34px; height: 34px; }
  .review-slider .slick-prev { left: 2px; }
  .review-slider .slick-next { right: 2px; }

  .outcome-box img { height: 300px; }
  .team-avatar { height: 300px; }
  .resource-img { height: 210px; }

  h4.stat-header { font-size: 44px; }
  h3#fvResultValue { font-size: 36px; }

  .process-timeline .pt-item { padding-left: 4.5rem; }
  .process-timeline .pt-node { width: 52px; height: 52px; font-size: 18px; }
  .process-timeline .pt-item::before { left: 23px; top: 52px; }

  footer { padding-top: 3rem; }
}


/* ==========================================================
   7. INNER PAGES (Sell, Practices for Sale, Buyer Profile,
      Our Approach, Julia.ai, Contact)
   ========================================================== */

/* ---------- <= 1199.98 ---------- */
@media (max-width: 1199.98px) {
  .team-avatar { height: 340px; }
  .why-cell { padding: 1.1rem 1rem; }
  .why-head { font-size: 16px; }
  .sell-fit-list { max-width: 100%; }
}

/* ---------- <= 991.98 ---------- */
@media (max-width: 991.98px) {
  /* inner banner */
  .inner-banner .col-8,
  .inner-banner .col-9 { width: 100%; }

  /* sell page: comparison table scrolls sideways instead of collapsing */
  .why-table {
    grid-template-columns: 150px 200px repeat(3, 220px);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
  }
  .why-cell.why-merged { grid-column: span 3; }
  .why-cell.why-merged-two { grid-column: span 2; }

  /* practices for sale */
  .listing-prac { margin-top: 1.25rem; }
  h6.list-card-head { font-size: 22px; }

  /* buyer profile */
  .buyer-signup-section .col-lg-6:first-child { margin-bottom: 2rem; }
  .buyer-form-card form { padding: 1.5rem; }
  section.buyer-signup-section h2 { font-size: 34px; }

  /* our approach: team grid 4 -> 2 columns */
  .our-team .row-cols-md-4 > * { width: 50%; }

  /* julia.ai */
  .julia-built-for .row { row-gap: 1.5rem; }
  .julia-built-for figure { text-align: center; }
  .julia-built-for figure img { max-width: 80%; height: auto; }
  .ready-to-explore p.w-75 { width: 100% !important; }

  /* contact: form then info box */
  .practice .col-md-8,
  .practice .col-md-4 { width: 100%; }
  .info-box-contact { margin-top: 1.5rem; }
}

/* ---------- <= 767.98 ---------- */
@media (max-width: 767.98px) {
  /* sell page */
  .why-table { grid-template-columns: 130px 190px repeat(3, 200px); }
  .why-cell { padding: .9rem; }
  .why-cell p { font-size: 14px; }
  .why-cell.col-feature h4 { font-size: 16px; }
  .revenue-boxes { align-items: center; }
  h3.rev-header { font-size: 26px; }
  .market-protect-item { gap: 1rem; padding: 1.25rem 0; }
  .market-protect-icon { width: 46px; height: 46px; font-size: 17px; }
  .market-protect-content h4 { font-size: 18px; }
  .julia-diff-card { padding: 1.5rem 1.25rem; }

  /* practices for sale */
  .list-card-prac { padding: 8px; }
  .list-content-pac { padding-left: 8px; padding-right: 8px; }
  h6.list-card-head { font-size: 20px; }
  .card-inner-item p { font-size: 16px !important; }

  /* buyer profile */
  .signup-reason { padding: 1.1rem; gap: .9rem; }
  .buyer-test-item { padding: 1.5rem 1.25rem; }
  .buyer-form-card form { padding: 1.25rem 1rem; }
  .buyer-form-row { flex-direction: column; gap: 1.1rem; }
  .buyer-form-field { width: 100%; }
  .select2-container { width: 100% !important; }

  /* our approach */
  .team-avatar { height: 300px; }
  .team-modal .modal-dialog { margin: .75rem; }
  .julia-flex { flex-wrap: wrap; justify-content: center; text-align: center; }
  .julia-flex img { max-width: 140px; height: auto; }

  /* julia.ai */
  .sell-fit-list-content h4 { font-size: 20px; }
  .julia-diff-inner h2.banner-heading img { max-height: 34px; width: auto; }
  .julia-buy-highlight,
  .julia-buy-feature { padding: 1.5rem 1.25rem; }

  /* contact */
  .practice-trans h2 { font-size: 30px; }
  .info-box-contact li { word-break: break-word; }
}

/* ---------- <= 575.98 ---------- */
@media (max-width: 575.98px) {
  /* team grid -> 1 column */
  .our-team .row-cols-md-4 > * { width: 100%; }
  .team-avatar { height: 340px; }
  .team-modal-img { flex: 0 0 180px; height: 180px; }
  .team-modal-content { padding: 1.5rem 1.25rem; }
  .team-modal-name { font-size: 22px; }

  .sell-fit-list li { gap: .9rem; }
  .sell-fit-list-num { font-size: 34px; }

  .card-inner-item { flex: 0 0 100%; margin-bottom: 6px; }
  .why-table { grid-template-columns: 120px 170px repeat(3, 180px); }
  .buyer-test-item { padding: 1.25rem 1rem; }
  .info-box-contact { padding: 1.75rem 1.1rem; }
}


/* ==========================================================
   8. INNER BANNER PADDING + Free Valuation, Resources,
      Newsletter, Single Practice Listing
   ========================================================== */

section.inner-banner h2 { margin: 0; }

@media (max-width: 1199.98px) {
  section.inner-banner { padding: 100px 0; }
}

@media (max-width: 991.98px) {
  section.inner-banner { padding: 70px 0; }

  /* free valuation */
  .calc-row-2col { flex-wrap: wrap; }
  .calc-row-2col .calc-field { flex: 1 1 100%; }
  .calc-card.without-card { padding-right: 15px; }
  .calc-card.with-card { padding-left: 15px; }

  /* resources */
  .resource-section .row.align-items-center .col-lg-8 { margin-bottom: 0; }
  .resource-tabs { margin: 1.25rem 0 1.75rem; gap: 10px; }
  .resource-body { padding: 1.25rem; }

  /* single practice listing */
  .listing-detail .lx-listing-desc h3 { font-size: 24px; }
  .lx-listing-map { height: 380px; }
}

@media (max-width: 767.98px) {
  section.inner-banner { padding: 50px 0; }

  /* free valuation */
  .calc-cards-wrapper { flex-direction: column; gap: 1rem; padding: 16px; }
  .calc-card.without-card {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .2);
    padding: 0 0 1rem;
  }
  .calc-card.with-card { padding: 0; }
  .band-row { flex-wrap: wrap; gap: 4px; font-size: 13px; }
  .band-vals, .band-msg { text-align: left; }

  /* resources */
  .resource-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    scrollbar-width: none;
  }
  .resource-tabs::-webkit-scrollbar { display: none; }
  .resource-tabs .nav-item { flex: 0 0 auto; }
  .resource-tabs .nav-link { padding: 8px 18px; font-size: 14px; white-space: nowrap; }
  .resource-title { font-size: 19px; }
  .resource-col-purple { margin-bottom: 0; }

  /* newsletter */
  #newsletter-form .buyer-form-card form { padding: 1.25rem 1rem; }

  /* single practice listing */
  .listing-detail .lx-listing-desc h3 { font-size: 21px; }
  .listing-detail .lx-listing-desc ul { padding-left: 1.1rem; }
  .listing-stats li { flex-wrap: wrap; gap: 2px; }
  .listing-detail .start-valuation-btn { display: block; width: 100%; text-align: center; }
  .lx-listing-map { height: 300px; }
}

@media (max-width: 575.98px) {
  section.inner-banner { padding: 40px 0; }
  .lx-listing-map { height: 260px; }
  .resource-img { height: 200px; }
}