/* ==============================================================
     # Blog: the list (page-templates/blog-2column.php), the post cards
     (template-parts/vw-post-card.php) and a single post (single.php).
     Cards, CTA and prose follow the feature pages (anaton-core widgets.css, .vw-fpage)
=================================================================== */

.vw-blog,
.vw-post {
	--vw-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--vw-accent: #5153ff;
	--vw-muted: #6f7186;
	--vw-line: #e3e5f1;
	position: relative;
	background: #fff;
}

.vw-blog {
	padding: 90px 0 120px;
}

.vw-blog .screen-reader-text {
	position: absolute;
	overflow: hidden;
	width: 1px;
	height: 1px;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* Cards three to a row; the featured one takes the whole row */
.vw-blog__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 28px;
}

.vw-post-card {
	min-width: 0;
	margin: 0;
}

.vw-post-card .vw-post-card__link {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	height: 100%;
	border: 1px solid rgba(81, 83, 255, 0.12);
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 10px 24px -18px rgba(41, 37, 140, 0.35);
	font-weight: 400;
	transition: border-color 0.2s ease, box-shadow 0.25s ease, transform 0.25s var(--vw-ease);
}

.vw-post-card .vw-post-card__link:hover,
.vw-post-card .vw-post-card__link:focus-visible {
	border-color: rgba(81, 83, 255, 0.35);
	box-shadow: 0 24px 44px -26px rgba(81, 83, 255, 0.55);
	transform: translateY(-4px);
}

.vw-post-card .vw-post-card__link:focus-visible {
	outline: 3px solid rgba(81, 83, 255, 0.45);
	outline-offset: 2px;
}

/* The image fills a 16:10 frame from the top, so screenshots keep their header */
.vw-post-card .vw-post-card__shot {
	display: block;
	overflow: hidden;
	aspect-ratio: 16 / 10;
	border-bottom: 1px solid rgba(81, 83, 255, 0.1);
	background:
		radial-gradient(260px 160px at 100% 100%, rgba(166, 5, 153, 0.16), transparent 70%),
		linear-gradient(140deg, #eef0ff 0%, #f1ecff 100%);
}

.vw-post-card .vw-post-card__shot img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	transition: transform 0.6s var(--vw-ease);
}

.vw-post-card .vw-post-card__link:hover .vw-post-card__shot img {
	transform: scale(1.04);
}

.vw-post-card .vw-post-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 10px;
	padding: 22px 24px 24px;
}

.vw-post-card .vw-post-card__date {
	color: var(--vw-accent);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
}

.vw-post-card .vw-post-card__title {
	display: -webkit-box;
	overflow: hidden;
	margin: 0;
	color: var(--color-heading);
	font-family: var(--font-heading);
	font-size: 21px;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: -0.01em;
	text-wrap: balance;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
}

.vw-post-card .vw-post-card__excerpt {
	display: -webkit-box;
	overflow: hidden;
	color: var(--vw-muted);
	font-size: 15px;
	line-height: 1.6;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
}

.vw-post-card .vw-post-card__more {
	display: inline-flex;
	gap: 8px;
	align-items: center;
	margin-top: auto;
	padding-top: 6px;
	color: var(--vw-accent);
	font-size: 15px;
	font-weight: 600;
}

.vw-post-card .vw-post-card__more .fa-arrow-right {
	font-size: 12px;
	transition: transform 0.25s var(--vw-ease);
}

.vw-post-card .vw-post-card__link:hover .fa-arrow-right {
	transform: translateX(4px);
}

/* The latest post: image beside the text across the whole row */
.vw-post-card.is-featured {
	grid-column: 1 / -1;
	margin-bottom: 14px;
}

.vw-post-card.is-featured .vw-post-card__link {
	flex-direction: row;
	border-radius: 24px;
}

.vw-post-card.is-featured .vw-post-card__shot {
	flex: 0 0 56%;
	aspect-ratio: 16 / 10;
	border-right: 1px solid rgba(81, 83, 255, 0.1);
	border-bottom: 0;
}

.vw-post-card.is-featured .vw-post-card__body {
	justify-content: center;
	gap: 14px;
	padding: 44px 48px;
}

.vw-post-card.is-featured .vw-post-card__title {
	font-size: 32px;
	line-height: 1.22;
	-webkit-line-clamp: 4;
	line-clamp: 4;
}

.vw-post-card.is-featured .vw-post-card__excerpt {
	font-size: 17px;
	line-height: 1.65;
	-webkit-line-clamp: 4;
	line-clamp: 4;
}

.vw-post-card.is-featured .vw-post-card__more {
	margin-top: 8px;
	font-size: 16px;
}

/* Pages */
.vw-blog__pages {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	margin-top: 64px;
}

.vw-blog__pages .page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 48px;
	height: 48px;
	padding: 0 14px;
	border: 1px solid var(--vw-line);
	border-radius: 14px;
	background: #fff;
	color: var(--color-heading);
	font-size: 16px;
	font-weight: 600;
	transition: border-color 0.2s ease, color 0.2s ease;
}

.vw-blog__pages a.page-numbers:hover,
.vw-blog__pages a.page-numbers:focus-visible {
	border-color: var(--vw-accent);
	color: var(--vw-accent);
}

.vw-blog__pages .page-numbers.current {
	border-color: var(--vw-accent);
	background: var(--vw-accent);
	color: #fff;
}

.vw-blog__pages .page-numbers.dots {
	border-color: transparent;
}

.vw-blog__empty {
	font-size: 18px;
	text-align: center;
}

/* ==============================================================
     # A post
=================================================================== */

.vw-post {
	padding: 80px 0 120px;
}

/* The featured image overlapping the hero's slanted edge, whole (portrait images on the soft plate) */
.vw-post .vw-post__cover {
	position: relative;
	z-index: 2;
	display: grid;
	place-items: center;
	overflow: hidden;
	max-width: 960px;
	margin: -250px auto 64px;
	border-radius: 24px;
	background:
		radial-gradient(420px 260px at 100% 100%, rgba(166, 5, 153, 0.14), transparent 70%),
		linear-gradient(140deg, #eef0ff 0%, #f1ecff 100%);
	box-shadow: 0 34px 70px -38px rgba(41, 37, 140, 0.6);
}

.vw-post .vw-post__cover img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 600px;
}

/* The text: a reading column with the feature pages' prose */
.vw-post .vw-post__content {
	max-width: 760px;
	margin: 0 auto;
	color: var(--color-paragraph);
}

.vw-post .vw-post__content::after {
	content: "";
	display: table;
	clear: both;
}

.vw-post .vw-post__content > :first-child {
	margin-top: 0;
}

.vw-post .vw-post__content p {
	margin: 0 0 20px;
	font-size: 18px;
	line-height: 1.8;
	text-wrap: pretty;
}

.vw-post .vw-post__content > p:first-child {
	color: var(--color-heading);
	font-size: 20px;
	line-height: 1.7;
}

.vw-post .vw-post__content strong {
	color: var(--color-heading);
	font-weight: 600;
}

.vw-post .vw-post__content h2 {
	margin: 56px 0 18px;
	font-size: 30px;
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: -0.015em;
	text-wrap: balance;
}

.vw-post .vw-post__content h3 {
	margin: 36px 0 12px;
	font-size: 22px;
	font-weight: 600;
	line-height: 1.35;
}

.vw-post .vw-post__content h4 {
	margin: 28px 0 10px;
	font-size: 19px;
	font-weight: 600;
}

.vw-post .vw-post__content ul,
.vw-post .vw-post__content ol {
	display: grid;
	gap: 12px;
	margin: 24px 0 28px;
	padding: 0;
	list-style: none;
}

.vw-post .vw-post__content li {
	position: relative;
	margin: 0;
	padding-left: 32px;
	font-size: 17px;
	line-height: 1.65;
}

.vw-post .vw-post__content ul li::before {
	content: "\f00c";
	position: absolute;
	top: 4px;
	left: 0;
	display: grid;
	place-items: center;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: rgba(81, 83, 255, 0.1);
	color: var(--vw-accent);
	font-family: "Font Awesome 5 Pro";
	font-size: 10px;
	font-weight: 900;
}

.vw-post .vw-post__content ol {
	counter-reset: vw-step;
}

.vw-post .vw-post__content ol li::before {
	counter-increment: vw-step;
	content: counter(vw-step);
	position: absolute;
	top: 3px;
	left: 0;
	display: grid;
	place-items: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--vw-accent);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
}

.vw-post .vw-post__content a {
	color: var(--vw-accent);
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: rgba(81, 83, 255, 0.35);
	text-underline-offset: 3px;
	transition: text-decoration-color 0.2s ease;
}

.vw-post .vw-post__content a:hover {
	text-decoration-color: currentColor;
}

.vw-post .vw-post__content a:has(> img) {
	text-decoration: none;
}

/* Images and galleries: rounded, with a soft shadow (WordPress emoji images stay inline) */
.vw-post .vw-post__content figure {
	max-width: 100%;
	margin: 40px 0;
}

.vw-post .vw-post__content img:not(.emoji) {
	height: auto;
	border-radius: 16px;
	box-shadow: 0 0 0 1px rgba(81, 83, 255, 0.08), 0 22px 44px -30px rgba(41, 37, 140, 0.55);
}

/* Portrait photos stay within a screen's height instead of filling the column */
.vw-post .vw-post__content .wp-block-image img {
	display: block;
	width: auto;
	max-height: 640px;
	margin: 0 auto;
}

.vw-post .vw-post__content .wp-block-gallery {
	gap: 16px;
}

.vw-post .vw-post__content .wp-block-gallery figure {
	margin: 0;
}

.vw-post .vw-post__content .wp-block-gallery img:not(.emoji) {
	border-radius: 12px;
}

.vw-post .vw-post__content figcaption {
	margin-top: 12px;
	color: var(--vw-muted);
	font-size: 14px;
	line-height: 1.5;
	text-align: center;
}

.vw-post .vw-post__content img.emoji {
	display: inline;
	width: 1em;
	height: 1em;
	margin: 0 0.1em;
	vertical-align: -0.1em;
	border: 0;
	box-shadow: none;
}

.vw-post .vw-post__content iframe {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	margin: 40px 0;
	border: 0;
	border-radius: 16px;
	box-shadow: 0 22px 44px -30px rgba(41, 37, 140, 0.55);
}

.vw-post .vw-post__content blockquote {
	margin: 36px 0;
	padding: 6px 0 6px 24px;
	border-left: 3px solid var(--vw-accent);
	color: var(--color-heading);
	font-size: 19px;
	font-style: normal;
}

.vw-post .vw-post__content .wp-block-columns {
	gap: 28px;
	margin: 40px 0;
}

.vw-post .vw-post__comments {
	max-width: 760px;
	margin: 64px auto 0;
}

/* The trial CTA, as on the feature pages */
.vw-post .vw-post__cta {
	position: relative;
	display: flex;
	gap: 40px;
	align-items: center;
	justify-content: space-between;
	overflow: hidden;
	margin-top: 96px;
	padding: 44px 48px;
	border-radius: 24px;
	background:
		radial-gradient(600px 320px at 95% 120%, rgba(166, 5, 153, 0.6), transparent 65%),
		linear-gradient(140deg, #5153ff 0%, #5b2fe0 55%, #6a1fc9 100%);
	box-shadow: 0 30px 60px -34px rgba(41, 37, 140, 0.65);
}

.vw-post .vw-post__cta::before {
	content: "";
	position: absolute;
	top: -90px;
	right: 18%;
	width: 340px;
	aspect-ratio: 1232 / 1128;
	background: url(../img/vetswise/vw-heart-line.png) center / contain no-repeat;
	opacity: 0.14;
	transform: rotate(12deg);
	pointer-events: none;
}

.vw-post .vw-post__cta-text {
	position: relative;
	max-width: 640px;
}

.vw-post .vw-post__cta-title {
	margin: 0;
	color: #fff;
	font-size: 30px;
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: -0.015em;
	text-wrap: balance;
}

.vw-post .vw-post__cta-text p {
	margin: 10px 0 0;
	color: rgba(255, 255, 255, 0.84);
	font-size: 17px;
	line-height: 1.6;
	text-wrap: pretty;
}

.vw-post .vw-post__cta-button {
	position: relative;
	display: inline-flex;
	flex: none;
	gap: 10px;
	align-items: center;
	padding: 17px 28px;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 18px 36px -18px rgba(18, 8, 70, 0.7);
	color: var(--vw-accent);
	font-family: var(--font-heading);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	transition: transform 0.25s var(--vw-ease), box-shadow 0.25s ease;
}

.vw-post .vw-post__cta-button .fa-arrow-right {
	font-size: 14px;
	transition: transform 0.25s var(--vw-ease);
}

.vw-post .vw-post__cta-button:hover,
.vw-post .vw-post__cta-button:focus-visible {
	color: var(--vw-accent);
	box-shadow: 0 24px 44px -18px rgba(18, 8, 70, 0.8);
	transform: translateY(-2px);
}

.vw-post .vw-post__cta-button:hover .fa-arrow-right {
	transform: translateX(4px);
}

.vw-post .vw-post__cta-button:focus-visible {
	outline: 3px solid rgba(255, 255, 255, 0.75);
	outline-offset: 3px;
}

/* The latest other posts */
.vw-post .vw-post__more {
	margin-top: 96px;
}

.vw-post .vw-post__more-head {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 24px;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 28px;
}

.vw-post .vw-post__more-title {
	margin: 0;
	font-size: 28px;
	font-weight: 600;
	line-height: 1.3;
}

.vw-post .vw-post__more-all {
	display: inline-flex;
	gap: 8px;
	align-items: center;
	color: var(--vw-accent);
	font-size: 16px;
	font-weight: 600;
}

.vw-post .vw-post__more-all .fa-arrow-right {
	font-size: 13px;
	transition: transform 0.25s var(--vw-ease);
}

.vw-post .vw-post__more-all:hover .fa-arrow-right {
	transform: translateX(4px);
}

@media only screen and (max-width: 1199px) {
	.vw-blog__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.vw-post .vw-post__more .vw-post-card:nth-child(3) {
		display: none;
	}

	.vw-post-card.is-featured .vw-post-card__body {
		padding: 36px 38px;
	}

	.vw-post-card.is-featured .vw-post-card__title {
		font-size: 28px;
	}
}

@media only screen and (max-width: 991px) {
	.vw-blog {
		padding: 72px 0 100px;
	}

	.vw-post-card.is-featured .vw-post-card__link {
		flex-direction: column;
	}

	.vw-post-card.is-featured .vw-post-card__shot {
		flex: none;
		border-right: 0;
		border-bottom: 1px solid rgba(81, 83, 255, 0.1);
	}

	.vw-post-card.is-featured .vw-post-card__body {
		padding: 28px 30px 30px;
	}

	.vw-post .vw-post__cover {
		margin-top: -190px;
	}

	/* The button goes under the text */
	.vw-post .vw-post__cta {
		flex-direction: column;
		align-items: flex-start;
		gap: 24px;
	}
}

@media only screen and (max-width: 767px) {
	.vw-blog {
		padding: 48px 0 80px;
	}

	.vw-blog__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 20px;
	}

	.vw-post .vw-post__more .vw-post-card:nth-child(3) {
		display: block;
	}

	.vw-post-card .vw-post-card__link {
		border-radius: 18px;
	}

	.vw-post-card .vw-post-card__body {
		padding: 18px 20px 20px;
	}

	.vw-post-card .vw-post-card__title,
	.vw-post-card.is-featured .vw-post-card__title {
		font-size: 20px;
	}

	.vw-post-card.is-featured {
		margin-bottom: 0;
	}

	.vw-post-card.is-featured .vw-post-card__body {
		gap: 10px;
		padding: 20px 20px 22px;
	}

	.vw-post-card.is-featured .vw-post-card__excerpt {
		font-size: 15px;
		-webkit-line-clamp: 3;
		line-clamp: 3;
	}

	.vw-post-card.is-featured .vw-post-card__more {
		margin-top: 0;
		font-size: 15px;
	}

	.vw-blog__pages {
		margin-top: 44px;
	}

	.vw-post {
		padding: 48px 0 80px;
	}

	.vw-post .vw-post__cover {
		margin: -120px auto 40px;
		border-radius: 18px;
	}

	.vw-post .vw-post__cover img {
		max-height: 420px;
	}

	.vw-post .vw-post__content p {
		font-size: 17px;
		line-height: 1.75;
	}

	.vw-post .vw-post__content > p:first-child {
		font-size: 18px;
	}

	.vw-post .vw-post__content h2 {
		margin-top: 44px;
		font-size: 25px;
	}

	.vw-post .vw-post__content h3 {
		font-size: 20px;
	}

	.vw-post .vw-post__content li {
		font-size: 16px;
	}

	.vw-post .vw-post__content figure,
	.vw-post .vw-post__content iframe {
		margin: 28px 0;
	}

	.vw-post .vw-post__content img:not(.emoji) {
		border-radius: 12px;
	}

	.vw-post .vw-post__cta {
		margin-top: 64px;
		padding: 30px 24px 26px;
		border-radius: 20px;
	}

	.vw-post .vw-post__cta-title {
		font-size: 24px;
	}

	.vw-post .vw-post__cta-text p {
		font-size: 16px;
	}

	.vw-post .vw-post__cta-button {
		justify-content: center;
		width: 100%;
		padding: 16px 14px;
		font-size: 15px;
		text-align: center;
	}

	.vw-post .vw-post__more {
		margin-top: 64px;
	}

	.vw-post .vw-post__more-title {
		font-size: 24px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.vw-blog *,
	.vw-post * {
		transition: none !important;
	}
}
