/* TGS post type templates — shared look for Blog and Case Studies */
.tgs-cpt {
	--tgs-green: #00613e;
	--tgs-green-dark: #004a2f;
	--tgs-green-soft: #e8f2ed;
	--tgs-ink: #1e1e1e;
	--tgs-body: #4a5260;
	--tgs-muted: #67768e;
	--tgs-line: #e3e8ee;
	--tgs-bg: #f5f8f6;
	--tgs-radius: 14px;
	--tgs-head: "Satoshi-Bold", "Satoshi", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
	--tgs-text: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Let our sections run full width inside Astra */
.tgs-cpt #content > .ast-container,
.tgs-cpt .site-content > .ast-container {
	max-width: none;
	width: 100%;
	padding: 0;
	margin: 0;
	display: block;
}

.tgs-wrap {
	font-family: var(--tgs-text);
	color: var(--tgs-body);
	font-size: 17px;
	line-height: 1.7;
	width: 100%;
	overflow-x: clip;
}
.tgs-wrap *,
.tgs-wrap *::before,
.tgs-wrap *::after { box-sizing: border-box; }

.tgs-container {
	width: 100%;
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
	padding-left: 24px;
	padding-right: 24px;
}
.tgs-container--narrow { max-width: 820px; }

/* Hero */
.tgs-hero {
	background: var(--tgs-green);
	background-image: radial-gradient(1200px 400px at 85% -10%, rgba(255,255,255,.12), transparent 60%),
		linear-gradient(135deg, #00613e 0%, #004a2f 100%);
	color: #fff;
	padding: 64px 0 72px;
}
.tgs-hero__title {
	font-family: var(--tgs-head);
	color: #fff;
	font-size: clamp(30px, 4.4vw, 50px);
	line-height: 1.12;
	letter-spacing: -0.02em;
	margin: 10px 0 14px;
	font-weight: 700;
}
.tgs-hero__lead {
	color: rgba(255,255,255,.86);
	font-size: 18px;
	max-width: 640px;
	margin: 0;
}
.tgs-crumbs {
	font-size: 14px;
	color: rgba(255,255,255,.7);
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}
.tgs-crumbs a { color: rgba(255,255,255,.9); text-decoration: none; }
.tgs-crumbs a:hover { color: #fff; text-decoration: underline; }
.tgs-meta {
	color: rgba(255,255,255,.8);
	font-size: 15px;
	margin: 0;
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}
.tgs-tags { margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tgs-tag {
	display: inline-block;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .02em;
	padding: 5px 12px;
	border-radius: 999px;
	background: rgba(255,255,255,.14);
	color: #fff !important;
	text-decoration: none;
}
.tgs-tag:hover { background: rgba(255,255,255,.24); }

/* Featured image pulls up into the hero */
.tgs-feature {
	margin-top: -40px;
	margin-bottom: 0;
	max-width: 1000px;
}
.tgs-feature img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 560px;
	object-fit: cover;
	border-radius: var(--tgs-radius);
	box-shadow: 0 18px 40px -18px rgba(0,0,0,.35);
}

/* Article body */
.tgs-prose { padding-top: 48px; padding-bottom: 24px; }
.tgs-prose > * + * { margin-top: 1.1em; }
.tgs-prose p { margin: 0 0 1.1em; }
.tgs-prose h2,
.tgs-prose h3,
.tgs-prose h4 {
	font-family: var(--tgs-head);
	color: var(--tgs-ink);
	letter-spacing: -0.01em;
	line-height: 1.25;
	font-weight: 700;
}
.tgs-prose h2 { font-size: clamp(24px, 2.6vw, 30px); margin: 1.8em 0 .6em; }
.tgs-prose h3 { font-size: 21px; margin: 1.5em 0 .5em; }
.tgs-prose a { color: var(--tgs-green); text-decoration: underline; text-underline-offset: 3px; }
.tgs-prose a:hover { color: var(--tgs-green-dark); }
.tgs-prose ul,
.tgs-prose ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.tgs-prose li { margin: .4em 0; }
.tgs-prose ul li::marker { color: var(--tgs-green); }
.tgs-prose strong { color: var(--tgs-ink); }
.tgs-prose blockquote {
	border-left: 4px solid var(--tgs-green);
	background: var(--tgs-bg);
	padding: 18px 22px;
	margin: 1.6em 0;
	border-radius: 0 10px 10px 0;
	color: var(--tgs-ink);
	font-style: normal;
}
.tgs-prose img { max-width: 100%; height: auto; border-radius: 10px; }
.tgs-prose figure { margin: 1.6em 0; }
.tgs-prose figcaption { font-size: 14px; color: var(--tgs-muted); margin-top: 8px; }
.tgs-prose .wp-block-group.is-style-tgs-callout,
.tgs-prose .tgs-callout {
	background: var(--tgs-green-soft);
	border: 1px solid #cfe3d8;
	border-radius: var(--tgs-radius);
	padding: 22px 24px;
	margin: 1.8em 0;
}
.tgs-prose .tgs-callout > *:last-child { margin-bottom: 0; }

.tgs-back {
	display: inline-block;
	margin: 8px 0 8px;
	color: var(--tgs-green);
	font-weight: 600;
	text-decoration: none;
}
.tgs-back:hover { text-decoration: underline; }

/* Section titles */
.tgs-section-title {
	font-family: var(--tgs-head);
	color: var(--tgs-ink);
	font-size: clamp(24px, 2.6vw, 32px);
	letter-spacing: -0.01em;
	margin: 0 0 24px;
	font-weight: 700;
}
.tgs-related { padding-top: 56px; padding-bottom: 8px; }

/* Filters */
.tgs-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 36px 0 8px;
}
.tgs-chip {
	display: inline-block;
	padding: 8px 16px;
	border: 1px solid var(--tgs-line);
	border-radius: 999px;
	font-size: 14px;
	font-weight: 600;
	color: var(--tgs-ink);
	text-decoration: none;
	background: #fff;
	transition: border-color .15s, background-color .15s, color .15s;
}
.tgs-chip:hover { border-color: var(--tgs-green); color: var(--tgs-green); }
.tgs-chip.is-active { background: var(--tgs-green); border-color: var(--tgs-green); color: #fff; }

/* Card grid */
.tgs-archive .tgs-grid { margin-top: 40px; }
.tgs-archive .tgs-filters + .tgs-grid { margin-top: 24px; }
.tgs-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 28px;
}
.tgs-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--tgs-line);
	border-radius: var(--tgs-radius);
	overflow: hidden;
	transition: transform .2s ease, box-shadow .2s ease;
}
.tgs-card:hover { transform: translateY(-3px); box-shadow: 0 16px 34px -20px rgba(0,0,0,.35); }
.tgs-card__media { display: block; aspect-ratio: 16 / 10; background: var(--tgs-green-soft); overflow: hidden; }
.tgs-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.tgs-card:hover .tgs-card__media img { transform: scale(1.04); }
.tgs-card__placeholder {
	display: flex; align-items: center; justify-content: center;
	height: 100%; font-family: var(--tgs-head); font-size: 34px; color: var(--tgs-green); opacity: .5;
}
.tgs-card__body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.tgs-card__meta {
	font-size: 13px; color: var(--tgs-muted); margin: 0 0 8px;
	display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
}
.tgs-card__cat {
	color: var(--tgs-green); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: 12px;
}
.tgs-card__title {
	font-family: var(--tgs-head);
	font-size: 20px; line-height: 1.3; margin: 0 0 10px; font-weight: 700;
}
.tgs-card__title a { color: var(--tgs-ink); text-decoration: none; }
.tgs-card__title a:hover { color: var(--tgs-green); }
.tgs-card__excerpt { font-size: 15px; line-height: 1.6; margin: 0 0 16px; color: var(--tgs-body); }
.tgs-card__link {
	margin-top: auto; font-weight: 700; font-size: 15px; color: var(--tgs-green); text-decoration: none;
}
.tgs-card__link:hover { text-decoration: underline; }

.tgs-empty { padding: 48px 0; font-size: 18px; }

/* Pagination */
.tgs-pagination { margin: 40px 0 0; }
.tgs-pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.tgs-pagination .page-numbers {
	display: inline-block; padding: 8px 14px; border: 1px solid var(--tgs-line); border-radius: 8px;
	color: var(--tgs-ink); text-decoration: none; font-weight: 600;
}
.tgs-pagination .page-numbers.current { background: var(--tgs-green); border-color: var(--tgs-green); color: #fff; }

/* Buttons */
.tgs-btn {
	display: inline-flex; align-items: center; justify-content: center;
	padding: 14px 24px; border-radius: 8px; font-weight: 700; font-size: 16px;
	text-decoration: none !important; border: 2px solid transparent; transition: background-color .15s, color .15s, border-color .15s;
	white-space: nowrap;
}
.tgs-btn--light { background: #fff; color: var(--tgs-green) !important; }
.tgs-btn--light:hover { background: var(--tgs-green-soft); }
.tgs-btn--outline { border-color: rgba(255,255,255,.7); color: #fff !important; }
.tgs-btn--outline:hover { background: #fff; color: var(--tgs-green) !important; }
.tgs-btn--solid { background: var(--tgs-green); color: #fff !important; }
.tgs-btn--solid:hover { background: var(--tgs-green-dark); }

/* CTA band */
.tgs-cta { padding: 64px 24px 80px; }
.tgs-cta__inner {
	max-width: 1152px; margin: 0 auto;
	background: linear-gradient(135deg, #00613e 0%, #004a2f 100%);
	border-radius: 20px; padding: 40px 44px; color: #fff;
	display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
}
.tgs-cta__eyebrow { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.75); }
.tgs-cta__title { font-family: var(--tgs-head); color: #fff; font-size: clamp(24px, 2.8vw, 32px); margin: 0 0 6px; line-height: 1.2; font-weight: 700; }
.tgs-cta__text { margin: 0; color: rgba(255,255,255,.86); max-width: 560px; }
.tgs-cta__actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Responsive */
@media (max-width: 1024px) {
	.tgs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
	.tgs-wrap { font-size: 16px; }
	.tgs-container { padding-left: 16px; padding-right: 16px; }
	.tgs-hero { padding: 44px 0 56px; }
	.tgs-feature { margin-top: -28px; }
	.tgs-grid { grid-template-columns: 1fr; gap: 20px; }
	.tgs-prose { padding-top: 32px; }
	.tgs-cta { padding: 48px 16px 56px; }
	.tgs-cta__inner { padding: 28px 22px; }
	.tgs-cta__actions, .tgs-cta__actions .tgs-btn { width: 100%; }
}
