/* Global responsive hardening for mobile/tablet (shared across all pages) */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

img,
svg,
video,
canvas,
iframe {
  max-width: 100%;
  height: auto;
}

table {
  display: block;
  width: 100%;
  overflow-x: auto;
}

input,
select,
textarea,
button {
  max-width: 100%;
  font: inherit;
}

body.lang-zh,
html[lang="zh"] body {
  line-height: 1.8;
  word-break: break-word;
  overflow-wrap: anywhere;
}

@media (max-width: 1024px) {
  .section-pad,
  .container,
  .page-breadcrumb,
  .page-hero,
  .cta-section,
  .hero,
  .services,
  .litigation,
  .events,
  .packages,
  .reviews,
  .footer {
    padding-left: 4% !important;
    padding-right: 4% !important;
  }

  .contracts-grid,
  .services-grid,
  .steps-grid,
  .feat-grid,
  .compare-grid,
  .eserv-grid,
  .stats-grid,
  .blog-grid,
  .perks-grid,
  .why-list,
  .vals {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
  }

  .service-card,
  .contract-card,
  .feat-card,
  .team-card,
  .review-card,
  .pkg-card,
  .case-form,
  .form-card,
  .booking-card,
  .profile-card,
  .article-container,
  .article-body,
  .info-box,
  .compare-box {
    min-width: 0 !important;
    max-width: 100% !important;
  }
}

@media (max-width: 768px) {
  .navbar {
    position: sticky;
    top: 0;
    z-index: 1100;
  }

  .nav-links,
  .nav-cta {
    display: none !important;
  }

  .hamburger {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }

  .mobile-drawer {
    width: min(88vw, 340px);
    max-width: 100%;
  }

  .nav-inner {
    gap: 10px;
  }

  .nav-firm-name {
    font-size: 0.95rem !important;
  }

  .section-title,
  .sec-title,
  .page-hero h1,
  .article-body h1,
  .article-body h2 {
    font-size: clamp(1.35rem, 6vw, 1.95rem) !important;
    line-height: 1.35 !important;
  }

  .page-hero-desc,
  .section-desc,
  .article-body p,
  .article-body li,
  .team-desc,
  .review-text {
    font-size: 0.98rem !important;
    line-height: 1.8 !important;
  }

  .contracts-grid,
  .services-grid,
  .steps-grid,
  .feat-grid,
  .compare-grid,
  .eserv-grid,
  .stats-grid,
  .blog-grid,
  .perks-grid,
  .why-list,
  .vals,
  .stat-row,
  .val-row,
  .inclusion-row,
  .cf-row,
  .form-row,
  .form-grid {
    grid-template-columns: 1fr !important;
  }

  .service-card,
  .contract-card,
  .feat-card,
  .team-card,
  .review-card,
  .pkg-card,
  .case-form,
  .form-card,
  .booking-card,
  .profile-card,
  .article-container,
  .article-body,
  .info-box,
  .compare-box {
    padding: 18px 16px !important;
    border-radius: 14px !important;
  }

  .svc-cta-btn,
  .booking-btn,
  .booking-btn-phone,
  .cf-submit,
  .form-submit-btn,
  .btn-gold,
  .btn-outline,
  .pkg-card-cta,
  .eserv-btn,
  .cta-button,
  .submit-btn,
  .form-submit {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 44px;
    justify-content: center;
  }

  .lang-drop-menu {
    right: 0;
    left: auto;
    min-width: 156px;
    max-width: 88vw;
  }

  .lang-drop-btn {
    width: 42px;
    height: 42px;
  }

  .whatsapp-fab {
    right: 14px !important;
    bottom: 14px !important;
  }

  .page-breadcrumb {
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
  }

  .page-breadcrumb::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 560px) {
  .nav-firm-sub {
    display: none !important;
  }

  .nav-logo img {
    max-height: 42px !important;
    width: auto;
  }

  .team-badges,
  .booking-features,
  .pkg-card-feats,
  .review-header {
    gap: 8px !important;
  }

  .lang-drop {
    margin-inline-start: auto;
  }

  .footer {
    padding-bottom: 80px !important;
  }
}

@media (max-width: 420px) {
  html,
  body {
    font-size: 15px;
  }

  .section-title,
  .sec-title,
  .page-hero h1 {
    font-size: 1.28rem !important;
  }
}
