/*
 * Visual-first service page components (step 42, spec .ai/smoke/svc-audit-20261021/template.md).
 * Loaded on /dich-vu/* and /dich-vu-ai/* pages; every rule is scoped to the new classes, so pages that do not
 * use them are unchanged. Mobile 390 px first; no element may be wider than the viewport.
 *
 * Components: .tal-dc-pain__ico · .tal-svc-gain · .tal-dc-steps--visual · .tal-svc-money · .tal-svc-fold ·
 * .tal-svc-report · .tal-svc-figure · .tal-svc-chips · .tal-svc-checks · capped price bullets (.tal-dc--visual).
 */

.tal-dc--visual {
  --tal-sv-blue: var(--tal-dc-accent, #0f62fe);
  --tal-sv-blue-soft: var(--tal-dc-accent-soft, rgba(15, 98, 254, .08));
  --tal-sv-warm: #ff8a3d;
  --tal-sv-warm-soft: rgba(255, 138, 61, .12);
  --tal-sv-border: var(--tal-dc-border, #e3e8f0);
  --tal-sv-muted: var(--tal-dc-muted, #5b6474);
  --tal-sv-text: var(--tal-dc-text, #0f172a);
  --tal-sv-radius: 16px;
  overflow-x: clip;
}

/* ---------- shared: section figure (one visual per section) ---------- */
.tal-dc--visual .tal-svc-figure {
  margin: 0 0 20px;
  border-radius: var(--tal-sv-radius);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--tal-sv-border);
}
.tal-dc--visual .tal-svc-figure img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 220px;
  object-fit: cover;
}
@media (min-width: 850px) {
  .tal-dc--visual .tal-svc-figure img { max-height: 420px; }
  .tal-dc--visual .tal-svc-figure--narrow { max-width: 720px; margin-left: auto; margin-right: auto; }
}

/* ---------- 2. pain cards: icon slot ---------- */
.tal-dc-pain__ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0 0 12px;
  border-radius: 12px;
  background: var(--tal-sv-warm-soft, rgba(255, 138, 61, .12));
  color: var(--tal-sv-warm, #ff8a3d);
  flex: 0 0 auto;
}
.tal-dc-pain__ico svg { width: 24px; height: 24px; }
.tal-dc--visual .tal-dc-pain__card h3 { margin-bottom: 0; }

/* ---------- 3. what you get: icon card grid ---------- */
.tal-svc-gain {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tal-svc-gain__card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 16px 14px;
  border: 1px solid var(--tal-sv-border, #e3e8f0);
  border-radius: var(--tal-sv-radius, 16px);
  background: #fff;
}
.tal-svc-gain__ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--tal-sv-blue-soft, rgba(15, 98, 254, .08));
  color: var(--tal-sv-blue, #0f62fe);
}
.tal-svc-gain__ico svg { width: 22px; height: 22px; }
.tal-svc-gain__card h3 {
  margin: 4px 0 0;
  font-size: 15px;
  line-height: 1.3;
}
.tal-svc-gain__card p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--tal-sv-muted, #5b6474);
  overflow-wrap: anywhere;
}
.tal-svc-gain__card--no { background: #f8f9fb; border-style: dashed; }
.tal-svc-gain__card--no .tal-svc-gain__ico { background: #eef0f4; color: #6b7280; }
@media (min-width: 850px) {
  .tal-svc-gain { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .tal-svc-gain__card { padding: 22px 20px; }
  .tal-svc-gain__card h3 { font-size: 17px; }
  .tal-svc-gain__card p { font-size: 15px; }
}

/* chips under the grid: "Bạn cung cấp" / "Không gồm" */
.tal-svc-chips { display: grid; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.tal-svc-chips li {
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--tal-sv-blue-soft, rgba(15, 98, 254, .08));
  font-size: 14px;
  line-height: 1.45;
}
.tal-svc-chips li.is-no { background: #f3f4f6; color: var(--tal-sv-muted, #5b6474); }
.tal-svc-chips strong { color: var(--tal-sv-text, #0f172a); }

/* ---------- 4. steps as a timeline ---------- */
.tal-dc-steps.tal-dc-steps--visual {
  display: grid;
  grid-template-columns: 1fr !important;
  gap: 0;
  position: relative;
  counter-reset: none;
}
.tal-dc-steps--visual .tal-dc-step {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  column-gap: 14px;
  padding: 0 0 20px;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.tal-dc-steps--visual .tal-dc-step::before { /* connector line on the left */
  content: "";
  position: absolute;
  left: 23px;
  top: 48px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(var(--tal-sv-blue, #0f62fe), rgba(15, 98, 254, .15));
}
.tal-dc-steps--visual .tal-dc-step:last-child { padding-bottom: 0; }
.tal-dc-steps--visual .tal-dc-step:last-child::before { display: none; }
.tal-dc-steps--visual .tal-dc-step__n {
  grid-row: 1 / span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0;
  border-radius: 50%;
  background: var(--tal-sv-blue, #0f62fe);
  color: #fff;
  font-weight: 700;
  position: relative;
  z-index: 1;
}
.tal-dc-steps--visual .tal-dc-step h3 { margin: 4px 0 4px; font-size: 16px; }
.tal-dc-steps--visual .tal-dc-step p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--tal-sv-muted, #5b6474); }
@media (min-width: 850px) {
  .tal-dc-steps.tal-dc-steps--visual { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 20px; }
  .tal-dc-steps--visual .tal-dc-step { display: block; padding: 0; }
  .tal-dc-steps--visual .tal-dc-step::before { /* connector line to the next step */
    left: 56px;
    right: -20px;
    top: 23px;
    bottom: auto;
    width: auto;
    height: 2px;
    background: linear-gradient(90deg, var(--tal-sv-blue, #0f62fe), rgba(15, 98, 254, .15));
  }
  .tal-dc-steps--visual .tal-dc-step__n { margin-bottom: 12px; }
}

/* ---------- 5. money: what you pay vs what comes back ---------- */
.tal-svc-money {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: stretch;
}
.tal-svc-money__card {
  min-width: 0;
  padding: 18px 16px;
  border-radius: var(--tal-sv-radius, 16px);
  border: 1px solid var(--tal-sv-border, #e3e8f0);
  background: #fff;
}
.tal-svc-money__card--in { border-color: rgba(15, 98, 254, .35); background: var(--tal-sv-blue-soft, rgba(15, 98, 254, .08)); }
.tal-svc-money__card h3 {
  margin: 0 0 10px;
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--tal-sv-muted, #5b6474);
}
.tal-svc-money__card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.tal-svc-money__card li { font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.tal-svc-money__card li strong { font-size: 18px; color: var(--tal-sv-text, #0f172a); white-space: nowrap; }
.tal-svc-money__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tal-sv-warm, #ff8a3d);
  transform: rotate(90deg);
}
.tal-svc-money__arrow svg { width: 32px; height: 32px; }
.tal-svc-money__line { margin: 12px 0 0; font-size: 14px; color: var(--tal-sv-muted, #5b6474); }
@media (min-width: 850px) {
  .tal-svc-money { grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr); gap: 16px; }
  .tal-svc-money__arrow { transform: none; }
  .tal-svc-money__card { padding: 24px 22px; }
}

/* ---------- 6. weekly report preview ---------- */
.tal-svc-report { display: grid; gap: 16px; align-items: center; }
.tal-svc-report .tal-svc-figure { margin: 0; }
.tal-svc-report .tal-svc-figure img { max-height: 320px; object-fit: contain; background: #f6f8fc; }
@media (min-width: 850px) {
  .tal-svc-report { grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 32px; }
  .tal-svc-report .tal-svc-figure img { max-height: 460px; }
}

/* ---------- 9. not-do + promises side by side ---------- */
.tal-svc-checks { display: grid; gap: 16px; }
.tal-svc-checks h3 { margin: 0 0 10px; font-size: 16px; }
.tal-svc-checks ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.tal-svc-checks li {
  position: relative;
  padding: 0 0 0 28px;
  font-size: 14.5px;
  line-height: 1.5;
}
.tal-svc-checks li::before {
  position: absolute;
  left: 0;
  top: 1px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 12px;
  line-height: 20px;
  text-align: center;
  font-weight: 700;
}
.tal-svc-checks__no li::before { content: "✕"; background: #fde8e8; color: #c81e1e; }
.tal-svc-checks__yes li::before { content: "✓"; background: #def7ec; color: #046c4e; }
.tal-svc-checks .tal-svc-figure { grid-column: 1 / -1; }
@media (min-width: 850px) {
  .tal-svc-checks { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 32px; }
}

/* ---------- styled <details> ("Xem chi tiết") ---------- */
.tal-svc-fold {
  margin: 16px 0 0;
  border: 1px solid var(--tal-sv-border, #e3e8f0);
  border-radius: 12px;
  background: #fff;
  max-width: 100%;
}
.tal-svc-fold > summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 44px 12px 16px;
  position: relative;
  font-weight: 600;
  font-size: 15px;
  color: var(--tal-sv-blue, #0f62fe);
}
.tal-svc-fold > summary::-webkit-details-marker { display: none; }
.tal-svc-fold > summary::after {
  content: "+";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  line-height: 1;
}
.tal-svc-fold[open] > summary::after { content: "–"; }
.tal-svc-fold__body { padding: 0 16px 16px; min-width: 0; }
.tal-svc-fold__body .tal-value-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tal-svc-fold__body .tal-value-card,
.tal-svc-fold__body .tal-value-grid,
.tal-svc-fold__body .tal-value-sample { margin-top: 12px; }

/* ---------- 7. price cards: short bullets, scroll-snap on phones ---------- */
.tal-dc--visual .tal-pricing__inc {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tal-dc--visual .tal-pricing__price { font-size: 1.25em; }
@media (max-width: 849px) {
  .tal-dc--visual .tal-pricing__grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 85%;
    grid-template-columns: none;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
  }
  .tal-dc--visual .tal-pricing__card { scroll-snap-align: start; min-width: 0; }
}

/* hero image stays under the text on phones, full width */
@media (max-width: 849px) {
  .tal-dc--visual .tal-svc-illus--hero { max-height: 220px; object-fit: cover; }
}

/* ---------- portfolio + software offers (step 47, /du-an/*) ---------- */
/* Flatsome indents ul/li: card grids must start at the content edge */
.tal-dc--visual ul.tal-svc-gain,
.tal-dc--visual ul.tal-svc-shots,
.tal-dc--visual ul.tal-proj-grid,
.tal-dc--visual ul.tal-svc-chips { margin-left: 0; }
.tal-dc--visual .tal-svc-gain > li,
.tal-dc--visual .tal-svc-shots > li,
.tal-dc--visual .tal-proj-grid > li,
.tal-dc--visual .tal-svc-chips > li { margin-left: 0; }
.tal-dc--visual .tal-dc-head-2 + .tal-svc-gain,
.tal-dc--visual .tal-dc-head-2 + .tal-svc-shots,
.tal-dc--visual .tal-dc-head-2 + .tal-value-card,
.tal-dc--visual .tal-dc-head-2 + .tal-svc-checks,
.tal-dc--visual .tal-dc-head-2 + .tal-proj-grid,
.tal-dc--visual .tal-dc-head-2 + .tal-dc-related,
.tal-dc--visual .tal-dc-head-2 + .tal-dc-cta-row { margin-top: 20px; }
@media (max-width: 849px) {
  .tal-dc--visual .tal-svc-shots .tal-svc-shot { aspect-ratio: 3 / 4; max-height: 220px; }
}
.tal-dc--project .tal-dc-dash-wrap .tal-svc-shot,
.tal-dc--visual .tal-dc-dash-wrap > .tal-svc-shot { margin: 0 auto; width: 100%; max-width: 240px; }
/* factual status line under a project title */
.tal-proj-status {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  margin: 12px 0 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .25);
  color: #fff;
  font-size: 14px;
  line-height: 1.45;
  max-width: 100%;
}
.tal-proj-status::before { content: "●"; color: #fbbf24; flex: 0 0 auto; }
.tal-proj-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--tal-sv-blue-soft, rgba(15, 98, 254, .08));
  color: #1d3f8f;
  font-size: 12.5px;
  font-weight: 600;
}
.tal-proj-badge--warm { background: var(--tal-sv-warm-soft, rgba(255, 138, 61, .12)); color: #9a3412; }

/* screenshot slot waiting for a real capture (never an AI-made screenshot) */
.tal-svc-shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.tal-svc-shot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  aspect-ratio: 9 / 16;
  max-height: 340px;
  margin: 0;
  padding: 14px 10px;
  border: 2px dashed #c3cbd8;
  border-radius: var(--tal-sv-radius, 16px);
  background: #f6f8fc;
  color: var(--tal-sv-muted, #5b6474);
  text-align: center;
}
.tal-svc-shot svg { width: 32px; height: 32px; color: #9aa4b5; }
.tal-svc-shot figcaption { font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.tal-svc-shot figcaption strong { display: block; color: var(--tal-sv-text, #0f172a); font-size: 13.5px; }
@media (min-width: 850px) {
  .tal-svc-shots { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
}

/* project cards on the overview */
.tal-proj-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin: 0; padding: 0; list-style: none; }
.tal-proj-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 18px 16px;
  border: 1px solid var(--tal-sv-border, #e3e8f0);
  border-radius: var(--tal-sv-radius, 16px);
  background: #fff;
}
.tal-proj-card h3 { margin: 0; font-size: 18px; line-height: 1.3; }
.tal-proj-card p { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--tal-sv-muted, #5b6474); overflow-wrap: anywhere; }
.tal-proj-card .tal-svc-shot { aspect-ratio: 16 / 9; max-height: 180px; }
.tal-proj-card__link { margin-top: auto; font-weight: 600; color: var(--tal-sv-blue, #0f62fe); }
@media (min-width: 850px) {
  .tal-proj-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .tal-proj-card { padding: 24px 22px; }
}

/* ---------- 8. phone polish (step 42e) ---------- */
@media (max-width: 600px) {
  /* steps: the ordinal badge is hidden globally, so drop the 2-column grid and stack title over text */
  .tal-dc-steps--visual .tal-dc-step { display: block; padding: 0 0 20px 0; }
  .tal-dc-steps--visual .tal-dc-step::before { display: none; }
  .tal-dc-steps--visual .tal-dc-step h3 { margin: 0 0 4px; font-size: 17px; line-height: 1.3; }
  .tal-dc-flow .tal-dc-steps--visual .tal-dc-step p { color: #e3eaf6; font-size: 14.5px; }

  /* pain tag word: dark ink on the light card, body font */
  .tal-dc--visual .tal-dc-pain__tag { font-family: inherit; color: #1d3f8f; }

  /* "Bạn cung cấp" chip: dark text on the soft blue box */
  .tal-svc-chips li { color: #0f172a; background: #e3ecff; }
  .tal-svc-chips li.is-no { color: #374151; background: #eceff3; }

  /* price cards: one per row, no horizontal scroller */
  .tal-dc--visual .tal-pricing__grid {
    display: grid;
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: minmax(0, 1fr);
    overflow-x: visible;
    scroll-snap-type: none;
    padding-bottom: 0;
  }
}
