/* On This Page Navigation Component v3 (Equal-width Flexbox) */
.onPageNav3 {
  background-color: #f1f1f1;
  padding: 20px;
}

.onPageNav3 .onPageNavTitle {
  width: 100%;
}

.onPageNav3 .onPageNavTitle h2 {
  font-family: proxima-nova, Helvetica, Arial, sans-serif;
  font-size: 19px;
  font-weight: 800;
  color: #4D4D4D;
  padding-top: 5px;
  text-align: left;
}

/* Button container */
.onPageNav3 .onPageNavButtons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
}

/* Base: Assume 4 per row as default — all buttons equal width */
.onPageNav3 .onPageNavButtons .cta--button {
  flex: 0 0 calc((100% - 30px) / 4); /* 4 buttons per row, 3 gaps */
  text-align: center;
  font-size: 16px;
  margin: 0;
  padding: 10px 14px;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

/* JS-based layout (still 4 per row — same rule, but explicit) */
.onPageNav3 .onPageNavButtons.layout-4col .cta--button {
  flex: 0 0 calc((100% - 30px) / 4);
}

/* Medium: 2 per row */
@media (max-width: 768px) {
  .onPageNav3 .onPageNavTitle h2 {
    text-align: center;
  }

  .onPageNav3 .onPageNavButtons .cta--button {
    flex: 0 0 calc((100% - 10px) / 2);
  }
}

/* Small: 1 per row */
@media (max-width: 480px) {
  .onPageNav3 .onPageNavButtons .cta--button {
    flex: 0 0 100%;
  }
}
