/* ============================================================
   POLLOCEL — Ubicación y contacto con rastreo
   Selector de vistas, animación de escaneo y accesos sociales.
   ============================================================ */

.loc-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(22px, 3vw, 38px); align-items: start; }
.loc-left { display: grid; gap: 16px; }

/* ---------- barra superior: selector + repetir ---------- */
.loc-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.loc-tabs {
  display: inline-flex;
  padding: 5px;
  gap: 4px;
  border-radius: 999px;
  background: rgba(10, 10, 10, .9);
  border: 1px solid rgba(255, 208, 0, .3);
  box-shadow: inset 0 0 16px rgba(0, 0, 0, .6);
}
.loc-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #d2d2d2;
  font-family: inherit;
  font-size: .92rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background .32s var(--ui-ease), color .32s var(--ui-ease), box-shadow .32s var(--ui-ease);
}
.loc-tab svg { width: 17px; height: 17px; }
.loc-tab:hover { color: #fff; background: rgba(255, 208, 0, .1); }
.loc-tab[aria-selected="true"] {
  background: linear-gradient(150deg, var(--pollocell-yellow-bright), var(--pollocell-yellow));
  color: #0a0a0a;
  font-weight: 600;
  box-shadow: 0 0 16px rgba(255, 208, 0, .5);
}
.loc-again {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 208, 0, .55);
  background: rgba(8, 8, 8, .9);
  color: #fff;
  font-family: inherit;
  font-size: .88rem;
  cursor: pointer;
  transition: box-shadow .3s var(--ui-ease), border-color .3s var(--ui-ease);
}
.loc-again svg { width: 17px; height: 17px; color: var(--pollocell-yellow); }
.loc-again:hover { border-color: var(--pollocell-yellow); box-shadow: 0 0 20px rgba(255, 208, 0, .45); }
.loc-again.is-spin svg { animation: locSpin .8s var(--ui-ease) 1; }
@keyframes locSpin { to { transform: rotate(360deg); } }

/* ---------- tarjeta principal ---------- */
.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);
  opacity: 0;
  transform: translateY(22px) scale(.99);
  transition: opacity .6s var(--ui-ease), transform .6s var(--ui-ease),
              border-color .4s var(--ui-ease), box-shadow .4s var(--ui-ease);
}
.loc-map.is-in { opacity: 1; transform: none; }
.loc-map:hover { border-color: var(--pollocell-yellow); box-shadow: 0 0 28px rgba(255, 208, 0, .38), 0 24px 50px rgba(0, 0, 0, .7); }
/* mientras el rastreo corre no se puede interactuar con el mapa */
.loc-map.is-busy .loc-views { pointer-events: none; }

.loc-views { position: relative; aspect-ratio: 4 / 3; width: 100%; }
.loc-view { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .4s var(--ui-ease), visibility .4s var(--ui-ease); }
.loc-view.is-on { opacity: 1; visibility: visible; }
.loc-view iframe { width: 100%; height: 100%; border: 0; display: block; }

.loc-photo {
  display: grid;
  place-items: center;
  gap: 12px;
  text-align: center;
  padding: 30px;
  background:
    radial-gradient(70% 60% at 50% 40%, rgba(255, 208, 0, .09), transparent 68%),
    linear-gradient(160deg, #121212, #060606);
}
.loc-photo svg { width: 46px; height: 46px; color: var(--pollocell-yellow); }
.loc-photo b {
  font-family: var(--font-title);
  font-size: .84rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--pollocell-yellow);
}
.loc-photo p { margin: 0; max-width: 34ch; color: #c6c6c6; font-size: .96rem; }
.loc-photo img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- rastreo ---------- */
.loc-scan {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  background: rgba(4, 4, 4, .82);
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s var(--ui-ease), visibility .5s var(--ui-ease);
}
.loc-scan.is-on { opacity: 1; visibility: visible; }
.loc-scan .grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 208, 0, .13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 208, 0, .13) 1px, transparent 1px);
  background-size: 38px 38px;
  opacity: 0;
  transition: opacity .5s var(--ui-ease);
}
.loc-scan.is-on .grid { opacity: 1; }
.loc-scan .beam {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--pollocell-yellow), transparent);
  box-shadow: 0 0 18px rgba(255, 208, 0, .85);
  top: 0;
}
.loc-scan.is-on .beam { animation: locBeam 1.5s var(--ui-ease) 2; }
@keyframes locBeam { from { top: -2%; } to { top: 102%; } }

.loc-scan .dots { position: absolute; inset: 0; pointer-events: none; }
.loc-scan .dots i {
  position: absolute;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--pollocell-yellow);
  box-shadow: 0 0 8px 2px rgba(255, 208, 0, .7);
  opacity: 0;
}
.loc-scan.is-on .dots i { animation: locDot 1.6s ease-out 1 forwards; }
.loc-scan .dots i:nth-child(1) { left: 18%; top: 26%; animation-delay: .4s; }
.loc-scan .dots i:nth-child(2) { left: 72%; top: 34%; animation-delay: .7s; }
.loc-scan .dots i:nth-child(3) { left: 34%; top: 68%; animation-delay: 1s; }
.loc-scan .dots i:nth-child(4) { left: 82%; top: 72%; animation-delay: 1.3s; }
@keyframes locDot {
  0% { opacity: 0; transform: scale(.4); }
  40% { opacity: 1; transform: scale(1); }
  100% { opacity: .35; transform: scale(.8); }
}

.loc-hud {
  position: relative;
  z-index: 3;
  text-align: center;
  display: grid;
  gap: 14px;
  justify-items: center;
}
.loc-hud .txt {
  font-family: var(--font-title);
  font-size: .82rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--pollocell-yellow);
  text-shadow: 0 0 14px rgba(255, 208, 0, .6);
  min-height: 1.2em;
}
.loc-hud .coords {
  font-size: .74rem;
  letter-spacing: .1em;
  color: #b6b6b6;
  font-variant-numeric: tabular-nums;
}
.loc-pin {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--pollocell-yellow);
  box-shadow: 0 0 18px 6px rgba(255, 208, 0, .55);
  opacity: 0;
  transform: scale(.4);
  transition: opacity .45s var(--ui-ease), transform .45s var(--ui-ease);
}
.loc-scan.is-found .loc-pin { opacity: 1; transform: scale(1); animation: locPulse 1.8s ease-in-out infinite; }
@keyframes locPulse {
  0%, 100% { box-shadow: 0 0 18px 6px rgba(255, 208, 0, .55); }
  50% { box-shadow: 0 0 26px 12px rgba(255, 208, 0, .3); }
}
.loc-scan.is-found .grid,
.loc-scan.is-found .beam { opacity: 0; transition: opacity .6s var(--ui-ease); }

/* ---------- accesos sociales ---------- */
.loc-socials { display: flex; gap: 14px; justify-content: center; padding-top: 4px; }
.loc-soc {
  width: 58px; height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 208, 0, .35);
  background: rgba(10, 10, 10, .9);
  color: #fff;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s var(--ui-ease), transform .5s var(--ui-ease),
              border-color .3s var(--ui-ease), box-shadow .3s var(--ui-ease);
}
.loc-soc.is-in { opacity: 1; transform: none; }
.loc-soc svg { width: 26px; height: 26px; }
.loc-soc--wa { color: #4ee07f; }
.loc-soc--fb { color: #5b9dff; }
.loc-soc--tk { color: #fff; }
.loc-soc:hover {
  border-color: var(--pollocell-yellow);
  box-shadow: 0 0 22px rgba(255, 208, 0, .5);
  transform: translateY(-5px);
}

/* ---------- columna derecha ---------- */
.loc-side { display: grid; gap: 14px; }
.loc-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  align-items: start;
  padding: 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; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .loc-grid { grid-template-columns: 1fr; }
  .loc-views { aspect-ratio: 16 / 12; }
  .loc-bar { flex-direction: column; align-items: stretch; }
  .loc-tabs { width: 100%; justify-content: space-between; }
  .loc-tab { flex: 1; justify-content: center; padding: 10px 8px; font-size: .86rem; }
  .loc-tab svg { width: 15px; height: 15px; }
  .loc-again { justify-content: center; }
}
@media (max-width: 560px) {
  .loc-tab span { display: none; }
  .loc-tab { padding: 12px 6px; }
  .loc-tab[aria-selected="true"] span { display: inline; }
  .loc-card { grid-template-columns: 42px 1fr; gap: 13px; padding: 18px 16px; }
  .loc-card .ic { width: 42px; height: 42px; }
  .loc-views { aspect-ratio: 4 / 3; }
  .loc-soc { width: 54px; height: 54px; }
}

@media (prefers-reduced-motion: reduce) {
  .loc-scan .beam, .loc-scan .dots i, .loc-scan.is-found .loc-pin,
  .loc-again.is-spin svg { animation: none !important; }
  .loc-map, .loc-card, .loc-soc { opacity: 1 !important; transform: none !important; }
  .loc-scan { display: none; }
}
