/* Shared by the landing page and service detail pages. */
:is(h1, h2, h3, .gallery-card p) {
  text-wrap: balance;
}
p, .service-detail li { text-wrap: pretty; }
.keep-together, a[href^="tel:"] { white-space: nowrap; }
.contact-grid, .faq-grid { grid-template-columns: minmax(0, 1fr); }
.contact-grid > *, .form-row > *, .service-panel > *, .contact-sign > div { min-width: 0; }

/* Leave the first services label fully below the fixed 74px mobile header. */
#usluge .services { padding-top: max(94px, env(safe-area-inset-top) + 90px); }

@media (max-width: 580px) {
  .container { width: calc(100% - 40px); }
  .contact-urgent .urgent-call { width: 100%; }
  .contact-sign strong { font-size: clamp(18px, 5.3vw, 22px); text-wrap: balance; }
  .section h2, .statement h2 { font-size: clamp(30px, 9vw, 40px); }
  .service-detail h1 { font-size: clamp(30px, 8vw, 40px); line-height: 1.12; }
  .service-panel, .form-row { grid-template-columns: minmax(0, 1fr); }
  .service-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-tabs button {
    justify-content: flex-start; min-height: 48px; gap: 8px; padding: 10px clamp(8px, 2.5vw, 14px);
    font-size: clamp(.875rem, 3.8vw, 1rem); line-height: 1.25; white-space: normal; text-align: left;
  }
  .service-copy > p:not(.kicker) { font-size: 16px; line-height: 1.55; }
  .service-copy li {
    position: relative;
    padding-left: 20px;
    font-size: 16px;
    line-height: 1.45;
  }
  .service-copy li::before { position: absolute; left: 0; margin: 0; }
  .service-tabs button span { display: block; flex: none; }
  .service-tabs button:nth-child(odd) { border-left: 0; }
  .service-tabs button:nth-child(n+3) { border-top: 1px solid var(--line); }
  .form-top { flex-wrap: wrap; gap: 4px 12px; }
  .form-top > span { white-space: nowrap; }
  .service-directory { display: grid; gap: 10px; }
  .service-directory a { justify-self: start; text-wrap: balance; }
  .service-detail .button { max-width: 100%; }
  .faq-list summary { padding-block: 16px; gap: 12px; font-size: 16px; line-height: 1.4; }
  .faq-list details p { padding-right: 14px; font-size: 15px; line-height: 1.55; }
}

.footer-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}
.back-to-top {
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
}
.back-to-top span { display: none; }
