/*
 * Meditech blog: post page, blog page and blog archives.
 * Loaded only on blog pages (see functions.php).
 */

.mtb {
	--mtb-ink: #0b0c42;
	--mtb-text: rgba(11, 12, 66, 0.82);
	--mtb-muted: rgba(11, 12, 66, 0.58);
	--mtb-line: rgba(11, 12, 66, 0.12);
	--mtb-soft: #eef3fb;
	--mtb-accent: #2d3a9b;
	--mtb-head: Verdana, Geneva, sans-serif;
	--mtb-body: Poppins, system-ui, sans-serif;

	color: var(--mtb-ink);
	font-family: var(--mtb-body);
}

.mtb *,
.mtb *::before,
.mtb *::after {
	box-sizing: border-box;
}

/* Twenty Twenty-One spacing around the page content is not needed here. */
body.mt-blog-page .site-main {
	padding-top: 0;
	padding-bottom: 0;
}

body.mt-blog-page .site-main > .mtb {
	max-width: none;
	margin: 0;
}

.mtb .mtb-wrap {
	width: 100%;
	max-width: calc(820px + 48px);
	margin: 0 auto;
	padding: 0 24px;
}

.mtb .mtb-wrap--wide {
	max-width: calc(1240px + 48px);
}

/* ---------- Hero (same as the product pages) ---------- */

.mtb .mtb-hero {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: 350px;
	padding: 112px 0 34px;
	overflow: hidden;
	background: var(--mtb-soft) var(--mtb-banner) center 62% / cover no-repeat;
}

.mtb .mtb-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.72) 50%, rgba(255, 255, 255, 0.35) 100%);
}

.mtb .mtb-hero__inner {
	position: relative;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px 48px;
	width: 100%;
	padding: 0 40px;
}

.mtb .mtb-hero__text {
	max-width: 820px;
}

.mtb .mtb-hero__title {
	margin: 0 0 12px;
	color: var(--mtb-ink);
	font-family: var(--mtb-head);
	font-size: clamp(28px, 2.8vw, 40px);
	font-weight: 400;
	line-height: 1.15;
	letter-spacing: -0.01em;
}

.mtb .mtb-hero__lead {
	max-width: 640px;
	margin: 0;
	color: var(--mtb-ink);
	font-size: 16px;
	line-height: 1.6;
}

.mtb .mtb-hero__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
	margin: 6px 0 0;
	color: var(--mtb-ink);
	font-size: 15px;
}

.mtb .mtb-hero__meta > * + *::before {
	content: "";
	display: inline-block;
	width: 4px;
	height: 4px;
	margin: 0 14px 3px 0;
	border-radius: 50%;
	background: currentColor;
	opacity: 0.4;
}

.mtb .mtb-crumbs__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 6px;
	margin: 0;
	padding: 0;
	color: var(--mtb-ink);
	font-size: 15px;
	list-style: none;
}

.mtb .mtb-crumbs__item {
	margin: 0;
}

.mtb .mtb-crumbs__item a {
	color: inherit;
	text-decoration: none;
}

.mtb .mtb-crumbs__item a:hover,
.mtb .mtb-crumbs__item a:focus-visible {
	text-decoration: underline;
}

.mtb .mtb-crumbs__item[aria-current] {
	max-width: 260px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* ---------- Tags and buttons ---------- */

.mtb .mtb-tag {
	display: inline-flex;
	align-items: center;
	padding: 5px 14px;
	border: 1px solid rgba(11, 12, 66, 0.25);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.6);
	color: var(--mtb-ink);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.3;
	text-decoration: none;
	transition: background-color 0.25s ease, color 0.25s ease;
}

.mtb .mtb-tag:hover,
.mtb .mtb-tag:focus-visible {
	background: var(--mtb-ink);
	color: #fff;
}

.mtb .mtb-btn {
	display: inline-flex;
	flex: none;
	align-items: center;
	padding: 14px 28px;
	border-radius: 999px;
	background: var(--mtb-ink);
	color: #fff;
	font-family: var(--mtb-body);
	font-size: 16px;
	font-weight: 500;
	line-height: 1;
	text-decoration: none;
	box-shadow: 0 6px 16px rgba(11, 12, 66, 0.22);
	transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.3s ease;
}

.mtb .mtb-btn:hover,
.mtb .mtb-btn:focus-visible {
	background: var(--mtb-accent);
	color: #fff;
	transform: translateY(-1px);
}

/* ---------- Single post ---------- */

.mtb .mtb-feature {
	margin: 48px 0 0;
	overflow: hidden;
	border-radius: 20px;
	background: var(--mtb-soft);
}

/* The site sets img { height: 100% !important }. */
.mtb .mtb-feature img {
	display: block;
	width: 100%;
	height: auto !important;
	max-height: 520px;
	object-fit: cover;
}

.mtb .mtb-body {
	padding: 48px 0 72px;
}

/* Article text */
.mtb .mtb-content {
	color: var(--mtb-text);
	font-family: var(--mtb-body);
	font-size: 17px;
	line-height: 1.8;
}

.mtb .mtb-content > * {
	max-width: none;
	margin-top: 0;
	margin-right: 0;
	margin-bottom: 1.3em;
	margin-left: 0;
}

.mtb .mtb-content :is(h2, h3, h4, h5, h6) {
	margin: 1.8em 0 0.6em;
	color: var(--mtb-ink);
	font-family: var(--mtb-head);
	font-weight: 400;
	line-height: 1.25;
	letter-spacing: -0.01em;
}

.mtb .mtb-content h2 {
	font-size: clamp(24px, 2.2vw, 30px);
}

.mtb .mtb-content h3 {
	font-size: clamp(20px, 1.8vw, 24px);
}

.mtb .mtb-content h4 {
	font-size: 19px;
}

.mtb .mtb-content > :first-child {
	margin-top: 0;
}

.mtb .mtb-content p {
	font-size: inherit;
	line-height: inherit;
}

.mtb .mtb-content a {
	color: var(--mtb-accent);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.mtb .mtb-content a:hover,
.mtb .mtb-content a:focus-visible {
	color: var(--mtb-ink);
}

.mtb .mtb-content :is(strong, b) {
	color: var(--mtb-ink);
	font-weight: 600;
}

.mtb .mtb-content :is(ul, ol) {
	padding-left: 1.3em;
}

.mtb .mtb-content li {
	margin: 0 0 0.5em;
	padding-left: 0.2em;
}

.mtb .mtb-content li::marker {
	color: var(--mtb-ink);
}

.mtb .mtb-content blockquote,
.mtb .mtb-content .wp-block-quote {
	margin: 2em 0;
	padding: 4px 0 4px 24px;
	border-left: 3px solid var(--mtb-ink);
	color: var(--mtb-ink);
	font-family: var(--mtb-head);
	font-size: clamp(19px, 1.8vw, 22px);
	font-style: normal;
	font-weight: 400;
	line-height: 1.5;
}

.mtb .mtb-content blockquote::before,
.mtb .mtb-content blockquote p::before {
	content: none;
}

.mtb .mtb-content blockquote p {
	margin: 0 0 0.6em;
	padding: 0;
	color: inherit;
	font-family: inherit;
	font-size: inherit;
	font-weight: 400;
	letter-spacing: normal;
	line-height: inherit;
}

.mtb .mtb-content blockquote p:last-child {
	margin-bottom: 0;
}

.mtb .mtb-content blockquote cite {
	color: var(--mtb-muted);
	font-family: var(--mtb-body);
	font-size: 15px;
	font-style: normal;
	font-weight: 400;
}

.mtb .mtb-content :is(figure, .wp-block-image) {
	margin: 2em 0;
}

.mtb .mtb-content img {
	max-width: 100%;
	height: auto !important;
	border-radius: 14px;
}

.mtb .mtb-content figcaption {
	margin-top: 10px;
	color: var(--mtb-muted);
	font-size: 14px;
	text-align: center;
}

.mtb .mtb-content hr {
	margin: 2.5em 0;
	border: 0;
	border-top: 1px solid var(--mtb-line);
}

.mtb .mtb-content :is(table, .wp-block-table table) {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
}

.mtb .mtb-content .wp-block-table {
	overflow-x: auto;
}

.mtb .mtb-content :is(th, td) {
	padding: 12px 14px;
	border: 0;
	border-bottom: 1px solid var(--mtb-line);
	text-align: left;
}

.mtb .mtb-content th {
	background: var(--mtb-soft);
	color: var(--mtb-ink);
	font-weight: 600;
}

.mtb .mtb-content :is(iframe, video, embed) {
	max-width: 100%;
	border-radius: 14px;
}

.mtb .mtb-content .wp-block-button__link {
	padding: 13px 26px;
	border-radius: 999px;
	background: var(--mtb-ink);
	color: #fff;
	text-decoration: none;
}

/* Tags, share, previous / next */
.mtb .mtb-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 40px 0 0;
}

.mtb .mtb-share {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-top: 40px;
	padding-top: 24px;
	border-top: 1px solid var(--mtb-line);
}

.mtb .mtb-share__label {
	margin-right: 6px;
	color: var(--mtb-ink);
	font-size: 15px;
	font-weight: 600;
}

.mtb .mtb-share__link,
.mtb button.mtb-share__link {
	margin: 0;
	padding: 8px 16px;
	border: 1px solid rgba(11, 12, 66, 0.2);
	border-radius: 999px;
	background: #fff;
	color: var(--mtb-ink);
	font-family: var(--mtb-body);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.mtb .mtb-share__link:hover,
.mtb .mtb-share__link:focus-visible,
.mtb button.mtb-share__link:hover {
	border-color: var(--mtb-ink);
	background: var(--mtb-ink);
	color: #fff;
}

.mtb .mtb-adjacent {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	margin-top: 40px;
}

.mtb .mtb-adjacent__link {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 20px 22px;
	border: 1px solid var(--mtb-line);
	border-radius: 16px;
	background: #fff;
	color: var(--mtb-ink);
	text-decoration: none;
	transition: border-color 0.25s ease, box-shadow 0.3s ease;
}

.mtb .mtb-adjacent__link--next {
	grid-column: 2;
	text-align: right;
}

.mtb .mtb-adjacent__link:hover,
.mtb .mtb-adjacent__link:focus-visible {
	border-color: rgba(11, 12, 66, 0.3);
	box-shadow: 0 12px 28px -18px rgba(11, 12, 66, 0.35);
}

.mtb .mtb-adjacent__label {
	color: var(--mtb-muted);
	font-size: 13px;
	font-weight: 500;
}

.mtb .mtb-adjacent__title {
	font-family: var(--mtb-head);
	font-size: 17px;
	line-height: 1.35;
}

/* ---------- Cards (blog page and related posts) ---------- */

.mtb .mtb-section-title {
	margin: 0 0 28px;
	color: var(--mtb-ink);
	font-family: var(--mtb-head);
	font-size: clamp(26px, 2.6vw, 34px);
	font-weight: 400;
	line-height: 1.2;
}

.mtb .mtb-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 28px;
}

.mtb .mtb-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--mtb-line);
	border-radius: 20px;
	background: #fff;
	transition: box-shadow 0.35s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.mtb .mtb-card:hover {
	box-shadow: 0 18px 40px -22px rgba(11, 12, 66, 0.35);
	transform: translateY(-3px);
}

.mtb .mtb-card__media {
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: linear-gradient(160deg, #f4f8fe 0%, #dbe7f8 100%);
}

.mtb .mtb-card__media img {
	display: block;
	width: 100%;
	height: 100% !important;
	object-fit: cover;
	transition: transform 0.6s ease;
}

.mtb .mtb-card:hover .mtb-card__media img {
	transform: scale(1.04);
}

.mtb .mtb-card__placeholder {
	display: block;
	width: 100%;
	height: 100%;
}

.mtb .mtb-card__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	padding: 22px 22px 24px;
}

.mtb .mtb-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 12px;
	margin: 0 0 10px;
	color: var(--mtb-muted);
	font-size: 14px;
}

.mtb .mtb-card__cat {
	color: var(--mtb-ink);
	font-weight: 500;
}

.mtb .mtb-card__title {
	margin: 0 0 10px;
	font-family: var(--mtb-head);
	font-size: 20px;
	font-weight: 400;
	line-height: 1.3;
}

.mtb .mtb-card__title a {
	color: var(--mtb-ink);
	text-decoration: none;
}

.mtb .mtb-card__title a:hover,
.mtb .mtb-card__title a:focus-visible {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.mtb .mtb-card__excerpt {
	margin: 0 0 18px;
	color: var(--mtb-text);
	font-size: 16px;
	line-height: 1.6;
}

.mtb .mtb-card__more {
	align-self: flex-start;
	margin-top: auto;
	padding-bottom: 4px;
	border-bottom: 1px solid var(--mtb-ink);
	color: var(--mtb-ink);
	font-size: 15px;
	font-weight: 500;
	text-decoration: none;
}

/* Related posts and the closing box */
.mtb .mtb-related {
	padding: 72px 0;
	background: linear-gradient(180deg, #fff 0%, #eef4fc 100%);
}

.mtb .mtb-cta {
	padding: 72px 0 96px;
	background: #eef4fc;
}

.mtb .mtb-cta__box {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px 48px;
	padding: 40px 44px;
	border: 1px solid rgba(255, 255, 255, 0.8);
	border-radius: 24px;
	background: rgba(255, 255, 255, 0.75);
	box-shadow: 4px 2px 24px 0 rgba(31, 38, 135, 0.1);
}

.mtb .mtb-cta__title {
	margin: 0 0 8px;
	color: var(--mtb-ink);
	font-family: var(--mtb-head);
	font-size: clamp(22px, 2.2vw, 28px);
	font-weight: 400;
	line-height: 1.25;
}

.mtb .mtb-cta__text {
	max-width: 620px;
	margin: 0;
	color: var(--mtb-text);
	font-size: 16px;
	line-height: 1.6;
}

/* ---------- Blog page ---------- */

.mtb-list > .mtb-wrap {
	padding-top: 48px;
	padding-bottom: 96px;
}

.mtb .mtb-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 36px;
}

.mtb .mtb-filter__link {
	padding: 9px 18px;
	border: 1px solid rgba(11, 12, 66, 0.2);
	border-radius: 999px;
	color: var(--mtb-ink);
	font-size: 15px;
	text-decoration: none;
	transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.mtb .mtb-filter__link:hover,
.mtb .mtb-filter__link.is-active {
	border-color: var(--mtb-ink);
	background: var(--mtb-ink);
	color: #fff;
}

.mtb .mtb-pagination {
	margin: 56px 0 0;
	border: 0;
}

.mtb .mtb-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
}

.mtb .mtb-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 14px;
	border: 1px solid rgba(11, 12, 66, 0.2);
	border-radius: 999px;
	color: var(--mtb-ink);
	font-family: var(--mtb-body);
	font-size: 15px;
	text-decoration: none;
}

.mtb .mtb-pagination .page-numbers.current,
.mtb .mtb-pagination a.page-numbers:hover {
	border-color: var(--mtb-ink);
	background: var(--mtb-ink);
	color: #fff;
}

.mtb .mtb-pagination .page-numbers.dots {
	border: 0;
}

.mtb .mtb-empty {
	margin: 0;
	padding: 48px 0;
	color: var(--mtb-muted);
	font-size: 17px;
	text-align: center;
}

/* ---------- Tablets and phones ---------- */

@media (max-width: 1024px) {

	.mtb .mtb-hero__inner {
		padding: 0 24px;
	}

	.mtb .mtb-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 20px;
	}
}

@media (max-width: 767px) {

	.mtb .mtb-wrap {
		padding: 0 16px;
	}

	.mtb .mtb-hero {
		min-height: 380px;
		padding: 104px 0 22px;
		background-position: 38% 60%;
	}

	.mtb .mtb-hero::before {
		background: rgba(255, 255, 255, 0.8);
	}

	.mtb .mtb-hero__inner {
		flex-direction: column;
		align-items: flex-start;
		padding: 0 16px;
	}

	.mtb .mtb-hero__title {
		font-size: 26px;
	}

	.mtb .mtb-hero__meta {
		font-size: 14px;
	}

	.mtb .mtb-crumbs__list {
		flex-wrap: nowrap;
		justify-content: flex-start;
		max-width: 100%;
		font-size: 13px;
	}

	.mtb .mtb-crumbs__item {
		flex: none;
		white-space: nowrap;
	}

	.mtb .mtb-crumbs__item[aria-current] {
		flex: 0 1 auto;
		min-width: 0;
		max-width: none;
	}

	.mtb .mtb-feature {
		margin-top: 28px;
		border-radius: 14px;
	}

	.mtb .mtb-body {
		padding: 32px 0 56px;
	}

	.mtb .mtb-content {
		font-size: 16px;
		line-height: 1.75;
	}

	.mtb .mtb-adjacent {
		grid-template-columns: 1fr;
	}

	.mtb .mtb-adjacent__link--next {
		grid-column: auto;
	}

	.mtb .mtb-grid {
		grid-template-columns: 1fr;
	}

	.mtb .mtb-related {
		padding: 56px 0;
	}

	.mtb .mtb-cta {
		padding: 48px 0 64px;
	}

	.mtb .mtb-cta__box {
		flex-direction: column;
		align-items: flex-start;
		padding: 28px 22px;
	}

	.mtb .mtb-btn {
		justify-content: center;
		width: 100%;
	}

	.mtb-list > .mtb-wrap {
		padding-top: 32px;
		padding-bottom: 64px;
	}

	.mtb .mtb-filter {
		flex-wrap: nowrap;
		margin-right: -16px;
		padding-right: 16px;
		overflow-x: auto;
		scrollbar-width: none;
	}

	.mtb .mtb-filter__link {
		flex: none;
	}
}

@media (prefers-reduced-motion: reduce) {

	.mtb *,
	.mtb *::before,
	.mtb *::after {
		transition: none !important;
	}
}
