/* Keep Elementor's display box separate from the enlarged source used to clip it. */
.elementor-element a:has(> .df-image-crop:not(.df-atomic-crop)) { display: contents; }
.elementor-element a:focus-visible > .df-image-crop { outline: 2px solid currentColor; outline-offset: 2px; }
.df-image-crop:not(.df-atomic-crop) { display: inline-block; position: relative; overflow: hidden; vertical-align: middle; width: var(--df-crop-display-width, var(--df-crop-native-width, 100%)); max-width: var(--df-crop-max-width, 100%); height: var(--df-crop-display-height, auto); aspect-ratio: var(--df-crop-ratio); container-type: size; }
/* Atomic's style classes move to the display box; their dimensions win over defaults. */
:where(.df-atomic-crop) { display: block; position: relative; overflow: hidden; width: var(--df-crop-native-width, 100%); max-width: 100%; aspect-ratio: var(--df-crop-ratio); container-type: size; }
.df-crop-plane { position: absolute; display: block; overflow: hidden; width: var(--df-crop-plane-width, 100%); height: var(--df-crop-plane-height, 100%); left: var(--df-crop-position-x, 50%); top: var(--df-crop-position-y, 50%); transform: translate(calc(-1 * var(--df-crop-position-x, 50%)), calc(-1 * var(--df-crop-position-y, 50%))); }
.df-crop-plane > img, .df-image-crop > img { position: absolute !important; display: block; width: var(--df-crop-width) !important; height: var(--df-crop-height) !important; max-width: none !important; max-height: none !important; min-width: 0 !important; min-height: 0 !important; left: var(--df-crop-left) !important; top: var(--df-crop-top) !important; margin: 0 !important; object-fit: fill !important; object-position: center !important; }
/* Keep the direct img required by Justified Gallery; its item remains the display box. */
.df-ha-crop { overflow: hidden; container-type: size; aspect-ratio: var(--df-crop-ratio); --df-ha-plane-width: max(100cqw,calc(100cqh * var(--df-crop-aspect))); --df-ha-plane-height: max(100cqh,calc(100cqw / var(--df-crop-aspect))); }
.ha-image-grid__item.df-ha-crop { position: relative; }
.df-ha-crop > .df-ha-crop-source { position: absolute !important; display: block; width: calc(var(--df-ha-plane-width) / var(--df-ha-w)) !important; height: calc(var(--df-ha-plane-height) / var(--df-ha-h)) !important; left: calc((100cqw - var(--df-ha-plane-width)) / 2 - var(--df-ha-plane-width) * var(--df-ha-x) / var(--df-ha-w)) !important; top: calc((100cqh - var(--df-ha-plane-height)) / 2 - var(--df-ha-plane-height) * var(--df-ha-y) / var(--df-ha-h)) !important; max-width: none !important; max-height: none !important; margin: 0 !important; object-fit: fill !important; }
