/* Flex Layout Fixes - Ensures flexbox works properly with animations */

/* Preserve flex container behavior */
.flex, 
[class*="flex"],
.wp-block-group.is-layout-flex {
  display: flex !important;
}

/* Preserve grid container behavior */
.grid,
[class*="grid"] {
  display: grid !important;
}

/* Common flex utilities that should never be overridden */
.justify-center { justify-content: center !important; }
.justify-between { justify-content: space-between !important; }
.items-center { align-items: center !important; }
.flex-col { flex-direction: column !important; }
.flex-row { flex-direction: row !important; }

/* Target specific flex containers in components */
section .flex.max-lg\:flex-col,
section .flex.items-center,
section .flex.justify-between {
  display: flex !important;
}

/* Ensure button containers maintain flex behavior */
.flex.gap-4,
.flex.gap-8,
.flex.gap-16 {
  display: flex !important;
}

/* Specific fixes for content blocks */
.wp-block-nexus-blocks-content-generic .flex,
.wp-block-nexus-blocks-content-split-img .flex {
  display: flex !important;
}
