/* Mobile layout refinement. Loaded after page-specific styles. */
@media (max-width: 768px) {
  :root {
    --mobile-header: 80px;
    --mobile-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 96px; }
  body { padding-bottom: var(--mobile-bottom); }
  .header, .header.scrolled { height: var(--mobile-header); padding: 6px 0; background: #fff; }
  .header-inner { height: 100%; padding: 0 16px; gap: 12px; }
  .brand-logo { height: 64px; min-width: 0; width: auto; }
  .hamburger { align-items: center; justify-content: center; width: 56px; min-width: 56px; min-height: 56px; padding: 6px; gap: 4px; }
  .hamburger > span:not(.menu-label) { width: 24px; height: 2px; }
  .hamburger > .menu-label { width: auto; height: auto; background: none; margin-top: 3px; font-size: 12px; line-height: 1.2; font-weight: 800; letter-spacing: .04em; }
  .mobile-nav { top: var(--mobile-header); bottom: var(--mobile-bottom); padding: 12px 20px 24px; max-width: 100%; z-index: 101; overscroll-behavior: contain; }
  .mobile-nav a, .mob-section-head { font-size: 16px; line-height: 1.4; min-height: 44px; }
  .mob-section-body a { font-size: 14px; }
  body.mobile-menu-open { overflow-y: hidden; }
  .mobile-call-bar { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.3fr) minmax(0,1.2fr); gap: 6px; padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px)); }
  .mobile-call-bar:not(:has(.mobile-estimate-btn)) { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .mobile-call-bar > a { min-width: 0; width: 100%; min-height: 48px; padding: 8px 4px; font-size: 13px; line-height: 1.2; letter-spacing: 0; white-space: normal; overflow-wrap: anywhere; text-align: center; gap: 4px; }
  .mobile-call-bar svg { flex: 0 0 16px; width: 16px; height: 16px; }
  .hero { padding-top: var(--mobile-header); min-height: 0; }
  .hero-content { width: 100%; min-width: 0; max-width: 100%; padding: 20px 16px 28px; }
  .hero-content > * { min-width: 0; max-width: 100%; }
  .hero-logo { width: min(60vw, 220px); height: auto; margin-top: 0; }
  .hero-logo-wrap { margin-bottom: 16px; }
  .hero-badge { font-size: 12px; line-height: 1.4; letter-spacing: .08em; padding: 8px 12px; margin-bottom: 16px; }
  .hero-heading { font-size: clamp(32px, 8vw, 44px); margin-bottom: 12px; }
  .hero-sub { font-size: 12px; line-height: 1.7; letter-spacing: .1em; margin-bottom: 20px; overflow-wrap: normal; word-break: normal; }
  .hero-actions { width: 100%; margin-bottom: 20px; }
  .hero-single-btn { width: 100%; min-width: 0; max-width: 360px; font-size: 20px; line-height: 1.25; letter-spacing: .03em; white-space: normal; padding: 12px; }
  .hero-credentials { width: 100%; border-radius: 12px; gap: 8px 12px; padding: 12px; line-height: 1.4; }
  .hero-credentials span { font-size: 12px; letter-spacing: 0; }
  .hero-credentials .cred-divider { display: none; }
  .hero-credentials .cred-est { flex-basis: 100%; font-size: 12px !important; letter-spacing: 0 !important; }
  .hero-badge-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; width: 100%; max-width: 420px; align-items: stretch; margin: 0 auto 16px; }
  .hero-badge-row .hero-license-badge,
  .hero-badge-row .hero-ua-badge { flex: none; min-width: 0; max-width: none; width: 100%; height: auto; min-height: 148px; padding: 12px 8px; gap: 8px; border-width: 1px; border-radius: 10px; justify-content: center; }
  .hero-badge-row .hlb-logo-block { width: 100%; min-width: 0; justify-content: center; }
  .hero-badge-row .hblb-logo-img { width: 100%; height: auto; max-height: none; object-fit: contain; }
  .hero-badge-row .ua-badge-img { width: 100%; max-width: 200px; height: auto; object-fit: contain; }
  .hero-badge-row .hlb-license-row { display: flex; flex-wrap: wrap; gap: 4px; padding-top: 8px; line-height: 1.3; }
  .hero-badge-row .hlb-lic-label { font-size: 12px; letter-spacing: 0; text-transform: none; color: #fff; }
  .hero-badge-row .hlb-lic-num { font-size: 15px; letter-spacing: 0; }
  .hero-badge-row .hlb-verify { width: 100%; margin-left: 0; font-size: 12px; letter-spacing: 0; text-transform: none; color: #fff; }
  .hero-badge-row .ua-badge-label { font-size: 16px; font-weight: 800; line-height: 1.3; letter-spacing: .015em; text-transform: uppercase; }
  .hero-phone { margin-top: 0; }
  .trust-bar-inner { gap: 16px; }
  .trust-item { min-width: 0; max-width: 100%; white-space: normal; font-size: 13px; line-height: 1.5; }
  .services { padding: 40px 0; }
  .services .container { padding-inline: 16px; }
  .services-grid { grid-template-columns: minmax(0,1fr); gap: 16px; }
  .services-grid .service-card,
  .services-grid .service-card.svc-hero { grid-column: auto; min-width: 0; }
  .services-grid .service-card .svc-inner,
  .services-grid .service-card:hover .svc-inner,
  .services-grid .service-card.is-expanded .svc-inner { height: 300px; transform: none; transform-style: flat; transition: none; }
  .services-grid .svc-front, .services-grid .svc-back { transform: none; backface-visibility: visible; -webkit-backface-visibility: visible; }
  .services-grid .svc-back { visibility: hidden; }
  .services-grid .is-expanded .svc-front { visibility: hidden; }
  .services-grid .is-expanded .svc-back { visibility: visible; }
  .services-grid .svc-content { padding: 16px; bottom: 48px; }
  .services-grid .svc-content h3 { font-size: 28px; line-height: 1.1; margin: 8px 0 0; }
  .services-grid .svc-tag { display: inline-block; max-width: 100%; font-size: 12px; line-height: 1.4; letter-spacing: .03em; padding: 6px 10px; margin-bottom: 4px; white-space: normal; overflow-wrap: anywhere; }
  .services-grid .svc-back { padding: 16px; overflow: visible; }
  .services-grid .svc-back ul { overflow: visible; flex: none; }
  .services-grid .svc-back h4 { font-size: 24px; }
  .services-grid .svc-back ul li { font-size: 14px; }
  .services-grid .svc-back-tag { font-size: 12px; }
  .services-grid .svc-back-cta { font-size: 13px; min-height: 44px; display: flex; align-items: center; justify-content: center; }
  .service-detail-toggle { position: absolute; left: 16px; bottom: 12px; padding: 8px 12px; min-height: 44px; border: 1px solid rgba(255,255,255,.7); border-radius: 6px; background: rgba(10,40,80,.75); color: #fff; font: 600 14px var(--font-body); }
  .service-detail-close { align-self: flex-start; background: transparent; border: 0; padding: 8px 0; min-height: 44px; font: 600 14px var(--font-body); color: var(--navy); }
  .services-grid .svc-back [style*="color:rgba(255,255,255"] { color: var(--navy) !important; }
  :focus-visible { outline: 3px solid #4dd8f0; outline-offset: 3px; }
}
@media (max-width: 340px) {
  .hero-badge-row { grid-template-columns: minmax(0,1fr); max-width: 240px; }
  .hero-badge-row .hero-license-badge, .hero-badge-row .hero-ua-badge { min-height: 0; }
  .hero-badge-row .hblb-logo-img { width: 160px; }
}
@media (min-width: 769px) {
  .service-detail-toggle, .service-detail-close { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .mobile-nav, .services-grid .svc-inner { transition: none; }
}

/* A single centered service line with short, quiet separators. */
.hero-sub {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.5vw, 18px);
  width: 100%;
  font-size: clamp(16px, 2vw, 28px);
  line-height: 1.4;
  letter-spacing: .12em;
  white-space: nowrap;
  word-break: normal;
}
.hero-sub .hero-divider {
  display: block;
  flex: 0 0 1px;
  width: 1px;
  height: .65em;
  margin: 0;
  border: 0;
  background: currentColor;
  opacity: .7;
  overflow: hidden;
  text-indent: -9999px;
  text-shadow: none;
}
@media (max-width: 768px) {
  .hero-sub {
    font-size: clamp(12px, 3.6vw, 16px);
    letter-spacing: .08em;
    gap: 8px;
  }
}

/* One squared-off inspection and credentials block, on every screen size. */
.hero-badge.hero-experience {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0 .3em;
  width: 100%;
  max-width: 624px;
  margin: 0 auto 24px;
  padding: 14px 16px;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: .015em;
  text-align: center;
  align-self: center;
}
.hero-badge.hero-experience span { display: block; }
@media (max-width: 768px) {
  .hero-badge.hero-experience {
    max-width: 420px;
    flex-direction: column;
    font-size: 20px;
    padding: 14px 10px;
    margin-bottom: 16px;
  }
}
.hero-inspection-panel {
  width: 100%;
  max-width: 624px;
  margin: 0 auto 16px;
  border: 1px solid #4dd8f0;
  border-radius: 0;
  background: rgba(0, 32, 64, .92);
  overflow: hidden;
}
.hero-inspection-panel .hero-actions { display: block; margin: 0; width: 100%; }
.hero-inspection-panel .hero-single-btn {
  width: 100%;
  max-width: none;
  min-width: 0;
  min-height: 60px;
  margin: 0;
  padding: 16px;
  border: 0;
  border-bottom: 1px solid #4dd8f0;
  border-radius: 0;
  outline: none;
  box-shadow: none;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0;
  text-transform: none;
  transform: none;
}
.hero-inspection-panel .hero-single-btn:focus-visible {
  outline: 3px solid #fff;
  outline-offset: -5px;
}
.hero-inspection-panel .hero-credentials {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 4px;
  width: 100%;
  margin: 0;
  padding: 18px 16px;
  border: 0;
  border-radius: 0;
  background: none;
  text-align: center;
}
.hero-inspection-panel .hero-credentials span {
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  font-style: normal !important;
  line-height: 1.5;
  letter-spacing: 0 !important;
  text-shadow: none !important;
}
.hero-inspection-panel .cred-state,
.hero-inspection-panel .cred-est { grid-column: 1 / -1; }
.hero-inspection-panel .cred-est {
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.24);
}
.hero-inspection-panel .cred-years { display: block; margin-top: 4px; }
@media (max-width: 768px) {
  .hero-inspection-panel { max-width: 420px; }
  .hero-inspection-panel .hero-single-btn { font-size: 16px; padding: 14px 16px; }
  .hero-inspection-panel .hero-credentials { padding: 16px 10px; }
  .hero-inspection-panel .hero-credentials span { font-size: 12px !important; }
}
