/* Homepage section titles. */
.home .section-title-normal {
  gap: 12px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--edu-line) !important;
}

.home .section-title-normal .section-title-main {
  padding: 0 0 10px !important;
  border-bottom: 3px solid var(--edu-primary) !important;
  color: var(--edu-ink) !important;
  font-size: clamp(18px, 2vw, 23px) !important;
  letter-spacing: -0.01em;
}

/* Homepage latest-post carousel: reserve one stable height for every slide. */
body.home .home-blog.letuan-equal-post {
  --edu-home-post-height: 424px;
  min-height: var(--edu-home-post-height);
}

body.home .home-blog.letuan-equal-post .post-item {
  height: var(--edu-home-post-height) !important;
}

body.home .home-blog.letuan-equal-post .post-item > .col-inner,
body.home .home-blog.letuan-equal-post .box-blog-post {
  height: 100% !important;
  min-height: 0 !important;
}

body.home .home-blog.letuan-equal-post .box-blog-post {
  display: flex;
  flex-direction: column;
}

body.home .home-blog.letuan-equal-post .box-image {
  flex: 0 0 178px;
  width: 100% !important;
  height: 178px !important;
  min-height: 178px !important;
  overflow: hidden;
}

body.home .home-blog.letuan-equal-post .box-image .image-cover {
  height: 100%;
  padding-top: 0 !important;
}

body.home .home-blog.letuan-equal-post .box-image img {
  width: 100%;
  height: 100% !important;
  object-fit: cover;
}

body.home .home-blog.letuan-equal-post .box-text,
body.home .home-blog.letuan-equal-post .box-text-inner {
  display: flex !important;
  flex: 1 1 auto;
  flex-direction: column;
  width: 100%;
  min-height: 0 !important;
}

body.home .home-blog.letuan-equal-post .post-title {
  display: -webkit-box !important;
  min-height: 44px !important;
  max-height: 44px !important;
  overflow: hidden !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2 !important;
}

body.home .home-blog.letuan-equal-post .from_the_blog_excerpt {
  display: -webkit-box !important;
  min-height: 63px;
  max-height: 63px;
  overflow: hidden;
  font-weight: 400 !important;
  line-height: 1.65 !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

body.home .home-blog.letuan-equal-post .button.is-link {
  margin-top: auto !important;
}

@media (max-width: 549px) {
  body.home .home-blog.letuan-equal-post {
    --edu-home-post-height: 410px;
  }

  body.home .home-blog.letuan-equal-post .box-image {
    flex-basis: 168px;
    height: 168px !important;
    min-height: 168px !important;
  }
}

/* Keep the homepage shortcode independent from the full school finder template. */
body.home .tim-truong-shortcode .form_tt {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  height: auto !important;
  margin: 0 !important;
}

body.home .tim-truong-shortcode .form_tt :is(select, #btnSearch) {
  float: none !important;
  width: 100% !important;
  height: 46px;
  margin: 0 !important;
}

body.home .tim-truong-shortcode .form_tt #btnSearch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 849px) {
  body.home .tim-truong-shortcode .form_tt {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}
@media (max-width: 549px) {
  body.home .tim-truong-shortcode .form_tt {
    grid-template-columns: 1fr;
  }
}
