/* AP Marketing Digital — Restauración V4.1
   Complementa, sin reemplazar, el CSS original de Gencyo.
   Arregla el volteo de los iconos y activa un cursor-cohete personalizado.
*/

/* Los íconos nativos rotaban 360deg, pero la V4 reducía o anulaba algunas transiciones. */
.ap-theme .feature-block .inner-block > .icon,
.ap-theme .service-block-one .inner-block .content-box > .icon,
.ap-theme .choose-us-content-1 .feature-list .icon {
  display:inline-block;
  transform-style:preserve-3d;
  backface-visibility:visible;
  will-change:transform;
  perspective:600px;
}
@keyframes ap-icon-flip {
  0%   {transform:perspective(600px) rotateY(0deg) scale(1)}
  42%  {transform:perspective(600px) rotateY(185deg) scale(1.10)}
  75%  {transform:perspective(600px) rotateY(305deg) scale(1.04)}
  100% {transform:perspective(600px) rotateY(360deg) scale(1)}
}
.ap-theme .feature-block .inner-block:hover > .icon,
.ap-theme .service-block-one .inner-block:hover .content-box > .icon {
  animation:ap-icon-flip 900ms cubic-bezier(.18,.65,.22,1) both;
}
/* Se restablece al dejar el icono, para que vuelva a girar en el próximo hover. */
.ap-theme .feature-block .inner-block:not(:hover) > .icon,
.ap-theme .service-block-one .inner-block:not(:hover) .content-box > .icon {animation:none}

/* Cursor visible únicamente para un ratón real; en móviles permanece nativo. */
body.ap-theme,body.ap-theme a,body.ap-theme button,
body.ap-theme input,body.ap-theme textarea,body.ap-theme select {
  cursor:auto!important;
}
body.ap-theme a,body.ap-theme button {cursor:pointer!important}
body.ap-theme.ap-pointer-engaged,
body.ap-theme.ap-pointer-engaged a,
body.ap-theme.ap-pointer-engaged button,
body.ap-theme.ap-pointer-engaged .cursor-pointer {cursor:none!important}
body.ap-theme.ap-pointer-engaged input,
body.ap-theme.ap-pointer-engaged textarea {cursor:text!important}

body.ap-theme #ap-cursor {
  position:fixed; top:0; left:0;
  display:block!important; width:60px; height:60px;
  opacity:0; z-index:2147483000;
  pointer-events:none;
  transform:translate3d(-150px,-150px,0);
  transition:opacity 180ms ease!important;
  isolation:isolate;
  contain:layout style paint;
}
body.ap-theme.ap-pointer-engaged #ap-cursor.visible {opacity:1!important}
body.ap-theme #ap-cursor .ap-cursor-halo {
  position:absolute; inset:4px; border:1px solid rgba(255,255,0,.36);
  border-radius:50%; box-shadow:0 0 19px rgba(19,74,184,.3),inset 0 0 10px rgba(19,74,184,.18);
  transition:transform .22s ease, border-color .22s ease, background-color .22s ease;
}
body.ap-theme #ap-cursor.hovering .ap-cursor-halo {
  transform:scale(1.26); border-color:#FFFF00; background:rgba(19,74,184,.12);
}
body.ap-theme #ap-cursor .ap-cursor-rocket {
  position:absolute; inset:10px; width:40px; height:40px;
  transform-origin:center center;
  will-change:transform;
}
body.ap-theme #ap-cursor .ap-cursor-rocket img {
  width:40px; height:40px; display:block; object-fit:contain;
  transform:none!important; filter:drop-shadow(0 0 6px rgba(255,255,0,.65));
}
body.ap-theme #ap-cursor .ap-cursor-flame {
  position:absolute; bottom:1px; left:2px; width:9px; height:18px;
  border-radius:50%; transform:rotate(42deg);
  background:linear-gradient(180deg,rgba(255,255,0,.9),rgba(81,172,255,.8),transparent);
  filter:blur(2px); opacity:.75; animation:ap-rocket-flame 240ms ease-in-out infinite alternate;
}
@keyframes ap-rocket-flame {from{height:11px;opacity:.35}to{height:23px;opacity:.95}}
body.ap-theme #ap-cursor .ap-cursor-spark {
  position:absolute; left:0; top:45px; width:4px; height:4px; background:#FFFF00;
  border-radius:50%; box-shadow:0 0 8px #FFFF00;
  animation:ap-rocket-spark 900ms ease-out infinite;
}
body.ap-theme #ap-cursor .ap-cursor-spark:nth-child(4) {left:11px;top:52px;animation-delay:360ms;background:#7ec7ff;box-shadow:0 0 8px #7ec7ff}
@keyframes ap-rocket-spark {0%{opacity:0;transform:translate(0,0) scale(.5)}35%{opacity:.95}100%{opacity:0;transform:translate(-14px,15px) scale(0)}}

/* Accesibilidad: se respeta el ajuste de reducción de movimiento.
   Si está activo, solo se reactiva con el botón voluntario de la propia web. */
@media (prefers-reduced-motion:reduce) {
  body.ap-theme:not(.ap-motion-opted-in) .feature-block .inner-block:hover > .icon,
  body.ap-theme:not(.ap-motion-opted-in) .service-block-one .inner-block:hover .content-box > .icon {animation:none!important}
  body.ap-theme:not(.ap-motion-opted-in) #ap-cursor {display:none!important}
  body.ap-theme.ap-motion-opted-in .feature-block .inner-block:hover > .icon,
  body.ap-theme.ap-motion-opted-in .service-block-one .inner-block:hover .content-box > .icon {
    animation-name:ap-icon-flip!important;
    animation-duration:900ms!important;
    animation-timing-function:cubic-bezier(.18,.65,.22,1)!important;
    animation-fill-mode:both!important;
  }
  body.ap-theme.ap-motion-opted-in #ap-cursor .ap-cursor-flame,
  body.ap-theme.ap-motion-opted-in #ap-cursor .ap-cursor-spark {animation-duration:450ms!important}
}
.ap-motion-toggle {
  position:fixed; left:16px; bottom:18px; z-index:2147482000;
  border:1px solid #FFFF00; border-radius:999px;
  padding:11px 16px; background:#071327; color:#FFFF00;
  font:600 13px/1.2 system-ui,sans-serif;
  box-shadow:0 6px 28px rgba(0,0,0,.25); cursor:pointer!important;
}
.ap-motion-toggle:hover,.ap-motion-toggle:focus-visible {background:#134AB8;color:white}
