/* =====================================================
   PUBLIC PAGES - Courses, About, Contact, Guide
   ===================================================== */

/* ----- Filter chip ----- */
.filter-chip {
  display: inline-block;
  padding: 8px 18px;
  background: #fff;
  border: 1px solid #e6e8ec;
  border-radius: 24px;
  color: var(--text-dark);
  font-size: .9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all .15s;
  cursor: pointer;
}
.filter-chip:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}
.filter-chip.active {
  background: rgba(31,111,235,.12);
  border-color: var(--brand-blue);
  color: var(--brand-blue);
  font-weight: 600;
}

.sort-dropdown .dropdown-toggle::after { margin-left: 8px; }

/* ----- Course card v2 (Khoa hoc list) ----- */
.course-card-v2 {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(15,23,42,.06);
  transition: all .2s;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.course-card-v2:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(15,23,42,.12);
}
.course-thumb-v2 {
  aspect-ratio: 5 / 3;
  background: #eef0f4;
  overflow: hidden;
  position: relative;
}
.course-thumb-v2 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}
.course-thumb-v2 .course-thumb-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #ff6b1a22, #1f6feb22);
  color: var(--brand-orange);
  font-size: 3rem;
}
.course-badge-v2 {
  position: absolute; top: 10px; right: 10px;
  padding: 4px 10px; border-radius: 12px;
  color: #fff; font-size: .72rem; font-weight: 700;
}

.course-body-v2 {
  padding: 16px;
  display: flex; flex-direction: column; flex: 1;
}
.course-title-v2 {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 10px;
  color: var(--text-dark);
  display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}
.course-instructor {
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.course-rating {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 12px;
  font-size: .85rem;
}
.course-rating .rating-num {
  font-weight: 700;
  color: var(--brand-orange);
}
.course-price-row {
  display: flex; align-items: baseline; gap: 8px;
  margin-top: auto;
  font-size: 1.05rem;
}
.course-price-row > strong {
  font-size: 20px;
  line-height: 1.1;
}
.course-price-row .price-strike {
  text-decoration: line-through;
  color: #aaa;
  font-weight: 400;
  font-size: .85rem;
}

/* ----- About page ----- */
.about-stats-band {
  background: linear-gradient(135deg, #16181d 0%, #1c1f2a 100%);
  color: #fff;
}
.about-stat-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--brand-orange);
  line-height: 1;
  margin-bottom: 8px;
}
.about-stat-label {
  font-size: .9rem;
  color: rgba(255,255,255,.85);
  font-weight: 500;
}
.about-feature {
  background: #fff;
  border-radius: 14px;
  padding: 28px 20px;
  height: 100%;
  box-shadow: 0 2px 12px rgba(15,23,42,.06);
  transition: all .2s;
}
.about-feature:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(15,23,42,.12);
}
.about-feature-icon {
  font-size: 3rem;
  line-height: 1;
}

/* ----- Contact page ----- */
.contact-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.bg-orange {
  background: var(--brand-orange) !important;
}
.social-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none;
  transition: all .15s;
}
.social-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255,107,26,.3);
}
.contact-form-card {
  background: #fff;
  border-radius: 14px;
  padding: 32px;
  box-shadow: 0 4px 24px rgba(15,23,42,.08);
}
.contact-form-card .form-control {
  border: 1px solid #e6e8ec;
  padding: 12px 14px;
}
.contact-form-card .form-control:focus {
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 .2rem rgba(255,107,26,.15);
}
.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  border: none !important;
}
.btn-danger:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
}

/* ===== V36 targeted fix: public course cards mobile/frame ===== */
.course-thumb-v2,
.course-card-v2 .thumb,
.cd-buy-thumb,
.course-cover,
.course-card-image {
  aspect-ratio: 5 / 3;
  overflow: hidden;
}
.course-thumb-v2 img,
.course-card-v2 .thumb img,
.cd-buy-thumb img,
.course-cover img,
.course-card-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  display: block;
}
@media (max-width: 767.98px) {
  .courses-grid-v2,
  .course-grid,
  .course-list-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  .course-card-v2,
  .course-card {
    border-radius: 14px;
  }
  .courses-filter-row,
  .course-filter-bar {
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .courses-sort,
  .sort-dropdown {
    width: 100%;
    justify-content: flex-start;
  }
}


/* V76: Social icons link chuẩn Facebook / YouTube / TikTok */
.social-facebook { background: #1877f2 !important; }
.social-youtube { background: #ff0000 !important; }
.social-tiktok { background: #111827 !important; }
.contact-social-links .social-btn { width: 42px; height: 42px; border-radius: 14px; }

/* ===== v198 course cart buttons ===== */
.course-thumb-link-v2{display:block;width:100%;height:100%;}
.course-thumb-cart-btn{position:absolute;left:50%;bottom:12px;transform:translateX(-50%);border:0;border-radius:12px;background:#2563eb;color:#fff;font-weight:700;font-size:.9rem;padding:10px 16px;box-shadow:0 8px 24px rgba(37,99,235,.28);display:inline-flex;align-items:center;gap:7px;z-index:2;}
.course-thumb-cart-btn:hover{background:#1d4ed8;}
.course-card-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px;}
.course-action-btn{display:inline-flex;align-items:center;justify-content:center;min-height:42px;border-radius:10px;text-decoration:none;font-size:.9rem;font-weight:700;background:#2563eb;color:#fff;}
.course-action-btn:hover{color:#fff;background:#1d4ed8;}
.course-action-btn.is-outline{background:#eff6ff;color:#2563eb;border:1px solid #bfdbfe;}
.course-action-btn.is-outline:hover{background:#dbeafe;color:#1d4ed8;}
@media (max-width: 575.98px){
  .course-thumb-cart-btn{padding:8px 14px;font-size:.85rem;bottom:10px;}
}

/* v199: thẻ khóa học dạng mua sắm, chỉ còn icon giỏ hàng vàng */
.course-card-v2{position:relative;}
.course-body-v2{position:relative;padding-bottom:66px;}
.course-thumb-cart-btn,.course-card-actions{display:none!important;}
.course-card-cart-yellow{position:absolute;right:16px;bottom:15px;width:46px;height:46px;border:0;border-radius:14px;background:#fbbf24;color:#713f12;display:inline-flex;align-items:center;justify-content:center;font-size:22px;box-shadow:0 8px 20px rgba(245,158,11,.28);z-index:3;transition:.18s;}
.course-card-cart-yellow:hover{background:#f59e0b;color:#fff;transform:translateY(-2px);}
.course-card-cart-yellow.added{background:#16a34a!important;color:#fff!important;box-shadow:0 8px 20px rgba(22,163,74,.28)!important;animation:none!important;}
.course-card-cart-yellow.added:hover{background:#15803d!important;color:#fff!important;}
@keyframes vtCourseCartTap{0%,100%{transform:scale(1)}35%{transform:scale(1.16) rotate(-5deg)}70%{transform:scale(.96) rotate(3deg)}}
@media(max-width:575.98px){
  .course-body-v2{padding-bottom:60px;}
  .course-card-cart-yellow{width:42px;height:42px;right:13px;bottom:13px;font-size:20px;}
}


/* v202: huy hiệu giảm giá / miễn phí nằm góc phải dưới thumbnail */
.course-thumb-v2 .course-badge-v2{
  top:auto!important;
  right:10px!important;
  bottom:10px!important;
  left:auto!important;
  z-index:4!important;
  padding:6px 11px!important;
  border-radius:12px!important;
  box-shadow:0 6px 16px rgba(15,23,42,.22)!important;
}
@media(max-width:575.98px){
  .course-thumb-v2 .course-badge-v2{right:8px!important;bottom:8px!important;padding:5px 9px!important;font-size:.68rem!important;}
}

/* v264 */
.course-title-v2{ text-transform:none!important; font-variant:normal!important; }


/* v280: nut gio hang co khung mau, desktop can phai */
.courses-cart-link-wrap{display:flex;justify-content:flex-end;align-items:center;margin-top:24px}
.courses-cart-link-btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:48px;padding:11px 20px;border:2px solid var(--brand-blue);border-radius:14px;background:linear-gradient(135deg,#eef6ff 0%,#ffffff 58%,#fff5ec 100%);color:var(--brand-blue);text-decoration:none;font-weight:800;font-size:1rem;box-shadow:0 10px 24px rgba(31,111,235,.14);transition:transform .18s ease,box-shadow .18s ease,background .18s ease,color .18s ease}
.courses-cart-link-btn:hover{background:linear-gradient(135deg,var(--brand-blue) 0%,#2b7cff 72%,var(--brand-orange) 100%);border-color:var(--brand-blue);color:#fff;transform:translateY(-2px);box-shadow:0 15px 30px rgba(31,111,235,.24)}
.courses-cart-link-btn i{font-size:1.08rem}
@media(max-width:575.98px){
  .courses-cart-link-wrap{justify-content:center;margin-top:18px}
  .courses-cart-link-btn{width:100%;max-width:100%;padding:12px 16px;border-radius:13px;font-size:.96rem}
}

/* v304: ribbon gon dung vao goc phai duoi anh khoa hoc */
.course-thumb-v2 .course-badge-v2{
  top:auto!important;
  left:auto!important;
  right:-29px!important;
  bottom:15px!important;
  width:105px!important;
  height:26px!important;
  min-width:0!important;
  padding:0 6px!important;
  border:0!important;
  border-radius:0!important;
  clip-path:none!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  color:#fff!important;
  font-size:.68rem!important;
  font-weight:900!important;
  line-height:1!important;
  letter-spacing:.3px!important;
  text-align:center!important;
  text-transform:uppercase!important;
  white-space:nowrap!important;
  transform:rotate(45deg)!important;
  transform-origin:center!important;
  box-shadow:0 4px 10px rgba(15,23,42,.22)!important;
  z-index:6!important;
  pointer-events:none!important;
}
.course-thumb-v2 .course-badge-v2.is-discount{
  background:linear-gradient(90deg,#ff5a5f 0%,#ef4444 55%,#dc2626 100%)!important;
}
.course-thumb-v2 .course-badge-v2.is-free{
  background:linear-gradient(90deg,#22c55e 0%,#16a34a 58%,#0f8a3c 100%)!important;
}
@media(max-width:575.98px){
  .course-thumb-v2 .course-badge-v2{
    right:-25px!important;
    bottom:12px!important;
    width:92px!important;
    height:24px!important;
    padding:0 4px!important;
    font-size:.6rem!important;
  }
}

/* v305: ribbon cheo tu duoi len tren, bam dung goc phai duoi */
.course-thumb-v2{overflow:hidden!important;}
.course-thumb-v2 .course-badge-v2{
  top:auto!important;
  left:auto!important;
  right:-34px!important;
  bottom:18px!important;
  width:118px!important;
  height:30px!important;
  min-width:0!important;
  padding:0 8px!important;
  border:0!important;
  border-radius:0!important;
  clip-path:none!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  font-size:.72rem!important;
  font-weight:900!important;
  line-height:1!important;
  letter-spacing:.35px!important;
  text-align:center!important;
  text-transform:uppercase!important;
  white-space:nowrap!important;
  transform:rotate(-45deg)!important;
  transform-origin:center!important;
  box-shadow:0 5px 12px rgba(15,23,42,.22)!important;
  z-index:6!important;
  pointer-events:none!important;
}
.course-thumb-v2 .course-badge-v2.is-discount{
  color:#3b2a00!important;
  background:linear-gradient(90deg,#d7a927 0%,#f4cf59 48%,#e0b437 100%)!important;
}
.course-thumb-v2 .course-badge-v2.is-free{
  color:#ffffff!important;
  background:linear-gradient(90deg,#16a34a 0%,#22c55e 50%,#0f9f45 100%)!important;
}
@media(max-width:575.98px){
  .course-thumb-v2 .course-badge-v2{
    right:-31px!important;
    bottom:15px!important;
    width:106px!important;
    height:27px!important;
    padding:0 6px!important;
    font-size:.64rem!important;
  }
}

/* v307: nhan cheo gon sat goc phai duoi, khong che noi dung thumbnail */
.course-thumb-v2{position:relative!important;overflow:hidden!important;}
.course-thumb-v2 .course-badge-v2{
  top:auto!important;
  left:auto!important;
  right:-28px!important;
  bottom:9px!important;
  width:96px!important;
  height:24px!important;
  min-width:0!important;
  padding:0 4px!important;
  border:0!important;
  border-radius:0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  transform:rotate(-45deg)!important;
  transform-origin:center!important;
  font-size:.64rem!important;
  font-weight:900!important;
  line-height:1!important;
  letter-spacing:.25px!important;
  white-space:nowrap!important;
  text-transform:uppercase!important;
  box-shadow:0 3px 8px rgba(15,23,42,.18)!important;
  z-index:8!important;
  pointer-events:none!important;
}
.course-thumb-v2 .course-badge-v2.is-discount{
  color:#4a3500!important;
  background:linear-gradient(90deg,#c9971e 0%,#f4cf59 48%,#e0b437 100%)!important;
}
.course-thumb-v2 .course-badge-v2.is-free{
  color:#ffffff!important;
  background:linear-gradient(90deg,#159d3f 0%,#2bd45f 52%,#0d8c37 100%)!important;
}
@media(max-width:575.98px){
  .course-thumb-v2 .course-badge-v2{
    right:-25px!important;
    bottom:8px!important;
    width:86px!important;
    height:22px!important;
    font-size:.58rem!important;
    letter-spacing:.15px!important;
  }
}
