/**
 * The site footer.
 *
 * Rendered by includes/class-ct-footer.php on wp_footer, and loaded only when
 * the footer is switched on in Tour Settings.
 *
 * SCOPED UNDER .ct-ft, EVERY RULE. This prints inside a page that Elementor and
 * the theme have both already styled by element — an unscoped `ul` or `a` rule
 * here would reach the whole document from the bottom of it.
 *
 * THE ACCENTS ARE THE ELEMENTOR FOOTER'S OWN, read off its generated stylesheet
 * rather than guessed: the orange and the translucent whites are the values the
 * design was already using, so switching over changed the machinery and not the
 * appearance.
 *
 * THE GROUND IS NOT. It was that footer's flat #1689CF and is now a gradient,
 * asked for after the swap — the one deliberate difference between this footer
 * and the one it replaced.
 *
 * @package CustomTours
 */

.ct-ft {
	--ct-ft-a: #0B2A44;
	--ct-ft-b: #0F4170;
	--ct-ft-c: #1A6A9E;
	--ct-ft-orange: #F68B2D;
	--ct-ft-ink: #FFFFFF;
	--ct-ft-muted: rgba( 255, 255, 255, .8 );
	--ct-ft-line: rgba( 255, 255, 255, .16 );
	--ct-ft-panel: rgba( 255, 255, 255, .07 );

	margin: 0;
	padding: 0;
	/*
	 * The colour is the gradient; the flat one under it is what shows if the
	 * gradient cannot be painted. It is the middle stop rather than the
	 * darkest, so the white text keeps roughly the contrast it was designed
	 * against either way.
	 */
	background-color: var( --ct-ft-b );
	background-image: linear-gradient( 145deg, var( --ct-ft-a ) 0%, var( --ct-ft-b ) 50%, var( --ct-ft-c ) 100% );
	color: var( --ct-ft-ink );
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	font-size: 15px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

.ct-ft *,
.ct-ft *::before,
.ct-ft *::after {
	box-sizing: border-box;
}

.ct-ft__wrap {
	max-width: 1320px;
	margin: 0 auto;
	padding: 0 30px;
}

/* ==========================================================================
   The call-out band
   ========================================================================== */

/*
 * Hairlines top and bottom rather than a filled panel, which is what the
 * Elementor version drew: it separates the band from the columns without adding
 * a second block of colour to a footer that is already one colour.
 */
.ct-ft__cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 18px 32px;
	margin: 0;
	padding: 36px 0;
	border-bottom: 1px solid var( --ct-ft-line );
}

.ct-ft__ctatext {
	flex: 1 1 420px;
	min-width: 0;
}

.ct-ft__ctahead {
	margin: 0 0 6px;
	font-family: 'Poppins', sans-serif;
	font-size: 28px;
	font-weight: 700;
	line-height: 1.25;
	color: var( --ct-ft-ink );
	text-wrap: balance;
}

.ct-ft__ctasub {
	margin: 0;
	max-width: 62ch;
	font-size: 15px;
	line-height: 1.65;
	color: var( --ct-ft-muted );
}

.ct-ft__ctabtn {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 13px 26px;
	border: 0;
	border-radius: 999px;
	background: var( --ct-ft-orange );
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	transition: filter .15s ease, transform .15s ease;
}

.ct-ft__ctabtn:hover,
.ct-ft__ctabtn:focus-visible {
	filter: brightness( 1.07 );
	color: #fff;
	transform: translateY( -1px );
}

/* ==========================================================================
   The four columns
   ========================================================================== */

/*
 * auto-fit with a floor rather than four fixed columns, so the row reflows on
 * its own at every width between a phone and a desktop. The brand column is
 * given more room because it carries the logo and two lines of contact detail;
 * the rest are lists of short links.
 */
.ct-ft__grid {
	display: grid;
	grid-template-columns: 1.5fr 1fr 1fr 1.4fr;
	gap: 40px;
	padding: 56px 0 48px;
}

.ct-ft__col {
	min-width: 0;
}

/*
 * A label on a list of links, not a heading — see the note in the PHP about why
 * this footer adds no headings to the document outline.
 */
.ct-ft__colhead {
	margin: 0 0 16px;
	font-family: 'Poppins', sans-serif;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	color: var( --ct-ft-ink );
}

.ct-ft__links {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 11px;
}

.ct-ft__links a {
	display: inline-block;
	color: var( --ct-ft-muted );
	font-size: 15px;
	line-height: 1.45;
	text-decoration: none;
	transition: color .15s ease, transform .15s ease;
}

.ct-ft__links a:hover,
.ct-ft__links a:focus-visible {
	color: var( --ct-ft-ink );
	transform: translateX( 2px );
}

/* ---- the brand column ---- */

.ct-ft__logo {
	display: inline-block;
	margin: 0 0 20px;
	max-width: 190px;
	color: var( --ct-ft-ink );
	font-family: 'Poppins', sans-serif;
	font-size: 20px;
	font-weight: 700;
	text-decoration: none;
}

.ct-ft__logo img {
	display: block;
	width: 100%;
	height: auto;
}

.ct-ft__contact {
	margin: 0 0 24px;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 9px;
}

.ct-ft__contact li {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px;
	font-size: 15px;
}

.ct-ft__clabel {
	color: var( --ct-ft-muted );
}

.ct-ft__contact a {
	color: var( --ct-ft-ink );
	font-weight: 600;
	text-decoration: none;
	word-break: break-word;
}

.ct-ft__contact a:hover,
.ct-ft__contact a:focus-visible {
	text-decoration: underline;
}

/* ---- socials ---- */

.ct-ft__social ul {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ct-ft__social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border: 1px solid var( --ct-ft-line );
	border-radius: 50%;
	background: var( --ct-ft-panel );
	color: var( --ct-ft-ink );
	text-decoration: none;
	transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.ct-ft__social a:hover,
.ct-ft__social a:focus-visible {
	background: var( --ct-ft-orange );
	border-color: var( --ct-ft-orange );
	transform: translateY( -2px );
}

.ct-ft__social svg {
	width: 16px;
	height: 16px;
}

/* ---- the expert card ---- */

.ct-ft__expert {
	padding: 22px 18px;
	border: 1px solid var( --ct-ft-line );
	border-radius: 14px;
	background: var( --ct-ft-panel );
	align-self: start;
}

.ct-ft__experttext {
	margin: 0 0 16px;
	font-size: 14px;
	line-height: 1.6;
	color: var( --ct-ft-muted );
}

.ct-ft__phone {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 16px;
	color: var( --ct-ft-ink );
	font-size: 16px;
	font-weight: 700;
	text-decoration: none;
}

.ct-ft__phone:hover,
.ct-ft__phone:focus-visible {
	color: var( --ct-ft-orange );
}

.ct-ft__auth {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.ct-ft__btn {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 10px 18px;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.ct-ft__btn--ghost {
	border: 1px solid var( --ct-ft-line );
	background: transparent;
	color: var( --ct-ft-ink );
}

.ct-ft__btn--ghost:hover,
.ct-ft__btn--ghost:focus-visible {
	border-color: var( --ct-ft-ink );
	color: var( --ct-ft-ink );
}

.ct-ft__btn--solid {
	border: 1px solid var( --ct-ft-orange );
	background: var( --ct-ft-orange );
	color: #fff;
}

.ct-ft__btn--solid:hover,
.ct-ft__btn--solid:focus-visible {
	filter: brightness( 1.07 );
	color: #fff;
}

/* ==========================================================================
   The bottom strip
   ========================================================================== */

.ct-ft__base {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 14px 28px;
	padding: 20px 0 26px;
	border-top: 1px solid var( --ct-ft-line );
}

/*
 * A WHITE PLATE UNDER THE CARD LOGOS.
 *
 * The strip is a PNG of dark card marks drawn for a light page, and the
 * footer's ground is now a dark gradient, so on it the logos all but vanish.
 * Giving the image its own white plate is the fix the brands themselves ask
 * for — Visa and Mastercard both publish clear-space rules and neither allows
 * recolouring the mark to suit a background.
 */
.ct-ft__icons {
	padding: 8px 12px;
	border-radius: 8px;
	background: #fff;
}

.ct-ft__icons img {
	display: block;
	width: auto;
	max-width: 100%;
	height: 26px;
}

/*
 * Full white rather than the muted white the rest of the small print uses.
 * It sits beside a white plate now, and at 80% it read as the dimmer of two
 * things that should have looked like one row.
 */
.ct-ft__copy {
	margin: 0;
	font-size: 13px;
	color: var( --ct-ft-ink );
}

/* ==========================================================================
   Focus
   ========================================================================== */

/*
 * One visible ring for everything in here. The ground is blue, so the default
 * browser outline — which is usually near-black — all but disappears on it.
 */
.ct-ft a:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
	border-radius: 4px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {

	.ct-ft__grid {
		grid-template-columns: 1.4fr 1fr 1fr;
		gap: 34px;
		padding: 46px 0 40px;
	}

	/* The card drops to its own full-width row rather than squeezing a fourth
	   column out of a three-column space. */
	.ct-ft__expert {
		grid-column: 1 / -1;
	}

	.ct-ft__ctahead {
		font-size: 24px;
	}
}

@media (max-width: 720px) {

	.ct-ft__wrap {
		padding: 0 20px;
	}

	.ct-ft__grid {
		grid-template-columns: 1fr 1fr;
		gap: 30px 24px;
		padding: 38px 0 32px;
	}

	.ct-ft__brand {
		grid-column: 1 / -1;
	}

	.ct-ft__cta {
		padding: 28px 0;
	}

	.ct-ft__ctabtn {
		width: 100%;
		justify-content: center;
	}
}

@media (max-width: 480px) {

	.ct-ft__grid {
		grid-template-columns: 1fr;
	}

	.ct-ft__ctahead {
		font-size: 21px;
	}

	.ct-ft__base {
		justify-content: flex-start;
	}

	/* Heading and circles together: centred circles under a left-aligned
	   "Follow Us" read as a slip rather than a decision. */
	.ct-ft__social {
		text-align: center;
	}

	.ct-ft__social ul {
		justify-content: center;
	}

	/*
	 * The card strip too, and with auto margins rather than by centring
	 * .ct-ft__base: that row also holds the copyright line, and centring the
	 * row would move both. An auto margin belongs to this item alone, and at
	 * this width the two have wrapped onto separate lines anyway.
	 */
	.ct-ft__icons {
		margin-left: auto;
		margin-right: auto;
	}

	.ct-ft__auth .ct-ft__btn {
		flex: 1 1 auto;
		justify-content: center;
	}
}

/* ==========================================================================
   Print
   ========================================================================== */

/*
 * A blue slab and a row of card logos are ink nobody asked for. The links keep
 * their text, which is what a printed page can still use.
 */
@media print {

	.ct-ft {
		background: none;
		color: #000;
	}

	.ct-ft__cta,
	.ct-ft__social,
	.ct-ft__auth,
	.ct-ft__icons {
		display: none;
	}

	.ct-ft__links a,
	.ct-ft__contact a,
	.ct-ft__copy,
	.ct-ft__colhead {
		color: #000;
	}
}
