/**
 * Blog — the /blog/ listing, single articles, archives, search and 404.
 *
 * Mirrors the original's per-page stylesheet: white `.item-in` cards on the
 * lavender ground, a short grey separator under each heading, italic body
 * copy and a red "...Back" tab under the last card. Articles published later
 * on the original used slightly different values; `.is-legacy` (the early
 * articles and the listing) and `.is-back-flat` / `.has-h1-32` pick those.
 */

/* Columns the articles use that theme.css does not ship. */
@media (min-width: 768px) {
	.ax-blog .ax-col-md-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
	.ax-blog .ax-col-md-12 { flex: 0 0 100%; max-width: 100%; }
}

.ax-blog ul {
	padding-left: 0;
	list-style: none;
}

.ax-blog .ax-mt-2 { margin-top: 0.5rem; }
.ax-blog .ax-pt-2 { padding-top: 0.5rem; }
.ax-blog .ax-pl-4 { padding-left: 1.5rem; }
.ax-blog .ax-pl-20 { padding-left: 20px; }

/* Articles with a poster beside the intro reset h1 spacing. */
.ax-blog h1,
.ax-blog h2 {
	margin: 0;
	padding-top: 0;
	padding-bottom: 10px;
}

.ax-blog.has-h1-32 h1,
.ax-blog.has-h1-32 h2 {
	font-size: 32px;
}

/* -------------------------------------------------------------------------
 * Cards
 * ---------------------------------------------------------------------- */

.ax-blog-item,
.ax-blog-list .wp-block-post {
	position: relative;
	margin-bottom: 30px;
	min-height: 1px;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
}

.ax-blog-card {
	position: relative;
	padding: 35px;
	background: #fff;
}

.ax-blog.is-legacy .ax-blog-card {
	padding: 40px;
}

.ax-blog-card::before {
	content: "";
	position: absolute;
	right: 0;
	bottom: 0;
	width: 0;
	height: 2px;
	background: #333;
	transition: width 0.4s;
}

.ax-blog-card:hover::before {
	width: 100%;
}

.ax-blog-item h4,
.ax-blog-list .wp-block-post h4 {
	margin-top: 25px;
	font-size: 18px;
	letter-spacing: 2px;
	text-transform: uppercase;
}

.ax-blog-item p,
.ax-blog-list .wp-block-post p {
	font-size: 16px;
	font-weight: 400;
	font-style: italic;
	line-height: 26px;
}

.ax-blog-item a,
.ax-blog-list .wp-block-post a {
	margin-top: 10px;
	color: #666;
	font-family: "Montserrat", sans-serif;
	font-size: 12px;
	text-transform: uppercase;
}

.ax-blog-item a:hover,
.ax-blog-list .wp-block-post a:hover {
	color: #666;
	text-decoration: none;
}

.ax-blog-sep {
	width: 35px;
	height: 3px;
	margin-bottom: 10px;
	border: 0;
	background: #777;
}

.ax-blog-border {
	border: 1px solid #dee2e6;
}

/* A link wrapped round a whole paragraph on the original. */
.ax-blog-item p.ax-blog-linkp a {
	margin: 0;
	font-size: inherit;
	transition: all 0.3s ease-in;
}

.ax-blog-item p.ax-blog-linkp {
	color: #666;
	font-family: "Montserrat", sans-serif;
	text-transform: uppercase;
}

/* Check-mark bullets: the icon the original set before each line. */
.ax-blog li.ax-check::before {
	content: "";
	display: inline-block;
	width: 0.875em;
	height: 1em;
	vertical-align: -0.125em;
	background-color: currentColor;
	-webkit-mask: var(--ax-i-check) center / contain no-repeat;
	mask: var(--ax-i-check) center / contain no-repeat;
}

.ax-blog h1.ax-ico-plane::before {
	content: "";
	display: inline-block;
	width: 0.9375em;
	height: 0.75em;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 512'%3E%3Cpath d='M381 114.9L186.1 41.8c-16.7-6.2-35.2-5.3-51.1 2.7L89.1 67.4C78 73 77.2 88.5 87.6 95.2l146.9 94.5L136 240 77.8 214.1c-8.7-3.9-18.8-3.7-27.3 .6L18.3 230.8c-9.3 4.7-11.8 16.8-5 24.7l73.1 85.3c6.1 7.1 15 11.2 24.3 11.2H248.4c5 0 9.9-1.2 14.3-3.4L535.6 212.2c46.5-23.3 82.5-63.3 100.8-112C645.9 75 627.2 48 600.2 48H542.8c-20.2 0-40.2 4.8-58.2 14L381 114.9zM0 480c0 17.7 14.3 32 32 32H608c17.7 0 32-14.3 32-32s-14.3-32-32-32H32c-17.7 0-32 14.3-32 32z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 512'%3E%3Cpath d='M381 114.9L186.1 41.8c-16.7-6.2-35.2-5.3-51.1 2.7L89.1 67.4C78 73 77.2 88.5 87.6 95.2l146.9 94.5L136 240 77.8 214.1c-8.7-3.9-18.8-3.7-27.3 .6L18.3 230.8c-9.3 4.7-11.8 16.8-5 24.7l73.1 85.3c6.1 7.1 15 11.2 24.3 11.2H248.4c5 0 9.9-1.2 14.3-3.4L535.6 212.2c46.5-23.3 82.5-63.3 100.8-112C645.9 75 627.2 48 600.2 48H542.8c-20.2 0-40.2 4.8-58.2 14L381 114.9zM0 480c0 17.7 14.3 32 32 32H608c17.7 0 32-14.3 32-32s-14.3-32-32-32H32c-17.7 0-32 14.3-32 32z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.ax-blog i.fa-helicopter {
	display: inline-block;
	width: 1.25em;
	height: 1em;
	vertical-align: -0.125em;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 512'%3E%3Cpath d='M128 32c0-17.7 14.3-32 32-32H544c17.7 0 32 14.3 32 32s-14.3 32-32 32H384v64h32c88.4 0 160 71.6 160 160v64c0 17.7-14.3 32-32 32H384 320c-20.1 0-39.1-9.5-51.2-25.6l-71.4-95.2c-3.5-4.7-8.3-8.3-13.700-10.5L47.2 198.1c-9.5-3.8-16.7-12-19.2-22L5 83.9C2.4 73.8 10.1 64 20.5 64H48c10.1 0 19.600 4.7 25.6 12.8L112 128H320V64H160c-17.7 0-32-14.3-32-32zM384 320H512V288c0-53-43-96-96-96H384V320zM630.6 425.4c12.5 12.5 12.5 32.8 0 45.3l-3.9 3.9c-24 24-56.6 37.5-90.5 37.5H256c-17.7 0-32-14.3-32-32s14.3-32 32-32H536.2c17 0 33.3-6.7 45.3-18.7l3.9-3.9c12.5-12.5 32.8-12.5 45.3 0z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 512'%3E%3Cpath d='M128 32c0-17.7 14.3-32 32-32H544c17.7 0 32 14.3 32 32s-14.3 32-32 32H384v64h32c88.4 0 160 71.6 160 160v64c0 17.7-14.3 32-32 32H384 320c-20.1 0-39.1-9.5-51.2-25.6l-71.4-95.2c-3.5-4.7-8.3-8.3-13.700-10.5L47.2 198.1c-9.5-3.8-16.7-12-19.2-22L5 83.9C2.4 73.8 10.1 64 20.5 64H48c10.1 0 19.600 4.7 25.6 12.8L112 128H320V64H160c-17.7 0-32-14.3-32-32zM384 320H512V288c0-53-43-96-96-96H384V320zM630.6 425.4c12.5 12.5 12.5 32.8 0 45.3l-3.9 3.9c-24 24-56.6 37.5-90.5 37.5H256c-17.7 0-32-14.3-32-32s14.3-32 32-32H536.2c17 0 33.3-6.7 45.3-18.7l3.9-3.9c12.5-12.5 32.8-12.5 45.3 0z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* -------------------------------------------------------------------------
 * Poster beside the intro, and its lightbox (assets/js/blog.js)
 * ---------------------------------------------------------------------- */

.ax-blog-zoom {
	margin: 0;
}

.ax-blog-zoom img {
	position: absolute;
	top: 35%;
	left: 75%;
	width: 300px;
	max-width: 100%;
	height: auto;
	margin: -100px 0 0 -150px;
	border: 10px solid #fff;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
	cursor: pointer;
	transition: 0.3s;
}

.ax-blog-zoom img:hover {
	opacity: 0.7;
}

.ax-blog-zoom--t19 img { top: 19%; }
.ax-blog-zoom--t20 img { top: 20%; }
.ax-blog-zoom--t23 img { top: 23%; }
.ax-blog-zoom--t24 img { top: 24%; }
.ax-blog-zoom--t26 img { top: 26%; }
.ax-blog-zoom--t29 img { top: 29%; }
.ax-blog-zoom--t31 img { top: 31%; }
.ax-blog-zoom--t35 img { top: 35%; }
.ax-blog-zoom--t36 img { top: 36%; }
.ax-blog-zoom--t45 img { top: 45%; z-index: 9; }

@media (max-width: 768px) {
	/* Let the sticky poster travel within its column, as the bare img did. */
	.ax-blog-zoom {
		display: contents;
	}

	.ax-blog-zoom img,
	.ax-blog-zoom[class*="--t"] img {
		position: sticky;
		z-index: 9;
		top: 35%;
		width: 100%;
		margin: -60px 0 0 -150px;
	}
}

.ax-blog-modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	z-index: 1050;
	width: 100%;
	height: 100%;
	padding-top: 20px;
	overflow: hidden;
	outline: 0;
	background-color: rgba(0, 0, 0, 0.7);
}

.ax-blog-modal.is-open {
	display: block;
}

.ax-blog-modal__img {
	display: block;
	width: 33%;
	max-width: 1200px;
	margin: auto;
	border: 1px solid rgba(0, 0, 0, 0.2);
	border-radius: 0.3rem;
	background-color: #fff;
	animation: ax-blog-zoom 0.6s;
}

.ax-blog-modal__caption {
	display: block;
	width: 60%;
	max-width: 1200px;
	height: 150px;
	margin: auto;
	padding: 10px 0;
	color: #ccc;
	text-align: center;
	animation: ax-blog-zoom 0.6s;
}

.ax-blog-modal__close {
	position: absolute;
	top: 15px;
	right: 35px;
	padding: 0;
	border: 0;
	background: none;
	color: #fff;
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1;
	text-shadow: 0 1px 0 #fff;
	cursor: pointer;
}

@keyframes ax-blog-zoom {
	from { transform: scale(0); }
	to { transform: scale(1); }
}

@media (max-width: 768px) {
	.ax-blog-modal__img {
		width: 80%;
	}
}

/* -------------------------------------------------------------------------
 * "...Back" tab
 * ---------------------------------------------------------------------- */

.ax-blog-back {
	position: relative;
	padding: 10px;
	color: #626060;
	font-family: "Oswald", serif;
	font-weight: bold;
}

.ax-blog .ax-blog-back .ax-blog-back__text {
	font-weight: inherit;
	position: absolute;
	top: -27px;
	left: 0;
	z-index: 10;
	margin: 0;
	padding: 10px;
	color: #fff;
	font-size: inherit;
	font-style: normal;
	line-height: inherit;
	text-shadow: 1px 1px #111;
}

.ax-blog.is-legacy .ax-blog-back .ax-blog-back__text,
.ax-blog.is-back-flat .ax-blog-back .ax-blog-back__text {
	top: 0;
}

.ax-blog-back__text a {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 10;
	padding: 10px;
	border-right: 1px solid #777;
	background: #c8102e;
	color: #fff;
	text-shadow: 1px 1px #111;
}

.ax-blog-item .ax-blog-back__text a,
.ax-blog-back__text a:hover {
	color: #fff;
}

/* -------------------------------------------------------------------------
 * Listing
 * ---------------------------------------------------------------------- */

.ax-blog-list .wp-block-post-template {
	margin-top: 0;
	margin-bottom: 0;
	padding: 0;
	list-style: none;
}

.ax-blog-list .wp-block-post {
	flex: 0 0 100%;
	max-width: 100%;
	width: 100%;
	padding: 0 15px;
}

@media (min-width: 768px) {
	.ax-blog-list .wp-block-post {
		flex: 0 0 50%;
		max-width: 50%;
	}
}

.ax-blog-list .ax-blog-sep {
	margin-bottom: 30px;
}

.ax-blog-list .wp-block-post a {
	font-size: 14px;
}

.ax-blog-list .ax-blog-empty {
	margin: 0 0 30px;
}

/* Pager — Bootstrap's .pagination.pagination-lg. */
.ax-pagination {
	display: flex;
	margin: 0 0 1rem;
	padding-left: 0;
	border-radius: 0.25rem;
	list-style: none;
}

.ax-page-link {
	position: relative;
	display: block;
	margin-left: -1px;
	padding: 0.75rem 1.5rem;
	border: 1px solid #dee2e6;
	background-color: #fff;
	color: #007bff;
	font-size: 1.25rem;
	line-height: 1.5;
}

.ax-page-item:first-child .ax-page-link {
	margin-left: 0;
	border-top-left-radius: 0.3rem;
	border-bottom-left-radius: 0.3rem;
}

.ax-page-item a.ax-page-link {
	color: #999;
	transition: all 0.3s ease-in;
}

.ax-page-item a.ax-page-link:hover {
	z-index: 2;
	border-color: #2d8bff;
	background-color: #2d8bff;
	color: #fff;
	text-decoration: none;
}

.ax-page-item.is-disabled a.ax-page-link {
	pointer-events: none;
	border-color: #dee2e6;
	background-color: #fff;
	color: #6c757d;
}

/* Search form in the empty state and on 404. */
.ax-blog-search .wp-block-search__inside-wrapper {
	display: flex;
	gap: 8px;
	max-width: 460px;
	margin-bottom: 1rem;
}

.ax-blog-search .wp-block-search__input {
	flex: 1;
	padding: 6px 12px;
	border: 1px solid #ced4da;
	font: inherit;
}

.ax-blog-search .wp-block-search__button {
	padding: 6px 16px;
	border: 0;
	background: #c8102e;
	color: #fff;
	font: inherit;
	cursor: pointer;
}

.ax-blog-item .ax-blog-home-link a {
	font-style: normal;
}

/*
 * The original always printed cards in pairs; an odd last card sat next to an
 * empty column, which still adds its 30px bottom margin once columns stack.
 */
.ax-blog-list .wp-block-post-template:has(> .wp-block-post:nth-child(odd):last-child)::after {
	content: "";
	flex: 0 0 100%;
	max-width: 100%;
	min-height: 1px;
	margin-bottom: 30px;
}

@media (min-width: 768px) {
	.ax-blog-list .wp-block-post-template:has(> .wp-block-post:nth-child(odd):last-child)::after {
		flex-basis: 50%;
		max-width: 50%;
	}
}
