/* ===== Topblock Split-Flip (Doors) v2.50 — FULL CSS ===== */

:root{
  --flip-open-duration: 480ms;
  --flip-close-duration: 480ms;
  --flip-open-ease: cubic-bezier(.55,.055,.675,.19);
  --flip-close-ease: cubic-bezier(.2,.7,.2,1);

  --flip-perspective: 1000px;
  --flip-seam: 1px;
  --edge-bleed: 1px;
}

/* Opt-in Topflip */
.sqs-block.image-block.flip-top .fluid-image-container{
  perspective: var(--flip-perspective);
  transform-style: preserve-3d; -webkit-transform-style: preserve-3d;
  position: relative;
}

/* Hide the real <img>; doors repaint it */
.sqs-block.image-block.flip-top img[data-sqsp-image-block-image]{ opacity: 0 !important; }

/* Doors host */
.sqs-block.image-block.flip-top .flip-doors{
  position: absolute; inset: 0;
  border-radius: inherit; overflow: hidden;
  transform-style: preserve-3d; -webkit-transform-style: preserve-3d;
  pointer-events: none;
  contain: layout paint;
}

/* Doors */
.sqs-block.image-block.flip-top .flip-door{
  position: absolute; top: 0; bottom: 0;
  width: calc(50% + var(--flip-seam));
  will-change: transform;
  transform-style: preserve-3d; -webkit-transform-style: preserve-3d;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  transition-property: transform;
  transition-duration: var(--flip-close-duration);
  transition-timing-function: var(--flip-close-ease);
}
.sqs-block.image-block.flip-top .flip-door.left  { left: 0;  transform-origin: center left; }
.sqs-block.image-block.flip-top .flip-door.right { right: 0; transform-origin: center right; }
.sqs-block.image-block.flip-top .flip-door.right { transform: translateZ(0.1px) rotateY(0deg); }

/* Faces (painted by JS) */
.sqs-block.image-block.flip-top .face{
  position: absolute;
  inset: calc(-1 * var(--edge-bleed));
  background-repeat: no-repeat; background-color: transparent;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  transform: translateZ(0);
}
.sqs-block.image-block.flip-top .back{ transform: rotateY(180deg); }

/* Closed state */
.sqs-block.image-block.flip-top .flip-door.left  { transform: rotateY(0deg); }
.sqs-block.image-block.flip-top .flip-door.right { transform: translateZ(0.1px) rotateY(0deg); }

/* OPEN (class-driven) */
.sqs-block.image-block.flip-top.is-open .flip-door{
  transition-duration: var(--flip-open-duration);
  transition-timing-function: var(--flip-open-ease);
}
.sqs-block.image-block.flip-top.is-open .flip-door.left  { transform: rotateY(-180deg); }
.sqs-block.image-block.flip-top.is-open .flip-door.right { transform: translateZ(0.1px) rotateY(180deg); }

/* TRUE pass-through while open: Topflip + its fe-block wrapper */
.sqs-block.image-block.flip-top.pe-through,
.sqs-block.image-block.flip-top.pe-through *,
.fe-block.pe-through,
.fe-block.pe-through *{
  pointer-events: none !important;
}

/* Marker link: clickable when closed; disabled while open/tapped-open */
.sqs-block.image-block.flip-top.is-open a.sqs-block-image-link[href="#flip-top"],
.sqs-block.image-block.flip-top.is-flipped a.sqs-block-image-link[href="#flip-top"]{
  pointer-events: none !important;
  cursor: default !important;
}
