/*
 * 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.
 */

.tlwpb,
.tlwpb *,
.tlwpb *::before,
.tlwpb *::after {
	box-sizing: border-box;
}

.tlwpb .tlwpb-section {
	position: relative;
	display: block;
	margin: 0;
}

/* Content containers always span the section (also inside flex sections such as heroes). */
.tlwpb .tlwpb-section > .nsmw-container {
	width: 100%;
}

.tlwpb ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Keep theme heading decoration out; size/weight/color come from style.css. */
.tlwpb .tlwpb-heading {
	text-transform: none !important;
	letter-spacing: normal !important;
}

.tlwpb img {
	max-width: 100%;
	height: auto;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.tlwpb a:focus-visible,
.tlwpb button:focus-visible,
.tlwpb input:focus-visible {
	outline: 2px solid #F47730;
	outline-offset: 3px;
}

.tlwpb .tlwpb-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.
 */
.tlwpb--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(.tlwpb) {
	padding: 0 !important;
}

.main-container .row-container .row-parent.tlwpb-row {
	padding: 0 !important;
}

/* ---------- Per-instance overrides from WPBakery ---------- */
/* Each rule only applies when that value is set on the section. */

.tlwpb[style*="--tl-bg:"] > .tlwpb-section { background: var(--tl-bg) !important; }
.tlwpb[style*="--tl-text:"] .tlwpb-text { color: var(--tl-text) !important; }
.tlwpb[style*="--tl-heading:"] .tlwpb-heading { color: var(--tl-heading) !important; }
.tlwpb[style*="--tl-container:"] .nsmw-container { max-width: var(--tl-container) !important; }

.tlwpb[style*="--tl-accent:"] .torttext { color: var(--tl-accent) !important; }
.tlwpb[style*="--tl-accent:"] .tl-link:hover { color: var(--tl-accent) !important; }
.tlwpb[style*="--tl-accent:"] .nsum-prim-btn { background: var(--tl-accent) !important; border-color: var(--tl-accent) !important; }
.tlwpb[style*="--tl-accent:"] .nsum-prim-btn:hover { background: #FFFFFF !important; border-color: #181818 !important; }

@media only screen and (min-width: 1201px) {
	.tlwpb[style*="--tl-pt:"] > .tlwpb-section { padding-top: var(--tl-pt) !important; }
	.tlwpb[style*="--tl-pb:"] > .tlwpb-section { padding-bottom: var(--tl-pb) !important; }
	.tlwpb[style*="--tl-px:"] > .tlwpb-section { padding-left: var(--tl-px) !important; padding-right: var(--tl-px) !important; }
}

@media only screen and (min-width: 771px) and (max-width: 1200px) {
	.tlwpb[style*="--tl-pt-t:"] > .tlwpb-section { padding-top: var(--tl-pt-t) !important; }
	.tlwpb[style*="--tl-pb-t:"] > .tlwpb-section { padding-bottom: var(--tl-pb-t) !important; }
	.tlwpb[style*="--tl-px-t:"] > .tlwpb-section { padding-left: var(--tl-px-t) !important; padding-right: var(--tl-px-t) !important; }
}

@media only screen and (max-width: 770px) {
	.tlwpb[style*="--tl-pt-m:"] > .tlwpb-section { padding-top: var(--tl-pt-m) !important; }
	.tlwpb[style*="--tl-pb-m:"] > .tlwpb-section { padding-bottom: var(--tl-pb-m) !important; }
	.tlwpb[style*="--tl-px-m:"] > .tlwpb-section { padding-left: var(--tl-px-m) !important; padding-right: var(--tl-px-m) !important; }
}

/* Columns per device (card grids). */
.tlwpb[style*="--tl-cols:"] .tlwpb-grid { grid-template-columns: repeat(var(--tl-cols), minmax(0, 1fr)) !important; }

@media only screen and (max-width: 1080px) {
	.tlwpb[style*="--tl-cols-t:"] .tlwpb-grid { grid-template-columns: repeat(var(--tl-cols-t), minmax(0, 1fr)) !important; }
}

@media only screen and (max-width: 770px) {
	.tlwpb[style*="--tl-cols-m:"] .tlwpb-grid { grid-template-columns: repeat(var(--tl-cols-m), minmax(0, 1fr)) !important; }
}

/* Extra button variants (on top of .nsum-prim-btn-tranparent). */
.tlwpb .tlwpb-btn--outline-light { background: transparent !important; border-color: #77787A !important; color: #FFFFFF !important; }
.tlwpb .tlwpb-btn--outline-dark { background: transparent !important; border-color: #181818 !important; color: #181818 !important; }
.tlwpb .tlwpb-btn--outline-light:hover { background: #FFFFFF !important; border-color: #181818 !important; color: #181818 !important; }
.tlwpb .tlwpb-btn--outline-dark:hover { background: #181818 !important; color: #FFFFFF !important; }

/* ---------- Two columns: image side per instance ---------- */

.tlwpb .tlwpb-split > * { min-width: 0; }
.tlwpb .tlwpb-split--image-left .tlwpb-split__media { order: -1; }
.tlwpb .tlwpb-split--image-right .tlwpb-split__media { order: 2; }

@media only screen and (max-width: 770px) {
	/* On phones each section stacks in its source order, as in the design. */
	.tlwpb .tlwpb-split--image-left .tlwpb-split__media,
	.tlwpb .tlwpb-split--image-right .tlwpb-split__media {
		order: 0;
	}
}

/* ---------- Rich text (WPBakery editor output) ---------- */

/* WYSIWYG content inherits the wrapper's design class (.p2, .p3...). */
.tlwpb .tlwpb-richtext p,
.tlwpb .tlwpb-richtext li,
.tlwpb .tlwpb-richtext ul,
.tlwpb .tlwpb-richtext ol {
	margin: 0 !important;
	font-size: inherit !important;
	font-weight: inherit !important;
	line-height: inherit !important;
	color: inherit !important;
}

.tlwpb .tlwpb-richtext > *:not(:first-child) { margin-top: 16px !important; }
.tlwpb .tlwpb-richtext--loose > *:not(:first-child) { margin-top: 24px !important; }
.tlwpb .tlwpb-richtext--tight > *:not(:first-child) { margin-top: 21px !important; }
.tlwpb .tlwpb-richtext ul { padding-left: 20px !important; list-style: disc !important; }
.tlwpb .tlwpb-richtext ol { padding-left: 20px !important; list-style: decimal !important; }
.tlwpb .tlwpb-richtext a { text-decoration: underline !important; }
.tlwpb .tlwpb-richtext strong { font-weight: 700 !important; }

/* ---------- Images ---------- */

.tlwpb .tlwpb-media {
	position: relative;
	width: 100%;
	overflow: hidden;
	aspect-ratio: var(--ratio, 16 / 10);
	background: #D2D2D3;
}

.tlwpb .tlwpb-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Full-bleed background image + overlay (hero, CTA). */
.tlwpb .tlwpb-bg {
	position: absolute;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
}

.tlwpb .tlwpb-bg__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

.tlwpb .tlwpb-bg__overlay {
	position: absolute;
	inset: 0;
	background: var(--tl-overlay, rgba(24, 24, 24, .5));
}

/* ---------- Icons ---------- */

.tlwpb .tlwpb-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 0;
	color: inherit;
}

.tlwpb .tlwpb-icon svg {
	display: block;
	height: var(--tl-icon-size, 32px);
	width: auto;
	max-width: 100%;
}

.tlwpb .tlwpb-icon--font i {
	font-size: var(--tl-icon-size, 32px);
	line-height: 1;
}

.tlwpb .tlwpb-icon--image img {
	display: block;
	height: var(--tl-icon-size, 32px);
	width: auto;
}

.tlwpb[style*="--tl-icon-color:"] .tlwpb-icon { color: var(--tl-icon-color) !important; }

/* ---------- Visibility per device ---------- */

@media only screen and (min-width: 1081px) {
	.tlwpb-hide-desktop { display: none !important; }
}

@media only screen and (min-width: 771px) and (max-width: 1080px) {
	.tlwpb-hide-tablet { display: none !important; }
}

@media only screen and (max-width: 770px) {
	.tlwpb-hide-mobile { display: none !important; }
}
