/* =========================================
   1. CONFIGURACIÓN BASE Y RESET
   ========================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-attachment: fixed; /* Mantiene el fondo fijo al hacer scroll */
  min-height: 100vh;
  color: #333;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* =========================================
   2. HEADER
   ========================================= */
.header {
  text-align: center;
  margin-bottom: 3rem;
  color: white;
}

.title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
  font-size: 1.2rem;
  font-weight: 300;
  opacity: 0.9;
}

/* =========================================
   3. TARJETAS DE RIFAS (DISEÑO PRINCIPAL)
   ========================================= */
.main-content {
  margin-bottom: 4rem;
}

.rifas-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.rifa-card {
  background: white !important;
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  max-width: 380px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  animation: fadeInUp 0.6s ease forwards;
}

.rifa-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.rifa-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: linear-gradient(90deg, #F59E0B, #3B82F6, #10B981);
}

.rifa-icon {
  font-size: 4.5rem;
  text-align: center;
}

.rifa-title {
  font-size: 1.6rem;
  font-weight: 800;
  text-align: center;
  color: #1F2937;
}

.rifa-description {
  font-size: 1rem;
  color: #6B7280;
  text-align: center;
}

.rifa-info {
  text-align: center;
  padding: 10px 0;
}

.price {
  font-weight: 800;
  font-size: 1.4rem;
  color: #059669;
}

/* =========================================
   4. BOTONES (CORRECCIÓN DE COLOR PARA PC)
   ========================================= */
.rifa-button {
  display: block !important;
  width: 100% !important;
  padding: 1.2rem !important;
  text-decoration: none !important;
  text-align: center !important;
  border-radius: 12px !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  position: relative !important;
  overflow: hidden !important;
  transition: all 0.3s ease !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  border: none !important;
}

/* Botón Lista (Naranja) */
.btn-premium {
  background: linear-gradient(135deg, #F59E0B, #D97706) !important;
  color: white !important;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4) !important;
}

.btn-premium:hover {
  background: linear-gradient(135deg, #D97706, #B45309) !important;
  transform: translateY(-2px);
}

/* Botón Info (Gris/Azulado) */
.btn-info {
  background: linear-gradient(135deg, #4b5563, #1f2937) !important;
  color: white !important;
}

.btn-info:hover {
  background: linear-gradient(135deg, #1f2937, #111827) !important;
  transform: translateY(-2px);
}

/* Efecto Brillo */
.button-overlay {
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s ease;
}

.rifa-button:hover .button-overlay {
  left: 100%;
}

/* =========================================
   5. SECCIÓN GANADORES
   ========================================= */
.winners-section {
  padding: 4rem 0;
  text-align: center;
}

.section-title {
  color: white;
  font-size: 2.5rem;
  margin-bottom: 2.5rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.winners-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}

.winner-card {
  background: white;
  border-radius: 15px;
  padding: 2rem;
  width: 100%;
  max-width: 300px;
  position: relative;
  border: 2px solid #FFD700;
  transition: transform 0.3s ease;
}

.fb-live-btn {
  display: block;
  margin-top: 1rem;
  background: #1877F2;
  color: white !important;
  padding: 0.8rem;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
}

/* =========================================
   6. WHATSAPP Y FOOTER
   ========================================= */
.contact-buttons {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
}

.whatsapp-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #25D366;
  color: white !important;
  padding: 1rem 1.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.footer {
  text-align: center;
  color: white;
  padding: 4rem 0;
  opacity: 0.9;
}

/* =========================================
   7. ANIMACIONES Y RESPONSIVO
   ========================================= */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .title { font-size: 2.2rem; }
  .contact-text { display: none; }
  .whatsapp-btn { padding: 1rem; }
  .rifa-card { padding: 1.5rem; }
}

/* Esto fuerza a que los botones se vean como bloques con color en cualquier pantalla */
.rifas-grid .rifa-button.btn-premium {
    background: linear-gradient(135deg, #F59E0B, #D97706) !important;
    color: white !important;
    display: block !important;
    padding: 1.2rem !important;
    border-radius: 12px !important;
    text-decoration: none !important;
    margin-bottom: 10px;
}

.rifas-grid .rifa-button.btn-info {
    background: linear-gradient(135deg, #4b5563, #1f2937) !important;
    color: white !important;
    display: block !important;
    padding: 1.2rem !important;
    border-radius: 12px !important;
    text-decoration: none !important;
}

/* Para que el texto de los botones siempre sea blanco */
.rifa-button span {
    color: white !important;
}

/* Contenedor que elimina los espacios laterales de la tarjeta */
.rifa-image-container {
  width: calc(100% + 5rem); /* Expande la imagen para tocar los bordes */
  margin: -2.5rem -2.5rem 1.5rem -2.5rem; /* Sube la foto hasta el tope y elimina el padding */
  height: 250px; /* Altura ideal para fotos rectangulares */
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.rifa-img-header {
  width: 100%;
  height: 100%;
  object-fit: cover; /* CORTA la imagen para que rellene el cuadro sin deformarse */
  object-position: center; /* Centra la vista en los carros */
  display: block;
}

/* Ajuste especial para celulares */
@media (max-width: 480px) {
  .rifa-image-container {
    width: calc(100% + 3rem); /* Ajuste según el padding de móvil */
    margin: -1.5rem -1.5rem 1rem -1.5rem; 
    height: 200px; /* Un poco más bajita en celular */
  }
}