/**
 * TGS Reports & Insights
 * Styling for the shared report template, the report body and the hub cards.
 * Colours mirror the Elementor global kit so the pages stay on-theme.
 * Ticket: https://thesupportbox.com/issues/25984 (Part 1)
 */

:root {
	--tgs-primary: #1e3a8a;
	--tgs-secondary: #60a5fa;
	--tgs-accent: #d20001;
	--tgs-ink: #021228;
	--tgs-ink-2: rgba(2, 18, 40, 0.82);
	--tgs-ink-3: rgba(2, 18, 40, 0.57);
	--tgs-border: rgba(2, 18, 40, 0.17);
	--tgs-surface: rgba(4, 25, 55, 0.04);
	--tgs-radius: 6px;
}

/* ---------------------------------------------------------------
   Orientation badges (country / report type) — not clickable
   --------------------------------------------------------------- */

.tgs-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.tgs-tag {
	display: inline-block;
	padding: 5px 12px;
	border-radius: 100px;
	border: 1px solid transparent;
	font-size: 0.78rem;
	font-weight: 500;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	line-height: 1.4;
	white-space: nowrap;
}

.tgs-tag--country {
	background: var(--tgs-accent);
	border-color: var(--tgs-accent);
	color: #fff;
}

.tgs-tag--type {
	background: transparent;
	border-color: var(--tgs-border);
	color: var(--tgs-ink-2);
}

/* On the dark report header the outlined badge needs light strokes. */
.tgs-report-hero .tgs-tag--type {
	border-color: rgba(255, 255, 255, 0.38);
	color: rgba(255, 255, 255, 0.92);
}

/* ---------------------------------------------------------------
   Scope / Coverage Year rows
   --------------------------------------------------------------- */

.tgs-report-meta,
ul.tgs-report-meta {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.tgs-report-meta li {
	list-style: none !important;
}

.tgs-report-meta li::marker {
	content: none;
}

.tgs-report-meta li {
	margin: 0 0 4px;
	font-size: 1.02rem;
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.88);
}

.tgs-report-meta li:last-child {
	margin-bottom: 0;
}

.tgs-report-meta__label {
	font-weight: 600;
	color: #fff;
}

/* Same block used outside the dark hero. */
.tgs-report-meta--light li {
	color: var(--tgs-ink-2);
}

.tgs-report-meta--light .tgs-report-meta__label {
	color: var(--tgs-ink);
}

/* ---------------------------------------------------------------
   Disclaimer notice
   --------------------------------------------------------------- */

.tgs-disclaimer {
	background: var(--tgs-surface);
	border-left: 4px solid var(--tgs-accent);
	border-radius: 0 var(--tgs-radius) var(--tgs-radius) 0;
	padding: 16px 20px;
	font-size: 0.97rem;
	font-style: italic;
	line-height: 1.6;
	color: var(--tgs-ink-3);
}

/* ---------------------------------------------------------------
   Report body
   --------------------------------------------------------------- */

.tgs-report-body h2 {
	font-size: 1.43rem;
	font-weight: 500;
	color: var(--tgs-ink);
	border-bottom: 2px solid var(--tgs-accent);
	padding-bottom: 8px;
	margin: 42px 0 18px;
}

.tgs-report-body .elementor-widget-container > h2:first-child {
	margin-top: 0;
}

.tgs-report-body p {
	font-size: 1.07rem;
	line-height: 1.72;
	color: var(--tgs-ink-2);
	margin: 0 0 16px;
}

.tgs-report-body p:last-child {
	margin-bottom: 0;
}

.tgs-report-body .tgs-note {
	font-size: 0.97rem;
	font-style: italic;
	color: var(--tgs-ink-3);
	margin-bottom: 12px;
}

.tgs-report-body .tgs-source {
	font-size: 0.94rem;
	font-style: italic;
	color: var(--tgs-ink-3);
	line-height: 1.65;
}

/* ---------------------------------------------------------------
   Tables (risk matrix / activity tracker / alert states)
   --------------------------------------------------------------- */

.tgs-table-wrap {
	margin: 0 0 24px;
	font-size: 0;
	line-height: 0;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border-radius: var(--tgs-radius);
	border: 1px solid var(--tgs-border);
}

.tgs-table-wrap .tgs-table {
	width: 100%;
	min-width: 560px;
	margin: 0;
	line-height: 1.6;
	border-collapse: collapse;
	font-size: 1rem;
	background: #fff;
}

.tgs-table th {
	background: var(--tgs-primary);
	color: #fff;
	text-align: left;
	font-size: 0.85rem;
	font-weight: 500;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 13px 16px;
}

.tgs-table td {
	padding: 14px 16px;
	vertical-align: top;
	border-bottom: 1px solid var(--tgs-border);
	color: var(--tgs-ink-2);
	line-height: 1.6;
}

.tgs-table tbody tr:last-child td {
	border-bottom: none;
}

.tgs-table tbody tr:nth-child(even) td {
	background: var(--tgs-surface);
}

.tgs-table td.tgs-cell-label {
	font-weight: 500;
	color: var(--tgs-ink);
}

/* ---------------------------------------------------------------
   Severity badges inside tables
   --------------------------------------------------------------- */

.tgs-badge {
	display: inline-block;
	padding: 4px 11px;
	border-radius: 4px;
	font-size: 0.8rem;
	font-weight: 500;
	letter-spacing: 0.03em;
	line-height: 1.45;
	text-transform: uppercase;
}

.tgs-badge--normal {
	background: #eef1f5;
	color: #3a4658;
}

.tgs-badge--moderate,
.tgs-badge--caution {
	background: #fbefd9;
	color: #8a6e00;
}

.tgs-badge--high,
.tgs-badge--alert {
	background: #fce0dd;
	color: #a3130f;
}

.tgs-badge--emergency {
	background: #f7c6bf;
	color: #8a0f0a;
}

.tgs-badge--severe,
.tgs-badge--crisis {
	background: #a6120e;
	color: #fff;
}

/* ---------------------------------------------------------------
   CTA block — request the full report / custom assessment
   --------------------------------------------------------------- */

.tgs-report-cta {
	background: var(--tgs-surface);
	border: 1px solid var(--tgs-border);
	border-top: 3px solid var(--tgs-accent);
	border-radius: var(--tgs-radius);
}

.tgs-report-cta h2,
.tgs-report-cta h3 {
	font-size: 1.43rem;
	font-weight: 500;
	color: var(--tgs-ink);
	margin: 0 0 10px;
}

.tgs-report-cta p {
	font-size: 1.05rem;
	line-height: 1.7;
	color: var(--tgs-ink-2);
	margin: 0;
}

/* ---------------------------------------------------------------
   Hub cards
   --------------------------------------------------------------- */

.tgs-report-card {
	height: 100%;
}

/* Slightly tighter badges on cards so a long report type still fits on one
   row — keeps the titles on a common baseline without padding the row out. */
.tgs-report-card .tgs-tag {
	font-size: 0.72rem;
	padding: 5px 10px;
}

.tgs-report-card__excerpt {
	font-size: 1.02rem;
	line-height: 1.65;
	color: var(--tgs-ink-2);
}

/* ---------------------------------------------------------------
   Mobile — tables collapse into labelled rows
   --------------------------------------------------------------- */

@media (max-width: 767px) {
	.tgs-table-wrap {
		overflow-x: visible;
		border: none;
		border-radius: 0;
	}

	.tgs-table {
		min-width: 0;
		background: transparent;
	}

	.tgs-table thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}

	.tgs-table tbody tr {
		display: block;
		border: 1px solid var(--tgs-border);
		border-radius: var(--tgs-radius);
		background: #fff;
		padding: 6px 14px 10px;
		margin-bottom: 12px;
	}

	.tgs-table tbody tr:nth-child(even) td,
	.tgs-table td {
		display: block;
		background: transparent;
		border-bottom: none;
		padding: 8px 0;
	}

	.tgs-table td + td {
		border-top: 1px solid var(--tgs-border);
	}

	.tgs-table td[data-label]::before {
		content: attr(data-label);
		display: block;
		font-size: 0.72rem;
		font-weight: 500;
		letter-spacing: 0.06em;
		text-transform: uppercase;
		color: var(--tgs-ink-3);
		margin-bottom: 4px;
	}

	.tgs-report-body h2 {
		margin-top: 32px;
	}
}

/* ---------------------------------------------------------------
   CTA text, link-up row and back link
   --------------------------------------------------------------- */

.tgs-report-cta__text {
	font-size: 1.05rem;
	line-height: 1.7;
	color: var(--tgs-ink-2);
}

.tgs-linkup {
	border-top: 1px solid var(--tgs-border);
	border-bottom: 1px solid var(--tgs-border);
}

.tgs-linkup__label .elementor-heading-title {
	font-size: 0.78rem;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--tgs-ink-3);
}

.tgs-linkup__link .elementor-heading-title,
.tgs-linkup__link a {
	font-size: 1.13rem;
	font-weight: 500;
	color: var(--tgs-primary);
	text-decoration: none;
	transition: color 0.2s ease;
}

.tgs-linkup__link a::after {
	content: " →";
}

.tgs-linkup__link a:hover {
	color: var(--tgs-accent);
}

.tgs-backlink .elementor-heading-title,
.tgs-backlink a {
	font-size: 0.97rem;
	font-weight: 400;
	color: var(--tgs-ink-3);
	text-decoration: none;
	transition: color 0.2s ease;
}

.tgs-backlink a:hover {
	color: var(--tgs-accent);
}

/* ---------------------------------------------------------------
   Hub
   --------------------------------------------------------------- */

.tgs-hub-intro p {
	margin-bottom: 14px;
}

.tgs-hub-intro p:last-child {
	margin-bottom: 0;
}

.tgs-report-card {
	transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.tgs-report-card:hover {
	border-color: rgba(2, 18, 40, 0.32) !important;
	box-shadow: 0 14px 34px rgba(2, 18, 40, 0.09);
	transform: translateY(-3px);
}

.tgs-report-card .elementor-heading-title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.tgs-report-card:hover .elementor-heading-title a {
	color: var(--tgs-accent);
}

.tgs-card__more {
	margin-top: auto;
}

.tgs-card__more .elementor-heading-title,
.tgs-card__more a {
	font-size: 0.95rem;
	font-weight: 500;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--tgs-primary);
	text-decoration: none;
	transition: color 0.2s ease;
}

.tgs-card__more a::after {
	content: " →";
}

.tgs-report-card:hover .tgs-card__more a {
	color: var(--tgs-accent);
}

/* ---------------------------------------------------------------
   Document sheet — the report sits on the site's dark page as a
   white document, mirroring the layout of Jay's sample.
   --------------------------------------------------------------- */

.tgs-report-sheet {
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.tgs-report-sheet .tgs-report-cta {
	width: 100%;
}

.tgs-report-sheet .tgs-linkup {
	width: 100%;
}
