/* =========================================
   COMPONENT · POSTS GRID
========================================= */

.c-posts-grid{
  padding: clamp(80px, 10vh, 120px) 0;
}


/* =========================================
   CONTAINER (AHORA FLEX)
========================================= */

.c-posts-grid__container{
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;

  display: flex;
  flex-direction: column;
  gap: 40px;
}


/* =========================================
   FILTERS
========================================= */

.c-posts-grid__filters{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.filter-btn{
  padding: 8px 16px;

  font-size: 12px;
  font-weight: 600;
  letter-spacing: .3px;

  border-radius: 8px;
  border: 1px solid rgba(0,0,0,.1);

  background: #fff;
  color: #291F46;

  cursor: pointer;

  transition: all .25s ease;
}

.filter-btn:hover{
  background: #f4f4f4;
}

.filter-btn.is-active{
  background: #0A052D;
  color: #fff;
  border-color: #0A052D;
}


/* =========================================
   GRID WRAPPER (CLAVE PARA JS)
========================================= */

.c-posts-grid__wrapper{
  display: grid;
  grid-template-columns: repeat(3, 1fr);

  column-gap: 28px;
  row-gap: 48px;
}


/* =========================================
   CARD
========================================= */

.c-posts-grid__card{
  display: flex;
  flex-direction: column;
  justify-content: space-between;

  height: 322px;
  padding: 24px;

  border-radius: 16px;
  border: 1px solid rgba(0,0,0,.1);

  text-decoration: none;
  text-align: center;

  will-change: transform, opacity;
  transition: all .25s ease;
}
  
.c-posts-grid__card.is-hidden{
  opacity: 0;
  transform: scale(.95);
  
  height: 0;
  padding: 0;
  margin: 0;
  
  overflow: hidden;
  pointer-events: none;
}


/* VARIANTES */

.c-posts-grid__card.is-dark{
  background: #0A052D;
  box-shadow: 0 8px 15px rgba(0,0,0,.3);
}

.c-posts-grid__card.is-gold{
  background: #C98028;
  box-shadow: 0 8px 15px rgba(0,0,0,.2);
}


/* HOVER */

.c-posts-grid__card:hover{
  transform: translateY(-6px) scale(1.01);
}


/* =========================================
   IMAGE
========================================= */

.c-posts-grid__image{
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
}

.c-posts-grid__image img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


/* =========================================
   TITLE
========================================= */

.c-posts-grid__title{
  margin: 0;

  color: #FFF;
  font-family: "Lexend Deca", sans-serif;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;

  text-transform: uppercase;

  text-decoration: underline;
  text-underline-offset: 4px;

  display: flex;
  align-items: center;
  justify-content: center;

  flex-grow: 1;
}


/* =========================================
   PAGINATION
========================================= */

.c-posts-grid__pagination{
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.c-posts-grid__pagination a,
.c-posts-grid__pagination span{
  padding: 8px 14px;

  border-radius: 6px;

  font-size: 13px;
  font-weight: 600;

  text-decoration: none;

  background: #fff;
  border: 1px solid rgba(0,0,0,.1);
  color: #291F46;

  transition: all .2s ease;
  font-family: "Lexend Deca", sans-serif !important;
}

.c-posts-grid__pagination a:hover{
  background: #0A052D;
  color: #fff;
}

.c-posts-grid__pagination .current{
  background: #0A052D;
  color: #fff;
  border-color: #0A052D;
}


/* =========================================
   LARGE TABLET
========================================= */

@media (max-width: 1100px){

  .c-posts-grid__wrapper{
    grid-template-columns: repeat(2, 1fr);
    row-gap: 40px;
  }

}


/* =========================================
   TABLET
========================================= */

@media (max-width: 991px){

  .c-posts-grid__container{
    width: calc(100% - 40px);
  }

  .c-posts-grid__card{
    height: 300px;
  }

}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 640px){

  .c-posts-grid{
    padding: 56px 0 40px;
  }

  .c-posts-grid__container{
    width: calc(100% - 32px);
  }

  .c-posts-grid__wrapper{
    grid-template-columns: 1fr;
    row-gap: 32px;
  }

  .c-posts-grid__card{
    height: auto;
    padding: 20px;
  }

  .c-posts-grid__title{
    font-size: 20px;
  }

}