.hero-subtitle{
  position: relative;
  display: inline-block;
  margin-top: 18px;
  padding: 10px 18px;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid rgba(19, 44, 99, 0.1);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.88), rgba(244,247,255,0.92)),
    linear-gradient(135deg, rgba(217,180,74,0.12), rgba(19,44,99,0.08));
  color: var(--color-principal-fosc);
  box-shadow: 0 16px 34px rgba(11, 21, 38, 0.08);
  overflow: hidden;
}

.km-labels {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: 8px;
  font-size: 0.7rem;
  color: var(--color-subtext);
  gap: 4px;
}

.km-labels span {
  text-align: center;
  cursor: default;
  white-space: nowrap;
}

/* Opcional: destacar pas actiu */
.km-labels span.active {
  font-weight: 600;
  color: #1d4ed8; /* blau corporatiu */
}



.hero-subtitle::after{
  content:"";
  position:absolute;
  inset: -6px -30px;

  background: linear-gradient(
    110deg,
    transparent 0%,
    rgba(255,255,255,0.00) 35%,
    rgba(255,255,255,0.55) 50%,
    rgba(255,255,255,0.00) 65%,
    transparent 100%
  );


  transform: translateX(-160%);
  mix-blend-mode: soft-light;
  pointer-events: none;

  /* 1r flash en carregar + després cada 10s */
  animation: subtitleShineFirst 1.2s ease-out 0.25s 1,
             subtitleShineLoop 10s ease-in-out 2s infinite;
}

/* Flash inicial (més curt i "wow") */
@keyframes subtitleShineFirst{
  0%   { transform: translateX(-160%); opacity: 0; }
  25%  { opacity: 0.70; }
  100% { transform: translateX(160%); opacity: 0; }
}

[data-theme="dark"] .hero-subtitle{
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03)),
    linear-gradient(135deg, rgba(245,211,106,0.1), rgba(96,165,250,0.08));
  color: #cbd5e1;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
}

/* Flash recurrent (lent i discret) */
@keyframes subtitleShineLoop{
  0%   { transform: translateX(-160%); opacity: 0; }
  12%  { opacity: 0.45; }
  28%  { transform: translateX(160%); opacity: 0; }
  100% { transform: translateX(160%); opacity: 0; }
}

@media (max-width: 768px) {
  .hero-subtitle {
    display: inline-block;
    max-width: calc(100% - 24px);
    padding: 8px 12px;
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  .hero-subtitle {
    max-width: calc(100% - 18px);
    padding: 7px 10px;
    font-size: 0.54rem;
    font-weight: 500;
    letter-spacing: 0.03em;
  }
}
