/* =========================================================
   BLOG LISTING – CLEAN RESET (ffg-card everywhere)
   Background assumed: #f7f7f7
========================================================= */

.ffg-blog-list{
  max-width:1150px;
  margin:0 auto;
  padding:24px 16px;
}

.ffg-blog-list__header{
  margin:0 0 18px;
}

.ffg-blog-list__desc{
  color:rgba(0,0,0,0.72);
  font-size:16px;
  line-height:1.5;
}

.ffg-section-title {
    margin: 28px 0 20px 0;
    text-transform: none;
    font-weight: 600;
    font-size: 2.4rem;
    letter-spacing: -.1rem;
}

/* =========================================================
   CARD (same for featured + normal)
========================================================= */

.ffg-card{
  display:block;
  border:1px solid rgba(0,0,0,0.10);
  border-radius:18px;
  overflow:hidden;
  background:#fff;
  text-decoration:none;
  transition:transform .10s ease, box-shadow .14s ease, border-color .14s ease;
}

.ffg-card:hover{
  border-color:rgba(0,0,0,0.16);
  box-shadow:0 14px 40px rgba(0,0,0,0.10);
  transform:translateY(-1px);
}

.ffg-card:active{
  transform:translateY(0);
}

/* Square thumb */
.ffg-card__thumb-square{
  width:100%;
  aspect-ratio:20 / 18;
  overflow:hidden;
  background:rgba(0,0,0,0.04);
}

.ffg-card__thumb-square img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.ffg-card__thumb--placeholder{
  width:100%;
  height:100%;
  background:rgba(0,0,0,0.06);
}

.ffg-card__meta{
  padding:14px 14px 16px;
  font-family: Poppins;
}

.ffg-card__date{
  font-size:12px;
  color:rgba(0,0,0,0.55);
  letter-spacing:0.02em;
  margin-bottom:6px;
}

.ffg-card__title{
  font-weight:600;
  color:#111;
  line-height:1.2;
  font-size:16px;
}

.ffg-card__excerpt{
  margin-top:8px;
  font-size:14px;
  color:rgba(0,0,0,0.65);
  line-height:1.35;
}

/* =========================================================
   FEATURED (desktop = 3-column grid)
========================================================= */

.ffg-featured{
  margin-bottom:28px;
}

.ffg-featured__row{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:20px;
}

/* =========================================================
   FEATURED (mobile = vertical list, image left / text right)
========================================================= */

@media (max-width: 900px){

  .ffg-section-title {
    font-size: 1.8rem;
    letter-spacing: -.06rem;
}

  .ffg-featured__row{
    display:flex;
    flex-direction:column;
    gap:15px;
  }

  /* Make featured cards horizontal */
  .ffg-featured__row .ffg-card{
    display:flex;
    align-items:center;
  }

  /* Left image column */
  .ffg-featured__row .ffg-card__thumb-square{
    flex:0 0 120px;
    width:120px;
    aspect-ratio:1 / 1;   /* stays square */
  }

  /* Right content */
  .ffg-featured__row .ffg-card__meta{
    flex:1 1 auto;
    padding:12px 22px;
  }

  /* Slightly tighter text */
  .ffg-featured__row .ffg-card__title{
    font-size:15px;
  }

  .ffg-featured__row .ffg-card__excerpt{
    font-size:13px;
    line-height:1.3;
  }
}

/* Smaller phones */
@media (max-width: 420px){
  .ffg-featured__row .ffg-card__thumb-square{
    flex-basis:104px;
    width:104px;
  }
}

/* =========================================================
   POSTS GRID (all other posts)
========================================================= */

.ffg-posts__grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:20px;
  margin:10px 0 16px;
}

@media (max-width: 900px){
  .ffg-posts__grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap: 15px;
  }
}

/* =========================================================
   MODERN PAGINATION (Centered + Clean)
========================================================= */
/* Pagination (desktop) */
.ffg-blog-pagination{
  display:flex;
  justify-content:center;
  margin:28px 0 10px;
}

.ffg-blog-pagination ul{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  list-style:none;
  padding:0;
  margin:0;
  flex-wrap:wrap;         /* key: wrap instead of overflow */
  max-width:100%;
}

.ffg-blog-pagination li{
  display:flex;
}

.ffg-blog-pagination a,
.ffg-blog-pagination span{
  min-width:40px;
  height:40px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0 12px;
  border:1px solid rgba(0,0,0,0.12);
  border-radius:14px;
  text-decoration:none;
  background:#fff;
  font-size:14px;
  font-weight:500;
  color:#111;
}

.ffg-blog-pagination a:hover{
  border-color:rgba(0,0,0,0.20);
  box-shadow:0 6px 18px rgba(0,0,0,0.08);
}

.ffg-blog-pagination .current{
  background:#111;
  color:#fff;
  border-color:#111;
  font-weight:600;
}

/* dots (...) */
.ffg-blog-pagination .dots{
  border:none;
  background:transparent;
  min-width:auto;
  padding:0 6px;
}

/* Mobile: tighter + hide some extras if still busy */
@media (max-width: 520px){
  .ffg-blog-pagination a,
  .ffg-blog-pagination span{
    min-width:34px;
    height:34px;
    border-radius:12px;
    font-size:13px;
    padding:0 10px;
  }

  /* If your theme outputs these classes, this helps reduce width */
  .ffg-blog-pagination .page-numbers.prev,
  .ffg-blog-pagination .page-numbers.next{
    padding:0 10px;
  }
}

/* =========================================================
   CATEGORY PILL BAR (scroll on mobile)
========================================================= */

.ffg-catbar{
  margin:6px 0 18px;
}

.ffg-catbar__row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  justify-content:center;
}

/* Pill */
.ffg-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:9px 12px;
  border:1px solid rgba(0,0,0,0.12);
  border-radius:999px;
  background:#fff;
  text-decoration:none;
  font-size:14px;
  color:#111;
  transition:border-color .12s ease, box-shadow .12s ease, transform .08s ease;
}

.ffg-pill:hover{
  border-color:rgba(0,0,0,0.20);
  box-shadow:0 6px 18px rgba(0,0,0,0.08);
  transform:translateY(-1px);
}

.ffg-pill:active{
  transform:translateY(0);
}

/* Mobile: horizontal scroll with peek */
@media (max-width: 900px){
  .ffg-catbar{
    position:relative;
  }

  .ffg-catbar__row{
    justify-content:flex-start;
    flex-wrap:nowrap;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
    padding:0 16px 10px;
    margin-left:-16px;
    margin-right:-16px;
  }

  .ffg-catbar__row::-webkit-scrollbar{
    display:none;
  }

  .ffg-pill{
    flex:0 0 auto;
    white-space:nowrap;
  }

  /* Optional fade edges (matches #f7f7f7) */
  .ffg-catbar::before,
  .ffg-catbar::after{
    content:"";
    position:absolute;
    top:0;
    bottom:0;
    width:44px;
    pointer-events:none;
    z-index:2;
  }

  .ffg-catbar::before{
    left:0;
    background:linear-gradient(to right, #f7f7f7 0%, rgba(247,247,247,0) 100%);
  }

  .ffg-catbar::after{
    right:0;
    background:linear-gradient(to left, #f7f7f7 0%, rgba(247,247,247,0) 100%);
  }
}