/* BUILD109.2.38 — shared ISS frontend sticky/header guard + article title color. */
body.iss-theme{
  --iss-content-sticky-top:18px;
}
body.iss-theme.iss-header-sticky{
  --iss-content-sticky-top:calc(var(--ph-admin-toolbar-height,0px) + var(--header-main,74px) + 18px);
}
body.iss-theme.iss-topbar-sticky:not(.iss-header-sticky){
  --iss-content-sticky-top:calc(var(--ph-admin-toolbar-height,0px) + var(--header-top,42px) + 18px);
}
body.iss-theme.iss-header-sticky.iss-topbar-sticky{
  --iss-content-sticky-top:calc(var(--ph-admin-toolbar-height,0px) + var(--header-top,42px) + var(--header-main,74px) + 18px);
}

/* All frontend sticky category/article blocks stop below the visible sticky header stack. */
body.iss-theme .iss-product-sidebar,
body.iss-theme .topic-sidebar,
body.iss-theme .other-articles,
body.iss-theme .iss-sharing-v2 .topic-sidebar,
body.iss-theme .iss-sharing-v2-detail .other-articles,
body.iss-theme .iss-service-category__sidebar,
body.iss-theme .iss-service-sharing-category__sidebar{
  top:var(--iss-content-sticky-top)!important;
  scroll-margin-top:var(--iss-content-sticky-top);
}

/* Keep sticky panels visually behind the fixed/sticky header and opaque while scrolling. */
body.iss-theme .iss-product-sidebar,
body.iss-theme .topic-sidebar,
body.iss-theme .other-articles,
body.iss-theme .iss-service-category__sidebar,
body.iss-theme .iss-service-sharing-category__sidebar{
  z-index:20;
  background:var(--iss-page-bg,#fff);
}

/* Related/article-category titles use the same black body ink instead of the theme accent. */
body.iss-theme .other-articles .mini-article,
body.iss-theme .other-articles .mini-article strong,
body.iss-theme .service-v2__other-articles .mini-article,
body.iss-theme .service-v2__other-articles .mini-article strong,
body.iss-theme .iss-sharing-v2-detail .mini-article,
body.iss-theme .iss-sharing-v2-detail .mini-article strong,
body.iss-theme .service-v2__other-grid h3,
body.iss-theme .service-sharing-card h3,
body.iss-theme .iss-service-v2__article-card .iss-service-v2__card-body strong,
body.iss-theme .iss-sharing-v2 .card__body h3,
body.iss-theme .iss-sharing-v2-detail .card__body h3{
  color:var(--iss-text,#000)!important;
}

body.iss-theme .other-articles .mini-article:hover strong,
body.iss-theme .service-v2__other-articles .mini-article:hover strong,
body.iss-theme .iss-sharing-v2-detail .mini-article:hover strong{
  color:var(--iss-theme-link-hover,var(--ph-link-hover-color,#0b669f))!important;
}

/* Existing responsive CSS may switch these blocks to position:static; do not force sticky on small screens. */
@media(max-width:980px){
  body.iss-theme .iss-product-sidebar,
  body.iss-theme .topic-sidebar,
  body.iss-theme .other-articles,
  body.iss-theme .iss-service-category__sidebar,
  body.iss-theme .iss-service-sharing-category__sidebar{
    top:auto!important;
    scroll-margin-top:0;
  }
}

/* BUILD109.2.39 — unified sidebar panel + equal-height frontend card contract. */
body.iss-theme{
  --iss-content-panel-border:var(--iss-theme-border,var(--ph-border-color,#c0c1c3));
  --iss-content-panel-radius:16px;
}

/* Category/related panels use one visual contract across Product, Sharing and Service. */
body.iss-theme .iss-product-sidebar,
body.iss-theme .iss-sharing-v2 .topic-sidebar,
body.iss-theme .iss-sharing-v2-detail .other-articles,
body.iss-theme .service-v2__other-articles,
body.iss-theme .iss-service-category__sidebar,
body.iss-theme .iss-service-sharing-category__sidebar{
  border:1px solid var(--iss-content-panel-border)!important;
  border-radius:var(--iss-content-panel-radius)!important;
  background:var(--iss-page-bg,#fff)!important;
  overflow:hidden;
  box-sizing:border-box;
}

/* Product category panel title and "Các bài viết khác" match the category heading. */
body.iss-theme .iss-product-sidebar__title,
body.iss-theme .iss-sharing-v2 .sidebar__title,
body.iss-theme .iss-sharing-v2-detail .other-articles > h2,
body.iss-theme .service-v2__other-articles > h2,
body.iss-theme .iss-service-category__sidebar > h2,
body.iss-theme .iss-service-sharing-category__sidebar > h2{
  margin:0!important;
  padding:16px 18px!important;
  min-height:56px;
  display:flex;
  align-items:center;
  background:var(--iss-sidebar-title-bg,var(--iss-blue-900,#001b44))!important;
  border:0!important;
  border-bottom:1px solid var(--iss-content-panel-border)!important;
  color:var(--iss-sidebar-title-text,#fff)!important;
  font-size:1rem!important;
  line-height:1.3!important;
  font-weight:700!important;
}
body.iss-theme .iss-sharing-v2-detail .other-articles .mini-article,
body.iss-theme .service-v2__other-articles .mini-article{
  margin-left:16px;
  margin-right:16px;
}
body.iss-theme .iss-sharing-v2-detail .other-articles .sharing-empty-related,
body.iss-theme .service-v2__other-articles > p{
  margin:16px;
}

/* Every card grid stretches items to the tallest card in that visual row. */
body.iss-theme .iss-sharing-list-grid,
body.iss-theme .iss-sharing-v2-detail .grid,
body.iss-theme .iss-news-grid,
body.iss-theme .iss-folder-grid,
body.iss-theme .iss-products-grid,
body.iss-theme .iss-product-five-grid,
body.iss-theme .iss-product-recent-grid,
body.iss-theme .iss-service-sharing-category__grid,
body.iss-theme .service-v2__other-grid,
body.iss-theme .about-product-grid,
body.iss-theme .about-activity-grid,
body.iss-theme .certificate-grid,
body.iss-theme .support-grid,
body.iss-theme .audience-grid{
  align-items:stretch!important;
}

body.iss-theme .iss-sharing-list-grid > .card,
body.iss-theme .iss-sharing-v2-detail .grid > .card,
body.iss-theme .iss-news-grid > .iss-news-card,
body.iss-theme .iss-folder-grid > .iss-folder-card,
body.iss-theme .iss-products-grid > .iss-product-card-v2,
body.iss-theme .iss-product-five-grid > .iss-product-card-v2,
body.iss-theme .iss-product-recent-grid > .iss-product-card-v2,
body.iss-theme .iss-service-sharing-category__grid > .iss-service-sharing-category__card,
body.iss-theme .service-v2__other-grid > .card,
body.iss-theme .about-product-grid > .about-product-card,
body.iss-theme .about-activity-grid > .about-activity-card,
body.iss-theme .certificate-grid > .certificate-card,
body.iss-theme .support-grid > .support-card,
body.iss-theme .audience-grid > .audience-card{
  height:100%!important;
  min-height:0;
  align-self:stretch!important;
  box-sizing:border-box;
}

/* Keep media fixed by its own ratio and let the text/body consume the remaining height. */
body.iss-theme .iss-sharing-list-grid > .card,
body.iss-theme .iss-sharing-v2-detail .grid > .card,
body.iss-theme .iss-folder-card,
body.iss-theme .iss-product-card-v2,
body.iss-theme .iss-service-sharing-category__card,
body.iss-theme .about-product-card,
body.iss-theme .about-activity-card,
body.iss-theme .certificate-card,
body.iss-theme .support-card{
  display:flex!important;
  flex-direction:column;
}
body.iss-theme .card__body,
body.iss-theme .iss-folder-card__body,
body.iss-theme .iss-product-card-v2__body,
body.iss-theme .iss-news-card__body,
body.iss-theme .certificate-card__body{
  flex:1 1 auto;
}
body.iss-theme .iss-news-card > a{
  height:100%;
  display:flex!important;
  flex-direction:column;
}
body.iss-theme .iss-service-sharing-category__card{
  display:flex!important;
  flex-direction:column;
}
body.iss-theme .iss-service-sharing-category__card > :last-child{
  flex:1 1 auto;
}

/* Horizontal card tracks also stretch siblings to a common track height. */
body.iss-theme .partner-track,
body.iss-theme .iss-service-v2__hscroll-track,
body.iss-theme .slider__track{
  align-items:stretch!important;
}
body.iss-theme .partner-card,
body.iss-theme .iss-service-v2__hscroll-item,
body.iss-theme .slider__item{
  align-self:stretch;
}

/* One-column mobile cards return to natural height; no artificial empty vertical space. */
@media(max-width:640px){
  body.iss-theme .iss-sharing-list-grid > .card,
  body.iss-theme .iss-sharing-v2-detail .grid > .card,
  body.iss-theme .iss-news-grid > .iss-news-card,
  body.iss-theme .iss-folder-grid > .iss-folder-card,
  body.iss-theme .iss-products-grid > .iss-product-card-v2,
  body.iss-theme .iss-product-five-grid > .iss-product-card-v2,
  body.iss-theme .iss-product-recent-grid > .iss-product-card-v2,
  body.iss-theme .iss-service-sharing-category__grid > .iss-service-sharing-category__card,
  body.iss-theme .service-v2__other-grid > .card,
  body.iss-theme .about-product-grid > .about-product-card,
  body.iss-theme .about-activity-grid > .about-activity-card,
  body.iss-theme .certificate-grid > .certificate-card,
  body.iss-theme .support-grid > .support-card,
  body.iss-theme .audience-grid > .audience-card{
    height:auto!important;
  }
}

/* BUILD109.2.40 — runtime fix for horizontal carousels whose cards kept intrinsic heights.
   A flex item's explicit height:100% prevents cross-axis stretch in these auto-height tracks.
   Reset the item cross-size to auto, then stretch the track and let the card body fill the remainder. */
body.iss-theme [data-iss-hscroll-track],
body.iss-theme [data-hscroll-track],
body.iss-theme .iss-service-v2__article-carousel .iss-service-v2__hscroll-track,
body.iss-theme .iss-service-v2__services-carousel .iss-service-v2__hscroll-track,
body.iss-theme .article-carousel .h-scroll__track,
body.iss-theme .service-carousel .h-scroll__track{
  align-items:stretch!important;
}

body.iss-theme .iss-service-v2__article-carousel .iss-service-v2__hscroll-item,
body.iss-theme .iss-service-v2__services-carousel .iss-service-v2__hscroll-item,
body.iss-theme .article-carousel .h-scroll__item,
body.iss-theme .service-carousel .h-scroll__item{
  height:auto!important;
  align-self:stretch!important;
}

body.iss-theme .iss-service-v2__article-carousel .iss-service-v2__article-card,
body.iss-theme .iss-service-v2__services-carousel .iss-service-v2__service-card,
body.iss-theme .article-carousel .h-scroll__item > .card,
body.iss-theme .service-carousel .h-scroll__item > .card{
  display:flex!important;
  flex-direction:column;
}

body.iss-theme .iss-service-v2__article-carousel .iss-service-v2__card-body,
body.iss-theme .iss-service-v2__services-carousel .iss-service-v2__service-card-content,
body.iss-theme .article-carousel .h-scroll__item > .card > .card__body,
body.iss-theme .service-carousel .h-scroll__item > .card > .card__body{
  flex:1 1 auto;
}

/* Exact ISS sharing/service article carousel shown on production: all sibling cards
   in the horizontal row inherit the tallest card height, regardless of title line count. */
body.iss-theme .iss-service-v2__article-carousel .iss-service-v2__hscroll-track{
  display:flex!important;
  align-items:stretch!important;
}
body.iss-theme .iss-service-v2__article-carousel .iss-service-v2__hscroll-item{
  display:flex!important;
  flex-direction:column;
  height:auto!important;
  min-height:0!important;
  align-self:stretch!important;
}
body.iss-theme .iss-service-v2__article-carousel .iss-service-v2__card-media{
  flex:0 0 auto;
}
body.iss-theme .iss-service-v2__article-carousel .iss-service-v2__card-body{
  display:flex!important;
  flex:1 1 auto;
  align-items:flex-start;
}

/* On a one-card mobile viewport keep natural card height. */
@media(max-width:620px){
  body.iss-theme .iss-service-v2__article-carousel .iss-service-v2__hscroll-item,
  body.iss-theme .iss-service-v2__services-carousel .iss-service-v2__hscroll-item,
  body.iss-theme .article-carousel .h-scroll__item,
  body.iss-theme .service-carousel .h-scroll__item{
    height:auto!important;
  }
}
