.dntv-related{
  --dntv-accent:#d71920;
  --dntv-accent-dark:#b51218;
  --dntv-text:#172033;
  --dntv-muted:#667085;
  --dntv-border:#e7ebef;
  margin:34px 0;
  padding:24px;
  border:1px solid var(--dntv-border);
  border-top:4px solid var(--dntv-accent);
  border-radius:18px;
  background:linear-gradient(180deg,#fff 0%,#fcfcfd 100%);
  box-shadow:0 10px 34px rgba(15,23,42,.075);
  clear:both;
}
.dntv-related__head{
  display:flex;
  align-items:center;
  gap:11px;
  margin:0 0 20px;
  padding:0 0 14px;
  border-bottom:1px solid #edf0f3;
  position:relative;
}
.dntv-related__head:after{
  content:"";
  position:absolute;
  left:0;
  bottom:-1px;
  width:92px;
  height:3px;
  border-radius:999px;
  background:var(--dntv-accent);
}
.dntv-related__icon{
  display:inline-flex;
  width:34px;
  height:34px;
  flex:0 0 34px;
  align-items:center;
  justify-content:center;
  border-radius:10px;
  background:rgba(215,25,32,.09);
  color:var(--dntv-accent);
  font-size:17px;
  font-weight:900;
}
.dntv-related__title{
  margin:0!important;
  font-size:22px!important;
  line-height:1.3!important;
  font-weight:800!important;
  letter-spacing:-.015em;
  color:#111827!important;
}
.dntv-related__grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.dntv-related__item{
  display:grid;
  grid-template-columns:140px minmax(0,1fr);
  gap:14px;
  min-width:0;
  align-items:start;
  padding:12px;
  border:1px solid transparent;
  border-radius:14px;
  transition:border-color .2s ease,box-shadow .2s ease,transform .2s ease,background-color .2s ease;
}
@media (hover:hover) and (pointer:fine){
  .dntv-related__item:hover{
    border-color:#e5e7eb;
    background:#fff;
    box-shadow:0 9px 24px rgba(15,23,42,.08);
    transform:translateY(-2px);
  }
}
.dntv-related__thumb{
  display:block;
  aspect-ratio:16/10;
  border-radius:12px;
  overflow:hidden;
  background:#eef2f7;
  box-shadow:inset 0 0 0 1px rgba(15,23,42,.04);
}
.dntv-related__thumb img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .25s ease}
@media (hover:hover) and (pointer:fine){.dntv-related__item:hover .dntv-related__thumb img{transform:scale(1.04)}}
.dntv-related__placeholder{height:100%;display:flex;align-items:center;justify-content:center;padding:10px;text-align:center;font-weight:800;color:#64748b;background:#f8fafc}
.dntv-related__body{min-width:0}
.dntv-related__cat{
  display:inline-flex;
  align-items:center;
  margin:0 0 7px;
  padding:3px 7px;
  border-radius:999px;
  background:rgba(215,25,32,.075);
  font-size:10.5px;
  line-height:1.25;
  font-weight:800;
  letter-spacing:.035em;
  text-transform:uppercase;
  color:var(--dntv-accent-dark);
}
.dntv-related__item-title{margin:0!important;font-size:16px!important;line-height:1.42!important;font-weight:800!important;letter-spacing:-.01em}
.dntv-related__item-title a{color:var(--dntv-text)!important;text-decoration:none!important;background-image:linear-gradient(var(--dntv-accent),var(--dntv-accent));background-size:0 1px;background-position:0 100%;background-repeat:no-repeat;transition:color .18s ease,background-size .22s ease}
@media (hover:hover) and (pointer:fine){.dntv-related__item-title a:hover{color:var(--dntv-accent)!important;background-size:100% 1px}}
.dntv-related__meta{margin-top:7px;color:#98a2b3;font-size:11.5px;font-weight:500}
.dntv-related__excerpt{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;margin:8px 0 0!important;color:var(--dntv-muted);font-size:13px;line-height:1.58}

/* 1 bài: card nổi bật kiểu editorial */
.dntv-related--count-1 .dntv-related__grid{grid-template-columns:1fr}
.dntv-related--count-1 .dntv-related__item{grid-template-columns:minmax(240px,40%) minmax(0,1fr);gap:22px;align-items:center;padding:0;border:0;background:#fff;box-shadow:0 8px 26px rgba(15,23,42,.07);overflow:hidden}
.dntv-related--count-1 .dntv-related__thumb{height:100%;min-height:205px;aspect-ratio:16/9;border-radius:0}
.dntv-related--count-1 .dntv-related__body{padding:20px 22px 20px 0}
.dntv-related--count-1 .dntv-related__item-title{font-size:22px!important;line-height:1.34!important}
.dntv-related--count-1 .dntv-related__excerpt{font-size:14px;line-height:1.65;-webkit-line-clamp:3;margin-top:10px!important}

/* 2 bài: hai card cân đối */
.dntv-related--count-2 .dntv-related__grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.dntv-related--count-2 .dntv-related__item{display:block;padding:0;border:1px solid #e9edf2;border-radius:15px;overflow:hidden;background:#fff;box-shadow:0 6px 18px rgba(15,23,42,.045)}
.dntv-related--count-2 .dntv-related__thumb{border-radius:0;aspect-ratio:16/9}
.dntv-related--count-2 .dntv-related__body{padding:15px 16px 17px}
.dntv-related--count-2 .dntv-related__item-title{font-size:17px!important;line-height:1.4!important}
.dntv-related--count-2 .dntv-related__excerpt{-webkit-line-clamp:2}

/* 3 bài: grid tạp chí */
.dntv-related--count-3 .dntv-related__grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.dntv-related--count-3 .dntv-related__item{display:block;padding:0;border:1px solid #edf0f3;border-radius:14px;overflow:hidden;background:#fff}
.dntv-related--count-3 .dntv-related__thumb{margin-bottom:0;aspect-ratio:16/10;border-radius:0}
.dntv-related--count-3 .dntv-related__body{padding:13px 14px 15px}
.dntv-related--count-3 .dntv-related__item-title{font-size:15px!important}
.dntv-related--count-3 .dntv-related__excerpt{-webkit-line-clamp:2}

/* 4 bài */
.dntv-related--count-4 .dntv-related__grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.dntv-related--count-4 .dntv-related__item{background:#fff;border-color:#f0f2f5}

/* 5+ bài: gọn hơn */
.dntv-related--count-many .dntv-related__grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.dntv-related--count-many .dntv-related__item{grid-template-columns:112px minmax(0,1fr);padding:9px}
.dntv-related--count-many .dntv-related__excerpt{-webkit-line-clamp:2}

.dntv-related--compact .dntv-related__grid{grid-template-columns:1fr;gap:0}
.dntv-related--compact .dntv-related__item{display:grid;grid-template-columns:105px minmax(0,1fr);padding:12px 0;border:0;border-bottom:1px solid #edf0f3;border-radius:0;background:transparent}
.dntv-related--compact .dntv-related__item:first-child{padding-top:0}
.dntv-related--compact .dntv-related__item:last-child{padding-bottom:0;border-bottom:0}
.dntv-related--compact .dntv-related__thumb{border-radius:10px}

.dntv-related--featured .dntv-related__grid{display:grid;grid-template-columns:1.28fr 1fr;gap:14px}
.dntv-related--featured .dntv-related__item--featured{grid-row:span 3;display:block;padding:0;border:1px solid #e9edf2;overflow:hidden;background:#fff}
.dntv-related--featured .dntv-related__item--featured .dntv-related__thumb{aspect-ratio:16/10;border-radius:0}
.dntv-related--featured .dntv-related__item--featured .dntv-related__body{padding:15px 16px 17px}
.dntv-related--featured .dntv-related__item:not(.dntv-related__item--featured){display:grid;grid-template-columns:120px 1fr;gap:12px;align-items:center;background:#fff}
.dntv-related--featured .dntv-related__item:not(.dntv-related__item--featured) .dntv-related__thumb{aspect-ratio:4/3}
.dntv-related--featured .dntv-related__item--featured .dntv-related__item-title{font-size:20px!important}
.dntv-related--featured .dntv-related__item--featured .dntv-related__excerpt{-webkit-line-clamp:3}

@media(max-width:900px){
  .dntv-related--count-3 .dntv-related__grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .dntv-related--count-3 .dntv-related__item:last-child{grid-column:1/-1;display:grid;grid-template-columns:150px 1fr;gap:14px}
  .dntv-related--count-3 .dntv-related__item:last-child .dntv-related__thumb{margin:0;border-radius:10px}
  .dntv-related--featured .dntv-related__grid{grid-template-columns:1fr}
  .dntv-related--featured .dntv-related__item--featured{grid-row:auto}
}

@media(max-width:767px){
  .dntv-related{margin:28px 0;padding:16px;border-radius:14px;border-top-width:3px;box-shadow:0 7px 22px rgba(15,23,42,.06)}
  .dntv-related__head{margin-bottom:15px;padding-bottom:11px}
  .dntv-related__head:after{width:72px;height:2px}
  .dntv-related__icon{width:30px;height:30px;flex-basis:30px;border-radius:9px;font-size:15px}
  .dntv-related__title{font-size:19px!important}
  .dntv-related__grid,.dntv-related--count-2 .dntv-related__grid,.dntv-related--count-3 .dntv-related__grid,.dntv-related--count-4 .dntv-related__grid,.dntv-related--count-many .dntv-related__grid{grid-template-columns:1fr;gap:12px}
  .dntv-related__item,.dntv-related--count-1 .dntv-related__item,.dntv-related--count-3 .dntv-related__item:last-child,.dntv-related--count-many .dntv-related__item{display:grid;grid-template-columns:112px minmax(0,1fr);gap:12px;align-items:start;padding:9px;border:1px solid #edf0f3;border-radius:12px;background:#fff;box-shadow:none;overflow:visible}
  .dntv-related--count-1 .dntv-related__thumb{height:auto;min-height:0;aspect-ratio:16/10;border-radius:10px}
  .dntv-related--count-1 .dntv-related__body{padding:0}
  .dntv-related--count-1 .dntv-related__item-title{font-size:16px!important}
  .dntv-related--count-1 .dntv-related__excerpt{-webkit-line-clamp:2;font-size:12.5px;line-height:1.5;margin-top:6px!important}
  .dntv-related--count-2 .dntv-related__item{display:grid;grid-template-columns:112px minmax(0,1fr);gap:12px;border:1px solid #edf0f3;border-radius:12px;overflow:visible;padding:9px}
  .dntv-related--count-2 .dntv-related__thumb{border-radius:10px;aspect-ratio:16/10}
  .dntv-related--count-2 .dntv-related__body,.dntv-related--count-3 .dntv-related__body{padding:0}
  .dntv-related--count-3 .dntv-related__item{display:grid;grid-template-columns:112px minmax(0,1fr);gap:12px;padding:9px;border-radius:12px;overflow:visible}
  .dntv-related--count-3 .dntv-related__item:last-child{grid-column:auto}
  .dntv-related--count-3 .dntv-related__thumb{margin:0;border-radius:10px}
  .dntv-related__item-title,.dntv-related--count-2 .dntv-related__item-title,.dntv-related--count-3 .dntv-related__item-title{font-size:15px!important}
  .dntv-related__cat{font-size:9.5px;margin-bottom:5px;padding:2px 6px}
  .dntv-related__meta{margin-top:5px}
  .dntv-related__excerpt{font-size:12.5px;line-height:1.5;margin-top:6px!important}
  .dntv-related--compact .dntv-related__item,.dntv-related--featured .dntv-related__item:not(.dntv-related__item--featured){grid-template-columns:94px minmax(0,1fr)}
  .dntv-related--featured .dntv-related__item--featured{display:grid;grid-template-columns:112px minmax(0,1fr);gap:12px;padding:9px;border-radius:12px;overflow:visible}
  .dntv-related--featured .dntv-related__item--featured .dntv-related__thumb{border-radius:10px}
  .dntv-related--featured .dntv-related__item--featured .dntv-related__body{padding:0}
  .dntv-related--featured .dntv-related__item--featured .dntv-related__item-title{font-size:15px!important}
}
@media(max-width:420px){
  .dntv-related{padding:14px}
  .dntv-related__item,.dntv-related--count-1 .dntv-related__item,.dntv-related--count-2 .dntv-related__item,.dntv-related--count-3 .dntv-related__item,.dntv-related--count-3 .dntv-related__item:last-child,.dntv-related--count-many .dntv-related__item,.dntv-related--featured .dntv-related__item--featured{grid-template-columns:96px minmax(0,1fr)}
  .dntv-related__thumb{border-radius:9px}
  .dntv-related__meta{display:none}
  .dntv-related__excerpt{-webkit-line-clamp:2}
}

/* v1.7.1 FIX: chống theme làm chữ chồng ảnh + giảm kích thước ảnh */
.dntv-related,
.dntv-related *{box-sizing:border-box}
.dntv-related__item,
.dntv-related__thumb,
.dntv-related__body,
.dntv-related__item-title,
.dntv-related__item-title a,
.dntv-related__excerpt,
.dntv-related__meta,
.dntv-related__cat{
  position:static!important;
  float:none!important;
  transform:none;
}
.dntv-related__item{overflow:hidden!important}
.dntv-related__thumb{
  position:relative!important;
  width:120px!important;
  height:78px!important;
  min-width:120px!important;
  max-width:120px!important;
  min-height:0!important;
  aspect-ratio:auto!important;
  flex:none!important;
  margin:0!important;
  border-radius:10px!important;
  overflow:hidden!important;
  z-index:1;
}
.dntv-related__thumb img{
  position:static!important;
  display:block!important;
  width:100%!important;
  height:100%!important;
  max-width:none!important;
  max-height:none!important;
  margin:0!important;
  object-fit:cover!important;
}
.dntv-related__body{
  display:block!important;
  min-width:0!important;
  width:auto!important;
  z-index:auto!important;
}
.dntv-related__item-title,
.dntv-related__item-title a,
.dntv-related__excerpt,
.dntv-related__meta,
.dntv-related__cat{
  width:auto!important;
  max-width:100%!important;
  left:auto!important;
  right:auto!important;
  top:auto!important;
  bottom:auto!important;
}
.dntv-related__item-title a{display:inline!important}

/* 1 bài: ảnh vừa phải, chữ luôn nằm bên cạnh */
.dntv-related--count-1 .dntv-related__item{
  display:grid!important;
  grid-template-columns:220px minmax(0,1fr)!important;
  gap:18px!important;
  align-items:center!important;
  padding:14px!important;
}
.dntv-related--count-1 .dntv-related__thumb{
  width:220px!important;
  min-width:220px!important;
  max-width:220px!important;
  height:138px!important;
  border-radius:12px!important;
}
.dntv-related--count-1 .dntv-related__body{padding:0!important}
.dntv-related--count-1 .dntv-related__item-title{font-size:20px!important}

/* 2–4 bài: card ngang nhỏ gọn, không dùng ảnh full-card */
.dntv-related--count-2 .dntv-related__item,
.dntv-related--count-3 .dntv-related__item,
.dntv-related--count-4 .dntv-related__item{
  display:grid!important;
  grid-template-columns:120px minmax(0,1fr)!important;
  gap:13px!important;
  align-items:start!important;
  padding:11px!important;
  overflow:hidden!important;
}
.dntv-related--count-2 .dntv-related__body,
.dntv-related--count-3 .dntv-related__body{padding:0!important}
.dntv-related--count-2 .dntv-related__thumb,
.dntv-related--count-3 .dntv-related__thumb,
.dntv-related--count-4 .dntv-related__thumb{
  width:120px!important;
  min-width:120px!important;
  max-width:120px!important;
  height:78px!important;
  border-radius:10px!important;
}

/* Featured: ảnh chính cũng được giới hạn, không chiếm quá nhiều chiều cao */
.dntv-related--featured .dntv-related__item--featured{
  display:grid!important;
  grid-template-columns:190px minmax(0,1fr)!important;
  gap:15px!important;
  padding:12px!important;
}
.dntv-related--featured .dntv-related__item--featured .dntv-related__thumb{
  width:190px!important;
  min-width:190px!important;
  max-width:190px!important;
  height:120px!important;
  border-radius:10px!important;
}
.dntv-related--featured .dntv-related__item--featured .dntv-related__body{padding:0!important}
.dntv-related--featured .dntv-related__item:not(.dntv-related__item--featured){
  grid-template-columns:108px minmax(0,1fr)!important;
}
.dntv-related--featured .dntv-related__item:not(.dntv-related__item--featured) .dntv-related__thumb{
  width:108px!important;min-width:108px!important;max-width:108px!important;height:70px!important;
}

@media(max-width:767px){
  .dntv-related{padding:14px!important}
  .dntv-related__item,
  .dntv-related--count-1 .dntv-related__item,
  .dntv-related--count-2 .dntv-related__item,
  .dntv-related--count-3 .dntv-related__item,
  .dntv-related--count-4 .dntv-related__item,
  .dntv-related--count-many .dntv-related__item,
  .dntv-related--featured .dntv-related__item--featured,
  .dntv-related--featured .dntv-related__item:not(.dntv-related__item--featured){
    display:grid!important;
    grid-template-columns:96px minmax(0,1fr)!important;
    gap:10px!important;
    align-items:start!important;
    padding:9px!important;
  }
  .dntv-related__thumb,
  .dntv-related--count-1 .dntv-related__thumb,
  .dntv-related--count-2 .dntv-related__thumb,
  .dntv-related--count-3 .dntv-related__thumb,
  .dntv-related--count-4 .dntv-related__thumb,
  .dntv-related--featured .dntv-related__item--featured .dntv-related__thumb,
  .dntv-related--featured .dntv-related__item:not(.dntv-related__item--featured) .dntv-related__thumb{
    width:96px!important;
    min-width:96px!important;
    max-width:96px!important;
    height:64px!important;
    border-radius:9px!important;
  }
  .dntv-related__item-title,
  .dntv-related--count-1 .dntv-related__item-title,
  .dntv-related--featured .dntv-related__item--featured .dntv-related__item-title{font-size:15px!important;line-height:1.38!important}
  .dntv-related__excerpt{font-size:12px!important;line-height:1.45!important;-webkit-line-clamp:2!important}
}
@media(max-width:420px){
  .dntv-related__cat{display:none!important}
  .dntv-related__item,
  .dntv-related--count-1 .dntv-related__item,
  .dntv-related--count-2 .dntv-related__item,
  .dntv-related--count-3 .dntv-related__item,
  .dntv-related--count-4 .dntv-related__item,
  .dntv-related--count-many .dntv-related__item,
  .dntv-related--featured .dntv-related__item--featured,
  .dntv-related--featured .dntv-related__item:not(.dntv-related__item--featured){grid-template-columns:88px minmax(0,1fr)!important}
  .dntv-related__thumb,
  .dntv-related--count-1 .dntv-related__thumb,
  .dntv-related--count-2 .dntv-related__thumb,
  .dntv-related--count-3 .dntv-related__thumb,
  .dntv-related--count-4 .dntv-related__thumb,
  .dntv-related--featured .dntv-related__item--featured .dntv-related__thumb,
  .dntv-related--featured .dntv-related__item:not(.dntv-related__item--featured) .dntv-related__thumb{width:88px!important;min-width:88px!important;max-width:88px!important;height:59px!important}
}
