/* ==========================================================================
   Travel First Insurance - 2026 design
   Reference artwork: "Travel First Insurance v2.pdf", page 2 (800 x 700pt).
   --pt is one artwork point: the whole design scales from it.
   ========================================================================== */

:root {
	--tfi-navy: #181934;
	--tfi-blue: #31bbef;
	--tfi-pale: #cbeefb;
	--tfi-ink: #000;
	--tfi-sans: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;
	--tfi-gill: 'Gill Sans', 'Gill Sans MT', Calibri, 'Segoe UI', 'Trebuchet MS', 'Montserrat', sans-serif;
	--pt: min(1.8px, 0.125vw);
	--tfi-gutter: calc(36 * var(--pt));
}

/* ---------- shared ---------- */

.tfi-header-inner,
.tfi-footer-inner {
	box-sizing: border-box;
	max-width: 1440px;
	margin: 0 auto;
	padding-left: var(--tfi-gutter);
	padding-right: var(--tfi-gutter);
}

/* ---------- header ---------- */

.tfi-header {
	float: none;
	width: 100%;
	background: #fff;
}

.tfi-header-inner {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: calc(30 * var(--pt));
	min-height: calc(110.4 * var(--pt));
	padding-top: calc(25.5 * var(--pt));
	padding-bottom: calc(23.5 * var(--pt));
}

.tfi-logo,
.tfi-logo:hover,
.tfi-logo:focus {
	display: block;
	text-decoration: none;
	flex: 0 0 auto;
}

.tfi-logo-main,
.tfi-logo-sub {
	display: block;
	font-family: var(--tfi-sans);
	line-height: 1;
	white-space: nowrap;
}

.tfi-logo-main {
	font-size: calc(27.1 * var(--pt));
	font-weight: 700;
	letter-spacing: 0;
	color: var(--tfi-navy);
}

.tfi-logo-main span {
	color: var(--tfi-blue);
}

.tfi-logo-sub {
	margin-top: calc(9 * var(--pt));
	font-size: calc(15.6 * var(--pt));
	font-weight: 600;
	letter-spacing: 0.139em;
	color: var(--tfi-ink);
}

.tfi-header-right {
	flex: 0 0 auto;
	text-align: left;
}

.tfi-strap {
	margin: 0 0 calc(9 * var(--pt));
	font-family: var(--tfi-gill);
	font-size: calc(16.7 * var(--pt));
	font-weight: 400;
	line-height: 1.2;
	color: var(--tfi-navy);
}

.tfi-actions {
	display: flex;
	gap: calc(6.7 * var(--pt));
}

.tfi-btn,
.tfi-btn:hover,
.tfi-btn:focus {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	height: calc(31.2 * var(--pt));
	padding: 0 calc(12 * var(--pt));
	border: calc(1.5 * var(--pt)) solid var(--tfi-blue);
	border-radius: calc(12 * var(--pt)) 0 calc(12 * var(--pt)) 0;
	font-family: var(--tfi-sans);
	font-size: calc(13.6 * var(--pt));
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.01em;
	color: var(--tfi-navy);
	text-decoration: none;
	white-space: nowrap;
	transition: background-color .18s ease, color .18s ease;
}

.tfi-btn--line {
	min-width: calc(129 * var(--pt));
	background: #fff;
}

.tfi-btn--solid {
	min-width: calc(136 * var(--pt));
	background: var(--tfi-blue);
}

.tfi-btn--line:hover,
.tfi-btn--line:focus {
	background: var(--tfi-blue);
}

.tfi-btn--solid:hover,
.tfi-btn--solid:focus {
	background: var(--tfi-navy);
	border-color: var(--tfi-navy);
	color: #fff;
}

.tfi-rule {
	height: calc(5.2 * var(--pt));
	background: var(--tfi-navy);
}

/* ---------- home page shell ---------- */

.tfi-home {
	width: 100%;
	overflow-x: hidden;
}

.tfi-home p,
.tfi-home h1,
.tfi-home h2 {
	max-width: none;
}

/* ---------- hero ---------- */

.tfi-home .tfi-hero.wp-block-cover {
	position: relative;
	display: block;
	box-sizing: border-box;
	width: 100%;
	min-height: 0;
	/* never crop the hero photo vertically on ultrawide screens */
	height: max(calc(262.5 * var(--pt)), 24.37vw);
	margin: 0;
	padding: 0;
	overflow: hidden;
}

.tfi-home .tfi-hero .wp-block-cover__image-background {
	object-fit: cover;
	object-position: 100% 50%;
	margin: 0;
}

.tfi-home .tfi-hero .wp-block-cover__background {
	display: none;
}

.tfi-home .tfi-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(to right,
		rgba(255, 255, 255, 1) 0%,
		rgba(255, 255, 255, 1) 22%,
		rgba(255, 255, 255, 0.86) 34%,
		rgba(255, 255, 255, 0.45) 47%,
		rgba(255, 255, 255, 0) 60%);
}

.tfi-home .tfi-hero .wp-block-cover__inner-container {
	position: relative !important;
	z-index: 3 !important;
	box-sizing: border-box;
	width: 100% !important;
	max-width: 1440px;
	margin: 0 auto;
	padding: calc(11 * var(--pt)) var(--tfi-gutter) 0;
	color: var(--tfi-ink);
}

.tfi-home .tfi-hero h1 {
	margin: 0;
	max-width: calc(370 * var(--pt));
	font-family: var(--tfi-sans);
	font-size: calc(33.7 * var(--pt));
	font-weight: 700;
	line-height: calc(40.8 * var(--pt));
	text-shadow: none !important;
	letter-spacing: -0.005em;
	color: var(--tfi-ink);
	text-align: left;
}

.tfi-home .tfi-hero p {
	margin: 0;
	max-width: calc(380 * var(--pt));
	font-family: var(--tfi-sans);
	font-size: calc(14 * var(--pt));
	font-weight: 500;
	line-height: calc(20 * var(--pt));
	color: var(--tfi-ink);
	text-align: left;
}

.tfi-home .tfi-hero h1 + p {
	margin-top: calc(11 * var(--pt));
}

.tfi-home .tfi-hero p + p {
	margin-top: calc(3 * var(--pt));
}

/* ---------- image strip + quote panel ---------- */

.tfi-home .tfi-strip > .wp-block-group__inner-container {
	display: contents;
}

.tfi-home .tfi-strip {
	display: grid;
	grid-template-columns: repeat(4, 1fr) 1.98fr;
	grid-auto-rows: minmax(calc(171 * var(--pt)), auto);
	column-gap: calc(2 * var(--pt));
	align-items: stretch;
	margin: calc(14 * var(--pt)) 0 calc(12 * var(--pt));
	padding: 0 calc(5.5 * var(--pt)) 0 0;
	background: #fff;
}

.tfi-home .tfi-strip .wp-block-image,
.tfi-home .tfi-panel {
	align-self: stretch;
	height: 100%;
}

.tfi-home .tfi-strip .wp-block-image {
	margin: 0;
	min-width: 0;
}

.tfi-home .tfi-strip .wp-block-image img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
}

.tfi-home .tfi-panel {
	box-sizing: border-box;
	margin-left: calc(4 * var(--pt));
	padding: calc(8 * var(--pt)) calc(14 * var(--pt)) calc(17.6 * var(--pt));
	background: var(--tfi-pale);
	border-radius: calc(11 * var(--pt)) 0 calc(11 * var(--pt)) 0;
}

.tfi-home .tfi-panel h2 {
	margin: 0;
	font-family: var(--tfi-sans);
	font-size: calc(16.25 * var(--pt));
	font-weight: 700;
	line-height: 1.2;
	color: var(--tfi-ink);
	text-align: left;
}

.tfi-home .tfi-panel p {
	margin: calc(3 * var(--pt)) 0 0;
	font-family: var(--tfi-sans);
	font-size: calc(14 * var(--pt));
	font-weight: 500;
	line-height: 1.25;
	color: var(--tfi-ink);
	text-align: left;
}

.tfi-home .tfi-panel .wp-block-buttons {
	margin: calc(8 * var(--pt)) 0 0;
	justify-content: flex-start;
}

.tfi-home .tfi-panel .wp-block-button {
	margin: 0;
}

.tfi-home .tfi-panel .wp-block-button__link,
.tfi-home .tfi-panel .wp-block-button__link:hover,
.tfi-home .tfi-panel .wp-block-button__link:focus {
	display: inline-flex !important;
	align-items: center;
	box-sizing: border-box;
	width: auto !important;
	min-width: calc(161.7 * var(--pt));
	height: calc(32.6 * var(--pt));
	padding: 0 calc(10 * var(--pt)) !important;
	border: 0;
	border-radius: calc(9 * var(--pt)) 0 calc(9 * var(--pt)) 0 !important;
	background-color: var(--tfi-navy) !important;
	color: #fff !important;
	font-family: var(--tfi-sans) !important;
	font-size: calc(16.5 * var(--pt)) !important;
	font-weight: 500 !important;
	line-height: 1 !important;
	text-decoration: none !important;
	transition: background-color .18s ease;
}

.tfi-home .tfi-panel .wp-block-button__link:hover,
.tfi-home .tfi-panel .wp-block-button__link:focus {
	background-color: var(--tfi-blue) !important;
	color: var(--tfi-navy) !important;
}

.tfi-home .tfi-panel .tfi-smallprint {
	margin-top: calc(15.5 * var(--pt));
	max-width: calc(203 * var(--pt));
	font-family: var(--tfi-gill);
	font-size: calc(10 * var(--pt));
	font-weight: 400;
	line-height: calc(12 * var(--pt));
}

/* ---------- footer ---------- */

.tfi-footer {
	float: none;
	clear: both;
	width: 100%;
	min-height: 0;
	padding: 0;
	background: none;
}

.tfi-footer-blue {
	background: var(--tfi-blue);
	padding: calc(16.2 * var(--pt)) 0 calc(20.6 * var(--pt));
}

.tfi-footer-dark {
	background: var(--tfi-navy);
	padding: calc(26 * var(--pt)) 0;
}

.tfi-footer p {
	margin: 0;
	font-family: var(--tfi-sans);
	font-weight: 500;
	line-height: 1.3;
	max-width: none;
}

.tfi-footer-blue p {
	font-size: calc(10 * var(--pt));
	color: var(--tfi-ink);
}

.tfi-footer-blue p + p {
	margin-top: calc(6.8 * var(--pt));
}

.tfi-footer-blue a,
.tfi-footer-blue a:hover,
.tfi-footer-blue a:focus {
	color: var(--tfi-ink);
	text-decoration: none;
}

.tfi-footer-blue a:hover {
	text-decoration: underline;
}

.tfi-footer-maps {
	max-width: calc(560 * var(--pt));
}

.tfi-footer-dark .tfi-footer-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: calc(10 * var(--pt));
}

.tfi-footer-dark p {
	font-size: calc(9.1 * var(--pt));
	color: #fff;
}

.tfi-footer-dark a,
.tfi-footer-dark a:hover,
.tfi-footer-dark a:focus {
	color: #fff;
	text-decoration: none;
}

.tfi-footer-dark a:hover {
	text-decoration: underline;
}

/* ---------- inside pages keep the old container, just tidied ---------- */

body:not(.tfi-home-page) .insidecontainer {
	background: none;
}

/* ==========================================================================
   Site-wide typography - Montserrat everywhere (was Open Sans + Marcellus)
   ========================================================================== */

body,
button,
input,
select,
textarea,
.container h1,
.container h2,
.container h3,
.container h4,
.container h5,
.container h6,
h1, h2, h3, h4, h5, h6,
.logo p,
.logo h1,
.menuarea .menu li a,
footer .menu li a,
.tfi-page p,
.tfi-page h1,
.tfi-page .tfi-alt {
	font-family: var(--tfi-sans) !important;
}

.tfi-page .tfi-alt {
	font-weight: 500 !important;
}

/* ==========================================================================
   Tablet / mobile
   ========================================================================== */

@media only screen and (max-width: 979px) {

	:root {
		--pt: 1px;
		--tfi-gutter: 22px;
	}

	/* artwork line lengths are a desktop-only device */
	.tfi-home .tfi-hero h1,
	.tfi-home .tfi-hero p,
	.tfi-home .tfi-panel .tfi-smallprint,
	.tfi-footer-maps {
		max-width: none;
	}

	.tfi-footer p,
	.tfi-footer-inner {
		text-align: left;
	}

	.tfi-header-inner {
		flex-direction: column;
		align-items: center;
		gap: 22px;
		padding-top: 26px;
		padding-bottom: 26px;
	}

	.tfi-logo {
		text-align: center;
	}

	.tfi-logo-main {
		font-size: 40px;
	}

	.tfi-logo-sub {
		font-size: 22px;
		margin-top: 8px;
	}

	.tfi-header-right {
		width: 100%;
		text-align: center;
	}

	.tfi-strap {
		font-size: 21px;
		margin-bottom: 14px;
	}

	.tfi-actions {
		flex-wrap: wrap;
		justify-content: center;
		gap: 10px;
	}

	.tfi-btn,
	.tfi-btn:hover,
	.tfi-btn:focus {
		height: 48px;
		padding: 0 20px;
		border-width: 2px;
		border-radius: 18px 0 18px 0;
		font-size: 19px;
	}

	.tfi-btn--line,
	.tfi-btn--solid {
		min-width: 0;
	}

	.tfi-rule {
		height: 8px;
	}

	.tfi-home .tfi-hero br {
		display: none;
	}

	/* hero: image on top, copy beneath - no text over a busy photo */
	.tfi-home .tfi-hero.wp-block-cover {
		height: auto;
		min-height: 0;
	}

	.tfi-home .tfi-hero .wp-block-cover__image-background {
		position: relative;
		height: 42vw;
		max-height: 320px;
	}

	.tfi-home .tfi-hero::after {
		display: none;
	}

	.tfi-home .tfi-hero .wp-block-cover__inner-container {
		padding: 26px var(--tfi-gutter) 30px;
	}

	.tfi-home .tfi-hero h1 {
		font-size: 40px;
		line-height: 1.1;
	}

	.tfi-home .tfi-hero p {
		font-size: 18px;
		line-height: 1.5;
	}

	.tfi-home .tfi-hero h1 + p {
		margin-top: 16px;
	}

	.tfi-home .tfi-hero p + p {
		margin-top: 12px;
	}

	.tfi-home .tfi-strip {
		grid-template-columns: repeat(4, 1fr);
		column-gap: 3px;
		row-gap: 3px;
		margin: 0;
		padding: 0;
	}

	.tfi-home .tfi-panel {
		grid-column: 1 / -1;
		margin: 0;
		padding: 24px var(--tfi-gutter) 30px;
		border-radius: 0;
	}

	.tfi-home .tfi-panel h2 {
		font-size: 30px;
	}

	.tfi-home .tfi-panel p {
		font-size: 19px;
	}

	.tfi-home .tfi-panel .wp-block-buttons {
		margin-top: 16px;
	}

	.tfi-home .tfi-panel .wp-block-button__link,
	.tfi-home .tfi-panel .wp-block-button__link:hover,
	.tfi-home .tfi-panel .wp-block-button__link:focus {
		min-width: 0;
		height: 52px;
		padding: 0 24px !important;
		border-radius: 16px 0 16px 0 !important;
		font-size: 22px !important;
	}

	.tfi-home .tfi-panel .tfi-smallprint {
		margin-top: 18px;
		font-size: 15px;
		line-height: 1.4;
	}

	.tfi-footer-blue {
		padding: 24px 0 26px;
	}

	.tfi-footer-dark {
		padding: 20px 0;
	}

	.tfi-footer-blue p {
		font-size: 16px;
	}

	.tfi-footer-blue p + p {
		margin-top: 10px;
	}

	.tfi-footer-dark p {
		font-size: 15px;
	}

	.tfi-footer-dark .tfi-footer-inner {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}
}

@media only screen and (max-width: 640px) {

	.tfi-logo-main { font-size: 32px; }
	.tfi-logo-sub  { font-size: 17.9px; }
	.tfi-strap     { font-size: 17px; }

	.tfi-btn,
	.tfi-btn:hover,
	.tfi-btn:focus {
		height: 44px;
		padding: 0 16px;
		font-size: 16px;
	}

	.tfi-home .tfi-hero h1 { font-size: 32px; }
	.tfi-home .tfi-hero p  { font-size: 16px; }

	.tfi-home .tfi-strip {
		grid-template-columns: repeat(2, 1fr);
	}

	.tfi-home .tfi-panel h2 { font-size: 25px; }
	.tfi-home .tfi-panel p  { font-size: 17px; }

	.tfi-footer-blue p { font-size: 14px; }
	.tfi-footer-dark p { font-size: 13px; }
}

.tfi-home article {
	margin: 0;
	padding: 0;
}

.tfi-home .post-edit-link {
	display: inline-block;
	margin: 10px var(--tfi-gutter);
}
