
/* V158 - Featured news card fix
   Only enlarge the image container.
   Never set aspect-ratio/height/overflow on the whole article link. */

/* Reset the article/link so date, title and "Xem thêm" always remain visible */
body:not(.admin-layout) .v117-news-grid article{
  height:auto!important;
  min-height:0!important;
  overflow:hidden!important;
}

body:not(.admin-layout) .v117-news-grid article > a{
  display:block!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  aspect-ratio:auto!important;
  overflow:visible!important;
  color:inherit!important;
  text-decoration:none!important;
}

/* Desktop: taller image only */
@media(min-width:1200px){
  body:not(.admin-layout) .v117-news-grid .v117-news-img{
    display:block!important;
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    aspect-ratio:16 / 10!important;
    overflow:hidden!important;
    background:#f5f5f5!important;
  }
}

/* Tablet */
@media(min-width:768px) and (max-width:1199px){
  body:not(.admin-layout) .v117-news-grid .v117-news-img{
    display:block!important;
    width:100%!important;
    height:auto!important;
    aspect-ratio:16 / 10!important;
    overflow:hidden!important;
  }
}

/* Mobile */
@media(max-width:767px){
  body:not(.admin-layout) .v117-news-grid .v117-news-img{
    display:block!important;
    width:100%!important;
    height:auto!important;
    aspect-ratio:16 / 9!important;
    overflow:hidden!important;
  }
}

/* Image fills only its media box */
body:not(.admin-layout) .v117-news-grid .v117-news-img > img,
body:not(.admin-layout) .v117-news-grid .v117-news-img > .image-placeholder{
  display:block!important;
  width:100%!important;
  height:100%!important;
  max-width:none!important;
  object-fit:cover!important;
  object-position:center center!important;
}

/* Preserve the text block under the image */
body:not(.admin-layout) .v117-news-grid .v117-news-body{
  display:block!important;
  position:relative!important;
  height:auto!important;
  min-height:112px!important;
  overflow:visible!important;
  padding:12px 14px 14px!important;
  background:#fff!important;
}

body:not(.admin-layout) .v117-news-grid .v117-news-body time{
  display:block!important;
  height:auto!important;
  margin:0 0 6px!important;
}

body:not(.admin-layout) .v117-news-grid .v117-news-body h3{
  display:-webkit-box!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:2!important;
  height:auto!important;
  min-height:40px!important;
  max-height:44px!important;
  overflow:hidden!important;
  margin:0 0 10px!important;
}

body:not(.admin-layout) .v117-news-grid .v117-news-body > span{
  display:flex!important;
  align-items:center!important;
  width:max-content!important;
  height:auto!important;
  overflow:visible!important;
  margin:0!important;
}

/* Mobile text area remains compact but fully visible */
@media(max-width:767px){
  body:not(.admin-layout) .v117-news-grid .v117-news-body{
    min-height:100px!important;
    padding:9px!important;
  }

  body:not(.admin-layout) .v117-news-grid .v117-news-body h3{
    min-height:34px!important;
    max-height:38px!important;
  }
}
