/** ===========================================================================
 * rows
 * ============================================================================
 * Company Theme
 */


/** ---------------------------------------------------------------------------
 * flex rows
 * --------------------------------------------------------------------------*/

.flex-row-parent { display: flex; }

	.mask-image { position:relative; }

	.flex-row-picture picture {
		display: block;					/* otherwise defaults to inline, which causes it to collapse, which means that the image is not visible */
		position: relative;
		height: 100%;
		width: 100%;
		}
	
	.flex-row-parent .mask-image img:not(.row-reverse.flex-row-parent .mask-image img), .flex-row-picture .mask-image img {
		height: 100%;
		position: absolute;
		left: 0;
		top: 0;
		}

	.row-reverse.flex-row-picture .mask-image img {
		height: 100%;
		position: absolute;
		right: 0;
		top: 0;
		}


	.flex-row-parent .mask-image img:not(.wp-block-company-blocks-parent-breakout-bare .flex-row-parent .mask-image img), .flex-row-picture .mask-image img { width: 100%; }

	.wp-block-company-blocks-parent-breakout-bare .flex-row-parent .mask-image img { width: auto; }

	.flex-row-child p:last-child { margin-bottom: 0 !important }

		.flex-row-child ul:not(.list-decorated) {
			margin-left: var(--wp--preset--spacing--50);
			padding-left: 0;
			}

			.flex-row-child li:not(.list-decorated li)  { margin-left: var(--wp--preset--spacing--20); }


@media screen and (max-width: 800px) {

	.flex-row-parent {
		flex-direction: column;
		align-items: stretch;
		}

		.flex-row-picture {
			margin: var(--wp--preset--spacing--90) auto 0 auto;
			min-width: 40%;
			max-width: 60%;
			}

	}


@media screen and (min-width: 801px) {

	.flex-row-parent {

		/** default rows are reversed
		 * so that the image appears before the text
		 */

		flex-direction: row-reverse;
		align-items: flex-start;					/*  or 'center' to align heading centrally vertically */
		}

	.flex-row-picture:not(.row-reverse .flex-row-picture) {
		margin-right: var(--wp--preset--spacing--90);
		padding-right: var(--wp--preset--spacing--90);
		}

		.on_light .flex-row-picture:not(.row-reverse .flex-row-picture) { border-right: 1px var(--wp--preset--color--black-off) solid; }

		.on_dark .flex-row-picture:not(.row-reverse .flex-row-picture) { border-right: 1px var(--wp--preset--color--white-warm-light) solid; }

	.row-reverse .flex-row-picture {
		margin-left: var(--wp--preset--spacing--90);
		padding-left: var(--wp--preset--spacing--90);
		}

		.on_light .row-reverse .flex-row-picture { border-left: 1px var(--wp--preset--color--black-off) solid; }

		.on_dark.row-reverse .flex-row-picture { border-left: 1px var(--wp--preset--color--white-warm-light) solid; }

		.flex-row-parent ul {

			/* align lists left
			 * would not be required if 'align-items: center;'
			 * was not set for 'flex-row-parent' above
			*/
		
			align-self: flex-start;
		
			}

	.row-reverse { flex-direction: row; }

		.flex-row-picture {
			height: auto;						/* constrain image height to that of the width */
			min-width: 30%;
			max-width: 33%;
			}

	}

@media screen and (min-width: 940px) {

	/**
	 * 'desktop'
	 */

	.flex-row-child {

		/**
		 * expand to fill space when rows of copy do not natually span the full width
		 */

		flex-grow: 2;
		}

	}


/** ---------------------------------------------------------------------------
 * serpentine rows
 * --------------------------------------------------------------------------*/

ul#ca_list_images_serpentine {
	list-style: none;
	margin-left: 0;
	padding-left: 0;
	}

#ca_list_images_serpentine li:not(:last-of-type) { border-bottom: 1px var(--wp--preset--color--black-off) solid; }

#ca_list_images_serpentine li:first-of-type figure { margin-top: var(--wp--preset--spacing--100); }

#ca_list_images_serpentine li figure img {
	border-radius: var(--wp--custom--border-radius-panel);
	box-shadow: var(--wp--custom--box-shadow-card);
	}


@media screen and (max-width: 414px) {

	/* 'mobile' */


	#ca_list_images_serpentine li:not(:last-child) {

		/* the basic card */

		margin-bottom: var(--wp--preset--spacing--70);
		}

	#ca_list_images_serpentine li figure {
		margin-bottom: var(--wp--preset--spacing--70);

		/* reverse order so image comes after title and description */

		display: flex;
		flex-direction: column-reverse;
		}

	#ca_list_images_serpentine li figure img {
		align-self: center;
		margin: 0 auto var(--wp--preset--spacing--50) auto;
		width: 80%;
		height: auto;
		}

	}


@media screen and (min-width: 415px) {

	/* 'tablet' and above */

	#ca_list_images_serpentine li:not(:last-child) {

		/* the basic card */

		margin-bottom: var(--wp--preset--spacing--100);
		}

	#ca_list_images_serpentine li figure {

		/* the flex inner */

		display: flex;
		align-items: center;
		margin-bottom: var(--wp--preset--spacing--100);
		}

		#ca_list_images_serpentine li figure img {
			width: calc(25vw + 5vh);
			height: auto;
			}

		#ca_list_images_serpentine li figcaption p { margin-bottom: 0; }

		#ca_list_images_serpentine li:nth-child(odd) figure {

			/* image left */
			flex-direction: row;
			}

			#ca_list_images_serpentine li:nth-child(odd) figure img { margin-right: var(--wp--preset--spacing--60); }

		#ca_list_images_serpentine li:nth-child(even) figure {

			/* image right */
			flex-direction: row-reverse;
			}

			#ca_list_images_serpentine li:nth-child(even) figure img { margin-left: var(--wp--preset--spacing--60); }

	}