/* Blog Posts widget. Everything is scoped under .itw-bp-wrapper, except the
 * video popup, which is appended to <body> and uses .itw-bp-modal. Colors
 * are custom properties so Elementor style controls only change variables. */

.itw-bp-wrapper {
	--itw-bp-columns: 3;
	--itw-bp-col-gap: 16px;
	--itw-bp-row-gap: 16px;
	--itw-bp-ratio: 3 / 2;
	--itw-bp-radius: 8px;
	--itw-bp-title: #16243f;
	--itw-bp-title-hover: #9a2c36;
	--itw-bp-text: #6a6f78;
	--itw-bp-meta: #6a6f78;
	--itw-bp-accent: #9a2c36;
	--itw-bp-border: #dde0e6;
	--itw-bp-card-bg: #f7f8fa;
	--itw-bp-card-border: #eceef2;
	--itw-bp-overlay: rgba(16, 26, 52, 0.88);
	--itw-bp-filter: #16243f;
	--itw-bp-filter-active: #ffffff;
	--itw-bp-filter-active-bg: #16243f;
	--itw-bp-btn: #9a2c36;
	--itw-bp-btn-hover: #16243f;
	--itw-bp-play: #9a2c36;
	--itw-bp-play-bg: #ffffff;
	--itw-bp-play-size: 34px;
	--itw-bp-more: #16243f;
	--itw-bp-more-bg: #ffffff;
	--itw-bp-more-hover: #ffffff;
	--itw-bp-more-hover-bg: #16243f;
	position: relative;
	width: 100%;
	font-family: inherit;
	color: var(--itw-bp-text);
}

.itw-bp-wrapper *,
.itw-bp-modal * {
	box-sizing: border-box;
}

/* Elements toggled with the hidden attribute also have a display value
 * below, which would otherwise win over the attribute. */
.itw-bp-wrapper [hidden],
.itw-bp-modal[hidden] {
	display: none !important;
}

.itw-bp-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Heading and toolbar */

.itw-bp-heading {
	margin: 0 0 22px;
	font-family: inherit;
	font-size: 28px;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: -0.01em;
	color: var(--itw-bp-title);
}

.itw-bp-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 24px;
	margin-bottom: 20px;
}

.itw-bp-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.itw-bp-wrapper .itw-bp-filter-btn {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	margin: 0;
	padding: 6px 16px;
	font-family: inherit;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
	color: var(--itw-bp-filter);
	background: #ffffff;
	border: 1px solid var(--itw-bp-border);
	border-radius: 8px;
	box-shadow: none;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.itw-bp-wrapper .itw-bp-filter-btn:hover {
	color: var(--itw-bp-filter);
	background: #ffffff;
	border-color: var(--itw-bp-filter-active-bg);
}

.itw-bp-wrapper .itw-bp-filter-btn.itw-active {
	color: var(--itw-bp-filter-active);
	background: var(--itw-bp-filter-active-bg);
	border-color: var(--itw-bp-filter-active-bg);
}

/* No focus outline on any link or button in the widget or the video popup
 * (theme, browser default and our own). */
.itw-bp-wrapper a:focus,
.itw-bp-wrapper a:focus-visible,
.itw-bp-wrapper button:focus,
.itw-bp-wrapper button:focus-visible,
.itw-bp-wrapper input:focus,
.itw-bp-wrapper input:focus-visible,
.itw-bp-modal button:focus,
.itw-bp-modal button:focus-visible {
	outline: none;
}

.itw-bp-search {
	position: relative;
	display: flex;
	align-items: center;
	width: 240px;
	max-width: 100%;
	margin: 0;
}

.itw-bp-wrapper .itw-bp-search-input {
	width: 100%;
	min-height: 32px;
	margin: 0;
	padding: 6px 12px 6px 34px;
	font-family: inherit;
	font-size: 12px;
	line-height: 1.2;
	color: var(--itw-bp-title);
	background: #ffffff;
	border: 1px solid var(--itw-bp-border);
	border-radius: 8px;
	box-shadow: none;
	outline: none;
	transition: border-color 0.2s ease;
}

.itw-bp-wrapper .itw-bp-search-input::placeholder {
	color: #9a9ea6;
	opacity: 1;
}

.itw-bp-wrapper .itw-bp-search-input:focus {
	border-color: var(--itw-bp-filter-active-bg);
}

.itw-bp-wrapper .itw-bp-search-submit {
	position: absolute;
	top: 50%;
	left: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	margin: 0;
	padding: 0;
	color: #9a9ea6;
	background: transparent;
	border: 0;
	box-shadow: none;
	transform: translateY(-50%);
	cursor: pointer;
}

.itw-bp-search-submit svg {
	width: 15px;
	height: 15px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
}

/* Results */

.itw-bp-results {
	transition: opacity 0.2s ease;
}

.itw-bp-wrapper.itw-bp-loading .itw-bp-results {
	opacity: 0.45;
	pointer-events: none;
}

.itw-bp-featured {
	display: grid;
	grid-template-columns: minmax(0px, 1.7fr) minmax(0px, 1fr);
	gap: var(--itw-bp-col-gap);
	margin-bottom: var(--itw-bp-row-gap);
}

.itw-bp-featured-side {
	display: grid;
	grid-template-rows: 1fr 1fr;
	gap: calc(var(--itw-bp-row-gap) / 2);
}

.itw-bp-grid {
	display: grid;
	grid-template-columns: repeat(var(--itw-bp-columns), minmax(0, 1fr));
	gap: var(--itw-bp-row-gap) var(--itw-bp-col-gap);
}

.itw-bp-empty {
	margin: 0;
	padding: 48px 16px;
	text-align: center;
	font-size: 14px;
	color: var(--itw-bp-meta);
}

/* Card (shared) */

.itw-bp-card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow: hidden;
	border-radius: var(--itw-bp-radius);
}

.itw-bp-card-new {
	animation: itw-bp-in 0.45s ease both;
}

@keyframes itw-bp-in {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

.itw-bp-media {
	position: relative;
}

.itw-bp-thumb {
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #dfe3ea, #c9cfd9);
}

.itw-bp-wrapper .itw-bp-img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	border-radius: 0;
	transform: translateZ(0);
	backface-visibility: hidden;
	transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.itw-bp-card:hover .itw-bp-img {
	transform: translateZ(0) scale(1.03);
}

.itw-bp-category {
	display: block;
	margin-bottom: 10px;
	font-size: 10px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--itw-bp-accent);
}

.itw-bp-wrapper .itw-bp-title {
	margin: 0 0 8px;
	padding: 0;
	font-family: inherit;
	font-size: 17px;
	font-weight: 400;
	line-height: 1.3;
	letter-spacing: 0;
	color: var(--itw-bp-title);
}

/* Site-wide link styles (e.g. Elementor Site Settings → Typography → Link,
 * output as ".elementor-kit-N a:hover { font-size: … }") must not change the
 * widget's links, or text jumps in size on hover. Every link state is
 * listed so these rules out-rank such a:hover rules, while the widget's own
 * Elementor style controls (scoped to the element) still win over these. */

.itw-bp-wrapper .itw-bp-title a,
.itw-bp-wrapper .itw-bp-title a:hover,
.itw-bp-wrapper .itw-bp-title a:focus,
.itw-bp-wrapper .itw-bp-title a:active,
.itw-bp-wrapper .itw-bp-title a:visited {
	font-family: inherit;
	font-size: inherit;
	font-weight: inherit;
	font-style: inherit;
	line-height: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
	text-decoration: none;
	color: inherit;
	transition: color 0.2s ease;
}

.itw-bp-wrapper .itw-bp-title a:hover {
	color: var(--itw-bp-title-hover);
}

.itw-bp-excerpt {
	display: -webkit-box;
	margin: 0;
	overflow: hidden;
	font-size: 12.5px;
	line-height: 1.65;
	color: var(--itw-bp-text);
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
}

.itw-bp-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: auto;
}

.itw-bp-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 8px;
	min-width: 0;
	font-size: 11px;
	line-height: 1.4;
	color: var(--itw-bp-meta);
}

.itw-bp-wrapper .itw-bp-button,
.itw-bp-wrapper .itw-bp-button:hover,
.itw-bp-wrapper .itw-bp-button:focus,
.itw-bp-wrapper .itw-bp-button:active,
.itw-bp-wrapper .itw-bp-button:visited {
	position: relative;
	z-index: 2;
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	gap: 2px;
	font-family: inherit;
	font-size: 11.5px;
	font-weight: 500;
	font-style: normal;
	line-height: 1.4;
	letter-spacing: 0;
	text-transform: none;
	color: var(--itw-bp-btn);
	text-decoration: none;
	white-space: nowrap;
	transition: color 0.2s ease;
}

.itw-bp-wrapper .itw-bp-button:hover {
	color: var(--itw-bp-btn-hover);
}

.itw-bp-button svg {
	width: 14px;
	height: 14px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* Play button
 *
 * Only transform and opacity are animated, and the button sits on its own
 * compositor layer from the start (will-change), so the hover scale runs at
 * full frame rate without the snap that happens when a layer is promoted
 * at the start of a transition and dropped at the end. The halo fades and
 * grows via opacity/transform rather than a transitioning box-shadow, which
 * would repaint every frame. */

.itw-bp-wrapper .itw-bp-play,
.itw-bp-wrapper .itw-bp-play:hover,
.itw-bp-wrapper .itw-bp-play:focus {
	position: absolute;
	z-index: 3;
	left: 10px;
	bottom: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--itw-bp-play-size);
	height: var(--itw-bp-play-size);
	margin: 0;
	padding: 0;
	color: var(--itw-bp-play);
	background: var(--itw-bp-play-bg);
	border: 0;
	border-radius: 50%;
	box-shadow: 0 4px 14px rgba(16, 26, 52, 0.22);
	cursor: pointer;
	transform: translateZ(0) scale(1);
	will-change: transform;
	backface-visibility: hidden;
	-webkit-tap-highlight-color: transparent;
	transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), color 0.3s ease, background-color 0.3s ease;
}

/* An outer ring only: box-shadow is never drawn under the element itself,
 * so the halo cannot tint the button's own background. */
.itw-bp-wrapper .itw-bp-play::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	box-shadow: 0 0 0 7px var(--itw-bp-play-bg);
	opacity: 0;
	transform: scale(0.8);
	will-change: transform, opacity;
	pointer-events: none;
	transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s ease;
}

.itw-bp-wrapper .itw-bp-play:hover,
.itw-bp-wrapper .itw-bp-play:focus-visible {
	color: var(--itw-bp-play-bg);
	background: var(--itw-bp-play);
	transform: translateZ(0) scale(1.1);
}

.itw-bp-wrapper .itw-bp-play:hover::before,
.itw-bp-wrapper .itw-bp-play:focus-visible::before {
	opacity: 0.35;
	transform: scale(1);
}

.itw-bp-wrapper .itw-bp-play:active {
	transform: translateZ(0) scale(1.02);
	transition-duration: 0.15s;
}

.itw-bp-play svg {
	position: relative;
	width: 48%;
	height: 48%;
	fill: currentColor;
	pointer-events: none;
}

/* Grid card: image above a light panel */

.itw-bp-card-card {
	background: var(--itw-bp-card-bg);
	border: 1px solid var(--itw-bp-card-border);
}

.itw-bp-card-card .itw-bp-media {
	aspect-ratio: var(--itw-bp-ratio);
	overflow: hidden;
}

.itw-bp-card-card .itw-bp-body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 20px 16px 16px;
}

.itw-bp-card-card .itw-bp-excerpt {
	margin-bottom: 22px;
}

.itw-bp-card-card .itw-bp-title {
	min-height: 0;
}

.itw-bp-card-card .itw-bp-meta > *::before {
	content: "•";
	margin-right: 6px;
}

/* A card without an image still gets its play button, inline. */
.itw-bp-card-card .itw-bp-body > .itw-bp-play {
	position: static;
	margin-bottom: 14px;
}

/* Featured overlay cards: text over the image */

.itw-bp-card-overlay,
.itw-bp-card-overlay-lg {
	min-height: 150px;
	color: #ffffff;
	background: var(--itw-bp-title);
}

.itw-bp-card-overlay .itw-bp-media,
.itw-bp-card-overlay-lg .itw-bp-media {
	position: absolute;
	inset: 0;
}

.itw-bp-card-overlay .itw-bp-media::after,
.itw-bp-card-overlay-lg .itw-bp-media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, var(--itw-bp-overlay) 0%, rgba(16, 26, 52, 0.45) 45%, rgba(16, 26, 52, 0) 75%);
	pointer-events: none;
}

.itw-bp-card-overlay-lg {
	aspect-ratio: 3 / 2;
}

.itw-bp-card-overlay .itw-bp-body,
.itw-bp-card-overlay-lg .itw-bp-body {
	position: relative;
	z-index: 1;
	display: flex;
	flex: 1;
	flex-direction: column;
	justify-content: flex-end;
	padding: 16px 18px 14px;
	pointer-events: none;
}

.itw-bp-card-overlay-lg .itw-bp-body {
	padding: 28px 24px 22px;
}

.itw-bp-card-overlay .itw-bp-body a,
.itw-bp-card-overlay-lg .itw-bp-body a {
	pointer-events: auto;
}

.itw-bp-card-overlay .itw-bp-category,
.itw-bp-card-overlay-lg .itw-bp-category {
	margin-bottom: 6px;
	font-size: 9.5px;
	color: rgba(255, 255, 255, 0.78);
}

.itw-bp-card-overlay-lg .itw-bp-category {
	margin-bottom: 10px;
}

.itw-bp-wrapper .itw-bp-card-overlay .itw-bp-title,
.itw-bp-wrapper .itw-bp-card-overlay-lg .itw-bp-title {
	margin-bottom: 10px;
	font-size: 14px;
	font-weight: 500;
	color: #ffffff;
}

.itw-bp-wrapper .itw-bp-card-overlay-lg .itw-bp-title {
	margin-bottom: 14px;
	font-size: 26px;
	line-height: 1.2;
}

/* The title link covers the whole featured card; the play button and the
 * action link sit above it. */
.itw-bp-card-overlay .itw-bp-title a::after,
.itw-bp-card-overlay-lg .itw-bp-title a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.itw-bp-wrapper .itw-bp-card-overlay .itw-bp-title a:hover,
.itw-bp-wrapper .itw-bp-card-overlay-lg .itw-bp-title a:hover {
	color: #ffffff;
}

.itw-bp-card-overlay .itw-bp-footer,
.itw-bp-card-overlay-lg .itw-bp-footer {
	margin-top: 0;
}

.itw-bp-card-overlay .itw-bp-meta,
.itw-bp-card-overlay-lg .itw-bp-meta {
	font-size: 10.5px;
	color: rgba(255, 255, 255, 0.85);
}

.itw-bp-card-overlay-lg .itw-bp-meta > * + *::before {
	content: "•";
	margin-right: 8px;
}

.itw-bp-wrapper .itw-bp-card-overlay .itw-bp-button,
.itw-bp-wrapper .itw-bp-card-overlay-lg .itw-bp-button,
.itw-bp-wrapper .itw-bp-card-overlay .itw-bp-button:hover,
.itw-bp-wrapper .itw-bp-card-overlay-lg .itw-bp-button:hover {
	font-size: 10.5px;
	color: #ffffff;
}

.itw-bp-wrapper .itw-bp-card-overlay .itw-bp-button:hover span,
.itw-bp-wrapper .itw-bp-card-overlay-lg .itw-bp-button:hover span {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.itw-bp-wrapper .itw-bp-card-overlay-lg .itw-bp-play {
	top: 16px;
	right: 16px;
	bottom: auto;
	left: auto;
	width: calc(var(--itw-bp-play-size) * 1.3);
	height: calc(var(--itw-bp-play-size) * 1.3);
}

.itw-bp-wrapper .itw-bp-card-overlay .itw-bp-play {
	top: 12px;
	right: 12px;
	bottom: auto;
	left: auto;
}

/* Load More */

.itw-bp-more-wrap {
	display: flex;
	justify-content: center;
	margin-top: 28px;
}

.itw-bp-wrapper .itw-bp-load-more {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 38px;
	margin: 0;
	padding: 8px 18px;
	font-family: inherit;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
	color: var(--itw-bp-more);
	background: var(--itw-bp-more-bg);
	border: 1px solid var(--itw-bp-more);
	border-radius: 6px;
	box-shadow: none;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.itw-bp-wrapper .itw-bp-load-more:hover {
	color: var(--itw-bp-more-hover);
	background: var(--itw-bp-more-hover-bg);
	border-color: var(--itw-bp-more-hover-bg);
}

.itw-bp-wrapper .itw-bp-load-more:disabled {
	cursor: progress;
	opacity: 0.8;
}

.itw-bp-spinner {
	display: none;
	width: 13px;
	height: 13px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: itw-bp-spin 0.7s linear infinite;
}

.itw-bp-load-more.itw-bp-is-loading .itw-bp-spinner {
	display: inline-block;
}

@keyframes itw-bp-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Video popup */

html.itw-bp-modal-open {
	overflow: hidden;
}

.itw-bp-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 56px 16px 16px;
	animation: itw-bp-fade 0.25s ease both;
}

.itw-bp-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(10, 16, 32, 0.86);
}

.itw-bp-modal-dialog {
	position: relative;
	width: min(960px, 100%, calc((100vh - 96px) * 16 / 9));
}

.itw-bp-modal-frame {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #000000;
	border-radius: 8px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.itw-bp-modal-frame iframe,
.itw-bp-modal-frame video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.itw-bp-modal .itw-bp-modal-close {
	position: absolute;
	top: -46px;
	right: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	margin: 0;
	padding: 0;
	color: #ffffff;
	background: rgba(255, 255, 255, 0.12);
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.itw-bp-modal .itw-bp-modal-close:hover {
	background: rgba(255, 255, 255, 0.25);
}

.itw-bp-modal-close svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
}

@keyframes itw-bp-fade {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

/* Responsive */

@media (max-width: 1024px) {
	.itw-bp-featured {
		grid-template-columns: minmax(0, 1fr);
	}

	.itw-bp-featured-side {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-template-rows: none;
		gap: var(--itw-bp-col-gap);
	}

	.itw-bp-card-overlay {
		aspect-ratio: 3 / 2;
	}
}

@media (max-width: 767px) {
	.itw-bp-heading {
		font-size: 24px;
	}

	.itw-bp-search {
		width: 100%;
	}

	.itw-bp-featured-side {
		grid-template-columns: minmax(0, 1fr);
	}

	.itw-bp-card-overlay-lg {
		aspect-ratio: 4 / 3;
	}

	.itw-bp-wrapper .itw-bp-card-overlay-lg .itw-bp-title {
		font-size: 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.itw-bp-card-new,
	.itw-bp-modal,
	.itw-bp-spinner {
		animation: none;
	}

	.itw-bp-wrapper .itw-bp-img,
	.itw-bp-wrapper .itw-bp-play,
	.itw-bp-wrapper .itw-bp-play::before,
	.itw-bp-results {
		transition: none;
	}

	.itw-bp-card:hover .itw-bp-img {
		transform: none;
	}
}
