/* Info Grove single post: hero, three-column layout (contents | article | call to action), article typography,
   the "short answer" callout, inline CTA, author box and related posts. Below 1100px the contents list becomes
   a collapsed <details> above the article and the CTA card moves below it. Colour-only hovers. */

/* Elementor-built posts bring the Elementor kit's body font; the theme's own parts keep the theme font. */
:is(.ig-post-hero, .ig-toc, .ig-rail, .ig-author, .ig-related) {
	font-family: var(--wp--preset--font-family--open-sans);
}

/* ===== Hero ===== */
.ig-post-hero {
	padding: 40px 0 0;
	background: var(--wp--preset--color--white);
}
.ig-crumbs {
	font-size: 13px;
	color: var(--wp--preset--color--muted);
}
.ig-crumbs a {
	color: var(--wp--preset--color--blue);
	font-weight: 600;
	text-decoration: none;
}
.ig-crumbs a:hover { color: var(--wp--preset--color--navy); }
.ig-post-hero__title {
	margin: 18px 0 0;
	font-size: clamp(30px, 5vw, 46px);
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -0.03em;
}
.ig-post-hero__dek {
	margin: 16px 0 0;
	font-size: 18px;
	font-weight: 300;
	line-height: 1.6;
	color: var(--wp--custom--color--text-soft);
}
.ig-byline {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 24px;
	font-size: 13.5px;
	line-height: 1.5;
	color: var(--wp--preset--color--muted);
}
.ig-byline b { color: var(--wp--preset--color--navy); }
.ig-avatar {
	flex: none;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--wp--preset--color--blue);
	color: var(--wp--preset--color--white);
	font-weight: 700;
}
.ig-avatar--lg { width: 56px; height: 56px; font-size: 18px; }
/* Featured images are 900 x 600: a 3:2 box the width of the column. contain, not cover: a 3:2 image fills it exactly
   and any other shape (28 older posts) shows whole on white, never cropped. */
/* The featured image fills the column at its own proportions, never letterboxed, so the rounded corners are always
   on the picture itself; a small image is scaled up to fit, a little soft. Square and portrait images (narrower than
   3:2, ig_post_cover_is_boxed() in inc/media.php) sit whole and uncropped in a grey 3:2 box instead. 2026-11-12,
   Curtis: a 1200x621 image in the old white 3:2 box showed square corners inside white bars; squares look best boxed. */
.ig-post-cover {
	margin: 36px 0 0;
	overflow: hidden;
	border-radius: 20px;
}
.ig-post-cover__img {
	display: block;
	width: 100%;
	height: auto;
}
.ig-post-cover--boxed {
	aspect-ratio: 3 / 2;
	max-height: 480px; /* at 3:2 the full-width box was ~790px tall; past 720px wide it gets wider than 3:2 instead */
	width: 100%;
	background: var(--wp--preset--color--grey);
}
.ig-post-cover--boxed .ig-post-cover__img {
	height: 100%;
	object-fit: contain;
}
/* No cover: the layout starts a little lower under the hero. */
.ig-post-hero .ig-byline:last-child { padding-bottom: 32px; }

/* ===== Layout ===== */
.ig-post__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 32px;
	padding-top: 32px;
}
@media (min-width: 1100px) {
	/* The rail gets a fixed 240px column: as the leftover 1fr it was only ~150px wide at every screen size, which
	   squeezed its card and wrapped the Request a Quote button onto two lines. */
	.ig-post__layout {
		grid-template-columns: 200px minmax(0, 1fr) 240px;
		gap: 40px;
		padding-top: 56px;
	}
	.ig-post__layout--no-toc { grid-template-columns: minmax(0, 720px) 1fr; }
}

/* ===== Contents + share ===== */
.ig-toc {
	font-size: 13.5px;
	align-self: start;
}
@media (min-width: 1100px) {
	.ig-toc { position: sticky; top: 88px; }
}
.ig-toc__details {
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 8px;
	background: var(--wp--preset--color--white);
}
.ig-toc__title {
	box-sizing: border-box;
	min-height: 44px; /* tap target */
	padding: 14px 16px;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
	cursor: pointer;
}
.ig-toc__list {
	margin: 0;
	padding: 0 16px 12px;
	list-style: none;
}
.ig-toc__list a {
	display: block;
	padding: 7px 0 7px 14px;
	border-left: 2px solid var(--wp--preset--color--border);
	color: var(--wp--custom--color--text-soft);
	line-height: 1.4;
	text-decoration: none;
}
.ig-toc__list a:hover { color: var(--wp--preset--color--blue); }
.ig-toc__list a.is-current {
	border-left-color: var(--wp--preset--color--blue);
	color: var(--wp--preset--color--blue);
	font-weight: 700;
}
@media (min-width: 1100px) {
	/* The list is always open and the heading is just a label. */
	.ig-toc__details { border: 0; border-radius: 0; background: none; }
	.ig-toc__title { min-height: 0; padding: 0 0 12px; cursor: default; pointer-events: none; }
	/* Shows the list before post.js opens the <details> (browsers with ::details-content), so the column doesn't shift. */
	.ig-toc__details::details-content { content-visibility: visible; }
	.ig-toc__list { padding: 0; }
	.ig-toc__title::-webkit-details-marker { display: none; }
	.ig-toc__title { list-style: none; }
}
.ig-share {
	display: flex;
	flex-wrap: wrap; /* a narrow contents column wraps the buttons instead of squeezing them into ovals */
	align-items: center;
	gap: 8px;
	margin-top: 16px;
}
@media (min-width: 1100px) {
	.ig-share { margin-top: 28px; }
	/* The 200px contents column can't hold the label and four buttons in one row: the label goes above them. */
	.ig-toc .ig-share__label { flex-basis: 100%; margin: 0 0 2px; }
}
.ig-share__label {
	margin-right: 4px;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}
.ig-share__btn {
	display: grid;
	flex: none;
	box-sizing: border-box; /* links and the copy button the same 36px circle */
	place-items: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 50%;
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--blue);
	cursor: pointer;
}
.ig-share__done { display: none; }
.ig-share__btn.is-copied .ig-share__icon { display: none; }
.ig-share__btn.is-copied .ig-share__done { display: block; }
.ig-share__btn.is-copied,
.ig-share__btn:hover {
	border-color: var(--wp--preset--color--blue);
	background: var(--wp--preset--color--blue);
	color: var(--wp--preset--color--white);
}

/* Share row under the article when there is no contents column to hold it. */
.ig-post__share .ig-share { margin-top: 40px; }

/* ===== Article typography ===== */
.ig-prose {
	font-size: 17px;
	line-height: 1.75;
	color: var(--wp--custom--color--text-strong);
	overflow-wrap: break-word;
}
.ig-prose > :first-child { margin-top: 0; }
.ig-prose p,
.ig-prose ul,
.ig-prose ol { margin: 0 0 22px; }
.ig-prose ul,
.ig-prose ol { padding-left: 1.4em; }
.ig-prose li { margin-bottom: 6px; }
.ig-prose a { color: var(--wp--preset--color--blue); text-decoration: underline; text-underline-offset: 2px; }
.ig-prose a:hover { color: var(--wp--preset--color--navy); }
.ig-prose :is(h2, h3, h4) { color: var(--wp--preset--color--navy); scroll-margin-top: 88px; }
.ig-prose h2 {
	margin: 44px 0 16px;
	font-size: 28px;
	line-height: 1.25;
	font-weight: 700;
	letter-spacing: -0.015em;
}
.ig-prose h3 { margin: 32px 0 12px; font-size: 21px; line-height: 1.3; }
.ig-prose h4 { margin: 28px 0 10px; font-size: 18px; line-height: 1.3; }
.ig-prose img,
.ig-prose video,
.ig-prose iframe { max-width: 100%; height: auto; }
.ig-prose figure { margin: 28px 0; }
.ig-prose figcaption { margin-top: 8px; font-size: 13.5px; line-height: 1.5; color: var(--wp--preset--color--muted); }
.ig-prose blockquote {
	margin: 32px 0;
	padding: 0 0 0 24px;
	border-left: 4px solid var(--wp--preset--color--red);
	font-size: 21px;
	font-weight: 600;
	line-height: 1.5;
	color: var(--wp--preset--color--navy);
}
.ig-prose blockquote p { margin: 0 0 12px; }
.ig-prose blockquote p:last-child { margin-bottom: 0; }
.ig-prose .wp-block-table { overflow-x: auto; }
.ig-prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.ig-prose :is(th, td) {
	padding: 10px 12px;
	border: 1px solid var(--wp--preset--color--border);
	text-align: left;
	vertical-align: top;
}
.ig-prose th { background: var(--wp--preset--color--grey); font-weight: 700; }
.ig-prose .wp-block-columns { gap: 24px; margin-bottom: 22px; }

/* ===== "The short answer" callout (AnswerBox adds .ig-answer to the legacy yellow group) =====
   Core adds padding/colour rules for .has-background and .has-border-color; reset them here. */
.ig-prose .ig-answer,
.ig-prose .ig-answer.has-background,
.ig-prose .ig-answer.has-border-color {
	margin: 0 0 32px;
	padding: 20px 18px;
	border: 0;
	border-left: 4px solid var(--wp--preset--color--light-blue);
	border-radius: 0 12px 12px 0;
	background: rgba(0, 179, 226, 0.07);
	color: inherit;
}
/* The theme.json palette has a "border" colour, so WordPress prints .has-border-color { color: #e2e8f0 !important }
   (a text-colour utility for that palette entry). The group's own has-border-color class is not meant to do that. */
.ig-prose .ig-answer.has-border-color { color: var(--wp--custom--color--text-strong) !important; }
@media (min-width: 600px) {
	.ig-prose .ig-answer,
	.ig-prose .ig-answer.has-background,
	.ig-prose .ig-answer.has-border-color { padding: 24px 28px; }
}
.ig-prose .ig-answer .ig-eyebrow { color: var(--wp--preset--color--blue); }
.ig-prose .ig-answer :is(h2, h3) {
	margin: 8px 0 10px;
	font-size: 20px;
	line-height: 1.35;
	letter-spacing: 0;
}
.ig-prose .ig-answer p { margin: 0 0 10px; font-size: 16px; line-height: 1.65; }
.ig-prose .ig-answer > :last-child { margin-bottom: 0; }

/* ===== Mid-post call to action (parts/post-cta.php) ===== */
.ig-post-cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 20px;
	margin: 36px 0;
	padding: 28px 30px;
	border-radius: 16px;
	line-height: 1.4;
}
.ig-cta-title { display: block; font-size: 19px; color: var(--wp--preset--color--white); }
.ig-cta-text { display: block; margin-top: 4px; font-size: 14px; color: rgba(255, 255, 255, 0.7); }
.ig-prose .ig-post-cta .ig-btn,
.ig-prose .ig-post-cta .ig-btn:hover { color: var(--wp--preset--color--white); text-decoration: none; }

/* ===== Author box ===== */
.ig-author {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-top: 48px;
	padding: 24px;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 16px;
}
.ig-author__name { display: block; font-size: 16px; }
.ig-author__bio { margin: 6px 0 0; font-size: 14px; line-height: 1.6; color: var(--wp--preset--color--muted); }

/* ===== Call-to-action rail ===== */
.ig-rail { align-self: start; }
@media (min-width: 1100px) {
	.ig-rail { position: sticky; top: 88px; }
}
.ig-rail__card {
	padding: 22px;
	border-radius: 16px;
	background: var(--wp--preset--color--grey);
}
.ig-rail__title { display: block; margin-top: 6px; font-size: 16px; line-height: 1.35; }
.ig-rail__text { margin: 8px 0 14px; font-size: 13px; line-height: 1.5; color: var(--wp--preset--color--muted); }
.ig-rail__btn { width: 100%; }
@media (min-width: 1100px) {
	/* Keeps the card at the width of the mockup's right column rather than stretching with the grid. */
	.ig-rail { max-width: 300px; }
}

/* ===== Related posts ===== */
.ig-related {
	margin-top: 72px;
	padding: 64px 0;
	background: var(--wp--preset--color--grey);
}
.ig-related__title { margin: 10px 0 0; font-size: 30px; font-weight: 700; }
.ig-related__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 28px;
	margin-top: 32px;
}
@media (min-width: 900px) {
	.ig-related__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* The cards themselves are parts/post-card.php, styled in blog.css. */

/* ===== Small screens ===== */
@media (max-width: 599px) {
	.ig-post-cover { border-radius: 12px; margin-top: 24px; }
	.ig-prose { font-size: 16px; }
	.ig-prose h2 { font-size: 24px; margin-top: 36px; }
	.ig-prose blockquote { font-size: 18px; }
	.ig-post-cta { padding: 22px 20px; }
	.ig-author { padding: 20px; }
}

/* ===== Elementor-built posts: their content brings its own styles; just give it the full column. ===== */
.ig-post__body--legacy { min-width: 0; }
