/* Enhanced styling for the embedded page + background canvas */
.embedded-new-page {
  position: relative;         /* to contain the canvas absolutely */
  overflow: hidden;           /* hide canvas overflow */
  padding: 4rem 2rem;
  text-align: center;
  background-color: rgba(218, 208, 208, 0.712); /* gray background */
  color: #ffffff00;                /* ensure readable text */

}

/* The canvas sits behind content */
.embedded-new-page .bg-canvas {
  position: absolute;
  inset: 0;                   /* top:0; right:0; bottom:0; left:0; */
  width: 50%;
  height: 50%;
  z-index: 0;
  pointer-events: none;       /* allow clicks through to page content */
  filter: blur(18px) saturate(0.6); /* soften & darken blobs */
  opacity: 0.9;
}

/* Make sure content sits above the canvas */
.embedded-new-page .content-wrapper {
  position: relative;
  z-index: 1;
}

/* Image inside the content */
.embedded-new-page img {
  max-width: 100%;
  height: 50%;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0);
}

/* Responsive tweaks */
@media (max-width: 1200px) {
  .embedded-new-page {
    padding: 3rem 1.5rem;
  }
  .embedded-new-page img {
    max-width: 90%;
  }
}

@media (max-width: 768px) {
  .embedded-new-page {
    padding: 2rem 1rem;
  }
  .embedded-new-page img {
    max-width: 100%;
    height: auto;
  }
  .embedded-new-page .bg-canvas {
    filter: blur(14px) saturate(0.6);
    opacity: 0.7;
  }
}

@media (max-width: 640px) {
  .embedded-new-page {
    padding: 1.5rem 0.5rem;
    width: 105%;
    height:200%;
  }
  .embedded-new-page img {
    max-width: 100%;
    border-radius: 6px;
  }
  .embedded-new-page .bg-canvas {
    filter: blur(12px) saturate(0.5);
    opacity: 0.6;
  }
}

@media (max-width: 480px) {
  .embedded-new-page {
    padding: 1rem 0.25rem;
  }
  .embedded-new-page img {
    max-width: 100%;
    border-radius: 4px;
  }
  .embedded-new-page .bg-canvas {
    filter: blur(10px) saturate(0.4);
    opacity: 0.5;
  }
}

/* If user prefers reduced motion, don't animate — just show faint static background */
@media (prefers-reduced-motion: reduce) {
  .embedded-new-page .bg-canvas {
    transition: none !important;
    animation: none !important;
    filter: blur(18px) saturate(0.6);
  }
}
