/* ===== Tuyển sinh ===== */
.ct-nav.ts-nav { top: 0; }                      /* không có top bar phía trên */
.ts-nav .ct-search-btn { color: var(--ct-dark); }
.ts-nav .ct-search-btn:hover { background: #eaf1fa; }
.ts-footer-menu a { color: #cfe0f5; margin-left: 1rem; }
.ts-footer-menu a:hover { color: var(--ct-yellow); }

/* Khối thông tin tuyển sinh */
.ts-block {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; padding: 1.25rem 1rem; text-align: center;
  background: #fff; border: 1px solid #dfe6ee; border-radius: 8px;
  color: var(--ct-dark); box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
  transition: background-color .25s, color .25s, transform .25s, box-shadow .25s;
}
.ts-block:hover { background: var(--ct-primary); color: #fff; transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0, 0, 0, .2); }
.ts-block-media { display: flex; align-items: center; justify-content: center; height: 84px; margin-bottom: .75rem; }
.ts-block-media img { max-height: 84px; width: auto; max-width: 100%; object-fit: contain; }
.ts-block-ico { font-size: 2.6rem; }
.ts-block-title { font-weight: 700; text-transform: uppercase; font-size: .95rem; line-height: 1.35; }

/* Tiêu đề trái + link phải */
.ts-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; padding-bottom: 10px; border-bottom: 2px solid #e3e8ef; position: relative; }
.ts-head::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 100px; height: 2px; background: var(--ct-red); }
.ts-head-title { margin: 0; font-size: 1.25rem; font-weight: 700; color: var(--ct-dark); }
.ts-head-more { font-size: 14px; font-weight: 600; white-space: nowrap; }

/* Thẻ tin */
.ts-news {
  display: block; height: 100%; padding: 1rem; background: #fff;
  border: 1px solid #dfe6ee; border-top: 3px solid var(--ct-primary); border-radius: 6px;
  transition: box-shadow .25s, transform .25s;
}
.ts-news:hover { box-shadow: 0 6px 16px rgba(0, 0, 0, .15); transform: translateY(-2px); }
.ts-news-title {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  font-weight: 700; line-height: 1.4; color: var(--ct-primary); margin-bottom: .5rem;
}
.ts-news:hover .ts-news-title { color: var(--ct-red); }
.ts-news-sum {
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 13.5px; line-height: 1.5; color: #555;
}

/* Accordion */
.accordion-button:not(.collapsed) { background: #eaf1fa; color: var(--ct-dark); }
.accordion-button { font-weight: 600; }

/* Nút nổi: PC xếp dọc góc dưới phải, nằm trên nút lên đầu trang */
.ts-float {
  position: fixed; right: 18px; bottom: 72px; z-index: 1030;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
}
.ts-fab {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%; color: #fff; font-size: 20px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .3); transition: transform .2s;
}
.ts-fab:hover { color: #fff; transform: scale(1.08); }
.ts-fab-chat { background: #6f42c1; }
.ts-fab-mess { background: #0084ff; }
.ts-fab-zalo { background: #0068ff; font-weight: 700; font-size: 17px; }
.ts-fab-reg {
  width: auto; height: auto; padding: .55rem 1rem; border-radius: 999px;
  background: var(--ct-red); font-size: 14px; font-weight: 700; gap: 6px;
}

/* Điện thoại: 4 nút nằm ngang sát cạnh dưới, nút lên đầu trang ở trên bên phải */
@media (max-width: 767.98px) {
  body.ts-body { padding-bottom: 64px; }
  .ts-float {
    left: 0; right: 0; bottom: 0; flex-direction: row; justify-content: space-between; align-items: center;
    gap: 36px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
    background: #fff; box-shadow: 0 -2px 10px rgba(0, 0, 0, .15);
  }
  .ts-fab-reg { flex: 1; justify-content: center; }
  .ts-float .ts-fab { box-shadow: none; }
  .ct-totop { bottom: 76px; }
}

/* Tra cứu */
.ts-cap-img { border: 1px solid #dfe6ee; border-radius: 4px; background: #f0f5fc; max-width: 100%; height: auto; }
.ts-dl dt { color: #555; font-weight: 600; }
.ts-dl dt, .ts-dl dd { padding-top: .35rem; padding-bottom: .35rem; border-bottom: 1px dashed #e3e8ef; margin-bottom: 0; }
.ts-qr-img { max-width: 280px; height: auto; border: 1px solid #dfe6ee; border-radius: 6px; background: #fff; }
/* Nút Đăng ký: luôn 2 dòng */
.ts-fab-reg { line-height: 1.2; text-align: left; }
.ts-fab-reg span { display: inline-block; white-space: nowrap; }

/* Tooltip cho nút nổi (chỉ máy có chuột) */
@media (hover: hover) and (min-width: 768px) {
  .ts-fab[data-tip],
  .ct-totop[data-tip] { position: relative; }
  .ct-totop[data-tip] { position: fixed; }   /* giữ nguyên vị trí fixed của nút lên đầu trang */

  .ts-fab[data-tip]::after,
  .ct-totop[data-tip]::after {
    content: attr(data-tip);
    position: absolute;
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    padding: 5px 10px;
    border-radius: 4px;
    background: #222;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .15s;
  }
  .ts-fab[data-tip]:hover::after,
  .ts-fab[data-tip]:focus-visible::after,
  .ct-totop[data-tip]:hover::after,
  .ct-totop[data-tip]:focus-visible::after {
    opacity: 1;
    visibility: visible;
  }
}
/* ===== Tính điểm học bạ ===== */
.hb-tool .form-control::placeholder{color:#bbb;font-style:italic;font-size:.8rem}
.hb-tool .invalid-feedback{font-size:.75rem}
/* Liên kết nhanh đi theo khi cuộn (chỉ màn hình lớn) */
@media (min-width: 992px) {
  .ts-sticky {
    position: sticky;
    top: 80px;                       /* chỉnh theo chiều cao thanh menu */
    max-height: calc(100vh - 100px); /* danh sách dài thì cuộn bên trong */
    overflow-y: auto;
  }
}