:root {
  --trd-ink: #0A2F57;
  --trd-ink-soft: #0F3A68;
  --trd-accent: #F37F0A;
  --trd-accent-dark: #8F4A00;
  --trd-stone: #F7F5F0;
  --trd-surface: #FFFFFF;
  --trd-line: #E4E1D8;
  --trd-clay: #FFF4E5;
}

.single-carrera .site-main > .page-header { display: none; }
.single-carrera .site-main,
.single-carrera .site-main > .page-content { max-width: none; padding: 0; }
.single-carrera .site-main > .page-content { margin: 0; }
.single-carrera .trd { overflow: clip; background: var(--trd-stone); color: var(--trd-ink); font-family: Inter, sans-serif; }
.single-carrera .trd *, .single-carrera .trd *::before, .single-carrera .trd *::after { box-sizing: border-box; }
.single-carrera .trd h1, .single-carrera .trd h2, .single-carrera .trd h3, .single-carrera .trd strong, .single-carrera .trd dt { font-family: Montserrat, sans-serif; }
.single-carrera .trd h1, .single-carrera .trd h2, .single-carrera .trd h3 { color: inherit; margin-top: 0; }
.single-carrera .trd h2 { font-size: clamp(1.55rem, 2.8vw, 2.35rem); line-height: 1.08; margin-bottom: 20px; }
.single-carrera .trd h3 { font-size: 1.08rem; line-height: 1.2; margin: 28px 0 12px; }

.trd-hero {
  position: relative;
  isolation: isolate;
  color: #FFFFFF;
  background:
    radial-gradient(circle at 79% 24%, rgba(243,127,10,.34), transparent 32%),
    linear-gradient(135deg, var(--trd-ink), var(--trd-ink-soft));
}
.trd-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='240' viewBox='0 0 360 240'%3E%3Cg fill='none' stroke='%23FFFFFF' stroke-opacity='.55' stroke-width='1'%3E%3Cpath d='M-20 42c62-34 95 26 155 0s100-20 150 5 75 5 105-16'/%3E%3Cpath d='M-30 74c73-38 108 30 171 0s102-20 152 7 74 5 100-17'/%3E%3Cpath d='M-35 110c78-42 118 32 183-1s105-21 155 8 72 5 94-18'/%3E%3Cpath d='M-38 150c82-45 125 35 192-1s108-22 158 9 70 4 90-20'/%3E%3Cpath d='M-40 194c87-49 132 38 202-1s110-23 160 10 68 3 86-21'/%3E%3C/g%3E%3C/svg%3E");
}
.trd-hero__inner { width: min(1200px, calc(100% - 40px)); min-height: 560px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(320px, .72fr); gap: 64px; align-items: center; padding: 64px 0; }
.trd-hero__copy { max-width: 700px; }
.trd-hero__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; font-family: Montserrat, sans-serif; font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.trd-status { display: inline-flex; padding: 7px 11px; border-radius: 999px; color: var(--trd-ink); background: #FFFFFF; }
.trd-status--open, .trd-status--confirmed { color: #FFFFFF; background: var(--trd-accent); }
.trd-hero h1 { max-width: 760px; margin: 0 0 18px; color: #FFFFFF; font-size: clamp(2.4rem, 5.2vw, 5.4rem); line-height: .98; letter-spacing: -.045em; }
.trd-hero__lead { max-width: 630px; margin: 0 0 28px; color: #FFFFFF; font-size: clamp(1.05rem, 1.8vw, 1.28rem); line-height: 1.55; }
.trd-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.trd-button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: 10px; padding: 13px 18px; border: 1px solid var(--trd-accent); border-radius: 8px; color: var(--trd-accent-dark); background: #FFFFFF; font-family: Montserrat, sans-serif; font-size: .9rem; font-weight: 700; line-height: 1.15; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease; }
.trd-button span { transition: transform .2s ease; }
.trd-button:hover { color: var(--trd-accent-dark); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15,24,38,.12); }
.trd-button:hover span { transform: translateX(4px); }
.trd-button:active { transform: translateY(0); }
.trd-button:focus-visible { outline: 3px solid #FFFFFF; outline-offset: 3px; }
.trd-button--primary { border-color: var(--trd-accent); color: #FFFFFF; background: linear-gradient(135deg,#F37F0A,#DD4614); box-shadow: 0 10px 26px rgba(243,127,10,.25); }
.trd-button--primary:hover { color: #FFFFFF; box-shadow: 0 14px 30px rgba(243,127,10,.32); }
.trd-button--ghost { border-color: #FFFFFF; color: #FFFFFF; background: transparent; }
.trd-button--ghost:hover { color: var(--trd-ink); background: #FFFFFF; }
.trd-button--secondary { color: var(--trd-accent-dark); background: #FFFFFF; }
.trd-hero__visual { position: relative; margin: 0; padding: 20px; border: 1px solid rgba(255,255,255,.32); border-radius:12px; background: #FFFFFF; box-shadow: 0 28px 64px rgba(15,24,38,.36); transform: rotate(1.2deg); }
.trd-hero__image { display: block; width: 100%; max-height: 420px; object-fit: contain; border-radius: 8px; }
.trd-hero__visual figcaption { margin-top: 10px; color: var(--trd-ink-soft); font-size: .76rem; line-height: 1.4; }

.trd-shell { width: min(1200px, calc(100% - 40px)); margin: 0 auto; padding-bottom: 72px; }
.trd-facts { position: relative; z-index: 2; display: flex; margin: -34px 0 52px; border: 1px solid var(--trd-line); border-radius:12px; background: #FFFFFF; box-shadow: 0 18px 44px rgba(28,42,64,.1); }
.trd-facts > div { flex: 1 1 0; min-width: 0; padding: 22px; border-right: 1px solid var(--trd-line); }
.trd-facts > div:last-child { border-right: 0; }
.trd-facts span { display: block; margin-bottom: 7px; color: var(--trd-ink-soft); font-size: .76rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.trd-facts strong { display: block; color: var(--trd-ink); font-size: 1rem; line-height: 1.3; }
.trd-intro { max-width: 760px; margin: 0 0 52px; font-size: 1.08rem; }
.trd-prose { line-height: 1.75; }
.trd-prose p { max-width: 68ch; margin: 0 0 18px; }

.trd-overview { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr); gap: 28px; align-items: start; margin-bottom: 64px; }
.trd-overview__main { overflow: hidden; border: 1px solid var(--trd-line); border-radius:12px; background: #FFFFFF; }
.trd-overview__main > h2 { margin: 0; padding: 22px 26px; color: #FFFFFF; background: var(--trd-ink); font-size: 1.35rem; }
.trd-table { margin: 0; }
.trd-table > div { display: grid; grid-template-columns: minmax(160px, .8fr) 1fr; gap: 20px; padding: 16px 26px; border-top: 1px solid var(--trd-line); }
.trd-table > div:nth-child(even) { background: var(--trd-stone); }
.trd-table > div:hover { background: var(--trd-clay); }
.trd-table dt, .trd-table dd { margin: 0; }
.trd-table dt { font-size: .88rem; }
.trd-table dd { color: var(--trd-ink-soft); }
.trd-overview__aside { padding: 26px; border-top: 5px solid var(--trd-accent); border-radius: 0 0 16px 16px; color: #FFFFFF; background: var(--trd-ink-soft); }
.trd-overview__aside h2 { color: #FFFFFF; font-size: 1.35rem; }
.trd-essential { margin: 0; }
.trd-essential > div { padding: 15px 0; border-top: 1px solid rgba(255,255,255,.18); }
.trd-essential dt { margin-bottom: 5px; color: #FFFFFF; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.trd-essential dd { margin: 0; color: #FFFFFF; line-height: 1.55; }

.trd-section { padding: 64px 0; border-top: 1px solid var(--trd-line); }
.trd-section__heading { max-width: 760px; margin-bottom: 32px; }
.trd-section__heading h2 { margin-bottom: 10px; }
.trd-section__heading p { margin: 0; color: var(--trd-ink-soft); line-height: 1.65; }
.trd-route__grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(360px, 1.1fr); gap: 52px; align-items: start; }
.trd-checklist { margin: 0; padding: 0; list-style: none; }
.trd-checklist li { position: relative; margin: 0 0 12px; padding-left: 28px; }
.trd-checklist li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--trd-accent-dark); font-weight: 800; }
.trd-actions--inline { margin-top: 26px; }
.trd-route__profile { margin: 0; padding: 16px; border: 1px solid var(--trd-line); border-radius:12px; background: #FFFFFF; box-shadow: 0 18px 42px rgba(28,42,64,.09); }
.trd-route__profile img { display: block; width: 100%; height: auto; border-radius: 8px; }
.trd-route__profile figcaption { padding: 12px 4px 2px; color: var(--trd-ink-soft); font-size: .78rem; line-height: 1.5; }

.trd-map { width: 100%; min-height: 420px; overflow: hidden; border: 1px solid var(--trd-line); border-radius:12px; background: #FFFFFF; box-shadow: 0 18px 42px rgba(28,42,64,.09); }
.trd-map__fallback { margin: 14px 0 0; }
.trd-map.is-ready + .trd-map__fallback { display: none; }
.trd-map__fallback a { color: var(--trd-accent-dark); font-weight: 700; }
.trd-map__credit { margin: 10px 0 0; color: var(--trd-ink-soft); font-size: .76rem; }
.trd .leaflet-popup-content-wrapper, .trd .leaflet-popup-tip { color: var(--trd-ink); background: #FFFFFF; }

.trd-practical__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; margin-bottom: 24px; }
.trd-practical__grid > div { padding: 28px; border: 1px solid var(--trd-line); border-radius:12px; background: #FFFFFF; }
.trd-practical__grid h3 { margin-top: 0; }
.trd-practical__grid ul { margin: 0; padding-left: 20px; line-height: 1.7; }
.trd-practical__grid li + li { margin-top: 8px; }

.trd-source { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 28px 0; border-top: 1px solid var(--trd-line); }
.trd-source p { max-width: 720px; margin: 6px 0 0; color: var(--trd-ink-soft); line-height: 1.6; }
.trd-final { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 36px; align-items: center; overflow: hidden; padding: 42px; border-radius:12px; color: #FFFFFF; background: radial-gradient(circle at 85% 0, rgba(243,127,10,.3), transparent 38%), linear-gradient(135deg,var(--trd-ink),var(--trd-ink-soft)); }
.trd-final h2 { max-width: 680px; margin-bottom: 10px; color: #FFFFFF; }
.trd-final p { max-width: 650px; margin: 0; color: #FFFFFF; line-height: 1.6; }

@media (max-width: 900px) {
  .trd-hero__inner { grid-template-columns: 1fr; gap: 34px; min-height: 0; padding: 52px 0 78px; }
  .trd-hero__visual { max-width: 560px; transform: none; }
  .trd-facts { flex-wrap: wrap; }
  .trd-facts > div { flex: 1 1 33%; }
  .trd-overview, .trd-route__grid { grid-template-columns: 1fr; }
  .trd-route__grid { gap: 32px; }
  .trd-final { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .trd-hero__inner, .trd-shell { width: min(100% - 28px, 1200px); }
  .trd-hero__inner { padding: 40px 0 64px; }
  .trd-hero h1 { font-size: clamp(2.15rem, 12vw, 3.5rem); line-height: 1; }
  .trd-hero__lead { font-size: 1rem; }
  .trd-hero__visual { padding: 12px; }
  .trd-actions { display: grid; grid-template-columns: 1fr; }
  .trd-button { width: 100%; }
  .trd-facts { margin-top: -26px; }
  .trd-facts > div { flex-basis: 50%; padding: 17px; }
  .trd-facts > div:nth-child(2n) { border-right: 0; }
  .trd-facts > div:nth-child(n+3) { border-top: 1px solid var(--trd-line); }
  .trd-overview__main > h2, .trd-table > div { padding-left: 18px; padding-right: 18px; }
  .trd-table > div { grid-template-columns: 1fr; gap: 5px; }
  .trd-section { padding: 48px 0; }
  .trd-map { min-height: 320px; }
  .trd-practical__grid { grid-template-columns: 1fr; }
  .trd-source { align-items: stretch; flex-direction: column; }
  .trd-final { padding: 30px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .trd-button, .trd-button span { transition: none; }
}


/* --- Redes sociales de la carrera --- */
.trd-route__aside { display: grid; gap: 22px; align-content: start; }
.trd-social { border: 1px solid #E4E1D8; border-radius:12px; padding: 20px 22px; background: linear-gradient(180deg,#FFFDFB,#F7F5F0); }
.trd-social h3 { margin: 0 0 14px; font-family: Montserrat,Inter,sans-serif; font-size: 1.05rem; letter-spacing: -.01em; color: #0a2f57; }
.trd-social__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.trd-social__link { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid #E4E1D8; border-radius:8px; background: #fff; text-decoration: none; font-weight: 700; color: #0a2f57; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.trd-social__link:hover { border-color: #F37F0A; box-shadow: 0 10px 22px -14px rgba(243,127,10,.45); transform: translateY(-2px); }
.trd-social__icon { width: 22px; height: 22px; flex-shrink: 0; background-size: contain; background-repeat: no-repeat; background-position: center; }
.trd-social__icon--instagram { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23172033'%3E%3Cpath d='M12 2.16c3.2 0 3.58.01 4.85.07 1.17.05 1.8.25 2.23.41.56.22.96.48 1.38.9.42.42.68.82.9 1.38.16.42.36 1.06.41 2.23.06 1.27.07 1.65.07 4.85s-.01 3.58-.07 4.85c-.05 1.17-.25 1.8-.41 2.23-.22.56-.48.96-.9 1.38-.42.42-.82.68-1.38.9-.42.16-1.06.36-2.23.41-1.27.06-1.65.07-4.85.07s-3.58-.01-4.85-.07c-1.17-.05-1.8-.25-2.23-.41-.56-.22-.96-.48-1.38-.9-.42-.42-.68-.82-.9-1.38-.16-.42-.36-1.06-.41-2.23C2.17 15.58 2.16 15.2 2.16 12s.01-3.58.07-4.85c.05-1.17.25-1.8.41-2.23.22-.56.48-.96.9-1.38.42-.42.82-.68 1.38-.9.42-.16 1.06-.36 2.23-.41C8.42 2.17 8.8 2.16 12 2.16zm0 3.24a6.6 6.6 0 100 13.2 6.6 6.6 0 000-13.2zm0 10.89a4.29 4.29 0 110-8.58 4.29 4.29 0 010 8.58zm6.85-11.15a1.54 1.54 0 11-3.08 0 1.54 1.54 0 013.08 0z'/%3E%3C/svg%3E"); }
.trd-social__icon--facebook { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23172033'%3E%3Cpath d='M24 12.07C24 5.4 18.63 0 12 0S0 5.4 0 12.07c0 6.02 4.39 11.01 10.13 11.93v-8.44H7.08v-3.49h3.05V9.41c0-3.02 1.79-4.69 4.53-4.69 1.31 0 2.68.24 2.68.24v2.97h-1.51c-1.49 0-1.96.93-1.96 1.89v2.25h3.33l-.53 3.49h-2.8V24C19.61 23.08 24 18.09 24 12.07z'/%3E%3C/svg%3E"); }
.trd-social__icon--twitter { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23172033'%3E%3Cpath d='M18.24 2.25h3.31l-7.23 8.26 8.5 11.24h-6.65l-5.22-6.82-5.97 6.82H1.66l7.73-8.84L1.25 2.25h6.82l4.71 6.23 5.46-6.23zm-1.16 17.52h1.83L7.01 4.13H5.05l12.03 15.64z'/%3E%3C/svg%3E"); }
.trd-social__icon--youtube { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23172033'%3E%3Cpath d='M23.5 6.19a3.02 3.02 0 00-2.12-2.14C19.5 3.54 12 3.54 12 3.54s-7.5 0-9.38.51A3.02 3.02 0 00.5 6.19C0 8.08 0 12 0 12s0 3.92.5 5.81a3.02 3.02 0 002.12 2.14c1.88.51 9.38.51 9.38.51s7.5 0 9.38-.51a3.02 3.02 0 002.12-2.14C24 15.92 24 12 24 12s0-3.92-.5-5.81zM9.55 15.57V8.43L15.82 12l-6.27 3.57z'/%3E%3C/svg%3E"); }
.trd-social__icon--strava { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23172033'%3E%3Cpath d='M15.39 12.85l-2.09-4.12-2.09 4.12H8.99L13.3 4.4l4.31 8.45h-2.22zM17.61 12.85L16.4 15.24l-1.21-2.39h-2.09l3.3 6.36 3.3-6.36h-2.09z'/%3E%3C/svg%3E"); }
\@media (max-width:860px){ .trd-route__aside { margin-top: 20px; } }


/* --- Clasificaciones / Podio --- */
.trd-results__podium{margin:.4rem 0 1rem}
.trd-podium__dist{font-weight:700;font-size:1.02rem;margin:.2rem 0 .6rem;color:var(--trd-accent,#ff7a1a);letter-spacing:.01em}
.trd-podium__cat{display:flex;align-items:center;gap:.5rem;font-size:.86rem;font-weight:700;text-transform:uppercase;letter-spacing:.08em;margin:1.1rem 0 .5rem;padding-bottom:.35rem;border-bottom:1px solid rgba(255,255,255,.1)}
.trd-podium__cat--men{color:#4aa3ff}
.trd-podium__cat--women{color:#ff6fae}
.trd-podium__sym{font-size:1.1em;line-height:1}
.trd-podium{list-style:none;margin:0 0 .4rem;padding:0;display:flex;flex-direction:column;gap:.4rem}
.trd-podium__row{display:grid;grid-template-columns:auto auto 1fr auto;align-items:center;gap:.7rem;padding:.6rem .85rem;border-radius:8px;background:rgba(255,255,255,.035);border:1px solid rgba(255,255,255,.07)}
.trd-podium__row--gold{background:linear-gradient(100deg,rgba(255,193,7,.16),rgba(255,193,7,.03));border-color:rgba(255,193,7,.4)}
.trd-podium__row--silver{background:linear-gradient(100deg,rgba(203,213,225,.14),rgba(203,213,225,.02));border-color:rgba(203,213,225,.32)}
.trd-podium__row--bronze{background:linear-gradient(100deg,rgba(205,127,50,.15),rgba(205,127,50,.02));border-color:rgba(205,127,50,.34)}
.trd-podium__medal{width:1.7rem;height:1.7rem;flex:none;display:inline-flex;align-items:center;justify-content:center;font-size:1.15rem;border-radius:50%}
.trd-podium__medal--gold::before{content:"🥇"}
.trd-podium__medal--silver::before{content:"🥈"}
.trd-podium__medal--bronze::before{content:"🥉"}
.trd-podium__medal--other::before{content:"•";opacity:.5}
.trd-podium__pos{display:none}
.trd-podium__row--other .trd-podium__pos{display:inline-flex;min-width:1.4rem;justify-content:center;font-weight:700;opacity:.6}
.trd-podium__name{font-weight:600;line-height:1.25}
.trd-podium__row--gold .trd-podium__name{font-weight:800;font-size:1.04rem}
.trd-podium__club{display:block;font-weight:400;font-size:.8rem;opacity:.62;margin-top:.05rem}
.trd-podium__time{font-variant-numeric:tabular-nums;font-feature-settings:"tnum";font-weight:700;font-size:.95rem;letter-spacing:.01em;white-space:nowrap;opacity:.92}
.trd-podium__note{font-size:.88rem;opacity:.72;margin:.5rem 0 0;line-height:1.55}
.trd-results__source{opacity:.7;margin-top:.6rem}
.trd-results__source small{font-size:.82em}
@media(max-width:480px){.trd-podium__row{grid-template-columns:auto 1fr;grid-template-areas:"medal name" "medal time";gap:.15rem .6rem}.trd-podium__medal{grid-area:medal;align-self:center}.trd-podium__name{grid-area:name}.trd-podium__time{grid-area:time;justify-self:start;font-size:.88rem}}


/* fix cabeceras overview (evita sobreescritura de color por el tema) */
.trd-overview .trd-overview__main > h2{color:#FFFFFF !important;background:var(--trd-ink,#0A2F57) !important;}
.trd-overview .trd-overview__aside{color:#FFFFFF !important;}
.trd-overview .trd-overview__aside h2{color:#FFFFFF !important;}

.trd-podium__club--link{color:var(--trd-accent,#F37F0A);text-decoration:none;border-bottom:1px dotted currentColor}
.trd-podium__club--link:hover{border-bottom-style:solid}
