/* ==========================================================================
   Trang chủ — Dongphuc.me
   Hệ thống thiết kế riêng cho trang chủ (Flexible Content).
   Token "--hf-" (home flex) tách biệt khỏi main.css để không chồng chéo
   với các trang khác (giới thiệu / liên hệ / blog vẫn dùng main.css).
   Ngôn ngữ hình ảnh: xưởng may — thước dây, đường chỉ may, tem vải.
   ========================================================================== */

:root {
  --hf-navy: #06264D;
  --hf-navy-deep: #041B38;
  --hf-red: #CA0F17;
  --hf-red-deep: #8D0A10;
  --hf-canvas: #F1F4F8;
  --hf-ink: #14202E;
  --hf-muted: #55677D;
  --hf-stitch: #C7D0DC;
  --hf-white: #FFFFFF;

  --hf-font-display: "Anton", "Be Vietnam Pro", Arial, sans-serif;
  --hf-font-body: "Be Vietnam Pro", Arial, Helvetica, sans-serif;
  --hf-font-mono: "JetBrains Mono", "Courier New", monospace;

  --hf-container: 1280px;
  --hf-radius: 6px;
  --hf-ease: cubic-bezier(.22, 1, .36, 1);
}

.home-flex { background: var(--hf-canvas); color: var(--hf-ink); font-family: var(--hf-font-body); overflow-x: clip; }
.home-flex * { box-sizing: border-box; }
.home-flex img { max-width: 100%; display: block; }
.home-flex a { text-decoration: none; color: inherit; }

.hf-container { width: min(100% - 40px, var(--hf-container)); margin: 0 auto; }

.hf-section { padding: 58px 0; }
.hf-section--tight { padding: 38px 0; }
.hf-section--navy { background: var(--hf-navy); color: var(--hf-white); }
.hf-section--white { background: var(--hf-white); }

.hf-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--hf-font-mono);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--hf-red);
  margin: 0 0 14px;
}
.hf-eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--hf-red); display: inline-block; }
.hf-eyebrow--center { justify-content: center; }
.hf-section--navy .hf-eyebrow { color: #FF6B6F; }
.hf-section--navy .hf-eyebrow::before { background: #FF6B6F; }

.hf-h2 {
  font-family: var(--hf-font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .01em;
  line-height: 1.05;
  font-size: clamp(28px, 3.6vw, 44px);
  color: var(--hf-navy);
  margin: 0 0 16px;
}
.hf-section--navy .hf-h2 { color: var(--hf-white); }
.hf-h2--center { text-align: center; margin-left: auto; margin-right: auto; }
.hf-h2--sm { font-size: clamp(20px, 2.6vw, 28px); max-width: 56ch; }

.hf-lead { font-size: 17px; line-height: 1.65; color: var(--hf-muted); margin: 0 0 24px; max-width: 62ch; }
.hf-section--navy .hf-lead { color: rgba(255,255,255,.78); }

.hf-head { max-width: 720px; margin: 0 0 48px; }
.hf-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.hf-head--center .hf-eyebrow { justify-content: center; }
.hf-head--center .hf-lead { margin-left: auto; margin-right: auto; }

/* Buttons ------------------------------------------------------------- */
.hf-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 26px;
  border-radius: var(--hf-radius);
  font-weight: 700;
  font-size: 15px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .2s var(--hf-ease), box-shadow .2s var(--hf-ease), background-color .2s ease, color .2s ease;
}
.hf-btn:hover { transform: translateY(-2px); }
.hf-btn--primary { background: var(--hf-red); color: var(--hf-white); box-shadow: 0 10px 24px rgba(202,15,23,.28); }
.hf-btn--primary:hover { background: var(--hf-red-deep); box-shadow: 0 14px 30px rgba(202,15,23,.36); }
.hf-btn--outline { background: transparent; border-color: currentColor; color: var(--hf-navy); }
.hf-btn--outline:hover { background: var(--hf-navy); border-color: var(--hf-navy); color: var(--hf-white); }
.hf-section--navy .hf-btn--outline { color: var(--hf-white); }
.hf-section--navy .hf-btn--outline:hover { background: var(--hf-white); color: var(--hf-navy); }
.hf-cta-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* Stitch hairline ------------------------------------------------------ */
.hf-stitch { border: 0; border-top: 2px dashed var(--hf-stitch); margin: 0; }

/* ===================== HERO (khung thấp, khớp tỉ lệ ảnh thật để lấp đầy 2 bên) ===================== */
.hf-hero { position: relative; background: var(--hf-navy); overflow: hidden; }
.hf-hero-slides { position: relative; width: 100%; aspect-ratio: 2.15/1; }
.hf-hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1s var(--hf-ease); }
.hf-hero-slide.is-active { opacity: 1; }
.hf-hero-slide img, .hf-hero-slide a { display: block; width: 100%; height: 100%; }
.hf-hero-slide img { object-fit: cover; }
.hf-hero-dots { position: absolute; z-index: 2; left: 50%; transform: translateX(-50%); bottom: 14px; display: flex; gap: 8px; }
.hf-hero-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.55); border: 0; cursor: pointer; padding: 0; box-shadow: 0 0 0 1px rgba(6,38,77,.3); transition: background-color .2s ease, width .2s ease; }
.hf-hero-dot.is-active { background: var(--hf-red); width: 22px; border-radius: 4px; }

/* ===================== INTRO ===================== */
.hf-intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.hf-intro-media { position: relative; border-radius: var(--hf-radius); overflow: hidden; box-shadow: 0 30px 60px rgba(6,38,77,.18); }
.hf-intro-media img { aspect-ratio: 4/3; object-fit: cover; }
.hf-intro-media::after {
  content: "";
  position: absolute; inset: 0;
  border: 10px solid transparent;
  outline: 2px dashed rgba(255,255,255,.55);
  outline-offset: -18px;
  pointer-events: none;
}
.hf-intro-media:has(.hf-intro-video)::after { display: none; }
.hf-intro-video { position: relative; width: 100%; aspect-ratio: 16/9; }
.hf-intro-video iframe, .hf-intro-video embed, .hf-intro-video object { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.hf-intro-btn {
  display: flex;
  width: max-content;
  margin: 26px auto 0;
  min-width: 200px;
  justify-content: center;
  border-radius: 999px;
  padding: 15px 30px;
  color: var(--hf-white);
  background: linear-gradient(135deg, var(--hf-red) 0%, #E61F2B 50%, var(--hf-red-deep) 100%);
  border-color: rgba(255,255,255,.24);
  box-shadow: 0 14px 30px rgba(202,15,23,.3), inset 0 1px 0 rgba(255,255,255,.22);
}
.home-flex .hf-intro-btn { color: var(--hf-white); }
.hf-intro-btn:hover {
  color: var(--hf-white);
  background: linear-gradient(135deg, #F02B35 0%, var(--hf-red) 48%, #74070D 100%);
  box-shadow: 0 18px 38px rgba(202,15,23,.42), inset 0 1px 0 rgba(255,255,255,.24);
}

.hf-stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 36px; }
.hf-stats-row--grid { grid-template-columns: repeat(2, 1fr); gap: 28px 40px; }
.hf-stat { border-left: 3px solid var(--hf-red); padding-left: 14px; }
.hf-stats-row--grid .hf-stat { border-left: 0; border-top: 1px solid var(--hf-stitch); padding-left: 0; padding-top: 16px; }
.hf-stat-number { display: block; font-family: var(--hf-font-display); font-weight: 400; font-size: clamp(30px, 3.6vw, 44px); color: var(--hf-navy); line-height: 1; }
.hf-stat-label { display: block; margin-top: 6px; font-size: 13.5px; color: var(--hf-muted); }

/* ===================== FEATURED PROJECTS (lưới 3 cột x 2 dòng) ===================== */
.hf-project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 28px; }
.hf-project-media { display: block; aspect-ratio: 4/3; border-radius: var(--hf-radius); overflow: hidden; }
.hf-project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--hf-ease); }
.hf-project-card:hover .hf-project-media img { transform: scale(1.05); }
.hf-project-body { padding-top: 16px; }
.hf-project-title { margin: 0 0 10px; font-size: 17px; font-weight: 800; line-height: 1.4; }
.hf-project-title a { color: var(--hf-navy); }
.hf-project-title a:hover { color: var(--hf-red); }
.hf-project-excerpt { margin: 0 0 12px; color: var(--hf-muted); font-size: 14px; line-height: 1.65; }
.hf-project-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13.5px; color: var(--hf-red); }
.hf-project-more:hover { text-decoration: underline; }

@media (max-width: 980px) {
  .hf-project-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}
@media (max-width: 620px) {
  .hf-project-grid { grid-template-columns: 1fr; }
}

.hf-news-slider {
  position: relative;
}
.hf-news-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.hf-news-viewport::-webkit-scrollbar { display: none; }
.hf-news-track {
  display: flex;
  gap: 28px;
  align-items: stretch;
}
.hf-news-track .hf-news-card {
  flex: 0 0 calc((100% - 56px) / 3);
  scroll-snap-align: start;
}
.hf-news-nav {
  position: absolute;
  top: 34%;
  z-index: 3;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--hf-navy);
  box-shadow: 0 14px 30px rgba(6,38,77,.16);
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: transform .22s var(--hf-ease), color .22s ease, background-color .22s ease, opacity .22s ease;
}
.hf-news-nav:hover {
  color: #fff;
  background: var(--hf-red);
  transform: translateY(-2px);
}
.hf-news-nav:disabled {
  opacity: .42;
  cursor: default;
  transform: none;
}
.hf-news-nav--prev { left: -22px; }
.hf-news-nav--next { right: -22px; }

@media (max-width: 980px) {
  .hf-news-track { gap: 18px; }
  .hf-news-track .hf-news-card { flex-basis: calc((100% - 18px) / 2); }
  .hf-news-nav {
    top: 38%;
    width: 38px;
    height: 38px;
    font-size: 26px;
  }
  .hf-news-nav--prev { left: -10px; }
  .hf-news-nav--next { right: -10px; }
}

@media (max-width: 620px) {
  .hf-news-track { gap: 16px; }
  .hf-news-track .hf-news-card { flex-basis: 100%; }
}

/* ===================== FEATURED PRODUCTS (lưới 4 cột) ===================== */
.hf-featured-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.hf-featured-card {
  display: block; background: var(--hf-white); border-radius: var(--hf-radius); overflow: hidden;
  box-shadow: 0 12px 28px rgba(6,38,77,.08);
  transition: transform .25s var(--hf-ease), box-shadow .25s var(--hf-ease);
}
.hf-featured-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(6,38,77,.14); }
.hf-featured-media { display: block; aspect-ratio: 1/1; overflow: hidden; background: var(--hf-canvas); }
.hf-featured-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--hf-ease); }
.hf-featured-card:hover .hf-featured-media img { transform: scale(1.06); }
.hf-featured-body { display: block; padding: 16px 18px 20px; }
.hf-featured-name { display: block; font-weight: 700; font-size: 14.5px; line-height: 1.4; color: var(--hf-navy); margin-bottom: 6px; }
.hf-featured-price { display: block; font-family: var(--hf-font-mono); font-size: 13px; color: var(--hf-red); font-weight: 700; }

@media (max-width: 980px) {
  .hf-featured-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

.hf-featured-slider {
  position: relative;
}
.hf-featured-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.hf-featured-viewport::-webkit-scrollbar { display: none; }
.hf-featured-track {
  display: flex;
  gap: 24px;
  align-items: stretch;
}
.hf-featured-track .hf-featured-card {
  flex: 0 0 calc((100% - 72px) / 4);
  scroll-snap-align: start;
}
.hf-featured-nav {
  position: absolute;
  top: 38%;
  z-index: 3;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--hf-navy);
  box-shadow: 0 14px 30px rgba(6,38,77,.16);
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: transform .22s var(--hf-ease), color .22s ease, background-color .22s ease, opacity .22s ease;
}
.hf-featured-nav:hover {
  color: #fff;
  background: var(--hf-red);
  transform: translateY(-2px);
}
.hf-featured-nav:disabled {
  opacity: .42;
  cursor: default;
  transform: none;
}
.hf-featured-nav--prev { left: -22px; }
.hf-featured-nav--next { right: -22px; }

@media (max-width: 980px) {
  .hf-featured-track { gap: 14px; }
  .hf-featured-track .hf-featured-card { flex-basis: calc((100% - 14px) / 2); }
  .hf-featured-nav {
    top: 42%;
    width: 38px;
    height: 38px;
    font-size: 26px;
  }
  .hf-featured-nav--prev { left: -10px; }
  .hf-featured-nav--next { right: -10px; }
}

/* ===================== PRODUCT CATEGORIES (slider theo trang, 4 danh mục/trang) ===================== */
.hf-cat-slider { position: relative; }
.hf-cat-viewport { overflow: hidden; }
.hf-cat-track { display: flex; transition: transform .6s var(--hf-ease); }
.hf-cat-page { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; flex: 0 0 100%; min-width: 0; }
.hf-cat-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: var(--hf-white);
  border: 1px solid #edf1f6;
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  transition: transform .25s var(--hf-ease), box-shadow .25s var(--hf-ease), background-color .25s ease;
}
.hf-cat-card:hover { transform: translateY(-4px); box-shadow: 0 18px 36px rgba(6,38,77,.10); background: var(--hf-white); }
.hf-cat-media { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 1/1; margin-bottom: 0; overflow: hidden; background: #eef1f4; }
.hf-cat-media img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; display: block; }
.hf-cat-name { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 70px; padding: 14px 16px 18px; background: var(--hf-white); font-weight: 800; font-size: 14px; text-transform: uppercase; letter-spacing: .02em; color: var(--hf-navy); line-height: 1.3; }
.hf-cat-dots { display: flex; justify-content: center; gap: 8px; margin-top: 32px; }
.hf-cat-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--hf-stitch); border: 0; cursor: pointer; padding: 0; transition: background-color .2s ease, width .2s ease; }
.hf-cat-dot.is-active { background: var(--hf-red); width: 22px; border-radius: 4px; }

@media (max-width: 980px) {
  .hf-cat-page { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}

/* ===================== PROCESS ===================== */
.hf-process-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: start; }
.hf-process-image { border-radius: var(--hf-radius); overflow: hidden; box-shadow: 0 24px 48px rgba(6,38,77,.16); position: sticky; top: 100px; }
.hf-process-image img { aspect-ratio: 3/4; object-fit: cover; }
.hf-process-steps { display: flex; flex-direction: column; }
.hf-process-step { display: grid; grid-template-columns: 56px 1fr; gap: 18px; padding: 22px 0; border-top: 2px dashed var(--hf-stitch); }
.hf-process-step:first-child { border-top: 0; padding-top: 0; }
.hf-process-index { font-family: var(--hf-font-mono); font-weight: 700; font-size: 22px; color: var(--hf-red); }
.hf-process-step h3 { margin: 0 0 6px; font-size: 18px; font-weight: 800; color: var(--hf-navy); }
.hf-process-step p { margin: 0; color: var(--hf-muted); line-height: 1.6; font-size: 15px; }

/* ===================== WHY US ===================== */
.hf-why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.hf-why-card { background: var(--hf-white); border-radius: var(--hf-radius); padding: 30px 26px; border-top: 4px solid var(--hf-red); box-shadow: 0 16px 36px rgba(6,38,77,.08); transition: transform .25s var(--hf-ease), box-shadow .25s var(--hf-ease); }
.hf-why-card:hover { transform: translateY(-4px); box-shadow: 0 22px 44px rgba(6,38,77,.14); }
.hf-why-card h3 { margin: 0 0 10px; font-size: 17px; font-weight: 800; color: var(--hf-navy); }
.hf-why-card p { margin: 0; color: var(--hf-muted); font-size: 14.5px; line-height: 1.6; }

/* ===================== SHOWCASE GRID (3 ảnh + thẻ CTA, dạng bento) ===================== */
.hf-showcase-title {
  font-family: var(--hf-font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(22px, 2.6vw, 30px);
  color: var(--hf-navy);
  margin: 0 0 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--hf-stitch);
}
.hf-gallery-row { display: flex; gap: 20px; height: 560px; }
.hf-gallery-cell { flex: 1 1 0; min-width: 0; border-radius: var(--hf-radius); overflow: hidden; height: 100%; }
.hf-gallery-cell img { width: 100%; height: 100%; object-fit: cover; }
.hf-gallery-stack { display: flex; flex-direction: column; gap: 20px; height: 100%; min-width: 0; flex: 1 1 0; }
.hf-gallery-stack .hf-gallery-cell--top { flex: 1 1 60%; min-height: 0; }
.hf-gallery-row > .hf-gallery-cell--cta-only { flex-basis: 0; flex-shrink: 1; min-width: 0; height: 100%; }
.hf-showcase-cta {
  flex: 1 1 40%; min-height: 0;
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(135deg, rgba(255,255,255,.11) 0%, rgba(255,255,255,0) 34%),
    radial-gradient(circle at 88% 18%, rgba(202,15,23,.34) 0, rgba(202,15,23,0) 34%),
    linear-gradient(145deg, #062f62 0%, #061f42 54%, #03142b 100%);
  border-radius: var(--hf-radius);
  padding: 32px 30px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 20px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 18px 40px rgba(6,38,77,.18);
  transition: transform .32s var(--hf-ease), box-shadow .32s var(--hf-ease), border-color .32s ease;
}
.hf-showcase-cta::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px dashed rgba(255,255,255,.26);
  border-radius: calc(var(--hf-radius) + 2px);
  pointer-events: none;
  z-index: -1;
  transition: inset .32s var(--hf-ease), border-color .32s ease, opacity .32s ease;
}
.hf-showcase-cta::after {
  content: "";
  position: absolute;
  width: 118px;
  height: 4px;
  left: 30px;
  bottom: 96px;
  border-radius: 999px;
  background: var(--hf-red);
  box-shadow: 24px 0 0 rgba(255,255,255,.22);
  z-index: -1;
  transform-origin: left center;
  transition: width .32s var(--hf-ease), box-shadow .32s ease;
}
.hf-showcase-cta:hover {
  transform: translateY(-6px);
  border-color: rgba(255,255,255,.34);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 24px 50px rgba(6,38,77,.26);
}
.hf-showcase-cta:hover::before {
  inset: 10px;
  border-color: rgba(255,255,255,.4);
}
.hf-showcase-cta:hover::after {
  width: 150px;
  box-shadow: 32px 0 0 rgba(255,255,255,.3);
}
.hf-showcase-cta-heading {
  width: 100%;
  max-width: none;
  font-family: var(--hf-font-body);
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(20px, 1.8vw, 28px);
  line-height: 1.08;
  letter-spacing: 0;
  color: var(--hf-white);
  margin: 0;
  white-space: nowrap;
  text-shadow: 0 2px 0 rgba(202,15,23,.75), 0 10px 24px rgba(0,0,0,.22);
}
.hf-showcase-cta-heading br { display: none; }
.hf-showcase-cta-btn {
  align-self: center;
  justify-content: center;
  min-width: 188px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 999px;
  padding: 12px 24px;
  font-size: 14px;
  color: var(--hf-navy);
  border-color: var(--hf-white);
  background: var(--hf-white);
  box-shadow: 0 12px 26px rgba(0,0,0,.16);
}
.hf-showcase-cta-btn::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -40%;
  bottom: -40%;
  left: -55%;
  width: 34%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.72), transparent);
  transform: skewX(-20deg);
  transition: left .55s var(--hf-ease);
}
.hf-showcase-cta-btn::after {
  content: "→";
  font-size: 17px;
  line-height: 1;
  transition: transform .22s var(--hf-ease);
}
.hf-showcase-cta-btn:hover {
  color: var(--hf-white);
  border-color: var(--hf-red);
  background: var(--hf-red);
  box-shadow: 0 12px 26px rgba(202,15,23,.34);
}
.hf-showcase-cta-btn:hover::before { left: 125%; }
.hf-showcase-cta-btn:hover::after { transform: translateX(4px); }

@media (max-width: 980px) {
  .hf-gallery-row { flex-direction: column; height: auto; }
  .hf-gallery-cell, .hf-gallery-stack, .hf-gallery-row > .hf-gallery-cell--cta-only { flex: none !important; width: 100%; }
  .hf-gallery-cell { aspect-ratio: 4/3; }
  .hf-gallery-stack .hf-gallery-cell--top { aspect-ratio: 4/3; flex: none; }
  .hf-gallery-cell--cta-only { height: auto; min-height: 220px; }
  .hf-showcase-cta { padding: 28px 24px; }
  .hf-showcase-cta-heading { font-size: clamp(19px, 3vw, 25px); }
  .hf-showcase-cta::after { left: 24px; bottom: 90px; }
}

@media (prefers-reduced-motion: reduce) {
  .hf-showcase-cta,
  .hf-showcase-cta::before,
  .hf-showcase-cta::after,
  .hf-showcase-cta-btn::before,
  .hf-showcase-cta-btn::after {
    transition: none;
  }
}

.hf-gallery-slider {
  position: relative;
}
.hf-gallery-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.hf-gallery-viewport::-webkit-scrollbar { display: none; }
.hf-gallery-slider .hf-gallery-row {
  flex-direction: row;
  height: 560px;
  gap: 20px;
}
.hf-gallery-slider .hf-gallery-row > .hf-gallery-cell,
.hf-gallery-slider .hf-gallery-row > .hf-gallery-stack,
.hf-gallery-slider .hf-gallery-row > .hf-gallery-cell--cta-only {
  flex: 0 0 calc((100% - 40px) / 3) !important;
  width: auto;
  scroll-snap-align: start;
}
.hf-gallery-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--hf-navy);
  box-shadow: 0 14px 30px rgba(6,38,77,.16);
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  transition: color .22s ease, background-color .22s ease, opacity .22s ease, box-shadow .22s ease;
}
.hf-gallery-nav:hover {
  color: #fff;
  background: var(--hf-red);
  box-shadow: 0 18px 36px rgba(202, 15, 23, .24);
}
.hf-gallery-nav:disabled {
  opacity: .42;
  cursor: default;
}
.hf-gallery-nav--prev { left: -22px; }
.hf-gallery-nav--next { right: -22px; }

@media (max-width: 980px) {
  .hf-gallery-slider .hf-gallery-row {
    flex-direction: row;
    height: 440px;
    gap: 16px;
  }
  .hf-gallery-slider .hf-gallery-row > .hf-gallery-cell,
  .hf-gallery-slider .hf-gallery-row > .hf-gallery-stack,
  .hf-gallery-slider .hf-gallery-row > .hf-gallery-cell--cta-only {
    flex-basis: calc((100% - 16px) / 2) !important;
    width: auto;
  }
  .hf-gallery-slider .hf-gallery-cell {
    aspect-ratio: auto;
  }
  .hf-gallery-slider .hf-gallery-stack .hf-gallery-cell--top {
    flex: 1 1 58%;
    height: auto;
    min-height: 0;
  }
  .hf-gallery-slider .hf-gallery-stack .hf-showcase-cta {
    flex: 1 1 42%;
    min-height: 150px;
  }
  .hf-gallery-nav {
    width: 38px;
    height: 38px;
    font-size: 26px;
  }
  .hf-gallery-nav--prev { left: -10px; }
  .hf-gallery-nav--next { right: -10px; }
}

@media (max-width: 620px) {
  .hf-gallery-slider .hf-gallery-row {
    height: 420px;
    gap: 14px;
  }
  .hf-gallery-slider .hf-gallery-row > .hf-gallery-cell,
  .hf-gallery-slider .hf-gallery-row > .hf-gallery-stack,
  .hf-gallery-slider .hf-gallery-row > .hf-gallery-cell--cta-only {
    flex-basis: 100% !important;
  }
  .hf-gallery-slider .hf-gallery-stack .hf-showcase-cta {
    min-height: 164px;
  }
}

/* ===================== TESTIMONIALS (slider đánh giá, 2 thẻ/trang) ===================== */
.hf-testi-slider { position: relative; }
.hf-testi-viewport { overflow: hidden; }
.hf-testi-track { display: flex; transition: transform .5s var(--hf-ease); }
.hf-testi-page { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; flex: 0 0 100%; min-width: 0; }
.hf-testi-card { display: grid; grid-template-columns: 1fr 1fr; background: var(--hf-canvas); border-radius: var(--hf-radius); overflow: hidden; min-height: 300px; }
.hf-testi-photo { min-height: 0; }
.hf-testi-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hf-testi-content { padding: 28px 26px; display: flex; flex-direction: column; }
.hf-testi-quote-mark { font-family: var(--hf-font-display); font-size: 40px; line-height: 1; color: var(--hf-red); }
.hf-testi-quote { flex: 1 1 auto; margin: 4px 0 20px; color: var(--hf-ink); font-size: 15px; line-height: 1.65; }
.hf-testi-author { display: flex; align-items: center; gap: 12px; }
.hf-testi-avatar { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; }
.hf-testi-avatar img { width: 100%; height: 100%; object-fit: cover; }
.hf-testi-author-info { display: flex; flex-direction: column; gap: 4px; }
.hf-testi-name { font-weight: 700; font-size: 14.5px; color: var(--hf-navy); }
.hf-testi-stars { color: #F5A623; font-size: 14px; letter-spacing: 1px; }
.hf-testi-dots { display: flex; justify-content: center; gap: 8px; margin-top: 28px; }
.hf-testi-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--hf-stitch); border: 0; cursor: pointer; padding: 0; transition: background-color .2s ease, width .2s ease; }
.hf-testi-dot.is-active { background: var(--hf-red); width: 22px; border-radius: 4px; }
.hf-testi-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--hf-white); color: var(--hf-navy); font-size: 16px;
  box-shadow: 0 8px 20px rgba(6,38,77,.16);
  display: flex; align-items: center; justify-content: center;
  transition: background-color .2s ease, color .2s ease;
}
.hf-testi-arrow:hover { background: var(--hf-navy); color: var(--hf-white); }
.hf-testi-arrow--prev { left: -20px; }
.hf-testi-arrow--next { right: -20px; }

@media (max-width: 980px) {
  .hf-testi-page { grid-template-columns: 1fr; gap: 20px; }
  .hf-testi-card { grid-template-columns: 1fr; }
  .hf-testi-photo { aspect-ratio: 16/9; }
  .hf-testi-arrow { display: none; }
}

.hf-testi-viewport[data-hf-testi-viewport] {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.hf-testi-viewport[data-hf-testi-viewport]::-webkit-scrollbar { display: none; }
.hf-testi-viewport[data-hf-testi-viewport] .hf-testi-track {
  gap: 32px;
  transform: none !important;
}
.hf-testi-viewport[data-hf-testi-viewport] .hf-testi-card {
  flex: 0 0 calc((100% - 32px) / 2);
  scroll-snap-align: start;
}
.hf-testi-slider .hf-testi-arrow {
  display: flex;
  width: 46px;
  height: 46px;
  border: 0;
  background: #fff;
  color: var(--hf-navy);
  box-shadow: 0 14px 30px rgba(6,38,77,.16);
  font-size: 30px;
  transition: transform .22s var(--hf-ease), color .22s ease, background-color .22s ease, opacity .22s ease;
}
.hf-testi-slider .hf-testi-arrow:hover {
  color: #fff;
  background: var(--hf-red);
  transform: translateY(-2px);
}
.hf-testi-slider .hf-testi-arrow:disabled {
  opacity: .42;
  cursor: default;
  transform: none;
}

@media (max-width: 980px) {
  .hf-testi-viewport[data-hf-testi-viewport] .hf-testi-track { gap: 18px; }
  .hf-testi-viewport[data-hf-testi-viewport] .hf-testi-card {
    flex-basis: 100%;
    min-height: 0;
  }
  .hf-testi-slider .hf-testi-arrow {
    top: 46%;
    width: 38px;
    height: 38px;
    font-size: 26px;
  }
  .hf-testi-slider .hf-testi-arrow--prev { left: -10px; }
  .hf-testi-slider .hf-testi-arrow--next { right: -10px; }
}

/* ===================== PARTNERS ===================== */
/* Marquee: logo cuộn ngang liên tục, chậm, dừng khi hover */
.hf-section--partners { padding: 20px 0 48px; }
.hf-marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.hf-marquee-track { display: flex; align-items: center; width: max-content; gap: 72px; animation: hf-marquee-scroll 32s linear infinite; }
.hf-marquee:hover .hf-marquee-track { animation-play-state: paused; }
.hf-marquee-item { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; height: 68px; }
.hf-marquee-item img { max-height: 100%; width: auto; max-width: 190px; }
@keyframes hf-marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .hf-marquee-track { animation: none; }
}

/* ===================== PROMO CTA (banner) ===================== */
.hf-promo { position: relative; border-radius: var(--hf-radius); overflow: hidden; min-height: 360px; display: flex; align-items: center; color: var(--hf-white); }
.hf-promo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hf-promo-scrim { position: absolute; inset: 0; background: linear-gradient(100deg, var(--hf-navy) 10%, rgba(6,38,77,.4) 70%); z-index: 1; }
.hf-promo-inner { position: relative; z-index: 2; padding: 56px; max-width: 560px; }
.hf-promo-inner .hf-h2 { color: var(--hf-white); }
.hf-promo-inner .hf-lead { color: rgba(255,255,255,.85); }

/* ===================== FAQ ===================== */
.hf-faq-list { max-width: 820px; margin: 0 auto; }
.hf-faq-item { border-top: 2px dashed var(--hf-stitch); }
.hf-faq-item:last-child { border-bottom: 2px dashed var(--hf-stitch); }
.hf-faq-q {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 4px; font-size: 16px; font-weight: 700; color: var(--hf-navy); font-family: inherit;
}
.hf-faq-q .hf-faq-plus { font-family: var(--hf-font-mono); font-size: 20px; color: var(--hf-red); flex: 0 0 auto; transition: transform .25s ease; }
.hf-faq-item.is-open .hf-faq-plus { transform: rotate(45deg); }
.hf-faq-a { max-height: 0; overflow: hidden; transition: max-height .3s var(--hf-ease); }
.hf-faq-a p { margin: 0 4px 20px; color: var(--hf-muted); line-height: 1.65; max-width: 68ch; }
.hf-faq-item.is-open .hf-faq-a { max-height: 320px; }

/* ===================== BLOG ===================== */
.hf-blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.hf-blog-card { background: var(--hf-white); border-radius: var(--hf-radius); overflow: hidden; box-shadow: 0 16px 36px rgba(6,38,77,.08); transition: transform .25s var(--hf-ease); }
.hf-blog-card:hover { transform: translateY(-4px); }
.hf-blog-card img { aspect-ratio: 16/10; object-fit: cover; }
.hf-blog-card-body { padding: 20px; }
.hf-blog-date { font-family: var(--hf-font-mono); font-size: 12px; color: var(--hf-red); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.hf-blog-card h3 { margin: 10px 0 0; font-size: 16.5px; font-weight: 800; line-height: 1.35; color: var(--hf-navy); }
.hf-blog-card p { margin: 8px 0 0; font-size: 14px; color: var(--hf-muted); line-height: 1.55; }

/* ===================== CONTACT CTA ===================== */
.hf-contact-cta { text-align: center; }
.hf-contact-cta .hf-h2 { max-width: 24ch; margin-left: auto; margin-right: auto; }
.hf-contact-cta .hf-lead { margin-left: auto; margin-right: auto; }
.hf-contact-cta .hf-cta-row { justify-content: center; }

/* ===================== Responsive ===================== */
@media (max-width: 980px) {
  .hf-section { padding: 46px 0; }
  .hf-intro-grid { grid-template-columns: 1fr; gap: 36px; }
  .hf-process-grid { grid-template-columns: 1fr; gap: 28px; }
  .hf-process-image { position: static; }
  .hf-why-grid { grid-template-columns: 1fr 1fr; }
  .hf-blog-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .hf-section { padding: 34px 0; }
  .hf-cat-page { grid-template-columns: 1fr 1fr; gap: 10px; }
  .hf-why-grid { grid-template-columns: 1fr; }
  .hf-stats-row,
  .hf-stats-row--grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 28px;
  }
  .hf-stats-row .hf-stat,
  .hf-stats-row--grid .hf-stat {
    min-height: 88px;
    padding: 14px 12px;
    border: 1px solid rgba(23, 79, 167, .14);
    border-top: 3px solid var(--hf-red);
    border-radius: 10px;
    background: linear-gradient(180deg, #fff 0%, #f7faff 100%);
    box-shadow: 0 10px 22px rgba(6, 38, 77, .06);
  }
  .hf-stat-number {
    font-size: 28px;
  }
  .hf-stat-label {
    margin-top: 5px;
    font-size: 12px;
    line-height: 1.3;
  }
  .hf-promo-inner { padding: 32px 24px; }
  .hf-hero-slides { aspect-ratio: 2.15/1; }
}
