/*! Hybe Blog v1.0 — shortcode [hybe_blog] */

.hbl{
  --hbl-card: #141D21;
  --hbl-line: rgba(119,214,252,.3);
  --hbl-text: #FAFDFF;
  --hbl-muted: #65D0FA;
  --hbl-accent: #32A0CB;
  --hbl-radius: 16px;
  color: var(--hbl-text);
  scroll-margin-top: 120px;
}
.hbl *{ box-sizing: border-box; }
.hbl p{ margin: 0; }
.hbl h2, .hbl h3{ margin: 0; color: #FAFDFF; font-family: inherit; letter-spacing: normal; }
.hbl a{ text-decoration: none; }

.hbl-cat{ font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--hbl-accent); }
.hbl-date{ font-size: 12.5px; color: var(--hbl-muted); }

/* ---------- ปุ่มหมวด ---------- */
.hbl-filter{ display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.hbl a.hbl-pill,
.hbl a.hbl-pill:visited{
  display: inline-flex; align-items: center; height: 34px; padding: 0 16px; border-radius: 999px;
  font-size: 14px; line-height: 1; color: var(--hbl-muted);
  border: 1px solid var(--hbl-line); background: rgba(255,255,255,.03);
  transition: color .2s, border-color .2s, background-color .2s;
}
.hbl a.hbl-pill:hover{ color: #FAFDFF; border-color: rgba(92,192,234,.45); }
.hbl a.hbl-pill.is-active{ color: #FAFDFF; background: rgba(92,192,234,.22); border-color: rgba(92,192,234,.6); }
.hbl a.hbl-pill:focus-visible{ outline: 2px solid var(--hbl-accent); outline-offset: 2px; }

/* ---------- บทความเด่น ---------- */
.hbl-feature{
  display: grid; grid-template-columns: minmax(0, 47%) minmax(0, 1fr);
  border: 1px solid var(--hbl-line); border-radius: var(--hbl-radius); overflow: hidden;
  background: var(--hbl-card); margin-bottom: 30px;
}
.hbl-feature__media{ position: relative; display: block; min-height: 280px; aspect-ratio: 3 / 2; background: #0b1216; overflow: hidden; }
.hbl-feature__media img{ position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; transition: transform .6s ease; }
.hbl-feature:hover .hbl-feature__media img{ transform: scale(1.03); }
.hbl-badge{
  position: absolute; top: 14px; left: 14px; padding: 5px 12px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  background: rgba(10,22,36,.82); color: #FAFDFF; border: 1px solid rgba(92,192,234,.5);
}
.hbl-feature__body{ display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 40px clamp(24px, 6%, 70px); min-width: 0; }
.hbl-meta{ display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.hbl .hbl-feature__title{ font-size: clamp(20px, 2.1vw, 26px); font-weight: 600; line-height: 1.45; }
.hbl .hbl-feature__title a{ color: #FAFDFF; }
.hbl .hbl-feature__title a:hover{ color: var(--hbl-accent); }
.hbl-feature__desc{
  font-size: 15px; line-height: 1.75; color: var(--hbl-muted);
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------- การ์ด ---------- */
.hbl-grid{ display: grid; grid-template-columns: repeat(var(--hbl-cols, 4), minmax(0, 1fr)); gap: 16px; }
.hbl a.hbl-card,
.hbl a.hbl-card:visited{
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--hbl-line); border-radius: var(--hbl-radius);
  background: var(--hbl-card); color: var(--hbl-text);
  transition: border-color .2s;
}
.hbl a.hbl-card:hover{ border-color: rgba(92,192,234,.45); color: var(--hbl-text); }
.hbl a.hbl-card:focus-visible{ outline: 2px solid var(--hbl-accent); outline-offset: 3px; }
.hbl-card__media{ aspect-ratio: 5 / 4; overflow: hidden; background: #0b1216; }
.hbl-card__media img{ display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; transition: transform .5s ease; }
.hbl-card:hover .hbl-card__media img{ transform: scale(1.04); }
.hbl-card__body{ flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 18px 16px 20px; }
.hbl .hbl-card__title{
  font-size: 15px; font-weight: 600; line-height: 1.5; color: #FAFDFF;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hbl-card__desc{
  font-size: 12.5px; line-height: 1.6; color: var(--hbl-muted);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.hbl-card__body .hbl-date{ margin-top: auto; padding-top: 6px; }

/* ---------- แบ่งหน้า ---------- */
.hbl-pager{ display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 36px; }
.hbl a.hbl-pager__btn,
.hbl span.hbl-pager__btn{
  display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--hbl-line); color: var(--hbl-text); font-size: 14px;
}
.hbl a.hbl-pager__btn:hover{ border-color: rgba(92,192,234,.5); color: #FAFDFF; }
.hbl span.hbl-pager__btn.is-current{ background: rgba(92,192,234,.22); border-color: rgba(92,192,234,.6); color: #FAFDFF; }
.hbl-pager__gap{ color: var(--hbl-muted); padding: 0 4px; }

.hbl-empty{ padding: 40px 0; text-align: center; color: var(--hbl-muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px){
  .hbl-grid{ --hbl-cols: 3 !important; }
}
@media (max-width: 767px){
  .hbl-filter{ flex-wrap: nowrap; overflow-x: auto; margin: 0 -18px 16px; padding: 0 18px 2px; scrollbar-width: none; }
  .hbl-filter::-webkit-scrollbar{ display: none; }
  .hbl a.hbl-pill{ flex: 0 0 auto; }
  .hbl-feature{ grid-template-columns: 1fr; }
  .hbl-feature__media{ min-height: 0; }
  .hbl-feature__body{ padding: 22px 20px 24px; }
  .hbl-grid{ --hbl-cols: 2 !important; gap: 12px; }
  .hbl-card__body{ padding: 14px 12px 16px; }
}
@media (max-width: 480px){
  .hbl-grid{ --hbl-cols: 1 !important; }
}
@media (prefers-reduced-motion: reduce){
  .hbl-feature__media img, .hbl-card__media img{ transition: none; }
}
