/* ==================================================
   Case Studies – CPT
   ================================================== */

@media (max-width: 767px) {

  /* 1) Override Kadence: remove the forced 35% basis on children */
  .case-nav .kt-inside-inner-col > * {
    flex-basis: auto !important;
  }
	
 /* Hide empty prev/next containers */
  .case-nav .case-nav__prev:empty,
  .case-nav .case-nav__next:empty {
    display: none !important;
  }

  .case-nav .case-nav__prev,
  .case-nav .case-nav__next {
    flex: 1 1 47% !important;
    min-width: 0;
  }
	
 /* If only one of them exists, make it full width */
  .case-nav .case-nav__prev:only-child,
  .case-nav .case-nav__next:only-child {
    flex: 0 0 100% !important;
  }

  /* Force overview to full width and last */
  .case-nav .case-nav__overview {
    flex: 0 0 100% !important;
    order: 3;
    width: 100% !important;
  }

  /* Wrap text cleanly */
  .case-nav .kt-btn-inner-text,
  .case-nav .wp-block-post-navigation-link a {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}
