/* HSG UI Kit — modular CSS. Do not edit parent theme/plugins. */

/* ========== Home — spacing rhythm ========== */
.hsg-home .hsg-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 8px 0 48px !important;
  padding: 0 !important;
  border: 0 !important;
  border-bottom: 0 !important;
  overflow: visible !important;
  background: transparent;
}
.hsg-home .hsg-section-head {
  margin-bottom: 28px !important;
}
.hsg-home .hsg-section-head h2 {
  margin: 8px 0 !important;
}
.hsg-home .hsg-section-head p {
  margin: 0 !important;
}
.hsg-home .hsg-benefits {
  margin-top: -20px;
  padding-bottom: 8px;
}
/*
 * Homepage section vertical rhythm — single source in this file.
 * Inline page CSS no longer sets courses/teachers/cta section padding.
 */
.hsg-home .hsg-courses {
  padding: 64px 0 40px;
}
/*
 * WHY !important: homepage still ships legacy inline <style> for
 * .hsg-teachers / .hsg-teacher that would override the card redesign.
 */
.hsg-home .hsg-teachers {
  background: transparent !important;
  padding: 40px 0 !important;
}
.hsg-home .hsg-teachers > .hsg-container {
  background: var(--hsg-bg, #f6f8fc) !important;
  border-radius: 24px !important;
  padding: 48px 32px !important;
}
.hsg-home .hsg-teachers .hsg-section-head {
  max-width: none;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 32px !important;
  text-align: center;
}
.hsg-home .hsg-teachers .hsg-section-head h2 {
  white-space: normal;
}
.hsg-home .hsg-teachers .hsg-section-sub {
  margin: 10px auto 0 !important;
  max-width: 40rem;
  color: var(--hsg-muted, #64748b);
  font-size: 15px;
  line-height: 1.55;
  white-space: normal;
}
.hsg-home .hsg-teachers__grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 20px !important;
  max-width: 1080px !important;
  margin: 0 auto !important;
  align-items: stretch;
}
.hsg-home .hsg-teacher-card {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin: 0;
  padding: 18px;
  background: var(--hsg-surface, #fff);
  border: 1px solid var(--hsg-line, #e2e8f0);
  border-radius: var(--hsg-radius, 14px);
  box-shadow: var(--hsg-shadow, 0 8px 28px rgba(25, 43, 75, 0.07));
  transition: box-shadow 180ms ease, transform 180ms ease;
}
.hsg-home .hsg-teacher-card:hover {
  box-shadow: 0 12px 32px rgba(25, 43, 75, 0.1);
  transform: translateY(-2px);
}
.hsg-home .hsg-teacher-card__media {
  position: relative;
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(165deg, #e8f0fe 0%, #dbe7fb 55%, #c9daf8 100%);
  aspect-ratio: 3 / 4;
}
.hsg-home .hsg-teacher-card__media::after {
  content: "";
  position: absolute;
  left: -12%;
  bottom: -18%;
  width: 70%;
  height: 42%;
  border-radius: 50%;
  background: rgba(26, 86, 219, 0.18);
  pointer-events: none;
}
.hsg-home .hsg-teacher-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.hsg-home .hsg-teacher-card__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 10px;
}
.hsg-home .hsg-teacher-card__name {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--hsg-ink, #192b4b);
}
.hsg-home .hsg-teachers .hsg-eyebrow {
  color: #f0821e;
}
.hsg-home .hsg-teacher-card__badge {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--hsg-blue-soft, #e8f0fe);
  color: var(--hsg-primary, #1a56db);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}
.hsg-home .hsg-teacher-card__badge::before {
  content: "";
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  background: center / contain no-repeat;
}
.hsg-home .hsg-teacher-card__badge--trophy::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M8 21h8M12 17v4M7 4h10v4a5 5 0 0 1-10 0V4Z' stroke='%231a56db' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M17 6h2a2 2 0 0 1 0 4h-2M7 6H5a2 2 0 0 0 0 4h2' stroke='%231a56db' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.hsg-home .hsg-teacher-card__badge--grad::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M22 10 12 5 2 10l10 5 10-5Z' stroke='%231a56db' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M6 12.5v4.2c0 .4.6 1.3 6 2.8 5.4-1.5 6-2.4 6-2.8v-4.2' stroke='%231a56db' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M22 10v6' stroke='%231a56db' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}
.hsg-home .hsg-teacher-card__body > p:empty {
  display: none;
}
.hsg-home .hsg-teacher-card__list {
  list-style: none;
  margin: 2px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.hsg-home .hsg-teacher-card__list li {
  position: relative;
  margin: 0;
  padding: 0 0 0 22px;
  color: var(--hsg-text, #46546a);
  font-size: 14px;
  line-height: 1.45;
}
.hsg-home .hsg-teacher-card__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.28em;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Ccircle cx='8' cy='8' r='8' fill='%231a56db'/%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' stroke='%23fff' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / contain no-repeat;
}
.hsg-home .hsg-cta {
  padding: 40px 0 56px;
}
/*
 * WHY !important on layout props: homepage inline <style> still sets
 * .hsg-cta__box{display:flex;flex-direction:...} after this sheet.
 */
.hsg-home .hsg-cta .hsg-cta__box {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center !important;
  justify-content: initial;
  flex-direction: initial;
  gap: 28px 32px;
  max-width: 1152px;
  margin: 0 auto;
  padding: 28px 36px !important;
  border-radius: 24px;
  background: linear-gradient(120deg, var(--hsg-primary, #1a56db) 0%, #2f6df0 55%, #4f86ff 100%);
  color: #fff;
  box-shadow: 0 18px 36px rgba(26, 86, 219, 0.22);
  width: auto !important;
}
.hsg-home .hsg-cta__media {
  flex: 0 0 auto;
  line-height: 0;
}
.hsg-home .hsg-cta__media img {
  display: block;
  width: 168px;
  height: auto;
  max-width: 100%;
  object-fit: contain;
}
.hsg-home .hsg-cta__copy {
  min-width: 0;
}
.hsg-home .hsg-cta__box h2,
.hsg-home .hsg-cta__copy h2 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.25;
}
.hsg-home .hsg-cta__box p,
.hsg-home .hsg-cta__copy p {
  margin: 0;
  max-width: 46ch;
  color: rgba(255, 255, 255, 0.92);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.55;
  opacity: 1;
}
.hsg-home .hsg-cta .hsg-cta__btns {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 10px !important;
  min-width: 210px;
}
.hsg-home .hsg-cta .hsg-cta__btns br {
  display: none;
}
.hsg-home .hsg-cta__btns .hsg-btn {
  width: 100%;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  white-space: nowrap;
}
.hsg-home .hsg-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  align-items: stretch;
}

/*
 * Homepage course cards — shared layout for both:
 * 1) legacy static .hsg-card markup in page content
 * 2) PHP-replaced .hsg-course-card.hsg-card
 * Inline page CSS is overridden with tokens only.
 */
.hsg-home .hsg-card {
  display: flex !important;
  flex-direction: column !important;
  height: 100%;
  min-width: 0;
  background: var(--hsg-surface) !important;
  border: 1px solid var(--hsg-line) !important;
  border-radius: var(--hsg-radius) !important;
  box-shadow: var(--hsg-shadow) !important;
  overflow: hidden !important;
  transform: none !important;
}

.hsg-home .hsg-card:hover {
  transform: none !important;
  box-shadow: var(--hsg-shadow) !important;
}

.hsg-home .hsg-card__img,
.hsg-home .hsg-card .hsg-course-card__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9 !important;
  overflow: hidden;
  background: var(--hsg-secondary);
  border-radius: var(--hsg-radius) var(--hsg-radius) 0 0;
}

.hsg-home .hsg-card__img img,
.hsg-home .hsg-card .hsg-course-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: none !important;
}

.hsg-home .hsg-card:hover .hsg-card__img img {
  transform: none !important;
}

.hsg-home .hsg-card .hsg-badge,
.hsg-home .hsg-card .hsg-tags,
.hsg-home .hsg-card .hsg-tag {
  display: none !important;
}

.hsg-home .hsg-card__body,
.hsg-home .hsg-card .hsg-course-card__body {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 !important;
  gap: 10px;
  padding: 16px 16px 18px !important;
  min-height: 0;
}

.hsg-home .hsg-card__title,
.hsg-home .hsg-card .hsg-course-card__title {
  --hsg-course-card-title-lh: 1.4;
  margin: 0 !important;
  font-family: var(--hsg-font);
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: var(--hsg-course-card-title-lh) !important;
  /* Reserve 2 lines so instructors / footer align across cards. */
  min-height: calc(var(--hsg-course-card-title-lh) * 2 * 1em);
  color: var(--hsg-ink) !important;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.hsg-home .hsg-card__title a,
.hsg-home .hsg-card .hsg-course-card__title a {
  color: inherit;
  text-decoration: none;
}

.hsg-home .hsg-card__title a:hover,
.hsg-home .hsg-card .hsg-course-card__title a:hover {
  color: var(--hsg-primary);
}

.hsg-home .hsg-card__instructors {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0;
  font-family: var(--hsg-font);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--hsg-muted);
}

.hsg-home .hsg-card__instructors-icon {
  flex: 0 0 auto;
  display: inline-flex;
  margin-top: 1px;
  color: var(--hsg-muted);
}

.hsg-home .hsg-card__instructors-icon svg {
  display: block;
}

.hsg-home .hsg-card__foot,
.hsg-home .hsg-card .hsg-course-card__footer {
  margin-top: auto !important;
  padding-top: 6px !important;
  border-top: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 12px !important;
}

.hsg-home .hsg-card__foot .hsg-price,
.hsg-home .hsg-card .hsg-course-card__price {
  margin: 0;
  font-family: var(--hsg-font);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--hsg-primary);
}

.hsg-home .hsg-card__foot .hsg-price del {
  font-size: 13px;
  font-weight: 500;
  color: var(--hsg-muted);
  margin-right: 8px;
}

.hsg-home .hsg-card__foot .hsg-price strong {
  font-weight: 800;
  color: var(--hsg-primary);
}

.hsg-home .hsg-card__foot > p {
  margin: 0;
}

.hsg-home .hsg-card__foot .hsg-btn,
.hsg-home .hsg-card .hsg-course-card__cta {
  width: 100% !important;
  min-height: var(--hsg-btn-min-h);
  justify-content: center;
  border-radius: var(--hsg-radius-btn);
  border: 1px solid var(--hsg-primary) !important;
  background: var(--hsg-surface) !important;
  color: var(--hsg-primary) !important;
  font-family: var(--hsg-font);
  font-size: 14px;
  font-weight: 650;
  box-shadow: none !important;
}

.hsg-home .hsg-card__foot .hsg-btn:hover,
.hsg-home .hsg-card .hsg-course-card__cta:hover,
.hsg-home .hsg-card__foot .hsg-btn:focus-visible,
.hsg-home .hsg-card .hsg-course-card__cta:focus-visible {
  background: var(--hsg-blue-soft) !important;
  border-color: var(--hsg-primary-hover) !important;
  color: var(--hsg-primary-hover) !important;
}
@media (max-width: 900px) {
  /*
   * WHY here (not only ≤767): iPad Mini is 768px — desktop nowrap on
   * heading/subtitle still clips “nghiệm” if we wait for 767.
   */
  .hsg-home .hsg-teachers {
    padding: 32px 0;
  }
  .hsg-home .hsg-teachers > .hsg-container {
    border-radius: 24px;
    padding: 36px 24px;
  }
  .hsg-home .hsg-courses {
    padding: 56px 0 32px;
  }
  .hsg-home .hsg-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  .hsg-home .hsg-cta {
    padding: 32px 0 48px;
  }
  .hsg-home .hsg-teachers .hsg-section-head {
    margin-bottom: 24px !important;
  }
  .hsg-home .hsg-teachers .hsg-section-head h2,
  .hsg-home .hsg-teachers .hsg-section-sub {
    white-space: normal;
  }
  .hsg-home .hsg-teachers .hsg-section-head h2 {
    font-size: 28px;
    line-height: 1.3;
  }
  .hsg-home .hsg-teachers .hsg-section-sub {
    font-size: 15px;
    max-width: 36rem;
  }
  .hsg-home .hsg-teachers__grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    max-width: none !important;
  }
  /*
   * Compact card ≤900px: square photo | name+badge (centered as a group),
   * then bio list full-width. display:contents avoids markup change.
   * Rows 1fr/auto/auto/1fr center the name+badge block beside the photo.
   */
  .hsg-home .hsg-teacher-card {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    grid-template-rows: 1fr auto auto 1fr auto;
    column-gap: 14px;
    row-gap: 0;
    align-items: stretch;
    padding: 16px;
    border-radius: 16px;
  }
  .hsg-home .hsg-teacher-card:hover {
    transform: none;
  }
  .hsg-home .hsg-teacher-card__body {
    display: contents;
  }
  .hsg-home .hsg-teacher-card__media {
    grid-column: 1;
    grid-row: 1 / 5;
    align-self: center;
    width: 88px;
    height: 88px;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
  }
  .hsg-home .hsg-teacher-card__media::after {
    display: none;
  }
  .hsg-home .hsg-teacher-card__media img {
    object-position: center 18%;
  }
  .hsg-home .hsg-teacher-card__name {
    grid-column: 2;
    grid-row: 2;
    align-self: end;
    margin: 0 0 6px;
    font-size: 16px;
    line-height: 1.25;
    overflow-wrap: break-word;
  }
  .hsg-home .hsg-teacher-card__badge {
    grid-column: 2;
    grid-row: 3;
    align-self: start;
    width: fit-content;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1.3;
    white-space: normal;
    overflow-wrap: break-word;
  }
  .hsg-home .hsg-teacher-card__badge::before {
    width: 14px;
    height: 14px;
    margin-top: 0;
  }
  .hsg-home .hsg-teacher-card__list {
    grid-column: 1 / -1;
    grid-row: 5;
    margin: 12px 0 0;
    gap: 8px;
  }
  .hsg-home .hsg-teacher-card__list li {
    font-size: 13px;
    line-height: 1.5;
    padding-left: 22px;
  }
  /*
   * CTA ≤900px (incl. iPad Mini 768): keep media|copy on one row, buttons
   * full-width below. Do NOT use flex:1 1 180px here — base btns are
   * flex-direction:column !important, so that basis becomes HEIGHT (~180px).
   */
  .hsg-home .hsg-cta .hsg-cta__box {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 20px 24px;
    padding: 24px 28px !important;
    width: calc(100% - 48px) !important;
  }
  .hsg-home .hsg-cta__media img {
    width: 120px;
  }
  .hsg-home .hsg-cta__box h2,
  .hsg-home .hsg-cta__copy h2 {
    font-size: 24px;
  }
  .hsg-home .hsg-cta .hsg-cta__btns {
    grid-column: 1 / -1;
    flex-direction: column !important;
    flex-wrap: nowrap;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    gap: 10px !important;
  }
  .hsg-home .hsg-cta__btns .hsg-btn {
    flex: 0 0 auto !important;
    width: 100%;
    min-height: 44px;
    height: auto;
  }
}
@media (max-width: 767px) {
  .hsg-home .hsg-tabs {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto !important;
    margin: 4px -16px 32px !important;
    padding: 0 16px 6px !important;
    -webkit-overflow-scrolling: touch;
  }
  .hsg-home .hsg-courses {
    padding: 48px 0 24px;
  }
  .hsg-home .hsg-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .hsg-home .hsg-teachers {
    padding: 24px 0;
  }
  .hsg-home .hsg-cta {
    padding: 24px 0 48px;
  }
  .hsg-home .hsg-teachers > .hsg-container {
    border-radius: 20px;
    padding: 28px 16px;
  }
  .hsg-home .hsg-teacher-card {
    grid-template-columns: 80px minmax(0, 1fr);
    column-gap: 12px;
    padding: 14px;
  }
  .hsg-home .hsg-teacher-card__media {
    width: 80px;
    height: 80px;
  }
  .hsg-home .hsg-cta .hsg-cta__box {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    width: calc(100% - 32px) !important;
    padding: 24px 20px !important;
  }
  .hsg-home .hsg-cta__media img {
    width: 112px;
  }
  .hsg-home .hsg-cta__copy p {
    max-width: none;
  }
  .hsg-home .hsg-cta__box h2,
  .hsg-home .hsg-cta__copy h2 {
    font-size: 22px;
  }
  .hsg-home .hsg-cta .hsg-cta__btns {
    width: 100%;
    flex-direction: column !important;
  }
  .hsg-home .hsg-cta__btns .hsg-btn {
    flex: 0 0 auto !important;
    width: 100%;
  }
  .hsg-home .hsg-teachers .hsg-section-head {
    margin-bottom: 20px !important;
  }
  .hsg-home .hsg-teachers .hsg-section-head h2 {
    font-size: 22px;
  }
  .hsg-home .hsg-teachers .hsg-section-sub {
    font-size: 14px;
  }
}
