/**
 * Blog & Event — navy theme for archives and single posts.
 * Matches the home / Services / Shop pages. Loads after post-card.css.
 */

body.jit-blog-dark {
	--bd-bg: #0c2550;
	--bd-ice: #dcefff;
	--bd-muted: rgba(220, 239, 255, 0.64);
	--bd-line: rgba(220, 239, 255, 0.12);
	--bd-sky: #5fb4ff;
	--bd-ease: cubic-bezier(0.22, 1, 0.36, 1);
	background: var(--bd-bg);
}

body.jit-blog-dark #wrapper,
body.jit-blog-dark #main {
	background:
		radial-gradient(ellipse 50% 30% at 70% 0%, rgba(47, 134, 214, 0.16), transparent 70%),
		var(--bd-bg);
}

body.jit-blog-dark .row-divided > .col + .col:not(.large-12) {
	border-left-color: transparent !important;
}

/* =========================================================
   HERO (archive + single)
   ========================================================= */
.jit-blog-hero {
	position: relative;
	padding: 70px 0 44px;
	color: var(--bd-ice);
	background:
		radial-gradient(ellipse 45% 90% at 85% 30%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 70%),
		radial-gradient(ellipse 60% 60% at 0% 100%, rgba(22, 66, 126, 0.8), transparent 70%),
		linear-gradient(135deg, #0b234b 0%, #0e3166 60%, #113f7d 100%);
	overflow: hidden;
}

.jit-blog-hero__bg {
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgba(95, 180, 255, 0.06) 1px, transparent 1px),
		linear-gradient(90deg, rgba(95, 180, 255, 0.06) 1px, transparent 1px);
	background-size: 48px 48px;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 40%, #000 80%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 40%, #000 80%, transparent);
	animation: jitBlogGrid 40s linear infinite;
	pointer-events: none;
}

@keyframes jitBlogGrid {
	to { background-position: 48px 48px; }
}

@keyframes jitBlogUp {
	from { opacity: 0; transform: translateY(18px); }
}

.jit-blog-hero__inner > * {
	position: relative;
	animation: jitBlogUp 0.9s var(--bd-ease) both;
}

.jit-blog-hero__inner > *:nth-child(2) { animation-delay: 0.08s; }
.jit-blog-hero__inner > *:nth-child(3) { animation-delay: 0.16s; }
.jit-blog-hero__inner > *:nth-child(4) { animation-delay: 0.24s; }
.jit-blog-hero__inner > *:nth-child(5) { animation-delay: 0.32s; }

.jit-blog-hero__label {
	margin: 0 0 16px;
	color: var(--accent);
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: 0.24em;
	text-transform: uppercase;
}

.jit-blog-hero__title {
	margin: 0 0 14px;
	font-size: clamp(36px, 4.6vw, 64px);
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: -0.035em;
	color: #fff;
}

.jit-blog-hero__title--single {
	max-width: 980px;
	font-size: clamp(30px, 3.6vw, 50px);
	line-height: 1.12;
}

.jit-blog-hero__lead {
	max-width: 620px;
	margin: 0 0 16px;
	font-size: 16.5px;
	line-height: 1.7;
	color: var(--bd-muted);
}

.jit-blog-hero__count {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 6px 14px 6px 10px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid var(--bd-line);
	font-size: 13px;
	color: var(--bd-muted);
}

.jit-blog-hero__count::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--accent);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent);
}

.jit-blog-hero__count b {
	color: #fff;
}

.jit-blog-hero__crumbs {
	margin-bottom: 20px;
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--bd-muted);
}

.jit-blog-hero__crumbs a {
	color: var(--bd-muted);
	text-decoration: none;
	transition: color 0.25s ease;
}

.jit-blog-hero__crumbs a:hover,
.jit-blog-hero__crumbs a.is-cat {
	color: var(--accent);
}

.jit-blog-hero__crumbs .sep {
	margin: 0 10px;
	opacity: 0.5;
}

.jit-blog-hero__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 22px;
}

.jit-blog-hero__meta span {
	padding: 6px 14px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid var(--bd-line);
	font-size: 13px;
	color: var(--bd-ice);
}

.jit-blog-hero--single {
	padding-bottom: 110px;
}

/* Chips */
.jit-blog-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 28px;
}

.jit-blog-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 16px;
	border-radius: 999px;
	border: 1px solid var(--bd-line);
	background: rgba(255, 255, 255, 0.04);
	color: var(--bd-ice);
	font-size: 13.5px;
	font-weight: 500;
	text-decoration: none;
	transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s var(--bd-ease);
}

.jit-blog-chip span {
	padding: 1px 7px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.08);
	color: var(--bd-muted);
	font-size: 11.5px;
	font-weight: 600;
}

.jit-blog-chip:hover {
	color: #fff;
	border-color: color-mix(in srgb, var(--accent) 60%, transparent);
	transform: translateY(-2px);
}

.jit-blog-chip.is-active {
	color: #0b1729;
	background: var(--accent);
	border-color: transparent;
	box-shadow: 0 10px 24px -12px var(--accent);
}

.jit-blog-chip.is-active span {
	background: rgba(11, 23, 41, 0.15);
	color: #0b1729;
}

/* =========================================================
   ARCHIVE
   ========================================================= */
body.jit-blog-cards .archive-page-header {
	display: none;
}

body.jit-blog-cards .blog-archive {
	padding-top: 50px;
}

/* Cards */
body.jit-blog-cards .jit-post-card__inner {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 10px;
	background: linear-gradient(170deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
	border: 1px solid var(--bd-line);
	border-radius: 20px;
	box-shadow: none;
	transition: transform 0.5s var(--bd-ease), border-color 0.4s ease, box-shadow 0.5s var(--bd-ease);
}

body.jit-blog-cards .jit-post-card:hover .jit-post-card__inner {
	transform: translateY(-6px);
	border-color: color-mix(in srgb, var(--accent) 55%, transparent);
	box-shadow: 0 26px 50px -26px color-mix(in srgb, var(--accent) 75%, transparent);
}

body.jit-blog-cards .jit-post-card__image-wrap {
	border-radius: 14px;
	overflow: hidden;
	background: #0f2d5e;
}

body.jit-blog-cards .jit-post-card__image-wrap img {
	transition: transform 0.8s var(--bd-ease);
}

body.jit-blog-cards .jit-post-card:hover .jit-post-card__image-wrap img {
	transform: scale(1.06);
}

body.jit-blog-cards .jit-post-card__hover,
body.jit-blog-cards .jit-post-card__accent {
	display: none !important;
}

body.jit-blog-cards .jit-post-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 18px 8px 4px;
	background: transparent;
}

body.jit-blog-cards .jit-post-card__category {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 10px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--accent);
}

body.jit-blog-cards .jit-post-card__category::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--accent);
	box-shadow: 0 0 10px var(--accent);
}

body.jit-blog-cards .jit-post-card__title {
	margin: 0 0 10px;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.4;
}

body.jit-blog-cards .jit-post-card__title a {
	color: #fff !important;
	background: linear-gradient(90deg, currentColor, currentColor) 0 100% / 0 1px no-repeat;
	text-decoration: none;
	transition: background-size 0.45s var(--bd-ease);
}

body.jit-blog-cards .jit-post-card:hover .jit-post-card__title a {
	background-size: 100% 1px;
}

body.jit-blog-cards .jit-post-card__excerpt {
	margin-bottom: 16px;
	color: var(--bd-muted);
	font-size: 14px;
	line-height: 1.65;
	text-transform: none;
}

body.jit-blog-cards .jit-post-card__foot {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-top: auto;
	padding-top: 12px;
	border-top: 1px solid var(--bd-line);
}

body.jit-blog-cards .jit-post-card__date,
body.jit-blog-cards .jit-post-card__read {
	margin: 0;
	font-size: 12.5px;
	color: var(--bd-muted);
}

body.jit-blog-cards .jit-post-card__read::before {
	content: "·";
	margin-right: 14px;
	opacity: 0.6;
}

body.jit-blog-cards .jit-post-card__go {
	display: grid;
	place-items: center;
	flex-shrink: 0;
	width: 34px;
	height: 34px;
	margin-left: auto;
	border-radius: 50%;
	border: 1px solid var(--bd-line);
	color: var(--bd-ice);
	transition: background-color 0.35s ease, border-color 0.35s ease, transform 0.45s var(--bd-ease), color 0.3s ease;
}

body.jit-blog-cards .jit-post-card:hover .jit-post-card__go {
	background: var(--accent);
	border-color: var(--accent);
	color: #0b1729;
	transform: rotate(-45deg);
}

/* Featured: the newest post spans the full row on page 1 */
@media (min-width: 850px) {
	body.jit-blog-first-page .jit-post-cards > .jit-post-card:first-child {
		flex-basis: 100%;
		max-width: 100%;
	}

	body.jit-blog-first-page .jit-post-cards > .jit-post-card:first-child .jit-post-card__inner {
		display: grid;
		grid-template-columns: 1.25fr 1fr;
		gap: 10px 30px;
		padding: 12px;
	}

	body.jit-blog-first-page .jit-post-cards > .jit-post-card:first-child .jit-post-card__image-wrap {
		height: 100%;
		min-height: 340px;
		aspect-ratio: auto;
	}

	body.jit-blog-first-page .jit-post-cards > .jit-post-card:first-child .jit-post-card__media {
		height: 100%;
	}

	body.jit-blog-first-page .jit-post-cards > .jit-post-card:first-child .jit-post-card__body {
		padding: 28px 22px 14px 0;
	}

	body.jit-blog-first-page .jit-post-cards > .jit-post-card:first-child .jit-post-card__title {
		font-size: clamp(22px, 2.2vw, 30px);
		line-height: 1.2;
		letter-spacing: -0.02em;
	}

	body.jit-blog-first-page .jit-post-cards > .jit-post-card:first-child .jit-post-card__excerpt {
		font-size: 15.5px;
	}

	body.jit-blog-first-page .jit-post-cards > .jit-post-card:first-child .jit-post-card__category::after {
		content: "Latest";
		margin-left: 6px;
		padding: 3px 9px;
		border-radius: 999px;
		background: var(--accent);
		color: #0b1729;
		font-size: 10px;
		letter-spacing: 0.14em;
	}
}

/* Cards fade up as they enter the viewport */
@supports (animation-timeline: view()) {
	body.jit-blog-cards .jit-post-cards > .jit-post-card {
		animation: jitBlogUp linear both;
		animation-timeline: view();
		animation-range: entry 0% entry 35%;
	}
}

/* Pagination */
body.jit-blog-dark .page-numbers li > * {
	border-color: var(--bd-line) !important;
	background: rgba(255, 255, 255, 0.04);
	color: var(--bd-ice) !important;
}

body.jit-blog-dark .page-numbers .current {
	background: var(--bd-sky) !important;
	border-color: var(--bd-sky) !important;
	color: #0b1729 !important;
}

/* =========================================================
   Sidebar (archive + single): glass panels
   ========================================================= */
body.jit-blog-cards #secondary .widget{
	padding: 22px;
	border: 1px solid var(--bd-line) !important;
	border-radius: 18px;
	background: linear-gradient(170deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)) !important;
	box-shadow: none !important;
}

body.jit-blog-cards #secondary .widget-title{
	color: #fff !important;
}

body.jit-blog-cards #secondary .is-divider{
	background: var(--bd-sky);
}

body.jit-blog-cards #secondary .widget a{
	color: var(--bd-ice) !important;
	transition: color 0.25s ease, padding-left 0.3s var(--bd-ease);
}

body.jit-blog-cards #secondary .widget a:hover{
	color: var(--bd-sky) !important;
	padding-left: 4px;
}

body.jit-blog-cards #secondary .widget li{
	border-color: var(--bd-line) !important;
}

body.jit-blog-cards #secondary .current-cat > a {
	color: var(--bd-sky) !important;
	font-weight: 600;
}

body.jit-blog-cards #secondary input[type="search"]{
	height: 44px;
	border: 1px solid var(--bd-line) !important;
	border-radius: 12px 0 0 12px !important;
	background: rgba(255, 255, 255, 0.05) !important;
	color: #fff !important;
	box-shadow: none !important;
}

body.jit-blog-cards #secondary input[type="search"]::placeholder{
	color: var(--bd-muted);
}

body.jit-blog-cards #secondary .ux-search-submit{
	height: 44px;
	border-radius: 0 12px 12px 0 !important;
	background: linear-gradient(120deg, #1660a8, #2f86d6) !important;
}

/* =========================================================
   SINGLE POST: white reading sheet floating over navy
   ========================================================= */
body.jit-single-post.jit-blog-dark .blog-single {
	padding-top: 0;
}

body.jit-single-post.jit-blog-dark .blog-single > .row > .large-9 .article-inner {
	position: relative;
	margin-top: -80px;
	padding: clamp(24px, 3.4vw, 48px);
	border-radius: 24px;
	background: #fff;
	box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.55);
	animation: jitBlogUp 0.9s var(--bd-ease) 0.2s both;
}

/* Title / meta now live in the hero */
body.jit-single-post.jit-blog-dark .entry-header-text {
	display: none;
}

body.jit-single-post.jit-blog-dark .entry-image {
	margin: 0 0 32px;
	border-radius: 16px;
	overflow: hidden;
}

body.jit-single-post.jit-blog-dark .entry-image img {
	display: block;
	width: 100%;
}

body.jit-single-post.jit-blog-dark .entry-content {
	color: #2b3a4d;
	font-size: 17px;
	line-height: 1.8;
}

body.jit-single-post.jit-blog-dark .entry-content h2,
body.jit-single-post.jit-blog-dark .entry-content h3 {
	color: #0b1729;
	letter-spacing: -0.015em;
}

body.jit-single-post.jit-blog-dark .entry-content img {
	border-radius: 14px;
}

body.jit-single-post.jit-blog-dark .entry-content a {
	color: #1660a8;
}

/* Post footer, author box, prev/next on navy */
body.jit-single-post.jit-blog-dark .blog-share,
body.jit-single-post.jit-blog-dark .entry-author,
body.jit-single-post.jit-blog-dark .next-prev-nav {
	color: var(--bd-ice);
}

body.jit-single-post.jit-blog-dark .next-prev-nav a,
body.jit-single-post.jit-blog-dark .entry-author a {
	color: #fff !important;
}

body.jit-single-post.jit-blog-dark .next-prev-nav,
body.jit-single-post.jit-blog-dark .next-prev-nav .flex-col {
	border-color: var(--bd-line) !important;
}

/* Sidebar on single posts keeps its white cards (TOC readability) */
body.jit-single-post.jit-blog-dark .post-sidebar {
	padding-top: 20px;
}

body.jit-single-post.jit-blog-dark .post-sidebar .widget {
	border-radius: 18px;
	box-shadow: 0 24px 50px -30px rgba(0, 0, 0, 0.6);
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 849px) {
	.jit-blog-hero {
		padding: 44px 0 30px;
	}

	.jit-blog-hero--single {
		padding-bottom: 90px;
	}

	.jit-blog-chips {
		flex-wrap: nowrap;
		overflow-x: auto;
		scrollbar-width: none;
	}

	.jit-blog-chip {
		flex-shrink: 0;
	}

	body.jit-single-post.jit-blog-dark .blog-single > .row > .large-9 .article-inner {
		margin-top: -60px;
		border-radius: 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.jit-blog-hero *,
	body.jit-blog-cards .jit-post-cards > .jit-post-card,
	body.jit-single-post .article-inner {
		animation: none !important;
	}
}
