.cw-post-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  width: 100%;
}

.cw-post-nav__item--empty {
  min-height: 0;
}

.cw-post-nav__link {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
  padding: 16px;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cw-post-nav__link:hover {
  border-color: #f58220;
}

/* "Next" mirrors "Previous": image on the outer edge, text aligned to it.
   Logical values, so it flips correctly on right-to-left (Arabic) pages. */
.cw-post-nav__item--next .cw-post-nav__link {
  flex-direction: row-reverse;
  text-align: end;
}

.cw-post-nav__image {
  display: block;
  flex-shrink: 0;
  width: 90px;
  height: 90px;
  overflow: hidden;
  border-radius: 8px;
}

.cw-post-nav__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cw-post-nav__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
}

.cw-post-nav__label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #777;
}

.cw-post-nav__title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  transition: color 0.2s ease;
}

.cw-post-nav__link:hover .cw-post-nav__title {
  color: #f58220;
}

@media (max-width: 767px) {
  .cw-post-nav {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Empty cells only exist to hold a side on desktop. */
  .cw-post-nav__item--empty {
    display: none;
  }
}
