/*
 * Look of the Gutenberg blocks that the converter writes (inc/blocks). Loaded on the front end and in the editor.
 * Class contract: vb-* for core block structure, vr-el-<elementor id> for per element values (stored in post meta
 * _varus_page_css), vr-* for the markup of the varus/ blocks (styled by components.css).
 */

:root {
	--vb-curve: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 100' preserveAspectRatio='none'%3E%3Cpath d='M0,0c0,0,0,6,0,6.7c0,18,240.2,93.6,615.2,92.6C989.8,98.5,1000,25,1000,6.7c0-0.7,0-6.7,0-6.7H0z'/%3E%3C/svg%3E");
	--vb-curve-neg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 100' preserveAspectRatio='none'%3E%3Cpath d='M615.2,96.7C240.2,97.8,0,18.9,0,0v100h1000V0C1000,19.2,989.8,96,615.2,96.7z'/%3E%3C/svg%3E");
}

/* ---------- Sections (core/group), rows (core/columns), columns (core/column) ---------- */
.wp-block-group.vr-section {
	position: relative;
	width: 100%;
	box-sizing: border-box;
}

.wp-block-group.vr-section.vr-stretch {
	width: var(--vr-vw, 100vw);
	max-width: none;
	margin-left: calc(50% - var(--vr-vw, 100vw) / 2);
}

.wp-block-group.vr-section.vb-minh {
	display: flex;
	flex-direction: column;
}

.wp-block-group.vr-section.vb-minh.vb-va-center { justify-content: center; }
.wp-block-group.vr-section.vb-minh.vb-va-end { justify-content: flex-end; }

.wp-block-columns.vb-cols {
	position: relative;
	z-index: 1;
	display: flex;
	flex-wrap: wrap !important;
	width: 100%;
	gap: 0;
	margin-top: 0;
	margin-bottom: 0;
	box-sizing: border-box;
}

.wp-block-column.vb-col {
	position: relative;
	display: flex;
	flex-direction: column;
	flex-grow: 0;
	min-width: 0;
	min-height: 1px;
	box-sizing: border-box;
	word-break: normal;
	overflow-wrap: normal;
}

/* Elementor stacked every column below 768 px. Zero specificity so a per column rule (.vr-el-ID) can override it. */
@media (max-width: 767px) {
	:where(.vb-cols > .vb-col) { flex-basis: 100% !important; }
}

/* Widgets inside a column: 20 px between them like Elementor. Inline margins of a block still win. */
.wp-block-column.vb-col > * { margin-top: 0; margin-bottom: 20px; }
.wp-block-column.vb-col > :last-child { margin-bottom: 0; }

/* text blocks of a column keep the 10 px of a paragraph, the last block of a text widget adds the 20 px widget gap (class vb-wend) */
.wp-block-column.vb-col > p,
.wp-block-column.vb-col > ul,
.wp-block-column.vb-col > ol { margin-bottom: 10px; }
.wp-block-column.vb-col > ul.vb-iconlist:not(:last-child) { margin-bottom: 20px; } /* an icon list is a widget: 20 px gap, not the 10 px of a text list */
.wp-block-column.vb-col > .vb-wend { margin-bottom: 30px; }
.wp-block-column.vb-col > .wp-block-group.vb-inner { margin-bottom: 0; }
.wp-block-column.vb-col > .vb-wend:last-child { margin-bottom: 10px; }
.wp-block-group.vb-text { display: flow-root; }
.wp-block-group.vb-text > p,
.wp-block-group.vb-text > ul,
.wp-block-group.vb-text > ol { margin-top: 0; margin-bottom: 10px; }
.wp-block-group.vb-text > :is(h1, h2, h3, h4, h5, h6) { margin: 0 0 10px; }

/* vertical alignment: a section level value centres the content of every (stretched) column */
.vr-section.vb-va-start > .vb-cols > .vb-col { justify-content: flex-start; }
.vr-section.vb-va-center > .vb-cols > .vb-col { justify-content: center; }
.vr-section.vb-va-end > .vb-cols > .vb-col { justify-content: flex-end; }
.wp-block-column.vb-col.is-vertically-aligned-top { align-self: stretch; justify-content: flex-start; }
.wp-block-column.vb-col.is-vertically-aligned-center { align-self: stretch; justify-content: center; }
.wp-block-column.vb-col.is-vertically-aligned-bottom { align-self: stretch; justify-content: flex-end; }

/* overlay layer of a section (empty group) */
.wp-block-group.vb-overlay {
	position: absolute;
	inset: 0;
	max-width: none !important;
	margin: 0 !important;
	padding: 0;
	pointer-events: none;
}

/* ---------- Shape dividers (extension "Varus effects"): a curve drawn with a mask ---------- */
.vb-sdt, .vb-sdb { position: relative; isolation: isolate; } /* own stacking context: the divider (z-index -1) paints above the section background, below its content */
.vb-sdt { --vb-rt: 0deg; --vb-xt: 1; }
.vb-sdt--neg { --vb-rt: 180deg; }
.vb-sdt--flip { --vb-xt: -1; }
.vb-sdb { --vb-rb: 180deg; --vb-xb: 1; }
.vb-sdb--neg { --vb-rb: 0deg; }
.vb-sdb--flip { --vb-xb: -1; }

.vb-sdt::before,
.vb-sdb::after {
	content: "";
	position: absolute;
	left: 0;
	width: 100%;
	pointer-events: none;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
}

.vb-sdt::before {
	top: -1px;
	height: var(--vb-sdt-h, 100px);
	background-color: var(--vb-sdt-c, #fff);
	-webkit-mask-image: var(--vb-curve);
	mask-image: var(--vb-curve);
	-webkit-mask-size: calc(var(--vb-sdt-w, 100%) + 1.3px) 100%;
	mask-size: calc(var(--vb-sdt-w, 100%) + 1.3px) 100%;
	transform: rotate(var(--vb-rt)) scaleX(var(--vb-xt));
}

.vb-sdb::after {
	bottom: -1px;
	height: var(--vb-sdb-h, 100px);
	background-color: var(--vb-sdb-c, #fff);
	-webkit-mask-image: var(--vb-curve);
	mask-image: var(--vb-curve);
	-webkit-mask-size: calc(var(--vb-sdb-w, 100%) + 1.3px) 100%;
	mask-size: calc(var(--vb-sdb-w, 100%) + 1.3px) 100%;
	transform: rotate(var(--vb-rb)) scaleX(var(--vb-xb));
}

.vb-sdt--neg::before { -webkit-mask-image: var(--vb-curve-neg); mask-image: var(--vb-curve-neg); z-index: 1; }
.vb-sdb--neg::after { -webkit-mask-image: var(--vb-curve-neg); mask-image: var(--vb-curve-neg); }
.vb-sdb:not(.vb-sdb--neg)::after { z-index: 0; }
.vb-sdt.vb-sdt--above::before, .vb-sdb.vb-sdb--above::after { z-index: 2; }

[data-vr-popup] { cursor: pointer; }

/* ---------- Heading ---------- */
.wp-block-heading.vb-heading {
	padding: 0;
	line-height: 1;
	color: var(--vr-k-primary, #6ec1e4);
	font-family: var(--vr-font-heading, "Jura", sans-serif);
	font-weight: 600;
	text-transform: uppercase;
}

.vb-heading a { color: inherit; font-size: inherit; line-height: inherit; }

/* ---------- Image ---------- */
.wp-block-image.vb-image {
	margin-top: 0;
	margin-bottom: 20px;
	line-height: 0;
	text-align: center;
}

.wp-block-image.vb-image img {
	display: inline-block;
	max-width: 100%;
	height: auto;
	vertical-align: middle;
}

/* ---------- Buttons ---------- */
.wp-block-buttons.vb-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0;
}

.vb-btn .wp-block-button__link {
	display: inline-block;
	box-sizing: border-box;
	border: 0;
	background-color: var(--vr-k-accent, #61ce70);
	color: #fff;
	font-family: var(--vr-k-head, "Jura", sans-serif);
	font-weight: 500;
	line-height: 1;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: all 0.3s;
	word-break: normal;
}

.vb-btn .wp-block-button__link:hover,
.vb-btn .wp-block-button__link:focus { color: #fff; text-decoration: none; }
.vb-hover-grow .wp-block-button__link:hover,
.vb-hover-grow .wp-block-button__link:focus { transform: scale(1.1); }

/* ---------- Spacer and divider ---------- */
.wp-block-spacer.vb-spacer { height: 50px; }

:where(.wp-block-separator.vb-divider) {
	width: 100%;
	height: 0;
	margin: 15px 0;
	border: 0;
	border-top: 1px solid var(--vr-k-secondary, #54595f);
	opacity: 1;
	background: none;
}

.wp-block-separator.vb-divider { max-width: none; }

/* ---------- Accordion (core/details, exclusive through the name attribute) ---------- */
.vb-acc { text-align: left; }

.vb-acc details.wp-block-details {
	margin: 0;
	border: 1px solid var(--vr-k-line, #d4d4d4);
	box-sizing: border-box;
}

.vb-acc details.wp-block-details + details.wp-block-details { border-top: 0; }

.vb-acc summary {
	display: block;
	margin: 0;
	padding: 15px 20px;
	color: var(--vr-k-primary, #6ec1e4);
	font-family: var(--vr-k-head, "Jura", sans-serif);
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	list-style: none;
}

.vb-acc summary::-webkit-details-marker { display: none; }
.vb-acc summary::marker { content: ""; }
.vb-acc summary::before { content: "+"; display: inline-block; width: 1.2em; font-weight: 700; }
.vb-acc--right summary::before { float: right; text-align: right; }
.vb-acc details[open] summary { color: var(--vr-k-accent, #61ce70); }
.vb-acc details[open] summary::before { content: "\2212"; }
/* accordion with an icon: the icon replaces the plus and minus (closed: vb-ic-<icon>, open: vb-icact-<icon>) */
.vb-acc[class*="vb-ic-"] summary::before,
.vb-acc[class*="vb-ic-"] details[open] summary::before {
	content: "";
	width: 1.2em;
	height: 1em;
	vertical-align: -0.1em;
	background-color: currentColor;
	-webkit-mask: var(--vb-ic) center / 0.8em no-repeat;
	mask: var(--vb-ic) center / 0.8em no-repeat;
}
.vb-acc[class*="vb-icact-"] details[open] summary::before {
	-webkit-mask-image: var(--vb-ic-open);
	mask-image: var(--vb-ic-open);
}

.vb-acc details > summary + * { margin-top: 0; padding-top: 15px; border-top: 1px solid var(--vr-k-line, #d4d4d4); }
.vb-acc details > :not(summary) { margin-bottom: 10px; padding-left: 20px; padding-right: 20px; color: var(--vr-k-text, #7a7a7a); font-family: var(--vr-k-body, "Montserrat", sans-serif); font-weight: 400; }
.vb-acc details > :last-child { margin-bottom: 0; padding-bottom: 15px; }

@media (max-width: 767px) {
	.vb-acc summary { padding: 12px 15px; }
	.vb-acc details > :not(summary) { padding-left: 15px; padding-right: 15px; }
	.vb-acc details > summary + * { padding-top: 7px; }
	.vb-acc details > :last-child { padding-bottom: 7px; }
}

/* ---------- Icon list (core/list, icon drawn from the item class, see icons.css) ---------- */
.wp-block-list.vb-iconlist {
	margin: 0;
	padding: 0;
	list-style: none;
}

.vb-iconlist li {
	position: relative;
	display: flex;
	align-items: flex-start;
	margin: 0;
	padding: 0;
	color: var(--vr-k-secondary, #54595f);
	font-weight: 400;
}

.vb-iconlist li a { color: inherit; text-decoration: none; }

.vb-iconlist li[class*="vb-ic-"]::before {
	content: "";
	flex: 0 0 auto;
	box-sizing: content-box;
	width: calc(var(--vb-ic-size, 14px) * 1.25);
	height: var(--vb-ic-size, 14px);
	margin-right: var(--vb-ic-gap, 5px);
	background-color: var(--vb-ic-color, var(--vr-k-primary, #6ec1e4));
	-webkit-mask: var(--vb-ic) left center / contain no-repeat;
	mask: var(--vb-ic) left center / contain no-repeat;
}

/* the same icons on a button */
.vb-btn[class*="vb-ic-"] .wp-block-button__link::before {
	content: "";
	display: inline-block;
	width: 1em;
	height: 1em;
	margin-right: 5px;
	vertical-align: -0.125em;
	background-color: currentColor;
	-webkit-mask: var(--vb-ic) center / contain no-repeat;
	mask: var(--vb-ic) center / contain no-repeat;
}

.vb-btn.vb-ic-right .wp-block-button__link::before { display: none; }
.vb-btn.vb-ic-right .wp-block-button__link::after {
	content: "";
	display: inline-block;
	width: 1em;
	height: 1em;
	margin-left: 5px;
	vertical-align: -0.125em;
	background-color: currentColor;
	-webkit-mask: var(--vb-ic) center / contain no-repeat;
	mask: var(--vb-ic) center / contain no-repeat;
}

/* ---------- Image box, advanced heading, info box (groups of core blocks) ---------- */
.wp-block-group.vb-imagebox { text-align: center; }
.wp-block-group.vb-imagebox--left { display: flex; flex-direction: row; text-align: left; }
.wp-block-group.vb-imagebox--right { display: flex; flex-direction: row-reverse; text-align: right; }
.vb-imagebox--va-top { align-items: flex-start; }
.vb-imagebox--va-bottom { align-items: flex-end; }
.vb-imagebox--va-middle { align-items: center; }
.vb-imagebox .vb-imagebox__img { display: inline-block; margin: 0 auto 15px; max-width: 100%; line-height: normal; }
.vb-imagebox--left .vb-imagebox__img, .vb-imagebox--right .vb-imagebox__img { margin-top: 0; margin-bottom: 0; }
.vb-imagebox .vb-imagebox__img img { width: 100%; height: auto; max-width: 100%; vertical-align: baseline; }
.vb-imagebox__content { width: 100%; }
.vb-imagebox__title { margin: 0 0 10px; font-family: var(--vr-k-head); font-weight: 600; color: var(--vr-k-primary); }
.vb-imagebox__title a { color: inherit; }
.vb-imagebox__desc { margin: 0; color: var(--vr-k-text); font-family: var(--vr-k-body); font-weight: 400; }

@media (max-width: 767px) {
	.wp-block-group.vb-imagebox--left,
	.wp-block-group.vb-imagebox--right { display: block; text-align: center; }
	.vb-imagebox--left .vb-imagebox__img,
	.vb-imagebox--right .vb-imagebox__img { display: block; margin: 0 auto !important; line-height: 22px; }
}

.vb-advh { text-align: left; }
.vb-advh .vb-advh__heading { margin: 0 0 15px; font-weight: 600; font-family: var(--vr-k-head); }
.vb-advh .vb-advh__sub { margin: 15px 0 0; font-family: var(--vr-font-heading); font-weight: 400; color: #54595f; }
.vb-advh .vb-advh__sep { width: 20%; max-width: none; height: 0; margin: 0; padding: 3px 0 0; box-sizing: content-box; border: 0; border-top: 2px solid currentColor; opacity: 1; background: none; }
.vb-advh .vb-advh__desc { margin: 15px 0 10px; }
.vb-advh .vb-advh__desc.vb-nojustify { margin-bottom: 0; }
.vb-nojustify { text-align: inherit !important; }

.vb-infobox { display: block; }
.vb-infobox__title { margin: 0 0 10px; }
.vb-infobox .vb-infobox__sep { width: 40px; max-width: none; margin: 10px 0; border: 0; border-top: 2px solid currentColor; opacity: 1; }
.vb-infobox__desc { margin: 0 0 10px; }
.vb-infobox__link { font-weight: 700; }

/* ---------- Social links ---------- */
:where(.wp-block-social-links.vb-social) {
	display: flex;
	flex-wrap: wrap;
	margin: 0;
	padding: 0;
	gap: 0;
}

.vb-social .wp-social-link {
	margin: 0;
	border-radius: 10%;
	background-color: #818a91;
	color: #fff;
	font-size: var(--vb-icon-size, 25px);
	transition: background-color 0.3s, color 0.3s;
}

.vb-social .wp-social-link a { padding: var(--vb-icon-padding, 0.5em); color: inherit; font-size: var(--vb-icon-size, 25px); line-height: 1; }
.vb-social .wp-social-link svg { width: var(--vb-icon-size, 25px); height: var(--vb-icon-size, 25px); }

/* ---------- Map, logo, forms ---------- */
.vb-map iframe { display: block; width: 100%; height: 300px; border: 0; }
.vb-logo { line-height: 0; }

/* ---------- Content typography parts that the old .vr-text wrapper gave ---------- */
.vb-text { color: var(--vr-k-text, #7a7a7a); font-family: var(--vr-font-text, "Montserrat", sans-serif); font-weight: 400; }

/* ---------- varus/cta: overlay colours come from custom properties set by the block ---------- */
.vr-cta__overlay { background-color: var(--vr-cta-ov, transparent); }
.vr-cta:hover .vr-cta__overlay { background-color: var(--vr-cta-ov-h, var(--vr-cta-ov, transparent)); }

/* A Contact Form 7 shortcode widget outside a styled form group kept the The7 body colour (#85868c) in Elementor, not the widget text colour */
.wp-block-column.vb-col > .wp-block-contact-form-7-contact-form-selector { color: var(--vr-color-text, #85868c); }

/* Old site wide rule (The7 custom CSS option): `.elementor-widget-call-to-action a { border-radius: 30px; }`.
   It rounded every call-to-action card and every link inside one. The first rewrite only kept it for cards that had their own copy of it. */
.wp-block-varus-cta a {
	border-radius: 30px;
}
