/* ----------------------------------------------------------------
	Custom CSS

	Add all your Custom Styled CSS here for New Styles or
	Overwriting Default Theme Styles for Better Handling Updates
-----------------------------------------------------------------*/

/* Design tokens — ported from tkh-website */
:root {
	--font-serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
	--font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

	/* Map Canvas variables to our stacks */
	--cnvs-body-font: var(--font-sans);
	--cnvs-primary-font: var(--font-sans);
	--cnvs-secondary-font: var(--font-serif);

	/* Colour palette — restrained navy + cream */
	--color-navy:           #0c2240;
	--color-navy-deep:      #071630;
	--color-on-navy:        #f6f3ec;
	--color-on-navy-mute:   rgba(246, 243, 236, 0.72);
	--color-ink:            #0c2240;

	/* Motion */
	--ease: cubic-bezier(0.2, 0.65, 0.25, 1);
}

/* Headings use the sans stack */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
	font-family: var(--font-sans);
}

a:hover,
a:focus {
	color: #E63E2E !important;
}
.is-expanded-menu .full-header #logo {
border-right: none;
}

/* Brand-red utility — append to any element to paint its text TKH brand red */
.brand-red {
	color: #E63E2E !important;
}

/* Hot-spot map — stagger pulse animation for cities 11+ (CSS in hosting.css only
   defines delays up to nth-child(10); extras would otherwise pulse in sync). */
.hotspot-img .hot-spot:nth-child(11) .circle { animation-delay: 16.5s; }
.hotspot-img .hot-spot:nth-child(12) .circle { animation-delay: 18s; }
.hotspot-img .hot-spot:nth-child(13) .circle { animation-delay: 19.5s; }
.hotspot-img .hot-spot:nth-child(14) .circle { animation-delay: 21s; }
.hotspot-img .hot-spot:nth-child(15) .circle { animation-delay: 22.5s; }
.hotspot-img .hot-spot:nth-child(16) .circle { animation-delay: 24s; }
.hotspot-img .hot-spot:nth-child(17) .circle { animation-delay: 25.5s; }
.hotspot-img .hot-spot:nth-child(18) .circle { animation-delay: 27s; }
.hotspot-img .hot-spot:nth-child(19) .circle { animation-delay: 28.5s; }
.hotspot-img .hot-spot:nth-child(20) .circle { animation-delay: 30s; }
.hotspot-img .hot-spot:nth-child(21) .circle { animation-delay: 31.5s; }
.hotspot-img .hot-spot:nth-child(22) .circle { animation-delay: 33s; }
.hotspot-img .hot-spot:nth-child(23) .circle { animation-delay: 34.5s; }
.hotspot-img .hot-spot:nth-child(24) .circle { animation-delay: 36s; }
.hotspot-img .hot-spot:nth-child(25) .circle { animation-delay: 37.5s; }
.hotspot-img .hot-spot:nth-child(26) .circle { animation-delay: 39s; }
.hotspot-img .hot-spot:nth-child(27) .circle { animation-delay: 40.5s; }

/* Logo: TKH mark + "Global Group" wordmark side-by-side */
#logo a.logo-link {
	display: inline-flex !important;
	flex-direction: row;
	align-items: center;
	gap: 12px;
	width: auto !important;
	font-size: 0; /* prevent inherited 36px from leaking onto whitespace between children */
}
#header-wrap #logo a.logo-link img.logo-default,
#header-wrap #logo a.logo-link img.logo-dark {
	height: 48px !important;
	width: auto !important;
	max-height: 48px;
	margin: 0;
}
#logo .tkh-wordmark {
	display: inline-block;
	font-size: 16px;
	font-weight: 800;
	line-height: 1.15;
	text-transform: uppercase;
	color: var(--cnvs-themecolor);
	white-space: nowrap;
}

/* Header: extra vertical breathing room — applies in mobile, desktop, and sticky/shrink.
   Sub-menu vars also overridden here because Canvas defines them on `#header { … }`,
   so `:root` overrides lose the specificity battle. Matching main-nav typography keeps
   sub-menu items visually identical to top-level links. */
#header {
	--cnvs-header-height: 100px;
	--cnvs-sticky-header-height: 80px;

	--cnvs-primary-menu-submenu-font:               var(--cnvs-primary-menu-font, var(--font-sans));
	--cnvs-primary-menu-submenu-font-size:          var(--cnvs-primary-menu-font-size, 14px);
	--cnvs-primary-menu-submenu-font-weight:        400;
	--cnvs-primary-menu-submenu-hover-font-weight:  400;
	--cnvs-primary-menu-submenu-spacing:            var(--cnvs-primary-menu-ls, 0.4px);
	/* Kill Canvas's hover shift (default 0.25rem right-padding bump on :hover).
	   Must carry a unit — Canvas uses this inside calc(), and bare `0` makes the
	   expression invalid, collapsing padding-left to 0 → items slide left on hover. */
	--cnvs-primary-menu-submenu-hover-padding-offset: 0px;
}

/* Mobile: make the header stick to the top while scrolling, with comfortable padding.
   `position: sticky` keeps it in normal flow on first view (top-bar above stays visible),
   then pins to the viewport top once the user scrolls past it. */
@media (max-width: 991.98px) {
	#header {
		position: sticky !important;
		top: 0 !important;
		z-index: 299;
	}
	#header-wrap {
		position: static !important;
		padding-top: 18px;
		padding-bottom: 18px;
	}
}

/* Sticky/shrink state on desktop — give it the same generous padding so it doesn't feel cramped */
.is-expanded-menu #header.sticky-header #header-wrap {
	padding-top: 14px;
	padding-bottom: 14px;
}

/* ----------------------------------------------------------------
   Hero (.slider-caption-center) — ported from tkh-website
   Scoped so Canvas's own .btn elsewhere on the page is unaffected.
-----------------------------------------------------------------*/
.slider-caption-center h1 {
	font-family: var(--font-serif);
	font-weight: 400;
	font-size: clamp(2.5rem, 5.5vw, 4.25rem);
	line-height: 1.06;
	letter-spacing: -0.015em;
	color: var(--color-on-navy);
	margin-inline: auto;
}

.slider-caption-center .hero__sub {
	margin: 28px auto 0;
	font-family: var(--font-sans);
	font-size: 1.125rem;
	line-height: 1.6;
	color: var(--color-on-navy-mute);
	max-width: 84ch;
}

.slider-caption-center .hero__actions {
	margin-top: 40px;
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
	justify-content: center;
}

/* Primary CTA button — applies to any `.btn` site-wide except Canvas's link-style
   menu buttons (`.btn-link`) and Bootstrap colour variants (`.btn-success` keeps
   the footer Subscribe green, etc.). Site-wide so a bare `class="btn"` looks the
   same on every page — hero, content cards, anywhere. */
.btn:not(.btn-link):not(.btn-success):not(.btn-primary):not(.btn-secondary):not(.btn-warning):not(.btn-danger):not(.btn-info):not(.btn-light):not(.btn-dark) {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 14px 22px;
	font-family: var(--font-sans);
	font-size: 0.9375rem;
	font-weight: 500;
	letter-spacing: 0.01em;
	background: var(--color-navy);
	color: var(--color-on-navy);
	border: 1px solid var(--color-navy);
	transition: background 200ms var(--ease), color 200ms var(--ease);
}
.btn:not(.btn-link):not(.btn-success):not(.btn-primary):not(.btn-secondary):not(.btn-warning):not(.btn-danger):not(.btn-info):not(.btn-light):not(.btn-dark):hover {
	background: #e3e3e3;
	color: var(--color-navy);
}

/* Small variant — append `.btn-sm` for a compact CTA (e.g. "See the portfolio").
   Has one more class than the base rule above, so it wins on padding/font. */
.btn:not(.btn-link):not(.btn-success):not(.btn-primary):not(.btn-secondary):not(.btn-warning):not(.btn-danger):not(.btn-info):not(.btn-light):not(.btn-dark).btn-sm {
	padding: 8px 16px;
	font-size: 0.8125rem;
	gap: 8px;
}

/* Variant for use on navy backgrounds — transparent with cream border.
   !important needed because the base `.btn:not(...)` rule above has very high
   specificity (10 classes via the :not() chain), so the variant's single class
   would lose the cascade without it. */
.btn--on-navy {
	background: transparent !important;
	border-color: var(--color-on-navy) !important;
	color: var(--color-on-navy) !important;
}
.btn--on-navy:hover {
	background: var(--color-on-navy) !important;
	color: var(--color-navy) !important;
}

/* Arrow nudges right on hover for any tkh-styled .btn that contains an .arr */
.btn .arr {
	display: inline-block;
	transform: translateX(0);
	transition: transform 200ms var(--ease);
}
.btn:hover .arr { transform: translateX(4px); }

/* Sub-menu hover: keep padding identical so items don't shift; background flush with text. */
.sub-menu-container .menu-item > .menu-link,
.sub-menu-container .menu-item > .menu-link:hover {
	padding: 10px 15px;
	background-color: transparent;
    letter-spacing: 0px;
}

/* Hover bridge — Canvas's mega-menu sits with a ~22px gap below the menu item.
   When the cursor crosses that gap, :hover on the <li> ends and the dropdown
   closes before the cursor reaches the content. The invisible ::before below
   extends the content's hover hit-area upward, keeping the menu open during
   the traversal. `pointer-events: inherit` ensures the bridge is inert while
   the menu is closed (Canvas sets pointer-events: none on the content). */
.is-expanded-menu .primary-menu li.mega-menu > .mega-menu-content::before,
.is-expanded-menu .primary-menu li.sub-menu > .sub-menu-container::before {
	content: '';
	position: absolute;
	top: -30px;
	left: 0;
	right: 0;
	height: 30px;
	pointer-events: inherit;
}
/* Business / practice cards (Who We Are + Our Businesses).
   Flex column so the optional `.mt-auto` button at the bottom of a card pins
   to the baseline even when the body copy differs in length between cards. */
.practice-card {
	height: 100%;
	display: flex;
	flex-direction: column;
	padding: 2rem 1.75rem;
	background-color: #faf8f3;
	border-top: 2px solid var(--cnvs-themecolor);
	transition: background-color 240ms var(--ease), transform 240ms var(--ease);
}
.practice-card:hover {
	background-color: #f6f3ec;
	transform: translateY(-2px);
}
.practice-card__num {
	font-family: var(--font-sans);
	font-size: 13px;
	font-weight: 500;
	color: var(--cnvs-themecolor);
	margin-bottom: 1.25rem;
}

/* Optional image block — sits between the number and the heading.
   16:9 ratio, full width of the card, subtle border-radius for editorial feel. */
.practice-card__media {
	margin: 0 0 1.25rem;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 4px;
	background-color: rgba(20, 20, 60, 0.04);
}
.practice-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 400ms var(--ease);
}
.practice-card:hover .practice-card__media img {
	transform: scale(1.03);
}
.dark#footer .footer-widgets-wrap a, .dark #footer .footer-widgets-wrap a {
font-size: 0.9rem;
}
/* Sticky sidebar — pins the right-column <aside> within its row while the main
   column scrolls. Only kicks in at the breakpoint where the columns actually
   sit side-by-side (md+); below that the column stacks beneath the main copy
   and sticky has no useful effect.

   Class name starts with `sticky-` deliberately: Canvas applies
   `position: relative` to every `[class*="col-"]` element via a rule scoped to
   `:not([class*="sticky-"]):not([class*="position-"])`. Naming our class
   `sticky-sidebar` slips past that exclusion so our `position: sticky` wins.

   `align-self: flex-start` is the critical bit — Bootstrap rows are flex with
   default `align-items: stretch`, which fights `position: sticky` (a stretched
   item can't be sticky relative to the row). Overriding alignment lets the
   sidebar size to its own content and respect sticky positioning.

   `top` matches the sticky-header height (~100px) plus 16px of breathing room
   so the sidebar doesn't tuck under the header on scroll. */
@media (min-width: 768px) {
	.sticky-sidebar {
		position: sticky;
		top: 116px;
		align-self: flex-start;
	}
}

/* ----------------------------------------------------------------
   Lightbox — `.magnific-max-width` modal variant

   Canvas's lightbox plugin (functions.bundle.js:3411) reads
   `data-lightbox-class` from the gallery item at open time and
   appends that string as a class on Magnific's wrapper. So any
   anchor with `data-lightbox-class="magnific-max-width"` opens
   inside a `.magnific-max-width` wrapper.

   Canvas's own style.css already defines:
       .magnific-max-width .mfp-content { max-width: 800px; }
   We tighten that and add finish — generous backdrop on every
   side, rounded image, soft drop shadow — so the popup reads as
   an overlay rather than a new browser window. Scoped to the
   modifier so other lightbox uses on the site are untouched.
-----------------------------------------------------------------*/
.magnific-max-width .mfp-content {
	max-width: min(720px, 88vw);
	margin-inline: auto;
}
.magnific-max-width .mfp-img {
	max-height: 78vh;
	border-radius: 4px;
	box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
}
/* Magnific paints a faint white card behind the image via ::after.
   We're using our own box-shadow on .mfp-img, so suppress this one. */
.magnific-max-width .mfp-figure::after {
	box-shadow: none;
	background: transparent;
}
/* Push the close (×) inside the visible modal region instead of the
   default top-right of the viewport, so it reads as part of the popup. */
.magnific-max-width .mfp-close {
	color: #fff;
	opacity: 0.9;
}

/* ----------------------------------------------------------------
   News-card placeholder media

   When a `news_releases` row has no `image_path`, the page renders
   `<div class="practice-card__media news-card__media--placeholder">`.
   This rule paints a soft cream→sand gradient so the no-image card
   still has a visual block at the same 16:9 height as cards that do
   carry an image — the row stays balanced, the card doesn't collapse.

   The Bootstrap-Icons newspaper glyph sits centred at low opacity as
   a subtle category cue, not a heavy decoration.
-----------------------------------------------------------------*/
.news-card__media--placeholder {
	background: linear-gradient(135deg, #faf8f3 0%, #ece4d2 100%);
	display: flex;
	align-items: center;
	justify-content: center;
}
.news-card__media--placeholder > .bi-newspaper {
	font-size: 2.4rem;
	color: var(--cnvs-themecolor);
	opacity: 0.32;
}
.practice-card:hover .news-card__media--placeholder > .bi-newspaper {
	opacity: 0.45;
}

/* News-card excerpt — defensive line-clamp.

   The PHP helper `tkh_excerpt_from_body()` already caps the snippet by
   character count, but character widths vary (a string full of "i"s
   takes less space than one full of "M"s), so a fixed char count can
   still spill to a fifth line on the rare release. Clamping to 4 lines
   here keeps card heights identical regardless of the source text. */
.news-card__excerpt {
	display: -webkit-box;
	-webkit-line-clamp: 4;
	line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ----------------------------------------------------------------
   Pricing cards — `.pricing-card`

   Three-up plan grid for the APPSG.AI pricing page. Cream cards
   with a navy top border, a brand-red checklist for included
   features and a CTA pinned to the card baseline via mt-auto.
   The `--featured` modifier elevates the recommended plan with a
   thicker top border, a soft shadow and a small navy ribbon.

   Inside the narrow col-md-8 main column the cards sit at
   col-md-4 each, so the inner width is tight; typography is
   scaled down accordingly. On mobile the .col-md-4 grid stacks
   to one card per row.
-----------------------------------------------------------------*/
.pricing-card {
	height: 100%;
	display: flex;
	flex-direction: column;
	padding: 1.4rem 1.2rem;  /* tightened for 4-up layout inside col-md-8 */
	background: #faf8f3;
	border-top: 2px solid var(--cnvs-themecolor);
	border-radius: 4px;
	position: relative;
	transition: background 240ms var(--ease), transform 240ms var(--ease);
}
.pricing-card:hover {
	background: #f6f3ec;
	transform: translateY(-2px);
}

/* Featured = the plan we want users to choose. Slight emphasis,
   not a colour change — keeps the investor-grade restraint. */
.pricing-card--featured {
	border-top-width: 4px;
	box-shadow: 0 6px 24px rgba(20, 20, 60, 0.08);
}
.pricing-card__ribbon {
	position: absolute;
	top: -10px;
	right: 14px;
	background: var(--cnvs-themecolor);
	color: #fff;
	font-size: 10px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	font-weight: 600;
	padding: 4px 10px;
	border-radius: 2px;
}

.pricing-card__name {
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--cnvs-themecolor);
	margin-bottom: 0.4rem;
}
.pricing-card__tag {
	font-size: 12.5px;
	color: var(--color-ink-soft, #3a3a3a);
	margin-bottom: 1.1rem;
	line-height: 1.45;
	min-height: 2.9em; /* equalise across cards so prices line up horizontally */
}
.pricing-card__price {
	margin: 0 0 0.2rem;
	display: flex;
	align-items: baseline;
	gap: 0.3rem;
	font-family: var(--font-sans);
}
.pricing-card__amount {
	font-size: 1.6rem;  /* fits 4-up width while staying legible */
	font-weight: 600;
	color: var(--cnvs-themecolor);
	line-height: 1;
}
.pricing-card__period {
	font-size: 0.8125rem;
	color: var(--color-ink-soft, #3a3a3a);
}
.pricing-card__billing {
	font-size: 11px;
	color: var(--color-ink-soft, #3a3a3a);
	margin-bottom: 1.25rem;
	min-height: 2.6em;
	line-height: 1.4;
}

.pricing-card__features {
	list-style: none;
	padding-left: 0;
	margin: 0 0 1.25rem;
	flex-grow: 1;
}
.pricing-card__features li {
	position: relative;
	padding-left: 1.25rem;
	margin-bottom: 0.45rem;
	font-size: 12px;
	line-height: 1.45;
	color: var(--color-ink-soft, #3a3a3a);
}
/* Brand-red checkmark via inline SVG data URI — no icon-font dependency.
   The %23E63E2E in the URL is `#E63E2E` (TKH brand red) URL-encoded. */
.pricing-card__features li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0.3em;
	width: 13px;
	height: 13px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23E63E2E'%3E%3Cpath d='M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z'/%3E%3C/svg%3E");
	background-size: contain;
	background-repeat: no-repeat;
}

/* "Plus everything in the previous tier" lead line */
.pricing-card__inherit {
	font-size: 11.5px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--cnvs-themecolor);
	font-weight: 500;
	margin: 0 0 0.6rem;
}

.pricing-card__cta {
	margin-top: auto;
	justify-content: center;
	width: 100%;
}
