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

	#head {
		position: sticky;
		top: 0;
		height: 73px;
		padding: 18px 0 19px;
		z-index: 1000;
	}
	
	#head-icons > a:hover {
		background: initial;
	}

	#nav-burger {
		display: block;
	}
	
	#nav-main-wrap {
		display: none;
	}
	
	.overlay #nav-main-wrap {
		display: block;
		position: fixed;
		left: 0;
		top: 73px;
		bottom: 0;
		right: 0;
		background: rgba(0,0,0,0.75);
		z-index: 1001;
	}
	
	.overlay #nav-main {
		background: var(--palokatko-yellow);
		padding: 18px var(--site-elements-padding) 32px;
		font: 900 2rem/1 elza-narrow, elza, sans-serif;
		letter-spacing: -0.01em;
		flex-flow: column;
		align-items: flex-start;
		gap: 18px;
	}
	
	#nav-main a:after {
		display: none;
	}
	
	#nav-main a {
		line-height: 1;
	}


	.ce-block.ce-hero-image {
		min-height: calc(100vh - 73px);
	}

}


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

	:root {
		--site-elements-padding: 32px;
		--site-wrapper-padding: 18px;
	}
	
	.ce-block.ce-width-wrapper {
		box-sizing: border-box;
		padding-left: 18px;
		padding-right: 18px;
	}

	
	#head {
		padding-right: 42px;
	}

	body .column.parts-6 { width: calc((100% - var(--site-column-margin) * 2.5) / 5); }
	body .column.parts-6 + .parts-6 { margin-left: calc(var(--site-column-margin) / 2) !important; }
	body .column.parts-6:nth-child(5n+1) { margin-left: 0 !important; }
	body .column.parts-6:nth-child(1n+6) { margin-top: calc(var(--site-column-margin) / 2); }

}


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

	body .column.parts-5 { width: calc((100% - var(--site-column-margin) * 3) / 4); }
	body .column.parts-5 + .parts-5 { margin-left: var(--site-column-margin) !important; }
	body .column.parts-5:nth-child(4n+1) { margin-left: 0 !important; }
	body .column.parts-5:nth-child(1n+5) { margin-top: calc(var(--site-column-margin) * 0.75); }
	
	body .column.parts-6 { width: calc((100% - var(--site-column-margin) * 3) / 4); }
	body .column.parts-6 + .parts-6 { margin-left: var(--site-column-margin) !important; }
	body .column.parts-6:nth-child(4n+1) { margin-left: 0 !important; }
	body .column.parts-6:nth-child(1n+5) { margin-top: calc(var(--site-column-margin) * 0.75); }
	
}


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

	body .ce-block .column:not(.parts-6) {
		display: block;
		width: 100% !important;
		margin-left: 0 !important;
	}
	
	body .ce-multi-columns .wrapper {
		display: block;
	}
	
	body .ce-block .column:not(.parts-6) + .column:not(.ce-imagecolumn):not(.ce-textcolumn) {
		margin: var(--site-paragraph-padding) 0 0 0 !important;
	}
	
		
	body .column.parts-6 { width: calc((100% - var(--site-column-margin) * 1) / 2); }
	body .column.parts-6:nth-child(2n+1) { margin-left: 0 !important; }
	body .column.parts-6:nth-child(1n+3) { margin-top: calc(var(--site-column-margin) * 0.75); }
	

	body .ce-text-image .wrapper {
		display: flex;
		flex-flow: row wrap;
	}
	
	body .ce-text-image .ce-imagecolumn {
		order: 1;
	}
	
	body .ce-text-image .ce-textcolumn {
		margin-top: var(--site-paragraph-padding);
		order: 2;
	}

	body .ce-text-image.ce-fullwidth-image .ce-textcolumn {
		margin-top: var(--site-elements-padding);
		margin-bottom: var(--site-elements-padding);
	}
	
	body .ce-text-image.ce-image-right .ce-textcolumn > :first-child {
		margin-top: 0 !important;
	}

	body .ce-text-image.ce-image-right .ce-textcolumn > :last-child {
		margin-bottom: 0 !important;
	}

	body .ce-text-image.ce-fullwidth-image .fullwidth-image {
		position: relative;
		left: auto !important;
		top: auto;
		bottom: auto;
		right: auto !important;
		width: calc(100% + var(--site-wrapper-padding) * 2) !important;
		margin-left: calc(var(--site-wrapper-padding) * -1);
	}
	
	body .ce-text-image.ce-fullwidth-image .fullwidth-image img {
		display: block;
		position: static;
		height: auto;
	}
	
	body .ce-text-image.ce-image-left.ce-fill-imagecolumn .column:first-child > img,
	body .ce-text-image.ce-image-right.ce-fill-imagecolumn .column:last-child > img {
		width: 100%;
	}

	body .ce-text-image.ce-fill-imagecolumn .ce-textcolumn {
		margin-bottom: 0;
	}
	
	body .ce-block.ce-bgimage.ce-imagesized {
		position: static;
		padding-top: var(--element-padding-top, var(--site-elements-padding)) !important;
		padding-bottom: var(--element-padding-bottom, var(--site-elements-padding));
	}

	body .ce-block.ce-bgimage.ce-imagesized > div {
		position: static;
		-webkit-transform: none;
		transform: none;
	}
	
	
	#large-modal-content-wrap {
		width: 100% !important;
		max-width: calc(100vw - 30px) !important;
		max-height: calc(100vh - 70px) !important;
	}
	
	.type-text #large-modal-content {
		padding: 30px;
	}
	
	.type-text #large-modal-content > :last-child {
		margin-bottom: 30px;
	}
	
	
	#tail {
		padding: 32px 0;
	}
	
	#tail-columns {
		align-items: flex-start;
		justify-content: flex-start;
		gap: var(--site-paragraph-padding);
		flex-flow: column;
	}
	
	#tail .tail-column {
		flex: 1;
	}

}


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

	#large-modal-content-wrap {
		width: 100% !important;
		max-width: calc(100vw - 20px) !important;
		max-height: calc(100vh - 60px) !important;
	}
	
	.type-text #large-modal-content {
		padding: 20px;
	}

}

