/* Bedriftsnettside hero title v2 — controlled line rhythm before production merge. */
.websites-hero h1.websites-title-v2 {
  max-width: 14ch !important;
  margin: 0;
  font-size: clamp(2.7rem, 3vw, 3.65rem) !important;
  font-weight: 835;
  line-height: 1.02 !important;
  letter-spacing: -.052em !important;
  white-space: normal;
  text-wrap: balance;
  overflow-wrap: normal;
}

.websites-title-v2__break--mobile {
  display: none;
}

.websites-title-v2__break--desktop {
  display: block;
}

/* Desktop containment hotfix: no four-card row may widen the public page. */
@media (min-width: 1024px) {
  .websites-experience,
  .websites-section,
  .websites-job-grid,
  .websites-job-card,
  .websites-hero,
  .websites-hero__copy,
  .websites-hero__visual {
    min-width: 0;
  }

  .websites-job-grid {
    width: 100%;
    max-width: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  .websites-job-card {
    max-width: 100%;
    overflow-wrap: break-word;
  }
}

/* Keep a comfortable two-column card rhythm on narrower desktop windows. */
@media (min-width: 1101px) and (max-width: 1320px) {
  .websites-job-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .websites-hero h1.websites-title-v2 {
    max-width: 13ch !important;
    font-size: clamp(2.45rem, 3.25vw, 3rem) !important;
    line-height: 1.04 !important;
  }
}

@media (max-width: 48rem) {
  .websites-hero h1.websites-title-v2 {
    max-width: none !important;
    font-size: clamp(1.85rem, 8.8vw, 2.55rem) !important;
    line-height: 1.04 !important;
    letter-spacing: -.045em !important;
    text-wrap: balance;
  }

  .websites-title-v2__break--mobile {
    display: block;
  }

  .websites-title-v2__break--desktop {
    display: none;
  }
}
