/* Shared styles for "embed" fields (Video and Social Posts sections), loaded by every site template.
   Colours use the standard --theme-* token contract so Content > Theme Color applies automatically. */
.pnim-embed-grid{display:grid;gap:1.5rem;grid-template-columns:minmax(0,1fr);align-items:start}
@media (min-width:576px){.pnim-embed-grid.cols-2,.pnim-embed-grid.cols-3,.pnim-embed-grid.cols-4{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (min-width:992px){.pnim-embed-grid.cols-3,.pnim-embed-grid.cols-4{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (min-width:1200px){.pnim-embed-grid.cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}
.pnim-embed-grid.cols-1{max-width:960px;margin-inline:auto}

.pnim-embed{margin:0;min-width:0}
.pnim-embed-box{position:relative;width:100%;aspect-ratio:16/9;overflow:hidden;border-radius:.75rem;background:var(--theme-dark,#14181f)}
.pnim-embed--vertical .pnim-embed-box{aspect-ratio:9/16}
.pnim-embed--vertical{width:100%;max-width:360px;margin-inline:auto}
.pnim-embed-box iframe{position:absolute;inset:0;width:100%;height:100%;border:0}

/* Instagram/Facebook posts have no fixed ratio; the frame reserves room for a portrait (4:5) photo
   plus the platform's own header and footer, so the grid stays even and nothing jumps while loading. */
.pnim-embed--post .pnim-embed-box{aspect-ratio:auto;height:0;padding-bottom:calc(125% + 180px);background:var(--theme-surface,#ffffff);border:1px solid var(--theme-border,#dfe3e8)}
.pnim-embed--facebook.pnim-embed--post .pnim-embed-box{padding-bottom:calc(100% + 150px)}
.pnim-embed--vertical.pnim-embed--post{max-width:none}

.pnim-embed-facade{position:absolute;inset:0;display:block;color:inherit}
.pnim-embed-poster{width:100%;height:100%;object-fit:cover;display:block;transition:transform .3s ease,filter .3s ease}
.pnim-embed-play{position:absolute;left:50%;top:50%;width:68px;height:48px;transform:translate(-50%,-50%);filter:drop-shadow(0 2px 6px rgba(0,0,0,.35))}
.pnim-embed-play-bg{fill:var(--theme-primary,#e1251b);opacity:.92;transition:opacity .2s ease,fill .2s ease}
.pnim-embed-play-icon{fill:var(--theme-primary-contrast,#ffffff)}
.pnim-embed-facade:hover .pnim-embed-poster,.pnim-embed-facade:focus-visible .pnim-embed-poster{transform:scale(1.03);filter:brightness(.85)}
.pnim-embed-facade:hover .pnim-embed-play-bg,.pnim-embed-facade:focus-visible .pnim-embed-play-bg{opacity:1;fill:var(--theme-primary-strong,#b81d15)}
.pnim-embed-facade:focus-visible{outline:3px solid var(--theme-primary-contrast,#ffffff);outline-offset:-6px}

.pnim-embed-caption{margin-top:.6rem;color:var(--theme-muted,#5c6670);font-size:.95rem;line-height:1.5}
.pnim-embed-source{display:inline-block;margin-top:.5rem;padding:.25rem 0;font-size:.875rem;color:var(--theme-muted,#5c6670);text-decoration:underline;text-underline-offset:2px}
.pnim-embed-source:hover{color:var(--theme-primary,#0f7a86)}
.pnim-embed-source:focus-visible{outline:2px solid var(--theme-primary,#0f7a86);outline-offset:2px}
.pnim-embed-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.pnim-embed-actions{margin-top:2rem;text-align:center}

@media (prefers-reduced-motion:reduce){.pnim-embed-poster,.pnim-embed-play-bg{transition:none}.pnim-embed-facade:hover .pnim-embed-poster,.pnim-embed-facade:focus-visible .pnim-embed-poster{transform:none}}
