section.news-grid{
    padding: 40px 8% 70px;
}

section.news-grid .posts-wrapper{
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
}

section.news-grid .card{
    background-color: var(--white);
    padding: 10px;
    border-radius: 14px;
    width: calc((100% / 3) - 14px);

    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease;
    will-change: transform;
}

section.news-grid .card .img-wrapper{
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 3 / 2;
}

section.news-grid .card img{
    object-fit: cover;
    aspect-ratio: 3 / 2;
    width: 100%;
    height: 100%;
    display: block;
    transition: transform .35s ease;
}

section.news-grid .card:hover{
    transform: translateY(-6px);
    box-shadow: 0 14px 28px rgba(0,0,0,0.08);
}

section.news-grid .card:hover img{
    transform: scale(1.04);
}

section.news-grid .card .content{
    margin: 15px 5px 10px;
}

section.news-grid .card h3 {
    font-size: 1.1em;
    margin-bottom: 10px;
}

section.news-grid .card p{
    font-size: 0.85em;
}

section.news-grid .card span{
    color: var(--purple);
    text-decoration: underline;
    margin: 10px 0 0;
    font-size: 0.85em;
}

.news-filters{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.news-filters__item{
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--white);
  color: var(--white);
  text-decoration: none;
  line-height: 1;
  font-weight: 250;
  font-size: 0.9em;
  transition: 0.3s ease all;
}

.news-filters__item.is-active,
.news-filters__item:hover{
  background: var(--purple);
  border: 1px solid var(--purple);
  color: #fff;
  transition: 0.3s ease all;
}

#news-grid-results.is-loading{
  opacity: .5;
  pointer-events: none;
}

/* Pagination wrapper */
.news-grid .pagination{
  margin: 40px auto 0;
  display: flex;
  justify-content: center;
}

/* WP pagination container */
.news-grid .pagination .nav-links{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Base button/link style */
.news-grid .pagination .page-numbers{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1.5px solid var(--white);
  color: var(--white);
  background: transparent;
  text-decoration: none;
  font-family: var(--inter);
  font-size: 0.9em;
  font-weight: 400;
  transition: 0.2s ease all;
}

/* Hover */
.news-grid .pagination .page-numbers:hover{
  background: var(--darkpurple);
  color: var(--white);
}

/* Current page */
.news-grid .pagination .page-numbers.current{
  background: var(--purple);
  border-color: var(--purple);
  color: var(--white);
}

/* Prev/Next a bit wider */
.news-grid .pagination .page-numbers.prev,
.news-grid .pagination .page-numbers.next{
  padding: 0 18px;
}

/* Dots */
.news-grid .pagination .page-numbers.dots{
  border: 0;
  background: transparent;
  min-width: auto;
  padding: 0 6px;
}

/* Optional: disabled state if theme outputs it */
.news-grid .pagination .page-numbers.disabled{
  opacity: 0.4;
  pointer-events: none;
}


@media screen and (max-width:1024px){
section.news-grid .card {
    width: calc((100% / 2) - 10px);
}
}


@media screen and (max-width:768px){
section.news-grid{
    padding: 170px 5%;
}
}

@media screen and (max-width:560px){
section.news-grid .card {
    width: 100%;
}
}