/* ======= Fondo principal ======= */
body {
  margin: 0;
  background: url('fondo-barbacoa.jpg') no-repeat center center fixed;
  background-size: cover;
  font-family: 'Inter', sans-serif;
  color: #333;
}

/* ======= Tarjeta principal ======= */
.pase {
  max-width: 520px;
  margin: auto;
  padding: 28px 22px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.35);
  color: #2a2a2a;
}

/* ======= Logo Don Poncho ======= */
.logo {
  width: 160px;
  margin: 0 auto 12px;
  display: block;
}

/* ======= Cabecera y nombres ======= */
.nombre {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #212121;
  text-align: center;
}

.nivel {
  font-size: 18px;
  font-weight: 500;
  color: #666;
  text-align: center;
}

/* ======= Datos principales ======= */
.puntos,
.frase-motivadora,
.idcliente,
.visitas,
.meta-texto,
.historial,
#texto-visitas {
  color: #ffffff;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.75);
  text-align: center;
  font-size: 0.95rem;
  margin: 8px 0;
}

/* ======= QR ======= */
.qr {
  width: 220px;
  margin: 16px auto;
  display: block;
}

/* ======= Barra de progreso ======= */
.progreso-wrapper {
  margin-top: 50px;
}

.barra {
  background: #eee;
  border-radius: 30px;
  height: 18px;
  width: 100%;
  margin-bottom: 8px;
  position: relative;
}

.relleno {
  height: 100%;
  background: linear-gradient(90deg, #d4a373, #f5cba7);
  width: 0%;
  transition: width 0.5s ease;
  border-radius: 30px 0 0 30px;
}

.borrego {
  position: absolute;
  top: -6px;
  font-size: 1.8rem;
  transform: translateX(-50%) scaleX(-1);
  transition: left 0.4s ease;
}

@keyframes brincarBorrego {
  0% { transform: translateX(-50%) scaleX(-1) translateY(0); }
  50% { transform: translateX(-50%) scaleX(-1) translateY(-6px); }
  100% { transform: translateX(-50%) scaleX(-1) translateY(0); }
}
.borrego.saltando {
  animation: brincarBorrego 0.8s ease-in-out;
}

/* ======= Contenedor dinámico ======= */
.contenido-dinamica {
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(6px);
  border-radius: 16px;
  padding: 24px 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ======= Cupones ======= */
.cupon {
  background: rgba(255, 255, 255, 0.85);
  border: 2px dashed #ff9800;
  padding: 16px;
  margin: 16px 0;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.3s ease;
  font-family: 'Segoe UI', sans-serif;
  color: #444;
}

.cupon:hover {
  transform: scale(1.01);
}

.cupon strong {
  color: #d84315;
  font-size: 1.1em;
}

.cupon button {
  background-color: #ff9800;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 10px;
  transition: background-color 0.2s ease;
}

.cupon button:hover {
  background-color: #e67c00;
}

/* Cupones por nivel */
.cupon.plata { background: #e3f2fd; }
.cupon.oro { background: #fffde7; }
.cupon.platino { background: #ede7f6; }
.cupon.bronce { background: #fbe9e7; }

/* Cupón usado */
.cupon-usado {
  opacity: 0.6;
}

.canjeado {
  color: #888;
  font-style: italic;
  margin-top: 4px;
}

/* Cupón sin datos */
.cupon.vacio {
  background: #f9fbe7;
  border: 2px dashed #cfd8dc;
  color: #616161;
  font-style: italic;
}

/* ======= Botón de canje ======= */
.btn-canjear {
  background: #2e7d32;
  color: white;
  border: none;
  padding: 10px 18px;
  font-size: 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.btn-canjear:hover {
  background: #1b5e20;
}

/* ======= Elementos ocultos ======= */
.oculto {
  display: none !important;
}

.cupon.vacio {
  background: rgba(255, 255, 255, 0.75);
  border: 2px dashed #cfd8dc;
  padding: 18px;
  border-radius: 12px;
  color: #616161;
  text-align: center;
  font-style: italic;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

@keyframes borregoPensativo {
  0% { transform: rotate(-15deg); }
  50% { transform: rotate(15deg); }
  100% { transform: rotate(-15deg); }
}

.borrego-pensativo {
  display: inline-block;
  font-size: 2.5rem;
  animation: borregoPensativo 1s infinite ease-in-out;
  margin-bottom: 10px;
  transform: scaleX(1) rotate(2deg);
}

.icono-visita {
  position: absolute;
  top: -26px;
  font-size: 1.6rem;
  transform: translateX(-50%);
  transition: left 0.4s ease;
  animation: caminarMedalla 1.4s infinite ease-in-out;
}
@keyframes caminarMedalla {
  0% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-4px); }
  100% { transform: translateX(-50%) translateY(0); }
}

.medalla-brillante {
  position: relative;
  display: inline-block;
}

.medalla-brillante::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.5), transparent);
  animation: destelloMedalla 1.5s infinite ease-in-out;
  z-index: -1;
}

@keyframes destelloMedalla {
  0% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.4); opacity: 0.3; }
  100% { transform: scale(1); opacity: 0.7; }
}
.medalla-bronce {
  color: #CD7F32; /* tono bronce */
  text-shadow: 0 0 4px #CD7F32;
}

.medalla-plata {
  color: #C0C0C0; /* tono plata */
  text-shadow: 0 0 4px #C0C0C0;
}

.medalla-oro {
  color: #D4AF37; /* tono oro */
  text-shadow: 0 0 5px #D4AF37;
}

.medalla-platino {
  color: #E5E4E2; /* tono platino */
  text-shadow: 0 0 5px #E5E4E2;
}

.medalla-oro,
.medalla-platino {
  animation: brilloNivel 1.5s infinite ease-in-out;
}

@keyframes brilloNivel {
  0% { text-shadow: 0 0 4px currentColor; }
  50% { text-shadow: 0 0 10px currentColor; }
  100% { text-shadow: 0 0 4px currentColor; }
}

@keyframes borregoCelebrando {
  0% { left: 0%; transform: translateX(0); }
  50% { left: 50%; transform: translateY(-12px); }
  100% { left: 50%; transform: translateY(0); }
}

.borrego-celebrando {
  animation: borregoCelebrando 1.2s ease-out forwards;
  position: absolute;
  font-size: 2rem;
  top: -28px;
  z-index: 3;
}

.confeti {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2rem;
  animation: explotaConfeti 0.8s ease-out forwards;
}

@keyframes explotaConfeti {
  0% { opacity: 0; transform: scale(0.5) translateY(0); }
  50% { opacity: 1; transform: scale(1.2) translateY(-10px); }
  100% { opacity: 0; transform: scale(0.5) translateY(-20px); }
}
.fondo-celebracion {
  animation: fondoBrilla 1.2s ease-out forwards;
}

@keyframes fondoBrilla {
  0%   { background: rgba(255, 215, 0, 0.4); }
  50%  { background: rgba(255, 255, 255, 0.6); }
  100% { background: rgba(255, 255, 255, 0.3); }
}
.mensaje-canje {
  text-align: center;
  background: #fff8e1;
  color: #6d4c41;
  border: 2px dashed #d4af37;
  padding: 12px;
  margin-top: 12px;
  font-size: 1rem;
  border-radius: 8px;
  animation: fadeInOut 6s ease-in-out;
}

@keyframes fadeInOut {
  0%   { opacity: 0; transform: scale(0.95); }
  10%  { opacity: 1; transform: scale(1); }
  90%  { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.95); }
}

/* ===============================
   Barra de progreso de visitas
   =============================== */

.progreso-visitas {
  margin-top: 36px; /* 🔻 Baja toda la sección */
  margin-bottom: 24px;
}

.progreso-visitas .barra {
  position: relative;
  height: 24px;
  background-color: #f1f1f1;
  border-radius: 12px;
  overflow: hidden;
}

#relleno-visitas {
  height: 100%;
  width: 0%; /* Se actualiza por JS */
  background: linear-gradient(to right, #fbc02d, #ff9800);
  border-radius: 12px;
  transition: width 0.4s ease;
}

#icono-visita {
  position: absolute;
  top: -4px; /* 🔧 Más bajo para no empalmarse */
  left: 50%;
  transform: translateX(-50%);
  font-size: 1rem;
  font-weight: bold;
}

#texto-visitas {
  margin-top: 12px;
  font-size: 0.95rem;
  text-align: center;
}
.nivel-oro     { color: #D4AF37; font-weight: bold; }
.nivel-plata   { color: #C0C0C0; font-weight: bold; }
.nivel-bronce  { color: #CD7F32; font-weight: bold; }
.nivel-platino { color: #E5E4E2; font-weight: bold; }

.relleno {
  height: 100%;
  width: 0%;
  background: linear-gradient(
    90deg,
    #a1887f,
    #d7ccc8,
    #ef6c00,
    #fdd835
  );
  background-size: 400% 100%;
  animation: tejidoBrillante 8s ease infinite;
  border-radius: 30px 0 0 30px;
  transition: width 0.5s ease;
  box-shadow: inset 0 1px 4px rgba(0,0,0,0.15);
}
@keyframes tejidoBrillante {
  0%   { background-position: 0% 0%; }
  100% { background-position: 100% 0%; }
}

.btn-web {
  display: inline-block;
  padding: 14px 26px;
  margin-top: 20px;
  background: linear-gradient(to right, #a01b23, #d3122a);
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border: none;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: all 0.3s ease;
  position: relative;
}

.btn-web:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  background: linear-gradient(to right, #d3122a, #a01b23);
}

.btn-web::after {
  content: "»";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  transition: right 0.3s ease;
}

.btn-web:hover::after {
  right: 12px;
}

@keyframes flotar-medalla {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}

.icono-visita {
  position: absolute;
  top: -10px;
  left: 0;
  font-size: 1.3rem;
  animation: flotar-medalla 2.8s ease-in-out infinite;
  transition: left 1.5s ease-in-out;
}

/* 🔁 Animación suave en dirección inversa */
@keyframes onda-invertida {
  0%   { background-position-x: 100%; }
  100% { background-position-x: 0%; }
}

/* 💧 Estilo base del relleno de visitas */
#relleno-visitas {
  height: 100%;
  width: 0;
  border-radius: 6px;
  transition: width 2.4s cubic-bezier(0.42, 0, 0.58, 1); /* fluido y elegante */
  background-size: 200% 100%;
  background-position-x: 100%;
  background-repeat: no-repeat;
  animation: onda-invertida 7s ease-in-out infinite;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.12), inset 0 0 2px rgba(255, 255, 255, 0.2);
  opacity: 0.96;
}
.nivel-bronce #relleno-visitas {
  background-image: linear-gradient(90deg, #5d4037, #a1887f, #5d4037);
}

.nivel-plata #relleno-visitas {
  background-image: linear-gradient(90deg, #78909c, #cfd8dc, #78909c);
}

.nivel-oro #relleno-visitas {
  background-image: linear-gradient(90deg, #fdd835, #fff9c4, #fdd835);
}

.nivel-platino #relleno-visitas {
  background-image: linear-gradient(90deg, #4fc3f7, #e1f5fe, #4fc3f7);
  filter: brightness(1.1);
}
.banner-info {
  background-color: #ffe8c7;
  border: 2px solid #dca35d;
  border-radius: 8px;
  padding: 10px;
  margin: 10px auto;
  text-align: center;
  font-weight: 600;
  color: #5b3b1e;
}


