/* ==========================================================================
   Garage Studio — blog detail template (single-post.php)
   Dark hero · article on the left · sticky sidebar on the right.
   Type and colours follow the site: Outfit, primary #A71919 / hover #F14C4C,
   text #232323, light #F9F5F2, border #E7E7E7, 1290px container, square corners.
   ========================================================================== */

.gsb {
	--gsb-red: #A71919;
	--gsb-red-2: #F14C4C;
	--gsb-text: #232323;
	--gsb-body: #3b3b3b;
	--gsb-head: #222;
	--gsb-muted: #6b6b6b;
	--gsb-border: #E7E7E7;
	--gsb-light: #F9F5F2;
	--gsb-dark: #101010;
	--gsb-hdr: 110px; /* header height; refined by blog-detail.js */
	font-family: 'Outfit', sans-serif;
	color: var(--gsb-text);
}
.gsb *, .gsb *::before, .gsb *::after { box-sizing: border-box; }

/* the theme puts overflow:hidden on <body> (x) and #page, which turns them into scroll containers
   and stops the sticky sidebar from sticking; clip trims overflow the same way without that side effect */
body.gsb-single { overflow-x: clip; }
.gsb-single #page { overflow: clip; }

/* the theme boxes page content (.col-full) and adds 80px above/below it */
.gsb-single #page .site-content { margin: 0; }
.gsb-single #content > .col-full { max-width: none; padding: 0; }

.gsb-wrap { max-width: 1320px; margin: 0 auto; padding: 0 15px; }
.gsb-rel__body { display: block; padding: 13px 15px 15px; } /* padding lives here, not on the clamped title, so no half line shows */
.gsb-rel__title {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.45;
	transition: color .25s;
}
/* ---------- hero ---------- */
.gsb-hero {
	position: relative;
	z-index: 0;
	margin-top: calc(-1 * var(--gsb-hdr)); /* slide under the transparent header, like the site's post heroes */
	padding: calc(var(--gsb-hdr) + 84px) 0 88px;
	background: var(--gsb-dark);
	color: #fff;
	overflow: hidden;
}
.gsb-hero__bg { position: absolute; inset: 0; z-index: -1; }
.gsb-hero__bg img { width: 100%; height: 100%; max-width: none; object-fit: cover; opacity: .5; }
.gsb-hero__bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient( 180deg, rgba(16, 16, 16, .55) 0%, rgba(16, 16, 16, .40) 45%, rgba(16, 16, 16, .65) 100%);
}
.gsb-hero__inner { max-width: 880px; }

.gsb-back {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 2.5px;
	text-transform: uppercase;
	line-height: 1.4;
	color: rgba(255,255,255,.7);
	text-decoration: none;
	transition: color .25s;
}
.gsb-back svg { width: 16px; height: 16px; flex: 0 0 auto; transition: transform .25s; }
.gsb .gsb-back:hover, .gsb .gsb-back:focus-visible { color: #fff; }
.gsb-back:hover svg { transform: translateX(-4px); }

.gsb-cat {
	display: table;
	margin: 28px 0 0;
	padding: 6px 12px;
	background: var(--gsb-red);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 2px;
	text-transform: uppercase;
	line-height: 1.4;
	text-decoration: none;
	transition: background .25s;
}
.gsb .gsb-cat:hover, .gsb .gsb-cat:focus-visible { background: var(--gsb-red-2); color: #fff; }
.gs-table tbody tr:hover {
    background: rgba(167, 25, 25, .05);
}
.gs-table tbody tr {
    transition: background .25s;
}
.gsb .gsb-title {
	margin: 18px 0 22px;
	font-family: inherit;
	font-size: clamp(34px, 4.3vw, 58px);
	font-weight: 500;
	line-height: 1.1;
	letter-spacing: -.02em;
	color: #fff;
}
.gsb-title em { font-style: normal; color: var(--gsb-red-2); }

.gsb-deck { margin: 0 0 28px; max-width: 700px; font-size: 18px; line-height: 1.7; color: rgba(255,255,255,.76); }

.gsb-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	font-size: 14.5px;
	line-height: 1.5;
	color: rgba(255,255,255,.68);
}
.gsb-meta strong { color: #fff; font-weight: 600; }
.gsb-dot { width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,.42); }

/* ---------- body + sidebar ---------- */
.gsb-layout { padding: 80px 0 100px; background: #fff; }
.gsb-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 72px; align-items: start; }
.gsb-main { min-width: 0; }

/* article typography */
.gsb-body { font-size: 18px; line-height: 1.5; color: var(--gsb-body); }
.gsb-body > :first-child { margin-top: 0; }
.gsb-body > :last-child { margin-bottom: 0; }
.gsb-body p { margin: 0 0 1em; }
.gsb-body h2, .gsb-body h3, .gsb-body h4 { font-family: inherit; color: var(--gsb-head); }
.gsb-body h2 { margin: 1.5em 0 .6em; font-size: 40px; font-weight: 500; line-height: 1.25; letter-spacing: -.01em; }
.gsb-body h3 { margin: 1.6em 0 .5em; font-size: clamp(21px, 1.8vw, 24px); font-weight: 500; line-height: 1.3; letter-spacing: 0; }
.gsb-body h4 { margin: 1.5em 0 .5em; font-size: 20px; font-weight: 600; line-height: 1.35; letter-spacing: 0; }
.gsb-body h2 + h3 { margin-top: .4em; }
.gsb-body a { color: var(--gsb-red); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.gsb-body a:hover { color: var(--gsb-red-2); }
.gsb-body strong, .gsb-body b { font-weight: 600; color: var(--gsb-head); }

.gsb-body ul, .gsb-body ol { margin: 0 0 1.5em; padding: 0; list-style: none; }
.gsb-body li { position: relative; margin: 0; padding-left: 28px; }
.gsb-body li:last-child { margin-bottom: 0; }
.gsb-body ul > li::before { content: ""; position: absolute; left: 3px; top: .7em; width: 7px; height: 7px; background: var(--gsb-red); }
.gsb-body ol { counter-reset: gsb-ol; }
.gsb-body ol > li { counter-increment: gsb-ol; padding-left: 40px; }
.gsb-body ol > li::before { content: counter(gsb-ol, decimal) "."; position: absolute; left: 0; top: 0; font-size: .8em; font-weight: 700; letter-spacing: .5px; line-height: 2.25; color: var(--gsb-red); }
.gsb-body li > ul, .gsb-body li > ol { margin: .55em 0 0; }

.gsb-body img { max-width: 100%; height: auto; }
.gsb-body figure { margin: 2.2em 0; }
.gsb-body figure img { width: 100%; }
.gsb-body > p > img:only-child, .gsb-body > img { display: block; width: 100%; margin: 2.2em 0; }
.gsb-body figcaption { margin-top: 10px; font-size: 14px; line-height: 1.5; color: var(--gsb-muted); text-align: left; }

/* block-editor galleries: grid that also overrides core's flex sizing when its CSS is loaded */
.gsb-body .wp-block-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 2.2em 0; }
.gsb-body .wp-block-gallery.columns-1 { grid-template-columns: minmax(0, 1fr); }
.gsb-body .wp-block-gallery.columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gsb-body .wp-block-gallery.columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gsb-body .wp-block-gallery figure.wp-block-image { width: auto !important; margin: 0 !important; flex: none; }
.gsb-body .wp-block-gallery figure.wp-block-image img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gsb-body .wp-block-gallery > figcaption { grid-column: 1 / -1; margin-top: 0; }

.gsb-body blockquote, .gsb-body .wp-block-quote {
	margin: 2.2em 0;
	padding: 4px 0 4px 28px;
	border-left: 3px solid var(--gsb-red);
	font-size: 22px;
	font-weight: 400;
	line-height: 1.6;
	color: var(--gsb-head);
}
.gsb-body blockquote p { margin: 0 0 .5em; }
.gsb-body blockquote p:last-child { margin: 0; }
.gsb-body blockquote cite { display: block; margin-top: 10px; font-size: 14px; font-style: normal; color: var(--gsb-muted); }

.gsb-body .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 14px; margin: 2em 0 0; }
.gsb-body .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	padding: 16px 34px;
	border: 1px solid var(--gsb-red);
	border-radius: 0;
	background: var(--gsb-red);
	color: #fff;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 2px;
	line-height: 1.4;
	text-transform: uppercase;
	text-decoration: none;
	transition: background .25s, border-color .25s, color .25s;
}
.gsb-body .wp-block-button__link:hover { background: var(--gsb-dark); border-color: var(--gsb-dark); color: #fff; }
.gsb-body .is-style-outline .wp-block-button__link { background: transparent; color: var(--gsb-red); }
.gsb-body .is-style-outline .wp-block-button__link:hover { background: var(--gsb-red); border-color: var(--gsb-red); color: #fff; }

.gsb-body table .gsb-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
    line-height: 1.62;
    border: 1px solid #E7E7E7 !important;
    table-layout: auto;
}
.gsb-body th { padding: 12px 16px; border: 1px solid var(--gsb-border); text-align: left; vertical-align: top; word-break: normal; }
.gsb-body td { padding: 12px 16px; border: 1px solid var(--gsb-border); text-align: left; vertical-align: top; word-break: normal; font-size:17px;}
.gsb-body th { background: #1b1b1b;
    color: #fff;
    text-align: left;
    font-weight: 600;
    font-size: 16px;
    padding: 17px 22px;
    border-bottom: 3px solid #A71919 !important;
    white-space: nowrap;
  }
.gs-table tbody tr:nth-child(even) {
    background: #f2f2f2;
}
.gsb-body .wp-block-table { margin: 2em 0; overflow-x: auto; }
.gsb-body .wp-block-table table { margin: 0; }

.gsb-body iframe { max-width: 100%; }
.gsb-body .wp-block-embed.is-type-video .wp-block-embed__wrapper { position: relative; aspect-ratio: 16 / 9; }
.gsb-body .wp-block-embed.is-type-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.gsb-body hr, .gsb-body .wp-block-separator { height: 1px; margin: 2.5em 0; border: 0; background: var(--gsb-border); }

.gsb-pages { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; font-weight: 600; }
.gsb-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--gsb-border); }
.gsb-tags__label { margin-right: 4px; font-size: 12px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--gsb-muted); }
.gsb-tags a { padding: 7px 14px; border: 1px solid var(--gsb-border); font-size: 14px; color: var(--gsb-text); text-decoration: none; transition: border-color .25s, color .25s; }
.gsb .gsb-tags a:hover { border-color: var(--gsb-red); color: var(--gsb-red); }
td.gs-table__key {
	font-weight:600;
}
/* ---------- sidebar ---------- */
.gsb-side { position: sticky; top: 134px; }
/* .gsb-side.is-static { position: static; } */
.gsb-card { margin: 0 0 20px; padding: 26px 24px; background: var(--gsb-light); border: 1px solid var(--gsb-border); }
.gsb-card:last-child { margin-bottom: 0; }
.gsb .gsb-card__h { margin: 0 0 18px; font-size: 12px; font-weight: 600; letter-spacing: 2.5px; line-height: 1.3; text-transform: uppercase; color: var(--gsb-red); }

.gsb-author { display: flex; align-items: center; gap: 14px; }
.gsb-author__avatar {
	flex: 0 0 52px;
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--gsb-red), var(--gsb-red-2));
	color: #fff;
	font-size: 17px;
	font-weight: 600;
	letter-spacing: .5px;
}
.gsb .gsb-author__name { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.3; color: var(--gsb-head); }
.gsb .gsb-author__role { margin: 3px 0 0; font-size: 14px; line-height: 1.45; color: var(--gsb-muted); }

.gsb-share { display: flex; flex-wrap: wrap; gap: 8px; }
.gsb .gsb-share__btn { /* also resets the theme's global button style for the copy button */
	position: relative;
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 1px solid var(--gsb-border);
	border-radius: 0;
	background: #fff;
	color: var(--gsb-text);
	font: inherit;
	line-height: 1;
	letter-spacing: 0;
	text-transform: none;
	text-decoration: none;
	cursor: pointer;
	box-shadow: none;
	transition: background .25s, border-color .25s, color .25s;
}
.gsb-share__btn svg { width: 17px; height: 17px; fill: currentColor; }
.gsb .gsb-share .gsb-share__btn:hover, .gsb .gsb-share .gsb-share__btn:focus-visible { background: var(--gsb-red); border-color: var(--gsb-red); color: #fff; }
.gsb-share__btn.is-copied::after {
	content: "Link copied";
	position: absolute;
	bottom: calc(100% + 8px);
	left: 50%;
	transform: translateX(-50%);
	padding: 5px 9px;
	background: var(--gsb-dark);
	color: #fff;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: .3px;
	white-space: nowrap;
	pointer-events: none;
}

.gsb-related { display: flex; flex-direction: column; gap: 14px; }
.gsb-rel {
	display: block;
	border: 1px solid var(--gsb-border);
	background: #fff;
	color: var(--gsb-head);
	text-decoration: none;
	transition: transform .3s, box-shadow .3s;
}
.gsb .gsb-rel:hover, .gsb .gsb-rel:focus-visible { transform: translateY(-2px); box-shadow: 0 12px 30px -16px rgba(0,0,0,.3); color: var(--gsb-head); }
.gsb-rel__thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--gsb-dark); }
.gsb-rel__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.gsb-rel:hover .gsb-rel__thumb img { transform: scale(1.05); }
.gsb-rel__badge {
	position: absolute;
	top: 10px;
	left: 10px;
	padding: 3px 8px;
	background: var(--gsb-red);
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 1.5px;
	line-height: 1.5;
	text-transform: uppercase;
}
.gsb-rel__title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.45;
	transition: color .25s;
}
.gsb-rel:hover .gsb-rel__title { color: var(--gsb-red); }

/* ---------- responsive ---------- */
@media (max-width: 1200px) {
	.gsb-grid { grid-template-columns: minmax(0, 1fr) 310px; gap: 48px; }
}
@media (max-width: 1024px) {
	.gsb { --gsb-hdr: 107px; }
	.gsb-hero { padding: calc(var(--gsb-hdr) + 64px) 0 72px; }
	.gsb-layout { padding: 64px 0 80px; }
	.gsb-grid { grid-template-columns: minmax(0, 1fr); gap: 56px; }
	.gsb-side { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
	.gsb-card { margin: 0; }
	.gsb-card--related { grid-column: 1 / -1; }
	.gsb-related { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
}
@media (max-width: 767px) {
	.gsb-wrap { padding: 0 20px; }
	.gsb-hero { padding: calc(var(--gsb-hdr) + 44px) 0 56px; }
	.gsb .gsb-title { font-size: 32px; line-height: 1.15; }
	.gsb-cat { margin-top: 22px; }
	.gsb-deck { font-size: 16.5px; }
	.gsb-layout { padding: 48px 0 64px; }
	.gsb-body { font-size: 17px; line-height: 1.75; }
	.gsb-body blockquote, .gsb-body .wp-block-quote { padding-left: 20px; font-size: 19px; }
	.gsb-side { grid-template-columns: minmax(0, 1fr); }
	.gsb-related { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
	.gsb-body .wp-block-gallery.columns-3, .gsb-body .wp-block-gallery.columns-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.gsb-body .wp-block-button__link { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
	.gsb *, .gsb *::before, .gsb *::after { transition: none !important; }
}

/* ---------- tables on phones ---------- */
/* Every article table sits in a wrapper that scrolls sideways if the table is wider than the column
   (added by blog-detail.js). On phones, tables with column headings become stacked cards: one card per
   row, the first cell as the card's dark title bar and every value labelled with its column heading. */
.gsb-body .gsb-table-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 767px) {
	.gsb-body table.gsb-stack,
	.gsb-body table.gsb-stack tbody,
	.gsb-body table.gsb-stack tr,
	.gsb-body table.gsb-stack tbody tr > * { display: block; width: 100%; }
	.gsb-body table.gsb-stack { margin: 1.6em 0; border: 0; background: none; }
	.gsb-body table.gsb-stack colgroup,
	.gsb-body table.gsb-stack thead,
	.gsb-body table.gsb-stack .gsb-table-head { display: none; }
	.gsb-body table.gsb-stack tbody tr { margin: 0 0 14px; border: 1px solid var(--gsb-border); background: #fff; }
	.gsb-body table.gsb-stack tbody tr:last-child { margin-bottom: 0; }
	.gsb-body table.gsb-stack tbody tr > * { padding: 12px 16px; border: 0; border-top: 1px solid var(--gsb-border); font-size: 16px; line-height: 1.55; white-space: normal; text-align: left; }
	.gsb-body table.gsb-stack tbody tr > :first-child { border-top: 0; border-bottom: 3px solid var(--gsb-red); background: #1b1b1b; color: #fff; font-weight: 600; }
	.gsb-body table.gsb-stack tbody tr > :first-child + * { border-top: 0; }
	.gsb-body table.gsb-stack [data-label]::before {
		content: attr(data-label);
		display: block;
		margin: 0 0 4px;
		font-size: 11px;
		font-weight: 600;
		letter-spacing: 1.5px;
		line-height: 1.4;
		text-transform: uppercase;
		color: var(--gsb-red);
	}
	.gsb-body table.gsb-stack tbody tr > :first-child[data-label]::before { color: rgba(255, 255, 255, .6); }
	.gsb-body h2 { font-size: 32px;}
}