/*
 * Layout
 *
 */



/* Base Styles
–––––––––––––––––––––––––––––––––––––––––––––––––– */
/* NOTE
html is set to 62.5% so that all the REM measurements throughout Skeleton
are based on 10px sizing. So basically 1.5rem = 15px :) */

html {
 	font-size: 62.5%;
}
html,
body {
	min-height: 100dvh;
	height: auto;
	width: 100%;
	overflow-x: hidden;
	scroll-behavior: smooth;
	margin: 0;
	padding: 0;
	border: none;
}
body {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 0;
}
body.noscroll,
body.mobile-menu-open,
body.search-bar-open {
	overflow: hidden;
	min-height: 99vh;
	max-height: 100vh;
	position: fixed;
}
main {
	flex: 1;
}
section,
main article main,
main article main.container {
	padding-top: 5em;
	padding-bottom: 10em;
}
main article main.container {
	z-index: 2;
}

details summary { 
	cursor: pointer;
}  
details summary > * {
	display: inline;
}


body > main {
	position: relative;
	display: grid;
	grid-template-columns: var(--z-grid--colums-default);
}
main article {
	position: relative;
	grid-column: 1 / -1;
	justify-self: center;
	max-width: 78ch;
	height: auto;
	background: #fff;
	border: 1px solid #f1e7f0;
	border-radius: 3rem;
	padding: 5rem 10rem 5rem 10rem;
	margin-bottom: 15rem;
}
main article::before {
	content: "";
	position: absolute;
	height: 22rem;
	width: 27.1rem;
	right: -0.1rem;
	bottom: -8.3rem;
	background: transparent url(../img/bg-article-shape.svg) no-repeat right bottom / 100% 100%;
	pointer-events: none;
}
main article.has-image {
	padding: 2rem 0rem 9rem 10rem;
}
main article.has-image::before {
	background: transparent url(../img/bg-article-shape-img.svg) no-repeat right bottom / 100% 100%;
	z-index: 3;
	width: 33.71rem;
}
main article.has-image > * {
	grid-column: 1 / -4;
}
main article.has-image figure {
	position: absolute;
	top: 0;
	grid-column: 5 /-1;
	justify-self: end;
	width: 33.6rem;
	height: calc( 100% + 8.2rem );
	border-radius: var(--z-img-border-radius);
}
main article.has-image figure img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: bottom center;
	border-radius: var(--z-img-border-radius);
}

main article.page-intro > * {
	grid-column: 1 / -2;
}


section {
	position: relative;
	padding-top: var(--z-section-padding-default);
	padding-bottom: var(--z-section-padding-default);
}
section + section {
	/* padding-top: 0; */
	border: inherit;
}
.home section#main {
	padding-bottom: 4rem;	
}
section.prefooter {
	padding-bottom: 4rem;
}


@media only screen and (max-width: 1100px) {
	main article.has-image {
		padding: 5rem 5rem 5rem 5rem;
	}
	main article.has-image::before {
		background: transparent url(../img/bg-article-shape.svg) no-repeat right bottom / 100% 100%;
		z-index: 4;
		width: 27.1rem;
		bottom: -8.3rem;
	}
}

@media only screen and (max-width: 900px) {
	main article {
		padding: 5rem 2rem 5rem 2rem;
		background-color: transparent;
	}
	main article::before,
	main article.has-image::before {
		background-image: url(../img/bg-article-shape-mobile.svg);
		width: 27.1rem;
	}
	/* main article.has-image::before {
		background-image: url(../img/bg-article-shape-img-mobile.svg);
	} */
}




/*
 * 6col grid 
 * ======================================================== */
main {
	flex: 1;
/*
	max-width: 80rem;
	margin: auto;
	padding: 18rem 2rem 10rem 2rem;
*/
	width: 100%;
}
article,
.post-nav  {
	width: 100%;
	height: 100%;
	position: relative;
	display: grid;
	grid-template-columns: var(--z-grid--colums-default);
}
article > *,
.post-nav > * {
	grid-column: 2 / -2;
}
article > .text-with-image > * {
	grid-column: 2 / -2;
}

article.has-full-sidebar > aside + * {
	grid-column: 2 / 5;
}
article.has-full-sidebar .sidebar-float {
	grid-column: -3 /-1;
	grid-row: 2;
}






article > .wide,
article > .section-wide,
article > * > .wide {
	grid-column: 1 / -1;
	justify-self: center;
	width: 100%;
	max-width: 78ch;
	padding: 5ch;
}
article > .wide-right,
article > * > .wide-right {
	grid-column: 4 / -1;
	justify-self: start;
	width: 100%;
}
article > .wide-left,
article > * > .wide-left {
	grid-column: 1 / -4;
	justify-self: end;
	width: 100%;
}
article > .half-right,
article > * > .half-right {
	grid-column: 4 / 6;
	justify-self: start;
	width: 100%;
}
article > .half-left,
article > * > .half-left {
	grid-column: 2 / -4;
	justify-self: end;
	width: 100%;
}
article > .text-with-image {
	grid-column: 1 / -1;
	justify-self: center;
	width: 100%;
	position: relative;
	display: grid;
	grid-template-columns: var(--z-grid--colums-default);
	grid-template-rows: max-content max-content;
}
article > .text-with-image h2 {
   grid-row: 1;
}
article > .text-with-image .text {
	grid-row: 2;
	grid-column: 4 / 6;
}
article > .text-with-image.image-wide-right .text {
	grid-column: 2 / 4;
}
	

.text-columns.col-two > .text{
	columns: auto 2;
}
.text-columns.col-three > .text {
	columns: auto 3;
}
.text-columns > .text > * {
	margin-top: 0;
	margin-bottom: 0;
}

article *:has(+ h2):not(a[id]),
article a[id]:has(+ h2):not(section) {
	margin-bottom: 10rem;
}
article section {
	margin: 0;
}
article section.has-bg {
	margin-top: 10rem;
}


article section:has(+ a[id]) {
	margin-bottom: 0;
}
/*
 * Containers
 * ======================================================== */
/*
.container {
	position: relative;
	width: 100%;
	max-width: var(--z-container-normal-max-width);
	margin: 0 auto;
	padding-left: var(--z-container-padding-side);
	padding-right: var(--z-container-padding-side);
}
.main ul.container {
	padding-left: var(--z-container-padding-side);
	padding-right: var(--z-container-padding-side);
}
@media only screen and (min-width: var(--z-container-normal-max-width)) {
	.container {
		width: 100%;
	}
}

.container-small,
.small-text-col .main > .container {
	max-width:  var(--z-container-small-max-width);
}
.container.container-small {
	width: 100%;
	max-width:  var(--z-container-small-max-width);
}
.container-medium {
	max-width: var(--z-container-medium-max-width);
}
.container.container-medium {
	width: 100%;
	max-width: var(--z-container-medium-max-width);
}
.container-wide {
	max-width: var(--z-container-wide-max-width);
	width: auto;
}
.container.container-wide {
	width: 100%;
	max-width: var(--z-container-wide-max-width);
}
.container.container-portfolio {
	width: 100%;
	max-width: var(--z-container-portfolio-max-width);
}
.container-max {
	max-width: 9999px;
	width: auto;
	padding-left: 0;
	padding-right: 0;
}
.main ul.container-max {
	padding-left: 0;
	padding-right: 0;
}
/* prevent double width */
.container .container {
	width: 100%;
	padding-top: 0;
	padding-bottom: 0;
	padding-left: 0;
	padding-right: 0;
}

/*
.auto-col .container {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(28em,1fr));
}
@media screen and (max-width: 28em) {
	.auto-col .container {
		grid-template-columns: repeat(auto-fit, minmax(12em,1fr));
	}
}
@media screen and (max-width: 550px) {
	.auto-col .container {
		display: block;
	}
}
*/





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

}
@media only screen and (min-width: 1000px) {

}

body .padding-bottom-20 {
	padding-bottom: 20px !important;
}
body .padding-bottom-40 {
	padding-bottom: 40px !important;
}
body .padding-bottom-80 {
	padding-bottom: 80px !important;
}

.two-col {
	column-count: 2;
}
@media only screen and (max-width: 600px) {
	.two-col {
		column-count: 1;
	}
}


/*
 * Flex and Grid
 * ======================================================== */

.flex {
	display: flex;
	justify-content: space-between;
	align-items: center;
	align-content: center;
    flex-wrap: wrap;
	gap: var(--z-default-gap);
}
.flex-center {
	justify-content: center;
}
.flex-center > * {
	margin-left: 20px;
	margin-right: 20px;
}
.flex-top {
	align-items: flex-start;
}
.flex-bottom {
	align-items: flex-end;
}
.flex-right {
	justify-content: flex-end !important;
}
.flex-half {
	align-items: flex-start;
	gap: 50px;
}
.flex-half.flex-bottom {
	align-items: flex-end;
}
.flex-half.container > * {
	width: calc(50% - 25px);
}
.hero .flex-half.container > * {
	align-self: center;
}

@media (max-width: 800px) {
	.flex-half.container > * {
		width: 100%;
	}
	.hero .flex-half.container > * {
		align-self: start;
	}
}




/* correct floating columns */
.flex .columns {
	margin-left: 0 !important;
}

.grid {
    display: grid;
	/* grid-auto-rows: 1fr; *//* make rows the same height */
    grid-template-columns: repeat(auto-fill, minmax(28rem, 1fr));
    grid-gap: var(--z-default-gap);
	list-style: none;
}
ul.grid:not(.container) {
	padding-left: 0;
	list-style: none;
}
.grid.grid-half {
	grid-template-columns: repeat(auto-fill, minmax(38rem, 1fr));
	grid-gap: calc(2 * var(--z-default-gap));
}




/*
 * Panels
 * ======================================================== */

.panels-holder,
.panels {
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding-bottom: 4rem;
	flex-wrap: wrap;
	gap: var(--z-default-gap);
}
.panels .panel .panel {
	width: 100%;
}
.panels-holder .item-box,
.panels .panel {
	width: 31.33%;
	margin-bottom: 20px;
}
.panels-holder .item-box.item-box-2col,
.panels .panel.item-box-2col {
	width: 65.66%;
}
.panels.col2 .panel {
	width: calc(100%/2 - 30px);
}
.panels-holder.col4 .item-box,
.panels.col4 .panel {
	width: calc(100%/4 - 3*30px); /* 23.5% */
}
.panels-holder.col4 .item-box.item-box-2col,
.panels.col4 .panel.item-box-2col {
	width: 49%;
}
@media only screen and (max-width: 1200px) {
	.panels-holder .item-box,
	.panels-holder .item-box.item-box-2col,
	.panels .panel,
	.panels .panel.item-box-2col {
		width: 49%;
		width: 47.5%;
		margin-bottom: 20px;
	}
	.panels-holder.col4 .item-box,
	.panels.col4 .panel {
		width: 31.33%;
	}
}
@media only screen and (max-width: 960px) {
	.panels-holder .item-box,
	.panels-holder .item-box.item-box-2col,
	.panels .panel,
	.panels .panel.item-box-2col {
		width: 49%;
		width: 47.5%;
	}
	.panels-holder.col4 .item-box,
	.panels.col4 .panel {
		width: 47.5%;
	}
}
@media (max-width: 800px) {
	.panels-holder,
	.panels {
   		display: block;
	}
	.panels-holder .item-box,
	.panels-holder .item-box.item-box-2col,
	.panels .panel,
	.panels .panel.item-box-2col {
		width: 100%;
	}
	.panels-holder.col4 .item-box,
	.panels.col4 .panel {
		width: 100%;
	}
	.panels.col2 .panel {
		width: 100%;
	}
}
@media only screen and (max-width: 480px) {
	.panels-holder,
	.panels {
   		display: block;
	}
}



.panel {
	display: inline-block;
	width: 100%;
	position: relative;
	box-shadow: 0px 0px 14px 0px rgba(0,0,0,0.14);
}
.panel.transparent {
	background: transparent;
}
.panel.no-shade {
	box-shadow: 0px 0px 0px 0px rgba(0,0,0,0);
}
.panel.rounded {
	border-radius: 1rem;
}

.panel .inner {
	padding: var(--z-default-gap);
}
@media (max-width: 900px) {
	.panel .inner {
		padding: 2rem;
	}
}



.panel h2 {
	margin-top: 0;
}
.panel h2 .sub-title {
	display: block;
	font-size: 1.6rem;
	font-weight: 400;
	color: rgba(0,0,0,0.4);
}
.panel h3 {
	margin-top: 0;
}
.panel .inner p:last-child {
	margin-bottom: 0;
}





/*
 * Tables
 * ======================================================== */

th, td {
    padding: var(--z-table-cell-padding-top) var(--z-table-cell-padding-side);
    text-align: left;
    border-bottom: 1px solid #eaeaea;
}
th {
    font-weight: 600;
    font-size: 1.4rem;
    text-transform: uppercase;
    border-bottom: 1px solid #bbb;
    letter-spacing: 1px;
}




/*
 * Grid (isotope)
 * ======================================================== */

.grid-item,
.grid-sizer { width: 100%;}
.grid-item--width2 { width: 100%; }


/* Larger than mobile */
@media (min-width: 400px) {}

/* Larger than phablet (also point when grid becomes active) */
@media (min-width: 550px) {
	.grid-item,
	.grid-sizer { width: calc( 50% - 15px ); }
	.grid-item--width2 { width: 100%; }
}

/* Larger than tablet */
@media (min-width: 750px) {
	.grid-item,
	.grid-sizer { width: calc( 33.33% - 20px ); }
	.grid-item--width2 { width: calc( 66.67% - 40px ); }
}
/* Larger than desktop */
@media (min-width: 1000px) {}
/* Larger than Desktop HD */
@media (min-width: 1200px) {}






/*
 * Sidebars
 * ======================================================== */
aside.sidebar-float {
	margin-left: var(--z-large-gap);
	float: right;
	position: relative;
	width: 50%;
	max-width: 50%;
	margin-right: -13ch;
	z-index: 2;
}
.has-full-sidebar aside.sidebar-float {
	width: 100%;
	max-width: 26ch;
	max-height: max-content;
}
aside.sidebar-float .inner {
	padding: var(--z-large-gap);
	background: #f6f6f6;
}
aside.sidebar-float .inner > * {
	margin: var(--z-large-gap) 0 0 0;
}
aside.sidebar-float .inner > *:first-child {
	margin-top: 0;
}

article.has-full-sidebar aside.sidebar-float {
	grid-column: -3 / -1;
	grid-row-start: 3; /* if has header */
}
article.has-full-sidebar.hide-h1 aside.sidebar-float {
	grid-column: -3 / -1;
	grid-row-start: 2; /* if has header and hidden h1 */
}


@media (max-width: 960px) {
	 aside.sidebar-float {
		 margin-left: 0;
		 padding: 5rem 0px;
	 }
}
section.with-sidebar {
	padding-top: 0;
	padding-bottom: 0;
	margin-top: 0;
}
section.content-main {
	padding-top: 0;
	padding-bottom: 0;
	margin-top: 0;
	margin-bottom: 0;
}
