/**
 *
 * 	. Globals
 * 		- Structure
 * 		- Flex
 * 	. Typography
 * 	. Layout
 * 		- Common
 * 			- Tag, Button & Form Submit
 *		- Menu
 * 		- Carousel
 * 		- Form
 * 		- Full Width Row 2 Columns
 * 		- Blurb
 * 		- Button
 *		- Heading
 *		- Section Gallery
 * 		- Tag
 * 	. Modules
 * 		- Common
 * 			- Carousel
 * 		- Files
 * 		- Locations
 * 		- Testimonials
 *
 * 
 */

:root {

	--cpsb-globals-inc: 1;

	--cpsb-globals-gap: 30px;
	/*--cpsb-globals-layout-width: 80vw;*/
	 /* --plura-globals-w > 100dvw */
	--cpsb-globals-layout-full-width: 100dvw;
	--cpsb-globals-layout-full-ratio-1x1: 100dvw;
	--cpsb-globals-layout-full-ratio-2x3: calc( 100dvw * 2 / 3 );
	
	--cpsb-globals-layout-width: min( 100dvw * .8, 1080px);
	--cpsb-globals-layout-width-1-2: calc( var( --cpsb-globals-layout-width ) / 2 );
	--cpsb-globals-layout-width-1-4: calc( var( --cpsb-globals-layout-width ) / 4 );
	



	--cpsb-globals-layout-colx2-1x1-width: calc( var( --cpsb-globals-layout-width ) / 2 );

	--cpsb-globals-pad-big: calc( ( 100dvw - var(--cpsb-globals-layout-width) ) / 2 );
	--cpsb-globals-pad-small: var(--cpsb-globals-pad-big);

	--cpsb-globals-h2: calc( var(--cpsb-globals-layout-width) / 2 );
	--cpsb-globals-h3: calc( var(--cpsb-globals-layout-width) / 3 );
	--cpsb-globals-h4: calc( var(--cpsb-globals-layout-width) / 4 );	


	/* layout */
	--cpsb-globals-layout-section-gallery-w: var(--cpsb-globals-layout-width);
	--cpsb-globals-layout-section-gallery-cols: 4;


	/* layout: button */
	--cpsb-globals-layout-button-h: calc( 50px * var(--cpsb-globals-inc) );


}

@media (min-width: 768px) {

	:root {

		--cpsb-globals-gap: 30px;
		--cpsb-globals-pad-small: var(--cpsb-globals-gap);

	}

}


/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {

	:root {
		/* layout */
		--cpsb-globals-layout-section-gallery-cols: 5;
	}

}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
	:root {
		/* layout */
		--cpsb-globals-layout-section-gallery-cols: 6;
	}
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
	:root {
		/* layout */
		--cpsb-globals-layout-section-gallery-cols: 8;
	}
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
	:root {
		/* layout */
		--cpsb-globals-layout-section-gallery-cols: 10;
	}
}



/* Globals: Gap */
.et_pb_column {
	flex-wrap: wrap;
	gap: var(--cpsb-globals-gap);
}




/* Globals: Layout Square */
.cpsb-square {
	height: var(--cpsb-square-h);
}

.et_pb_column.cpsb-square {
	--cpsb-square-h: var(--cpsb-globals-layout-full-width);
}

@media (min-width: 768px) {

	.et_pb_column.cpsb-square {
		--cpsb-square-h: calc( var(--cpsb-globals-layout-width) / 2 );
	}


}


/* Globals: Structure */










/* Layout: Common - Button, Tag & Form Submit */
:is(.plura-wp-post-read-more, .cpsb-button, .cpsb-tag, .wpcf7 form.plura-wp-cf7 :is( input[type="submit"], button.action-button ) ) {
	/*--cpsb-item-height: 50px;
	
	--h: calc( var(--cpsb-item-height) * var(--cpsb-globals-inc) );*/

	align-items: center;
	border-radius: calc( var(--cpsb-globals-layout-button-h) / 2 );
	cursor: pointer;
	display: inline-flex;
	justify-content: center;
	height: var(--cpsb-globals-layout-button-h);
	padding-bottom: 0;
	padding-left: calc( var(--cpsb-globals-layout-button-h) / 2 );
	padding-right: calc( var(--cpsb-globals-layout-button-h) / 2 );
	padding-top: 0;
}

:is(.cpsb-button, .cpsb-tag) .et_pb_text_inner {
	display: contents;
}



/* Layout: Menu */
.et-menu .menu-item {
	display: block;
}

.et-menu > .menu-item > a:after  {
    -webkit-transform: unset !important;
	transform: unset !important;
}

.et-menu .menu-item.menu-item-has-children > a:after {
    position: unset;
}

.et-menu .sub-menu,
.et-menu .sub-menu .menu-item > a {
	width: unset;
}

.et-menu .sub-menu .sub-menu {
	--n: 10px;
	top: var(--n);
	left: calc(100% - var(--n) );
}

.et-menu .sub-menu .menu-item > a {
    white-space: nowrap;
}






/* Layout: Form */
.wpcf7 form.plura-wp-cf7 input[type="submit"] {
	width: auto;
}



/* Layout: Full Width Row 2 Columns */
.cpsb-row-fullwidth-col-2x .et_pb_column:not(.et_pb_specialty_column, .et_pb_column_single),
.cpsb-row-fullwidth-col-2x .et_pb_column:is(.et_pb_specialty_column, .et_pb_column_single) .et_pb_row_inner .et_pb_column {
	padding-bottom: var(--cpsb-globals-pad-small);
	padding-top: var(--cpsb-globals-pad-small);
}


.cpsb-row-fullwidth-col-2x .et_pb_column:not(.et_pb_specialty_column):nth-child(1),
.cpsb-row-fullwidth-col-2x .et_pb_column:is(.et_pb_specialty_column, .et_pb_column_single):nth-child(1) .et_pb_row_inner .et_pb_column {
	padding-left: var(--cpsb-globals-pad-big);
	padding-right: var(--cpsb-globals-pad-small);
}

.cpsb-row-fullwidth-col-2x .et_pb_column:not(.et_pb_specialty_column):nth-child(2),
.cpsb-row-fullwidth-col-2x .et_pb_column:is(.et_pb_specialty_column, .et_pb_column_single):nth-child(2) .et_pb_row_inner .et_pb_column {
	padding-left: var(--cpsb-globals-pad-small);
	padding-right: var(--cpsb-globals-pad-big);
}




/* Layout: Button */
.wp-block-buttons:has(.cpsb-button) {
	display: contents;
}



.wp-block-button.cpsb-button > a {
	color: unset;
	background-color: unset;
	padding: unset
}



/* Layout: Heading */
.cpsb-heading {
	width: 100%;
}



/* Section Gallery */
.cpsb-section-gallery {
	--cpsb-globals-layout-section-gallery-gap: 0px;
	/* --cpsb-globals-layout-section-gallery-imgsize: calc( var(--cpsb-globals-layout-section-gallery-w) / var(--cpsb-globals-layout-section-gallery-cols) ); */
	--cpsb-globals-layout-section-gallery-imgsize: calc( 
		
		( var(--cpsb-globals-layout-section-gallery-w) - var(--cpsb-globals-layout-section-gallery-gap) * ( var(--cpsb-globals-layout-section-gallery-cols) - 1 ) )
		
		/ var(--cpsb-globals-layout-section-gallery-cols)
	
	);

    display: flex;
    flex-wrap: wrap;
	justify-content: space-between;
	overflow: hidden;
	width: 100%;
}

.cpsb-section-gallery.cpsb-gallery-has-infinitescroll {
	--n: 1; /*--n: 2;*/ /* number of images that make the gallery height */
	flex-direction: column;
	height: calc( var(--cpsb-globals-layout-section-gallery-imgsize) * var(--n) );
	width: calc( round( var(--image-nr) / var(--n)  ) * var(--cpsb-globals-layout-section-gallery-imgsize) );
}


.cpsb-section-gallery a {
    display: contents;
	pointer-events: none;
}

.cpsb-section-gallery img {
    height: var(--cpsb-globals-layout-section-gallery-imgsize);
	object-fit: cover;
	pointer-events: all;
	width: var(--cpsb-globals-layout-section-gallery-imgsize);
}



/* .cpsb-section-gallery {
	--n: 80px;
		flex-direction: column;
		height: calc( var(--n) * 2 );
		overflow: hidden;
	}
	
	.cpsb-section-gallery img {
		width: var(--n);
		height: var(--n);
	}
 */



/* Layout: Tag */








/* Modules: Common */
.plura-wp-posts {
	--plura-wp-posts-cols: 2;
}

.plura-wp-posts .plura-wp-post {
	gap: calc( ( var(--cpsb-globals-gap) / 2 ) * var(--cpsb-globals-inc) );
}



.plura-wp-posts .plura-wp-post .plura-wp-post-featured-img,
.plura-wp-posts .plura-wp-post:not(.plura-wp-post-has-featured-img)::before {
	aspect-ratio: 4 / 3;
	width: 100%;
}

.plura-wp-posts .plura-wp-post .plura-wp-post-title {
	padding: 0;
}

.plura-wp-posts .plura-wp-post .plura-wp-post-featured-img {
	object-fit: cover;
}

.plura-wp-posts .plura-wp-post:not(.plura-wp-post-has-featured-img)::before {
	content: '';
	background: transparent url('../media/logo.svg') center / contain no-repeat;
}


@media (min-width: 768px) {

	.plura-wp-posts {
		--plura-wp-posts-cols: 3;	
	}

}

@media (min-width: 991px) {

	.plura-wp-posts {
		--plura-wp-posts-cols: 4;	
	}

}


/* Common: Posts - Carousel */
.plura-wp-posts.plura-wp-f-carousel .f-carousel__dots {
	padding: unset;
}

.plura-wp-posts.plura-wp-f-carousel .plura-wp-post {
	width: calc( ( var(--cpsb-globals-layout-width) - var(--plura-wp-posts-gap) * ( var(--plura-wp-posts-cols) - 1 ) ) / var(--plura-wp-posts-cols) );
}






/* Common: Posts [Grid] */ /* Files / Locations */
/*.plura-wp-posts:is([data-type='cpsb_doc'], [data-type='cpsb_location']*/
.plura-wp-posts:not(.plura-wp-f-carousel) {
	--n: 1;
	display: grid;
	gap: var(--cpsb-globals-gap);
	grid-template-columns: repeat(var(--n), 1fr);	
}

@media (min-width: 768px) {

	.plura-wp-posts:not(.plura-wp-f-carousel) {
		--n: 3;
	}

}




/* Modules: Files */
.plura-wp-posts[data-type='cpsb_doc'] {
	--n: 2;
	gap: 0;
}

.plura-wp-posts[data-type='cpsb_doc'] .plura-wp-post {
	aspect-ratio: 1 / 1;
	padding: calc( var(--cpsb-globals-gap) / 2 );
	position: relative;
}

.plura-wp-posts[data-type='cpsb_doc'] .plura-wp-post :is(.plura-wp-post-title) {
	position: relative;
	z-index: 2;
}

.plura-wp-posts[data-type='cpsb_doc'] .plura-wp-post:nth-child(odd) {
	background-color: lightgrey;
}

.plura-wp-posts[data-type='cpsb_doc'] .plura-wp-post:nth-child(even) {
	background-color: lightslategrey;
}


@media (min-width: 961px) {

	.plura-wp-posts[data-type='cpsb_doc'] {
		--n: 4;
	}

}

/* Modules: Locations */
