/* Trang chủ + blog TrọViệt: sáng, sạch, một màu nhấn (var(--primary)) */
.hm { --hm-ink: var(--text, #222); --hm-y: var(--primary, #d63a52); --hm-line: var(--line, #ebe9e5); --hm-r: var(--radius, 16px); color: var(--hm-ink); padding-bottom: 24px; }
.hm h1, .hm h2, .hm h3 { font-family: var(--font-head, 'Lexend Deca', 'Inter', system-ui, sans-serif); letter-spacing: -.02em; margin: 0; }

/* Hero */
.hm-hero { padding: 48px 0 24px; text-align: center; }
.hm-hero h1 { font-size: clamp(28px, 5.4vw, 48px); font-weight: 800; line-height: 1.12; overflow-wrap: anywhere; }
.hm-hero h1 span { color: var(--accent-ink, #b3243b); }
.hm-sub { color: var(--muted, #6a6963); margin: 14px auto 28px; max-width: 560px; font-size: 16px; }

.hm-search { max-width: 760px; margin: 0 auto; }
.hm-box { position: relative; display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--hm-line); border-radius: 999px; padding: 8px 8px 8px 22px; box-shadow: 0 6px 24px rgba(34,34,34,.1); }
.hm-box:focus-within { border-color: var(--hm-y); box-shadow: 0 0 0 3px rgba(214,58,82,.22), 0 6px 24px rgba(34,34,34,.1); }
.hm-ico { font-size: 24px; color: var(--muted, #6a6963); line-height: 1; }
.hm-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 17px; padding: 12px 4px; box-shadow: none; -webkit-appearance: none; appearance: none; }
.hm-go { border: 0; background: var(--hm-y); color: var(--primary-ink, #fff); font-weight: 700; font-size: 16px; min-height: 48px; padding: 0 30px; border-radius: 999px; cursor: pointer; font-family: inherit; touch-action: manipulation; }
.hm-go:hover { background: var(--primary-d, #bd2c43); }
.hm-sug { position: absolute; left: 0; right: 0; top: calc(100% + 10px); background: #fff; border: 1px solid var(--hm-line); border-radius: 20px; box-shadow: 0 16px 40px rgba(34,34,34,.16); padding: 8px; z-index: 30; text-align: left; max-height: 360px; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.hm-sug-h { font-size: 12px; font-weight: 700; color: var(--muted, #6a6963); padding: 8px 10px 4px; text-transform: uppercase; letter-spacing: .04em; }
.hm-sug-i { display: flex; align-items: center; gap: 12px; width: 100%; background: none; border: 0; padding: 9px 10px; min-height: 48px; border-radius: 12px; cursor: pointer; text-align: left; font: inherit; color: inherit; touch-action: manipulation; }
.hm-sug-i:hover, .hm-sug-i.on { background: var(--bg, #f7f6f4); }
.hm-sug-ico { width: 36px; height: 36px; border-radius: 12px; background: var(--bg, #f7f6f4); display: grid; place-items: center; flex: none; }
.hm-sug-i b { display: block; font-size: 15px; font-weight: 600; }
.hm-sug-i small { color: var(--muted, #6a6963); font-size: 12.5px; }

.hm-filters { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.hm-fbtn { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line-strong, #d3d0c9); border-radius: 999px; min-height: 44px; padding: 0 18px; font: inherit; font-size: 14px; font-weight: 600; color: var(--hm-ink); cursor: pointer; transition: border-color .15s, background .15s; touch-action: manipulation; }
.hm-fbtn:hover { border-color: var(--hm-ink); }
.hm-fbtn.on { background: var(--primary-soft, #fdeef0); border-color: var(--hm-y); color: var(--accent-ink, #b3243b); }
.hm-fbtn.busy { opacity: .6; }
.hm-caret { font-size: 11px; color: var(--muted, #6a6963); }
.hm-n { background: var(--hm-y); color: var(--primary-ink, #fff); border-radius: 999px; min-width: 20px; height: 20px; padding: 0 6px; font-size: 12px; display: inline-grid; place-items: center; }
.hm-n[hidden], .hm-sug[hidden] { display: none; }
.hm-chips { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.hm-chip { background: transparent; border: 1px solid var(--hm-line); border-radius: 999px; min-height: 40px; padding: 0 16px; font: inherit; font-size: 13.5px; color: #4b4a44; cursor: pointer; touch-action: manipulation; }
.hm-chip:hover { background: var(--bg, #f7f6f4); }
.hm-chip.on { background: var(--hm-ink); color: #fff; border-color: var(--hm-ink); }
.hm-sep { width: 1px; background: var(--hm-line); margin: 2px 4px; }
.hm-stats { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 22px; margin-top: 20px; color: var(--muted, #6a6963); font-size: 13.5px; }
.hm-stats b { color: var(--hm-ink); font-weight: 700; }

/* Danh mục nhanh */
.hm-cats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 28px; }
.hm-cat { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 8px; background: #fff; border: 1px solid var(--hm-line); border-radius: 20px; color: var(--hm-ink); text-align: center; transition: box-shadow .2s, transform .2s, border-color .2s; touch-action: manipulation; }
.hm-cat:hover { color: var(--hm-ink); transform: translateY(-3px); box-shadow: 0 12px 28px rgba(34,34,34,.1); border-color: var(--primary-line, #f6c6ce); }
.hm-cat-ico { width: 52px; height: 52px; border-radius: 50%; background: var(--primary-soft, #fdeef0); color: var(--accent-ink, #b3243b); display: grid; place-items: center; }
.hm-cat b { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }

/* Khối nội dung */
.hm-sec { margin-top: 48px; }
.hm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.hm-head h2 { font-size: 26px; font-weight: 800; }
.hm-head p { margin: 4px 0 0; color: var(--muted, #6a6963); font-size: 14px; }
.hm-all { white-space: nowrap; font-weight: 600; font-size: 14px; color: var(--accent-ink, #b3243b); text-decoration: none; padding: 10px 0; }
.hm-all:hover { text-decoration: underline; }

.hm-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 18px; }
.hm-row { display: flex; gap: 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; padding: 6px 2px 16px; margin: 0 -2px; scrollbar-width: thin; }
.hm-slide { flex: 0 0 min(290px, 78%); scroll-snap-align: start; display: flex; margin-right: 0; }
.hm-slide > .lcard { width: 100%; }

.hm-skel-row, .hm-skel-grid { gap: 16px; }
.hm-skel-row { display: flex; overflow: hidden; }
.hm-skel-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hm-skel { flex: 0 0 min(290px, 78%); background: #fff; border: 1px solid var(--hm-line); border-radius: 20px; padding: 0 0 16px; overflow: hidden; }
.hm-skel-grid .hm-skel { flex: none; }
.hm-skel i { display: block; aspect-ratio: 4/3; background: #efede8; }
.hm-skel b { display: block; height: 14px; border-radius: 7px; background: #efede8; margin: 14px 14px 0; }
.hm-skel b.s { width: 55%; }
.hm-skel i, .hm-skel b, .hm-area.skel { animation: hm-pulse 1.2s ease-in-out infinite; }
@keyframes hm-pulse { 50% { opacity: .55; } }

.hm-areas { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.hm-area { background: #fff; border: 1px solid var(--hm-line); border-radius: var(--hm-r); padding: 20px; text-decoration: none; color: var(--hm-ink); display: flex; flex-direction: column; gap: 4px; transition: border-color .2s, transform .2s, box-shadow .2s; min-height: 84px; }
.hm-area:hover { color: var(--hm-ink); border-color: var(--primary-line, #f6c6ce); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(34,34,34,.09); }
.hm-area b { font-family: var(--font-head, 'Lexend Deca', sans-serif); font-size: 17px; overflow-wrap: anywhere; }
.hm-area span { color: var(--muted, #6a6963); font-size: 13.5px; }
.hm-area.skel { background: #efede8; border-color: transparent; }

/* Dải tin cậy */
.hm-trust { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 56px; padding: 28px; background: var(--bg, #f7f6f4); border-radius: 24px; }
.hm-trust > div { padding: 4px 8px; }
.hm-t-ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #fff; color: var(--accent-ink, #b3243b); font-weight: 800; font-size: 18px; margin-bottom: 12px; box-shadow: var(--shadow); }
.hm-trust b { display: block; font-size: 16px; font-family: var(--font-head, 'Lexend Deca', sans-serif); }
.hm-trust p { margin: 6px 0 0; color: var(--muted, #6a6963); font-size: 14.5px; line-height: 1.5; }

.hm-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.hm-step { background: #fff; border: 1px solid var(--hm-line); border-radius: var(--hm-r); padding: 24px; }
.hm-step span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--primary-soft, #fdeef0); color: var(--accent-ink, #b3243b); font-weight: 800; margin-bottom: 12px; }
.hm-step b { display: block; font-size: 17px; font-family: var(--font-head, 'Lexend Deca', sans-serif); }
.hm-step p { margin: 6px 0 0; color: var(--muted, #6a6963); font-size: 14.5px; line-height: 1.5; }

.hm-posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.hm-post { display: flex; flex-direction: column; gap: 6px; background: #fff; border: 1px solid var(--hm-line); border-radius: var(--hm-r); padding: 22px; text-decoration: none; color: var(--hm-ink); transition: box-shadow .2s, transform .2s; }
.hm-post:hover { color: var(--hm-ink); box-shadow: 0 12px 28px rgba(34,34,34,.1); transform: translateY(-2px); }
.hm-post small { color: var(--muted, #6a6963); }
.hm-post b { font-family: var(--font-head, 'Lexend Deca', sans-serif); font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; }
.hm-post p { margin: 0; color: var(--muted, #6a6963); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hm-post span { font-weight: 600; font-size: 14px; margin-top: auto; padding-top: 6px; color: var(--accent-ink, #b3243b); }

/* Khối Zalo + CTA */
.hm-zalo { margin-top: 48px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; background: #fff; border: 1px solid var(--hm-line); border-radius: 24px; padding: 28px 32px; box-shadow: var(--shadow); }
.hm-zalo h2 { font-size: 22px; font-weight: 800; margin: 0; }
.hm-zalo p { margin: 6px 0 0; color: var(--muted, #6a6963); }
.hm-zalo-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.hm-zalo-btn, .hm-zalo-tel { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 700; touch-action: manipulation; }
.hm-zalo-btn { background: #0068ff; color: #fff; }
.hm-zalo-btn:hover { background: #0057d8; color: #fff; }
.hm-zalo-tel { background: #fff; border: 1px solid var(--line-strong, #d3d0c9); color: var(--hm-ink); }
.hm-zalo-tel:hover { border-color: var(--hm-ink); color: var(--hm-ink); }

.hm-cta { margin-top: 24px; background: var(--hm-y); color: var(--primary-ink, #fff); border-radius: 24px; padding: 34px 38px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.hm-cta h2 { font-size: 26px; font-weight: 800; }
.hm-cta p { margin: 6px 0 0; max-width: 520px; opacity: .95; }
.hm-cta-btn { background: #fff; color: var(--accent-ink, #b3243b); text-decoration: none; font-weight: 700; min-height: 48px; display: inline-flex; align-items: center; padding: 0 28px; border-radius: 999px; touch-action: manipulation; }
.hm-cta-btn:hover { background: var(--primary-soft, #fdeef0); color: var(--accent-ink, #b3243b); }
.hm-loading { padding: 60px 0; text-align: center; color: var(--muted, #6a6963); }

/* Blog */
.bl { max-width: 760px; margin: 0 auto; padding: 32px 0 24px; color: var(--text, #222); }
.bl h1 { font-size: clamp(26px, 4vw, 36px); line-height: 1.2; letter-spacing: -.02em; margin: 0; overflow-wrap: anywhere; }
.bl-sub { color: var(--muted, #6a6963); margin: 8px 0 22px; }
.bl-list { display: flex; flex-direction: column; gap: 14px; }
.bl-item { display: flex; flex-direction: column; gap: 6px; background: #fff; border: 1px solid var(--line, #ebe9e5); border-radius: 20px; padding: 20px 22px; text-decoration: none; color: inherit; transition: box-shadow .2s, transform .2s; }
.bl-item:hover { color: inherit; box-shadow: 0 12px 28px rgba(34,34,34,.1); transform: translateY(-2px); }
.bl-item small { color: var(--muted, #6a6963); }
.bl-item b { font-family: var(--font-head, 'Lexend Deca', sans-serif); font-size: 18px; line-height: 1.3; overflow-wrap: anywhere; }
.bl-item p { margin: 0; color: var(--muted, #6a6963); font-size: 14.5px; }
.bl-item span { font-weight: 600; font-size: 14px; color: var(--accent-ink, #b3243b); }
.bl-article { background: #fff; border: 1px solid var(--line, #ebe9e5); border-radius: 24px; padding: 32px; margin-top: 20px; }
.bl-back { color: var(--muted, #6a6963); text-decoration: none; font-size: 14px; display: inline-block; padding: 8px 0; }
.bl-article h1 { margin-top: 12px; }
.bl-date { display: block; color: var(--muted, #6a6963); margin-top: 8px; }
.bl-lead { font-size: 18px; line-height: 1.55; color: #4b4a44; margin: 18px 0; padding-left: 14px; border-left: 4px solid var(--primary, #d63a52); }
.bl-body { white-space: pre-wrap; line-height: 1.75; font-size: 16.5px; overflow-wrap: anywhere; }
.bl-cover { border-radius: 16px; overflow: hidden; aspect-ratio: 16/9; background: var(--bg, #f7f6f4); }
.bl-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bl-cover.ph { display: grid; place-items: center; background: var(--primary-soft, #fdeef0); color: var(--accent-ink, #b3243b); font-size: 36px; font-weight: 800; }
.bl-share { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.bl-sh { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--line-strong, #d3d0c9); border-radius: 999px; background: #fff; font: inherit; font-size: 14px; color: var(--text); cursor: pointer; }
.bl-skel { height: 96px; border-radius: 20px; background: #efede8; animation: hm-pulse 1.2s ease-in-out infinite; }

@media (max-width: 1000px) {
  .hm-grid, .hm-skel-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .hm-areas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hm-steps, .hm-posts, .hm-trust { grid-template-columns: 1fr; }
  .hm-grid, .hm-skel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .hm-cats { display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; margin-left: -16px; margin-right: -16px; padding: 4px 16px 8px; scrollbar-width: none; gap: 0; }
  .hm-cats::-webkit-scrollbar { display: none; }
  .hm-cat { flex: 0 0 104px; margin-right: 10px; scroll-snap-align: start; padding: 14px 6px; }
  .hm-cat-ico { width: 46px; height: 46px; }
}
@media (max-width: 600px) {
  .hm-hero { padding: 24px 0 12px; }
  .hm-box { padding: 6px 6px 6px 16px; }
  .hm-ico { font-size: 22px; }
  .hm-go { padding: 0 20px; }
  .hm-filters, .hm-chips { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 2px 16px; }
  .hm-filters::-webkit-scrollbar, .hm-chips::-webkit-scrollbar { display: none; }
  .hm-fbtn, .hm-chip { flex: none; white-space: nowrap; margin-right: 8px; }
  .hm-filters, .hm-chips { gap: 0; }
  .hm-box input { font-size: 16px; }
  .hm-sec { margin-top: 36px; }
  .hm-head h2 { font-size: 21px; }
  .hm-grid, .hm-skel-grid { gap: 16px 12px; }
  .hm-zalo { padding: 22px; }
  .hm-zalo-btns { width: 100%; }
  .hm-zalo-btn, .hm-zalo-tel { flex: 1 1 140px; }
  .hm-cta { padding: 24px; }
  .hm-cta-btn { width: 100%; justify-content: center; box-sizing: border-box; }
  .bl-article { padding: 20px; }
}
@media (max-width: 400px) {
  .hm-grid, .hm-skel-grid { grid-template-columns: minmax(0, 1fr); }
  .hm-trust { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) { .hm-cat, .hm-area, .hm-post, .bl-item { transition: none; } .hm-cat:hover, .hm-area:hover, .hm-post:hover, .bl-item:hover { transform: none; } }
