/******************************************************************
Blog: index (home.php, category.php), article cards (blog-card.php)
and articles (single-post.php). Printed after pages.css, so it can
use the Marino variables (green, ink, light grey).
******************************************************************/

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/*********************
SHARED: meta line, tag, text link
*********************/
.blog-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 16px;
	margin: 0 0 14px;
	font-size: 13px !important;
	line-height: 1.4 !important;
	color: #5f5a5b;
}

.blog-tag {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--marino-green);
	color: #000;
	font-weight: 600;
	font-size: 12px;
	letter-spacing: 0.02em;
}

.blog-card-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 600;
	color: var(--marino-ink);
	text-decoration: underline;
	text-decoration-color: var(--marino-green);
	text-decoration-thickness: 3px;
	text-underline-offset: 5px;
}

.blog-card-link::after {
	content: "→";
	transition: transform 0.2s ease;
}

.blog-card-link:hover::after,
.blog-card-link:focus::after {
	transform: translateX(4px);
}

/*********************
HEROES
*********************/
.blog-hero .vm-eyebrow a {
	color: var(--marino-green) !important;
	text-decoration: none;
}

.blog-hero .vm-eyebrow a:hover {
	text-decoration: underline;
}

.blog-hero .page-title {
	max-width: 900px;
	margin-left: auto;
	margin-right: auto;
}

.blog-hero-inner {
	max-width: 900px;
	margin: 0 auto;
}

.blog-hero .blog-lead {
	max-width: 720px;
	margin-left: auto;
	margin-right: auto;
	font-weight: 500;
}

.blog-hero-meta {
	justify-content: center;
	margin: 26px 0 0;
	color: rgba(255, 255, 255, 0.85) !important;
}

.blog-hero-meta span + span::before {
	content: "·";
	margin-right: 16px;
	color: var(--marino-green);
}

.blog-page-number {
	font-weight: 400;
	opacity: 0.7;
}

/*********************
CARD GRID
*********************/
.blog-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 28px;
}

.blog-card {
	display: flex;
	flex-direction: column;
	background: var(--marino-light);
	border-radius: 16px;
	overflow: hidden;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.page-section:nth-child(odd):not(.top-section) .blog-card {
	background: #fff;
}

.blog-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
}

.blog-card-image {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #ddd;
	line-height: 0;
}

.blog-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-image img {
	transform: scale(1.04);
}

.blog-card-body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 24px 24px 28px;
}

.page-section h2.blog-card-title {
	margin: 0 0 12px !important;
	font-size: 19px !important;
	font-weight: 600;
	line-height: 1.35 !important;
}

.blog-card-title a {
	color: var(--marino-ink);
	text-decoration: none;
}

.blog-card-title a:hover {
	text-decoration: underline;
	text-decoration-color: var(--marino-green);
	text-decoration-thickness: 3px;
	text-underline-offset: 4px;
}

.page-section p.blog-card-text {
	margin: 0 0 22px;
	font-size: 15px;
	color: #4a4546;
}

.blog-card-body .blog-card-link {
	margin-top: auto;
	align-self: flex-start;
}

.blog-empty {
	text-align: center;
}

@media only screen and (min-width: 700px) {
	.blog-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media only screen and (min-width: 1030px) {
	.blog-grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 32px;
	}

	.page-section h2.blog-card-title {
		font-size: 21px !important;
	}
}

/* First card on the blog index: image beside the text, full width. */
@media only screen and (min-width: 700px) {
	.blog-card-featured {
		grid-column: 1 / -1;
		display: grid;
		grid-template-columns: 1fr 1fr;
	}

	.blog-card-featured .blog-card-image {
		aspect-ratio: auto;
		min-height: 100%;
	}

	.blog-card-featured .blog-card-body {
		justify-content: center;
		padding: 40px;
	}

	.page-section .blog-card-featured h2.blog-card-title {
		font-size: 24px !important;
	}
}

@media only screen and (min-width: 1030px) {
	.blog-card-featured {
		grid-template-columns: 7fr 5fr;
	}

	.blog-card-featured .blog-card-body {
		padding: 56px;
	}

	.page-section .blog-card-featured h2.blog-card-title {
		font-size: 32px !important;
		line-height: 1.25 !important;
	}

	.page-section .blog-card-featured p.blog-card-text {
		font-size: 17px;
	}
}

.blog-list-section .pagination {
	margin-top: 50px;
}

/*********************
ARTICLE LAYOUT (+ contents list)
*********************/
.blog-layout {
	max-width: 760px;
	margin: 0 auto;
}

.blog-toc {
	margin-bottom: 40px;
	border: 1px solid #e4e4e4;
	border-radius: 16px;
	background: #fff;
}

.blog-toc summary {
	padding: 18px 22px;
	font-weight: 600;
	font-size: 15px;
	cursor: pointer;
	list-style: none;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.blog-toc summary::-webkit-details-marker {
	display: none;
}

.blog-toc summary::after {
	content: "";
	width: 9px;
	height: 9px;
	border-right: 2px solid var(--marino-ink);
	border-bottom: 2px solid var(--marino-ink);
	transform: rotate(45deg);
	margin-top: -4px;
	transition: transform 0.2s ease;
}

.blog-toc details[open] summary::after {
	transform: rotate(-135deg);
	margin-top: 4px;
}

.blog-toc ol {
	margin: 0;
	padding: 0 22px 18px;
	list-style: none;
	counter-reset: toc;
}

.blog-toc li {
	margin: 0;
	counter-increment: toc;
}

.blog-toc a {
	display: block;
	position: relative;
	padding: 7px 0 7px 30px;
	font-size: 14px;
	line-height: 1.4;
	color: #4a4546;
	text-decoration: none;
}

.blog-toc a::before {
	content: counter(toc, decimal-leading-zero);
	position: absolute;
	left: 0;
	top: 8px;
	font-size: 11px;
	font-weight: 600;
	color: #9a9596;
}

.blog-toc a:hover,
.blog-toc a.is-active {
	color: #000;
}

.blog-toc a.is-active {
	font-weight: 600;
}

.blog-toc a.is-active::before {
	color: #000;
	background: var(--marino-green);
	border-radius: 4px;
	padding: 0 3px;
	margin-left: -3px;
}

@media only screen and (min-width: 1100px) {
	.blog-layout.has-toc {
		max-width: 1120px;
		display: grid;
		grid-template-columns: 260px minmax(0, 760px);
		gap: 80px;
		align-items: start;
		justify-content: center;
	}

	.blog-toc {
		position: sticky;
		top: 130px;
		margin: 0;
		padding-left: 4px;
		border: 0;
		background: none;
		max-height: calc(100vh - 160px);
		overflow-y: auto;
	}

	.blog-toc summary {
		padding: 0 0 14px;
		cursor: default;
		pointer-events: none;
		font-size: 13px;
		letter-spacing: 0.06em;
		text-transform: uppercase;
	}

	.blog-toc summary::after {
		display: none;
	}

	.blog-toc ol {
		padding: 0;
		border-left: 2px solid #ececec;
	}

	.blog-toc a {
		padding-left: 46px;
		margin-left: -2px;
		border-left: 2px solid transparent;
	}

	.blog-toc a::before {
		left: 16px;
	}

	.blog-toc a.is-active {
		border-left-color: var(--marino-green);
	}
}

/*********************
ARTICLE TEXT
*********************/
.blog-body > :first-child {
	margin-top: 0 !important;
}

.blog-body p,
.blog-body li {
	line-height: 1.75 !important;
}

.blog-body p {
	margin: 0 0 1.25em;
}

@media only screen and (min-width: 1240px) {
	.blog-body p,
	.blog-body li {
		font-size: 18px !important;
	}
}

.page-section .blog-body h2 {
	margin: 2.2em 0 0.7em !important;
	font-size: 24px !important;
	font-weight: 600;
	line-height: 1.25 !important;
	scroll-margin-top: 130px;
}

.page-section .blog-body h3 {
	margin: 1.8em 0 0.5em !important;
	font-size: 19px !important;
	font-weight: 600;
	line-height: 1.35 !important;
	scroll-margin-top: 130px;
}

/* Venue names under a group heading (Birmingham guide, batch 16): the comparison table jumps to them. */
.page-section .blog-body h4 {
	margin: 1.7em 0 0.45em !important;
	font-size: 17px !important;
	font-weight: 600;
	line-height: 1.4 !important;
	text-transform: none;
	letter-spacing: 0;
	scroll-margin-top: 130px;
}

@media only screen and (min-width: 1000px) {
	.page-section .blog-body h2 {
		font-size: 30px !important;
	}

	.page-section .blog-body h3 {
		font-size: 21px !important;
	}

	.page-section .blog-body h4 {
		font-size: 18px !important;
	}
}

.blog-body h2 + h3,
.blog-body h3 + h4 {
	margin-top: 0.8em !important;
}

.blog-body a {
	color: var(--marino-ink);
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: var(--marino-green);
	text-decoration-thickness: 3px;
	text-underline-offset: 4px;
}

.blog-body a:hover {
	background: rgba(130, 255, 205, 0.35);
}

.blog-body ul,
.blog-body ol {
	margin: 0 0 1.5em;
	padding: 0;
	list-style: none;
}

.blog-body ul li {
	position: relative;
	margin: 0 0 0.6em;
	padding-left: 28px;
	list-style: none;
}

.blog-body ul li::before {
	content: "";
	position: absolute;
	left: 4px;
	top: 0.72em;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--marino-green);
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}

/* The short answer near the top of each article. */
.blog-body .blog-summary {
	margin: 1.8em 0;
	padding: 24px 28px;
	border-left: 4px solid var(--marino-green);
	border-radius: 0 16px 16px 0;
	background: var(--marino-light);
}

/* "Ask: ..." lines */
.blog-body .blog-ask {
	padding: 16px 22px;
	border: 1px solid #e4e4e4;
	border-radius: 14px;
}

.blog-body .blog-ask strong:first-child {
	display: inline-block;
	margin-right: 6px;
	padding: 1px 10px;
	border-radius: 999px;
	background: var(--marino-green);
	color: #000;
	font-size: 0.85em;
}

/* Tables */
.blog-table {
	margin: 1.8em 0 2em;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border: 1px solid #e4e4e4;
	border-radius: 16px;
}

.blog-table table {
	width: 100%;
	min-width: 560px;
	border-collapse: collapse;
	margin: 0;
	border: 0;
}

.blog-table th,
.blog-table td {
	padding: 14px 18px;
	border: 0;
	border-bottom: 1px solid #ececec;
	text-align: left;
	vertical-align: top;
	font-size: 15px;
	line-height: 1.5;
}

.blog-table tr:last-child td {
	border-bottom: 0;
}

.blog-table thead th {
	background: #000;
	color: #fff;
	font-weight: 600;
	font-size: 14px;
}

.blog-table tbody tr:nth-child(even) td {
	background: #fafafa;
}

.blog-table td:first-child {
	font-weight: 600;
}

/* A plain two-column table (e.g. brief item / example answer) needs no minimum width. */
.blog-table.cols-2 table {
	min-width: 0;
}

.blog-table.cols-2 td:first-child {
	width: 34%;
}

@media only screen and (min-width: 1240px) {
	.blog-table th,
	.blog-table td {
		font-size: 16px;
	}
}

/*********************
AUTHOR
*********************/
.blog-author {
	display: flex;
	gap: 22px;
	align-items: flex-start;
	margin-top: 56px;
	padding: 28px;
	border-radius: 16px;
	background: var(--marino-light);
}

.blog-author-photo {
	flex: 0 0 auto;
	width: 84px !important;
	height: 84px !important;
	border-radius: 50%;
	object-fit: cover;
}

.page-section .blog-author p {
	margin: 0 0 12px;
	font-size: 15px !important;
	line-height: 1.6 !important;
}

.page-section .blog-author p.blog-author-name {
	margin-bottom: 6px;
	font-weight: 600;
	font-size: 17px !important;
}

.blog-author-name span {
	display: block;
	font-weight: 400;
	font-size: 14px;
	color: #5f5a5b;
}

@media only screen and (max-width: 520px) {
	.blog-author {
		flex-direction: column;
	}
}

/*********************
MORE FROM THE BLOG
*********************/
.blog-more-heading {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 40px;
}

.blog-more-heading .vm-heading {
	margin: 0 !important;
}

.blog-more-heading .button {
	margin: 0 !important;
}

/* The FAQ after an article lines up with the article column
   (contents list 260px + gap 80px to its left on wide screens). */
.single-post .vm-faq .wrap > * {
	max-width: 760px;
	margin-left: auto;
	margin-right: auto;
}

@media only screen and (min-width: 1100px) {
	.single-post .vm-faq .wrap > * {
		position: relative;
		left: 170px;
		max-width: min(760px, calc(100% - 340px));
	}
}

/* Images inside an article (figure.blog-figure), with an optional caption */
.blog-body .blog-figure {
	margin: 2em 0;
}

.blog-body .blog-figure img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 16px;
}

.blog-body .blog-figure figcaption {
	margin-top: 10px;
	font-size: 13px;
	color: #6b6b6b;
}

/* Video inside an article ([vm_vimeo] shortcode, e.g. the event film in the venue guides) */
.blog-body .blog-video {
	margin: 2em 0;
}

.blog-body .blog-video .video-vimeo {
	border-radius: 16px;
}
