/* Importar variables globales */
@import url('../components/variables.css');

/* Estilos para las páginas de información */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 1200px;
  margin: 0 auto;
}

.main-content {
  flex: 1;
  background-color: var(--col-bac);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, rgba(94, 53, 177, 0.9), rgba(236, 64, 122, 0.9));
  color: white;
  padding: 72px 20px 56px;
  text-align: center;
}

.hero-content h1 {
  font-size: 2.5rem;
  margin-bottom: 15px;
  font-weight: 700;
}

.hero-content p {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* Content Section */
/* Sobrescribe reglas globales de base.css que ocultaban .content */
.content {
  padding: 48px 0 64px;
  display: block; /* override display:none */
  height: auto;   /* evitar altura forzada */
  overflow: visible; /* permitir que el contenido se muestre completo */
}

/* Steps Grid (Como Funciona) */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.step-card {
  background: white;
  border-radius: 15px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.step-card:hover {
  transform: translateY(-5px);
}

.step-number {
  width: 60px;
  height: 60px;
  background: var(--col-pri);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0 auto 20px;
}

.step-card h3 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: var(--col-fon);
}

.step-card p {
  color: #666;
  line-height: 1.6;
}

/* Credits Info Grid (Créditos) */
.credits-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.credit-use-card {
  background: white;
  border-radius: 14px;
  padding: 24px 22px;
  text-align: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.credit-use-card:hover {
  transform: translateY(-5px);
}

.use-icon {
  font-size: 2.2rem;
  color: var(--col-pri);
  margin-bottom: 20px;
}

/* Asegura que los SVG hereden color y tamaño coherente */
.use-icon svg {
  width: 2.25rem;
  height: 2.25rem;
  fill: currentColor;
}

.credit-use-card h3 {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: var(--col-fon);
}

.credit-use-card p {
  color: #666;
  line-height: 1.5;
  margin-bottom: 15px;
}

.cost {
  background: linear-gradient(45deg, #FFD700, #FFA500);
  color: #333;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: bold;
  display: inline-block;
}

/* Earn Credits Section */
.earn-credits {
  background: white;
  border-radius: 15px;
  padding: 26px 28px;
  margin-bottom: 40px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.earn-credits h2 {
  color: var(--col-fon);
  margin-bottom: 25px;
  text-align: center;
  font-size: 1.8rem;
}

.earn-list {
  list-style: none;
  padding: 0;
  max-width: 600px;
  margin: 0 auto;
}

/* Estructura robusta y compatible con mobile */
.earn-list li {
  padding: 12px 4px;
  display: grid;
  grid-template-columns: 28px 1fr;
  column-gap: 12px;
  align-items: start;
  border-bottom: 1px solid #f0f0f0;
  background: transparent !important;
  height: auto !important;
}

.earn-list li:last-child {
  border-bottom: none;
}

.earn-list i {
  color: var(--col-pri);
  width: 28px !important;   /* anula el width global */
  min-width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
}

.earn-list span {
  width: auto !important;   /* evita width:100% heredado */
  display: block;
}

/* Botón Comprar embebido en la línea */
.btn-buy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 18px;
  font-size: 0.9rem;
  margin-left: 10px;
  vertical-align: middle;
  white-space: nowrap;
  width: auto !important; /* anula width:100% global */
  max-width: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.btn-buy i { 
  width: auto !important; 
  height: auto; 
  line-height: 1; 
  color: #fff !important; /* visible sobre fondo primario */
}

/* Back Link */
.back-link {
  text-align: center;
  margin-top: 48px;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--col-pri);
  color: white;
  padding: 12px 22px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  width: auto !important;
}

.btn-back:hover {
  background: #7b4397;
  transform: translateY(-2px);
}

/* Media Queries */
@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2rem;
  }
  
  .steps-grid,
  .credits-info-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .step-card,
  .credit-use-card {
    padding: 20px;
  }
  
  .step-number {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }
  
  .earn-credits {
    padding: 20px;
  }
  
  .content {
    padding: 40px 0;
  }
  /* Earn list: evitar superposición en mobile */
  .earn-list li {
    grid-template-columns: 24px 1fr;
    column-gap: 10px;
    padding: 10px 0;
  }

  .earn-list i {
    width: 24px !important;
    min-width: 24px;
    height: 24px;
    line-height: 24px;
    font-size: 1rem;
  }

  .earn-list span {
    font-size: 1rem;
    line-height: 1.4;
  }

  .btn-buy {
    font-size: 0.95rem;
    padding: 6px 12px;
    margin-left: 8px;
  }
}

/* Desktop refinements */
@media (min-width: 1024px) {
  .hero-content h1 { font-size: 2.6rem; }
  .hero-content p { font-size: 1.05rem; }

  .credits-info-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
  }

  .earn-credits h2 { font-size: 1.7rem; }
  .credit-use-card h3 { font-size: 1.1rem; }
  .credit-use-card p { font-size: 0.95rem; }
}