/*
 * Banners interactivos de los carruseles (src/lib/banners.ts y public/js/banners.js). Como el de horarios, llenan la
 * diapositiva y se miden con unidades del contenedor (cqw, cqh): horizontal en computador, vertical en celular.
 */

.bz {
  --bz-amarillo: #ffcc3e;
  --bz-noche: #0d1a2e;
  --bz-azul: #004568;
  --px: 0;
  --py: 0;
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  overflow: hidden;
  container: bz / size;
  color: #fff;
  font-family: inherit;
  text-align: left;
  background:
    radial-gradient(60% 85% at 10% 0%, rgba(0, 150, 180, 0.45) 0%, transparent 60%),
    radial-gradient(50% 80% at 70% 110%, rgba(0, 97, 124, 0.9) 0%, transparent 65%),
    linear-gradient(120deg, #00536f 0%, #004568 40%, #10152a 100%);
}
.bz *,
.bz *::before,
.bz *::after {
  box-sizing: border-box;
}
.bz p,
.bz ol {
  margin: 0;
  padding: 0;
}
/* El calco trae «span { font-size: 13px }»: dentro del banner cada texto hereda su tamaño. */
.bz :where(span, li, strong, em) {
  font-size: inherit;
}

.bz__marco {
  position: relative;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  align-items: center;
  gap: 3cqw;
  padding: 4cqh 4cqw 4cqh 7cqw;
}

/* ---------- fondo ---------- */
.bz__fondo {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.bz__fondo::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1.4px);
  background-size: 1.6cqw 1.6cqw;
  -webkit-mask-image: linear-gradient(90deg, #000 0%, transparent 55%);
  mask-image: linear-gradient(90deg, #000 0%, transparent 55%);
  opacity: 0.5;
}
.bz__orbe {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
  animation: bz-flota 18s ease-in-out infinite alternate;
}
.bz__orbe--1 {
  width: 44cqw;
  height: 44cqw;
  top: -20cqw;
  left: -12cqw;
  background: radial-gradient(circle, rgba(0, 190, 220, 0.38) 0%, transparent 68%);
}
.bz__orbe--2 {
  width: 36cqw;
  height: 36cqw;
  bottom: -24cqw;
  left: 30cqw;
  background: radial-gradient(circle, rgba(255, 204, 62, 0.22) 0%, transparent 68%);
  animation-duration: 23s;
  animation-direction: alternate-reverse;
}
@keyframes bz-flota {
  to {
    transform: translate3d(4cqw, 3cqw, 0) scale(1.12);
  }
}

/* ---------- textos ---------- */
.bz__cuerpo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.7cqh;
  min-width: 0;
}
.bz__antetitulo {
  font-size: 1.05cqw;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bz-amarillo);
}
.bz__titulo {
  font-size: 2.95cqw;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.bz__texto {
  font-size: 1.4cqw;
  line-height: 1.45;
  max-width: 44cqw;
  opacity: 0.94;
}
.bz__texto strong {
  font-weight: 800;
  color: #fff;
}

/* Pasos: se encienden uno tras otro (3,6 s la vuelta) y con el mouse */
.bz__pasos {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7cqw;
}
.bz__pasos li {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  padding: 0.4em 0.95em 0.4em 0.4em;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: 0.95cqw;
  font-weight: 700;
  white-space: nowrap;
  position: relative;
  isolation: isolate;
  transition: transform 0.3s;
}
/* El paso encendido: una capa amarilla que aparece con opacidad (compuesta), en vez de animar fondo y borde */
.bz__pasos li::before {
  content: '';
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background: rgba(255, 204, 62, 0.16);
  border: 1px solid rgba(255, 204, 62, 0.7);
  opacity: 0;
  transition: opacity 0.3s;
}
.bz__pasos li:hover::before {
  opacity: 1;
}
.bz__num {
  position: relative;
  isolation: isolate;
}
.bz__num::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 50%;
  background: var(--bz-amarillo);
  opacity: 0;
  transition: opacity 0.3s;
}
/* El número oscuro encima del amarillo (también con opacidad) */
.bz__num::after {
  content: attr(data-n);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--bz-noche);
  opacity: 0;
  transition: opacity 0.3s;
}
.bz__pasos li:hover .bz__num::before,
.bz__pasos li:hover .bz__num::after {
  opacity: 1;
}
.bz__num {
  display: inline-grid;
  place-items: center;
  width: 1.9em;
  height: 1.9em;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  font-weight: 800;
}
.bz__pasos li:hover {
  transform: translateY(-2px);
}

@media (prefers-reduced-motion: no-preference) {
  .carrusel__diapositiva--activa .bz__pasos li::before,
  .carrusel__diapositiva--activa .bz__pasos li .bz__num::before,
  .carrusel__diapositiva--activa .bz__pasos li .bz__num::after {
    animation: bz-paso 3.6s calc(1s + var(--n) * 1.2s) infinite;
  }
}
@keyframes bz-paso {
  0%,
  30% {
    opacity: 1;
  }
  34%,
  100% {
    opacity: 0;
  }
}

/* Franja destacada: dos cintas blancas, como en el banner de siempre, y el avión de papel */
.bz__destacado {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-left: -7cqw !important;
  margin-top: 0.4cqh !important;
}
.bz__cinta {
  position: relative;
  display: inline-block;
  padding: 0.3em 1.1em 0.3em 7cqw;
  background: #fff;
  color: var(--bz-azul);
  line-height: 1.15;
}
.bz__cinta:first-child {
  font-size: 2.35cqw;
  font-weight: 800;
  border-radius: 0 999px 999px 0;
  padding-right: 4.2cqw;
  z-index: 1;
}
.bz__cinta--suave {
  font-size: 1.75cqw;
  font-weight: 400;
  padding-right: 2.2em;
  clip-path: polygon(0 0, 100% 0, calc(100% - 1.1em) 100%, 0 100%);
}
.bz__avion {
  position: absolute;
  right: -1.6cqw;
  top: 50%;
  width: 3.4cqw;
  height: 3.4cqw;
  margin-top: -1.9cqw;
  filter: drop-shadow(0 0.4cqw 0.6cqw rgba(0, 0, 0, 0.3));
  will-change: transform, opacity;
}
@media (prefers-reduced-motion: no-preference) {
  .carrusel__diapositiva--activa .bz__avion {
    animation: bz-vuelo 5s 1.2s cubic-bezier(0.45, 0, 0.25, 1) infinite;
  }
}
/* Sale de la franja, sube en curva y entra al círculo; vuelve a aparecer en su sitio */
@keyframes bz-vuelo {
  0%,
  40% {
    transform: none;
    opacity: 1;
  }
  48% {
    transform: translate3d(5cqw, -9cqh, 0) rotate(-10deg) scale(0.95);
  }
  58% {
    transform: translate3d(14cqw, -18cqh, 0) rotate(4deg) scale(0.85);
  }
  70% {
    transform: translate3d(24cqw, -20cqh, 0) rotate(14deg) scale(0.6);
    opacity: 1;
  }
  76% {
    transform: translate3d(28cqw, -18cqh, 0) rotate(18deg) scale(0.35);
    opacity: 0;
  }
  77%,
  90% {
    transform: translate3d(-1cqw, 0, 0) scale(0.4);
    opacity: 0;
  }
  100% {
    transform: none;
    opacity: 1;
  }
}

/* ---------- botones ---------- */
.bz__botones {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9cqw;
  margin-top: 0.6cqh;
}
.bz .bz__boton,
.bz .bz__boton:hover,
.bz .bz__boton:focus,
.bz .bz__boton:visited {
  color: #fff;
  text-decoration: none;
}
.bz .bz__boton {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  padding: 0.8em 1.35em;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: clamp(12px, 1.08cqw, 17px);
  font-weight: 700;
  line-height: 1;
  /* solo transform: las sombras y fondos se miden con el ancho del banner y animarlos cuesta (PageSpeed) */
  transition: transform 0.2s ease;
}
.bz .bz__boton:hover,
.bz .bz__boton:focus-visible {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.55);
}
.bz .bz__boton:focus-visible {
  outline: 3px solid var(--bz-amarillo);
  outline-offset: 2px;
}
.bz .bz__boton--wa,
.bz .bz__boton--wa:hover,
.bz .bz__boton--wa:focus,
.bz .bz__boton--wa:visited {
  color: #05361d;
}
.bz .bz__boton--wa {
  border-color: #25d366;
  background: #25d366;
}
.bz .bz__boton--wa:hover,
.bz .bz__boton--wa:focus-visible {
  background: #3fe07f;
}
.bz__boton svg {
  width: 1.3em;
  height: 1.3em;
  flex: 0 0 auto;
  fill: currentColor;
}

/* ---------- el círculo con el logo ---------- */
.bz__portal {
  position: relative;
  justify-self: center;
  width: min(100%, 74cqh);
  aspect-ratio: 1;
  perspective: 900px;
}
.bz__circulo {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #ffffff 55%, #eef3f6 100%);
  box-shadow:
    0 3cqw 6cqw -1.5cqw rgba(0, 10, 30, 0.55),
    inset 0 -1.2cqw 2.4cqw rgba(0, 69, 104, 0.12);
  overflow: hidden;
  transform: translate3d(calc(var(--px) * 1.2cqw), calc(var(--py) * 1.2cqw), 0) rotateY(calc(var(--px) * 9deg)) rotateX(calc(var(--py) * -9deg));
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
/* El carrusel de la portada estira sus imágenes a todo el alto (calco.css): el logo no. */
.carrusel .bz .bz__logo {
  width: 72%;
  height: auto;
  max-height: 60%;
  object-fit: contain;
}
.bz__logo {
  /* el fondo blanco del logo se funde con el del círculo */
  mix-blend-mode: multiply;
  transform: translate3d(calc(var(--px) * 2.2cqw), calc(var(--py) * 2.2cqw), 0);
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  user-select: none;
}
.bz--mano .bz__circulo,
.bz--mano .bz__logo {
  transition-duration: 0.15s;
}
/* Brillo que sigue al mouse (y pasa solo de vez en cuando) */
.bz__brillo {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle at calc(50% + var(--px) * 80%) calc(40% + var(--py) * 80%), rgba(255, 255, 255, 0.55) 0%, transparent 38%);
  mix-blend-mode: soft-light;
}
.bz__brillo::after {
  content: '';
  position: absolute;
  inset: -20%;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.75) 50%, transparent 60%);
  transform: translateX(-120%);
}
@media (prefers-reduced-motion: no-preference) {
  .carrusel__diapositiva--activa .bz__brillo::after {
    animation: bz-destello 5s 1.2s ease-in-out infinite;
  }
}
@keyframes bz-destello {
  0%,
  72% {
    transform: translateX(-120%);
  }
  86%,
  100% {
    transform: translateX(120%);
  }
}
/* Aro de luz que gira alrededor del círculo */
.bz__aro {
  position: absolute;
  inset: -2.2%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--bz-amarillo), transparent 25%, rgba(0, 200, 230, 0.9) 50%, transparent 75%, var(--bz-amarillo));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 0.45cqw), #000 calc(100% - 0.4cqw));
  mask: radial-gradient(farthest-side, transparent calc(100% - 0.45cqw), #000 calc(100% - 0.4cqw));
  opacity: 0.9;
  animation: bz-gira 9s linear infinite;
}
@keyframes bz-gira {
  to {
    transform: rotate(1turn);
  }
}
/* Ondas: salen cuando llega el avión */
.bz__onda {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 0.3cqw solid rgba(255, 204, 62, 0.8);
  opacity: 0;
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .carrusel__diapositiva--activa .bz__onda {
    animation: bz-onda 5s 1.2s ease-out infinite;
  }
  .carrusel__diapositiva--activa .bz__onda--2 {
    animation-delay: 1.5s;
  }
}
@keyframes bz-onda {
  0%,
  72% {
    transform: scale(1);
    opacity: 0;
  }
  74% {
    opacity: 0.9;
  }
  100% {
    transform: scale(1.28);
    opacity: 0;
  }
}

/* ---------- entrada ---------- */
@media (prefers-reduced-motion: no-preference) {
  .carrusel__diapositiva--activa .bz__anima {
    animation: bz-entra 0.75s cubic-bezier(0.2, 0.75, 0.2, 1) both;
    animation-delay: calc(var(--i, 0) * 85ms);
  }
  .carrusel__diapositiva--activa .bz__portal {
    animation: bz-portal 0.9s cubic-bezier(0.2, 0.8, 0.2, 1.1) both;
  }
}
/* Sin opacidad: el texto se ve desde el primer cuadro (si no, PageSpeed retrasa el LCP hasta que aparece). */
@keyframes bz-entra {
  from {
    transform: translate3d(0, 1.4cqw, 0);
  }
  to {
    transform: none;
  }
}
@keyframes bz-portal {
  from {
    transform: scale(0.85) rotate(-6deg);
  }
  to {
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .bz__orbe,
  .bz__aro {
    animation: none;
  }
}

/* ---------- celular y pantallas verticales: el círculo arriba, el texto debajo ---------- */
@container bz (max-aspect-ratio: 1/1) {
  .bz__marco {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-content: center;
    gap: 5cqw;
    padding: 6cqw 6.5cqw 7cqw;
  }
  .bz__portal {
    grid-row: 1;
    width: 46cqw;
  }
  .bz__aro {
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 1cqw), #000 calc(100% - 0.9cqw));
    mask: radial-gradient(farthest-side, transparent calc(100% - 1cqw), #000 calc(100% - 0.9cqw));
  }
  .bz__cuerpo {
    grid-row: 2;
    align-items: center;
    text-align: center;
    gap: 2.6cqw;
  }
  .bz__antetitulo,
  .bz__pasos,
  .bz__botones {
    display: none;
  }
  .bz__titulo {
    font-size: 6.6cqw;
  }
  .bz__texto {
    font-size: 3.7cqw;
    max-width: none;
  }
  .bz__destacado {
    align-items: center;
    margin: 1cqw -6.5cqw 0 !important;
  }
  .bz__cinta {
    padding-left: 1.1em;
  }
  .bz__cinta:first-child {
    font-size: 5.4cqw;
    border-radius: 999px;
    padding: 0.3em 2.6em 0.3em 1.1em;
  }
  .bz__cinta--suave {
    font-size: 4.2cqw;
    clip-path: none;
    border-radius: 999px;
    padding: 0.25em 1.1em;
    margin-top: 1cqw;
  }
  .bz__avion {
    width: 8cqw;
    height: 8cqw;
    right: 0.6em;
    margin-top: -4cqw;
  }
  .carrusel__diapositiva--activa .bz__avion {
    animation-name: bz-vuelo-vertical;
  }
}
/* Vuelo en vertical: sube desde la franja hasta el círculo de arriba */
@keyframes bz-vuelo-vertical {
  0%,
  40% {
    transform: none;
    opacity: 1;
  }
  55% {
    transform: translate3d(-8cqw, -30cqh, 0) rotate(-40deg) scale(0.9);
  }
  70% {
    transform: translate3d(-24cqw, -55cqh, 0) rotate(-60deg) scale(0.55);
    opacity: 1;
  }
  76% {
    transform: translate3d(-28cqw, -60cqh, 0) rotate(-70deg) scale(0.3);
    opacity: 0;
  }
  77%,
  90% {
    transform: scale(0.4);
    opacity: 0;
  }
  100% {
    transform: none;
    opacity: 1;
  }
}

/* =====================================================================================================================
 * Diseño «aniversario» (.ba): foto de la sede, sello que gira, número rayado como el 17 del logo, banderines que se
 * mecen, serpentinas que se dibujan y un botón de confeti (public/js/banners.js). Primero para celular (vertical);
 * en computador (horizontal) la foto va a la izquierda con el borde curvo y el sello a la derecha.
 * ===================================================================================================================== */

.ba {
  --ba-oro: #f5b700;
  --ba-oro-claro: #ffd45c;
  --ba-real: #0b2f7a;
  --px: 0;
  --py: 0;
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  overflow: hidden;
  container: ba / size;
  color: #fff;
  font-family: inherit;
  text-align: center;
  background:
    radial-gradient(70% 55% at 85% 15%, rgba(60, 110, 220, 0.5) 0%, transparent 60%),
    radial-gradient(60% 50% at 0% 95%, rgba(245, 183, 0, 0.16) 0%, transparent 60%),
    linear-gradient(160deg, #0f3c96 0%, #0b2f7a 45%, #071c4f 100%);
}
.ba *,
.ba *::before,
.ba *::after {
  box-sizing: border-box;
}
.ba p,
.ba figure {
  margin: 0;
  padding: 0;
}
.ba :where(span, strong, em, button) {
  font-size: inherit;
}

/* ---------- fondo: luces, serpentinas, estrellas ---------- */
.ba__fondo {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.ba__orbe {
  position: absolute;
  border-radius: 50%;
  animation: bz-flota 20s ease-in-out infinite alternate;
}
.ba__orbe--1 {
  width: 60cqw;
  height: 60cqw;
  top: -25cqw;
  right: -20cqw;
  background: radial-gradient(circle, rgba(90, 150, 255, 0.35) 0%, transparent 68%);
}
.ba__orbe--2 {
  width: 50cqw;
  height: 50cqw;
  bottom: -25cqw;
  left: -10cqw;
  background: radial-gradient(circle, rgba(245, 183, 0, 0.22) 0%, transparent 68%);
  animation-direction: alternate-reverse;
}
.ba__adornos {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.ba__serpentina {
  fill: none;
  stroke: rgba(255, 255, 255, 0.75);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 700;
  stroke-dashoffset: 0;
}
.ba__serpentina--oro {
  stroke: var(--ba-oro);
}
.ba__estrella {
  fill: none;
  stroke: var(--ba-oro);
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
}
.ba__punto {
  fill: none;
  stroke: var(--ba-oro);
  stroke-width: 2.5;
}

/* ---------- banderines ---------- */
.ba__guirnalda {
  position: absolute;
  top: -1cqw;
  right: -3cqw;
  width: 64cqw;
  height: auto;
  z-index: 1;
  overflow: visible;
  pointer-events: none;
  transform: translate3d(calc(var(--px) * -1cqw), 0, 0);
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.ba__cuerda {
  fill: none;
  stroke: var(--ba-oro-claro);
  stroke-width: 2;
}
.ba__bandera path:first-child {
  fill: var(--ba-oro);
  stroke: #ffe08a;
  stroke-width: 1.5;
  stroke-linejoin: round;
}
.ba__rayas {
  fill: none;
  stroke: rgba(11, 47, 122, 0.55);
  stroke-width: 2.4;
  stroke-linecap: round;
}
.ba__bandera {
  transform-box: fill-box;
  transform-origin: 50% 0;
}

/* ---------- distribución en celular (por defecto) ---------- */
.ba__marco {
  position: relative;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas:
    'foto sello'
    'cuerpo cuerpo';
  grid-template-rows: auto auto;
  align-content: center;
  align-items: center;
  column-gap: 3cqw;
  row-gap: 4cqw;
  padding: 8cqw 6cqw 6cqw;
}

/* ---------- foto de la sede: arco con borde dorado ---------- */
.ba__foto {
  grid-area: foto;
  justify-self: end;
  position: relative;
  width: 40cqw;
  aspect-ratio: 4 / 5;
  border-radius: 999px 999px 3cqw 3cqw;
  overflow: hidden;
  box-shadow:
    0 0 0 0.8cqw var(--ba-oro),
    0 0 0 1.8cqw rgba(245, 183, 0, 0.18),
    0 4cqw 8cqw -2cqw rgba(0, 0, 0, 0.6);
}
.carrusel .ba .ba__foto img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 32%;
  transform: scale(1.06) translate3d(calc(var(--px) * -1.2cqw), calc(var(--py) * -1.2cqw), 0);
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
/* Un destello que cruza la foto */
.ba__luz {
  position: absolute;
  inset: -20%;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 236, 180, 0.45) 50%, transparent 60%);
  transform: translateX(-120%);
  pointer-events: none;
}

/* ---------- sello ---------- */
.ba__sello {
  grid-area: sello;
  justify-self: start;
  position: relative;
  width: 40cqw;
  aspect-ratio: 1;
  transform: translate3d(calc(var(--px) * 1.4cqw), calc(var(--py) * 1.4cqw), 0) rotate(calc(var(--px) * 8deg));
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.ba__sello svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.ba__giro {
  transform-origin: 150px 150px;
}
.ba__aro-sello {
  fill: rgba(255, 255, 255, 0.04);
  stroke: #fff;
  stroke-width: 3.5;
}
.ba__aro-sello--fino {
  fill: none;
  stroke-width: 2;
}
.ba__texto-sello {
  fill: #fff;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 3px;
}
.ba__cinta-sello path {
  fill: #fff;
}
.ba__cinta-sello text {
  fill: var(--ba-real);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 1px;
  text-anchor: middle;
}
.carrusel .ba .ba__sello-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 36%;
  height: auto;
  object-fit: contain;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* ---------- textos ---------- */
.ba__cuerpo {
  grid-area: cuerpo;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.2cqw;
  min-width: 0;
}
.ba__titular {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.4cqw;
  line-height: 0.9;
}
/* Número rayado, como el 17 del logo: rayas blancas que se deslizan dentro de la cifra */
.ba__numero {
  display: inline-block;
  font-size: 23cqw;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: transparent;
  background: repeating-linear-gradient(-48deg, #fff 0 0.05em, transparent 0.05em 0.1em);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-stroke: 0.016em #fff;
  filter: drop-shadow(0 0 1.4cqw rgba(255, 255, 255, 0.25));
}
.ba__titulo {
  font-size: 15cqw;
  font-weight: 900;
  letter-spacing: -0.025em;
  text-shadow: 0 1cqw 3cqw rgba(0, 0, 0, 0.3);
}
.ba__texto {
  font-size: 4.1cqw;
  line-height: 1.35;
  text-wrap: balance;
}
.ba__texto p + p {
  margin-top: 0.4em;
}
.ba__texto strong {
  color: var(--ba-oro-claro);
  font-weight: 800;
}
.ba__cierre {
  font-size: 4cqw;
  color: var(--ba-oro-claro);
  position: relative;
  padding-bottom: 0.35em;
}
.ba__cierre::after {
  content: '';
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--ba-oro), transparent);
}
.ba__lema {
  display: none;
  align-items: center;
  gap: 0.5em;
}
.ba__lema svg {
  width: 1.2em;
  height: 1.2em;
  fill: none;
  stroke: var(--ba-oro);
  stroke-width: 2;
  flex: 0 0 auto;
}

/* ---------- botones ---------- */
.ba__botones {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2cqw;
  margin-top: 0.6cqw;
}
.ba .ba__boton:not(.ba__boton--confeti) {
  display: none;
}
.ba .ba__boton,
.ba .ba__boton:hover,
.ba .ba__boton:focus,
.ba .ba__boton:visited {
  color: #fff;
  text-decoration: none;
}
.ba .ba__boton {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  padding: 0.85em 1.4em;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font: inherit;
  font-size: 3.7cqw;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  /* solo transform: las sombras y fondos se miden con el ancho del banner y animarlos cuesta (PageSpeed) */
  transition: transform 0.2s ease;
}
.ba .ba__boton--confeti,
.ba .ba__boton--confeti:hover,
.ba .ba__boton--confeti:focus {
  color: #0b1f4d;
}
.ba .ba__boton--confeti {
  border: 0;
  background: linear-gradient(135deg, var(--ba-oro-claro) 0%, var(--ba-oro) 100%);
  box-shadow:
    0 0.8cqw 2.4cqw -0.6cqw rgba(245, 183, 0, 0.7),
    inset 0 -2px 0 rgba(0, 0, 0, 0.12);
  font-weight: 800;
}
.ba .ba__boton:hover,
.ba .ba__boton:focus-visible {
  transform: translateY(-2px) scale(1.03);
}
.ba .ba__boton--confeti:active {
  transform: scale(0.96);
}
.ba .ba__boton:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}
.ba__boton svg {
  width: 1.3em;
  height: 1.3em;
  fill: currentColor;
  flex: 0 0 auto;
}

/* ---------- movimiento ---------- */
@media (prefers-reduced-motion: no-preference) {
  .ba__giro {
    animation: bz-gira 38s linear infinite;
  }
  .ba__sello:hover .ba__giro {
    animation-play-state: paused;
  }
  .ba__bandera {
    animation: ba-mece 2.8s calc(var(--n) * -0.35s) ease-in-out infinite alternate;
  }
  .ba__estrella {
    animation: ba-titila 2.4s ease-in-out infinite alternate;
  }
  .ba__lema svg {
    animation: ba-late 1.6s ease-in-out infinite;
  }
  .carrusel__diapositiva--activa .ba__serpentina {
    animation: ba-dibuja 1.8s 0.3s cubic-bezier(0.4, 0, 0.2, 1) both;
  }
  .carrusel__diapositiva--activa .ba__luz {
    animation: ba-destello 6s 1.4s ease-in-out infinite;
  }
  .carrusel__diapositiva--activa .ba__anima {
    animation: ba-entra 0.8s cubic-bezier(0.2, 0.75, 0.2, 1) both;
    animation-delay: calc(var(--i, 0) * 90ms);
  }
  .carrusel__diapositiva--activa .ba__sello {
    /* backwards: al terminar vuelve a su transform propio (el que sigue al mouse) */
    animation: ba-sello 1.1s 0.15s cubic-bezier(0.2, 0.9, 0.25, 1.15) backwards;
  }
  .carrusel__diapositiva--activa .ba__numero {
    animation: ba-salta 0.9s 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.4) both;
  }
}
@keyframes ba-mece {
  from {
    transform: rotate(-7deg);
  }
  to {
    transform: rotate(7deg);
  }
}
@keyframes ba-titila {
  from {
    opacity: 0.35;
    transform: scale(0.8) rotate(-10deg);
  }
  to {
    opacity: 1;
    transform: scale(1.15) rotate(10deg);
  }
}
@keyframes ba-late {
  0%,
  100% {
    transform: scale(1);
  }
  15% {
    transform: scale(1.25);
  }
  30% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.15);
  }
}
@keyframes ba-dibuja {
  from {
    stroke-dashoffset: 700;
  }
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes ba-destello {
  0%,
  70% {
    transform: translateX(-120%);
  }
  88%,
  100% {
    transform: translateX(120%);
  }
}
/* Sin opacidad: el texto se ve desde el primer cuadro (si no, PageSpeed retrasa el LCP hasta que aparece). */
@keyframes ba-entra {
  from {
    transform: translate3d(0, 2cqw, 0);
  }
  to {
    transform: none;
  }
}
@keyframes ba-sello {
  from {
    transform: rotate(-140deg) scale(0.5);
  }
  to {
    transform: none;
  }
}
@keyframes ba-salta {
  from {
    transform: scale(0.2) rotate(-12deg);
  }
  to {
    transform: none;
  }
}

/* ---------- computador y pantallas horizontales ---------- */
@container ba (min-aspect-ratio: 1/1) {
  .ba__marco {
    grid-template-columns: 25cqw minmax(0, 1fr) 21cqw;
    grid-template-areas: 'foto cuerpo sello';
    grid-template-rows: 100%;
    column-gap: 4cqw;
    padding: 0 5.5cqw 0 0;
  }
  /* la foto sale del borde izquierdo y termina en una curva con filo dorado, como en el banner de siempre */
  .ba__foto {
    justify-self: stretch;
    align-self: stretch;
    width: auto;
    aspect-ratio: auto;
    margin: -2cqh 0;
    border-radius: 0 50% 50% 0 / 0 50% 50% 0;
    box-shadow:
      0.45cqw 0 0 0 var(--ba-oro),
      1.2cqw 0 0 0 rgba(245, 183, 0, 0.16),
      2cqw 0 5cqw -1cqw rgba(0, 0, 0, 0.55);
  }
  .ba__sello {
    justify-self: center;
    width: 100%;
    margin-top: 6cqh;
  }
  .ba__guirnalda {
    width: 36cqw;
    top: -0.8cqw;
    right: -1.5cqw;
  }
  .ba__cuerpo {
    align-items: flex-start;
    text-align: left;
    gap: 1.8cqh;
  }
  .ba__titular {
    gap: 1.2cqw;
  }
  .ba__numero {
    font-size: 11.5cqw;
  }
  .ba__titulo {
    font-size: 7.4cqw;
  }
  .ba__texto {
    font-size: 1.65cqw;
    text-wrap: pretty;
  }
  .ba__cierre {
    font-size: 1.5cqw;
  }
  .ba__cierre::after {
    left: 0;
    right: 15%;
    background: linear-gradient(90deg, var(--ba-oro), transparent);
  }
  .ba__lema {
    display: flex;
    font-size: 1.35cqw;
    margin-top: 0.4cqh;
  }
  .ba__botones {
    justify-content: flex-start;
    gap: 0.9cqw;
  }
  .ba .ba__boton:not(.ba__boton--confeti) {
    display: inline-flex;
  }
  .ba .ba__boton {
    font-size: clamp(12px, 1.08cqw, 17px);
  }
}

/* =====================================================================================================================
 * Diseño «saludo» (.bm): las dos mitades de la foto llegan desde los lados y se dan la mano, la foto se sacude como un
 * apretón y sale una onda dorada con chispas. Tocar las manos (o el botón 🤝) lo repite. Primero para celular: la foto
 * arriba, centrada en el apretón; en computador, la foto ocupa todo y el texto va a la izquierda sobre un velo azul.
 * ===================================================================================================================== */

.bm {
  --bm-azul: #042242;
  --bm-amarillo: #f8c33a;
  --px: 0;
  --py: 0;
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  overflow: hidden;
  container: bm / size;
  color: #fff;
  font-family: inherit;
  background: var(--bm-azul);
}
.bm *,
.bm *::before,
.bm *::after {
  box-sizing: border-box;
}
.bm p {
  margin: 0;
  padding: 0;
}
.bm :where(span, strong, em, button) {
  font-size: inherit;
}

/* ---------- la foto: arriba en celular, con el apretón en el centro ---------- */
.bm__foto {
  position: absolute;
  top: 0;
  height: 62cqh;
  aspect-ratio: var(--proporcion);
  left: calc(50cqw - var(--mx) * 62cqh * var(--proporcion));
  cursor: pointer;
  transform: translate3d(calc(var(--px) * -1.2cqw), calc(var(--py) * -1cqw), 0);
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.carrusel .bm .bm__capa {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
}
/* Las mitades se cortan en diagonal por donde se dan la mano; sin animación no se ven (queda la foto entera). */
.bm__capa--izq,
.bm__capa--der {
  opacity: 0;
}
.bm__capa--izq {
  clip-path: polygon(0 0, calc(var(--mx) * 100% + 6%) 0, calc(var(--mx) * 100% - 6%) 100%, 0 100%);
}
.bm__capa--der {
  clip-path: polygon(calc(var(--mx) * 100% + 6%) 0, 100% 0, 100% 100%, calc(var(--mx) * 100% - 6%) 100%);
}

/* Onda dorada y chispas en el punto donde se dan la mano */
.bm__onda,
.bm__chispas,
.bm__mano {
  position: absolute;
  left: calc(var(--mx) * 100%);
  top: calc(var(--my) * 100%);
}
.bm__onda {
  width: 24cqw;
  height: 24cqw;
  margin: -12cqw 0 0 -12cqw;
  border-radius: 50%;
  border: 0.8cqw solid var(--bm-amarillo);
  opacity: 0;
  pointer-events: none;
}
.bm__chispas {
  width: 0;
  height: 0;
  pointer-events: none;
}
.bm__chispas i {
  position: absolute;
  left: -1cqw;
  top: -1cqw;
  width: 2cqw;
  height: 2cqw;
  opacity: 0;
  background: var(--bm-amarillo);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  transform: rotate(var(--a)) translateY(0) scale(0.4);
}
.bm__chispas i:nth-child(3n) {
  background: #fff;
}
/* Botón sobre las manos: invita a repetir el saludo */
.bm__mano {
  width: 12cqw;
  height: 12cqw;
  margin: -6cqw 0 0 -6cqw;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  background: rgba(4, 34, 66, 0.35);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 5.6cqw;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: transform 0.2s;
}
.bm__mano::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 2px solid rgba(248, 195, 58, 0.9);
  animation: bm-pulso 2s ease-out infinite;
}
.bm__mano:hover,
.bm__mano:focus-visible {
  transform: scale(1.1);
  background: rgba(4, 34, 66, 0.6);
}
.bm__mano:focus-visible {
  outline: 3px solid var(--bm-amarillo);
  outline-offset: 3px;
}
/* Sin JavaScript o con «reducir movimiento», el botón no aparece (no haría nada) */
.bm--vivo .bm__mano {
  opacity: 1;
  transition: opacity 0.4s 2.2s;
}

/* Velo azul para que el texto se lea: abajo en celular */
.bm__velo {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(4, 34, 66, 0) 0%, rgba(4, 34, 66, 0) 36%, rgba(4, 34, 66, 0.82) 55%, var(--bm-azul) 64%);
}

/* ---------- textos ---------- */
.bm__marco {
  position: relative;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding: 0 6cqw 7cqw;
  pointer-events: none;
}
.bm__cuerpo {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2.4cqw;
  pointer-events: auto;
}
.bm__logo {
  display: none;
}
.bm__antetitulo {
  font-size: 3.1cqw;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
}
.bm__titulo {
  font-size: 6.6cqw;
  font-weight: 700;
  line-height: 1.12;
  color: var(--bm-amarillo);
  text-wrap: balance;
}
.bm__cinta {
  align-self: stretch;
  margin: 0 -6cqw !important;
  padding: 0.3em 1em !important;
  background: var(--bm-amarillo);
  color: var(--bm-azul);
  font-size: 5cqw;
  line-height: 1.15;
}
.bm__cinta strong {
  font-weight: 800;
}
.bm__texto {
  font-size: 3.8cqw;
  line-height: 1.4;
  opacity: 0.95;
  text-wrap: balance;
}
.bm__botones {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2cqw;
  margin-top: 0.6cqw;
}
.bm .bm__boton:not(.bm__boton--principal) {
  display: none;
}
.bm .bm__boton,
.bm .bm__boton:hover,
.bm .bm__boton:focus,
.bm .bm__boton:visited {
  color: #fff;
  text-decoration: none;
}
.bm .bm__boton {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  padding: 0.85em 1.4em;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: 3.7cqw;
  font-weight: 700;
  line-height: 1;
  /* solo transform: las sombras y fondos se miden con el ancho del banner y animarlos cuesta (PageSpeed) */
  transition: transform 0.2s ease;
}
.bm .bm__boton--principal,
.bm .bm__boton--principal:hover,
.bm .bm__boton--principal:focus,
.bm .bm__boton--principal:visited {
  color: var(--bm-azul);
}
.bm .bm__boton--principal {
  border: 0;
  background: var(--bm-amarillo);
  font-weight: 800;
  box-shadow: 0 0.8cqw 2.4cqw -0.6cqw rgba(248, 195, 58, 0.65);
}
.bm .bm__boton--wa,
.bm .bm__boton--wa:hover,
.bm .bm__boton--wa:focus,
.bm .bm__boton--wa:visited {
  color: #05361d;
}
.bm .bm__boton--wa {
  border-color: #25d366;
  background: #25d366;
}
.bm .bm__boton:hover,
.bm .bm__boton:focus-visible {
  transform: translateY(-2px);
}
.bm .bm__boton--principal:hover svg {
  transform: translateX(3px);
}
.bm .bm__boton:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}
.bm__boton svg {
  width: 1.25em;
  height: 1.25em;
  fill: currentColor;
  flex: 0 0 auto;
  transition: transform 0.2s;
}

/* ---------- el apretón (lo enciende banners.js con .bm--anima, cada vez que aparece o se tocan las manos) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .bm--anima .bm__capa--base {
    animation: bm-base 1s step-end both;
  }
  .bm--anima .bm__capa--izq {
    animation: bm-llega-izq 1s cubic-bezier(0.25, 0.9, 0.3, 1.08) both;
  }
  .bm--anima .bm__capa--der {
    animation: bm-llega-der 1s cubic-bezier(0.25, 0.9, 0.3, 1.08) both;
  }
  .bm--anima .bm__foto {
    animation: bm-sacude 0.75s 1s ease-in-out both;
  }
  .bm--anima .bm__onda {
    animation: bm-onda 1.1s 1.1s ease-out both;
  }
  .bm--anima .bm__chispas i {
    animation: bm-chispa 0.9s calc(1.15s + var(--d)) cubic-bezier(0.2, 0.8, 0.3, 1) both;
  }
  .carrusel__diapositiva--activa .bm__anima {
    animation: ba-entra 0.8s cubic-bezier(0.2, 0.75, 0.2, 1) both;
    animation-delay: calc(0.5s + var(--i, 0) * 90ms);
  }
}
@media (prefers-reduced-motion: reduce) {
  .bm__mano::after {
    animation: none;
  }
}
@keyframes bm-base {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes bm-llega-izq {
  from {
    opacity: 0;
    transform: translate3d(-34%, 6%, 0) rotate(-4deg);
  }
  30% {
    opacity: 1;
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes bm-llega-der {
  from {
    opacity: 0;
    transform: translate3d(34%, -6%, 0) rotate(4deg);
  }
  30% {
    opacity: 1;
  }
  to {
    opacity: 1;
    transform: none;
  }
}
/* Arriba, abajo, arriba: como un apretón de manos (se suma al movimiento con el mouse) */
@keyframes bm-sacude {
  0%,
  100% {
    translate: 0 0;
  }
  20% {
    translate: 0 -2.2cqh;
  }
  45% {
    translate: 0 1.8cqh;
  }
  70% {
    translate: 0 -1cqh;
  }
  85% {
    translate: 0 0.5cqh;
  }
}
@keyframes bm-onda {
  from {
    opacity: 0.95;
    transform: scale(0.2);
  }
  to {
    opacity: 0;
    transform: scale(2.2);
  }
}
@keyframes bm-chispa {
  from {
    opacity: 1;
    transform: rotate(var(--a)) translateY(0) scale(0.4);
  }
  to {
    opacity: 0;
    transform: rotate(var(--a)) translateY(-16cqw) scale(1);
  }
}
@keyframes bm-pulso {
  from {
    transform: scale(1);
    opacity: 0.9;
  }
  to {
    transform: scale(1.7);
    opacity: 0;
  }
}

/* ---------- computador y pantallas horizontales ---------- */
@container bm (min-aspect-ratio: 1/1) {
  .bm__foto {
    inset: 0;
    height: auto;
    aspect-ratio: auto;
    left: 0;
  }
  .bm__velo {
    background: linear-gradient(90deg, rgba(4, 34, 66, 0.96) 0%, rgba(4, 34, 66, 0.86) 26%, rgba(4, 34, 66, 0.35) 46%, rgba(4, 34, 66, 0) 60%);
  }
  .bm__onda {
    width: 12cqw;
    height: 12cqw;
    margin: -6cqw 0 0 -6cqw;
    border-width: 0.35cqw;
  }
  .bm__chispas i {
    width: 1cqw;
    height: 1cqw;
    left: -0.5cqw;
    top: -0.5cqw;
  }
  .bm__mano {
    width: 4.6cqw;
    height: 4.6cqw;
    margin: -2.3cqw 0 0 -2.3cqw;
    font-size: 2.1cqw;
  }
  .bm__marco {
    align-items: center;
    padding: 0 6cqw;
  }
  .bm__cuerpo {
    width: 46cqw;
    align-items: flex-start;
    text-align: left;
    gap: 1.8cqh;
  }
  .bm__logo {
    display: block;
    width: 8.5cqw;
    height: auto;
    margin-bottom: 1cqh;
  }
  .bm__antetitulo {
    font-size: 1.05cqw;
  }
  .bm__titulo {
    font-size: 2.9cqw;
  }
  .bm__cinta {
    align-self: flex-start;
    margin: 0 0 0 -6cqw !important;
    padding: 0.28em 1.3em 0.28em 6cqw !important;
    border-radius: 0 999px 999px 0;
    font-size: 2.5cqw;
  }
  .bm__texto {
    font-size: 1.5cqw;
  }
  .bm__botones {
    justify-content: flex-start;
    gap: 0.9cqw;
  }
  .bm .bm__boton:not(.bm__boton--principal) {
    display: inline-flex;
  }
  .bm .bm__boton {
    font-size: clamp(12px, 1.08cqw, 17px);
  }
}

/* Diapositivas que no se ven: sus animaciones se pausan (menos trabajo del navegador y menos TBT en PageSpeed). */
.carrusel__diapositiva:not(.carrusel__diapositiva--activa) :is(.bz, .ba, .bm, .bp, .bd),
.carrusel__diapositiva:not(.carrusel__diapositiva--activa) :is(.bz, .ba, .bm, .bp, .bd) *,
.carrusel__diapositiva:not(.carrusel__diapositiva--activa) :is(.bz, .ba, .bm, .bp, .bd) *::before,
.carrusel__diapositiva:not(.carrusel__diapositiva--activa) :is(.bz, .ba, .bm, .bp, .bd) *::after {
  animation-play-state: paused !important;
}

/* =====================================================================================================================
 * Diseño «perfil» (.bp, el notario): foto recortada con su triángulo dorado, un eco del triángulo que se dibuja,
 * insignias que flotan y se mueven con el mouse a distintas profundidades, el nombre en tres partes y cifras que
 * cuentan solas (banners.js). Primero para celular: la foto arriba y el texto debajo; en computador, como /notario/.
 * Todas las animaciones son de transform u opacidad (compuestas).
 * ===================================================================================================================== */

.bp {
  --bp-amarillo: #ffcc3e;
  --bp-noche: #0d1a2e;
  --bp-azul: #004568;
  --px: 0;
  --py: 0;
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  overflow: hidden;
  container: bp / size;
  color: #fff;
  font-family: inherit;
  text-align: center;
  background:
    radial-gradient(70% 60% at 85% 20%, rgba(0, 140, 175, 0.45) 0%, transparent 62%),
    linear-gradient(165deg, #0a4d6e 0%, #073a58 45%, #121a33 100%);
}
.bp *,
.bp *::before,
.bp *::after {
  box-sizing: border-box;
}
.bp p,
.bp ul {
  margin: 0;
  padding: 0;
}
.bp :where(span, b, li, strong, em) {
  font-size: inherit;
}

/* ---------- fondo ---------- */
.bp__fondo {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.bp__orbe {
  position: absolute;
  border-radius: 50%;
  animation: bz-flota 19s ease-in-out infinite alternate;
}
.bp__orbe--1 {
  width: 70cqw;
  height: 70cqw;
  top: -30cqw;
  right: -25cqw;
  background: radial-gradient(circle, rgba(0, 190, 220, 0.28) 0%, transparent 66%);
}
.bp__orbe--2 {
  width: 50cqw;
  height: 50cqw;
  bottom: -28cqw;
  left: -14cqw;
  background: radial-gradient(circle, rgba(255, 204, 62, 0.14) 0%, transparent 66%);
  animation-direction: alternate-reverse;
}
/* Rayas diagonales como las del 17 */
.bp__rayas {
  position: absolute;
  right: -10cqw;
  bottom: -10cqw;
  width: 60cqw;
  height: 60cqw;
  background: repeating-linear-gradient(-55deg, rgba(255, 255, 255, 0.06) 0 0.6cqw, transparent 0.6cqw 2.4cqw);
  -webkit-mask-image: radial-gradient(circle at 70% 70%, #000 0%, transparent 65%);
  mask-image: radial-gradient(circle at 70% 70%, #000 0%, transparent 65%);
}

/* ---------- distribución en celular (por defecto): foto arriba, texto debajo ---------- */
.bp__marco {
  height: 100%;
  display: grid;
  grid-template-areas:
    'retrato'
    'cuerpo';
  grid-template-rows: auto auto;
  align-content: center;
  justify-items: center;
  row-gap: 3cqw;
  padding: 5cqw 6cqw 6cqw;
}

/* ---------- la foto ---------- */
.bp__retrato {
  grid-area: retrato;
  position: relative;
  width: 44cqw;
  aspect-ratio: 1128 / 1280;
  perspective: 900px;
}
.carrusel .bp .bp__foto {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 3cqw 4cqw rgba(0, 0, 0, 0.35));
  translate: calc(var(--px) * 1.5cqw) calc(var(--py) * 1.5cqw);
  rotate: y calc(var(--px) * 8deg);
  transition:
    translate 0.6s cubic-bezier(0.2, 0.8, 0.2, 1),
    rotate 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  user-select: none;
}
/* Eco del triángulo: una línea que se dibuja detrás y se mueve al revés que la foto */
.bp__eco {
  position: absolute;
  inset: -6% -10% -6% -4%;
  width: 114%;
  height: 112%;
  overflow: visible;
  translate: calc(var(--px) * -2.5cqw) calc(var(--py) * -2cqw);
  transition: translate 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.bp__eco path {
  fill: none;
  stroke: rgba(255, 204, 62, 0.45);
  stroke-width: 0.7;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}
/* Destello que cruza la foto */
.bp__brillo {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(#000, #000);
}
.bp__brillo::after {
  content: '';
  position: absolute;
  inset: -20% -60%;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 240, 200, 0.35) 50%, transparent 58%);
  transform: translateX(-80%);
}

/* ---------- insignias ---------- */
.bp .bp__insignia,
.bp .bp__insignia:hover,
.bp .bp__insignia:visited {
  color: var(--bp-noche);
  text-decoration: none;
}
.bp__insignia {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.55em 0.8em;
  border-radius: 0.9em;
  background: #fff;
  box-shadow: 0 1.2cqw 3cqw -0.6cqw rgba(0, 10, 30, 0.45);
  font-size: 2.6cqw;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  white-space: nowrap;
  translate: calc(var(--px) * (var(--n) + 2) * -1.1cqw) calc(var(--py) * (var(--n) + 2) * -0.9cqw);
  transition:
    translate 0.6s cubic-bezier(0.2, 0.8, 0.2, 1),
    scale 0.2s ease;
}
a.bp__insignia:hover,
a.bp__insignia:focus-visible {
  scale: 1.06;
}
a.bp__insignia:focus-visible {
  outline: 3px solid var(--bp-amarillo);
  outline-offset: 3px;
}
.bp__insignia b {
  display: block;
  font-size: 1.15em;
  font-weight: 800;
  color: var(--bp-azul);
}
.bp__ic {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2.3em;
  height: 2.3em;
  border-radius: 0.7em;
  background: var(--bp-amarillo);
  color: var(--bp-noche);
}
.bp__ic svg {
  width: 55%;
  height: 55%;
}
.bp__insignia--1 {
  left: -36%;
  top: 6%;
}
.bp__insignia--2 {
  right: -44%;
  top: 44%;
}
.bp__insignia--3 {
  left: -40%;
  bottom: 8%;
}

/* ---------- textos ---------- */
.bp__cuerpo {
  grid-area: cuerpo;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.4cqw;
  min-width: 0;
  width: 100%;
}
.bp__antetitulo {
  display: inline-block;
  padding: 0.45em 0.9em;
  border-radius: 0.5em;
  background: var(--bp-amarillo);
  color: var(--bp-noche);
  font-size: 2.6cqw;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.bp__nombre {
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.bp__nombre span {
  display: block;
}
.bp__trat {
  font-size: 4.2cqw;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  opacity: 0.9;
  margin-bottom: 0.25em;
}
.bp__nom,
.bp__ape {
  font-size: 8.4cqw;
}
.bp__ape {
  position: relative;
  color: var(--bp-amarillo);
}
/* subrayado que se dibuja bajo los apellidos */
.bp__ape::after {
  content: '';
  position: absolute;
  left: 20%;
  right: 20%;
  bottom: -0.12em;
  height: 0.08em;
  border-radius: 1em;
  background: var(--bp-amarillo);
  transform-origin: left center;
  transform: scaleX(0.001);
}
.bp__cargo,
.bp__texto {
  display: none;
}
.bp__texto p + p {
  margin-top: 0.5em;
}

/* ---------- cifras ---------- */
.bp__cifras {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.8cqw;
  width: 100%;
}
.bp__cifras li {
  display: flex;
  flex-direction: column;
  gap: 0.4em;
  padding: 1.6cqw 1.2cqw;
  border-radius: 2.4cqw;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 2.5cqw;
  line-height: 1.2;
  text-align: center;
}
.bp__cifras b {
  font-size: 2.6em;
  font-weight: 900;
  line-height: 1;
  color: var(--bp-amarillo);
  font-variant-numeric: tabular-nums;
}

/* ---------- botones ---------- */
.bp__botones {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2cqw;
}
.bp .bp__boton:not(.bp__boton--principal) {
  display: none;
}
.bp .bp__boton,
.bp .bp__boton:hover,
.bp .bp__boton:focus,
.bp .bp__boton:visited {
  color: #fff;
  text-decoration: none;
}
.bp .bp__boton {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  padding: 0.85em 1.4em;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  background: transparent;
  font-size: 3.7cqw;
  font-weight: 800;
  line-height: 1;
  transition: transform 0.2s ease;
}
.bp .bp__boton--principal,
.bp .bp__boton--principal:hover,
.bp .bp__boton--principal:focus,
.bp .bp__boton--principal:visited {
  color: var(--bp-noche);
}
.bp .bp__boton--principal {
  border-color: var(--bp-amarillo);
  background: var(--bp-amarillo);
  box-shadow: 0 0.8cqw 2.4cqw -0.6cqw rgba(255, 204, 62, 0.6);
}
.bp .bp__boton:hover,
.bp .bp__boton:focus-visible {
  transform: translateY(-2px);
}
.bp .bp__boton:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}
.bp__boton svg {
  width: 1.2em;
  height: 1.2em;
  flex: 0 0 auto;
}

/* ---------- movimiento (transform y opacidad) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .bp__insignia {
    animation: bp-flota 5s calc(var(--n) * -1.6s) ease-in-out infinite;
  }
  .carrusel__diapositiva--activa .bp__anima {
    animation: ba-entra 0.8s cubic-bezier(0.2, 0.75, 0.2, 1) both;
    animation-delay: calc(var(--i, 0) * 90ms);
  }
  .carrusel__diapositiva--activa .bp__foto {
    animation: bp-retrato 1s cubic-bezier(0.2, 0.9, 0.25, 1.1) backwards;
  }
  .carrusel__diapositiva--activa .bp__eco path {
    animation: bp-traza 1.6s 0.3s cubic-bezier(0.4, 0, 0.2, 1) backwards;
  }
  .carrusel__diapositiva--activa .bp__ape::after {
    animation: bp-subraya 0.9s 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  }
  .carrusel__diapositiva--activa .bp__brillo::after {
    animation: bp-destello 6s 1.2s ease-in-out infinite;
  }
}
@media (prefers-reduced-motion: reduce) {
  .bp__ape::after {
    transform: none;
  }
}
@keyframes bp-flota {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-1.4cqw);
  }
}
@keyframes bp-retrato {
  from {
    transform: scale(0.88) translateY(3cqw);
  }
  to {
    transform: none;
  }
}
@keyframes bp-traza {
  from {
    stroke-dashoffset: 1;
  }
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes bp-subraya {
  to {
    transform: scaleX(1);
  }
}
@keyframes bp-destello {
  0%,
  70% {
    transform: translateX(-80%);
  }
  90%,
  100% {
    transform: translateX(80%);
  }
}

/* ---------- computador y pantallas horizontales: el texto a la izquierda y la foto a la derecha ---------- */
@container bp (min-aspect-ratio: 1/1) {
  .bp__marco {
    grid-template-areas: 'cuerpo retrato';
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    grid-template-rows: 100%;
    align-items: center;
    justify-items: stretch;
    column-gap: 3cqw;
    padding: 4cqh 6cqw 4cqh 7cqw;
  }
  .bp__retrato {
    justify-self: center;
    width: auto;
    height: 84cqh;
  }
  .bp__insignia {
    font-size: 1cqw;
  }
  .bp__insignia--1 {
    left: -18%;
    top: 4%;
  }
  .bp__insignia--2 {
    right: -3%;
    top: 52%;
  }
  .bp__insignia--3 {
    left: -24%;
    bottom: 14%;
  }
  .bp__cuerpo {
    align-items: flex-start;
    text-align: left;
    gap: 1.7cqh;
  }
  .bp__antetitulo {
    font-size: 1cqw;
  }
  .bp__trat {
    font-size: 2.2cqw;
  }
  .bp__nom,
  .bp__ape {
    font-size: 5.3cqw;
  }
  .bp__ape::after {
    left: 0;
    right: 30%;
  }
  .bp__cargo {
    display: block;
    font-size: 1.5cqw;
    font-weight: 800;
  }
  .bp__texto {
    display: block;
    max-width: 46cqw;
    font-size: 1.18cqw;
    line-height: 1.55;
    opacity: 0.9;
  }
  .bp__botones {
    justify-content: flex-start;
    gap: 1cqw;
  }
  .bp .bp__boton:not(.bp__boton--principal) {
    display: inline-flex;
  }
  .bp .bp__boton {
    font-size: clamp(12px, 1.15cqw, 18px);
  }
  .bp__cifras {
    gap: 0.9cqw;
    max-width: 46cqw;
  }
  .bp__cifras li {
    align-items: flex-start;
    padding: 1.1cqw 1.1cqw 1.2cqw;
    border-radius: 1cqw;
    font-size: 0.92cqw;
    text-align: left;
  }
}

/* =====================================================================================================================
 * Fichas de Servicios Especiales (flip boxes de Elementor de la portada): banners.js les pone la clase .ficha-viva y
 * una animación propia sobre la foto, que solo corre mientras la ficha se ve en pantalla (.td--visible):
 * - Domicilio: ruta de la Notaría (pin con el 17) a una casa, con un punto que la recorre y la casa que late;
 * - Consultorio Jurídico: una pregunta y su respuesta en burbujas;
 * - Apostillas: un sello que cae sobre el documento y un avión de papel que cruza;
 * - Escrituración: una firma que se escribe sobre la hoja.
 * Además, cada ficha se inclina en 3D hacia el mouse con un reflejo. Al pasar el mouse o tocarla, sigue girando.
 * ===================================================================================================================== */

.ficha-viva {
  --tx: 0;
  --ty: 0;
  transform: perspective(900px) rotateX(calc(var(--ty) * -7deg)) rotateY(calc(var(--tx) * 9deg));
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.ficha-viva.td--mano {
  transition-duration: 0.12s;
}
.ficha-viva .elementor-flip-box__front .elementor-flip-box__image {
  position: relative;
}
.ficha-viva .elementor-flip-box__front .elementor-flip-box__image img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 30%;
}
/* Degradado para que las animaciones se lean sobre la foto */
.ficha-viva .elementor-flip-box__front .elementor-flip-box__image::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  border-radius: 0 0 15px 15px;
  background: linear-gradient(180deg, transparent 0%, rgba(13, 26, 46, 0.75) 100%);
  pointer-events: none;
}
.tf {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 6%;
  z-index: 2;
  height: 24%;
  pointer-events: none;
  color: #0d1a2e;
  font-family: Montserrat, sans-serif;
}
.td__reflejo {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: 15px;
  pointer-events: none;
  background: radial-gradient(circle at calc(50% + var(--tx) * 90%) calc(30% + var(--ty) * 90%), rgba(255, 255, 255, 0.28) 0%, transparent 45%);
  opacity: 0;
  transition: opacity 0.3s;
}
.td--mano .td__reflejo {
  opacity: 1;
}

/* ---------- Domicilio: la ruta ---------- */
.td__ruta svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.td__camino {
  fill: none;
  stroke: rgba(255, 255, 255, 0.85);
  stroke-width: 2;
  stroke-dasharray: 2 6;
  stroke-linecap: round;
}
.td__punto {
  position: absolute;
  left: 0;
  top: 0;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: #ffcc3e;
  box-shadow: 0 0 0 4px rgba(255, 204, 62, 0.3);
  offset-path: path('M14 30 C 60 -4, 130 52, 186 14');
  offset-distance: 0%;
  offset-rotate: 0deg;
  opacity: 0;
}
.td__pin,
.td__casa {
  position: absolute;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff;
  color: #004568;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
.td__pin {
  left: -4px;
  bottom: 0;
}
.td__casa {
  right: -4px;
  top: -10px;
  background: #ffcc3e;
  color: #0d1a2e;
}
.td__casa svg {
  width: 17px;
  height: 17px;
}

/* ---------- Consultorio Jurídico: pregunta y respuesta ---------- */
.tf__burbuja {
  position: absolute;
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 34px;
  padding: 0 10px;
  border-radius: 18px;
  background: #fff;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  transform: scale(0);
}
.tf__burbuja--pregunta {
  left: 0;
  top: 0;
  border-bottom-left-radius: 4px;
  transform-origin: 0 100%;
}
.tf__burbuja--respuesta {
  right: 0;
  bottom: 0;
  background: #ffcc3e;
  border-bottom-right-radius: 4px;
  transform-origin: 100% 100%;
}
.tf__burbuja svg {
  width: 18px;
  height: 18px;
}

/* ---------- Apostillas: el sello y el avión ---------- */
.tf__hoja {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 46px;
  height: 56px;
  margin-left: -23px;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}
.tf__hoja::before {
  content: '';
  position: absolute;
  left: 9px;
  right: 9px;
  top: 10px;
  height: 18px;
  background: repeating-linear-gradient(180deg, #c9d3db 0 2px, transparent 2px 6px);
}
.tf__sello {
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 30px;
  height: 30px;
  margin-left: -4px;
  border-radius: 50%;
  border: 3px solid #d9262e;
  color: #d9262e;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 900;
  transform: rotate(-14deg);
  opacity: 0;
}
.tf__onda {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 60px;
  height: 60px;
  margin: 0 0 -6px -19px;
  border-radius: 50%;
  border: 2px solid #ffcc3e;
  opacity: 0;
}
.tf__avion {
  position: absolute;
  left: 0;
  top: -6px;
  width: 26px;
  height: 26px;
  opacity: 0;
}

/* ---------- Escrituración: la firma ---------- */
.tf__papel {
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: 0;
  height: 64%;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.tf__papel svg {
  position: absolute;
  left: 10%;
  right: 22%;
  top: 14%;
  width: 68%;
  height: 56%;
  overflow: visible;
  clip-path: inset(0 100% 0 0);
}
.tf__papel path {
  fill: none;
  stroke: #004568;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tf__papel::after {
  content: '';
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 18%;
  height: 1.5px;
  background: #c9d3db;
}
.tf__pluma {
  position: absolute;
  left: 10%;
  top: 0;
  width: 22px;
  height: 22px;
  color: #0d1a2e;
  opacity: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .td--visible .td__punto {
    animation: td-viaja 4s 0.6s cubic-bezier(0.45, 0, 0.3, 1) infinite;
  }
  .td--visible .td__casa {
    animation: td-llega 4s 0.6s ease-out infinite;
  }
  .td--visible .tf__burbuja--pregunta {
    animation: tf-pregunta 4.5s 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.3) infinite;
  }
  .td--visible .tf__burbuja--respuesta {
    animation: tf-respuesta 4.5s 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.3) infinite;
  }
  .td--visible .tf__sello {
    animation: tf-sella 4.5s 0.4s cubic-bezier(0.5, 0, 0.7, 0.3) infinite;
  }
  .td--visible .tf__onda {
    animation: tf-onda 4.5s 0.4s ease-out infinite;
  }
  .td--visible .tf__avion {
    animation: tf-vuela 4.5s 0.4s ease-in-out infinite;
  }
  .td--visible .tf__papel svg {
    animation: tf-firma 4.5s 0.4s ease-in-out infinite;
  }
  .td--visible .tf__pluma {
    animation: tf-pluma 4.5s 0.4s ease-in-out infinite;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tf__burbuja,
  .tf__sello {
    transform: none;
    opacity: 1;
  }
  .tf__papel svg {
    clip-path: none;
  }
}
@keyframes td-viaja {
  0% {
    offset-distance: 0%;
    opacity: 0;
  }
  8% {
    opacity: 1;
  }
  72% {
    offset-distance: 100%;
    opacity: 1;
  }
  80%,
  100% {
    offset-distance: 100%;
    opacity: 0;
  }
}
@keyframes td-llega {
  0%,
  70% {
    transform: scale(1);
  }
  78% {
    transform: scale(1.25);
  }
  90%,
  100% {
    transform: scale(1);
  }
}
@keyframes tf-pregunta {
  0% {
    transform: scale(0);
  }
  12%,
  85% {
    transform: scale(1);
  }
  95%,
  100% {
    transform: scale(0);
  }
}
@keyframes tf-respuesta {
  0%,
  35% {
    transform: scale(0);
  }
  47%,
  85% {
    transform: scale(1);
  }
  95%,
  100% {
    transform: scale(0);
  }
}
@keyframes tf-sella {
  0%,
  20% {
    opacity: 0;
    transform: translateY(-46px) rotate(-14deg) scale(1.5);
  }
  30% {
    opacity: 1;
  }
  42% {
    transform: translateY(0) rotate(-14deg) scale(1);
  }
  46% {
    transform: translateY(0) rotate(-14deg) scale(0.92);
  }
  50%,
  85% {
    opacity: 1;
    transform: translateY(0) rotate(-14deg) scale(1);
  }
  95%,
  100% {
    opacity: 0;
    transform: translateY(0) rotate(-14deg) scale(1);
  }
}
@keyframes tf-onda {
  0%,
  42% {
    opacity: 0;
    transform: scale(0.4);
  }
  46% {
    opacity: 0.9;
  }
  70%,
  100% {
    opacity: 0;
    transform: scale(1.6);
  }
}
@keyframes tf-vuela {
  0%,
  55% {
    opacity: 0;
    transform: translate(0, 10px) rotate(-8deg);
  }
  62% {
    opacity: 1;
  }
  88% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(var(--ancho, 200px) - 26px), -14px) rotate(4deg);
  }
}
@keyframes tf-firma {
  0%,
  10% {
    clip-path: inset(0 100% 0 0);
  }
  55%,
  88% {
    clip-path: inset(0 0 0 0);
  }
  100% {
    clip-path: inset(0 0 0 0);
    opacity: 0;
  }
}
@keyframes tf-pluma {
  0%,
  8% {
    opacity: 0;
    transform: translate(0, 18px);
  }
  12% {
    opacity: 1;
  }
  55% {
    opacity: 1;
    transform: translate(calc(var(--ancho, 160px) * 0.62), 10px);
  }
  62%,
  100% {
    opacity: 0;
    transform: translate(calc(var(--ancho, 160px) * 0.62), 10px);
  }
}

/* =====================================================================================================================
 * Diseño «dato» (.bd, registro civil): la pregunta con dos botones; al responder se revela la respuesta con un check y
 * el enlace, y salen corazones (banners.js). La foto va en un círculo con corazones que suben. Primero para celular: la
 * foto arriba con el borde curvo; en computador, el texto a la izquierda y el círculo a la derecha.
 * ===================================================================================================================== */

.bd {
  --bd-amarillo: #ffcc3e;
  --bd-azul: #004568;
  --px: 0;
  --py: 0;
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  overflow: hidden;
  container: bd / size;
  color: #fff;
  font-family: inherit;
  text-align: center;
  background:
    radial-gradient(60% 70% at 10% 90%, rgba(0, 120, 160, 0.5) 0%, transparent 65%),
    linear-gradient(160deg, #0a5373 0%, #004568 50%, #0d2a44 100%);
}
.bd *,
.bd *::before,
.bd *::after {
  box-sizing: border-box;
}
.bd p {
  margin: 0;
  padding: 0;
}
.bd :where(span, strong, em, button, a) {
  font-size: inherit;
}
.bd__fondo {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.bd__orbe {
  position: absolute;
  width: 70cqw;
  height: 70cqw;
  left: -30cqw;
  top: -20cqw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 190, 220, 0.22) 0%, transparent 66%);
  animation: bz-flota 20s ease-in-out infinite alternate;
}

/* ---------- celular (por defecto): la foto arriba ---------- */
.bd__marco {
  height: 100%;
  display: grid;
  grid-template-rows: 42% 1fr;
}
.bd__circulo {
  position: relative;
  overflow: hidden;
  border-radius: 0 0 50% 50% / 0 0 18% 18%;
}
.carrusel .bd .bd__foto {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
  transform: scale(1.05) translate3d(calc(var(--px) * -1.4cqw), calc(var(--py) * -1.2cqw), 0);
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
/* Corazones que suben sobre la foto */
.bd__corazones i {
  position: absolute;
  bottom: -8%;
  left: calc(14% + var(--n) * 14%);
  width: 4.2cqw;
  height: 4.2cqw;
  background: #fff;
  opacity: 0;
  clip-path: path('M12 21s-7.5-4.6-9.6-9.2C.9 8.4 3 4.5 6.7 4.5c2.2 0 3.6 1.2 5.3 3.1 1.7-1.9 3.1-3.1 5.3-3.1 3.7 0 5.8 3.9 4.3 7.3C19.5 16.4 12 21 12 21z');
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7.5-4.6-9.6-9.2C.9 8.4 3 4.5 6.7 4.5c2.2 0 3.6 1.2 5.3 3.1 1.7-1.9 3.1-3.1 5.3-3.1 3.7 0 5.8 3.9 4.3 7.3C19.5 16.4 12 21 12 21z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7.5-4.6-9.6-9.2C.9 8.4 3 4.5 6.7 4.5c2.2 0 3.6 1.2 5.3 3.1 1.7-1.9 3.1-3.1 5.3-3.1 3.7 0 5.8 3.9 4.3 7.3C19.5 16.4 12 21 12 21z'/%3E%3C/svg%3E") center / contain no-repeat;
  clip-path: none;
}
.bd__corazones i:nth-child(2n) {
  background: var(--bd-amarillo);
}
.bd__corazones i:nth-child(3n) {
  width: 3cqw;
  height: 3cqw;
}

.bd__cuerpo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3cqw;
  padding: 3cqw 6cqw 5cqw;
  min-width: 0;
}
.bd__antetitulo {
  font-size: 3cqw;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bd-amarillo);
}
.bd__pregunta {
  font-size: 6.4cqw;
  line-height: 1.15;
  font-weight: 400;
  text-wrap: balance;
}
.bd__pregunta strong {
  font-weight: 800;
}
.bd__juego {
  min-height: 12cqw;
  display: grid;
  place-items: center;
}
.bd__botones {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.4cqw;
}
.bd__botones[hidden],
.bd__respuesta[hidden] {
  display: none;
}
.bd .bd__boton {
  padding: 0.8em 1.3em;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 3.8cqw;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.bd .bd__boton--no {
  border-color: var(--bd-amarillo);
  background: var(--bd-amarillo);
  color: #0d1a2e;
}
.bd .bd__boton:hover,
.bd .bd__boton:focus-visible {
  transform: translateY(-2px) scale(1.03);
}
.bd .bd__boton:focus-visible,
.bd .bd__enlace:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}
.bd__respuesta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.4cqw;
}
.bd__respuesta-texto {
  display: flex;
  align-items: center;
  gap: 0.6em;
  font-size: 4.2cqw;
  font-weight: 700;
  text-align: left;
}
.bd__check {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2em;
  height: 2em;
  border-radius: 50%;
  background: #3ddc97;
  color: #05361d;
}
.bd__check svg {
  width: 62%;
  height: 62%;
}
.bd .bd__enlace,
.bd .bd__enlace:hover,
.bd .bd__enlace:visited {
  color: #0d1a2e;
  text-decoration: none;
}
.bd .bd__enlace {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.8em 1.3em;
  border-radius: 999px;
  background: var(--bd-amarillo);
  font-size: 3.6cqw;
  font-weight: 800;
  line-height: 1;
  transition: transform 0.2s ease;
}
.bd .bd__enlace:hover {
  transform: translateY(-2px);
}
.bd__enlace svg {
  width: 1.2em;
  height: 1.2em;
  fill: currentColor;
}
/* Franja «Leales a ti, esenciales para tu futuro» con el avión, como en el banner de siempre */
.bd__destacado {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 -6cqw !important;
}
.bd__cinta {
  position: relative;
  display: inline-block;
  padding: 0.25em 1em;
  background: #fff;
  color: var(--bd-azul);
  line-height: 1.15;
}
.bd__cinta:first-child {
  font-size: 5cqw;
  font-weight: 800;
  border-radius: 0.4em 0.4em 0 0;
}
.bd__cinta--suave {
  font-size: 3.8cqw;
  padding-right: 2.6em;
}
.bd__cinta .bz__avion {
  right: 0.2em;
  width: 1.9em;
  height: 1.9em;
  margin-top: -0.95em;
}
/* Ya respondida: la respuesta aparece con un salto */
.bd--respondido .bd__respuesta {
  animation: bd-revela 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.3) both;
}

@media (prefers-reduced-motion: no-preference) {
  .carrusel__diapositiva--activa .bd__corazones i {
    animation: bd-sube 5s calc(var(--n) * 0.8s) ease-out infinite;
  }
  .carrusel__diapositiva--activa .bd__anima {
    animation: ba-entra 0.8s cubic-bezier(0.2, 0.75, 0.2, 1) both;
    animation-delay: calc(var(--i, 0) * 90ms);
  }
  .carrusel__diapositiva--activa .bd__foto {
    animation: bd-zoom 9s ease-out both;
  }
}
@keyframes bd-sube {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.6);
  }
  15% {
    opacity: 0.95;
  }
  100% {
    opacity: 0;
    transform: translateY(-22cqh) scale(1.1) rotate(12deg);
  }
}
@keyframes bd-zoom {
  from {
    scale: 1.12;
  }
  to {
    scale: 1;
  }
}
@keyframes bd-revela {
  from {
    opacity: 0;
    transform: scale(0.7);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- computador: el texto a la izquierda, la foto en un círculo grande a la derecha ---------- */
@container bd (min-aspect-ratio: 1/1) {
  .bd {
    text-align: left;
  }
  .bd__marco {
    grid-template-rows: 100%;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    grid-template-areas: 'cuerpo circulo';
  }
  .bd__circulo {
    grid-area: circulo;
    align-self: center;
    justify-self: end;
    width: 112cqh;
    height: 112cqh;
    margin-right: -14cqh;
    border-radius: 50%;
    box-shadow: 0 0 0 1cqw rgba(255, 255, 255, 0.08), -2cqw 2cqw 6cqw rgba(0, 0, 0, 0.35);
  }
  .bd__corazones i {
    width: 2cqw;
    height: 2cqw;
    left: calc(16% + var(--n) * 10%);
  }
  .bd__corazones i:nth-child(3n) {
    width: 1.4cqw;
    height: 1.4cqw;
  }
  .bd__cuerpo {
    grid-area: cuerpo;
    align-items: flex-start;
    text-align: left;
    gap: 2.4cqh;
    padding: 0 3cqw 0 6cqw;
  }
  .bd__antetitulo {
    font-size: 1.05cqw;
  }
  .bd__pregunta {
    font-size: 3.5cqw;
    line-height: 1.12;
  }
  .bd__juego {
    min-height: 5cqw;
    place-items: start;
  }
  .bd__botones {
    justify-content: flex-start;
    gap: 1cqw;
  }
  .bd .bd__boton {
    font-size: clamp(13px, 1.25cqw, 19px);
  }
  .bd__respuesta {
    align-items: flex-start;
    gap: 1.6cqh;
  }
  .bd__respuesta-texto {
    font-size: 1.6cqw;
  }
  .bd .bd__enlace {
    font-size: clamp(13px, 1.15cqw, 18px);
  }
  .bd__destacado {
    align-items: flex-start;
    margin: 1cqh 0 0 -6cqw !important;
  }
  .bd__cinta {
    padding-left: 6cqw;
  }
  .bd__cinta:first-child {
    font-size: 2.6cqw;
    border-radius: 0 0.4em 0 0;
    padding-right: 1.6em;
  }
  .bd__cinta--suave {
    font-size: 2cqw;
    padding-right: 3em;
  }
}
