/* Fallback biến màu nếu trang của bạn chưa có */
:root {
    --green: #2E7D32;
    --ink: #212121;
    --muted: #6E6E6E;
    --muted-2: #9A9A9A;
    --pill: #E6E6E6;
}

/* ==== Section wrapper ==== */
.ib-listing {
    padding: 60px 16px;
    background: #fff;
}



/* ==== Head ==== */
.ib-listing__head {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    margin-bottom: 72px;
    /* giống mockup */
}

.ib-listing__title {
    margin: 0;
    color: var(--green);
    font: 700 40px/56px "Playfair Display", Georgia, serif;
}

.ib-listing__subtitle {
    margin: 0;
    color: var(--ink);
    font: 400 24px/32px "Open Sans", system-ui, sans-serif;
    opacity: .96;
}

/* ==== Grid ==== */
.ib-listing__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 40px;
    align-items: flex-start;
}

/* ==== Card ==== */
.ib-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 300px;
    max-width: 300px;
    width: 100%;
    height: 100%;
}

.ib-card__thumb {
    height: 240px;
    min-height: 192px;
    max-height: 360px;
    border-radius: 12px;
    overflow: hidden;
    background: #f7f7f7;
}

/* Giới hạn tối đa 2 dòng cho tiêu đề trong card */
.post-card .h5 {
    line-height: 1.4;
    /* đồng nhất line-height */
    display: -webkit-box;
    /* bật line clamp */
    -webkit-line-clamp: 2;
    /* tối đa 2 dòng */
    -webkit-box-orient: vertical;
    overflow: hidden;
    /* ẩn phần thừa */
    text-overflow: ellipsis;
    /* thêm … */
    min-height: calc(1.4em * 2);
    /* giữ chiều cao tối thiểu = 2 dòng */
    margin: 0 0 .25rem;
    /* khoảng cách gọn gàng */
}

.post-card p {
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    /* tuỳ bạn: 2–4 dòng */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ib-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ib-card__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ib-card__cat {
    color: var(--muted);
    font: 700 13px/19.5px Roboto, system-ui, sans-serif;
    opacity: .9;
}

.ib-card__title {
    margin: 0;
    color: var(--ink);
    font: 500 24px/32px "Playfair Display", Georgia, serif;
}

.ib-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.ib-card__meta .author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ib-card__meta .author img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.ib-card__meta .author span {
    color: var(--ink);
    font: 400 14px/21px "Open Sans", system-ui, sans-serif;
}

.ib-card__meta .date {
    color: var(--muted-2);
    font: 400 14px/21px "Open Sans", system-ui, sans-serif;
}

.ib-card__excerpt {
    margin: 0;
    color: var(--ink);
    font: 400 15px/22.5px Roboto, system-ui, sans-serif;
}

/* Xem thêm */
.btn-more {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--pill);
    border-radius: 4px;
    text-decoration: none;
}

.btn-more span {
    color: var(--ink);
    font: 400 15px/22.5px "Open Sans", system-ui, sans-serif;
    text-transform: uppercase;
}

.btn-arrow {
    width: 20px;
    height: 20px;
    position: relative;
    display: inline-block;
}

.btn-arrow:before {
    content: "";
    position: absolute;
    inset: 0;
    width: 6.25px;
    height: 12.5px;
    left: 6.88px;
    top: 3.75px;
    border-right: 1.25px solid var(--ink);
    border-top: 1.25px solid var(--ink);
    transform: rotate(45deg);
}

/* ==== Load more ==== */
.ib-listing__more {
    display: flex;
    justify-content: center;
    margin-top: 72px;
}

.load-more {
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #A8A8A8;
    border-radius: 2px;
    color: #383838;
    font: 400 15px/22.5px Roboto, system-ui, sans-serif;
    cursor: pointer;
}

/* Gutter tuỳ biến đúng yêu cầu */
.gx-20 {
    --bs-gutter-x: 20px;
}

.gy-40 {
    --bs-gutter-y: 40px;
}

/* Phụ trợ nhỏ */
.object-fit-cover {
    object-fit: cover;
}

.post-card .ratio img {
    width: 100%;
    height: 100%;
}

/* Nút xem thêm giống mockup nhẹ nhàng */
.btn-more {
    background: #E6E6E6;
    color: #212121;
    text-transform: uppercase;
}

/* ==== Responsive: thu nhỏ khoảng cách đầu trang một chút trên mobile ==== */
@media (max-width:640px) {
    .ib-listing__title {
        font-size: 34px;
        line-height: 46px;
    }

    .ib-listing__subtitle {
        font-size: 18px;
        line-height: 26px;
    }

    .ib-listing__head {
        margin-bottom: 40px;
    }
}
/* blog */
/* Fallback biến màu nếu trang của bạn chưa có */
:root{
    --ink:#212121;
    --muted:#757575;
    --bar:#DDDDDD;
  }


  .article-title{
    font-family: "Playfair Display", serif;
    font-size: 40px;
    line-height: 70px;
    color: var(--ink);
    margin: 0;
  }

  .author-name{
    font: 400 15px/22.5px Roboto, system-ui, sans-serif;
    color: var(--ink);
  }

  .article .text-muted{ color: var(--muted)!important; }

  .object-fit-cover{ object-fit: cover; }

  .lead-intro{
    border-left: 3px solid var(--bar);
    padding-left: 1rem;
    color: var(--ink);
    font: 400 15px/22.5px Roboto, system-ui, sans-serif;
  }

  .article-body{
    color: var(--ink);
    font: 400 15px/22.5px Roboto, system-ui, sans-serif;
  }
  .article-body h2{ margin:16px 0 2px; color:var(--ink); }

  /* ========== Responsive ========== */
  /* <= 992px (tablet landscape) */
  @media (max-width: 992px){
    .py-72{ padding-block:56px; }
    .article-title{ font-size: 36px; line-height: 48px; }
    .author-avatar{ width: 48px; height: 48px; }
    .lead-intro{ border-left-width: 3px; }
  }

  /* <= 768px (tablet portrait) */
  @media (max-width: 768px){
    .py-72{ padding-block:48px; }
    .article-title{ font-size: 32px; line-height: 44px; }
    .author-avatar{ width: 44px; height: 44px; }
    .article-body{ font-size: 14.5px; line-height: 22px; }
  }

  /* <= 576px (mobile) */
  @media (max-width: 576px){
    .py-72{ padding-block:40px; }
    .article-title{ font-size: 28px; line-height: 38px; }
    .author-avatar{ width: 40px; height: 40px; }
    .lead-intro{
      border-left-width: 2px;
      padding-left: .75rem;
      font-size: 14px; line-height: 21.5px;
    }
    /* co giãn khoảng cách tổng thể nhẹ nhàng hơn trên mobile */
    .article .mt-4{ margin-top: 1rem !important; }
    .article .mt-3{ margin-top: .75rem !important; }
  }

/* MOBILE FIXES */
@media (max-width: 576px){
  /* 1) wrapper không tràn ngang */
  .ib-listing .wrap{ width:100%; }

}

