.related-posts-slider-wrapper {
  margin: 0 auto;
  overflow: hidden;
}
.related-title {
  color: var(--global-palette4);
  margin-bottom: 1.5rem !important;
}
.related-posts-slider-wrapper p {
  margin-bottom: 8px !important;
}
.related-posts-slider-wrapper a:any-link {
  text-decoration: none;
}
.slide-pair {
  display: flex;
  gap: 24px;
}
.slide-pair .related-post-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.swiper-slide .related-post-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.slide-content {
  flex-grow: 1;
  display: flex;
  gap: 1.5rem;
}
.image-col {
  flex: 0 0 35%;
}
.image-col img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}
.text-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.text-col h4 {
  color: var(--global-palette4);
  font-size: 20px;
}
.text-col p {
  color: var(--global-palette4);
  font-size: 14px;
}
.read-more {
  display: flex;
  color: var(--global-palette1);
  font-weight: 500;
  height: 40px;
  align-items: center;
}
.inline-icon {
  height: 16px;
  vertical-align: middle;
  margin-left: 16px;
  transition: transform 0.3s ease;
}
.read-more:hover .inline-icon {
  transform: translateX(3px);
}
.related-slider-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  padding: 1rem 0;
  gap: 1rem;
}
.swiper-button-prev, .swiper-button-next {
  all: unset;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--global-palette5);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
}
.swiper-button-prev:hover, .swiper-button-next:hover {
  background-color: #f0f0f0;
}
.swiper-button-disabled {
  opacity: 0.5 !important;
  pointer-events: none !important;
}
.swiper-button-prev::after, .swiper-button-next::after {
  display: none !important;
}
.nav-icon {
  height: 16px;
  width: 16px;
}
.nav-text {
  display: none;
}
@media (min-width: 768px) {
  .nav-text {
    display: flex;
    margin-left: 8px;
    margin-right: 8px;
  }
  .swiper-button-prev, .swiper-button-next {
    padding: 8px 14px;
    gap: 6px;
    width: auto;
    height: auto;
  }
}
.custom-pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2px;
}
.custom-page {
  width: 40px;
  height: 40px;
  font-size: 14px;
  cursor: pointer;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.custom-page.active {
  background: #FFCFCC;
  color: var(--global-palette1);
  border-color: #FFCFCC;
  font-weight: 600;
}
.custom-page:hover:not(.active):not(.dots) {
  border-color: #FFCFCC;
}
.custom-page.dots {
  pointer-events: none;
  color: #aaa;
}
@media (max-width: 768px) {
  .slide-content {
    flex-direction: column;
  }
  .image-col {
    aspect-ratio: 16 / 9;
  }
  .slide-pair {
    flex-direction: column;
  }
  .slide-pair .related-post-card {
    width: 100%;
  }
  .custom-page {
    width: 30px;
    height: 30px;
  }
  .swiper-button-prev, .swiper-button-next {
    width: 48px;
  }
}
/* Layout 2x4 dla wszystkich wpisów */
.slide-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
@media (max-width: 768px) {
  .slide-grid {
    grid-template-columns: 1fr;
  }
}



/* Domyślnie: desktop – układ siatkowy */
.slide-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 kolumny */
    gap: 2rem;
}

/* Mobile: 1 kolumna – 8 wpisów jeden pod drugim */
@media (max-width: 767px) {
    .slide-grid {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    .related-post-card {
        width: 100%;
    }
}

.text-col p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}