/* Rediseño comercial Aynifree 2026 — capas visuales sobre la base existente */

.af-hero--visual {
  position: relative;
  padding: 6.5rem 0 2.75rem;
  overflow: hidden;
  color: #10146E;
  background:
    radial-gradient(ellipse 70% 60% at 85% 20%, rgba(57, 235, 199, 0.22), transparent 55%),
    radial-gradient(ellipse 50% 50% at 10% 80%, rgba(42, 125, 255, 0.14), transparent 50%),
    linear-gradient(180deg, #eef7ff 0%, #f7fbff 55%, #ffffff 100%);
}

/* Hero full-bleed con foto (Estrella CPA y páginas de producto) */
.af-hero--visual:has(.af-hero-photo) {
  display: grid;
  align-items: end;
  padding: 0;
  min-height: 58vh;
  color: #fff;
  background: #0b1f4a;
}

.af-hero--visual .af-hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

.af-hero--visual .af-hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(11, 31, 74, 0.35) 0%, rgba(11, 31, 74, 0.55) 40%, rgba(11, 31, 74, 0.88) 100%),
    linear-gradient(90deg, rgba(16, 20, 110, 0.5), transparent 70%);
}

.af-hero--visual:has(.af-hero-photo) .af-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 40rem;
  padding: 5.5rem 0 3rem;
}

.af-hero--visual:has(.af-hero-photo) .af-display {
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.25);
}

.af-hero--visual:has(.af-hero-photo) .af-hero-lead {
  color: rgba(255, 255, 255, 0.92);
}

.af-hero--visual:has(.af-hero-photo) .af-btn-outline {
  border-color: rgba(255, 255, 255, 0.8);
  color: #fff;
  background: transparent;
}

.af-hero--visual:has(.af-hero-photo) .af-btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.af-hero--visual:has(.af-hero-photo) .af-btn-primary {
  background: #53F235;
  color: #0b1f4a;
}

.af-hero--visual:has(.af-hero-photo) .af-btn-primary:hover {
  filter: brightness(1.05);
  background: #53F235;
  color: #0b1f4a;
}

.af-hero--visual .af-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 2rem 2.5rem;
  align-items: center;
}

.af-hero--visual .af-hero-copy {
  max-width: 36rem;
}

.af-hero--visual .af-hero-kicker {
  display: inline-block;
  margin: 0 0 0.75rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0f766e;
  background: rgba(57, 235, 199, 0.22);
}

.af-hero--visual .af-display {
  color: #10146E;
  font-size: clamp(2rem, 4.6vw, 3.15rem);
  line-height: 1.08;
  margin: 0 0 0.9rem;
  text-shadow: none;
}

.af-hero--visual .af-hero-lead {
  color: #475569;
  font-size: 1.08rem;
  line-height: 1.55;
  max-width: 34rem;
  margin: 0 0 1.35rem;
}

.af-hero--visual .af-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.af-hero--visual .af-btn-primary {
  background: #10146E;
  color: #fff;
  border: none;
}

.af-hero--visual .af-btn-primary:hover {
  background: #2A7DFF;
  color: #fff;
}

.af-hero--visual .af-btn-outline {
  border: 1.5px solid #10146E;
  color: #10146E;
  background: #fff;
}

.af-hero--visual .af-btn-outline:hover {
  background: rgba(16, 20, 110, 0.06);
  color: #10146E;
}

.af-hero--visual .af-hero-visual {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(16, 20, 110, 0.08);
  box-shadow: 0 18px 48px rgba(16, 20, 110, 0.1);
}

.af-hero--visual .af-hero-visual img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center;
}

.af-pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: -2.5rem;
  position: relative;
  z-index: 2;
}

.af-pillar {
  background: #fff;
  border-radius: 16px;
  padding: 1.25rem 1.2rem;
  box-shadow: 0 14px 36px rgba(16, 20, 110, 0.1);
  border: 1px solid rgba(16, 20, 110, 0.08);
}

.af-pillar h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  color: #10146E;
}

.af-pillar p {
  margin: 0;
  font-size: 0.92rem;
  color: #64748b;
  line-height: 1.45;
}

.af-pillar-ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 0.75rem;
  color: #fff;
  background: linear-gradient(135deg, #2A7DFF, #5D3CFF);
}

.af-visual-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: #0b1f4a;
  color: #fff;
  text-decoration: none;
  min-height: 280px;
  box-shadow: 0 16px 40px rgba(16, 20, 110, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  width: 100%;
  padding: 0;
  border: 0;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.af-visual-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 48px rgba(16, 20, 110, 0.16);
  color: #fff;
}

.af-visual-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  transition: transform 0.4s ease, opacity 0.3s ease;
}

.af-visual-card:hover img {
  transform: scale(1.04);
  opacity: 0.8;
}

.af-visual-card__body {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.25rem 1.2rem 1.35rem;
  background: linear-gradient(180deg, transparent, rgba(11, 31, 74, 0.92));
}

.af-visual-card__body h3 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.af-visual-card__body p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.92;
  line-height: 1.4;
}

.af-visual-card__tag {
  display: inline-block;
  margin-bottom: 0.45rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(83, 242, 53, 0.2);
  color: #53F235;
}

.af-estrella-band {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  color: #0b1220;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  min-height: 460px;
  background:
    linear-gradient(135deg, #f4fbff 0%, #e8f4ff 42%, #dff7f2 100%);
  border: 1px solid rgba(16, 20, 110, 0.1);
  box-shadow:
    0 24px 48px rgba(16, 20, 110, 0.1),
    0 2px 0 rgba(255, 255, 255, 0.7) inset;
}

.af-estrella-band::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, #39ebc7 0%, #2a7dff 100%);
  z-index: 2;
}

.af-estrella-band__copy {
  padding: 2.6rem 2.2rem 2.6rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  position: relative;
  z-index: 1;
}

.af-estrella-band__tag {
  display: inline-flex;
  align-self: flex-start;
  margin: 0;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0f766e;
  background: rgba(57, 235, 199, 0.28);
  border: 1px solid rgba(15, 118, 110, 0.18);
}

.af-estrella-band__copy h2 {
  margin: 0;
  font-family: var(--af-font-display, Montserrat, sans-serif);
  font-size: clamp(1.75rem, 3.2vw, 2.45rem);
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: #10146e;
}

.af-estrella-band__copy p {
  margin: 0;
  color: #475569;
  max-width: 30rem;
  font-size: 1.05rem;
  line-height: 1.55;
}

.af-estrella-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.35rem;
}

.af-estrella-band__btn-primary {
  background: #10146e;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  padding: 0.7rem 1.15rem;
  box-shadow: 0 10px 22px rgba(16, 20, 110, 0.22);
}

.af-estrella-band__btn-primary:hover {
  background: #2a7dff;
  color: #fff;
}

.af-estrella-band__btn-ghost {
  background: #fff;
  color: #10146e;
  border: 1.5px solid rgba(16, 20, 110, 0.22);
  border-radius: 12px;
  font-weight: 700;
  padding: 0.7rem 1.15rem;
}

.af-estrella-band__btn-ghost:hover {
  background: rgba(16, 20, 110, 0.05);
  color: #10146e;
  border-color: #10146e;
}

.af-estrella-band__media {
  position: relative;
  min-height: 300px;
  margin: 0.85rem 0.85rem 0.85rem 0;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(16, 20, 110, 0.18);
}

.af-estrella-band__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(232, 244, 255, 0.35) 0%, transparent 28%);
  pointer-events: none;
  z-index: 1;
}

.af-estrella-band__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transform: scale(1.02);
}

.af-benefit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.af-benefit {
  background: #fff;
  border: 1px solid rgba(16, 20, 110, 0.1);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(16, 20, 110, 0.06);
}

.af-benefit img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  object-position: center;
  display: block;
  pointer-events: none;
}

.af-benefit__body {
  padding: 1rem 1.05rem 1.15rem;
}

.af-benefit__body h3 {
  margin: 0 0 0.3rem;
  font-size: 1rem;
  color: #10146E;
}

.af-benefit__body p {
  margin: 0;
  font-size: 0.88rem;
  color: #64748b;
  line-height: 1.4;
}

.af-comm-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.af-sustain {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: center;
  background: #fff;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(16, 20, 110, 0.08);
  box-shadow: 0 14px 36px rgba(16, 20, 110, 0.08);
}

.af-sustain__copy {
  padding: 2rem 1.75rem;
}

.af-sustain__copy h2 {
  margin: 0 0 0.75rem;
  font-family: var(--af-font-display, Montserrat, sans-serif);
  font-size: clamp(1.45rem, 2.5vw, 1.9rem);
  color: #10146E;
  letter-spacing: -0.02em;
}

.af-sustain__copy p {
  margin: 0 0 1.1rem;
  color: #475569;
  line-height: 1.55;
}

.af-sustain__media img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  display: block;
}

.af-product-mini {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
}

.af-product-mini a {
  display: block;
  padding: 1rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(16, 20, 110, 0.1);
  text-decoration: none;
  color: #10146E;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.af-product-mini a:hover {
  border-color: rgba(42, 125, 255, 0.35);
  box-shadow: 0 10px 24px rgba(16, 20, 110, 0.08);
}

.af-product-mini strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
}

.af-product-mini span {
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.35;
}

.af-intranet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.af-intranet-card {
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(16, 20, 110, 0.1);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 10px 26px rgba(16, 20, 110, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
  min-height: 268px;
}

.af-intranet-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(16, 20, 110, 0.12);
  border-color: rgba(42, 125, 255, 0.35);
  color: inherit;
}

.af-intranet-card__media {
  display: block;
  position: relative;
  height: 128px;
  overflow: hidden;
  background: #e8eef8;
}

.af-intranet-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.af-intranet-card:hover .af-intranet-card__media img {
  transform: scale(1.04);
}

.af-intranet-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.95rem 1.05rem 1.15rem;
  flex: 1;
}

.af-intranet-card__tag {
  display: inline-flex;
  align-self: flex-start;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #0f766e;
  background: rgba(57, 235, 199, 0.22);
  border: 1px solid rgba(15, 118, 110, 0.16);
}

.af-intranet-card strong {
  color: #10146e;
  font-family: var(--af-font-display, Montserrat, sans-serif);
  font-size: 1.02rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.af-intranet-card__text {
  color: #64748b;
  font-size: 0.86rem;
  line-height: 1.4;
}

.af-visual-card__body .af-visual-card__tag {
  margin-bottom: 0.35rem;
  background: rgba(57, 235, 199, 0.28);
  color: #53f235;
  border: 1px solid rgba(83, 242, 53, 0.35);
}

.af-cta-final--compact h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.navbar-af .nav-link.af-nav-cta {
  background: linear-gradient(135deg, #10146E 0%, #2A7DFF 100%);
  color: #fff !important;
  border-radius: 999px;
  padding: 0.45rem 1rem !important;
  margin-left: 0.25rem;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(16, 20, 110, 0.28);
}

.navbar-af .nav-link.af-nav-cta:hover {
  background: linear-gradient(135deg, #2A7DFF 0%, #5D3CFF 100%);
  color: #fff !important;
}

.af-hero--visual .af-display,
.af-hero.af-hero--visual h1 {
  animation: none !important;
  will-change: auto;
}

@media (max-width: 991px) {
  .af-pillars,
  .af-benefit-grid,
  .af-comm-grid,
  .af-estrella-band,
  .af-sustain {
    grid-template-columns: 1fr;
  }

  .af-hero--visual {
    padding: 5.75rem 0 1.75rem;
  }

  .af-hero--visual .af-hero-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .af-hero--visual .af-hero-copy {
    max-width: none;
    text-align: center;
  }

  .af-hero--visual .af-hero-lead {
    margin-left: auto;
    margin-right: auto;
  }

  .af-hero--visual .af-hero-actions {
    justify-content: center;
  }

  .af-pillars {
    margin-top: 1.25rem;
  }

  .af-estrella-band__copy {
    padding: 1.75rem 1.35rem 1.25rem;
  }

  .af-estrella-band__media {
    min-height: 240px;
    margin: 0 0.85rem 0.85rem;
  }

  .af-estrella-band__media::after {
    background: linear-gradient(180deg, rgba(232, 244, 255, 0.4) 0%, transparent 35%);
  }
}

@media (max-width: 640px) {
  .af-benefit-grid,
  .af-comm-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Movimiento en imágenes del portal (presencia, no ruido) ── */
@keyframes af-img-kenburns {
  0% { transform: scale(1.04) translate3d(0, 0, 0); }
  50% { transform: scale(1.1) translate3d(-1.6%, -1%, 0); }
  100% { transform: scale(1.05) translate3d(1.2%, 0.8%, 0); }
}

@keyframes af-img-drift {
  0%, 100% { transform: scale(1.06) translate3d(0, 0, 0); }
  50% { transform: scale(1.1) translate3d(1.4%, -1.2%, 0); }
}

@keyframes af-img-float-soft {
  0%, 100% { transform: scale(1.03) translate3d(0, 0, 0); }
  50% { transform: scale(1.07) translate3d(-1%, 1.2%, 0); }
}

@keyframes af-img-pan-x {
  0%, 100% { transform: scale(1.08) translate3d(-1.5%, 0, 0); }
  50% { transform: scale(1.08) translate3d(1.5%, 0, 0); }
}

@keyframes af-logo-bob {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-5px) scale(1.03); }
}

.af-hero--visual .af-hero-visual img,
.af-estrella-band__media img,
.af-benefit img,
.af-sustain__media img,
.af-visual-card img,
.af-intranet-card__media img {
  will-change: transform;
  backface-visibility: hidden;
}

.af-hero--visual .af-hero-visual img {
  animation: af-img-kenburns 22s ease-in-out infinite alternate;
  transform-origin: center center;
}

.af-estrella-band__media img {
  animation: af-img-drift 18s ease-in-out infinite alternate;
  transform-origin: center 30%;
}

.af-benefit {
  overflow: hidden;
}

.af-benefit img {
  animation: af-img-float-soft 14s ease-in-out infinite alternate;
  transition: transform 0.45s ease, filter 0.35s ease;
}

.af-benefit:nth-child(2) img { animation-delay: 1.2s; animation-duration: 15.5s; }
.af-benefit:nth-child(3) img { animation-delay: 2.1s; animation-duration: 13.5s; }

.af-benefit:hover img {
  animation-play-state: paused;
  transform: scale(1.08);
  filter: saturate(1.08);
}

.af-sustain__media {
  overflow: hidden;
  min-height: 280px;
}

.af-sustain__media img {
  animation: af-img-pan-x 20s ease-in-out infinite alternate;
  transform-origin: center center;
  transition: filter 0.35s ease;
}

.af-sustain:hover .af-sustain__media img {
  filter: saturate(1.06) brightness(1.02);
}

.af-visual-card img {
  animation: af-img-drift 16s ease-in-out infinite alternate;
}

.af-visual-card:nth-child(2n) img { animation-delay: 0.8s; animation-duration: 17.5s; }
.af-visual-card:nth-child(3n) img { animation-delay: 1.6s; animation-name: af-img-float-soft; animation-duration: 15s; }
.af-visual-card:nth-child(4n) img { animation-delay: 2.2s; animation-name: af-img-pan-x; animation-duration: 18s; }

.af-visual-card:hover img {
  animation-play-state: paused;
  transform: scale(1.08);
  opacity: 0.85;
  transition: transform 0.45s ease, opacity 0.3s ease;
}

.af-intranet-card__media img {
  animation: af-img-float-soft 15s ease-in-out infinite alternate;
}

.af-intranet-card:nth-child(2n) .af-intranet-card__media img { animation-delay: 0.7s; }
.af-intranet-card:nth-child(3n) .af-intranet-card__media img { animation-delay: 1.4s; animation-name: af-img-pan-x; }
.af-intranet-card:nth-child(4n) .af-intranet-card__media img { animation-delay: 2s; animation-name: af-img-drift; }

.af-intranet-card:hover .af-intranet-card__media img {
  animation-play-state: paused;
  transform: scale(1.08);
}

.af-cliente img {
  animation: af-logo-bob 5.5s ease-in-out infinite;
  transform-origin: center center;
}

.af-cliente:nth-child(2) img { animation-delay: 0.6s; animation-duration: 6.2s; }
.af-cliente:nth-child(3) img { animation-delay: 1.2s; animation-duration: 5.8s; }
.af-cliente:hover img {
  animation-play-state: paused;
  transform: translateY(-3px) scale(1.06);
  transition: transform 0.3s ease;
}

@media (prefers-reduced-motion: reduce) {
  .af-hero--visual .af-hero-visual img,
  .af-estrella-band__media img,
  .af-benefit img,
  .af-sustain__media img,
  .af-visual-card img,
  .af-intranet-card__media img,
  .af-cliente img {
    animation: none !important;
    transform: none !important;
    will-change: auto;
  }
}
