/* ══════════════════════════════════════════════════════
   SECCIÓN DESTACADOS - CAJASAN
   ⭐ v4: Tarjetas reducidas ~20% en altura y espaciados
   internos, manteniendo el ancho fijo en px que asigna JS
   (esto evita romper el fix de alineación con 4+ tarjetas)
   ══════════════════════════════════════════════════════ */

.benefits-section {
  max-width: auto;
  margin: 0 auto;
  padding: 3rem 1rem;
  background-color: var(--gray-200);
}

.benefits-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.benefits-header__text { text-align: left; }

.benefits-section__title {
  font-size: 1.85rem;
  font-weight: 800;
  color: #1a4fa0;
  margin: 0 0 .3rem;
  line-height: 1.2;
  text-align: left;
}

.benefits-section__subtitle {
  font-size: .9rem;
  color: #475569;
  margin: 0;
}

.benefits-header__actions {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-shrink: 0;
  margin-top: .4rem;
}

.benefits-see-all {
  color: #1a4fa0;
  font-weight: 700;
  font-size: .85rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .4rem;
  white-space: nowrap;
}
.benefits-see-all:hover { text-decoration: underline; }

.benefits-nav-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #1a4fa0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: .8rem;
  transition: background .2s, color .2s, border-color .2s;
  flex-shrink: 0;
}
.benefits-nav-btn:hover { background: #1a4fa0; color: #fff; border-color: #1a4fa0; }
.benefits-nav-btn:last-child { background: #1a4fa0; color: #fff; border-color: #1a4fa0; }
.benefits-nav-btn:last-child:hover { background: #123a7a; }

/* ── Carrusel: FLEXBOX (se mantiene igual, sin cambios) ───
   El ancho de cada tarjeta sigue siendo asignado en px por
   js/destacados.js (_updateCardWidth), por eso aquí NO se
   toca ningún valor de ancho — solo la altura vía aspect-ratio
   más abajo, para no reintroducir el bug de tarjetas desiguales. */
.benefits-grid {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: .5rem;
}
.benefits-grid::-webkit-scrollbar { display: none; }

@media (max-width: 640px) {
  .benefits-section__title { font-size: 1.5rem; }
  .benefits-header { flex-direction: column; }
  .benefits-header__actions { align-self: flex-end; margin-top: -2.5rem; }
}

/* ── Card: imagen COMPLETA de fondo, texto superpuesto ────── */
.benefit-card {
  position: relative;
  flex: 0 0 auto; /* El ancho real lo asigna JS por tarjeta (inline style) */
  scroll-snap-align: start;
  border-radius: 16px;
  overflow: hidden;
  /* ⭐ REDUCCIÓN 20%: aspect-ratio pasó de 4/3 (1.33) a 8/5 (1.6).
     Con el mismo ancho, esto da exactamente un 20% menos de alto. */
  aspect-ratio: 3 / 2;
  box-shadow: 0 2px 12px rgba(0,0,0,.1);
  transition: transform .25s ease, box-shadow .25s ease;
  display: block;
}
.benefit-card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(0,0,0,.18); }

.benefit-card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 0;
}

.benefit-card__gradient {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    0deg,
    rgba(62, 104, 175, .6) 0%,
    rgba(62, 104, 175, .45) 35%,
    rgba(62, 104, 175, .15) 65%,
    rgba(62, 104, 175, 0) 100%
  );
  pointer-events: none;
}

/* ── Badge de categoría (reducido ~20%) ───────────────────── */
.benefit-card__badge {
  position: absolute;
  top: 11px;
  left: 11px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: #fff;
  padding: .26rem .6rem;
  border-radius: 50px;
  font-size: .62rem;
  font-weight: 700;
  color: #1e293b;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  white-space: nowrap;
}
.benefit-card__badge i { font-size: .68rem; }
.benefit-card__badge--recreacion i { color: #0d9488; }
.benefit-card__badge--turismo i    { color: #2563eb; }
.benefit-card__badge--educacion i  { color: #7c3aed; }
.benefit-card__badge--salud i      { color: #e11d48; }
.benefit-card__badge--default i    { color: #1a4fa0; }

/* ── Contenido de texto (padding reducido ~20%) ───────────── */
.benefit-card__content {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  padding: .85rem 3.4rem .9rem 1rem;
}

.benefit-card__title {
  font-size: .98rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 .28rem;
  line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0,0,0,.3);
}

.benefit-card__desc {
  font-size: .72rem;
  color: rgba(255,255,255,.92);
  line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Flecha circular (reducida ~20%) ──────────────────────── */
.benefit-card__arrow {
  position: absolute;
  right: .9rem;
  bottom: .9rem;
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  color: #1a4fa0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: .78rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  transition: background .2s, color .2s, transform .15s;
}
.benefit-card__arrow:hover { background: #1a4fa0; color: #fff; transform: scale(1.08); }

.benefit-card--skeleton {
  background: linear-gradient(90deg,#e2e8f0 25%,#f1f5f9 50%,#e2e8f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.benefits-empty, .benefits-error {
  width: 100%;
  text-align: center;
  padding: 3rem;
  color: #94a3b8;
  font-size: .95rem;
}
.benefits-error button {
  margin-top: 1rem;
  padding: .6rem 1.5rem;
  background: #1a4fa0;
  color: #fff;
  border: none;
  border-radius: 50px;
  font-weight: 700;
  cursor: pointer;
}
