/* Shared fixes from the approved static-site review. */

/* The featured business direction reuses the established highlighted treatment. */
.navigator__bankruptcy--service {
  display: grid;
  min-height: 96px;
  margin-top: 8px;
  padding: var(--space-2);
  grid-template-columns: 32px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  column-gap: var(--space-2);
  border-top: 0;
  border-radius: var(--radius-card);
  color: rgba(255, 255, 255, .82);
}

/* Service entry cards are links, but retain the exact visual language of cards. */
.situation--request {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.situation--request:focus-visible {
  outline: 3px solid var(--brand-red);
  outline-offset: 4px;
}

/* Four business services stay in one row on wide screens. */
.situations__grid--four,
.desktop-autoscale-active.service-autoscale-page .desktop-section-canvas .situations__grid--four {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.navigator__bankruptcy--service::before {
  content: "";
  position: absolute;
  top: var(--space-2);
  bottom: var(--space-2);
  left: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: transparent;
}

.navigator__bankruptcy--service .tab__icon {
  grid-row: 1 / span 2;
}

.navigator__bankruptcy--service strong {
  display: block;
  margin-bottom: var(--space-1);
  font-size: 16px;
  letter-spacing: -.025em;
}

.navigator__bankruptcy--service small {
  grid-column: 2;
  color: rgba(255, 255, 255, .56);
  font-size: 16px;
  line-height: 1.35;
}

.navigator__bankruptcy--service:hover {
  background: rgba(255, 255, 255, .055);
  transform: none;
}

.navigator__bankruptcy--service:hover::before {
  background: var(--brand-red);
}

.bankruptcy-banner {
  min-height: 238px;
  padding: 38px 42px;
}

.bankruptcy-banner__content strong {
  font-size: 38px;
}

/* Contact cards: address and phone numbers are separate readable groups. */
.office__details {
  display: grid;
  gap: 14px;
  margin-top: var(--space-1);
}

.office .office__details p {
  margin: 0;
}

.office__phones {
  display: grid;
  gap: 5px;
}

.office__phones a {
  width: fit-content;
  color: rgba(255, 255, 255, .88);
  font-size: var(--fs-small);
  line-height: 1.35;
  text-decoration: none;
}

.office__phones a:hover {
  color: #fff;
}

/* Service advantages: icons share the top row with the number and copy can grow. */
.advantages__grid,
.desktop-autoscale-active.service-autoscale-page .desktop-section-canvas .advantages__grid {
  grid-auto-rows: minmax(284px, auto) !important;
}

.advantage:not(.advantage--main) {
  min-width: 0;
  min-height: 284px;
}

.advantage:not(.advantage--main) .advantage__symbol {
  position: absolute;
  top: 24px;
  right: 24px;
  margin: 0;
}

.advantage:not(.advantage--main) .advantage__line {
  margin-top: 28px;
}

.advantage h3,
.advantage p,
.service-case h3,
.service-case__description,
.service-case__result span {
  max-width: 100%;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.advantage__number,
.advantage__symbol,
.service-case__result img {
  flex-shrink: 0;
}

/* Case rows grow with their copy instead of cropping the last line. */
.service-cases__grid {
  grid-template-rows: none;
  grid-auto-rows: minmax(320px, auto);
  align-items: stretch;
}


.service-case,
.service-case__content {
  min-height: 0;
}

.service-case__content > div {
  min-width: 0;
}

/* Long service offers must not push the CTA outside its rounded panel. */
@media (min-width: 977px) {
  .service-hero__grid {
    height: auto;
    min-height: 648px;
  }

  .service-hero__copy {
    min-height: 648px;
  }

  .service-hero__content {
    padding-block: 16px;
  }

  .service-hero__right {
    height: 648px;
  }
}

/* The form heading wraps inside its own grid column on every service page. */
@media (min-width: 977px) {
  .final-cta:not(.final-cta--bankruptcy) .final-cta__box {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  }
}

.final-cta__copy,
.final-cta__copy h2 {
  min-width: 0;
  max-width: 100%;
}

.final-cta__line {
  white-space: normal;
}

/* News pagination is an actual control, not a decorative row. */
.pagination button {
  cursor: pointer;
}

.pagination button:disabled {
  cursor: default;
  opacity: .35;
}

.pagination button:focus-visible {
  outline: 2px solid var(--brand-red);
  outline-offset: 2px;
}

@media (max-width: 976px) {
  .situations__grid--four,
  .desktop-autoscale-active.service-autoscale-page .desktop-section-canvas .situations__grid--four {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .advantages__grid,
  .desktop-autoscale-active.service-autoscale-page .desktop-section-canvas .advantages__grid {
    grid-auto-rows: minmax(274px, auto) !important;
  }

  .service-cases__grid {
    grid-auto-rows: minmax(320px, auto);
  }
}

@media (max-width: 640px) {
  .situations__grid--four,
  .desktop-autoscale-active.service-autoscale-page .desktop-section-canvas .situations__grid--four {
    grid-template-columns: 1fr !important;
  }

  .catalog-card strong,
  .catalog-card small,
  .catalog-card--criminal strong,
  .catalog-card--criminal small,
  .service-card strong,
  .service-card p {
    overflow-wrap: normal !important;
    word-break: normal !important;
    hyphens: none !important;
  }

  .catalog-card strong {
    max-width: calc(100% - 48px);
    font-size: clamp(22px, 6.5vw, 25px);
  }

  .bankruptcy-banner {
    min-height: 238px;
    padding: 28px 24px;
  }

  .bankruptcy-banner__content strong {
    font-size: 30px;
  }

  .advantages__grid,
  .desktop-autoscale-active.service-autoscale-page .desktop-section-canvas .advantages__grid {
    grid-auto-rows: auto !important;
  }

  .advantage:not(.advantage--main) {
    min-height: 258px;
  }

  .advantage:not(.advantage--main) .advantage__symbol {
    top: 22px;
    right: 22px;
  }

  .advantage:not(.advantage--main) .advantage__line {
    margin-top: 24px;
  }

  .advantage--main {
    min-height: 340px;
  }

  .advantage__main-content {
    max-width: calc(100% - 44px);
  }

  .service-cases__grid {
    grid-auto-rows: auto;
  }


  .service-case,
  .service-case--featured,
  .service-case--wide {
    min-height: 340px;
  }

  .service-case--featured {
    min-height: 420px;
  }
}

/* Keep the hero copy legible on exceptionally narrow handsets. */
@media (max-width: 319px) {
  .hero__intro h1 {
    font-size: clamp(28px, calc(20vw - 28px), 36px);
    overflow-wrap: anywhere;
  }
}

@media (max-width: 299px) {
  .service-hero--bankruptcy .service-hero__content {
    width: 100%;
  }

  .service-hero--bankruptcy .service-hero__content h1 {
    font-size: clamp(26px, 10.5vw, 31px);
    overflow-wrap: anywhere;
  }
}
