/* HalfTri — guías de carreras. Se carga después de style.css, home.css y blog.css. */

/* Selector de idioma con enlaces (una URL por idioma) */
.lang-seg a {
  color: inherit; font-size: .78rem; font-weight: 650; letter-spacing: .02em;
  padding: 4px 8px; border-radius: 999px; opacity: .7; text-decoration: none;
}
.lang-seg a:hover { opacity: 1; text-decoration: none; }
.lang-seg a[aria-current="true"] { background: var(--teal); color: #06141d; opacity: 1; }
.lang-seg a:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.races .nav .nav-links a[aria-current="true"] { color: #06141d; }
@media (max-width: 520px) { .lang-seg a { padding: 4px 6px; font-size: .74rem; } }

.r-sub { color: var(--text-2); font-weight: 700; }

/* Datos clave */
.r-facts {
  margin: 1.6rem 0 2.2rem; padding: clamp(1.2rem, 3vw, 1.8rem);
  border: 1px solid var(--border); border-radius: 24px; background: var(--card);
}
.r-facts h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-bottom: .8rem; }
.r-countdown { margin: 0 0 1rem; font-size: clamp(1.3rem, 3vw, 1.7rem); font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.r-facts dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem 1.4rem; margin: 0; }
.r-facts dt { font-size: .8rem; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.r-facts dd { margin: .2rem 0 0; color: var(--text); font-weight: 600; line-height: 1.4; }
.r-note { margin: 1rem 0 0; font-size: .9rem; color: var(--text-2); }
.r-badge {
  display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 999px;
  font-size: .72rem; font-weight: 700; vertical-align: middle;
}
.r-badge.est { background: color-mix(in srgb, var(--orange) 18%, transparent); color: color-mix(in srgb, var(--orange) 70%, var(--text)); }
.r-badge.ok { background: var(--accent-soft); color: var(--accent); }

/* Fases de un plan de 20 semanas */
.b-body .r-phases {
  display: flex; gap: 4px; padding: 0; list-style: none; max-width: none; margin: .4rem 0 1.6em;
}
.b-body .r-phases li {
  flex: var(--w) 1 0; min-width: 0; margin: 0; padding: .7rem .6rem; border-radius: 12px;
  background: var(--accent-soft); opacity: 1; display: flex; flex-direction: column; gap: 2px;
}
.r-phases li:nth-child(2) { background: color-mix(in srgb, var(--blue) 14%, transparent); }
.r-phases li:nth-child(3) { background: color-mix(in srgb, var(--purple) 16%, transparent); }
.r-phases li:nth-child(4) { background: color-mix(in srgb, var(--orange) 18%, transparent); }
.r-phases li:nth-child(5) { background: color-mix(in srgb, var(--teal) 20%, transparent); }
.r-phases strong { font-size: .9rem; line-height: 1.2; overflow-wrap: anywhere; }
.r-phases span { font-size: .78rem; line-height: 1.3; color: var(--text-2); }
@media (max-width: 640px) {
  .b-body .r-phases { flex-direction: column; }
  .b-body .r-phases li { flex: none; flex-direction: row; justify-content: space-between; align-items: baseline; }
}

/* CTA */
.r-cta .kicker { display: block; margin-bottom: .4rem; }
.r-cta small { display: block; margin-top: .8rem; color: var(--muted); font-size: .85rem; }

/* Más carreras y fuentes */
.r-more, .r-sources { margin-top: clamp(2.2rem, 5vw, 3rem); }
.r-more h2, .r-sources h2 { font-size: 1.15rem; margin-bottom: .7rem; color: var(--text); }
.r-more ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 18px; }
.r-more li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.r-more li span { color: var(--muted); font-size: .9rem; white-space: nowrap; }
.r-sources ul { padding-left: 1.2em; margin: 0 0 .8rem; color: var(--text-2); }
.r-sources p { color: var(--text-2); font-size: .9rem; }
.r-disclaimer { margin-top: 1.4rem; font-size: .8rem !important; color: var(--muted) !important; line-height: 1.5; max-width: 720px; }
main > .r-disclaimer { margin: 2.4rem auto 0; text-align: center; }

/* Índice de carreras */
.r-grid { list-style: none; padding: 0; margin: 0 auto; max-width: 1000px; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.r-card {
  display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 1.3rem 1.4rem;
  border-radius: 20px; border: 1px solid var(--border); background: var(--card); color: inherit;
  transition: transform .3s ease, border-color .25s ease;
}
.r-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); text-decoration: none; }
.r-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.r-card strong { font-size: 1.15rem; line-height: 1.25; color: var(--text); }
.r-card-date { font-size: .85rem; font-weight: 650; color: var(--accent); }
.r-card-place { color: var(--text-2); font-size: .95rem; }
.r-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.r-card-tags span { font-size: .75rem; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--text-2); }
@media (prefers-reduced-motion: reduce) { .r-card, .r-card:hover { transition: none; transform: none; } }
