/*
 * TR Immigration - resource cards
 *
 * Two entry points side by side on the home page. The bulletin card is navy so
 * it reads as the tool, the glossary card is paper so it reads as reference.
 * Every value is an Elementor kit token.
 */

.tr-rc {
	font-family: var(--font-body);
}

.tr-rc-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--sp-6);
}

/* Three entry points sit in one row on a wide screen. */
.tr-rc-grid--3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--sp-5);
}

/* Four entry points, same treatment, one narrower step before it drops to two. */
.tr-rc-grid--4 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--sp-5);
}

/* Five entry points — same rhythm, cards just get a little narrower. */
.tr-rc-grid--5 {
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: var(--sp-4);
}

@media (max-width: 1180px) {
	.tr-rc-grid--3,
	.tr-rc-grid--4,
	.tr-rc-grid--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.tr-rc-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: var(--sp-4);
	padding: var(--sp-7) var(--sp-7) var(--sp-6);
	background: var(--white);
	border: var(--hair) solid var(--rule);
	border-block-start: var(--edge) solid var(--gold);
	border-radius: var(--r-1);
	transition: border-color 0.2s ease, transform 0.2s ease;
}

/*
 * Tinted variant. Sits between the navy card and the paper card so three
 * entry points in a row do not read as one flat block. Ground only: the
 * hairline border, accent top edge and button are unchanged.
 */
.tr-rc-card--tint {
	background: var(--paper-dim);
}

.tr-rc-card--dark {
	background: var(--navy-900);
	background-image: linear-gradient(155deg, var(--navy-700) 0%, var(--navy-900) 62%);
	border-color: transparent;
	border-block-start-color: var(--white);
}

/* Four resource cards, four distinct backgrounds. These pair with
 * .tr-rc-card--dark for the white-on-color text treatment and only
 * override the background-image, so declaration order matters: they
 * must come after .tr-rc-card--dark in the sheet. */
.tr-rc-card--slate {
	background: #1C2C3C;
	background-image: linear-gradient(155deg, #2E4457 0%, #1C2C3C 62%);
}

.tr-rc-card--navy {
	background: #0B2E5C;
	background-image: linear-gradient(155deg, #1E61AF 0%, #0B2E5C 62%);
}

.tr-rc-card--green {
	background: #050F01;
	background-image: linear-gradient(155deg, #123005 0%, #050F01 62%);
}

.tr-rc-card--gold {
	background: #412402;
	background-image: linear-gradient(155deg, #854F0B 0%, #412402 62%);
}

.tr-rc-kicker {
	margin: 0;
	font-size: var(--fs-tag);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.13em;
	line-height: var(--lh-fine);
	color: var(--gold-deep);
}

.tr-rc-card--dark .tr-rc-kicker { color: var(--white); }

.tr-rc-title {
	margin: 0;
	font-family: var(--font-head);
	font-size: var(--fs-h3);
	font-weight: 700;
	line-height: var(--lh-head);
	letter-spacing: -0.012em;
	color: var(--navy-900);
	text-transform: none;
	max-width: 20ch;
}

.tr-rc-card--dark .tr-rc-title { color: var(--paper); }

.tr-rc-title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.18s ease;
}

/* Whole card clickable, one link in the accessibility tree. */
.tr-rc-title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.tr-rc-body {
	margin: 0;
	font-size: var(--fs-note);
	line-height: var(--lh-body);
	color: var(--ink-soft);
}

.tr-rc-card--dark .tr-rc-body { color: var(--on-navy); }

.tr-rc-meta {
	margin: 0;
	font-size: var(--fs-tag);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--ink-soft);
}

.tr-rc-card--dark .tr-rc-meta { color: var(--on-navy-faint); }

/*
 * The cue is the call to action. It reads as a filled button so the entry
 * point is unmistakable, sits at the foot of the card whatever the copy
 * length, and uses the same shape and type scale as every other button on
 * the site.
 */
.tr-rc-cue {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--sp-2);
	align-self: flex-start;
	margin-block-start: auto;
	padding: var(--sp-3) var(--sp-5);
	min-height: 44px;
	font-family: var(--font-body);
	font-size: var(--fs-base);
	font-weight: 600;
	text-transform: none;
	letter-spacing: 0.01em;
	line-height: 1.2;
	color: var(--white);
	background: var(--gold);
	border: var(--hair) solid var(--gold);
	border-radius: 999px;
	transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

/* On the navy card the button flips to paper so it stays the brightest thing. */
.tr-rc-card--dark .tr-rc-cue {
	color: var(--navy-900);
	background: var(--white);
	border-color: var(--white);
}

.tr-rc-arrow {
	width: 17px;
	height: 17px;
	transition: transform 0.24s ease;
}

/* ---- Hover and focus ------------------------------------------------- */

.tr-rc-card:hover,
.tr-rc-card:focus-within {
	border-color: var(--gold);
	transform: translateY(-2px);
}

.tr-rc-card:hover .tr-rc-arrow,
.tr-rc-card:focus-within .tr-rc-arrow {
	transform: translateX(5px);
}

.tr-rc-card:hover .tr-rc-cue,
.tr-rc-card:focus-within .tr-rc-cue {
	background: var(--gold-deep);
	border-color: var(--gold-deep);
}

.tr-rc-card--dark:hover .tr-rc-cue,
.tr-rc-card--dark:focus-within .tr-rc-cue {
	color: var(--white);
	background: var(--gold);
	border-color: var(--gold);
}

.tr-rc-card:focus-within {
	outline: 2px solid var(--gold-deep);
	outline-offset: 5px;
}

.tr-rc-title a:focus-visible { outline: none; }

@media (prefers-reduced-motion: reduce) {
	.tr-rc-card,
	.tr-rc-arrow,
	.tr-rc-cue,
	.tr-rc-title a { transition: none; }
	.tr-rc-card:hover,
	.tr-rc-card:focus-within { transform: none; }
}

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

@media (max-width: 1180px) {
	.tr-rc-title { font-size: var(--fs-h4); max-width: none; }
	.tr-rc-card { padding: var(--sp-6); }
}

@media (max-width: 820px) {
	.tr-rc-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--sp-5);
	}

	/* Tighter card on a phone. */
	.tr-rc-card {
		padding: var(--sp-5);
		gap: var(--sp-3);
	}
}

/* ---- Home page Visa Library panel ------------------------------------
 *
 * This one runs the full width of the wrap, so it is composed as a split
 * rather than a card: copy on the left at a readable measure, a contents
 * list with live counts on the right behind a hairline. Below 820px the two
 * halves stack and the hairline becomes a horizontal rule.
 */

.tr-home-library {
	margin-block-start: var(--sp-6);
}

.tr-hl-card {
	display: grid;
	grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
	gap: var(--sp-7);
	align-items: start;
	padding: var(--sp-7);
	background: var(--navy-900);
	background-image: linear-gradient(155deg, var(--navy-700) 0%, var(--navy-900) 62%);
	border: var(--hair) solid transparent;
	border-block-start: var(--edge) solid var(--white);
	border-radius: var(--r-1);
}

.tr-hl-main {
	display: flex;
	flex-direction: column;
	gap: var(--sp-4);
}

.tr-home-library .tr-rc-kicker {
	color: var(--white);
}

.tr-hl-title {
	margin: 0;
	font-family: var(--font-head);
	font-size: var(--fs-h3);
	font-weight: 700;
	line-height: var(--lh-head);
	letter-spacing: -0.012em;
	text-transform: none;
	color: var(--paper);
	max-width: 24ch;
}

.tr-hl-title a {
	color: inherit;
	text-decoration: none;
}

.tr-hl-body {
	margin: 0;
	max-width: 58ch;
	font-size: var(--fs-note);
	line-height: var(--lh-body);
	color: var(--on-navy);
}

.tr-hl-cue {
	text-decoration: none;
	color: var(--navy-900);
	background: var(--white);
	border-color: var(--white);
	margin-block-start: var(--sp-2);
}

.tr-hl-cue:hover,
.tr-hl-cue:focus-visible {
	color: var(--white);
	background: var(--gold);
	border-color: var(--gold);
}

.tr-hl-cue:hover .tr-rc-arrow,
.tr-hl-cue:focus-visible .tr-rc-arrow {
	transform: translateX(5px);
}

/* ---- Contents list --------------------------------------------------- */

.tr-hl-panel {
	padding-inline-start: var(--sp-7);
	border-inline-start: var(--hair) solid var(--on-navy-faint);
}

.tr-hl-panel-head {
	margin: 0 0 var(--sp-4);
	font-size: var(--fs-tag);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	line-height: var(--lh-fine);
	color: var(--on-navy-faint);
}

.tr-hl-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.tr-hl-row + .tr-hl-row {
	border-block-start: var(--hair) solid var(--on-navy-faint);
}

.tr-hl-row-link {
	display: flex;
	align-items: baseline;
	gap: var(--sp-4);
	padding-block: var(--sp-3);
	text-decoration: none;
	color: inherit;
	transition: color 0.18s ease;
}

.tr-hl-n {
	flex: none;
	min-width: 2.2ch;
	font-family: var(--font-head);
	font-size: var(--fs-h4);
	font-weight: 700;
	line-height: var(--lh-head);
	font-variant-numeric: tabular-nums;
	color: var(--paper);
}

.tr-hl-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.tr-hl-label {
	font-size: var(--fs-base);
	font-weight: 600;
	line-height: var(--lh-fine);
	color: var(--paper);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-color: var(--on-navy-faint);
}

.tr-hl-note {
	font-size: var(--fs-tag);
	line-height: var(--lh-fine);
	color: var(--on-navy-faint);
}

.tr-hl-row-link:hover .tr-hl-label,
.tr-hl-row-link:focus-visible .tr-hl-label {
	text-decoration-color: var(--paper);
}

.tr-hl-row-link:focus-visible,
.tr-hl-title a:focus-visible {
	outline: 2px solid var(--white);
	outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
	.tr-hl-cue,
	.tr-hl-row-link { transition: none; }
	.tr-hl-cue:hover .tr-rc-arrow { transform: none; }
}

@media (max-width: 1180px) {
	.tr-hl-card {
		gap: var(--sp-6);
		padding: var(--sp-6);
	}

	.tr-hl-title { font-size: var(--fs-h4); }
	.tr-hl-panel { padding-inline-start: var(--sp-6); }
}

@media (max-width: 820px) {
	.tr-hl-card {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--sp-5);
	}

	.tr-hl-title,
	.tr-hl-body { max-width: none; }

	.tr-hl-card {
		padding: var(--sp-5);
	}

	.tr-hl-panel {
		padding-inline-start: 0;
		padding-block-start: var(--sp-5);
		border-inline-start: 0;
		border-block-start: var(--hair) solid var(--on-navy-faint);
	}
}

/* ---- Home page resource cards: Visa Bulletin card style ----------------
 *
 * Same build as the Visa Bulletin card on the Resources page: colored band
 * with badge and illustration, then label, serif title, copy and a
 * full-width button. Each of the four cards gets its own theme. --c1 and
 * --c2 are the band gradient, --cd is the dark accent used for the label,
 * the button and the illustration details.
 */

.tr-rcf {
	--c1: #1E61AF;
	--c2: #1E6BD6;
	--cd: #1E61AF;
	position: relative;
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 24px;
	box-shadow: 0 1px 0 rgba(28, 44, 60, .05), 0 14px 34px rgba(11, 46, 92, .12);
	overflow: hidden;
	color: #1C2C3C;
	transition: transform .2s ease, box-shadow .2s ease;
}

.tr-rcf--blue  { --c1: #1E61AF; --c2: #1E6BD6; --cd: #1E61AF; }
.tr-rcf--teal  { --c1: #0A6B62; --c2: #14A192; --cd: #0E7A70; }
.tr-rcf--plum  { --c1: #4E2378; --c2: #8347B8; --cd: #5B2A86; }
.tr-rcf--slate { --c1: #1C2C3C; --c2: #3D5872; --cd: #1C2C3C; }

.tr-rcf-art {
	position: relative;
	height: 132px;
	background: linear-gradient(135deg, var(--c1), var(--c2));
	overflow: hidden;
}

.tr-rcf-art svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.tr-rc .tr-rcf-badge {
	position: absolute;
	left: 18px;
	top: 16px;
	padding: 5px 10px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .18);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 1.2px;
	line-height: 1.4;
	text-transform: uppercase;
	color: #fff;
}

.tr-rcf-tx {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 18px 20px 20px;
}

.tr-rc .tr-rcf-kicker {
	margin: 0 0 6px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 1.4px;
	line-height: 1.4;
	text-transform: uppercase;
	color: var(--cd);
}

.tr-rc .tr-rcf-title {
	margin: 0 0 8px;
	font-family: 'PT Serif', Georgia, serif;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
	color: #1C2C3C;
}

.tr-rc .tr-rcf-title a {
	color: inherit;
	text-decoration: none;
}

/* Whole card clickable, one link in the accessibility tree. */
.tr-rc .tr-rcf-title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.tr-rc .tr-rcf-body {
	margin: 0 0 16px;
	font-size: 15px;
	line-height: 1.5;
	color: #4A5868;
}

.tr-rc .tr-rcf-meta {
	margin: -6px 0 16px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--cd);
}

.tr-rc .tr-rcf-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: auto;
	height: 50px;
	padding: 0 14px;
	border-radius: 14px;
	background: var(--cd);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	color: #fff;
	transition: filter .18s ease;
}

.tr-rcf .tr-rc-arrow {
	flex: none;
	width: 16px;
	height: 16px;
	transition: transform .24s ease;
}

.tr-rcf:hover,
.tr-rcf:focus-within {
	transform: translateY(-2px);
	box-shadow: 0 1px 0 rgba(28, 44, 60, .05), 0 18px 40px rgba(11, 46, 92, .18);
}

.tr-rcf:hover .tr-rc-arrow,
.tr-rcf:focus-within .tr-rc-arrow { transform: translateX(5px); }

.tr-rcf:hover .tr-rcf-btn,
.tr-rcf:focus-within .tr-rcf-btn { filter: brightness(.92); }

.tr-rcf:focus-within {
	outline: 2px solid var(--cd);
	outline-offset: 4px;
}

.tr-rc .tr-rcf-title a:focus-visible { outline: none; }

@media (prefers-reduced-motion: reduce) {
	.tr-rcf,
	.tr-rcf .tr-rc-arrow,
	.tr-rc .tr-rcf-btn { transition: none; }
	.tr-rcf:hover,
	.tr-rcf:focus-within { transform: none; }
}

@media (max-width: 1180px) {
	.tr-rc .tr-rcf-title { font-size: 24px; }
}

/* Visa Library page: the 2026 card sits in the Start here grid beside the guide card. */
.tr-vl-leadgrid > .tr-rc { display: flex; }
.tr-vl-leadgrid > .tr-rc > .tr-rcf { flex: 1; }

/* The button is a real link that sits above the title overlay, so a tap on either one opens the card. */
.tr-rc a.tr-rcf-btn,
.tr-rc a.tr-rcf-btn:hover,
.tr-rc a.tr-rcf-btn:focus {
	position: relative;
	z-index: 2;
	color: #fff;
	text-decoration: none;
}
.tr-rc .tr-rcf-title a::after { z-index: 1; }

/* ---- More themes for the Visa Library guide grid ---------------------- */
.tr-rcf--indigo { --c1: #2A2E86; --c2: #5A63D2; --cd: #2F3596; }
.tr-rcf--green  { --c1: #1B6B3A; --c2: #3FA45F; --cd: #1E7A42; }
.tr-rcf--rust   { --c1: #93370F; --c2: #DB6A2C; --cd: #A83E10; }
.tr-rcf--navy   { --c1: #0B2E5C; --c2: #1E61AF; --cd: #0B2E5C; }

/* Overview guides grid on the Visa Library page. */
.tr-vl-grid > .tr-rc { display: flex; }
.tr-vl-grid > .tr-rc > .tr-rcf { flex: 1; }

/* The "Covers" chips stay tappable above the card-wide title link. */
.tr-rc .tr-rcf .tr-vl-covers-label {
	margin: 0 0 6px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 1.2px;
	color: #4A5868;
}
.tr-rc .tr-rcf .tr-vl-covers { position: relative; z-index: 2; gap: 6px; margin-bottom: 16px; }
.tr-rc .tr-rcf .tr-vl-covers-chip {
	z-index: 2;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0;
	color: var(--cd);
	background: rgba(28, 44, 60, .07);
	background: color-mix(in srgb, var(--cd) 10%, #fff);
}
