/* Migrated horizontal pages on the canvas (src/lib/canvas-page.ts: /servicii, /kids). The canvas rules of home.css
   without its type and component styles, so the migrated page's own CSS keeps styling every block as before: each panel is one 1440 x 900 drawing
   scaled by --uz (height sets it; narrow windows fall back to width) and pinned to the panel's bottom edge. */
:root { --uz: min(tan(atan2(100vh, 900px)), tan(atan2(100vw, 1280px))); }
.dpx-p { position: relative; flex: none; width: calc(1440px * var(--uz)); height: 100vh; overflow: hidden; background: var(--dpx-bg, #fff); }
.dp-astro-horizontal .dp-horizontal-track > section.dpx-p { flex: 0 0 calc(1440px * var(--uz)) !important; width: calc(1440px * var(--uz)) !important; overflow: hidden; }
/* Not horizontal (narrow windows): the panels stack, each scaled to the screen width. */
body[data-horizontal-page]:not(.dp-desktop-horizontal) #siteWrapper section.page-section.dpx-p, body:not(.dp-desktop-horizontal) .dpx-p { --uz: tan(atan2(100vw, 1440px)); width: 100vw !important; height: calc(900px * var(--uz)) !important; min-height: 0 !important; }
.dpx-c { position: absolute; left: 0; bottom: 0; width: 1440px; height: 900px; zoom: var(--uz); }
.dpx-b { position: absolute; left: calc(var(--x, 0) * 1px); top: calc(var(--y, 0) * 1px); width: calc(var(--w, 0) * 1px); height: calc(var(--h, 0) * 1px); margin: 0; }

/* Every migrated block fills the box measured for it; the section's padding, height and Fluid Engine grid no longer
   apply, and the vertical alignment and padding the grid gave each block come from the measurement. */
#siteWrapper section.page-section.dps-p { padding: 0 !important; min-height: 0 !important; background: var(--dpx-bg, #fff) !important; }
.dps-b > .fe-block { position: absolute !important; inset: 0 !important; width: auto !important; height: auto !important; grid-area: auto !important; margin: 0 !important; transform: none !important; }
.dps-b > .fe-block > .sqs-block { display: flex; flex-direction: column; justify-content: var(--dps-align); height: 100%; padding: var(--dps-pad) !important; box-sizing: var(--dps-sizing); }
/* Panel background (video or photo), as the migrated section drew it: 1 px past the top left edge; in its migrated
   .section-background wrapper where a page script needs it (/kids). */
.dps-bgwrap { position: absolute !important; top: -1px !important; left: -1px !important; width: 100% !important; height: 100% !important; overflow: hidden; transform: none !important; }
.dps-bgwrap > .dps-bg { top: 0; left: 0; }
.dps-bg { position: absolute; top: -1px; left: -1px; width: 100%; height: 100%; object-fit: cover; }
