/*
 * Triolight WPBakery Sections — plugin layer.
 *
 * Typography, colors, buttons, containers, grids, spacing and breakpoints
 * all come from the Triolight design system (style.css), which loads first.
 * This file only adds what style.css does not cover:
 *   - per-instance overrides set in WPBakery (only when a value is set),
 *   - the full-width breakout, images, icons and background layers.
 */

.tlpwpb,
.tlpwpb *,
.tlpwpb *::before,
.tlpwpb *::after {
	box-sizing: border-box;
}

.tlpwpb .tlpwpb-section {
	position: relative;
	display: block;
	margin: 0;
}

/* Content containers always span the section (also inside flex sections such as heroes). */
.tlpwpb .tlpwpb-section > .nsmw-container {
	width: 100%;
}

.tlpwpb ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Keep theme heading decoration out; size/weight/color come from style.css. */
.tlpwpb .tlpwpb-heading {
	text-transform: none !important;
	letter-spacing: normal !important;
}

.tlpwpb img {
	max-width: 100%;
	height: auto;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.tlpwpb a:focus-visible,
.tlpwpb button:focus-visible,
.tlpwpb input:focus-visible {
	outline: 2px solid #F47730;
	outline-offset: 3px;
}

.tlpwpb .tlpwpb-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- Width ---------- */

/*
 * Full width: break out of the row/column/theme container so the section
 * background spans the window; content stays in .nsmw-container (1440px).
 * frontend.js replaces the 100vw estimate with exact pixel values.
 */
.tlpwpb--full {
	position: relative;
	width: 100vw;
	max-width: none;
	margin-left: calc(50% - 50vw);
	margin-right: 0;
}

/* Boxed uses the design's .tl-box frame. */

/*
 * Theme rows that hold a Triolight section get no padding, so sections sit
 * directly against each other as in the design (Uncode: .row-parent).
 * Two rules on purpose: a browser without :has() drops the whole rule it is
 * in, so the class added by frontend.js must stay in a rule of its own.
 */
.main-container .row-container .row-parent:has(.tlpwpb) {
	padding: 0 !important;
}

.main-container .row-container .row-parent.tlpwpb-row {
	padding: 0 !important;
}

/* ---------- Per-instance overrides from WPBakery ---------- */
/* Each rule only applies when that value is set on the section. */

.tlpwpb[style*="--tl-bg:"] > .tlpwpb-section { background: var(--tl-bg) !important; }
.tlpwpb[style*="--tl-text:"] .tlpwpb-text { color: var(--tl-text) !important; }
.tlpwpb[style*="--tl-heading:"] .tlpwpb-heading { color: var(--tl-heading) !important; }
.tlpwpb[style*="--tl-container:"] .nsmw-container { max-width: var(--tl-container) !important; }

.tlpwpb[style*="--tl-accent:"] .torttext { color: var(--tl-accent) !important; }
.tlpwpb[style*="--tl-accent:"] .tl-link:hover { color: var(--tl-accent) !important; }
.tlpwpb[style*="--tl-accent:"] .nsum-prim-btn { background: var(--tl-accent) !important; border-color: var(--tl-accent) !important; }
.tlpwpb[style*="--tl-accent:"] .nsum-prim-btn:hover { background: #FFFFFF !important; border-color: #181818 !important; }

@media only screen and (min-width: 1201px) {
	.tlpwpb[style*="--tl-pt:"] > .tlpwpb-section { padding-top: var(--tl-pt) !important; }
	.tlpwpb[style*="--tl-pb:"] > .tlpwpb-section { padding-bottom: var(--tl-pb) !important; }
	.tlpwpb[style*="--tl-px:"] > .tlpwpb-section { padding-left: var(--tl-px) !important; padding-right: var(--tl-px) !important; }
}

@media only screen and (min-width: 771px) and (max-width: 1200px) {
	.tlpwpb[style*="--tl-pt-t:"] > .tlpwpb-section { padding-top: var(--tl-pt-t) !important; }
	.tlpwpb[style*="--tl-pb-t:"] > .tlpwpb-section { padding-bottom: var(--tl-pb-t) !important; }
	.tlpwpb[style*="--tl-px-t:"] > .tlpwpb-section { padding-left: var(--tl-px-t) !important; padding-right: var(--tl-px-t) !important; }
}

@media only screen and (max-width: 770px) {
	.tlpwpb[style*="--tl-pt-m:"] > .tlpwpb-section { padding-top: var(--tl-pt-m) !important; }
	.tlpwpb[style*="--tl-pb-m:"] > .tlpwpb-section { padding-bottom: var(--tl-pb-m) !important; }
	.tlpwpb[style*="--tl-px-m:"] > .tlpwpb-section { padding-left: var(--tl-px-m) !important; padding-right: var(--tl-px-m) !important; }
}

/* Columns per device (card grids). */
.tlpwpb[style*="--tl-cols:"] .tlpwpb-grid { grid-template-columns: repeat(var(--tl-cols), minmax(0, 1fr)) !important; }

@media only screen and (max-width: 1080px) {
	.tlpwpb[style*="--tl-cols-t:"] .tlpwpb-grid { grid-template-columns: repeat(var(--tl-cols-t), minmax(0, 1fr)) !important; }
}

@media only screen and (max-width: 770px) {
	.tlpwpb[style*="--tl-cols-m:"] .tlpwpb-grid { grid-template-columns: repeat(var(--tl-cols-m), minmax(0, 1fr)) !important; }
}

/* Extra button variants (on top of .nsum-prim-btn-tranparent). */
.tlpwpb .tlpwpb-btn--outline-light { background: transparent !important; border-color: #77787A !important; color: #FFFFFF !important; }
.tlpwpb .tlpwpb-btn--outline-dark { background: transparent !important; border-color: #181818 !important; color: #181818 !important; }
.tlpwpb .tlpwpb-btn--outline-light:hover { background: #FFFFFF !important; border-color: #181818 !important; color: #181818 !important; }
.tlpwpb .tlpwpb-btn--outline-dark:hover { background: #181818 !important; color: #FFFFFF !important; }

/* ---------- Two columns: image side per instance ---------- */

.tlpwpb .tlpwpb-split > * { min-width: 0; }
.tlpwpb .tlpwpb-split--image-left .tlpwpb-split__media { order: -1; }
.tlpwpb .tlpwpb-split--image-right .tlpwpb-split__media { order: 2; }

@media only screen and (max-width: 770px) {
	/* On phones each section stacks in its source order, as in the design. */
	.tlpwpb .tlpwpb-split--image-left .tlpwpb-split__media,
	.tlpwpb .tlpwpb-split--image-right .tlpwpb-split__media {
		order: 0;
	}
}

/* ---------- Rich text (WPBakery editor output) ---------- */

/* WYSIWYG content inherits the wrapper's design class (.p2, .p3...). */
.tlpwpb .tlpwpb-richtext p,
.tlpwpb .tlpwpb-richtext li,
.tlpwpb .tlpwpb-richtext ul,
.tlpwpb .tlpwpb-richtext ol {
	margin: 0 !important;
	font-size: inherit !important;
	font-weight: inherit !important;
	line-height: inherit !important;
	color: inherit !important;
}

.tlpwpb .tlpwpb-richtext > *:not(:first-child) { margin-top: 16px !important; }
.tlpwpb .tlpwpb-richtext--loose > *:not(:first-child) { margin-top: 24px !important; }
.tlpwpb .tlpwpb-richtext--tight > *:not(:first-child) { margin-top: 21px !important; }
.tlpwpb .tlpwpb-richtext ul { padding-left: 20px !important; list-style: disc !important; }
.tlpwpb .tlpwpb-richtext ol { padding-left: 20px !important; list-style: decimal !important; }
.tlpwpb .tlpwpb-richtext a { text-decoration: underline !important; }
.tlpwpb .tlpwpb-richtext strong { font-weight: 700 !important; }

/* ---------- Images ---------- */

.tlpwpb .tlpwpb-media {
	position: relative;
	width: 100%;
	overflow: hidden;
	aspect-ratio: var(--ratio, 16 / 10);
	background: #D2D2D3;
}

.tlpwpb .tlpwpb-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Full-bleed background image + overlay (hero, CTA). */
.tlpwpb .tlpwpb-bg {
	position: absolute;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
}

.tlpwpb .tlpwpb-bg__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

.tlpwpb .tlpwpb-bg__overlay {
	position: absolute;
	inset: 0;
	background: var(--tl-overlay, rgba(24, 24, 24, .5));
}

/* ---------- Icons ---------- */

.tlpwpb .tlpwpb-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 0;
	color: inherit;
}

.tlpwpb .tlpwpb-icon svg {
	display: block;
	height: var(--tl-icon-size, 32px);
	width: auto;
	max-width: 100%;
}

.tlpwpb .tlpwpb-icon--font i {
	font-size: var(--tl-icon-size, 32px);
	line-height: 1;
}

.tlpwpb .tlpwpb-icon--image img {
	display: block;
	height: var(--tl-icon-size, 32px);
	width: auto;
}

.tlpwpb[style*="--tl-icon-color:"] .tlpwpb-icon { color: var(--tl-icon-color) !important; }

/* ---------- Visibility per device ---------- */

@media only screen and (min-width: 1081px) {
	.tlpwpb-hide-desktop { display: none !important; }
}

@media only screen and (min-width: 771px) and (max-width: 1080px) {
	.tlpwpb-hide-tablet { display: none !important; }
}

@media only screen and (max-width: 770px) {
	.tlpwpb-hide-mobile { display: none !important; }
}

/* Heading alignment option */
.tlpwpb.tlpwpb--h-left .tlpwpb-title,
.tlpwpb.tlpwpb--h-center .tlpwpb-title,
.tlpwpb.tlpwpb--h-right .tlpwpb-title {
	align-self: stretch !important;
	width: 100%;
}

.tlpwpb.tlpwpb--h-left .tlpwpb-title { text-align: left !important; }
.tlpwpb.tlpwpb--h-center .tlpwpb-title { text-align: center !important; }
.tlpwpb.tlpwpb--h-right .tlpwpb-title { text-align: right !important; }
