/* ==========================================================================
   Component: datpro_blocks
   The small shared layout blocks Phase 02 pages assemble sections from.
   Every one of them lives inside the existing .dp-section / .dp-container /
   .dp-section-head scaffolding from base.css — none of them re-implements it.

     .dp-split        2-up block (Tầm nhìn / Sứ mệnh)
     .dp-numbered     numbered items 01/02/03/04 (Lĩnh vực phát triển)
     .dp-values       2–4 compact icon + title + description items
     .dp-flow         static horizontal step flow (PLAN → … → IMPROVE)
     .dp-breadcrumb   very light breadcrumb, optional
     .dp-tags         neutral capability tags (QMS / Work / ERP / Analytics)
     .dp-empty-state  icon + message + CTA, when there is no real data yet

   NOTE ON NAMING — the Homepage already owns `.dp-value` (the strip under the
   hero, in value-row.css). The block here is `.dp-values` with `__item`
   children, so the two never collide. Do not write `.dp-value__title` inside
   a `.dp-values` block.
   ========================================================================== */

/* --------------------------------------------------------------------------
   .dp-split — two side-by-side statements
   <div class="dp-split">
     <div class="dp-split__item">
       <span class="dp-split__icon"><svg><use href="#icon-globe"></use></svg></span>
       <h3 class="dp-split__title">Tầm nhìn</h3>
       <p class="dp-split__desc">…</p>
     </div>
     …
   </div>
   -------------------------------------------------------------------------- */

.dp-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1rem, 2vw, 1.5rem);
}

.dp-split__item {
  min-width: 0;
  padding: clamp(1.5rem, 2.6vw, 2.25rem);
  background: var(--dp-surface);
  border: 1px solid var(--dp-border);
  border-radius: var(--r-lg);
}

.dp-split__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: var(--sp-4);
  border-radius: var(--r-md);
  background: var(--dp-blue-50);
  color: var(--dp-blue);
}

.dp-split__icon svg {
  width: 22px;
  height: 22px;
}

.dp-split__title {
  margin-bottom: var(--sp-2);
  font-size: var(--fs-h3);
}

.dp-split__desc {
  color: var(--dp-text-body);
  text-wrap: pretty;
}

@media (min-width: 768px) {
  .dp-split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* --------------------------------------------------------------------------
   .dp-numbered — 01 / 02 / 03 / 04
   <ol class="dp-numbered">
     <li class="dp-numbered__item">
       <span class="dp-numbered__num" aria-hidden="true">01</span>
       <h3 class="dp-numbered__title">…</h3>
       <p class="dp-numbered__desc">…</p>
     </li>
     …
   </ol>
   Add --3 for a three-item row. Numbers are decorative; keep the list ordered
   so the sequence survives with CSS off.
   -------------------------------------------------------------------------- */

.dp-numbered {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.5rem, 2.6vw, 2.25rem);
  counter-reset: dp-numbered;
}

.dp-numbered__item {
  min-width: 0;
  padding-top: var(--sp-4);
  border-top: 2px solid var(--dp-blue-100);
}

.dp-numbered__num {
  display: block;
  margin-bottom: var(--sp-3);
  color: var(--dp-blue);
  font-size: 1.375rem;
  font-weight: var(--fw-bold);
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--ls-heading);
  line-height: 1;
}

.dp-numbered__title {
  margin-bottom: var(--sp-2);
  font-size: var(--fs-h4);
}

.dp-numbered__desc {
  color: var(--dp-text-muted);
  font-size: var(--fs-sm);
  line-height: 1.65;
  text-wrap: pretty;
}

@media (min-width: 640px) {
  .dp-numbered {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .dp-numbered {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .dp-numbered--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* --------------------------------------------------------------------------
   .dp-values — 2 to 4 compact value items
   <div class="dp-values dp-values--3">
     <div class="dp-values__item">
       <span class="dp-values__icon"><svg><use href="#icon-users"></use></svg></span>
       <h3 class="dp-values__title">…</h3>
       <p class="dp-values__desc">…</p>
     </div>
     …
   </div>
   Default is a four-across row on desktop; --2 and --3 cap the column count.
   -------------------------------------------------------------------------- */

.dp-values {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.25rem, 2.4vw, 2rem);
}

.dp-values__item {
  min-width: 0;
}

.dp-values__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: var(--sp-3);
  border-radius: var(--r-md);
  background: var(--dp-blue-50);
  color: var(--dp-blue);
}

.dp-values__icon svg {
  width: 22px;
  height: 22px;
}

.dp-values__title {
  margin-bottom: var(--sp-2);
  font-size: var(--fs-h4);
}

.dp-values__desc {
  color: var(--dp-text-muted);
  font-size: var(--fs-sm);
  line-height: 1.65;
  text-wrap: pretty;
}

@media (min-width: 560px) {
  .dp-values {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .dp-values {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .dp-values--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dp-values--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* --------------------------------------------------------------------------
   .dp-flow — static step flow, no interactivity
   <ol class="dp-flow">
     <li class="dp-flow__step">
       <span class="dp-flow__num">01</span>              <!-- optional -->
       <span class="dp-flow__label">PLAN</span>
       <span class="dp-flow__desc">…</span>              <!-- optional -->
     </li>
     …
   </ol>
   Five across from 1024px with connectors between the steps; three across on
   tablet and a single column below 560px, where the connectors turn downward.
   -------------------------------------------------------------------------- */

.dp-flow {
  --flow-gap: clamp(0.875rem, 1.6vw, 1.375rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--flow-gap);
}

.dp-flow__step {
  position: relative;
  min-width: 0;
  padding: clamp(1rem, 1.6vw, 1.25rem) clamp(0.75rem, 1.4vw, 1.125rem);
  background: var(--dp-surface);
  border: 1px solid var(--dp-border);
  border-radius: var(--r-md);
  text-align: center;
}

.dp-flow__num {
  display: block;
  margin-bottom: 0.375rem;
  color: var(--dp-blue);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--ls-eyebrow);
  line-height: 1.2;
}

.dp-flow__label {
  display: block;
  color: var(--dp-text);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-transform: uppercase;
}

.dp-flow__desc {
  display: block;
  margin-top: 0.375rem;
  color: var(--dp-text-muted);
  font-size: var(--fs-xs);
  line-height: 1.55;
  text-wrap: pretty;
}

/* Connector — a hairline chevron sitting in the gap, never past the last step
   (so it can never push the grid wider than its container). */
.dp-flow__step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(var(--flow-gap) / -2);
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--dp-blue-200);
  border-bottom: 2px solid var(--dp-blue-200);
  transform: translate(-50%, 50%) rotate(45deg);
}

@media (min-width: 560px) {
  .dp-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Multi-column wrapping makes a directional connector ambiguous. */
  .dp-flow__step:not(:last-child)::after {
    display: none;
  }
}

@media (min-width: 768px) {
  .dp-flow {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .dp-flow {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .dp-flow__step:not(:last-child)::after {
    display: block;
    left: auto;
    bottom: auto;
    right: calc(var(--flow-gap) / -2);
    top: 50%;
    border-right: 2px solid var(--dp-blue-200);
    border-bottom: 0;
    border-top: 2px solid var(--dp-blue-200);
    transform: translate(50%, -50%) rotate(45deg);
  }
}

/* --------------------------------------------------------------------------
   .dp-breadcrumb — optional, deliberately quiet
   <nav class="dp-breadcrumb" aria-label="Breadcrumb">
     <ol class="dp-breadcrumb__list">
       <li class="dp-breadcrumb__item"><a href="/">Trang chủ</a></li>
       <li class="dp-breadcrumb__item"><span aria-current="page">Giới thiệu</span></li>
     </ol>
   </nav>
   -------------------------------------------------------------------------- */

.dp-breadcrumb {
  font-size: var(--fs-xs);
  line-height: 1.5;
}

.dp-breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
}

.dp-breadcrumb__item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  color: var(--dp-text-subtle);
}

.dp-breadcrumb__item + .dp-breadcrumb__item::before {
  content: "/";
  color: var(--dp-border-strong);
}

.dp-breadcrumb__item a {
  color: var(--dp-text-muted);
  transition: color var(--dur) var(--ease);
}

.dp-breadcrumb__item a:hover {
  color: var(--dp-blue);
}

.dp-breadcrumb__item [aria-current="page"] {
  color: var(--dp-text);
  font-weight: var(--fw-medium);
}

/* --------------------------------------------------------------------------
   .dp-tags — neutral capability tags, not commerce badges
   <ul class="dp-tags">
     <li class="dp-tag">QMS</li>
     <li class="dp-tag">Work</li>
   </ul>
   .dp-tag also works standalone (on an <a> or a <span>) outside a .dp-tags list.
   -------------------------------------------------------------------------- */

.dp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.dp-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.3125rem 0.75rem;
  background: var(--dp-surface-2);
  border: 1px solid var(--dp-border);
  border-radius: var(--r-pill);
  color: var(--dp-text-muted);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  line-height: 1.4;
  white-space: nowrap;
}

a.dp-tag {
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

a.dp-tag:hover {
  border-color: var(--dp-blue-200);
  color: var(--dp-blue);
}

/* --------------------------------------------------------------------------
   .dp-empty-state — used wherever there is no real data to show yet
   <div class="dp-empty-state">
     <span class="dp-empty-state__icon"><svg><use href="#icon-users"></use></svg></span>
     <p class="dp-empty-state__title">…</p>
     <p class="dp-empty-state__desc">…</p>
     <div class="dp-empty-state__actions"><a class="dp-btn dp-btn--secondary" …>…</a></div>
   </div>
   -------------------------------------------------------------------------- */

.dp-empty-state {
  display: grid;
  justify-items: center;
  max-width: 34rem;
  margin-inline: auto;
  padding: clamp(2rem, 4vw, 3.25rem) clamp(1.25rem, 3vw, 2.5rem);
  background: var(--dp-surface);
  border: 1px dashed var(--dp-border-strong);
  border-radius: var(--r-lg);
  text-align: center;
}

.dp-empty-state__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: var(--sp-4);
  border-radius: 50%;
  background: var(--dp-blue-50);
  color: var(--dp-blue);
}

.dp-empty-state__icon svg {
  width: 24px;
  height: 24px;
}

.dp-empty-state__title {
  color: var(--dp-text);
  font-size: var(--fs-h4);
  font-weight: var(--fw-semibold);
  line-height: 1.4;
}

.dp-empty-state__desc {
  margin-top: var(--sp-2);
  color: var(--dp-text-muted);
  font-size: var(--fs-sm);
  text-wrap: pretty;
}

.dp-empty-state__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-3);
  margin-top: clamp(1.25rem, 2.4vw, 1.75rem);
}
