/* ============================================================
   POLLOCEL — Ruta de reparación y videos con reproducción manual
   ============================================================ */

/* ============================================================
   1. RUTA DE REPARACIÓN
   ============================================================ */
.ruta {
  position: relative;
  padding: 26px 0 10px;
}

/* pista central tipo circuito */
.ruta-rail {
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  height: 3px;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, .1);
  border-radius: 3px;
  overflow: hidden;
}
.ruta-rail i {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, rgba(255, 208, 0, .5), var(--pollocell-yellow) 40%, var(--pollocell-yellow-bright));
  box-shadow: 0 0 12px rgba(255, 208, 0, .65);
  transition: transform .28s linear;
}

.ruta-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
  align-items: center;
}

.ruta-step {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto 1fr;
  align-items: center;
  min-height: 470px;
}

/* las tarjetas se alternan arriba y abajo de la pista */
.ruta-step .ruta-card { grid-row: 1; align-self: end; margin-bottom: 26px; }
.ruta-step:nth-child(even) .ruta-card { grid-row: 3; align-self: start; margin: 26px 0 0; }
.ruta-node { grid-row: 2; }

/* nodo del circuito */
.ruta-node {
  position: relative;
  width: 58px; height: 58px;
  margin: 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 32%, #1a1a1a, #070707);
  border: 1.5px solid rgba(255, 255, 255, .16);
  color: #8a8a8a;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: .96rem;
  z-index: 2;
  transition: border-color .45s var(--ui-ease), color .45s var(--ui-ease),
              box-shadow .45s var(--ui-ease), transform .45s var(--ui-ease);
}
.ruta-step.is-on .ruta-node {
  border-color: var(--pollocell-yellow);
  color: var(--pollocell-yellow-bright);
  box-shadow: 0 0 16px rgba(255, 208, 0, .55), inset 0 0 12px rgba(255, 208, 0, .16);
}
/* pulso discreto: una sola vez al activarse */
.ruta-node::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid rgba(255, 208, 0, .55);
  opacity: 0;
}
.ruta-step.is-on .ruta-node::after { animation: rutaPulse 1.9s ease-out 2; }
@keyframes rutaPulse {
  0% { transform: scale(1); opacity: .75; }
  70%, 100% { transform: scale(1.65); opacity: 0; }
}
/* pequeña derivación de circuito que une el nodo con la tarjeta */
.ruta-step::before {
  content: '';
  position: absolute;
  left: 50%;
  width: 1px;
  height: 26px;
  background: linear-gradient(180deg, rgba(255, 208, 0, .05), rgba(255, 208, 0, .5));
  transform: translateX(-50%);
  top: calc(50% - 55px);
  transition: background .5s var(--ui-ease);
}
.ruta-step:nth-child(even)::before {
  top: auto;
  bottom: calc(50% - 55px);
  background: linear-gradient(0deg, rgba(255, 208, 0, .05), rgba(255, 208, 0, .5));
}

/* tarjeta */
.ruta-card {
  position: relative;
  padding: 26px 22px 24px;
  border-radius: 22px;
  background: rgba(10, 10, 10, .72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 16px 34px rgba(0, 0, 0, .55);
  overflow: hidden;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s var(--ui-ease), transform .6s var(--ui-ease),
              border-color .5s var(--ui-ease), box-shadow .5s var(--ui-ease);
}
.ruta-step.is-on .ruta-card {
  opacity: 1;
  transform: translateY(-14px);
  border-color: rgba(255, 208, 0, .45);
  box-shadow: 0 20px 40px rgba(0, 0, 0, .6), 0 0 20px rgba(255, 208, 0, .2);
}
.ruta-step:nth-child(even).is-on .ruta-card { transform: translateY(14px); }
@media (hover: hover) and (pointer: fine) {
  .ruta-step.is-on .ruta-card:hover {
    border-color: rgba(255, 208, 0, .75);
    box-shadow: 0 26px 48px rgba(0, 0, 0, .65), 0 0 28px rgba(255, 208, 0, .32);
    transform: translateY(-22px);
  }
  .ruta-step:nth-child(even).is-on .ruta-card:hover { transform: translateY(6px); }
}

/* número grande de fondo */
.ruta-bg {
  position: absolute;
  right: 12px;
  top: -6px;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 5.4rem;
  line-height: 1;
  color: rgba(255, 255, 255, .05);
  pointer-events: none;
  user-select: none;
}
.ruta-step.is-on .ruta-bg { color: rgba(255, 208, 0, .1); }

.ruta-ico {
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid rgba(255, 208, 0, .35);
  background: rgba(255, 208, 0, .08);
  color: var(--pollocell-yellow);
  margin-bottom: 16px;
  transition: transform .45s var(--ui-ease), background .45s var(--ui-ease);
}
.ruta-ico svg { width: 22px; height: 22px; }
.ruta-step.is-on .ruta-ico { animation: rutaIco .7s var(--ui-ease); }
@keyframes rutaIco {
  0% { transform: translateY(0) scale(1); }
  40% { transform: translateY(-5px) scale(1.12); }
  100% { transform: translateY(0) scale(1); }
}

.ruta-kicker {
  display: block;
  font-size: .7rem;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: rgba(255, 208, 0, .85);
  margin-bottom: 8px;
}
.ruta-card h3 {
  font-size: 1.16rem;
  color: #fff;
  margin: 0 0 10px;
}
.ruta-card p {
  font-size: .97rem;
  color: #cfcfcf;
  margin: 0;
  line-height: 1.62;
}

/* paso clave */
.ruta-step--key .ruta-card { border-color: rgba(255, 208, 0, .4); }
.ruta-step--key.is-on .ruta-card {
  border-color: rgba(255, 208, 0, .8);
  box-shadow: 0 22px 44px rgba(0, 0, 0, .62), 0 0 30px rgba(255, 208, 0, .32);
}
.ruta-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--pollocell-yellow);
  color: #0a0a0a;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* franja de cierre */
.ruta-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  flex-wrap: wrap;
  margin-top: 46px;
  padding: 30px clamp(22px, 3vw, 40px);
  border-radius: 24px;
  border: 1px solid rgba(255, 208, 0, .35);
  background:
    radial-gradient(80% 140% at 88% 50%, rgba(255, 208, 0, .12), transparent 62%),
    rgba(8, 8, 8, .82);
  box-shadow: 0 0 22px rgba(255, 208, 0, .18), 0 18px 40px rgba(0, 0, 0, .6);
}
.ruta-cta h3 { margin: 0 0 6px; font-size: clamp(1.2rem, 2vw, 1.5rem); }
.ruta-cta p { margin: 0; color: #d4d4d4; font-size: 1rem; }
.ruta-cta .btn svg:last-child { transition: transform .3s var(--ui-ease); }
.ruta-cta .btn:hover svg:last-child { transform: translateX(5px); }

/* ---------- responsive: ruta vertical ---------- */
@media (max-width: 980px) {
  .ruta-steps {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .ruta-rail {
    left: 28px;
    right: auto;
    top: 10px;
    bottom: 10px;
    width: 3px;
    height: auto;
    transform: none;
  }
  .ruta-rail i {
    width: 100%;
    height: 100%;
    transform: scaleY(0);
    transform-origin: top center;
    background: linear-gradient(180deg, rgba(255, 208, 0, .5), var(--pollocell-yellow) 40%, var(--pollocell-yellow-bright));
  }
  .ruta-step {
    grid-template-rows: none;
    grid-template-columns: 58px 1fr;
    gap: 18px;
    align-items: start;
    min-height: 0;
    padding-bottom: 30px;
  }
  .ruta-step::before { display: none; }
  .ruta-node { grid-row: 1; grid-column: 1; margin: 0; }
  .ruta-step .ruta-card,
  .ruta-step:nth-child(even) .ruta-card {
    grid-row: 1;
    grid-column: 2;
    margin: 0;
    align-self: start;
  }
  .ruta-step.is-on .ruta-card,
  .ruta-step:nth-child(even).is-on .ruta-card { transform: translateY(0); }
  @media (hover: hover) and (pointer: fine) {
    .ruta-step.is-on .ruta-card:hover,
    .ruta-step:nth-child(even).is-on .ruta-card:hover { transform: translateY(-6px); }
  }
  .ruta-bg { font-size: 4rem; }
  .ruta-cta { flex-direction: column; align-items: flex-start; text-align: left; }
  .ruta-cta .btn { width: 100%; }
}
@media (max-width: 520px) {
  .ruta-rail { left: 22px; }
  .ruta-step { grid-template-columns: 46px 1fr; gap: 14px; }
  .ruta-node { width: 46px; height: 46px; font-size: .86rem; }
  .ruta-card { padding: 22px 18px 20px; }
  .ruta-card h3 { font-size: 1.1rem; }
  .ruta-card p { font-size: .95rem; }
}

/* ============================================================
   2. VIDEOS CON REPRODUCCIÓN MANUAL
   ============================================================ */
.tik-slot {
  position: relative;
  aspect-ratio: 9 / 16;
  min-height: 0;
  border-radius: 16px;
  overflow: hidden;
  background: #060606;
}
.tik-slot iframe { width: 100%; height: 100%; border: 0; display: block; }

.tik-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #060606;
  display: block;
  overflow: hidden;
}
.tik-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ui-ease), filter .4s var(--ui-ease);
}
.tik-poster::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .3), rgba(0, 0, 0, .12) 40%, rgba(0, 0, 0, .68));
  pointer-events: none;
}
.tik-card:hover .tik-poster img { transform: scale(1.04); }

.tik-play {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  gap: 12px;
  z-index: 2;
  pointer-events: none;
}
.tik-play span.dot {
  position: relative;
  width: 74px; height: 74px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--pollocell-yellow);
  color: #0a0a0a;
  box-shadow: 0 0 22px rgba(255, 208, 0, .6), 0 10px 26px rgba(0, 0, 0, .6);
}
.tik-play span.dot svg { width: 30px; height: 30px; margin-left: 4px; }
.tik-play span.dot::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(255, 208, 0, .5);
  animation: tikPulse 2.6s ease-out infinite;
}
@keyframes tikPulse {
  0% { transform: scale(1); opacity: .8; }
  70%, 100% { transform: scale(1.45); opacity: 0; }
}
.tik-play b {
  font-family: var(--font-title);
  font-size: .84rem;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .9);
  letter-spacing: .04em;
}
.tik-slot.is-playing .tik-poster,
.tik-slot.is-playing .tik-play {
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s var(--ui-ease), visibility .35s var(--ui-ease);
}

/* ============================================================
   3. UBICACIÓN Y CONTACTO
   ============================================================ */
.loc-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(22px, 3vw, 38px);
  align-items: start;
}

/* tarjeta del mapa */
.loc-map {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  border: 1.5px solid rgba(255, 208, 0, .45);
  background: #070707;
  box-shadow: 0 0 18px rgba(255, 208, 0, .22), 0 20px 44px rgba(0, 0, 0, .65);
  transition: border-color .4s var(--ui-ease), box-shadow .4s var(--ui-ease), transform .5s var(--ui-ease);
  opacity: 0;
  transform: translateY(24px) scale(.985);
}
.loc-map.is-in { opacity: 1; transform: none; }
.loc-map:hover {
  border-color: var(--pollocell-yellow);
  box-shadow: 0 0 30px rgba(255, 208, 0, .4), 0 26px 54px rgba(0, 0, 0, .7);
}
.loc-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  width: 100%;
  overflow: hidden;
}
.loc-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  filter: contrast(1.04) saturate(1.05);
}
/* barrido de luz sobre el borde */
.loc-map::after {
  content: '';
  position: absolute;
  top: 0; left: -60%;
  width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent 34%, rgba(255, 236, 150, .16) 50%, transparent 66%);
  transform: skewX(-14deg);
  pointer-events: none;
  z-index: 3;
}
.loc-map.is-in::after { animation: locSweep 5.5s var(--ui-ease) 1.2s infinite; }
@keyframes locSweep {
  0%, 72% { left: -60%; }
  92%, 100% { left: 130%; }
}

.loc-tag {
  position: absolute;
  top: 16px; left: 16px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(6, 6, 6, .86);
  border: 1px solid rgba(255, 208, 0, .5);
  color: var(--pollocell-yellow-bright);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.loc-tag i {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--pollocell-yellow);
  box-shadow: 0 0 10px 2px rgba(255, 208, 0, .8);
  animation: locPin 2.2s ease-in-out infinite;
}
@keyframes locPin {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(.7); opacity: .55; }
}

/* mini bloque con los datos del punto */
.loc-mini {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  border-top: 1px solid rgba(255, 208, 0, .25);
  background: rgba(6, 6, 6, .9);
}
.loc-mini .pin {
  width: 44px; height: 44px;
  border-radius: 14px;
  display: grid; place-items: center;
  border: 1px solid rgba(255, 208, 0, .45);
  background: rgba(255, 208, 0, .1);
  color: var(--pollocell-yellow);
}
.loc-mini .pin svg { width: 21px; height: 21px; }
.loc-mini b { display: block; font-family: var(--font-title); font-size: 1.04rem; color: #fff; }
.loc-mini span { display: block; font-size: .9rem; color: #b9b9b9; }
.loc-mini .wa {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(37, 211, 102, .5);
  background: rgba(37, 211, 102, .12);
  color: #6ff29b;
  font-size: .82rem;
  font-weight: 600;
  white-space: nowrap;
}
.loc-mini .wa svg { width: 16px; height: 16px; }

/* columna derecha */
.loc-side { display: grid; gap: 14px; }
.loc-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  align-items: start;
  padding: 20px 20px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(10, 10, 10, .74);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .5);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .55s var(--ui-ease), transform .55s var(--ui-ease),
              border-color .35s var(--ui-ease), box-shadow .35s var(--ui-ease);
}
.loc-card.is-in { opacity: 1; transform: none; }
@media (hover: hover) and (pointer: fine) {
  .loc-card:hover {
    border-color: rgba(255, 208, 0, .6);
    box-shadow: 0 18px 36px rgba(0, 0, 0, .58), 0 0 20px rgba(255, 208, 0, .22);
    transform: translateY(-5px);
  }
}
.loc-card .ic {
  width: 48px; height: 48px;
  border-radius: 15px;
  display: grid; place-items: center;
  border: 1px solid rgba(255, 208, 0, .4);
  background: rgba(255, 208, 0, .09);
  color: var(--pollocell-yellow);
}
.loc-card .ic svg { width: 22px; height: 22px; }
.loc-card h3 { font-size: 1.06rem; color: #fff; margin: 0 0 5px; }
.loc-card p { font-size: .95rem; color: #cbcbcb; margin: 0; line-height: 1.6; }

.loc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 4px; }
.loc-actions .btn { width: 100%; }
.loc-actions .btn svg:last-child { transition: transform .3s var(--ui-ease); }
.loc-actions .btn:hover svg:last-child { transform: translateX(5px); }

/* redes */
.loc-social { display: grid; gap: 12px; margin-top: 4px; }
.loc-net {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 15px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(10, 10, 10, .74);
  color: inherit;
  transition: all .35s var(--ui-ease);
}
.loc-net .ic {
  width: 46px; height: 46px;
  border-radius: 14px;
  display: grid; place-items: center;
  border: 1px solid rgba(255, 208, 0, .35);
  background: rgba(255, 208, 0, .08);
  color: var(--pollocell-yellow);
}
.loc-net .ic svg { width: 21px; height: 21px; }
.loc-net b { display: block; font-family: var(--font-title); font-size: 1rem; color: #fff; }
.loc-net span { display: block; font-size: .88rem; color: #b8b8b8; margin-top: 2px; }
.loc-net .go { color: var(--pollocell-yellow); }
.loc-net .go svg { width: 18px; height: 18px; transition: transform .3s var(--ui-ease); }
@media (hover: hover) and (pointer: fine) {
  .loc-net:hover {
    border-color: rgba(255, 208, 0, .65);
    box-shadow: 0 16px 32px rgba(0, 0, 0, .55), 0 0 20px rgba(255, 208, 0, .24);
    transform: translateY(-4px);
  }
  .loc-net:hover .go svg { transform: translateX(5px); }
}

@media (max-width: 980px) {
  .loc-grid { grid-template-columns: 1fr; }
  .loc-frame { aspect-ratio: 16 / 12; }
  .loc-mini { grid-template-columns: auto 1fr; }
  .loc-mini .wa { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 560px) {
  .loc-actions { grid-template-columns: 1fr; }
  .loc-card { grid-template-columns: 42px 1fr; gap: 13px; padding: 18px 16px; }
  .loc-card .ic { width: 42px; height: 42px; }
  .loc-frame { aspect-ratio: 4 / 3; }
}

@media (prefers-reduced-motion: reduce) {
  .ruta-node::after, .ruta-step.is-on .ruta-ico, .tik-play span.dot::before,
  .loc-map.is-in::after, .loc-tag i { animation: none !important; }
  .ruta-card, .loc-map, .loc-card { opacity: 1 !important; transform: none !important; }
  .ruta-rail i { transition: none; }
}
