/* ============================================
   HME84 Path — trayectoria editorial (reutilizable)
   Solo dibujo en SVG; etapas y nodos en HTML.
   ============================================ */

.hme84-method {
  position: relative;
  padding: var(--space-xl) 0;
  border-top: 0.5px solid var(--border);
}

.hme84-method-heading {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  margin-bottom: var(--space-lg);
  max-width: 36ch;
}

.hme84-method-layout {
  position: relative;
  margin-top: var(--space-md);
}

/* Capa SVG detrás del contenido */
.hme84-method-path-layer {
  position: absolute;
  left: 0;
  right: 0;
  top: 4px;
  height: 40px;
  z-index: 0;
  pointer-events: none;
  overflow: visible;
}

.hme84-path-svg {
  display: block;
  overflow: visible;
}

/* Desktop: banda superior alineada al grid de pasos */
.hme84-path-svg--desktop {
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0.42;
}

.hme84-path-svg--mobile {
  display: none;
}

.hme84-path-line {
  fill: none;
  stroke: rgba(232, 112, 45, 0.55);
  stroke-width: 1.05;
  vector-effect: non-scaling-stroke;
}

.hme84-path-line--solid {
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.hme84-path-line--dotted {
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-opacity: 0.65;
  stroke-width: 0.95;
}

/* Pasos: contenido por encima del path */
.hme84-method-steps {
  position: relative;
  z-index: 1;
  list-style: none;
  margin: 0;
  padding: 8px 0 0;
  padding-inline-start: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-md);
}

.hme84-method-steps > li {
  list-style: none;
}

.hme84-method-steps > li::marker {
  content: none;
}

.hme84-method-step {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: var(--space-xs) var(--space-sm);
  align-items: start;
  text-align: left;
}

.hme84-method-node {
  grid-column: 1;
  grid-row: 1;
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin-bottom: 0;
  align-self: start;
  margin-top: 0.2em;
  border-radius: 50%;
  background: rgba(232, 112, 45, 0.88);
  box-shadow:
    0 0 0 1px rgba(232, 112, 45, 0.35),
    0 0 12px rgba(232, 112, 45, 0.12);
}

.hme84-method-step-title {
  grid-column: 2;
  grid-row: 1;
  font-family: var(--font-serif);
  font-size: clamp(1rem, 1.35vw, 1.15rem);
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: 0;
  line-height: 1.25;
}

.hme84-method-step-text {
  grid-column: 1 / -1;
  grid-row: 2;
  font-size: 12px;
  line-height: 1.65;
  color: var(--text-secondary);
  margin: 0;
  max-width: none;
}

/* Tablet: menos peso visual del path */
@media (min-width: 769px) and (max-width: 1024px) {
  .hme84-method-path-layer {
    height: 36px;
  }

  .hme84-path-svg--desktop {
    opacity: 0.34;
    transform: scale(0.94);
    transform-origin: top center;
  }

  .hme84-path-line {
    stroke-width: 0.95;
  }

  .hme84-method-step-text {
    font-size: 11px;
    max-width: none;
  }
}

/* Mobile: columna + path vertical simplificado */
@media (max-width: 768px) {
  .hme84-method-path-layer {
    left: 6px;
    top: 8px;
    bottom: 8px;
    width: 22px;
    height: auto;
    right: auto;
  }

  .hme84-path-svg--desktop {
    display: none;
  }

  .hme84-path-svg--mobile {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 260px;
    opacity: 0.38;
  }

  .hme84-method-layout {
    padding-left: 36px;
  }

  .hme84-method-steps {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    padding-top: 0;
  }

  .hme84-method-step {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: var(--space-xs) var(--space-md);
    align-items: start;
    text-align: left;
  }

  .hme84-method-node {
    grid-column: 1;
    grid-row: 1;
    margin-top: 0.2em;
    margin-bottom: 0;
  }

  .hme84-method-step-title {
    grid-column: 2;
    grid-row: 1;
    margin-bottom: 0;
  }

  .hme84-method-step-text {
    grid-column: 1 / -1;
    grid-row: 2;
    max-width: none;
    font-size: 13px;
  }
}

/* Mobile estrecho: sin SVG, solo nodos y texto */
@media (max-width: 480px) {
  .hme84-path-svg--mobile {
    display: none;
  }

  .hme84-method-layout {
    padding-left: 0;
  }

  .hme84-method-path-layer {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hme84-path-line {
    transition: none !important;
  }
}
