/* The desktop composition stays in its original layout. */
.pm-delux-caption, .pm-delux-next { display: none; }
.pm-delux-window { display: contents; }

@media (max-width: 767px) {
  html body .mdw-card-portfolio.pm-delux-showcase .pm-reveal-stage {
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) 44px;
    align-items: stretch !important;
    justify-content: stretch !important;
    gap: 22px !important;
    min-height: 0 !important;
    padding: 28px 22px calc(var(--pm-dock-bottom, 12px) + var(--pm-dock-height, 112px) + 18px) !important;
    box-sizing: border-box;
  }
  html body .pm-delux-showcase .pm-delux-caption {
    display: flex;
    justify-content: center;
    align-items: center;
    justify-self: center;
    width: fit-content;
    max-width: 100%;
    padding: 16px 22px;
    border: 1px solid #ffffff30;
    border-radius: 26px;
    background: linear-gradient(135deg, #ffffff17, #9db9d00b);
    box-shadow: inset 0 1px 0 #ffffff12, 0 8px 30px #00000020;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    text-align: center;
  }
  html body #content .mdw-card-portfolio.pm-delux-showcase .pm-delux-caption h2 {
    font-size: clamp(18px, 5.2vw, 23px) !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    color: #f5f7fb !important;
    letter-spacing: -.025em;
    text-wrap: balance;
  }
  html body .pm-delux-showcase .pm-delux-window {
    display: grid;
    place-items: center;
    position: relative;
    min-height: 0;
    isolation: isolate;
  }
  html body .mdw-card-portfolio.pm-delux-showcase .pm-reveal-copy {
    opacity: 1 !important;
    max-width: 360px !important;
    gap: 18px !important;
    padding: 0 8px;
  }
  html body .pm-delux-showcase .pm-reveal-copy :is(.pm-delux-original-title, .pm-delux-download-caption, .elementor-widget-button) {
    display: none !important;
  }
  html body #content .mdw-card-portfolio.pm-delux-showcase .pm-brief {
    font-size: 15px !important;
    line-height: 1.7 !important;
    text-wrap: pretty;
  }
  html body .mdw-card-portfolio.pm-delux-showcase .mdw-card-portfolio-image-left,
  html body .mdw-card-portfolio.pm-delux-showcase .mdw-card-portfolio-image-right {
    top: 50% !important;
    width: 50% !important;
    height: 100% !important;
  }
  html body .mdw-card-portfolio.pm-delux-showcase .elementor-widget-image .elementor-widget-container {
    background: #121820;
    box-shadow: 0 12px 32px #00000045;
  }
  html body .pm-delux-showcase .pm-delux-next {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: center;
    gap: 12px;
    min-width: 144px;
    height: 44px;
    padding: 0 16px;
    border: 1px solid #ffffff26;
    border-radius: 24px;
    background: #ffffff0c;
    color: #e8edf4;
    font: 500 12px/1.2 var(--prescot-font-body, sans-serif);
    box-shadow: inset 0 1px #ffffff0b;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  html body .pm-delux-showcase .pm-delux-next svg { width: 20px; height: 20px; }
  html body .pm-delux-showcase .pm-delux-next:focus-visible { outline: 2px solid #e55933; outline-offset: 4px; }
  html body .pm-delux-showcase .pm-delux-next:active { background: #ffffff1a; }
}

@media (max-width: 767px) and (max-height: 650px) {
  html body .mdw-card-portfolio.pm-delux-showcase .pm-reveal-stage { padding-top: 16px !important; gap: 14px !important; }
  html body .pm-delux-showcase .pm-delux-caption { padding: 11px 18px; border-radius: 22px; }
  html body #content .mdw-card-portfolio.pm-delux-showcase .pm-brief { font-size: 14px !important; line-height: 1.55 !important; }
  html body .mdw-card-portfolio.pm-delux-showcase .pm-reveal-copy { gap: 10px !important; }
}

@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  html body .mdw-card-portfolio.pm-delux-showcase { min-height: 100svh !important; }
}
