/* =========================================================
   BTH Learning Resources CSS
   Page: /tai-lieu-hoc-tap/
========================================================= */

/* =========================================================
   BTH Learning Resources v2.1 - Compact Catalog Full CSS
   Page: /tai-lieu-hoc-tap/
   Shortcode: [bth_learning_resources]
   Layout: PC 4 / Tablet 3 / Mobile 1
   Card tags: max 6 tags, 3 columns x 2 rows
   Pagination: JS internal, no URL page param
   ========================================================= */

.bth-lr-page {
  --bth-lr-font:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    "Noto Sans",
    "Liberation Sans",
    sans-serif;

  --bth-lr-teal: #159895;
  --bth-lr-teal-dark: #0f766e;
  --bth-lr-pink: #db2777;
  --bth-lr-pink-dark: #be185d;
  --bth-lr-pink-soft: #fff1f7;
  --bth-lr-text: #0f172a;
  --bth-lr-muted: #64748b;
  --bth-lr-border: rgba(21, 152, 149, 0.18);
  --bth-lr-border-strong: rgba(21, 152, 149, 0.34);

  color: var(--bth-lr-text);
  font-family: var(--bth-lr-font) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.bth-lr-page,
.bth-lr-page * {
  box-sizing: border-box;
  font-family: var(--bth-lr-font) !important;
}

.bth-lr-page a,
.bth-lr-page a:link,
.bth-lr-page a:visited,
.bth-lr-page a:hover,
.bth-lr-page a:focus {
  text-decoration: none !important;
  background-image: none !important;
}

.bth-lr-wrap {
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  padding: 0 18px;
}

/* HERO */

.bth-lr-page .bth-lr-hero {
  padding: 18px 0 14px;
  background:
    radial-gradient(circle at top right, rgba(219, 39, 119, 0.08), transparent 32%),
    linear-gradient(180deg, #ecfeff 0%, #ffffff 100%);
}

.bth-lr-page .bth-lr-hero-inner {
  display: block;
}

.bth-lr-page .bth-lr-hero-copy {
  overflow: hidden;
  padding: 22px 24px;
  border: 1px solid var(--bth-lr-border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 10px 26px rgba(10, 77, 86, 0.045);
}

.bth-lr-page .bth-lr-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 9px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--bth-lr-pink-soft);
  color: var(--bth-lr-pink-dark);
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
}

.bth-lr-page .bth-lr-hero h1 {
  max-width: 980px;
  margin: 0 0 8px;
  color: #0f6f6f;
  font-size: clamp(28px, 3.3vw, 46px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.bth-lr-page .bth-lr-hero p {
  max-width: 1080px;
  margin: 0;
  color: var(--bth-lr-muted);
  font-size: 15px;
  line-height: 1.55;
}

/* HERO BOTTOM */

.bth-lr-page .bth-lr-hero-bottom {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 12px;
  align-items: stretch;
  margin-top: 14px;
}

.bth-lr-page .bth-lr-hero-search {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  min-width: 0;
  min-height: 56px;
  padding: 8px;
  border: 1px solid rgba(21, 152, 149, 0.14);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8ffff 100%);
}

.bth-lr-page .bth-lr-search {
  min-width: 0;
}

.bth-lr-page .bth-lr-search label {
  display: none;
}

.bth-lr-page .bth-lr-search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.bth-lr-page .bth-lr-search-box input {
  width: 100%;
  height: 40px;
  min-height: 40px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid rgba(21, 152, 149, 0.22);
  border-radius: 999px;
  background: #ffffff;
  color: var(--bth-lr-text);
  font-size: 13.5px;
  line-height: 40px;
  outline: none;
  box-shadow: none;
}

.bth-lr-page .bth-lr-search-box input:focus {
  border-color: rgba(21, 152, 149, 0.65);
  box-shadow: 0 0 0 4px rgba(21, 152, 149, 0.10);
}

.bth-lr-page .bth-lr-search-box button {
  height: 40px;
  min-height: 40px;
  margin: 0;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: #f0fdfa;
  color: var(--bth-lr-teal-dark);
  font-size: 12px;
  font-weight: 800;
  line-height: 40px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: none;
}

.bth-lr-page .bth-lr-search-box button:hover {
  background: #ccfbf1;
}

/* HERO META */

.bth-lr-page .bth-lr-hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.bth-lr-page .bth-lr-hero-meta > div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  min-height: 56px;
  padding: 8px 10px;
  border: 1px solid var(--bth-lr-border);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 7px 18px rgba(10, 77, 86, 0.032);
  overflow: hidden;
}

.bth-lr-page .bth-lr-hero-meta strong {
  display: block;
  flex: 0 0 auto;
  color: var(--bth-lr-pink);
  font-size: clamp(18px, 1.8vw, 23px);
  line-height: 1;
  font-weight: 900;
  white-space: nowrap;
}

.bth-lr-page .bth-lr-hero-meta span {
  display: block;
  min-width: 0;
  color: var(--bth-lr-muted);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 800;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: normal;
}

.bth-lr-page .bth-lr-hero-meta > div:nth-child(3) strong {
  font-size: clamp(18px, 1.7vw, 22px);
}

.bth-lr-page .bth-lr-hero-meta > div:nth-child(3) span {
  max-width: 42px;
}

/* MOBILE ONLY */

.bth-lr-page .bth-lr-mobile-filter-toggle,
.bth-lr-page .bth-lr-mobile-search {
  display: none;
}

/* MAIN */

.bth-lr-page .bth-lr-main {
  padding: 14px 0 34px;
  background: #ffffff;
}

.bth-lr-page .bth-lr-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

/* FILTER SIDEBAR */

.bth-lr-page .bth-lr-filters {
  position: sticky;
  top: 14px;
  padding: 13px;
  border: 1px solid var(--bth-lr-border);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(10, 77, 86, 0.04);
}

.bth-lr-page .bth-lr-filter-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 10px;
  min-height: 40px;
  margin: 0 0 12px;
  padding: 0 0 10px;
  border-bottom: 1px solid rgba(21, 152, 149, 0.14);
}

.bth-lr-page .bth-lr-filter-head strong {
  display: flex;
  align-items: center;
  min-height: 32px;
  margin: 0;
  color: #0f4c5c;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 900;
}

.bth-lr-page #bth-lr-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  min-height: 32px;
  margin: 0;
  padding: 0 11px;
  border: 0;
  border-radius: 999px;
  background: #f0fdfa;
  color: var(--bth-lr-teal-dark);
  font-size: 11.5px;
  line-height: 1;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: none;
}

.bth-lr-page #bth-lr-reset:hover {
  background: #ccfbf1;
}

.bth-lr-page .bth-lr-filter-group {
  margin-bottom: 12px;
}

.bth-lr-page .bth-lr-filter-group:last-child {
  margin-bottom: 0;
}

.bth-lr-page .bth-lr-filter-group h2 {
  margin: 0 0 7px;
  color: #0f6f6f;
  font-size: 12.5px;
  line-height: 1.35;
  font-weight: 900;
}

.bth-lr-page .bth-lr-filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bth-lr-page .bth-lr-filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  margin: 0;
  padding: 0 8px;
  border: 1px solid rgba(21, 152, 149, 0.18);
  border-radius: 999px;
  background: #f8ffff;
  color: #0f766e;
  font-size: 11px;
  line-height: 1;
  font-weight: 800;
  cursor: pointer;
  box-shadow: none;
  transition: transform .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}

.bth-lr-page .bth-lr-filter-btn:hover {
  transform: translateY(-1px);
  background: #ecfeff;
  border-color: rgba(21, 152, 149, 0.42);
}

.bth-lr-page .bth-lr-filter-btn.is-active {
  background: var(--bth-lr-teal);
  border-color: var(--bth-lr-teal);
  color: #ffffff;
}

/* PRODUCT GRID - PC 4 / Tablet 3 / Mobile 1 */

.bth-lr-page .bth-lr-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.bth-lr-page .bth-lr-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(21, 152, 149, 0.16);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(10, 77, 86, 0.04);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.bth-lr-page .bth-lr-card.is-pinned {
  border-color: rgba(219, 39, 119, 0.34);
  box-shadow: 0 10px 24px rgba(219, 39, 119, 0.075);
}

.bth-lr-page .bth-lr-card:hover {
  transform: translateY(-2px);
  border-color: var(--bth-lr-border-strong);
  box-shadow: 0 12px 26px rgba(10, 77, 86, 0.075);
}

.bth-lr-page .bth-lr-card[hidden] {
  display: none !important;
}

/* PRODUCT IMAGE */

.bth-lr-page .bth-lr-card-image {
  position: relative;
  display: block;
  flex: 0 0 auto;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: linear-gradient(135deg, #ecfeff 0%, #fff1f7 100%);
  color: inherit;
  text-decoration: none;
}

.bth-lr-page .bth-lr-card-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .25s ease;
}

.bth-lr-page .bth-lr-card:hover .bth-lr-card-image img {
  transform: scale(1.035);
}

.bth-lr-page .bth-lr-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bth-lr-page .bth-lr-card-placeholder span {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: #ffffff;
  font-size: 28px;
  box-shadow: 0 10px 24px rgba(10, 77, 86, 0.10);
}

.bth-lr-page .bth-lr-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  max-width: calc(100% - 16px);
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(219, 39, 119, 0.95);
  color: #ffffff;
  font-size: 10.5px;
  line-height: 1;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(219, 39, 119, 0.22);
}

.bth-lr-page .bth-lr-pin-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  max-width: calc(100% - 16px);
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.95);
  color: #ffffff;
  font-size: 10.5px;
  line-height: 1;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.22);
}

/* PRODUCT BODY */

.bth-lr-page .bth-lr-card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 12px;
}

.bth-lr-page .bth-lr-card-body h2 {
  min-height: 44px;
  margin: 0 0 7px;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 900;
}

.bth-lr-page .bth-lr-card-body h2 a {
  display: -webkit-box;
  color: #0f4c5c;
  text-decoration: none !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bth-lr-page .bth-lr-card-body h2 a:hover {
  color: var(--bth-lr-pink);
}

.bth-lr-page .bth-lr-card-body p {
  display: -webkit-box;
  min-height: 40px;
  margin: 0 0 9px;
  color: var(--bth-lr-muted);
  font-size: 12.5px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card tags: 6 tag tối đa, 3 cột x 2 hàng */

.bth-lr-page .bth-lr-tags {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  min-height: 50px;
  max-height: 50px;
  margin-bottom: 10px;
  overflow: hidden;
}

.bth-lr-page .bth-lr-tags span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #f0fdfa;
  color: #0f766e;
  font-size: 10.5px;
  line-height: 1;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bth-lr-page .bth-lr-tags span:nth-child(2n) {
  background: var(--bth-lr-pink-soft);
  color: var(--bth-lr-pink-dark);
}

.bth-lr-page .bth-lr-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 36px;
  margin-top: auto;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--bth-lr-teal);
  color: #ffffff !important;
  font-size: 12.5px;
  line-height: 1;
  font-weight: 900;
  text-decoration: none !important;
  box-shadow: 0 7px 16px rgba(21, 152, 149, 0.18);
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.bth-lr-page .bth-lr-button::after {
  content: " \2192" !important;
  margin-left: 4px;
}

.bth-lr-page .bth-lr-button:hover {
  transform: translateY(-2px);
  background: var(--bth-lr-teal-dark);
  color: #ffffff !important;
  box-shadow: 0 10px 22px rgba(21, 152, 149, 0.28);
}

/* PAGINATION */

.bth-lr-page .bth-lr-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  flex-wrap: wrap;
  margin: 22px 0 0;
  padding: 14px 12px 0;
  border-top: 1px solid rgba(21, 152, 149, 0.12);
}

.bth-lr-page .bth-lr-pagination[hidden] {
  display: none !important;
}

.bth-lr-page .bth-lr-page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex-wrap: wrap;
}

.bth-lr-page .bth-lr-pagination button,
.bth-lr-page .bth-lr-page-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(21, 152, 149, 0.18);
  border-radius: 999px;
  background: #ffffff;
  color: #0f766e;
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
  box-shadow: none;
}

.bth-lr-page .bth-lr-pagination button {
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}

.bth-lr-page .bth-lr-pagination button:hover:not(:disabled) {
  transform: translateY(-1px);
  background: #f0fdfa;
  border-color: rgba(21, 152, 149, 0.38);
}

.bth-lr-page .bth-lr-pagination button.is-active {
  background: var(--bth-lr-teal);
  border-color: var(--bth-lr-teal);
  color: #ffffff;
}

.bth-lr-page .bth-lr-pagination button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.bth-lr-page .bth-lr-page-prev,
.bth-lr-page .bth-lr-page-next {
  min-width: 70px !important;
}

.bth-lr-page .bth-lr-page-dots {
  border-color: transparent;
  background: transparent;
  color: var(--bth-lr-muted);
  min-width: 20px;
  padding: 0 2px;
}

/* EMPTY STATE */

.bth-lr-page .bth-lr-empty {
  padding: 30px;
  border: 1px dashed rgba(21, 152, 149, 0.32);
  border-radius: 18px;
  background: #f8ffff;
  text-align: center;
}

.bth-lr-page .bth-lr-empty[hidden] {
  display: none !important;
}

.bth-lr-page .bth-lr-empty strong {
  display: block;
  color: #0f4c5c;
  font-size: 18px;
  margin-bottom: 8px;
}

.bth-lr-page .bth-lr-empty p {
  margin: 0;
  color: var(--bth-lr-muted);
}

/* RESPONSIVE */

@media (min-width: 1700px) {
  .bth-lr-wrap {
    max-width: 1780px;
  }

  .bth-lr-page .bth-lr-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1400px) {
  .bth-lr-wrap {
    max-width: 100%;
    padding-left: 16px;
    padding-right: 16px;
  }

  .bth-lr-page .bth-lr-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .bth-lr-page .bth-lr-hero-bottom,
  .bth-lr-page .bth-lr-layout {
    grid-template-columns: 1fr;
  }

  .bth-lr-page .bth-lr-filters {
    position: static;
  }

  .bth-lr-page .bth-lr-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .bth-lr-page .bth-lr-hero-meta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* MOBILE */

@media (max-width: 760px) {
  .bth-lr-wrap {
    padding-left: 12px;
    padding-right: 12px;
  }

  .bth-lr-page .bth-lr-hero {
    padding-top: 16px;
  }

  .bth-lr-page .bth-lr-hero-copy {
    padding: 20px;
    border-radius: 18px;
  }

  .bth-lr-page .bth-lr-hero h1 {
    font-size: 30px;
  }

  .bth-lr-page .bth-lr-hero p {
    font-size: 14.5px;
  }

  .bth-lr-page .bth-lr-hero-bottom {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 14px;
  }

  .bth-lr-page .bth-lr-desktop-search {
    display: none;
  }

  .bth-lr-page .bth-lr-hero-meta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .bth-lr-page .bth-lr-hero-meta > div {
    min-height: 50px;
    padding: 8px;
    gap: 5px;
    justify-content: center;
  }

  .bth-lr-page .bth-lr-hero-meta strong {
    font-size: 18px;
  }

  .bth-lr-page .bth-lr-hero-meta span {
    font-size: 10.5px;
    line-height: 1.15;
  }

  .bth-lr-page .bth-lr-hero-meta > div:nth-child(3) span {
    max-width: 34px;
  }

  .bth-lr-page .bth-lr-mobile-filter-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 42px;
    margin: 0 0 10px;
    padding: 0 16px;
    border: 1px solid var(--bth-lr-border);
    border-radius: 999px;
    background: #f0fdfa;
    color: var(--bth-lr-teal-dark);
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: none;
  }

  .bth-lr-page .bth-lr-mobile-filter-toggle span {
    font-size: 17px;
    line-height: 1;
  }

  .bth-lr-page .bth-lr-mobile-search {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 0 0 12px;
    padding: 10px;
    border: 1px solid rgba(21, 152, 149, 0.14);
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8ffff 100%);
  }

  .bth-lr-page .bth-lr-mobile-search .bth-lr-search-box {
    grid-template-columns: minmax(0, 1fr) 64px;
  }

  .bth-lr-page .bth-lr-mobile-search .bth-lr-search-box button {
    width: auto;
  }

  .bth-lr-page .bth-lr-layout {
    grid-template-columns: 1fr;
  }

  .bth-lr-page .bth-lr-filters {
    display: none;
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 16px;
  }

  .bth-lr-page .bth-lr-filters.is-open {
    display: block;
  }

  .bth-lr-page .bth-lr-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .bth-lr-page .bth-lr-card {
    border-radius: 15px;
  }

  .bth-lr-page .bth-lr-card-body {
    padding: 12px;
  }

  .bth-lr-page .bth-lr-card-body h2 {
    min-height: auto;
    font-size: 16px;
  }

  .bth-lr-page .bth-lr-card-body p {
    min-height: auto;
    font-size: 13px;
  }

  .bth-lr-page .bth-lr-tags {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-height: 50px;
    max-height: 50px;
  }

  .bth-lr-page .bth-lr-tags span {
    min-height: 22px;
    font-size: 10.5px;
  }

  .bth-lr-page .bth-lr-button {
    min-height: 36px;
    font-size: 12.5px;
  }

  .bth-lr-page .bth-lr-pin-badge {
    font-size: 10px;
    padding: 5px 8px;
  }

  .bth-lr-page .bth-lr-pagination {
    gap: 7px;
    margin-top: 18px;
    padding-top: 12px;
  }

  .bth-lr-page .bth-lr-page-numbers {
    gap: 5px;
  }

  .bth-lr-page .bth-lr-pagination button,
  .bth-lr-page .bth-lr-page-dots {
    min-width: 31px;
    height: 31px;
    padding: 0 9px;
    font-size: 11.5px;
  }

  .bth-lr-page .bth-lr-page-prev,
  .bth-lr-page .bth-lr-page-next {
    min-width: 62px !important;
  }
}

@media (max-width: 430px) {
  .bth-lr-page .bth-lr-grid {
    grid-template-columns: 1fr;
  }
}
