/* ============================================================
   PÁGINA DEDICADA DE BENEFICIOS
============================================================ */

.beneficios-page {
  background: #FFF6C7;
  min-height: 100vh;
}

.beneficios-page-hero {
  width: 100%;
  min-height: 52vh;
  padding: 1rem;
  background: #FFF6C7;
}

.beneficios-page-hero-content {
  width: 100%;
  min-height: calc(52vh - 2rem);
  border-radius: 28px;
  padding: 5%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background:
    radial-gradient(circle, rgba(247, 146, 30, 0.05) 0%, rgba(0, 0, 0, 0.78) 100%),
    url("assets/images/hero-bg.jpg");
  background-size: cover;
  background-position: center;
  color: #ffffff;
}

.beneficios-page-hero h1 {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(4rem, 10vw, 8rem);
  line-height: 0.9;
  margin: 1rem 0 0.75rem;
  max-width: 1000px;
}

.beneficios-page-hero p {
  max-width: 760px;
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  line-height: 1.6;
  font-weight: 600;
}

.back-link {
  width: fit-content;
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 5px;
  font-size: 0.95rem;
  font-weight: 900;
}

.back-link:hover {
  color: var(--primary);
}

/* Corrige espacio y estructura del main de la subpágina */

.beneficios-page main {
  width: 100%;
  padding: 4rem 5% 5rem;
  margin: 0;
}

.beneficios-page .section-header {
  margin-bottom: 1.5rem;
}

.beneficios-page .section-title {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(3rem, 6vw, 5.5rem);
  line-height: 0.95;
  color: #1f1f1f;
}

.beneficios-page .count-badge {
  font-size: 0.95rem;
  color: #3e342d;
  font-weight: 800;
}

/* Grilla de beneficios */

.beneficios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2.2rem;
  align-items: start;
}

/* Estados de carga y vacío */

.loading,
.empty,
.error-msg {
  grid-column: 1 / -1;
  min-height: 280px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.5);
  border: 2px solid rgba(31, 31, 31, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  text-align: center;
  padding: 2rem;
  color: #1f1f1f;
}

.loading p,
.empty p,
.error-msg {
  font-weight: 700;
}

.empty-icon {
  font-size: 3rem;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(31, 31, 31, 0.12);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Mejoras para tarjetas de beneficios en la página */

.beneficios-grid .card {
  min-width: 0;
}

.beneficios-grid .card-media {
  height: 420px;
}

.beneficios-grid .card-title {
  color: #1f1f1f;
}

.beneficios-grid .card-text {
  color: #3e342d;
}

/* Botones de acción dentro de la tarjeta */

.card-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}

.card-contact-link,
.card-map-link {
  width: fit-content;
  color: #1f1f1f;
  text-decoration: underline;
  text-underline-offset: 4px;
  font-size: 0.92rem;
  font-weight: 800;
}

.card-contact-link:hover,
.card-map-link:hover {
  color: var(--primary);
}

/* Responsive */

@media (max-width: 768px) {
  .beneficios-page main {
    padding: 3rem 1rem 4rem;
  }

  .beneficios-grid {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }

  .beneficios-grid .card-media {
    height: 360px;
  }

  .beneficios-page-hero {
    min-height: 46vh;
  }

  .beneficios-page-hero-content {
    min-height: calc(46vh - 2rem);
    padding: 2rem;
  }
}

@media (max-width: 480px) {
  .beneficios-grid .card-media {
    height: 310px;
  }
}
