/* Keep semantic word groups together; let the browser choose the other breaks. */
h1, h2, h3 { text-wrap: balance; }
.hero-description { text-wrap: balance; }
.section-heading > p,
.service-option small,
.specialty-card small,
.why-detail > p,
.benefits-grid p,
.review blockquote,
.faq-list summary,
.faq-list details p,
.contact-content > p:not(.eyebrow),
.service-card-content > p,
.check-list li,
.modal-intro,
.booking-account-link,
.account-intro,
.account-empty-copy { text-wrap: pretty; }
.header .main-nav a,
.header .btn-small { white-space: nowrap; }
.header .btn-small { flex-shrink: 0; }

@media (min-width: 768px) {
  .service-cards > .service-card {
    display: flex;
    flex-direction: column;
  }
  .service-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
  }
  .service-card-content > .check-list { margin-bottom: auto; }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  .services-section .service-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .services-section .service-cards > .service-card:last-child {
    grid-column: 1 / -1;
    width: calc((100% - 24px) / 2);
    justify-self: center;
  }
}

/* Tablet reviews use the same horizontal reading flow as the phone layout. */
@media (min-width: 768px) and (max-width: 1023px) {
  .reviews-section .reviews-grid {
    display: flex;
    flex-flow: row nowrap;
    gap: 16px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding-bottom: 14px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
  }
  .reviews-section .reviews-grid > .review {
    flex: 0 0 min(66%, 420px);
    min-width: 0;
    scroll-snap-align: start;
  }
  .motion-ready .reviews-section .reviews-grid > [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* The full navigation starts only when its labels and contact controls fit. */
@media (min-width: 1024px) and (max-width: 1365px) {
  .header .header-inner { display: flex; flex-wrap: wrap; }
  .header .main-nav { display: none !important; }
  .header .menu-toggle { display: flex; }
  .header .mobile-menu-panel:not([hidden]) { display: block; }
  .header .mobile-menu-links { grid-template-columns: 1fr 1fr; gap: 2px 30px; }
  .header .mobile-menu-bottom { grid-template-columns: 1fr auto auto; gap: 14px 28px; }
  .header .mobile-menu-bottom .btn { grid-column: 2; grid-row: 1; width: auto; min-width: 200px; }
  .header .mobile-menu-phone { grid-column: 3; }
}
