/* ==========================================================================
   Trang "Lịch đào tạo" — dùng kèm common.css (header/footer chung).
   Số đo px lấy từ Figma: desktop 1920, mobile 390.
   ========================================================================== */

/* ---------- Banner slider ---------- */
/* Header tĩnh cao 142 → banner bắt đầu ở y=159 (Figma), khung 738 = ảnh 711 + 27 nền trắng. */
.lich-banner { padding-top: 17px; }
.lich-banner .carousel { aspect-ratio: 1920 / 737.75; overflow: hidden; background: #fff; }
.lich-banner .carousel-inner, .lich-banner .carousel-item { height: 100%; }
.lich-banner .carousel-item img { display: block; width: 100%; height: auto; }

/* ---------- Danh mục chương trình ---------- */
.lich-list { padding: 105px 0 102px; }
/* Khung trắng bo 100 + đổ bóng bọc danh mục (Main Content Area). Không áp dụng khi đặt trong trang khác (.in-page). */
.lich-list:not(.in-page) {
  position: relative; margin-bottom: 36px; background: #fff;
  border-radius: 100px; box-shadow: 0 16px 48px rgba(0, 0, 0, .18);
}
.lich-title {
  font-family: var(--font-2); font-weight: 700; font-size: 54px; line-height: 70.2px; letter-spacing: -.03em; /* Figma: Open Sans Bold */
  color: var(--ink); text-align: center; text-transform: uppercase; margin: 0;
}
.pg-list {
  display: flex; flex-direction: column; gap: 16px;
  width: 876px; max-width: calc(100% - 24px); margin: 12.6px auto 0;
}

.pg-card {
  display: flex; align-items: center; min-height: 168px; padding: 0 24px 0 10px;
  background: #fff; border: 1px solid #eee; border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
  font-family: var(--font); color: var(--ink);
}
.pg-card--glp { min-height: 136.38px; }

.pg-logo {
  width: 157px; height: 104px; flex-shrink: 0; overflow: hidden;
  background: #fff; border: 1px solid #e0e8f5; border-radius: 8px;
}
/* Thẻ "Thường": ảnh logo (ảnh đại diện) phủ kín khung 157×104 bo 8 như Figma. */
.pg-card--std .pg-logo { border: 0; }
.pg-card--std .pg-logo a { padding: 0; }
.pg-card--std .pg-logo a > img { object-fit: cover; }
.pg-logo a { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; padding: 14.5px 8px; }
.pg-logo a > img { display: block; width: 100%; height: 100%; object-fit: contain; }
.pg-logo .ceo-logo { width: 122px; flex-shrink: 0; }

.pg-info { flex: 1; min-width: 0; margin-left: 13px; }
.pg-flag { display: none; }
.pg-title { margin: 0; font-family: var(--font); font-weight: 600; font-size: 20px; line-height: 24px; }
.pg-title a { color: #0047af; }
.pg-title a:hover { color: #003da5; text-decoration: underline; }
.pg-sub { font-size: 18px; line-height: 23.4px; }
.pg-dur { margin-top: 8.4px; font-size: 18px; line-height: 23.4px; }
.pg-date { display: flex; align-items: center; margin-top: 8.2px; font-size: 18px; line-height: 23.4px; }
.pg-dur b, .pg-date b { font-weight: 700; }
.pg-city {
  display: inline-flex; align-items: center; height: 23.59px; margin-left: 11.86px; padding: 0 12px;
  border-radius: 4px; background: linear-gradient(90deg, #2885f1, #62d3fd);
  font-weight: 600; font-size: 12px; line-height: 15.6px; color: #fff; text-transform: uppercase;
}

.pg-actions { display: flex; flex-direction: column; gap: 16px; width: 171px; flex-shrink: 0; }
.pg-card--ceo .pg-actions { width: 174px; margin-left: -3px; }
.pg-card--glp .pg-actions { width: 134.16px; }

.pg-brochure {
  display: flex; align-items: center; justify-content: center; height: 31.39px;
  border: 1px solid transparent; border-radius: 50px;
  background: linear-gradient(#fff, #fff) padding-box, linear-gradient(135deg, #2b87f1, #79e3ff) border-box;
  font-weight: 500; font-size: 16px; line-height: 20.8px; color: #0047af;
  transition: background .2s, color .2s;
}
.pg-brochure:hover { color: #fff; background: linear-gradient(135deg, #2b87f1, #79e3ff) padding-box, linear-gradient(135deg, #2b87f1, #79e3ff) border-box; }
.pg-select {
  width: 100%; height: 31px; padding: 0 30px 0 8px;
  border: 1px solid #dee2e6; border-radius: 4px; cursor: pointer;
  font-family: var(--font); font-size: 14px; line-height: 21px; color: #212529;
  background: #fff url("../images/lich/caret.svg") no-repeat right 13px center / 12px 12px;
  -webkit-appearance: none; appearance: none;
}
.pg-select:focus { outline: 2px solid rgba(40, 133, 241, .3); }
.pg-reg { width: 100%; height: 32px; padding: 0; gap: 4px; }
.pg-reg i { font-size: 16px; }

/* ==========================================================================
   MOBILE (< 992) — artboard 390
   ========================================================================== */
@media (max-width: 991.98px) {
  .lich-banner { padding-top: 0; }
  /* Khung theo tỉ lệ ảnh ngang 1920×711 để không cắt mất nội dung banner. */
  .lich-banner .carousel { aspect-ratio: 1920 / 711; }
  .lich-banner .carousel-item > a, .lich-banner .carousel-item picture { display: block; height: 100%; }
  .lich-banner .carousel-item img { height: 100%; object-fit: cover; object-position: center; }
  /* Có ảnh mobile riêng (khối "Ảnh mobile") → khung gần vuông theo Figma 390×372. */
  .lich-banner .carousel:has(picture) { aspect-ratio: 390 / 372; }
  .lich-banner .carousel:has(picture) .carousel-item:not(:has(picture)) img { object-fit: contain; }

  .lich-list { padding: 33px 0; }
  .lich-list:not(.in-page) { margin: 18px 0 0; border-radius: 20px 20px 0 0; }
  .lich-title { font-family: var(--font); font-weight: 400; font-size: 28px; line-height: 36.4px; letter-spacing: 0; padding: 0 12px; }
  .pg-list { width: auto; max-width: none; gap: 18px; margin: 65.8px 12px 0; }

  .pg-card { flex-direction: column; align-items: stretch; min-height: 0; padding: 0 0 17px; text-align: center; }
  .pg-card--glp { padding-bottom: 27.5px; }
  .pg-logo { width: auto; height: 175px; margin: 16px 16px 0; }
  .pg-logo a { padding: 0 8px; }
  .pg-logo .ceo-logo { width: 261.36px; }

  .pg-info { margin: 23px 0 0; }
  .pg-flag {
    display: flex; align-items: center; justify-content: center; gap: 4px; height: 15.6px;
    font-weight: 500; font-size: 12px; line-height: 15.6px; color: #0047af;
  }
  .pg-flag + .pg-title { margin-top: 9.8px; }
  .pg-sub { font-size: 13.6px; line-height: 17.68px; }
  .pg-dur { display: none; }
  .pg-date { justify-content: center; margin-top: 8px; }
  .pg-city { margin-left: 11px; }

  .pg-actions, .pg-card--ceo .pg-actions { width: 174px; margin: 8px auto 0; }
  .pg-card--glp .pg-actions { flex-direction: row; justify-content: center; align-items: center; gap: 3.6px; width: auto; margin-top: 14.3px; }
  .pg-card--glp .pg-brochure {
    width: 127.42px;
    background: linear-gradient(#fff, #fff) padding-box, linear-gradient(135deg, #f17226, #79e3ff) border-box;
  }
  .pg-card--glp .pg-reg { width: 134.16px; margin-top: 2.92px; }
}

/* ---------- Thẻ kiểu badge chữ + dòng học bổng ---------- */
.pg-logo a:has(> .fsb-badge) { padding: 0; }
.pg-logo .fsb-badge { aspect-ratio: auto; height: 100%; padding: 6px; border-radius: 7px; }
.pg-logo .fsb-badge-code { font-size: 30px; }
.pg-logo .fsb-badge-line { width: 36%; height: 2px; margin: 6px 0 5px; }
.pg-logo .fsb-badge-name { font-size: 9.5px; line-height: 1.2; }
.pg-schol { margin-top: 4px; }
@media (max-width: 991.98px) {
  .pg-logo .fsb-badge { padding: 12px; }
  .pg-logo .fsb-badge-code { font-size: 56px; }
  .pg-logo .fsb-badge-line { margin: 10px 0 8px; height: 3px; }
  .pg-logo .fsb-badge-name { font-size: 15px; }
}
.pg-logo .fsb-badge-name:first-child { font-size: 14px; }
.pg-logo .fsb-badge-sub { font-size: 9px; }
@media (max-width: 991.98px) { .pg-logo .fsb-badge-name:first-child { font-size: 24px; } .pg-logo .fsb-badge-sub { font-size: 14px; } }

/* ---------- Banner có chữ (Sheet 5) ---------- */
.lich-banner .carousel-item.has-caption { position: relative; }
.lich-banner .carousel-item.has-caption::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(12, 35, 64, .92) 0%, rgba(12, 35, 64, .75) 45%, rgba(12, 35, 64, .15) 100%);
}
.lb-caption { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; color: #fff; }
.lb-caption .container { max-width: 1200px; }
.lb-title { max-width: 760px; font-weight: 700; font-size: 52px; line-height: 1.15; text-transform: uppercase; }
.lb-sub { max-width: 760px; margin-top: 18px; font-size: 22px; line-height: 1.4; }
.lb-btn { display: inline-flex; margin-top: 26px; padding: 0 28px; height: 44px; }
.lb-note { max-width: 760px; margin-top: 18px; font-size: 14px; line-height: 1.4; opacity: .85; }
@media (min-width: 992px) and (max-width: 1199.98px) { .lb-title { font-size: 40px; } .lb-sub { font-size: 18px; } }
@media (max-width: 991.98px) {
  .lb-caption { align-items: flex-end; padding-bottom: 18px; }
  .lb-title { font-size: 22px; }
  .lb-sub { margin-top: 8px; font-size: 13px; }
  .lb-btn { margin-top: 10px; height: 34px; font-size: 12px; padding: 0 16px; }
  .lb-note { margin-top: 6px; font-size: 10px; }
}
/* Điện thoại: khung banner chỉ cao ~145px → rút gọn chữ trên ảnh cho vừa. */
@media (max-width: 575.98px) {
  .lb-caption { align-items: center; padding-bottom: 0; }
  .lb-title { font-size: 15px; line-height: 1.2; }
  .lb-sub { margin-top: 4px; font-size: 10.5px; line-height: 1.3; }
  .lb-btn { margin-top: 6px; height: 26px; font-size: 10.5px; padding: 0 12px; }
  .lb-note { display: none; }
}
