/* CentroJom: fotografías que se funden; el texto del hero permanece estable. */
.cj-hero-art.cj-hero-photos {
    position: relative;
    isolation: isolate;
    width: 100%;
    aspect-ratio: 3 / 2;
    background: #f5f0f7;
}

.cj-hero-art.cj-hero-photos .cj-hero-photo {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
    object-position: 50% 45%;
    opacity: 0;
    z-index: 0;
    transform: none;
    transition: none;
}

.cj-hero-art.cj-hero-photos .cj-hero-photo-tomatis { object-position: 35% 38%; }
.cj-hero-art.cj-hero-photos .cj-hero-photo.is-active { opacity: 1; z-index: 2; }
.cj-hero-art.cj-hero-photos .cj-hero-photo.is-previous { opacity: 1; z-index: 1; }
.cj-hero-art.cj-hero-photos.is-enhanced .cj-hero-photo { transition: opacity 1.4s ease; }

.cj-hero-photos-caption {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.cj-hero-photos-toggle {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: 1px solid #fff;
    border-radius: 50%;
    background: #fff;
    color: #51355f;
    box-shadow: 0 2px 12px rgb(29 21 33 / 14%);
    font: 700 .8125rem / 1.2 var(--cj-font, 'Nunito', sans-serif);
    cursor: pointer;
    text-align: center;
}

.cj-hero-photos-toggle[hidden] { display: none; }
.cj-hero-photos-toggle:hover { background: #f5edf5; }
.cj-hero-photos-toggle:focus-visible { outline: 3px solid #51355f; outline-offset: 3px; }
.cj-hero-photos-toggle svg { flex: 0 0 auto; width: 18px; height: 18px; }
.cj-hero-photos-toggle .cj-hero-photos-play { transform: translateX(1px); }
.cj-hero-photos-play,
.cj-hero-photos.is-user-paused .cj-hero-photos-pause { display: none; }
.cj-hero-photos.is-user-paused .cj-hero-photos-play { display: block; }

@media (prefers-reduced-motion: reduce) {
    .cj-hero-art.cj-hero-photos.is-enhanced .cj-hero-photo { transition: none; }
    .cj-hero-photos-toggle { display: none; }
}


/* Conceptual brain image: gentle pulses over the nodes already in the picture. */
.cj-hero-art.cj-hero-photos .cj-hero-brain-lights {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
    transition: opacity .5s ease;
}
.cj-hero-photos.is-brain-active .cj-hero-brain-lights { visibility: visible; }
.cj-hero-photos.is-brain-running .cj-hero-brain-lights { opacity: 1; }
.cj-hero-brain-node {
    opacity: 0;
    animation: cj-brain-node-glow var(--cj-node-duration) ease-in-out var(--cj-node-delay) infinite;
    animation-play-state: paused;
}
.cj-hero-photos.is-brain-running .cj-hero-brain-node { animation-play-state: running; }
.cj-hero-brain-node:nth-of-type(1) { --cj-node-duration: 5.3s; --cj-node-delay: -1.6s; }
.cj-hero-brain-node:nth-of-type(2) { --cj-node-duration: 6.7s; --cj-node-delay: -3.4s; }
.cj-hero-brain-node:nth-of-type(3) { --cj-node-duration: 4.9s; --cj-node-delay: -0.8s; }
.cj-hero-brain-node:nth-of-type(4) { --cj-node-duration: 7.1s; --cj-node-delay: -4.1s; }
.cj-hero-brain-node:nth-of-type(5) { --cj-node-duration: 5.9s; --cj-node-delay: -2.7s; }
.cj-hero-brain-node:nth-of-type(6) { --cj-node-duration: 4.3s; --cj-node-delay: -1.4s; }
.cj-hero-brain-node:nth-of-type(7) { --cj-node-duration: 7.9s; --cj-node-delay: -5.6s; }
.cj-hero-brain-node:nth-of-type(8) { --cj-node-duration: 6.1s; --cj-node-delay: -3.1s; }
.cj-hero-brain-node:nth-of-type(9) { --cj-node-duration: 5.1s; --cj-node-delay: -1.0s; }
.cj-hero-brain-node:nth-of-type(10) { --cj-node-duration: 7.3s; --cj-node-delay: -4.8s; }
.cj-hero-brain-node:nth-of-type(11) { --cj-node-duration: 6.5s; --cj-node-delay: -2.1s; }
.cj-hero-brain-node:nth-of-type(12) { --cj-node-duration: 5.7s; --cj-node-delay: -3.9s; }
@keyframes cj-brain-node-glow {
    0%, 12%, 50%, 100% { opacity: 0; }
    22%, 40% { opacity: .98; }
}
/* At this breakpoint the image is contained, aligned right/top, with ratio 3:2.
   Give its overlay that same rendered rectangle rather than stretching it. */
@media (min-width: 1200px) {
    .cj-site .cj-hero-panorama .cj-hero-art.cj-hero-photos .cj-hero-brain-lights {
        inset: 0 0 auto auto;
        width: auto;
        height: 100%;
        aspect-ratio: 3 / 2;
    }
}
@media (prefers-reduced-motion: reduce) {
    .cj-hero-art.cj-hero-photos .cj-hero-brain-lights { display: none; transition: none; }
    .cj-hero-brain-node { animation: none; }
}
@media print {
    .cj-hero-art.cj-hero-photos .cj-hero-brain-lights { display: none !important; }
    .cj-hero-brain-node { animation: none !important; }
}

/* Reserva horizontal para que el control no quede debajo del WhatsApp flotante. */
.cj-site.cj-home-page .cj-hero-panorama .cj-hero-photos-toggle {
    right: max(calc(92px + env(safe-area-inset-right, 0px)), calc((100vw - 1184px) / 2));
}

/* Pulsos algo más visibles y tres recorridos discretos sobre conexiones existentes. */
.cj-hero-brain-circuit{stroke:#e1b8f4;stroke-width:1.8;stroke-dasharray:.16 .84;stroke-dashoffset:1;opacity:0;filter:drop-shadow(0 0 2px #f3e2ff);animation:cj-brain-circuit-glow 7s ease-in-out infinite;animation-play-state:paused}.cj-hero-brain-circuit:nth-child(2){animation-duration:8.2s;animation-delay:-3.1s;stroke:#f4c6df}.cj-hero-brain-circuit:nth-child(3){animation-duration:6.8s;animation-delay:-1.9s}.cj-hero-photos.is-brain-running .cj-hero-brain-circuit{animation-play-state:running}@keyframes cj-brain-circuit-glow{0%,8%{opacity:0;stroke-dashoffset:1}20%{opacity:.72}50%{opacity:.55}65%,100%{opacity:0;stroke-dashoffset:-.7}}@media(prefers-reduced-motion:reduce){.cj-hero-brain-circuit{animation:none;display:none}}@media print{.cj-hero-brain-circuit{display:none}}
