/* ProMax — khối "Tài liệu cho bạn" ở trang chủ Tài Liệu Toán (học sinh · phụ huynh · giáo viên).
   Chỉ nạp ở trang chủ. HTML do inc/trang-chu.php in. Ảnh minh họa: assets/img/ai-*.webp (agy tạo 12/11, không chữ). */
.pm-ai { margin-bottom: var(--pm-tho); }
.pm-ai__ds { display: grid; gap: clamp(14px, 1.6vw, 24px); margin: 0; padding: 0; list-style: none; }
@media (min-width: 900px) { .pm-ai__ds { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pm-ai__the {
  --ai-dam: #1560bd;
  --ai-le: clamp(16px, 1.6vw, 22px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 3px solid #fff;
  border-radius: var(--pm-goc-xl);
  background: #fff;
  box-shadow: var(--pm-tang-1);
}
.pm-ai__the--cam { --ai-dam: #9a4a0b; }
.pm-ai__the--la { --ai-dam: #15803d; }
.pm-ai__anh { display: block; width: 100%; height: auto; margin: 0; aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 42%; border-radius: 0; background: #fdf3df; } /* viền trắng MỎNG 3px = viền của thẻ (.pm-ai__the), ảnh phóng khi rê vẫn nằm trong viền, như thẻ vai trò bên Luyện thi (12/11) */
.pm-ai__dau { padding: var(--ai-le) var(--ai-le) 0; }
.pm-ai__ten { margin: 0 0 4px; font: 800 clamp(1.3rem, 1.15rem + 0.6vw, 1.6rem)/1.25 var(--gt-head); color: var(--gt-navy); }
.pm-ai__mo-ta { margin: 0; color: #334155; font-size: 0.9688rem; line-height: 1.5; }
.pm-ai__link { display: grid; gap: 8px; margin: 0; padding: 14px var(--ai-le) var(--ai-le); list-style: none; }
.pm-ai__link a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px 0 16px;
  border-radius: var(--pm-goc);
  background: #f6f1e7;
  color: var(--gt-navy);
  font-weight: 700;
  font-size: 0.9688rem;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease;
}
.pm-ai__link a svg { flex: none; color: var(--ai-dam); }
.pm-ai__link a:hover,
.pm-ai__link a:focus-visible { color: var(--ai-dam); background: #ffeed6; }

@media (max-width: 899px) {
  /* Điện thoại / máy tính bảng dọc: ảnh nhỏ bên trái, chữ bên phải, link 2 cột bên dưới → thẻ thấp, trang không dài thêm nhiều */
  .pm-ai__the { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; }
  .pm-ai__anh { width: 109px; height: 100%; min-height: 90px; margin: 0; aspect-ratio: auto; object-position: 50% 30%; border-radius: calc(var(--pm-goc-xl) - 3px) 0 0 calc(var(--pm-goc-xl) - 3px); }
  .pm-ai__dau { padding: 12px 14px; }
  .pm-ai__link { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px 14px 14px; border-top: 1px solid var(--pm-toc); }
  .pm-ai__link a { padding: 6px 8px 6px 12px; font-size: 0.9063rem; line-height: 1.3; }
}
@media (max-width: 359px) { .pm-ai__link { grid-template-columns: minmax(0, 1fr); } }

/* Rê chuột: ảnh phóng nhẹ 3% — giống thẻ vai trò bên Luyện thi (.lt-vai__the). Không chạy trên cảm ứng / khi giảm chuyển động. */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .pm-ai__anh { transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1); }
  .pm-ai__the:hover .pm-ai__anh { transform: scale(1.03); }
  .pm-ai__the { transition: box-shadow 160ms ease; }
  .pm-ai__the:hover { box-shadow: var(--pm-tang-2); }
}
