/* V325 — Related articles on article detail
   Fix overflow into sidebar. Scoped only to article detail related block. */

body:not(.admin-body) .article-detail .v175-related-news{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  overflow:hidden!important;
  margin-top:28px!important;
  padding-top:20px!important;
  border-top:1px solid #dfe9e4!important;
  box-sizing:border-box!important;
}

body:not(.admin-body) .article-detail .v175-related-news>header{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:16px!important;
  margin-bottom:16px!important;
}

body:not(.admin-body) .article-detail .v175-related-news>header>div{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
}

body:not(.admin-body) .article-detail .v175-related-news>header h2{
  margin:0!important;
  color:#174a31!important;
  font-size:22px!important;
  line-height:1.25!important;
}

body:not(.admin-body) .article-detail .v175-related-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:22px!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  align-items:stretch!important;
  overflow:visible!important;
}

body:not(.admin-body) .article-detail .v175-related-grid>article{
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  margin:0!important;
  height:100%!important;
  overflow:hidden!important;
  border:1px solid #e2ebe6!important;
  border-radius:14px!important;
  background:#fff!important;
  box-shadow:0 5px 18px rgba(18,62,45,.04)!important;
}

body:not(.admin-body) .article-detail .v175-related-grid>article>a{
  display:flex!important;
  flex-direction:column!important;
  height:100%!important;
  color:inherit!important;
  text-decoration:none!important;
}

body:not(.admin-body) .article-detail .v175-related-grid>article>a>div:first-child{
  width:100%!important;
  aspect-ratio:16/9!important;
  overflow:hidden!important;
  background:#f2f6f4!important;
}

body:not(.admin-body) .article-detail .v175-related-grid>article img{
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  object-fit:cover!important;
  object-position:center!important;
  display:block!important;
}

body:not(.admin-body) .article-detail .v175-related-grid>article h2{
  margin:14px 16px 8px!important;
  color:#174a31!important;
  font-size:18px!important;
  line-height:1.45!important;
  font-weight:800!important;
  display:-webkit-box!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:2!important;
  overflow:hidden!important;
  min-height:52px!important;
}

body:not(.admin-body) .article-detail .v175-related-grid>article p{
  margin:0 16px 16px!important;
  color:#4f675e!important;
  font-size:14px!important;
  line-height:1.65!important;
  display:-webkit-box!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:3!important;
  overflow:hidden!important;
}

@media(min-width:901px){
  /* Related block spans only the article column, never the sidebar. */
  body:not(.admin-body) .article-detail.v175-news-detail{
    grid-template-areas:
      "header sidebar"
      "article sidebar"
      "related sidebar"!important;
  }

  body:not(.admin-body) .article-detail .v175-related-news{
    grid-area:related!important;
    min-width:0!important;
    max-width:100%!important;
  }
}

@media(min-width:901px) and (max-width:1199px){
  body:not(.admin-body) .article-detail .v175-related-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:16px!important;
  }
}

@media(max-width:900px){
  body:not(.admin-body) .article-detail .v175-related-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:14px!important;
  }
}

@media(max-width:599px){
  body:not(.admin-body) .article-detail .v175-related-news{
    margin-top:22px!important;
    padding-top:16px!important;
  }

  body:not(.admin-body) .article-detail .v175-related-news>header{
    align-items:flex-start!important;
  }

  body:not(.admin-body) .article-detail .v175-related-news>header h2{
    font-size:19px!important;
  }

  body:not(.admin-body) .article-detail .v175-related-grid{
    grid-template-columns:1fr!important;
    gap:14px!important;
  }

  body:not(.admin-body) .article-detail .v175-related-grid>article h2{
    font-size:17px!important;
    min-height:0!important;
  }
}
