/**
 * CRD Loterías — Hoja de Estilos Frontend
 * =========================================
 * Paleta: #0B2545 (azul noche RD), #134074 (institucional),
 *          #EE6C4D (coral acción), #F4F7FB (fondo)
 * Fuente: Inter (heredada de WordPress/tema)
 */

/* ─── CONTENEDOR PRINCIPAL ─── */
.crd-loterias-wrapper {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #1a2b3c;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1rem 2rem;
}

/* ─── TIMESTAMP / BADGE EN VIVO ─── */
.crd-lot-timestamp {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #1a7a4a;
  background: #e6f4ee;
  border: 1px solid #b3dfc6;
  border-radius: 999px;
  padding: .3rem .9rem;
  margin-bottom: 1.25rem;
}

.crd-lot-pulse {
  display: inline-block;
  width: 8px; height: 8px;
  background: #1a7a4a;
  border-radius: 50%;
  animation: crdPulse 1.6s ease-in-out infinite;
}

@keyframes crdPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .4; transform: scale(1.5); }
}

/* ─── LOADING ─── */
.crd-lot-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 3rem 1rem;
  color: #5a6a7a;
  font-size: .9rem;
}
.crd-lot-spinner {
  width: 40px; height: 40px;
  border: 4px solid #D1DEEC;
  border-top-color: #134074;
  border-radius: 50%;
  animation: crdSpin .8s linear infinite;
}
@keyframes crdSpin { to { transform: rotate(360deg); } }

/* ─── TÍTULOS DE SECCIÓN ─── */
.crd-lot-seccion-titulo {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0B2545;
  letter-spacing: .03em;
  text-transform: uppercase;
  border-left: 4px solid #EE6C4D;
  padding-left: .75rem;
  margin: 1.75rem 0 1rem;
}

/* ─── GRID DE TARJETAS ─── */
.crd-lot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: .5rem;
}

/* ─── TARJETA DE SORTEO ─── */
.crd-lot-card {
  background: #fff;
  border: 1.5px solid #D1DEEC;
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 2px 12px rgba(11,37,69,.07);
  transition: transform .2s ease, box-shadow .2s ease;
  animation: crdCardIn .4s cubic-bezier(.34,1.56,.64,1) both;
}
.crd-lot-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 22px rgba(11,37,69,.13);
}

.crd-lot-card--ny {
  border-color: #b0c9e8;
  background: linear-gradient(135deg, #f0f6ff 0%, #fff 100%);
}

@keyframes crdCardIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Delay en cascada para las tarjetas */
.crd-lot-card:nth-child(1) { animation-delay: .05s; }
.crd-lot-card:nth-child(2) { animation-delay: .10s; }
.crd-lot-card:nth-child(3) { animation-delay: .15s; }
.crd-lot-card:nth-child(4) { animation-delay: .20s; }
.crd-lot-card:nth-child(5) { animation-delay: .25s; }

.crd-lot-card-header {
  margin-bottom: .65rem;
  border-bottom: 1px solid #edf2f7;
  padding-bottom: .5rem;
}

.crd-lot-nombre {
  font-size: .8rem;
  font-weight: 700;
  color: #134074;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ─── ESFERAS DE NÚMEROS ─── */
.crd-lot-esferas {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
  justify-content: center;
  padding-top: .25rem;
}

.crd-esfera {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  font-size: .92rem;
  font-weight: 800;
  letter-spacing: -.01em;
  box-shadow: 0 2px 8px rgba(0,0,0,.15), inset 0 -2px 4px rgba(0,0,0,.12), inset 0 2px 4px rgba(255,255,255,.35);
  transition: transform .18s ease;
  cursor: default;
  user-select: none;
}
.crd-esfera:hover { transform: scale(1.12); }

/* Pares → azul institucional */
.crd-esfera--par {
  background: radial-gradient(circle at 35% 35%, #2563eb, #0B2545);
  color: #fff;
}

/* Impares → coral acción */
.crd-esfera--impar {
  background: radial-gradient(circle at 35% 35%, #f87b5b, #c94a26);
  color: #fff;
}

/* NY → azul cielo */
.crd-esfera--ny.crd-esfera--par {
  background: radial-gradient(circle at 35% 35%, #38bdf8, #0369a1);
  color: #fff;
}
.crd-esfera--ny.crd-esfera--impar {
  background: radial-gradient(circle at 35% 35%, #a78bfa, #6d28d9);
  color: #fff;
}

/* Pendiente */
.crd-esfera--pending {
  background: #e2e8f0;
  color: #94a3b8;
  border: 2px dashed #cbd5e1;
  box-shadow: none;
  animation: crdBlink 1.4s ease-in-out infinite;
}
@keyframes crdBlink { 0%,100%{opacity:1} 50%{opacity:.4} }

/* ─── BLOQUE SEO — TIPOGRAFÍA ─── */
.crd-seo-bloque {
  margin: 2rem 0;
  padding: 1.5rem;
  background: #F4F7FB;
  border-radius: 12px;
  border: 1px solid #D1DEEC;
}

.crd-seo-intro {
  font-size: .96rem;
  line-height: 1.75;
  color: #2d3748;
  margin-bottom: 0;
}

.crd-seo-h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0B2545;
  margin: 1.5rem 0 .75rem;
  border-bottom: 2px solid #EE6C4D;
  padding-bottom: .4rem;
}

.crd-seo-h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #134074;
  margin: 1.25rem 0 .6rem;
}

.crd-seo-bloque p {
  font-size: .9rem;
  line-height: 1.72;
  color: #4a5568;
  margin-bottom: .85rem;
}

/* ─── LISTAS SEO ─── */
.crd-seo-lista {
  list-style: none;
  padding: 0;
  margin: .5rem 0 1rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.crd-seo-lista--pales li,
.crd-seo-lista--tripletas li {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: #fff;
  border: 1.5px solid #D1DEEC;
  border-radius: 8px;
  padding: .55rem .9rem;
  font-size: .88rem;
}

.crd-pale-num, .crd-triplet-num {
  font-size: 1.1rem;
  font-weight: 900;
  color: #0B2545;
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
}
.crd-pale-label {
  font-size: .75rem;
  color: #718096;
  background: #edf2f7;
  border-radius: 99px;
  padding: .15rem .6rem;
}

.crd-seo-lista--horarios li {
  font-size: .88rem;
  color: #2d3748;
  padding: .4rem .2rem;
  border-bottom: 1px solid #e8edf3;
}

/* ─── DISCLAIMER ─── */
.crd-disclaimer-seo {
  font-size: .78rem !important;
  color: #a0aec0 !important;
  border-left: 3px solid #e2e8f0;
  padding-left: .6rem;
  margin-top: .75rem !important;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 540px) {
  .crd-lot-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .crd-esfera {
    width: 32px; height: 32px;
    font-size: .82rem;
  }
  .crd-seo-bloque {
    padding: 1rem;
  }
}

@media (max-width: 360px) {
  .crd-lot-grid { grid-template-columns: 1fr; }
}
