/* ========================
   BANNER BUEN FIN (sección promocional)
   Estilo claro y minimalista: 30% de descuento directo + paquetes de check-up.
   Todo va con prefijo .bf- para no chocar con Bootstrap ni con el resto de la página.
======================== */
.bf-promo {
  --bf-bg: #eef6fd;
  --bf-navy: #063d65;
  --bf-ink: #0f2740;
  --bf-teal: #0887a5;
  --bf-teal-soft: #dcf0f4;
  --bf-green: #76b845;
  --bf-green-dark: #4f8f2a;
  --bf-red: #d7262f;
  --bf-muted: #5b6875;
  --bf-line: #dbe7f1;
  --bf-font: "Segoe UI", "Noto Sans", system-ui, -apple-system, sans-serif;
  background: #fff;
  padding: 1rem 0;
}

.bf-promo *,
.bf-promo *::before,
.bf-promo *::after { box-sizing: border-box; }

/* ---------- Tarjeta contenedora ---------- */
.bf-board {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: var(--bf-bg);
  font-family: var(--bf-font);
  color: var(--bf-navy);
  padding: 0 0 28px;
}

/* ---------- Parte 1: hero ---------- */
.bf-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  min-height: 300px;
  /* Manchas de color suaves + patrón de puntos */
  background:
    radial-gradient(circle at 8% 110%, rgba(118, 184, 69, 0.22) 0, rgba(118, 184, 69, 0) 34%),
    radial-gradient(circle at 46% -20%, rgba(8, 135, 165, 0.16) 0, rgba(8, 135, 165, 0) 40%),
    radial-gradient(rgba(6, 61, 101, 0.09) 1.2px, transparent 1.5px) 0 0 / 18px 18px;
}

.bf-hero__text {
  position: relative;
  z-index: 2;
  padding: 26px 0 30px 48px;
}

.bf-hero__main {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 6px;
}

.bf-hero__copy { min-width: 0; }

/* Chips flotantes sobre la foto */
.bf-chip {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 24px rgba(6, 61, 101, 0.16);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--bf-navy);
  white-space: nowrap;
  animation: bf-float 4.5s ease-in-out infinite;
}

.bf-chip i {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  color: #fff;
  background: var(--bf-teal);
}

.bf-chip--a { left: 56%; top: 22%; }
.bf-chip--b { left: 61%; bottom: 16%; animation-delay: -2.2s; }
.bf-chip--b i { background: var(--bf-green); }

@keyframes bf-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Sello circular "-30% Buen Fin" */
.bf-sticker {
  position: absolute;
  z-index: 3;
  right: 22px;
  top: 18px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bf-red);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.1;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.85), 0 10px 22px rgba(6, 61, 101, 0.2);
  transform: rotate(-12deg);
  animation: bf-pop 0.7s cubic-bezier(0.22, 1.4, 0.36, 1) 1.3s both;
}

.bf-sticker b {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

@keyframes bf-pop {
  from { opacity: 0; transform: rotate(-40deg) scale(0.3); }
  to { opacity: 1; transform: rotate(-12deg) scale(1); }
}

.bf-hero__badges {
  display: flex;
  align-items: center;
  gap: 18px;
}

.bf-buenfin-logo {
  display: block;
  width: 78px;
  height: auto;
  transform-origin: 50% 0%;
  filter: drop-shadow(0 6px 10px rgba(15, 39, 64, 0.12));
  animation:
    bf-drop 1.1s cubic-bezier(0.22, 1.2, 0.36, 1) 0.25s both,
    bf-swing 1.4s ease-in-out 1.35s forwards;
}

.bf-date {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 800;
  color: #0b3a62;
}

.bf-date::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bf-red);
}

.bf-discount {
  margin: 0 0 0 -6px;
  display: flex;
  align-items: flex-start;
  line-height: 0.95;
  white-space: nowrap;
}

.bf-discount__num {
  font-size: clamp(5.5rem, 3.6rem + 5vw, 8.5rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  color: var(--bf-navy);
}

.bf-discount__pct {
  font-size: clamp(3.6rem, 2.4rem + 3.4vw, 5.6rem);
  font-weight: 700;
  color: var(--bf-teal);
  margin: 0.12em 0 0 0.04em;
}

.bf-promo .bf-headline {
  margin: 0;
  font-family: var(--bf-font);
  font-size: clamp(1.35rem, 1rem + 1vw, 2rem);
  line-height: 1.15;
  font-weight: 700;
  color: #0c4573;
}

.bf-promo .bf-headline sup { color: var(--bf-red); font-size: 0.55em; top: -0.8em; }

.bf-promo .bf-headline strong {
  display: block;
  font-weight: 800;
  color: var(--bf-ink);
}

.bf-promo .bf-cta {
  margin-top: 16px;
  width: min(310px, 100%);
  height: 50px;
  padding: 0 20px 0 24px;
  border-radius: 12px;
  background: var(--bf-navy);
  color: #fff;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 800;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.bf-promo .bf-cta svg { width: 20px; flex: 0 0 20px; transition: transform 0.2s ease; }

.bf-promo .bf-cta:hover {
  background: #0a4f80;
  color: #fff;
  box-shadow: 0 8px 20px rgba(6, 61, 101, 0.25);
}

.bf-promo .bf-cta:hover svg { transform: translateX(4px); }

/* Fotografía recortada con curva + ondas (mismo lenguaje del banner anterior) */
.bf-hero__photo {
  position: relative;
  z-index: 1;
  overflow: hidden;
  clip-path: ellipse(100% 120% at 100% 50%);
  background: var(--bf-teal-soft);
  animation: bf-art-in 1.3s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

.bf-hero__photo::before {
  content: "";
  position: absolute;
  inset: 0;
  clip-path: ellipse(96% 120% at 100% 50%);
  background: #c4e5ea;
  z-index: 0;
}

.bf-hero__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 30% center;
  clip-path: ellipse(92% 120% at 100% 50%);
  z-index: 1;
}

.bf-hero__photo::after {
  content: "";
  position: absolute;
  right: -12%;
  bottom: -30%;
  width: 80%;
  height: 46%;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  background: var(--bf-teal);
  box-shadow: -40px -18px 0 0 #a9d78c;
  transform: rotate(-8deg);
  z-index: 2;
}

/* ---------- Parte 2: paquetes ---------- */
.bf-packs-head {
  padding: 30px 48px 0;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 16px;
}

.bf-kicker {
  flex-basis: 100%;
  margin: 0;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #111;
}

.bf-kicker span { color: var(--bf-red); }

.bf-promo .bf-packs-title {
  margin: 0;
  font-size: clamp(1.45rem, 1.1rem + 1vw, 2rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--bf-ink);
}

.bf-swipe { display: none; }

.bf-packs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  padding: 20px 48px 0;
}

.bf-pack {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--bf-line);
  border-radius: 16px;
  padding: 18px 18px 16px;
  color: var(--bf-ink);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.bf-pack:hover {
  transform: translateY(-4px);
  border-color: #b9d6ea;
  box-shadow: 0 14px 30px rgba(6, 61, 101, 0.1);
}

.bf-pack--featured {
  border-color: var(--bf-teal);
  box-shadow: 0 0 0 1px var(--bf-teal);
}

.bf-pack__tag {
  position: absolute;
  top: -11px;
  left: 18px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--bf-teal);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bf-pack__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bf-pack__icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bf-teal-soft);
  color: var(--bf-teal);
  font-size: 0.95rem;
}

.bf-pack__count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--bf-muted);
}

.bf-promo .bf-pack__name {
  margin: 14px 0 0;
  min-height: 2.4em;
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--bf-navy);
}

.bf-pack__price {
  margin: 6px 0 0;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--bf-line);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--bf-ink);
}

.bf-pack__cur {
  font-size: 0.55em;
  font-weight: 700;
  vertical-align: 0.6em;
  margin-right: 2px;
  color: var(--bf-teal);
}

.bf-pack__list {
  list-style: none;
  margin: 0;
  padding: 12px 0 8px;
  flex: 1 1 auto;
}

.bf-pack__list li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 6px;
  font-size: 0.84rem;
  line-height: 1.3;
  color: #3c4651;
}

.bf-pack__list li::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 0.32em;
  width: 9px;
  height: 5px;
  border-left: 2px solid var(--bf-green);
  border-bottom: 2px solid var(--bf-green);
  transform: rotate(-45deg);
}

.bf-promo .bf-pack__btn {
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  border-radius: 10px;
  background: var(--bf-bg);
  color: var(--bf-navy);
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.bf-promo .bf-pack__btn span { transition: transform 0.2s ease; }

.bf-promo .bf-pack__btn:hover,
.bf-pack--featured .bf-pack__btn { background: var(--bf-navy); color: #fff; }

.bf-promo .bf-pack--featured .bf-pack__btn:hover { background: #0a4f80; }

.bf-promo .bf-pack__btn:hover span { transform: translateX(3px); }

.bf-promo .bf-cta:focus-visible,
.bf-promo .bf-pack__btn:focus-visible {
  outline: 3px solid var(--bf-teal);
  outline-offset: 3px;
}

/* ---------- Nota ---------- */
.bf-note {
  margin: 18px 48px 0;
  font-size: 0.85rem;
  line-height: 1.45;
  font-weight: 600;
  color: var(--bf-muted);
}

.bf-note sup { color: var(--bf-red); font-weight: 800; }

/* ---------- Animaciones ---------- */
@keyframes bf-drop {
  0% { opacity: 0; transform: translateY(-120%) rotate(-14deg) scale(0.6); }
  60% { opacity: 1; transform: translateY(6%) rotate(4deg) scale(1.05); }
  80% { transform: translateY(-2%) rotate(-2deg) scale(0.98); }
  100% { opacity: 1; transform: none; }
}

@keyframes bf-swing {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(3deg); }
  55% { transform: rotate(-2deg); }
  80% { transform: rotate(1deg); }
}

@keyframes bf-art-in {
  from { opacity: 0; transform: translateX(18%); }
  to { opacity: 1; transform: none; }
}

@keyframes bf-up {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: none; }
}

/* Los paquetes son visibles siempre. La animación de entrada solo se activa
   cuando el script agrega .bf-anim al aparecer la sección en pantalla; si el
   script no corre, las tarjetas se quedan visibles sin animación. */
.bf-promo.bf-anim .bf-packs-head,
.bf-promo.bf-anim .bf-pack { animation: bf-up 0.85s cubic-bezier(0.22, 1, 0.36, 1) both; }

.bf-promo.bf-anim .bf-pack:nth-child(1) { animation-delay: 0.1s; }
.bf-promo.bf-anim .bf-pack:nth-child(2) { animation-delay: 0.18s; }
.bf-promo.bf-anim .bf-pack:nth-child(3) { animation-delay: 0.26s; }
.bf-promo.bf-anim .bf-pack:nth-child(4) { animation-delay: 0.34s; }
.bf-promo.bf-anim .bf-pack:nth-child(5) { animation-delay: 0.42s; }

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
  .bf-packs { grid-template-columns: repeat(6, minmax(0, 1fr)); row-gap: 22px; }
  .bf-pack { grid-column: span 2; }
  .bf-pack:nth-child(4) { grid-column: 2 / span 2; }
  .bf-pack:nth-child(5) { grid-column: 4 / span 2; }
}

@media (max-width: 991px) {
  .bf-hero { grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); min-height: 0; }
  .bf-chip { display: none; }
  .bf-hero__main { gap: 20px; }
  .bf-promo .bf-cta { width: auto; font-size: 1rem; }
  .bf-hero__text { padding-left: 32px; }
  .bf-packs-head, .bf-packs { padding-left: 32px; padding-right: 32px; }
  .bf-note { margin-left: 32px; margin-right: 32px; }
}

/* Móvil: hero apilado y paquetes deslizables */
@media (max-width: 767px) {
  .bf-promo { padding: .75rem 0; }
  .bf-board { border-radius: 16px; padding-bottom: 22px; }

  .bf-hero { display: flex; flex-direction: column-reverse; min-height: 0; }
  .bf-hero__text { padding: 22px 20px 28px; }
  .bf-hero__photo {
    height: 170px;
    clip-path: ellipse(140% 100% at 50% 0%);
  }
  .bf-hero__photo::before { clip-path: ellipse(140% 96% at 50% 0%); }
  .bf-hero__photo img { clip-path: ellipse(140% 92% at 50% 0%); }
  .bf-hero__photo::after { display: none; }

  .bf-hero__main { flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 10px; }
  .bf-hero__copy { display: contents; }
  .bf-discount__num { font-size: clamp(4.2rem, 19vw, 5.5rem); }
  .bf-discount__pct { font-size: clamp(2.8rem, 12.5vw, 3.6rem); }
  .bf-promo .bf-headline { flex: 1 1 0; min-width: 0; font-size: clamp(1.05rem, 4.6vw, 1.35rem); }
  .bf-promo .bf-cta { flex-basis: 100%; margin-top: 14px; }
  .bf-chip--a { display: flex; left: 14px; top: 116px; bottom: auto; font-size: 0.78rem; }
  .bf-sticker { right: 14px; top: 104px; width: 78px; height: 78px; font-size: 0.6rem; }
  .bf-sticker b { font-size: 1.35rem; }

  .bf-buenfin-logo { width: 64px; }
  .bf-date { font-size: 1rem; }

  .bf-promo .bf-cta { width: 100%; height: 50px; }
  .bf-hero__text { padding-top: 18px; padding-bottom: 22px; }

  .bf-packs-head { padding: 24px 20px 0; }
  .bf-swipe {
    display: block;
    flex-basis: 100%;
    margin: 2px 0 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--bf-muted);
  }
  .bf-swipe i { margin-left: 4px; color: var(--bf-teal); }

  .bf-packs {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 20px;
    padding: 18px 20px 12px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .bf-packs::-webkit-scrollbar { display: none; }
  .bf-packs::after { content: ""; flex: 0 0 8px; }

  .bf-pack,
  .bf-pack:nth-child(4),
  .bf-pack:nth-child(5) {
    flex: 0 0 78%;
    max-width: 290px;
    scroll-snap-align: start;
  }

  .bf-pack:hover { transform: none; }

  .bf-note { margin: 8px 20px 0; font-size: 0.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  .bf-promo * { animation: none !important; transition: none !important; }
}
