/* ═══ /en-directo/ — tarjetas-reproductor por ciudad ═══════════
   Línea gráfica del sitio: degradado oscuro del hero, naranja de marca,
   Outfit en titulares y ondas de radio como motivo. Las tarjetas manejan
   el reproductor global (player.js → window.LFMPlayer). */
.ld-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 0 24px;
}
.ld-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px 20px 16px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(140deg, #1a1a1a 0%, #2d1200 58%, #1a1a1a 100%);
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 6px 22px rgba(0, 0, 0, .12);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
/* Ondas de radio que salen de la esquina */
.ld-card::before {
  content: '';
  position: absolute;
  z-index: -1;
  top: -110px; right: -110px;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, rgba(255, 136, 0, .22) 0 1.5px, transparent 1.5px 24px);
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 70%);
  mask-image: radial-gradient(circle, #000 0%, transparent 70%);
  opacity: .55;
  transition: opacity .3s ease, transform .6s ease;
}
/* Filo de color de marca arriba */
.ld-card::after {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 3px;
  background: linear-gradient(90deg, #e63d32, #FF6600 55%, #FFD600);
  opacity: .55;
  transition: opacity .2s ease;
}
@media (hover: hover) {
  .ld-card:hover { transform: translateY(-2px); border-color: rgba(255, 136, 0, .45); box-shadow: 0 12px 30px rgba(0, 0, 0, .2); }
  .ld-card:hover::before { opacity: .9; }
  .ld-card:hover::after { opacity: 1; }
}

/* ── Fila superior: distintivo de directo + tipo de señal ── */
.ld-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ld-live {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-display);
  font-size: 11px; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase;
  color: #fff;
  padding: 4px 11px 4px 9px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .1);
}
.ld-live i {
  width: 8px; height: 8px; border-radius: 50%;
  background: #ff3b30;
  box-shadow: 0 0 0 0 rgba(255, 59, 48, .6);
  animation: ld-pulse 1.8s ease-out infinite;
}
.ld-signal {
  font-family: var(--font-display);
  font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255, 255, 255, .6);
}

/* ── Centro: ciudad + frecuencia y botón ── */
.ld-main { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.ld-id { min-width: 0; }
.ld-card h2 {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 800;
  line-height: 1.1; letter-spacing: .01em;
  color: #fff; margin: 0;
}
.ld-freq {
  display: flex; align-items: baseline; gap: 6px;
  margin-top: 4px;
  font-family: var(--font-display);
  font-weight: 800; line-height: 1;
}
.ld-freq b { font-size: 42px; color: #FF8800; letter-spacing: -.01em; }
.ld-freq span { font-size: 15px; color: rgba(255, 255, 255, .75); letter-spacing: .08em; }

.ld-play {
  position: relative;
  flex: 0 0 68px;
  width: 68px; height: 68px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #FF8800, #FF6600 55%, #e63d32);
  box-shadow: 0 8px 22px rgba(255, 102, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: transform .16s ease, box-shadow .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.ld-play:active { transform: scale(.95); }
.ld-play:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
@media (hover: hover) {
  .ld-play:hover { transform: scale(1.05); box-shadow: 0 10px 28px rgba(255, 102, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .35); }
  .ld-play:hover:active { transform: scale(.97); }
}
.ld-play svg { width: 28px; height: 28px; fill: currentColor; display: block; }
.ld-play .ld-ico-play { margin-left: 4px; }
.ld-play .ld-ico-pause, .ld-play .ld-spin { display: none; }
.ld-spin {
  width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  animation: ld-rot .8s linear infinite;
}

/* ── Pie: ecualizador + estado + enlace ── */
.ld-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-top: 13px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  min-height: 42px;
}
.ld-status { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: rgba(255, 255, 255, .72); min-width: 0; }
.ld-eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 16px; flex: 0 0 auto; }
.ld-eq i {
  width: 3px; height: 4px; border-radius: 2px;
  background: rgba(255, 255, 255, .35);
  transform-origin: bottom;
}
.ld-link {
  flex: 0 0 auto;
  font-family: var(--font-display);
  font-size: 13px; font-weight: 700;
  color: #FFB066;
  white-space: nowrap;
  transition: color .15s ease;
}
.ld-link:hover { color: #fff; }
.ld-link span { display: inline-block; transition: transform .15s ease; }
.ld-link:hover span { transform: translateX(3px); }

/* ── Estados ── */
.ld-card.is-loading .ld-play .ld-ico-play,
.ld-card.is-playing .ld-play .ld-ico-play { display: none; }
.ld-card.is-loading .ld-play .ld-spin { display: block; }
.ld-card.is-playing .ld-play .ld-ico-pause { display: block; }

.ld-card.is-playing,
.ld-card.is-loading {
  border-color: #FF6600;
  box-shadow: 0 0 0 1px #FF6600, 0 14px 36px rgba(255, 102, 0, .28);
}
.ld-card.is-playing::before { opacity: 1; animation: ld-waves 3.2s ease-in-out infinite; }
.ld-card.is-playing::after,
.ld-card.is-loading::after { opacity: 1; }
.ld-card.is-playing .ld-live { background: #e63d32; }
.ld-card.is-playing .ld-live i { background: #fff; box-shadow: none; animation: none; }
.ld-card.is-playing .ld-status { color: #fff; font-weight: 700; }
.ld-card.is-playing .ld-eq i { background: #FF8800; height: 16px; animation: ld-eq 1s ease-in-out infinite; }
.ld-card.is-playing .ld-eq i:nth-child(2) { animation-duration: .7s; animation-delay: -.3s; }
.ld-card.is-playing .ld-eq i:nth-child(3) { animation-duration: 1.2s; animation-delay: -.6s; }
.ld-card.is-playing .ld-eq i:nth-child(4) { animation-duration: .85s; animation-delay: -.15s; }

@keyframes ld-eq { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }
@keyframes ld-pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 59, 48, .6); } 70%, 100% { box-shadow: 0 0 0 8px rgba(255, 59, 48, 0); } }
@keyframes ld-rot { to { transform: rotate(360deg); } }
@keyframes ld-waves { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }

/* Sin JavaScript: reproductor nativo dentro de la tarjeta */
.ld-card noscript audio { width: 100%; margin-top: 4px; }

@media (max-width: 980px) { .ld-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) {
  .ld-grid { grid-template-columns: 1fr; gap: 14px; }
  .ld-card { padding: 18px 16px 14px; gap: 16px; }
  .ld-freq b { font-size: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  .ld-card, .ld-card::before, .ld-play, .ld-link span { transition: none; }
  .ld-live i, .ld-card.is-playing::before { animation: none; }
  .ld-card.is-playing .ld-eq i { animation: none; transform: scaleY(.7); }
  .ld-card.is-playing .ld-eq i:nth-child(2n) { transform: scaleY(1); }
}
