/* ==========================================================================
   All Japan Relocation — single blog post
   Selectors are scoped under .ajr-post (2+ classes) so they win over
   Elementor kit rules like `.elementor-kit-5 h2` regardless of load order.
   ========================================================================== */

.ajr-post {
	/* Brand tokens — adjust to match the Elementor kit if needed */
	--ajr-navy: #1e2c5b;
	--ajr-orange: #e25911;
	--ajr-orange-dark: #c24a0c;
	--ajr-blue: #2e6fc5;
	--ajr-ink: #444852;      /* headings */
	--ajr-text: #5b5f69;     /* body copy */
	--ajr-muted: #8a8f9c;
	--ajr-tint: #f4f5fa;
	--ajr-line: #e3e7f0;
	--ajr-radius: 10px;
	--ajr-radius-lg: 14px;
	--ajr-container: 1140px; /* matches Elementor's default boxed width */
	--ajr-sidebar: 280px;
	--ajr-sticky-top: 110px; /* clear the sticky header */

	/* Reuse the site's Elementor global fonts; DM Sans as fallback */
	--ajr-font: var(--e-global-typography-text-font-family, "DM Sans"), system-ui, sans-serif;
	--ajr-font-heading: var(--e-global-typography-primary-font-family, "DM Sans"), system-ui, sans-serif;

	font-family: var(--ajr-font);
	color: var(--ajr-text);
}

body .ajr-post :is(h1, h2, h3, h4, h5, h6) {
	font-family: var(--ajr-font-heading);
	letter-spacing: normal;
	text-transform: none;
}

.ajr-post .ajr-post__inner {
	box-sizing: border-box;
	max-width: calc(var(--ajr-container) + 40px);
	margin-inline: auto;
	padding: 64px 20px 96px;
}

/* ---------- Header ---------- */

.ajr-post .ajr-post__title {
	margin: 0 0 12px;
	font-size: clamp(1.875rem, 1.35rem + 1.8vw, 2.5rem);
	font-weight: 600;
	line-height: 1.2;
	color: var(--ajr-navy);
}

.ajr-post .ajr-post__lead p {
	margin: 0;
	font-size: 1rem;
	line-height: 1.6;
	color: var(--ajr-text);
}

.ajr-post .ajr-share {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-top: 22px;
}

.ajr-post .ajr-share__label {
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--ajr-ink);
}

.ajr-post .ajr-share__list {
	display: flex;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ajr-post .ajr-share a {
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	border: 1px solid #b9bdc7;
	border-radius: 4px;
	color: #5d6270;
	transition: color 0.15s, border-color 0.15s;
}

.ajr-post .ajr-share a:hover {
	color: var(--ajr-navy);
	border-color: var(--ajr-navy);
}

.ajr-post .ajr-share svg {
	width: 14px;
	height: 14px;
}

.ajr-post .ajr-post__hero {
	margin: 28px 0 0;
}

.ajr-post .ajr-post__hero img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1114 / 510;
	object-fit: cover;
	border-radius: var(--ajr-radius-lg);
}

/* ---------- Two-column layout ---------- */

.ajr-post .ajr-post__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) var(--ajr-sidebar);
	column-gap: 48px;
	align-items: start;
	margin-top: 28px;
}

/* ---------- Article body (also styles imported/classic HTML) ---------- */

.ajr-post .ajr-post__content {
	font-size: 1rem;
	line-height: 1.65;
	color: var(--ajr-text);
}

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

.ajr-post .ajr-post__content p {
	margin: 0 0 1em;
}

.ajr-post .ajr-post__content p:empty {
	display: none;
}

.ajr-post .ajr-post__content h2 {
	margin: 2em 0 0.6em;
	font-size: clamp(1.5rem, 1.25rem + 0.8vw, 1.75rem);
	font-weight: 500;
	line-height: 1.25;
	color: var(--ajr-ink);
}

.ajr-post .ajr-post__content h3 {
	margin: 1.75em 0 0.5em;
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1.35;
	color: var(--ajr-ink);
}

.ajr-post .ajr-post__content a {
	color: var(--ajr-blue);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.ajr-post .ajr-post__content :is(ul, ol) {
	margin: 0 0 1em;
	padding-left: 1.25em;
}

.ajr-post .ajr-post__content li + li {
	margin-top: 0.35em;
}

.ajr-post .ajr-post__content img {
	max-width: 100%;
	height: auto;
	border-radius: var(--ajr-radius);
}

.ajr-post .ajr-post__content :is(figure, .wp-block-image),
.ajr-post .ajr-post__content p:has(> img:only-child) {
	margin: 2.5em 0 1.25em;
}

.ajr-post .ajr-post__content figure img {
	display: block;
	width: 100%;
}

.ajr-post .ajr-post__content figcaption {
	margin-top: 0.5em;
	font-size: 0.875rem;
	color: var(--ajr-muted);
}

.ajr-post .ajr-post__content iframe {
	max-width: 100%;
}

/* "Key advice" callout — any blockquote / quote block */
.ajr-post .ajr-post__content blockquote {
	margin: 0 0 2em;
	padding: 14px 20px;
	background: var(--ajr-tint);
	border: 0;
	border-left: 3px solid var(--ajr-navy);
	font-size: 1rem;
	font-style: italic;
	line-height: 1.6;
	color: var(--ajr-ink);
}

.ajr-post .ajr-post__content blockquote p:last-child {
	margin-bottom: 0;
}

.ajr-post .ajr-post__content blockquote strong {
	font-weight: 700;
}

/* ---------- Feature cards [ajr_features] ---------- */

.ajr-post .ajr-features {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	margin: 1.75em 0 2em;
}

.ajr-post .ajr-feature {
	display: grid;
	grid-template-columns: 28px minmax(0, 1fr);
	column-gap: 16px;
	align-items: start;
	padding: 20px;
	background: var(--ajr-tint);
	border: 1px solid var(--ajr-line);
	border-radius: var(--ajr-radius);
}

.ajr-post .ajr-feature__icon {
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	border-radius: 6px;
	background: var(--ajr-blue);
	color: #fff;
}

.ajr-post .ajr-feature__icon svg {
	width: 15px;
	height: 15px;
}

.ajr-post .ajr-feature .ajr-feature__title {
	margin: 3px 0 0.6em;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.4;
	color: var(--ajr-ink);
}

.ajr-post .ajr-feature .ajr-feature__body p {
	margin: 0;
}

/* ---------- Tags ---------- */

.ajr-post .ajr-post__tags {
	margin-top: 2.5em;
	padding-top: 1.25em;
	border-top: 1px solid var(--ajr-line);
	font-size: 0.875rem;
}

.ajr-post .ajr-post__tags a {
	color: var(--ajr-blue);
}

/* ---------- Sidebar ---------- */

.ajr-post .ajr-post__sidebar {
	position: sticky;
	top: var(--ajr-sticky-top);
	display: grid;
	gap: 20px;
}

.ajr-post .ajr-cta {
	padding: 22px 20px;
	background: var(--ajr-navy);
	border-radius: var(--ajr-radius);
}

.ajr-post .ajr-cta__eyebrow {
	margin: 0 0 8px;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #f07a3a;
}

.ajr-post .ajr-cta .ajr-cta__title {
	margin: 0 0 10px;
	font-size: 1.0625rem;
	font-weight: 600;
	line-height: 1.35;
	color: #fff;
}

.ajr-post .ajr-cta__text {
	margin: 0 0 18px;
	font-size: 0.8125rem;
	line-height: 1.65;
	color: #c9cfe3;
}

.ajr-post .ajr-cta__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 11px 16px;
	border-radius: 6px;
	background: var(--ajr-orange);
	font-size: 0.875rem;
	font-weight: 600;
	color: #fff;
	text-decoration: none;
	transition: background-color 0.15s;
}

.ajr-post .ajr-cta__btn:hover {
	background: var(--ajr-orange-dark);
	color: #fff;
}

.ajr-post .ajr-cta__btn svg {
	width: 14px;
	height: 14px;
}

.ajr-post .ajr-guides {
	padding: 18px 12px 12px;
	background: #fff;
	border: 1px solid var(--ajr-line);
	border-radius: var(--ajr-radius);
}

.ajr-post .ajr-guides .ajr-guides__heading {
	margin: 0 8px 8px;
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ajr-muted);
}

.ajr-post .ajr-guides__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ajr-post .ajr-guides a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 9px 8px;
	border-radius: 6px;
	font-size: 0.875rem;
	line-height: 1.4;
	color: #2b2f3a;
	text-decoration: none;
}

.ajr-post .ajr-guides a:hover {
	background: var(--ajr-tint);
	color: var(--ajr-navy);
}

.ajr-post .ajr-guides a svg {
	flex: none;
	width: 13px;
	height: 13px;
	color: var(--ajr-blue);
}

/* ---------- Focus & motion ---------- */

.ajr-post a:focus-visible {
	outline: 2px solid var(--ajr-blue);
	outline-offset: 2px;
}

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

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
	.ajr-post .ajr-post__layout {
		grid-template-columns: minmax(0, 1fr);
		row-gap: 48px;
	}

	.ajr-post .ajr-post__sidebar {
		position: static;
		grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
		align-items: start;
	}
}

@media (max-width: 640px) {
	.ajr-post .ajr-post__inner {
		padding: 40px 16px 64px;
	}

	.ajr-post .ajr-post__hero img {
		aspect-ratio: 4 / 3;
		border-radius: var(--ajr-radius);
	}

	.ajr-post .ajr-features {
		grid-template-columns: minmax(0, 1fr);
	}
}
