/* 33dy-like news archive layout (tv.hanfan.net)
   IMPORTANT: template uses .hfnews-thumbrow / .hfnews-thumb classes.
*/

.hfnews-wrap{max-width:1400px;margin:0 auto;padding:0 20px}
.hfnews-grid{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:28px;align-items:start}

/* Header */
.hfnews-header{display:flex;align-items:flex-end;justify-content:space-between;margin:10px 0 14px}
.hfnews-title{font-size:28px;line-height:1.15;margin:0}
.hfnews-breadcrumb{font-size:12px;opacity:.7;margin:0 0 6px}

/* Sub-category tabs (second-level) */
.hfnews-subcats{display:flex;flex-wrap:wrap;gap:10px;padding:14px 16px;border-radius:16px;background:rgba(255,255,255,.92);backdrop-filter:saturate(1.1) blur(8px);box-shadow:0 10px 30px rgba(17,24,39,.08);border:1px solid rgba(17,24,39,.06)}
.hfnews-subcats .hfnews-tab{display:inline-flex;align-items:center;gap:8px;padding:9px 14px;border:1px solid rgba(17,24,39,.10);border-radius:999px;font-size:13px;line-height:1;color:#111827;text-decoration:none;background:rgba(17,24,39,.03)}
.hfnews-subcats .hfnews-tab:hover{background:rgba(11,120,209,.08);border-color:rgba(11,120,209,.22)}
.hfnews-subcats .hfnews-tab.is-active{background:rgba(11,120,209,.12);border-color:rgba(11,120,209,.35);color:#0b78d1}

/* Post card */
.hfnews-post{background:#fff;border-radius:16px;padding:18px 18px 16px;box-shadow:0 10px 30px rgba(17,24,39,.08);border:1px solid rgba(17,24,39,.06);margin-bottom:18px}
.hfnews-post h2{font-size:22px;line-height:1.25;margin:0 0 8px}
.hfnews-post h2 a{text-decoration:none}
.hfnews-meta{display:flex;flex-wrap:wrap;gap:10px;font-size:12px;opacity:.7;margin-bottom:10px}

/* Featured area: left thumb + right excerpt */
.hfnews-featured{display:grid;grid-template-columns:320px minmax(0,1fr);gap:16px;align-items:start}
.hfnews-featured .hfnews-hero{border-radius:10px;overflow:hidden;background:#eee;aspect-ratio:16/9}
.hfnews-featured .hfnews-hero img{width:100%;height:100%;object-fit:cover;display:block}
.hfnews-featured .hfnews-excerpt{font-size:13px;line-height:1.65;opacity:.85}

/* Inline 3-thumbs row (critical fix: force horizontal alignment) */
.hfnews-thumbrow{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:10px}
.hfnews-thumb{border-radius:10px;overflow:hidden;background:#eee;aspect-ratio:16/9;min-height:90px}
.hfnews-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.hfnews-thumb.is-empty{background:#f2f2f2}

/* Sidebar */
.hfnews-sidebar{position:sticky;top:88px}
.hfnews-sidebox{background:#fff;border-radius:12px;padding:14px;box-shadow:0 1px 0 rgba(0,0,0,.04);margin-bottom:16px;overflow:hidden}
.hfnews-sidebox h3{font-size:15px;margin:0 0 10px;display:flex;align-items:center;gap:8px}
.hfnews-sidebox h3:before{content:'';width:10px;height:10px;border-radius:50%;background:#ff6a00;display:inline-block}

/* Hot list like 33dy: circle rank + single line title */
.hfnews-hotlist{list-style:none;margin:0;padding:0}
.hfnews-hotlist li{display:flex;align-items:center;gap:10px;padding:8px 0;border-bottom:1px solid #f1f1f1}
.hfnews-hotlist li:last-child{border-bottom:none}
.hfnews-rank{width:22px;height:22px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;background:#f0f0f0;color:#666;flex:0 0 22px}
.hfnews-hotlist li:nth-child(1) .hfnews-rank{background:#ff5b5b;color:#fff}
.hfnews-hotlist li:nth-child(2) .hfnews-rank{background:#ff8a00;color:#fff}
.hfnews-hotlist li:nth-child(3) .hfnews-rank{background:#ffc400;color:#fff}
.hfnews-hotlist a{display:block;min-width:0;flex:1;color:#333;text-decoration:none;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hfnews-hotlist a:hover{color:#0b78d1}

/* Small poster grid in sidebar (hot vod / recent) */
.hfnews-mini-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.hfnews-mini-item{display:block;text-decoration:none;color:#333}
.hfnews-mini-item .pic{border-radius:10px;overflow:hidden;background:#eee;aspect-ratio:2/3}
.hfnews-mini-item img{width:100%;height:100%;object-fit:cover;display:block}
.hfnews-mini-item .t{margin-top:6px;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* Pagination */
.hfnews-pagination{display:flex;gap:8px;justify-content:center;margin:18px 0 28px}
.hfnews-pagination .page-numbers{display:inline-flex;align-items:center;justify-content:center;min-width:34px;height:34px;border-radius:8px;border:1px solid #eee;background:#fff;text-decoration:none;font-size:13px}
.hfnews-pagination .current{background:#0b78d1;border-color:#0b78d1;color:#fff}

/* Responsive */
@media (max-width:1200px){
  .hfnews-grid{grid-template-columns:minmax(0,1fr) 320px}
}
@media (max-width:980px){
  .hfnews-grid{grid-template-columns:1fr}
  .hfnews-sidebar{position:static;top:auto}
  .hfnews-featured{grid-template-columns:1fr}
  .hfnews-thumbrow{grid-template-columns:repeat(2,1fr)}
}
@media (max-width:560px){
  .hfnews-title{font-size:22px}
  .hfnews-post h2{font-size:18px}
  .hfnews-thumbrow{grid-template-columns:1fr}
}


/* Defensive resets for sidebar media */
.hfnews-sidebox img{max-width:100%;height:auto}
.hfnews-sidebox a{max-width:100%}

/* strict overrides for sidebar grids */
.hfnews-mini-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;overflow:hidden}
.hfnews-mini-item{display:block;text-decoration:none;color:#333;min-width:0}
.hfnews-mini-item .pic{display:block;width:100%;position:relative;border-radius:10px;overflow:hidden;background:#eee;aspect-ratio:2/3}
.hfnews-mini-item .pic img{position:absolute;inset:0;width:100% !important;height:100% !important;object-fit:cover;display:block}
.hfnews-mini-item .name{display:block;margin-top:6px;font-size:12px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hfnews-mini-item .meta{font-size:11px;color:#999;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* sidebar image guard */
.hfnews-sidebar img{max-width:100% !important;height:auto !important}

/* =====================
   Single news (detail)
   ===================== */
.hfnews-single .hfnews-grid{margin-top:10px}
.hfnews-single .hfnews-post{padding:18px}
.hfnews-single .hfnews-title{letter-spacing:.2px}
.hfnews-single .hfnews-breadcrumb a{text-decoration:none;color:#333}
.hfnews-single .hfnews-breadcrumb a:hover{color:#0b78d1}
.hfnews-content{font-size:14px;line-height:1.9;color:#222}
.hfnews-content h2,.hfnews-content h3{margin:18px 0 10px;line-height:1.35}
.hfnews-content p{margin:0 0 14px}
.hfnews-content img{max-width:100%;height:auto;border-radius:10px}
.hfnews-content a{color:#0b78d1}
.hfnews-content blockquote{margin:14px 0;padding:10px 14px;border-left:4px solid #0b78d1;background:#f6fbff;border-radius:10px}

/* Header typography polish */
.hfnews-title{color:#111827;letter-spacing:.2px}
.hfnews-post h2 a{color:#111827}
.hfnews-post h2 a:hover{color:#0b78d1}

/* Sidebar blocks match new card look */
.hfnews-sidebox{border:1px solid rgba(17,24,39,.06);box-shadow:0 10px 30px rgba(17,24,39,.08)}
.hfnews-sidebox h3:before{background:#0b78d1}

/* Featured hero slightly rounded and shadow */
.hfnews-featured .hfnews-hero{box-shadow:0 8px 18px rgba(17,24,39,.10)}
