/* ===== FEED STYLES (global) ===== */
.tag-filters {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
.tag-filters select {
  padding: 8px 12px;
  background: #222;
  border: 1px solid #FFD700;
  color: #FFD700;
  border-radius: 6px;
}

.feed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.feed-card {
  background: #222;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #FFD700;
  display: flex;
  flex-direction: column;
}
.feed-card img {
  width: 100%;
  height: auto;
  display: block;
}
.feed-card-content { padding: 15px; }
.feed-card-title { font-weight: 700; font-size: 18px; margin-bottom: 8px; color: #FFD700; }
.feed-card-desc { font-size: 14px; color: #ccc; }

.feed-card-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-start;
  padding: 10px;
  border-top: 1px solid #444;
  background: #111;
}
.feed-card-actions button {
  background: none;
  color: #FFD700;
  border: none;
  cursor: pointer;
}
.feed-card-actions button:hover { text-decoration: underline; }

/* ===== Newsfeed: ảnh vuông đẹp ===== */
.media-square {
  position: relative;
  width: 100%;
  padding-top: 100%;        /* 1:1 */
  background: #000;
  overflow: hidden;
}
.media-square > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}
/* Nếu lỡ có <img> ngoài .media-square thì ẩn đi để không tạo khoảng đen */
/* Đảm bảo rule cũ không đè chiều cao ảnh Newsfeed */
#section-0 .feed-card img { height: auto !important; }

/* ===== Comment area (Newsfeed) ===== */
.comment-area { border-top: 1px solid #333; }
.cmt-list { padding: 10px; display: grid; gap: 8px; }
.cmt-list .cmt-item {
  background:#1a1a1a; border:1px solid #333;
  border-radius:8px; padding:8px;
}
.comment-box { padding: 10px; border-top: 1px solid #222; }
.comment-box input, .comment-box textarea {
  width: 100%; padding: 8px; background:#000; color:#fff;
  border:1px solid #555; border-radius:6px;
}
.comment-box .actions { margin-top:8px; display:flex; gap:8px; justify-content:flex-end; }
.comment-box .btn-cmt-cancel {
  background:#222; border:1px solid #444; color:#fff; padding:8px 12px; border-radius:6px;
}
.comment-box .btn-cmt-send {
  background:#FFD700; border:1px solid #FFD700; color:#000; padding:8px 12px; border-radius:6px; font-weight:700;
}

/* ===== POST DETAIL PAGE ===== */
.post-title { font-size: 24px; font-weight: 700; color: #FFD700; margin: 20px 0 10px; }
.post-meta  { font-size: 14px; color: #aaa; margin-bottom: 20px; }
.post-content { font-size: 16px; color: #eee; line-height: 1.6; }
.post-content ul { padding-left: 20px; margin: 10px 0; }
.post-content li { margin-bottom: 6px; }
.post-image img { width: 100%; border-radius: 8px; margin: 20px 0; }

.post-actions { display: flex; gap: 10px; margin: 20px 0; }
.post-actions button {
  background:#222; color:#FFD700; border:1px solid #FFD700;
  padding:8px 12px; border-radius:6px; cursor:pointer;
}
.post-actions button:hover { background:#333; }

.comments h3 { color:#FFD700; margin-top:40px; }
.comment { margin:10px 0; font-size:14px; color:#eee; }

.add-comment textarea {
  width:100%; padding:10px; background:#111; border:1px solid #444;
  color:#fff; border-radius:6px; resize:vertical; margin-top:10px;
}
.add-comment button {
  margin-top:10px; padding:6px 12px; background:#FFD700; color:#000;
  border:none; border-radius:6px; cursor:pointer;
}

.related h3 { margin-top:40px; color:#FFD700; }
.related-grid { display:flex; gap:16px; flex-wrap:wrap; margin-top:10px; }
.related-card {
  background:#111; border:1px solid #FFD700; padding:10px;
  border-radius:6px; flex:1 1 calc(33.33% - 16px); color:#eee;
}
.related-card img { width:100%; border-radius:6px; margin-bottom:8px; }

/* ===== Nội dung bài viết: chống vỡ layout khi có figure/iframe, table ===== */
.post-wrap { max-width: 980px; margin: 24px auto; padding: 0 16px; }
.post-body, .post-body * { box-sizing: border-box; }
.post-body img {
  display:block; max-width:100% !important; height:auto !important;
  width:auto !important; margin:12px auto;
}
.post-body figure { margin:16px auto; max-width:100%; }
.post-body figure img { max-width:100% !important; height:auto !important; }
.post-body figcaption { color:#bbb; font-size:13px; text-align:center; margin-top:6px; }
.post-body iframe, .post-body video {
  max-width:100% !important; width:100% !important; height:auto !important;
  display:block; margin:12px auto;
}
.post-body table { width:100%; max-width:100%; overflow:auto; display:block; border-collapse:collapse; }
.post-body table td, .post-body table th { border:1px solid #333; padding:6px 8px; }
.post-body [style*="width:"] { max-width:100% !important; }

/* ==== NEWSFEED FULL-BLEED (kiểu Facebook) ==== */
/* Chỉ áp dụng cho tab Newsfeed (#section-0) trên màn hình nhỏ */
@media (max-width: 768px) {
  /* bỏ padding 2 bên của content-section để bám sát mép màn hình */
  #section-0 {
    padding: 0 !important;
  }

  /* cho grid chiếm toàn bộ viewport width và “phá lồng” khỏi container */
  #section-0 .feed-grid {
    grid-template-columns: 1fr;      /* 1 cột full width */
    gap: 12px;                        /* hoặc 0 nếu muốn sát nhau */
    width: 100vw;                     /* đúng bề ngang màn hình */
    margin-left: calc(-50vw + 50%);   /* trick full-bleed */
    margin-right: 0;
  }

  /* card tràn mép, bỏ bo góc & viền bên */
  #section-0 .feed-card {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    box-shadow: none;
  }

  /* hàng hành động nhìn gọn như FB */
  #section-0 .feed-card-actions {
    justify-content: space-between;
    gap: 0;
  }

  /* ảnh chính: full-bleed + vuông (nếu bạn đang dùng .media-square) */
  #section-0 .media-square {
    width: 100%;
    padding-top: 100%;   /* 1:1 */
  }
  #section-0 .media-square > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /* nếu lỡ còn <img> đứng trực tiếp trong .feed-card thì ẩn để không tạo khoảng đen */
  #section-0 .feed-card > img { display: none !important; }

  /* đảm bảo mọi ảnh khác trong Newsfeed không bị ép chiều cao kỳ lạ */
  #section-0 .feed-card img { height: auto !important; }
}

/* === ẢNH NGUYÊN TỶ LỆ (không ép vuông) === */
#section-0 .post-media {
  display:block;
  width:100%;
  height:auto;            /* giữ đúng tỷ lệ ảnh */
  object-fit:contain;     /* không crop */
  background:#000;        /* nền khi ảnh có viền trắng */
}

/* === Header tác giả nhẹ nhàng === */
#section-0 .fb-header{
  display:flex;align-items:center;gap:8px;
  padding:8px 12px 0;
}
#section-0 .fb-avatar{
  width:22px;height:22px;border-radius:50%;object-fit:cover;
}
#section-0 .fb-author{
  font-size:14px;font-weight:600;color:#fff;
  background:rgba(0,0,0,.35);padding:2px 6px;border-radius:4px;
}
#section-0 .fb-title-link{ color:#FFD700; text-decoration:none; }

/* === Dòng số liệu giống Facebook (reactions/comments) === */
#section-0 .fb-stats{
  display:flex;justify-content:space-between;align-items:center;
  padding:8px 12px;color:#ccc;font-size:13.5px;
  border-top:1px solid #2a2a2a;border-bottom:1px solid #2a2a2a;
  background:#1a1a1a;
}
#section-0 .fb-stats .left{display:flex;align-items:center;gap:6px;}
#section-0 .fb-stats .right{display:flex;align-items:center;gap:6px;}
#section-0 .fb-stats .label{color:#888;}
#section-0 .react-bubble{
  display:inline-flex;align-items:center;justify-content:center;
  width:18px;height:18px;border-radius:50%;
  background:#1877f2; color:#fff; font-size:11px;
}

/* === Thanh 3 nút hành động như Facebook === */
#section-0 .fb-actions{
  display:grid; grid-template-columns:repeat(3,1fr);
  align-items:center; text-align:center;
  background:#111; color:#FFD700;
  border-bottom:1px solid #2a2a2a;
}
#section-0 .fb-actions button{
  display:flex; align-items:center; justify-content:center; gap:8px;
  padding:10px 0; border:0; background:transparent; color:#FFD700;
  font-weight:600; cursor:pointer;
}
#section-0 .fb-actions button:active{ background:#222; }

/* === Newsfeed full-bleed trên mobile (tràn mép như Facebook) === */
@media (max-width: 768px){
  #section-0{ padding:0 !important; }
  #section-0 .feed-grid{
    grid-template-columns:1fr;
    gap:12px;
    width:100vw; margin-left:calc(-50vw + 50%);
  }
  #section-0 .fb-card{
    border-radius:0; border-left:0; border-right:0; box-shadow:none;
  }
}

/* an toàn: nếu lỡ còn <img> dư bên ngoài, ẩn nó */
#section-0 .feed-card > img:not(.post-media){ display:none !important; }

#section-0 .feed-card > img.post-media {
  display:block !important;
  width:100%;
  height:auto;
  object-fit:cover;
}

/* ==== THEME SÁNG CHO NEWSFEED (HOME) ==== */
:root{
  --nf-bg:#f6f7fb;
  --nf-card:#fff;
  --nf-line:#e9e9ee;
  --nf-text:#1c1d22;
  --nf-muted:#7a7d86;
  --nf-gold:#FFD700;
  --nf-like:#ff364e;
  --nf-view:#a0a4ad;
}

body{ background:#111; }             /* Giữ nền tổng thể (banner) */
#section-0{ background:var(--nf-bg); }

/* Tabs nổi trên nền sáng */
.horizontal-menu{
  background:#111; border-bottom:2px solid var(--nf-gold);
}
.horizontal-menu button{
  color:#fff; opacity:.9;
}
.horizontal-menu button.active{
  background:var(--nf-gold); color:#111; font-weight:700;
}

/* Lưới feed */
#section-0 .feed-grid{
  grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
  gap:16px; padding:14px;
}

/* Card trắng, bóng nhẹ */
#section-0 .fb-card{
  background:var(--nf-card);
  border:1px solid var(--nf-line);
  border-radius:14px;
  color:var(--nf-text);
  box-shadow:0 6px 22px rgba(0,0,0,.06);
  overflow:hidden;
}

/* Ảnh đầu bài giữ tỷ lệ, bo tròn nhẹ */
#section-0 .post-media{
  display:block; width:100%; height:auto;
  aspect-ratio:16/9; object-fit:cover;
  background:#000;
}

/* Header tác giả */
#section-0 .fb-header{
  display:flex; align-items:center; gap:10px;
  padding:12px 14px 4px;
}
#section-0 .fb-avatar{
  width:32px; height:32px; border-radius:50%; object-fit:cover;
  border:1px solid #fff; box-shadow:0 1px 3px rgba(0,0,0,.08);
}
#section-0 .fb-author{
  font-weight:700; color:var(--nf-text);
}

/* Nội dung */
#section-0 .feed-card-content{ padding:10px 14px 6px; }
#section-0 .fb-title-link{
  color:#101114; font-size:18px; font-weight:800; text-decoration:none;
}
#section-0 .fb-title-link:hover{ text-decoration:underline; }
#section-0 .feed-card-desc{ color:var(--nf-muted); margin-top:6px; }

/* Thống kê dưới ảnh (like/comment) */
#section-0 .fb-stats{
  display:flex; justify-content:space-between; align-items:center;
  padding:10px 14px; border-top:1px solid var(--nf-line); background:#fff;
}
#section-0 .fb-stats .left{ display:flex; align-items:center; gap:8px; }
#section-0 .react-bubble{
  display:inline-flex; align-items:center; justify-content:center;
  width:22px; height:22px; border-radius:50%;
  background:var(--nf-like); color:#fff; font-size:12px; font-weight:700;
}
#section-0 .like-count{ color:#333; font-weight:700; }
#section-0 .fb-stats .right{ color:var(--nf-muted); }
#section-0 .fb-stats .right .comment-count{ font-weight:700; color:#333; }

/* Thanh hành động dưới cùng */
#section-0 .fb-actions{
  display:grid; grid-template-columns:repeat(3,1fr);
  border-top:1px solid var(--nf-line); background:#fff;
}
#section-0 .fb-actions button{
  appearance:none; border:0; background:#fff; color:#222;
  padding:12px 4px; font-weight:700; cursor:pointer;
}
#section-0 .fb-actions button span{ opacity:.9; }
#section-0 .fb-actions button:active{ background:#f3f4f7; }
#section-0 .btn-like b{ color:var(--nf-like); }
#section-0 .btn-share b{ color:#111; }

/* Mobile full-bleed */
@media (max-width: 768px){
  #section-0{ padding:0 !important; }
  #section-0 .feed-grid{
    grid-template-columns:1fr; gap:12px;
    width:100vw; margin-left:calc(-50vw + 50%);
    padding-left:0; padding-right:0;
  }
  #section-0 .fb-card{ border-radius:0; }
}

/* Fix: ẩn <img> thừa (nếu có) */
#section-0 .feed-card > img:not(.post-media){ display:none !important; }


/* Footer sáng */
.site-footer{
  background:#fff !important;
  border-top:1px solid rgba(0,0,0,.08);
  color:#1c1d22 !important;
}
.site-footer a{ color:#111; }

/* === Card sáng kiểu Facebook === */
.fb-card{
  background:#fff;
  border:1px solid #e5e5e5;
  border-radius:12px;
  overflow:hidden;
  box-shadow:0 2px 10px rgba(0,0,0,.05);
  margin-bottom:16px;
  font-family: Arial, sans-serif;
}

/* Header */
.fb-header{
  display:flex;align-items:center;gap:10px;
  padding:12px 14px 6px;
}
.fb-avatar{
  width:36px;height:36px;border-radius:50%;
  object-fit:cover; border:1px solid #ddd;
}
.fb-author{ font-weight:700; font-size:14px; color:#222; }
.fb-meta{ font-size:12px; color:#888; }

/* Nội dung */
.feed-card-content{ padding:8px 14px; }
.fb-title-link{
  color:#111; font-size:16px; font-weight:700;
  text-decoration:none;
}
.fb-title-link:hover{ text-decoration:underline; }
.feed-card-desc{ margin-top:6px; font-size:14px; color:#555; }

/* Ảnh */
.post-media{
  display:block; width:100%; height:auto;
  object-fit:cover; aspect-ratio:16/9;
}

/* Stats */
.fb-stats{
  display:flex;justify-content:space-between;align-items:center;
  padding:10px 14px;
  border-top:1px solid #eee; border-bottom:1px solid #eee;
  font-size:13px; color:#666;
}
.fb-stats .left{ display:flex;align-items:center;gap:6px; }
.react-bubble{
  width:20px;height:20px;border-radius:50%;
  background:#ff364e; color:#fff; display:flex;
  align-items:center;justify-content:center;
  font-size:12px;
}
.like-count{ font-weight:700; color:#222; }
.comment-count, .view-count{ font-size:13px; }

/* Actions */
.fb-actions{
  display:grid;grid-template-columns:repeat(3,1fr);
  text-align:center; background:#fff;
}
.fb-actions button{
  border:0;background:#fff;padding:10px 0;
  font-size:14px; font-weight:600; color:#444;
  display:flex;align-items:center;justify-content:center;gap:6px;
  cursor:pointer;
}
.fb-actions button:active{ background:#f2f2f2; }
.btn-like b{ color:#ff364e; }

.site-footer{
  background:#fff !important;
  border-top:1px solid rgba(0,0,0,.08);
  color:#1c1d22 !important;
}
.site-footer a{ color:#111; }



/* ===== FORCE LIGHT FEED (override) ===== */
#section-0{ background:#f6f7fb !important; }

#section-0 .feed-grid{
  grid-template-columns:repeat(auto-fit,minmax(320px,1fr)) !important;
  gap:16px !important;
  padding:14px !important;
}

/* Card trắng kiểu Facebook */
#section-0 .fb-card{
  background:#fff !important;
  border:1px solid #e9e9ee !important;
  border-radius:14px !important;
  color:#1c1d22 !important;
  box-shadow:0 6px 22px rgba(0,0,0,.06) !important;
  overflow:hidden !important;
}

/* Ẩn hoàn toàn các ảnh lạc chỗ do rule cũ */
#section-0 .feed-card > img:not(.post-media){ display:none !important; }

/* Ảnh 16:9 đúng như ảnh mẫu */
#section-0 .post-media{
  display:block !important;
  width:100% !important;
  height:auto !important;
  aspect-ratio:16/9 !important;
  object-fit:cover !important;
  background:#000 !important;
}

/* Header */
#section-0 .fb-header{
  display:flex !important; align-items:center !important; gap:10px !important;
  padding:12px 14px 6px !important;
}
#section-0 .fb-avatar{
  width:36px !important; height:36px !important; border-radius:50% !important;
  object-fit:cover !important; border:1px solid #ddd !important;
}
#section-0 .fb-author{ font-weight:700 !important; color:#1c1d22 !important; }
#section-0 .fb-meta{ font-size:12px; color:#8b8e97; }

/* Nội dung */
#section-0 .feed-card-content{ padding:8px 14px !important; }
#section-0 .fb-title-link{
  color:#111 !important; font-size:16px !important; font-weight:800 !important;
  text-decoration:none !important;
}
#section-0 .fb-title-link:hover{ text-decoration:underline !important; }
#section-0 .feed-card-desc{ color:#666 !important; }

/* Stats hàng giữa */
#section-0 .fb-stats{
  display:flex !important; justify-content:space-between !important; align-items:center !important;
  padding:10px 14px !important;
  border-top:1px solid #e9e9ee !important; border-bottom:1px solid #e9e9ee !important;
  background:#fff !important; color:#666 !important; font-size:13px !important;
}
#section-0 .fb-stats .left{ display:flex; align-items:center; gap:8px; }
#section-0 .react-bubble{
  width:20px; height:20px; border-radius:50%;
  background:#ff364e; color:#fff; display:flex; align-items:center; justify-content:center;
  font-size:12px; font-weight:700;
}
#section-0 .like-count{ color:#222; font-weight:700; }
#section-0 .fb-stats .right .comment-count{ color:#222; font-weight:700; }
#section-0 .fb-stats .right .view-count{ color:#a0a4ad; }

/* Thanh actions */
#section-0 .fb-actions{
  display:grid !important; grid-template-columns:repeat(3,1fr) !important;
  border-top:1px solid #e9e9ee !important; background:#fff !important;
}
#section-0 .fb-actions button{
  border:0 !important; background:#fff !important; color:#333 !important;
  padding:12px 4px !important; font-weight:700 !important;
  display:flex !important; align-items:center !important; justify-content:center !important; gap:6px !important;
  cursor:pointer;
}
#section-0 .fb-actions button:active{ background:#f3f4f7 !important; }
#section-0 .btn-like b{ color:#ff364e !important; }

/* Tabs trên cùng giữ nền tối nhưng chữ sáng */
.horizontal-menu{ background:#111 !important; border-bottom:2px solid #FFD700 !important; }
.horizontal-menu button{ color:#fff !important; opacity:.95; }
.horizontal-menu button.active{ background:#FFD700 !important; color:#111 !important; font-weight:700; }

/* Mobile full-bleed */
@media (max-width:768px){
  #section-0{ padding:0 !important; }
  #section-0 .feed-grid{
    grid-template-columns:1fr !important; gap:12px !important;
    width:100vw !important; margin-left:calc(-50vw + 50%) !important;
    padding-left:0 !important; padding-right:0 !important;
  }
  #section-0 .fb-card{ border-radius:0 !important; }
}


/* ==== FEED CARD SÁNG KIỂU MẠNG XÃ HỘI ==== */
.nf-card {
  background: #fff;
  border: 1px solid #e8e8ed;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
  overflow: hidden;
}
.nf-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid #f0f0f3;
  background: #fff;
}
.nf-head .l {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.nf-avt {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  border: 1px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.nf-name { font-weight: 700; color: #111; line-height: 1; }
.nf-sub { font-size: 12px; color: #888; margin-top: 2px; }
.nf-meta { font-size: 12px; color: #91939b; white-space: nowrap; }

.nf-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  background: #000;
}

.nf-body { padding: 10px 14px; }
.nf-title {
  font-weight: 800;
  color: #111;
  font-size: 17px;
  margin: 0 0 6px;
}
.nf-desc { color: #565a63; }

.nf-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-top: 1px solid #efeff3;
  background: #fff;
}
.nf-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #444;
  font-weight: 600;
}
.nf-badge svg { width: 18px; height: 18px; flex: none; }
.nf-like svg path { fill: #ff364e; }
.nf-view svg path { fill: #a0a4ad; }
.nf-cmt svg path { fill: #a0a4ad; }

.nf-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nf-share {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #FFD700;
  color: #000;
  border: 1px solid #FFD700;
  border-radius: 8px;
  padding: 7px 10px;
  font-weight: 700;
  cursor: pointer;
}
.nf-share svg { width: 16px; height: 16px; }

/* Lưới Newsfeed */
#section-0 .feed-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 768px) {
  #section-0 .feed-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px) {
  #section-0 .feed-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Ẩn img thừa */
.feed-card > img:not(.nf-img) { display: none !important; }


/* Footer sáng đồng bộ */
.site-footer{
  background:#fff !important; border-top:1px solid rgba(0,0,0,.08) !important;
  color:#1c1d22 !important;
}
.site-footer a{ color:#111 !important; }




/* ==== NEWSFEED CARD KIỂU FACEBOOK ==== */
.nf-card{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:10px;
  margin-bottom:0px;
  overflow:hidden;
  box-shadow:0 2px 6px rgba(0,0,0,.06);
}

/* Header */
.nf-head{
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 12px; font-size:13px; color:#555;
}
.nf-head-l{ display:flex; gap:10px; align-items:center; }
.nf-avt{ width:36px; height:36px; border-radius:50%; object-fit:cover; }
.nf-name{ font-weight:700; color:#111; font-size:14px; }
.nf-sub{ font-size:12px; color:#888; }
.nf-time{ font-size:12px; color:#999; }

/* Media */
.nf-media img{ display:block; width:100%; height:auto; }

/* Body */
.nf-body{ padding:10px 12px; font-size:14px; color:#111; }
.nf-desc{ margin:0; line-height:1.45; }
.nf-more{ color:#1877f2; font-weight:500; text-decoration:none; }

/* Footer */
.nf-footer{
  display:flex; justify-content:space-between; align-items:center;
  padding:8px 12px 10px;
  border-top:1px solid #eee; font-size:14px;
}
.nf-stats span{ margin-right:14px; color:#444; }
.nf-stats i{ margin-right:4px; }
.nf-stats .fa-heart{ color:#e63946; }
.nf-stats .fa-comment{ color:#444; }
.nf-stats .fa-eye{ color:#777; }

/* Share button */
.nf-share{
  background:#FFD700; color:#111;
  border:none; border-radius:6px;
  padding:6px 12px; font-weight:700;
  cursor:pointer;
}
.nf-share i{ margin-right:4px; }
.nf-share:active{ transform:translateY(1px); }

.nf-card{
  background:#fff; border:1px solid #eaeaea; border-radius:12px;
  overflow:hidden; margin-bottom:0px; box-shadow:0 1px 6px rgba(0,0,0,.08);
}
.nf-head{display:flex;justify-content:space-between;align-items:center;padding:8px 12px;}
.nf-head-left{display:flex;align-items:center;gap:8px;}
.nf-avt{width:36px;height:36px;border-radius:50%;object-fit:cover;}
.nf-name{font-weight:700;color:#111;font-size:14px;}
.nf-sub{font-size:12px;color:#666;}
.nf-time{font-size:12px;color:#999;}

.nf-media img{display:block;width:100%;height:auto;}

.nf-body{padding:10px 14px;}
.nf-text{font-size:14px;color:#111;line-height:1.5;}
.nf-more{color:#007bff;text-decoration:none;font-weight:600;}

.nf-meta{display:flex;justify-content:space-between;align-items:center;
  padding:8px 12px;border-top:1px solid #eee;background:#fafafa;}
.nf-counters{display:flex;align-items:center;gap:12px;font-size:14px;color:#444;}
.nf-like{color:#e8413a;font-weight:700;}
.nf-cmt{color:#555;}
.nf-view{color:#777;}
.nf-share{background:#FFD700;border:0;border-radius:6px;padding:6px 12px;font-weight:700;cursor:pointer;}
.nf-share i{margin-right:4px;}


/* === Bar icon dưới bài (giống ảnh mẫu) === */
.meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-top: 1px solid #e5e7eb;
  background: #fff;
  font-size: 14px;
  color: #333;
}

.meta-bar .i-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.meta-bar .i-btn.like i { color: #e53935; font-size: 16px; }   /* tim đỏ */
.meta-bar .i-btn.comment i { color: #6b7280; font-size: 16px; } /* comment xám */
.meta-bar .i-view { display: inline-flex; align-items: center; gap: 6px; color:#6b7280; }
.meta-bar .i-view i { font-size: 16px; opacity:.7; }

.meta-bar .btn-share {
  background: #ffc10a;
  color: #111;
  border: 1px solid #e5a900;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}











/* === NEWSFEED: ảnh vuông tự crop (không bo góc) === */
#section-0 .nf-media {
  position: relative;
  width: 100%;
  padding-top: 100%;         /* 1:1 vuông */
  overflow: hidden;
  background: #000;          /* nền đen khi load */
}

#section-0 .nf-media > img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;         /* crop vừa khung */
  object-position: center;   /* cắt theo trung tâm */
  display: block;
}


/* ==== TAB MENU GIỐNG ẢNH MẪU (vàng active, xám nhạt inactive) ==== */
.horizontal-menu{
  background: #fff !important;
  border-bottom: 3px solid #FFD700 !important;   /* đường vàng dưới thanh */
  width: 100% !important;
}

.horizontal-menu button{
  background: #f2f2f2 !important;               /* nền xám nhạt mặc định */
  color: #333 !important;                         /* chữ xám đậm */
  border: none !important;
  border-right: 1px solid #e6e6e6 !important;     /* đường chia tab */
  padding: 12px 20px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  text-transform: uppercase;                      /* NEWS FEED, KHÁM PHÁ... */
  letter-spacing: .3px;
  cursor: pointer;
}

.horizontal-menu button:first-child{
  border-left: 1px solid #e6e6e6 !important;
}

.horizontal-menu button:not(.active):hover{
  background: #ececec !important;                /* hover nhẹ */
}

.horizontal-menu button.active{
  background: #FFD700 !important;                /* vàng đậm khi active */
  color: #000 !important;                         /* chữ đen */
  font-weight: 700 !important;
}



/* Hủy rule cũ để không bị ảnh hưởng */
#section-0 .feed-card img.post-media {
  aspect-ratio: initial !important;
  height: auto !important;
}

.meta-bar .btn-share i { font-size: 14px; }

.meta-bar .i-right-num {
  min-width: 28px;
  text-align: right;
  color: #6b7280;
}

/* === Bar icon dưới bài (giống ảnh) === */
.meta-bar{
  display:flex; align-items:center; justify-content:space-between;
  gap:12px; padding:10px 14px;
  border-top:1px solid #e9e9e9; background:#fff; color:#333; font-size:14px;
}
.meta-bar .i-btn{display:inline-flex;align-items:center;gap:8px;background:transparent;border:0;cursor:pointer;font:inherit;color:inherit;}
.meta-bar .i-btn.like i{ color:#e53935; font-size:16px; }        /* tim đỏ */
.meta-bar .i-btn.comment i{ color:#6b7280; font-size:16px; }     /* comment xám */
.meta-bar .i-view{display:inline-flex;align-items:center;gap:8px;color:#6b7280;}
.meta-bar .i-view i{font-size:16px;opacity:.7;}
.meta-bar .btn-share{
  background:#FFC10A; color:#111; border:1px solid #E5A900;
  padding:6px 12px; border-radius:8px; font-weight:700; cursor:pointer;
  display:inline-flex; align-items:center; gap:8px;
}
.meta-bar .i-right-num{ min-width:28px; text-align:right; color:#6b7280; }

/* Khối bình luận xổ xuống (sáng) */
.comment-area{border-top:1px solid #eee;background:#fafafa;}
.cmt-list{padding:10px;display:grid;gap:8px;}
.comment-box{padding:10px;border-top:1px solid #eee;}
.comment-box input,.comment-box textarea{width:100%;padding:10px;border:1px solid #dcdcdc;border-radius:8px;background:#fff;color:#111;}
.comment-box .actions{margin-top:8px;display:flex;gap:8px;justify-content:flex-end;}
.comment-box .btn-cmt-cancel{background:#f1f5f9;border:1px solid #e2e8f0;color:#111;padding:8px 12px;border-radius:8px;}
.comment-box .btn-cmt-send{background:#111;color:#fff;border:0;padding:8px 14px;border-radius:8px;font-weight:700;}




/* ===== Newsfeed comments – Facebook look (không đổi bố cục) ===== */
#section-0 .comment-area{
  background:#fff; border-top:1px solid #e9edf1;
}

#section-0 .cmt-list{
  padding:8px 12px; display:flex; flex-direction:column; gap:8px;
}

/* Mỗi comment là 1 "bubble" + avatar ảo bên trái */
#section-0 .cmt-list > div{
  position:relative;
  padding:10px 12px 10px 54px !important;   /* chừa trái cho avatar */
  background:#f0f2f5 !important;
  border:none !important;
  border-radius:18px !important;
  color:#101 !important;
  line-height:1.35;
}

/* Avatar ảo (nếu chưa có ảnh) */


/* Dòng tên + thời gian (nằm trong phần tử DIV đầu tiên) */
#section-0 .cmt-list > div > div:first-child{
  margin:0 0 2px 0;
  font-weight:700; color:#111 !important;
}
#section-0 .cmt-list > div > div:first-child span{
  color:#65676b !important; font-weight:400; font-size:12px;
  margin-left:6px;
}

/* Nội dung */
#section-0 .cmt-list > div > div:last-child{
  color:#111 !important;
}

/* Hàng nhập bình luận */
#section-0 .comment-box{
  background:#fff; border-top:1px solid #e9edf1;
  padding:10px 12px;
}
#section-0 .comment-box textarea{
  background:#f0f2f5; border:0; border-radius:18px;
  padding:10px 12px; min-height:42px; resize:vertical;
  color:#111;
}
#section-0 .comment-box .btn-cmt-cancel{
  background:#f3f4f6; border:1px solid #e5e7eb; color:#111;
}
#section-0 .comment-box .btn-cmt-send{
  background:#1877f2; border:1px solid #1877f2; color:#fff; font-weight:700;
}


/* FIX hiển thị comment không bị ẩn */
#section-0 .cmt-list > div {
  position: relative !important;
  padding: 8px 12px !important;
  background: #f9f9f9 !important;
  border: 1px solid #ddd !important;
  border-radius: 8px !important;
  color: #111 !important;
  line-height: 1.45 !important;
}

#section-0 .cmt-list > div > div {
  color: #111 !important;
  font-size: 14px !important;
}


/* === COMPACT FEED SPACING – KEEP THIS AT THE END === */
#section-0 .feed-grid{
  gap: 8px !important;                 /* khoảng cách giữa các bài */
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}

#section-0 .fb-card,
#section-0 .nf-card,
#section-0 .feed-card{
  margin-bottom: 0 !important;         /* tránh cộng dồn với gap */
}

@media (max-width: 768px){
  #section-0 .feed-grid{ gap: 6px !important; }  /* mobile sát hơn */
}