/* =========================================================================
   JMG Group theme styles
   Colours, fonts and sizes come from theme.json (as --wp--preset--* variables).
   This file adds layout and component styling. Loaded on the site and in the editor.
   ========================================================================= */

:root {
	--jmg-navy: var(--wp--preset--color--navy);
	--jmg-navy-deep: var(--wp--preset--color--navy-deep);
	--jmg-blue: var(--wp--preset--color--blue);
	--jmg-blue-ink: var(--wp--preset--color--blue-ink);
	--jmg-ink: var(--wp--preset--color--ink);
	--jmg-ink-soft: var(--wp--preset--color--ink-soft);
	--jmg-mist: var(--wp--preset--color--mist);
	--jmg-line: var(--wp--preset--color--line);
	--jmg-wide: var(--wp--style--global--wide-size, 1200px);
	--jmg-gutter: clamp(1rem, 3vw, 2rem);
	--jmg-section: clamp(4rem, 2.5rem + 6vw, 7rem);
	--jmg-radius: 6px;
	--jmg-ease: cubic-bezier(.2, .7, .2, 1);
	--jmg-soft: cubic-bezier(.16, 1, .3, 1);
	--jmg-header-h: 84px;
	--jmg-shape: url(../img/shape.png);
	--jmg-lines: url(../img/lines.svg);
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { text-wrap: balance; }
:focus-visible { outline: 3px solid var(--jmg-blue); outline-offset: 3px; border-radius: 2px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.jmg-wrap { width: 100%; max-width: calc(var(--jmg-wide) + 2 * var(--jmg-gutter)); margin-inline: auto; padding-inline: var(--jmg-gutter); }
.jmg-chev { width: .6em; height: .6em; flex: none; transition: transform .2s var(--jmg-ease); }

/* Our blocks use the wide width inside normal content */
.is-layout-constrained > [class*="wp-block-jmg-"]:not(.alignfull) { max-width: var(--jmg-wide); }

/* Skip link */
.skip-link.screen-reader-text:focus { clip: auto; width: auto; height: auto; left: 16px; top: 16px; z-index: 100000; padding: .75rem 1rem; background: #fff; color: var(--jmg-navy); }

/* ---------- Text roles (block styles) ---------- */

.is-style-eyebrow, .jmg-eyebrow {
	font-size: clamp(.8125rem, .78rem + .15vw, .9375rem);
	font-weight: 400;
	letter-spacing: .25em;
	text-transform: uppercase;
	color: var(--jmg-blue-ink);
}
.is-style-eyebrow + .wp-block-heading { margin-top: .5rem; }
.is-style-lead { font-size: var(--wp--preset--font-size--lead); font-weight: 300; line-height: 1.5; }
.wp-block-heading.is-style-subheading { color: var(--jmg-blue-ink); font-size: var(--wp--preset--font-size--x-large); line-height: 1.3; }
.wp-block-heading.is-style-subheading + * { margin-top: 1.5rem; }

.wp-block-list.is-style-ticks { list-style: none; padding: 0; display: grid; gap: 1rem; }
.wp-block-list.is-style-ticks li { display: grid; grid-template-columns: auto 1fr; gap: .85rem; align-items: baseline; }
.wp-block-list.is-style-ticks li::before { content: ""; width: .7rem; height: .7rem; background: var(--jmg-blue); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M4 1.5 8.5 6 4 10.5' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M4 1.5 8.5 6 4 10.5' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; }

/* ---------- Buttons ---------- */

.jmg-btn,
.wp-block-button__link { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; transition: background-color .2s var(--jmg-ease), border-color .2s var(--jmg-ease), color .2s var(--jmg-ease); }
.jmg-btn { padding: 1rem 1.75rem; border-radius: var(--jmg-radius); background: var(--jmg-blue); border: 2px solid var(--jmg-blue); color: #fff; font-weight: 700; font-size: .9375rem; line-height: 1; justify-self: start; }
.jmg-btn:hover { background: var(--jmg-navy); border-color: var(--jmg-navy); color: #fff; }
.jmg-btn:hover .jmg-chev, .wp-block-button__link:hover .jmg-chev, .jmg-link-arrow:hover .jmg-chev { transform: translateX(3px); }
.is-style-navy .jmg-btn:hover, .jmg-hero .jmg-btn:hover, .is-style-navy .wp-block-button__link:hover { background: #fff; border-color: #fff; color: var(--jmg-navy); }
.wp-block-button.is-style-ghost .wp-block-button__link { background: transparent; color: var(--jmg-navy); border-color: var(--jmg-navy); }
.wp-block-button.is-style-ghost .wp-block-button__link:hover { background: var(--jmg-navy); color: #fff; }
.jmg-link-arrow { display: inline-flex; align-items: center; gap: .5rem; color: var(--jmg-navy); font-weight: 700; text-decoration: none; }

/* ---------- Header ---------- */

.jmg-header { position: fixed; inset: 0 0 auto; z-index: 50; transition: background-color .25s var(--jmg-ease), box-shadow .25s var(--jmg-ease); }
.admin-bar .jmg-header { top: var(--wp-admin--admin-bar--height, 32px); }
body:not(.has-dark-hero) .jmg-header,
.jmg-header.is-stuck { background: var(--jmg-navy); box-shadow: 0 1px 0 rgba(255,255,255,.08), 0 8px 24px rgba(0,30,45,.18); }
body:not(.has-dark-hero) .wp-site-blocks > main { padding-top: var(--jmg-header-h); }
.jmg-header__bar { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: var(--jmg-header-h); transition: min-height .25s var(--jmg-ease); }
.jmg-header.is-stuck .jmg-header__bar { min-height: 68px; }
.jmg-header__logo img { display: block; width: clamp(118px, 10vw, 150px); height: auto; }
.jmg-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(1rem, 2vw, 2.25rem); }
.jmg-nav a { position: relative; display: block; color: #fff; text-decoration: none; font-size: .9375rem; padding-block: .5rem; }
.jmg-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: .15rem; height: 2px; background: var(--jmg-blue); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--jmg-ease); }
.jmg-nav a:hover::after, .jmg-nav .current-menu-item > a::after, .jmg-nav .current_page_parent > a::after, .jmg-nav .current-menu-ancestor > a::after { transform: scaleX(1); }
.jmg-nav .sub-menu { display: none; }
.jmg-burger { display: none; position: relative; z-index: 2; background: none; border: 0; color: #fff; padding: .5rem; margin-right: -.5rem; cursor: pointer; }
.jmg-burger svg { width: 28px; height: 28px; overflow: visible; display: block; }
.jmg-burger path { transform-box: view-box; transform-origin: 12px 12px; transition: transform .35s var(--jmg-ease), opacity .2s var(--jmg-ease); }
.jmg-burger[aria-expanded="true"] .b1 { transform: translateY(5px) rotate(45deg); }
.jmg-burger[aria-expanded="true"] .b2 { opacity: 0; transform: translateX(6px); }
.jmg-burger[aria-expanded="true"] .b3 { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 900px) {
	.jmg-burger { display: block; }
	.jmg-nav { position: fixed; inset: 0; background: var(--jmg-navy); padding: 96px var(--jmg-gutter) 32px; overflow-y: auto; transform: translateX(100%); visibility: hidden; transition: transform .3s var(--jmg-ease), visibility 0s linear .3s; }
	.admin-bar .jmg-nav { top: var(--wp-admin--admin-bar--height, 46px); }
	.jmg-nav.is-open { transform: none; visibility: visible; transition: transform .3s var(--jmg-ease); }
	.jmg-nav ul { flex-direction: column; gap: 0; }
	.jmg-nav li { border-bottom: 1px solid rgba(255,255,255,.12); }
	.jmg-nav a { font-size: 1.375rem; padding-block: 1rem; }
	.jmg-nav a::after { display: none; }
}

/* ---------- Hero ---------- */

.jmg-hero { position: relative; isolation: isolate; overflow: hidden; color: #fff; background: var(--jmg-navy); }
.jmg-hero.alignfull { margin-block: 0; }
.jmg-hero__media { position: absolute; inset: 0; z-index: -1; }
.jmg-hero__media img, .jmg-hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.jmg-hero__video { opacity: 0; transition: opacity 1s var(--jmg-ease); pointer-events: none; user-select: none; -webkit-user-select: none; }
.jmg-hero__media { pointer-events: none; }
/* Fixed hero: the page scrolls over the photo. clip-path keeps the fixed layer inside the hero (works on iOS, unlike background-attachment). */
.jmg-hero.has-media { clip-path: inset(0); }
.jmg-hero.has-media .jmg-hero__media { position: fixed; inset: 0; height: 100vh; height: 100lvh; }
.editor-styles-wrapper .jmg-hero.has-media .jmg-hero__media { position: absolute; height: auto; }
.jmg-hero__video.is-playing { opacity: 1; }
.jmg-hero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(0,79,111,.95) 0%, rgba(0,79,111,.9) 45%, rgba(0,79,111,.76) 100%); }
.jmg-hero .jmg-wrap { padding-block: clamp(9rem, 6rem + 12vw, 14rem) clamp(5rem, 3rem + 8vw, 9rem); }
.jmg-hero.is-compact .jmg-wrap { padding-block: clamp(8rem, 6rem + 6vw, 11rem) clamp(3.5rem, 2.5rem + 4vw, 6rem); }
.jmg-hero__inner { display: grid; gap: 1.5rem; max-width: min(100%, 840px); }
.jmg-hero .jmg-eyebrow { color: var(--jmg-blue); margin: 0; }
.jmg-hero__logo { margin-bottom: .5rem; }
.jmg-hero__logo img { display: block; width: auto; height: clamp(44px, 3vw + 30px, 64px); max-width: 320px; object-fit: contain; object-position: left center; }
.jmg-hero__title { margin: 0; color: #fff; font-size: var(--wp--preset--font-size--huge); }
.jmg-hero__lead { margin: 0; font-size: var(--wp--preset--font-size--lead); font-weight: 300; line-height: 1.5; }
.jmg-hero.is-compact .jmg-hero__lead { font-size: clamp(1.0625rem, .95rem + .5vw, 1.375rem); max-width: 60ch; }
.jmg-hero .jmg-btn { margin-top: .5rem; }

/* ---------- Section backgrounds (Group block styles) ---------- */

.wp-block-group.is-style-textured,
.wp-block-group.is-style-navy,
.wp-block-group.is-style-mist { padding-block: var(--jmg-section); margin-block: 0; }
.wp-block-group.is-style-textured + .wp-block-group.is-style-textured { padding-top: 0; }

/* The pillow-line pattern stays fixed while content scrolls over it */
.wp-block-group.is-style-textured { position: relative; background: #fff; clip-path: inset(0); }
.wp-block-group.is-style-textured::before { content: ""; position: fixed; inset: 0; background: var(--jmg-lines) 298px 200px / cover no-repeat; pointer-events: none; }
.wp-block-group.is-style-textured > * { position: relative; }

.wp-block-group.is-style-navy { background: var(--jmg-navy); color: #fff; }
/* Navy with the pillow line pattern (fixed, like the white sections). */
.wp-block-group.is-style-navy.has-lines { position: relative; clip-path: inset(0); }
.wp-block-group.is-style-navy.has-lines::before { content: ""; position: fixed; inset: 0; background: var(--jmg-lines) 298px 200px / cover no-repeat; opacity: .22; pointer-events: none; }
.wp-block-group.is-style-navy.has-lines > * { position: relative; }
.editor-styles-wrapper .wp-block-group.is-style-navy.has-lines::before { position: absolute; }
.wp-block-group.is-style-navy :where(h1, h2, h3, h4) { color: var(--jmg-blue); }
.wp-block-group.is-style-navy .is-style-eyebrow { color: var(--jmg-blue); }
.wp-block-group.is-style-navy a:not(.wp-block-button__link) { color: #fff; }
.wp-block-group.is-style-navy .is-style-lead, .wp-block-group.is-style-navy p { font-weight: 300; }
.wp-block-group.is-style-mist { background: var(--jmg-mist); }
.wp-block-group.is-style-card { background: #fff; border: 1px solid var(--jmg-line); border-radius: var(--jmg-radius); padding: clamp(1.5rem, 1rem + 2vw, 2.5rem); }

/* Long-form text such as policies and articles */
.jmg-prose { max-width: 760px; }
.jmg-prose h2, .jmg-prose h3 { margin-top: 2.5rem; }
.jmg-prose p, .jmg-prose li { max-width: 72ch; }

/* ---------- Pillow images ---------- */

.jmg-pillow { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; -webkit-mask: var(--jmg-shape) center / contain no-repeat; mask: var(--jmg-shape) center / contain no-repeat; }
.jmg-pillow-wrap { position: relative; margin: 0; }
.jmg-pillow-wrap.is-layered::before { content: ""; position: absolute; inset: 0; background: var(--jmg-blue); opacity: .28; transform: translate(7%, 6%); -webkit-mask: var(--jmg-shape) center / contain no-repeat; mask: var(--jmg-shape) center / contain no-repeat; }

/* ---------- Image and text ---------- */

.jmg-split { display: grid; gap: 3rem; align-items: center; }
.jmg-split__media { justify-self: center; width: 100%; max-width: 560px; }
.jmg-split__text { display: grid; gap: 1.25rem; align-content: center; min-width: 0; }
.jmg-split__text > * { margin: 0; }
.jmg-split__text .wp-block-buttons { margin-top: .5rem; }
@media (min-width: 900px) {
	/* Image 40%, text 60% (text 60%, image 40% when the image is on the right) */
	.jmg-split { grid-template-columns: 2fr 3fr; gap: clamp(3rem, 6vw, 6rem); }
	.jmg-split.is-flipped { grid-template-columns: 3fr 2fr; }
	.jmg-split .jmg-split__media { max-width: 460px; }
	.jmg-split.is-third { grid-template-columns: 3fr 7fr; }
	.jmg-split.is-third .jmg-split__media { max-width: 360px; }
	.jmg-split.is-flipped > .jmg-split__media { order: 2; }
}
@media (max-width: 899px) {
	.jmg-split { gap: 2rem; }
	.jmg-split__media { max-width: min(72vw, 340px); }
	.jmg-split.is-third .jmg-split__media { max-width: min(52vw, 230px); }
}

/* ---------- Value tiles ---------- */

.jmg-tiles { display: grid; gap: 3rem 2rem; grid-template-columns: 1fr; text-align: center; }
@media (min-width: 560px) { .jmg-tiles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .jmg-tiles { grid-template-columns: repeat(4, 1fr); } }
* + .jmg-tiles { margin-top: var(--jmg-section) !important; }
.jmg-tile { display: grid; justify-items: center; gap: 1rem; align-content: start; }
.jmg-tile__icon { width: 80px; height: 80px; display: grid; place-items: center; background: var(--jmg-navy); color: #fff; -webkit-mask: var(--jmg-shape) center / contain no-repeat; mask: var(--jmg-shape) center / contain no-repeat; transition: transform .25s var(--jmg-ease); }
.jmg-tile:hover .jmg-tile__icon { transform: translateY(-3px); }
.jmg-tile__icon svg { width: 62px; height: 62px; }
.jmg-tile__title { margin: .5rem 0 0; font-size: 1rem; letter-spacing: .3em; text-transform: uppercase; color: var(--jmg-navy); }
.jmg-tile p { margin: 0; color: var(--jmg-blue-ink); max-width: 30ch; font-size: .9875rem; }
/* Left-aligned variant for longer value statements (Our Story) */
.jmg-tiles.is-style-left { text-align: left; gap: 3rem; }
@media (min-width: 1024px) { .jmg-tiles.is-style-left { grid-template-columns: repeat(2, 1fr); } }
.jmg-tiles.is-style-left .jmg-tile { justify-items: start; grid-template-columns: auto 1fr; column-gap: 1.5rem; }
.jmg-tiles.is-style-left .jmg-tile__icon { grid-row: span 2; }
.jmg-tiles.is-style-left .jmg-tile__title { letter-spacing: 0; text-transform: none; font-size: var(--wp--preset--font-size--x-large); margin: 0; }
.jmg-tiles.is-style-left .jmg-tile p { color: var(--jmg-ink); max-width: 60ch; font-size: 1rem; }
.jmg-tile__link { display: inline-flex; align-items: center; gap: .5rem; margin-top: .25rem; font-weight: 700; font-size: .9375rem; color: var(--jmg-navy); text-decoration: none; }
.jmg-tile__link:hover { text-decoration: underline; text-underline-offset: 4px; }
.jmg-tile__link .jmg-chev { width: .7rem; height: .7rem; transition: transform .3s var(--jmg-ease); }
.jmg-tile__link:hover .jmg-chev { transform: translateX(3px); }
.jmg-tiles.is-style-left .jmg-tile__link { grid-column: 2; }
/* Tiles on navy */
.is-style-navy .jmg-tile__icon { background: var(--jmg-blue); }
.is-style-navy .jmg-tile__title, .is-style-navy .jmg-tiles.is-style-left .jmg-tile__title { color: #fff; }
.is-style-navy .jmg-tile p, .is-style-navy .jmg-tiles.is-style-left .jmg-tile p { color: rgba(255,255,255,.82); }
.is-style-navy .jmg-tile__link { color: #fff; }
.is-style-navy .is-style-eyebrow.is-white { color: #fff; }
/* Statement: a single large sentence set on its own */
.jmg-statement { text-align: center; }
.jmg-statement .is-style-eyebrow { text-align: center; }
.jmg-statement__text { max-width: 30em !important; margin-inline: auto !important; font-size: clamp(1.375rem, 1rem + 1.5vw, 2.125rem) !important; font-weight: 300; line-height: 1.45; color: var(--jmg-navy); text-wrap: balance; }

/* ---------- Pull quote ---------- */

.jmg-quote { display: grid; gap: 2.5rem; align-items: center; margin: 0; }
* + .jmg-quote { margin-top: var(--jmg-section) !important; }
.jmg-quote__media { justify-self: center; width: 100%; max-width: 360px; }
.jmg-quote__text { margin: 0; display: grid; gap: 1.5rem; }
.jmg-quote__mark { display: block; width: clamp(52px, 2.5vw + 36px, 80px); height: auto; fill: var(--jmg-blue); }
.jmg-quote__lead { margin: 0; font-size: clamp(1.875rem, 1.2rem + 2.6vw, 3.25rem); line-height: 1.12; font-weight: 700; color: var(--jmg-navy); letter-spacing: -.01em; max-width: 20ch; text-wrap: balance; }
.jmg-quote__body { margin: 0; font-size: clamp(1.0625rem, 1rem + .3vw, 1.1875rem); line-height: 1.75; color: var(--jmg-ink); max-width: 62ch; }
.jmg-quote cite { display: flex; align-items: center; gap: .9rem; font-style: normal; font-size: .875rem; font-weight: 700; letter-spacing: .25em; text-transform: uppercase; color: var(--jmg-blue-ink); }
.jmg-quote cite::before { content: ""; width: 32px; height: 2px; background: var(--jmg-blue); flex: none; }
.jmg-mark { background-image: linear-gradient(transparent 58%, rgba(97,158,201,.42) 58%, rgba(97,158,201,.42) 92%, transparent 92%); background-repeat: no-repeat; background-size: 100% 100%; -webkit-box-decoration-break: clone; box-decoration-break: clone; transition: background-size 1.6s var(--jmg-soft) .6s; }
.js .jmg-reveal.is-pending .jmg-mark { background-size: 0% 100%; }
mark.jmg-mark { background-color: transparent; color: inherit; padding: 0 .08em; }
@media (min-width: 900px) { .jmg-quote { grid-template-columns: 3fr 7fr; gap: clamp(3rem, 6vw, 6rem); } }
@media (max-width: 899px) { .jmg-quote__media { max-width: min(52vw, 230px); } .jmg-quote__lead { max-width: none; } }

/* ---------- Stats ---------- */

.jmg-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 2rem; padding-block: 3rem; border-block: 1px solid rgba(255,255,255,.16); }
.is-style-navy .jmg-stats { margin-block: 3rem !important; }
.is-style-navy .jmg-stats:last-child { margin-bottom: 0 !important; }
.jmg-stat { display: grid; gap: .5rem; align-content: start; }
.jmg-stat p { margin: 0; }
.jmg-stat__num, .wp-block-group.is-style-navy .jmg-stat__num { font-size: clamp(2.75rem, 2rem + 3vw, 4.25rem); font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; color: #fff; }
.jmg-stat__num [data-count] { display: inline-block; white-space: nowrap; }
.jmg-stat__label { max-width: 24ch; color: rgba(255,255,255,.9); }
:not(.is-style-navy) > .jmg-stats { border-color: var(--jmg-line); }
:not(.is-style-navy) > .jmg-stats .jmg-stat__num { color: var(--jmg-navy); }
:not(.is-style-navy) > .jmg-stats .jmg-stat__label { color: var(--jmg-ink); }

/* ---------- Numbered steps: a process path ---------- */

.jmg-steps { --badge: 72px; list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 1.5rem; grid-template-columns: 1fr; counter-reset: jmg-step; }
* + .jmg-steps { margin-top: 3.5rem !important; }
/* The connecting line runs through the centre of the badges */
/* Phones: a short dotted line joins each badge to the next */
.jmg-step:not(:last-child)::after { content: ""; position: absolute; z-index: -1; left: calc(var(--badge) / 2 - 1px); top: var(--badge); bottom: -1.5rem; width: 2px; background: repeating-linear-gradient(to bottom, var(--jmg-blue) 0 8px, transparent 8px 14px); }
.jmg-step { counter-increment: jmg-step; position: relative; z-index: 1; display: grid; grid-template-columns: var(--badge) 1fr; column-gap: 1.25rem; align-items: start; }
.jmg-step::before { content: counter(jmg-step); grid-row: span 2; width: var(--badge); height: var(--badge); display: grid; place-items: center; background: var(--jmg-navy); color: #fff; font-size: 1.75rem; font-weight: 700; font-variant-numeric: tabular-nums; -webkit-mask: var(--jmg-shape) center / contain no-repeat; mask: var(--jmg-shape) center / contain no-repeat; transition: transform .25s var(--jmg-ease), background-color .25s var(--jmg-ease); }
.jmg-step__title { margin: 0; padding-top: 1.1rem; font-size: 1.1875rem; line-height: 1.3; color: var(--jmg-navy); }
.jmg-step p { margin: .6rem 0 0; color: var(--jmg-ink); }
.jmg-step:hover::before { transform: translateY(-3px); background: var(--jmg-blue-ink); }

@media (min-width: 1024px) {
	.jmg-steps { grid-template-columns: repeat(4, 1fr); gap: 2rem; }
	.jmg-step:not(:last-child)::after { display: none; }
	.jmg-steps::before { content: ""; position: absolute; z-index: 0; left: calc(var(--badge) / 2 + 1.75rem); right: calc((100% - 6rem) / 4 - var(--badge) / 2 - 1.75rem); top: calc(var(--badge) / 2); bottom: auto; width: auto; height: 2px; background: var(--jmg-blue); }
	.jmg-step { grid-template-columns: 1fr; grid-auto-rows: min-content; align-content: start; row-gap: 0; padding: 0 1.75rem 2rem; margin-top: 0; background: #fff; border-radius: var(--jmg-radius); box-shadow: 0 1px 0 var(--jmg-line), 0 12px 30px rgba(0,58,82,.07); transition: transform .3s var(--jmg-ease), box-shadow .3s var(--jmg-ease); }
	.jmg-step::before { grid-row: auto; margin-top: 0; }
	.jmg-step:hover { transform: translateY(-4px); box-shadow: 0 1px 0 var(--jmg-line), 0 20px 40px rgba(0,58,82,.12); }
	.jmg-step:hover::before { transform: none; }
	.jmg-step__title { padding-top: 1.5rem; }
	/* Badge sits on the card's top edge, above the line */
	.jmg-steps { padding-top: calc(var(--badge) / 2); }
	.jmg-steps::before { top: calc(var(--badge) / 2 + var(--badge) / 2); }
	.jmg-step::before { margin-top: calc(var(--badge) / -2); }
}
.is-style-navy .jmg-step__title { color: #fff; }
.is-style-navy .jmg-step p { color: rgba(255,255,255,.88); }
.is-style-navy .jmg-step::before { background: var(--jmg-blue); }
@media (min-width: 1024px) {
	.is-style-navy .jmg-step { background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
}
/* Intro text above the steps reads at a comfortable width */
.wp-block-group.is-style-mist > .wp-block-paragraph:not(.is-style-eyebrow) { max-width: 68ch; margin-left: max(0px, calc((100% - var(--jmg-wide)) / 2)) !important; margin-right: auto !important; }

/* ---------- Timeline ---------- */

.jmg-timeline { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 2.5rem; }
.jmg-timeline::before { content: ""; position: absolute; top: .4rem; bottom: .4rem; left: 5.25rem; width: 2px; background: var(--jmg-line); }
.jmg-timeline__item { display: grid; grid-template-columns: 4.5rem 1fr; gap: 2rem; position: relative; }
.jmg-timeline__item::before { content: ""; position: absolute; left: calc(5.25rem - 5px); top: .45rem; width: 12px; height: 12px; border-radius: 50%; background: var(--jmg-blue); box-shadow: 0 0 0 4px #fff; }
.jmg-timeline__year { margin: 0; font-size: 1.25rem; font-weight: 700; color: var(--jmg-blue-ink); font-variant-numeric: tabular-nums; }
.jmg-timeline__body { display: grid; gap: .75rem; padding-left: 1rem; min-width: 0; }
.jmg-timeline__body h3 { margin: 0; font-size: var(--wp--preset--font-size--x-large); }
.jmg-timeline__text p { margin: 0 0 .75rem; }
.jmg-timeline__img { display: block; width: 100%; max-width: 420px; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--jmg-radius); }
@media (min-width: 900px) {
	.jmg-timeline { gap: 0; }
	.jmg-timeline::before { left: 7.25rem; }
	.jmg-timeline__item { grid-template-columns: 6.5rem 1fr; padding-block: 2.5rem; }
	.jmg-timeline__item:first-child { padding-top: 0; }
	.jmg-timeline__item + .jmg-timeline__item .jmg-timeline__body { border-top: 1px solid var(--jmg-line); padding-top: 2.5rem; margin-top: -2.5rem; }
	.jmg-timeline__item::before { left: calc(7.25rem - 5px); top: .9rem; }
	.jmg-timeline__item + .jmg-timeline__item::before { top: 3.4rem; }
	.jmg-timeline__year { font-size: 2.25rem; font-weight: 300; line-height: 1.1; color: var(--jmg-navy); }
	.jmg-timeline__body { grid-template-columns: minmax(0, 1fr) minmax(0, 340px); column-gap: clamp(2rem, 4vw, 4rem); row-gap: .75rem; padding-left: 2rem; align-content: start; }
	.jmg-timeline__body > :not(.jmg-timeline__img) { grid-column: 1; }
	.jmg-timeline__img { grid-column: 2; grid-row: 1 / span 3; max-width: none; }
}

/* ---------- Videos ---------- */

.jmg-videos { display: grid; grid-template-columns: 1fr; gap: clamp(2.5rem, 2rem + 2vw, 3.5rem) clamp(1.5rem, 1rem + 2vw, 2.5rem); }
@media (min-width: 600px) { .jmg-videos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .jmg-videos.is-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .jmg-videos.is-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.wp-block-group[class*="is-style-"] > .jmg-videos { margin-top: 3rem; }
/* Row with arrows */
.jmg-videos.is-carousel { display: block; position: relative; }
.jmg-videos__track { --per: 1.15; display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - (var(--per) - 1) * 1.5rem) / var(--per)); gap: 1.5rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 0; overscroll-behavior-x: contain; scrollbar-width: none; padding-bottom: .5rem; }
.jmg-videos__track::-webkit-scrollbar { display: none; }
.jmg-videos__track:focus-visible { outline: 3px solid var(--jmg-blue); outline-offset: 6px; border-radius: 8px; }
.jmg-videos__track > .jmg-video { scroll-snap-align: start; }
@media (min-width: 600px) { .jmg-videos__track { --per: 2.1; } }
@media (min-width: 1024px) { .jmg-videos__track { --per: 3; gap: 2.25rem; grid-auto-columns: calc((100% - 2 * 2.25rem) / 3); } .jmg-videos.is-cols-4 .jmg-videos__track { grid-auto-columns: calc((100% - 3 * 2.25rem) / 4); } }
.jmg-videos__nav { display: flex; gap: .75rem; justify-content: flex-end; margin-top: 2rem; }
.jmg-videos__nav button { position: relative; width: 3rem; height: 3rem; border-radius: 50%; border: 1px solid var(--jmg-line); background: #fff; cursor: pointer; transition: background .35s var(--jmg-ease), border-color .35s var(--jmg-ease), opacity .35s var(--jmg-ease); }
.jmg-videos__nav button::before { content: ""; position: absolute; left: 50%; top: 50%; width: .6rem; height: .6rem; border-right: 2px solid var(--jmg-navy); border-bottom: 2px solid var(--jmg-navy); transform: translate(-65%, -50%) rotate(-45deg); }
.jmg-videos__prev::before { transform: translate(-35%, -50%) rotate(135deg) !important; }
.jmg-videos__nav button:hover:not(:disabled) { background: var(--jmg-navy); border-color: var(--jmg-navy); }
.jmg-videos__nav button:hover:not(:disabled)::before { border-color: #fff; }
.jmg-videos__nav button:disabled { opacity: .35; cursor: default; }
.jmg-videos__nav button:focus-visible { outline: 3px solid var(--jmg-blue); outline-offset: 2px; }
.is-style-mist .jmg-videos__nav button { background: #fff; }
.jmg-video { margin: 0; display: grid; gap: 1.1rem; align-content: start; }
.jmg-video__play { all: unset; box-sizing: border-box; position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 16px; background: var(--jmg-navy-deep); cursor: pointer; isolation: isolate; box-shadow: 0 18px 40px -24px rgba(0,42,60,.45); }
.jmg-video__play::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,58,82,0) 45%, rgba(0,58,82,.55) 100%); transition: opacity .5s var(--jmg-ease); }
.jmg-video__thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--jmg-ease); }
.jmg-video__play:hover .jmg-video__thumb { transform: scale(1.04); }
.jmg-video__icon { position: absolute; z-index: 1; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: rgba(255,255,255,.94); box-shadow: 0 10px 30px rgba(0,30,45,.3); transition: transform .45s var(--jmg-ease), background .45s var(--jmg-ease); }
.jmg-video__icon::before { content: ""; position: absolute; left: 50%; top: 50%; margin: -9px 0 0 -5px; border-style: solid; border-width: 9px 0 9px 15px; border-color: transparent transparent transparent var(--jmg-navy); transition: border-color .45s var(--jmg-ease); }
.jmg-video__play:hover .jmg-video__icon { transform: scale(1.08); background: var(--jmg-blue); }
.jmg-video__play:hover .jmg-video__icon::before { border-left-color: #fff; }
.jmg-video__play:focus-visible { outline: 3px solid var(--jmg-blue); outline-offset: 4px; }
.jmg-video__time { position: absolute; z-index: 1; right: .85rem; bottom: .85rem; padding: .25rem .55rem; border-radius: 6px; background: rgba(0,30,45,.72); color: #fff; font-size: .8125rem; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.jmg-video__empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 1rem; color: #fff; font-size: .875rem; text-align: center; }
.jmg-video__caption { display: grid; gap: .35rem; }
.jmg-video__caption > * { margin: 0; }
.jmg-video__label { font-size: .8125rem; letter-spacing: .16em; text-transform: uppercase; color: var(--jmg-blue-ink); }
.jmg-video__title { font-size: var(--wp--preset--font-size--medium); line-height: 1.3; color: var(--jmg-navy); }
.jmg-video__meta { font-size: .9375rem; color: var(--jmg-ink-soft); }
.jmg-video__quote { margin: .6rem 0 0 !important; padding: 0 0 0 1rem; border-left: 2px solid var(--jmg-blue); font-size: .9375rem; line-height: 1.65; color: var(--jmg-ink); }
.jmg-video__quote p { margin: 0; }
.jmg-video__quote p::before { content: "\201C"; } .jmg-video__quote p::after { content: "\201D"; }
.is-style-navy .jmg-video__label { color: var(--jmg-blue); }
.is-style-navy .jmg-video__title { color: #fff; }
.is-style-navy .jmg-video__meta { color: rgba(255,255,255,.75); }

/* Lightbox: one shared player for every video on the page. */
.jmg-lightbox { width: min(1100px, calc(100vw - 2rem)); max-width: none; max-height: none; padding: 0; border: 0; background: transparent; overflow: visible; opacity: 0; transform: scale(.97); transition: opacity .35s var(--jmg-ease), transform .45s var(--jmg-ease), overlay .45s allow-discrete, display .45s allow-discrete; }
.jmg-lightbox[open] { opacity: 1; transform: none; }
@starting-style { .jmg-lightbox[open] { opacity: 0; transform: scale(.97); } }
.jmg-lightbox::backdrop { background: rgba(0,26,38,.86); backdrop-filter: blur(6px); opacity: 0; transition: opacity .35s var(--jmg-ease), overlay .35s allow-discrete, display .35s allow-discrete; }
.jmg-lightbox[open]::backdrop { opacity: 1; }
@starting-style { .jmg-lightbox[open]::backdrop { opacity: 0; } }
.jmg-lightbox__frame { position: relative; aspect-ratio: 16 / 9; width: 100%; max-height: calc(100dvh - 7rem); border-radius: 14px; overflow: hidden; background: #000; box-shadow: 0 40px 100px -30px rgba(0,0,0,.6); }
.jmg-lightbox__frame iframe, .jmg-lightbox__frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.jmg-lightbox__close { position: absolute; right: 0; top: -3.5rem; width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 1px solid rgba(255,255,255,.35); background: transparent; cursor: pointer; }
.jmg-lightbox__close::before, .jmg-lightbox__close::after { content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 1.5px; background: #fff; transform: translate(-50%, -50%) rotate(45deg); }
.jmg-lightbox__close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.jmg-lightbox__close:hover { background: rgba(255,255,255,.12); }
.jmg-lightbox__close:focus-visible { outline: 3px solid var(--jmg-blue); outline-offset: 2px; }
html:has(.jmg-lightbox[open]) { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .jmg-lightbox, .jmg-lightbox::backdrop, .jmg-video__thumb, .jmg-video__icon { transition: none; } }

/* Closing call to action panel */
.jmg-cta-section { padding-top: 0 !important; }
.jmg-cta { position: relative; isolation: isolate; overflow: hidden; display: grid; gap: 1.25rem; justify-items: start; padding: clamp(2.25rem, 1.5rem + 4vw, 5rem); border-radius: clamp(20px, 2vw, 32px); background: linear-gradient(135deg, var(--jmg-navy) 0%, var(--jmg-navy-deep) 100%); color: #fff; box-shadow: 0 40px 80px -40px rgba(0,42,60,.6); }
.jmg-cta::before { content: ""; position: absolute; inset: 0; z-index: -1; background: url(../img/lines.svg) 100% 100% / 120% auto no-repeat; opacity: .14; }
.jmg-cta::after { content: ""; position: absolute; z-index: -1; width: 520px; height: 520px; right: -160px; top: -200px; border-radius: 50%; background: radial-gradient(closest-side, rgba(97,158,201,.35), rgba(97,158,201,0)); }
.jmg-cta > * { margin: 0 !important; }
.jmg-cta .wp-block-image { width: clamp(120px, 30vw, 160px); }
.jmg-cta .wp-block-image img { display: block; width: 100%; height: auto; }
.jmg-cta__name { font-size: .8125rem; letter-spacing: .16em; text-transform: uppercase; color: var(--jmg-blue); }
.jmg-cta h2 { max-width: 22ch; color: #fff; font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem); line-height: 1.15; }
.jmg-cta .is-style-lead { color: rgba(255,255,255,.85); }
.jmg-cta .wp-block-buttons { margin-top: .75rem !important; }
.jmg-cta .wp-block-button__link { background: #fff; border-color: #fff; color: var(--jmg-navy); }
.jmg-cta .wp-block-button__link:hover { background: var(--jmg-blue); border-color: var(--jmg-blue); color: #fff; }
.jmg-cta .wp-block-buttons { gap: .75rem 1rem; }
.jmg-cta .is-style-ghost .wp-block-button__link { background: transparent; border-color: rgba(255,255,255,.55); color: #fff; }
.jmg-cta .is-style-ghost .wp-block-button__link:hover { background: #fff; border-color: #fff; color: var(--jmg-navy); }
@media (min-width: 900px) {
	.jmg-cta { grid-template-columns: 1fr auto; column-gap: clamp(3rem, 6vw, 6rem); align-items: center; }
	.jmg-cta > :not(.wp-block-image) { grid-column: 1; }
	.jmg-cta .wp-block-image { grid-column: 2; grid-row: 1 / span 5; width: clamp(200px, 22vw, 300px); }
}

/* ---------- Contact page ---------- */

.jmg-contact-grid { display: grid; gap: clamp(2.5rem, 2rem + 3vw, 5rem); align-items: start; }
@media (min-width: 1024px) { .jmg-contact-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.jmg-contact-grid:not(:has(.jmg-form-card form, .jmg-form-card .gform_confirmation_wrapper)) { grid-template-columns: 1fr; }
.jmg-contact-grid > *, .jmg-contact-info > * { margin: 0 !important; }
.jmg-contact-info { display: grid; gap: 1.5rem; align-content: start; }
.jmg-contact-info h2 { font-size: var(--wp--preset--font-size--x-large); }
.jmg-contact-list { list-style: none; margin: 0 !important; padding: 0; display: grid; border-top: 1px solid var(--jmg-line); }
.jmg-contact-list li { margin: 0; border-bottom: 1px solid var(--jmg-line); }
.jmg-contact-list a { display: grid; grid-template-columns: 2.75rem 1fr auto; align-items: center; gap: 1.1rem; padding: 1.15rem 0; color: var(--jmg-navy); text-decoration: none; font-size: 1.0625rem; line-height: 1.5; }
.jmg-contact-list a::before { content: ""; width: 2.75rem; height: 2.75rem; background: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='white'%20stroke-width='1.8'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M12%2021s-7-6.2-7-11.5A7%207%200%200%201%2019%209.5C19%2014.8%2012%2021%2012%2021z'/%3E%3Ccircle%20cx='12'%20cy='9.5'%20r='2.5'/%3E%3C/svg%3E") center / 20px no-repeat, var(--jmg-navy); -webkit-mask: var(--jmg-shape) center / contain no-repeat; mask: var(--jmg-shape) center / contain no-repeat; transition: background-color .3s var(--jmg-ease); }
.jmg-contact-list a[href^="tel:"]::before { background: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='white'%20stroke-width='1.8'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M5%203.5h3.2l1.6%204.2-2.1%201.4a11%2011%200%200%200%205.2%205.2l1.4-2.1%204.2%201.6v3.2a2%202%200%200%201-2.2%202A16.5%2016.5%200%200%201%203%205.7a2%202%200%200%201%202-2.2z'/%3E%3C/svg%3E") center / 20px no-repeat, var(--jmg-navy); }
.jmg-contact-list a[href^="mailto:"]::before { background: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='white'%20stroke-width='1.8'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='3'%20y='5'%20width='18'%20height='14'%20rx='2'/%3E%3Cpath%20d='m3.5%206.5%208.5%206.5%208.5-6.5'/%3E%3C/svg%3E") center / 20px no-repeat, var(--jmg-navy); }
.jmg-contact-list a::after { content: ""; width: .5rem; height: .5rem; border-right: 2px solid var(--jmg-blue); border-top: 2px solid var(--jmg-blue); transform: rotate(45deg); margin-right: .35rem; transition: transform .3s var(--jmg-ease); }
.jmg-contact-list a:hover { color: var(--jmg-blue-ink); }
.jmg-contact-list a:hover::after { transform: translateX(3px) rotate(45deg); }
.jmg-map { margin: 0 !important; }
.jmg-map a { display: block; border-radius: 18px; overflow: hidden; box-shadow: 0 24px 50px -30px rgba(0,42,60,.5); }
.jmg-map img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; transition: transform .9s var(--jmg-ease); }
.jmg-map a:hover img { transform: scale(1.03); }
.jmg-form-card { padding: clamp(1.75rem, 1.25rem + 2.5vw, 3.25rem) !important; border-radius: 22px; background: #fff; border: 1px solid var(--jmg-line); box-shadow: 0 1px 2px rgba(0,58,82,.04), 0 30px 60px -36px rgba(0,58,82,.35); }
.jmg-form-card > * { margin: 0 !important; }
.jmg-form-card > * + * { margin-top: 1rem !important; }
.jmg-form-card h2 { font-size: var(--wp--preset--font-size--xx-large); }
.jmg-form-card:not(:has(form, .gform_confirmation_wrapper)) { display: none; }
.editor-styles-wrapper .jmg-form-card { display: block !important; }
.jmg-hero__lead strong { font-weight: 600; color: #fff; }

/* ---------- Forms (Gravity Forms, styled by the theme) ---------- */

.gform_wrapper { --f-border: #C9D6E0; --f-bg: #F7FAFC; --f-radius: 10px; margin-top: 1.75rem !important; }
.gform_wrapper .gform_heading, .gform_wrapper .gform_required_legend { display: none; }
.gform_wrapper form { margin: 0; }
.gform_wrapper .gform_fields { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1.5rem 1.25rem; margin: 0; padding: 0; list-style: none; border: 0; }
.gform_wrapper .gfield { grid-column: 1 / -1; min-width: 0; margin: 0; padding: 0; border: 0; }
@media (min-width: 640px) {
	.gform_wrapper .gfield--width-half, .gform_wrapper .gf_left_half, .gform_wrapper .gf_right_half { grid-column: span 6; }
	.gform_wrapper .gfield--width-third { grid-column: span 4; }
	.gform_wrapper .gfield--width-two-thirds { grid-column: span 8; }
	.gform_wrapper .gfield--width-quarter { grid-column: span 3; }
	.gform_wrapper .gfield--width-three-quarter { grid-column: span 9; }
}
.gform_wrapper .gfield_label, .gform_wrapper legend.gfield_label { display: block; margin: 0 0 .5rem; padding: 0; font-size: .9375rem; font-weight: 700; color: var(--jmg-navy); }
.gform_wrapper .gfield_required { margin-left: .2rem; color: var(--jmg-blue-ink); font-weight: 400; }
.gform_wrapper .gfield_required .gfield_required_text { font-size: .8125rem; }
.gform_wrapper .ginput_complex { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 1rem 1.25rem; }
.gform_wrapper .ginput_complex > span, .gform_wrapper .ginput_complex > div { display: flex; flex-direction: column-reverse; gap: .35rem; }
.gform_wrapper .gform-field-label--type-sub, .gform_wrapper .ginput_complex label { font-size: .8125rem; font-weight: 400; color: var(--jmg-ink-soft); }
.gform_wrapper input[type="text"], .gform_wrapper input[type="email"], .gform_wrapper input[type="tel"], .gform_wrapper input[type="url"], .gform_wrapper input[type="number"], .gform_wrapper input[type="date"], .gform_wrapper input[type="password"], .gform_wrapper select, .gform_wrapper textarea {
	box-sizing: border-box; display: block; width: 100%; min-height: 3.25rem; margin: 0; padding: .85rem 1rem; border: 1px solid var(--f-border); border-radius: var(--f-radius); background: var(--f-bg); color: var(--jmg-ink); font: inherit; font-size: 1rem; line-height: 1.4; transition: border-color .2s var(--jmg-ease), box-shadow .2s var(--jmg-ease), background .2s var(--jmg-ease); -webkit-appearance: none; appearance: none;
}
.gform_wrapper textarea { min-height: 9.5rem; resize: vertical; }
.gform_wrapper select { padding-right: 2.75rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 4.5 6 8.5 10 4.5' fill='none' stroke='%23004F6F' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; background-size: .8rem; }
.gform_wrapper input::placeholder, .gform_wrapper textarea::placeholder { color: #8A98A3; }
.gform_wrapper input:hover, .gform_wrapper select:hover, .gform_wrapper textarea:hover { border-color: var(--jmg-blue); }
.gform_wrapper input:focus, .gform_wrapper select:focus, .gform_wrapper textarea:focus { outline: none; border-color: var(--jmg-navy); background: #fff; box-shadow: 0 0 0 4px rgba(97,158,201,.28); }
.gform_wrapper .gfield_description, .gform_wrapper .gfield_consent_description { margin-top: .5rem; font-size: .8125rem; line-height: 1.6; color: var(--jmg-ink-soft); }
.gform_wrapper .gfield_checkbox, .gform_wrapper .gfield_radio { display: grid; gap: .65rem; }
.gform_wrapper .gchoice, .gform_wrapper .ginput_container_consent { display: flex; align-items: flex-start; gap: .75rem; }
.gform_wrapper .gchoice label, .gform_wrapper .ginput_container_consent label { font-size: .9375rem; line-height: 1.5; color: var(--jmg-ink); cursor: pointer; }
.gform_wrapper input[type="checkbox"], .gform_wrapper input[type="radio"] { flex: none; width: 1.25rem; height: 1.25rem; margin: .1rem 0 0; accent-color: var(--jmg-navy); cursor: pointer; }
.gform_wrapper .gform_footer, .gform_wrapper .gform_page_footer { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin: 2rem 0 0; padding: 0; }
.gform_wrapper .gform_button, .gform_wrapper .gform_next_button, .gform_wrapper .gform_previous_button, .gform_wrapper button[type="submit"] {
	display: inline-flex; align-items: center; gap: .65rem; min-height: 3.25rem; padding: .9rem 1.75rem; border: 1px solid var(--jmg-navy); border-radius: 8px; background: var(--jmg-navy); color: #fff; font: inherit; font-weight: 700; font-size: 1rem; cursor: pointer; transition: background .3s var(--jmg-ease), border-color .3s var(--jmg-ease), transform .3s var(--jmg-ease);
}
.gform_wrapper .gform_button:hover, .gform_wrapper button[type="submit"]:hover { background: var(--jmg-blue); border-color: var(--jmg-blue); }
.gform_wrapper .gform_button:active { transform: translateY(1px); }
.gform_wrapper .gform_button:focus-visible { outline: 3px solid var(--jmg-blue); outline-offset: 3px; }
.gform_wrapper .gform_previous_button { background: transparent; color: var(--jmg-navy); }
.gform_wrapper .gform_ajax_spinner { width: 1.25rem; height: 1.25rem; }
/* Errors */
.gform_wrapper .gform_validation_errors { margin: 0 0 1.5rem; padding: 1rem 1.25rem; border-radius: 10px; border: 1px solid #E8B4B4; background: #FDF4F4; color: #8A1F1F; }
.gform_wrapper .gform_validation_errors h2 { margin: 0; font-size: 1rem; color: inherit; }
.gform_wrapper .gfield_error input, .gform_wrapper .gfield_error select, .gform_wrapper .gfield_error textarea { border-color: #C0392B; background: #fff; }
.gform_wrapper .validation_message, .gform_wrapper .gfield_validation_message { margin-top: .5rem; font-size: .8125rem; color: #B03A2E; }
.gform_confirmation_message { padding: 1.5rem; border-radius: 14px; background: var(--jmg-mist); color: var(--jmg-navy); font-size: 1.0625rem; }
/* Hidden helpers: spam trap and hidden fields must never show. */
.gform_wrapper .gform_validation_container, .gform_wrapper .gfield--type-honeypot, .gform_wrapper .gform_hidden, .gform_wrapper .gfield_visibility_hidden, .gform_wrapper .gfield--type-hidden { display: none !important; }
.gform_wrapper .screen-reader-text, .gform_wrapper .hidden_label > .gfield_label, .gform_wrapper .hidden_sub_label { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Forms on navy */
.is-style-navy .gform_wrapper .gfield_label { color: #fff; }

/* ---------- Article extras ---------- */

.jmg-article-layout { display: grid; gap: 2.5rem; align-items: start; }
.jmg-article-layout > * { margin: 0 !important; }
.jmg-article-layout__media { max-width: min(78vw, 380px); }
.jmg-article-layout__media img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.jmg-article-layout__text > * { max-width: none !important; margin-left: 0 !important; margin-right: 0 !important; }
.jmg-article-layout__text > p:first-child { font-size: var(--wp--preset--font-size--lead); font-weight: 300; line-height: 1.55; color: var(--jmg-navy); }
@media (min-width: 900px) {
	.jmg-article-layout { grid-template-columns: minmax(0, 3fr) minmax(0, 7fr); column-gap: clamp(3rem, 6vw, 6rem); box-sizing: border-box; width: min(var(--jmg-wide, 1200px), calc(100vw - 4rem)); max-width: none !important; position: relative; left: 50%; transform: translateX(-50%); }
	.jmg-article-layout__media { position: sticky; top: 7.5rem; max-width: 460px; }
}
.jmg-article-layout__text .jmg-share { max-width: none !important; }
.jmg-article-back { margin-top: 1.5rem !important; }

.jmg-article-hero .is-style-eyebrow a { color: inherit; text-decoration: none; }
.jmg-article-hero .is-style-eyebrow a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.jmg-article-meta { gap: .5rem 1.25rem !important; align-items: center; color: var(--jmg-blue); font-size: .9375rem; letter-spacing: .08em; }
.jmg-article-meta > * { margin: 0 !important; }
.jmg-article-meta .jmg-reading-time { display: inline-flex; align-items: center; gap: 1.25rem; }
.jmg-article-meta .jmg-reading-time::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .7; }
.jmg-share { box-sizing: border-box; width: 100%; max-width: var(--wp--style--global--content-size, 760px) !important; margin-inline: auto !important; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 3rem !important; padding-block: 1.5rem; border-block: 1px solid var(--jmg-line); }
.jmg-share > p { margin: 0; }
.jmg-share__label { font-size: .8125rem; letter-spacing: .16em; text-transform: uppercase; color: var(--jmg-blue-ink); }
.jmg-share__list { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.jmg-share__list li { margin: 0; }
.jmg-share__btn { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0; border: 1px solid var(--jmg-line); border-radius: 50%; background: #fff; color: var(--jmg-navy); cursor: pointer; transition: background .3s var(--jmg-ease), color .3s var(--jmg-ease), border-color .3s var(--jmg-ease), transform .3s var(--jmg-ease); }
.jmg-share__btn svg { width: 18px; height: 18px; }
.jmg-share__btn:hover { background: var(--jmg-navy); border-color: var(--jmg-navy); color: #fff; transform: translateY(-2px); }
.jmg-share__btn:focus-visible { outline: 3px solid var(--jmg-blue); outline-offset: 2px; }
.jmg-share__copy.is-copied { background: var(--jmg-blue); border-color: var(--jmg-blue); color: #fff; }
.jmg-share__status { flex-basis: 100%; min-height: 0; font-size: .875rem; color: var(--jmg-blue-ink); }
.jmg-share__status:empty { display: none; }
.jmg-progress { position: fixed; z-index: 200; top: 0; left: 0; right: 0; height: 3px; background: var(--jmg-blue); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none; }
@media print { .jmg-share, .jmg-progress { display: none; } }

/* ---------- Location cards ---------- */

.jmg-locations { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 205px), 1fr)); gap: 1.25rem; margin-top: 3rem !important; }
.jmg-location { position: relative; display: grid; gap: .65rem; align-content: start; grid-template-rows: auto auto 1fr auto auto; padding: 1.75rem 1.5rem; border-radius: 18px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); color: #fff; transition: background .4s var(--jmg-ease), border-color .4s var(--jmg-ease), transform .4s var(--jmg-ease); }
.jmg-location:hover { background: rgba(255,255,255,.11); border-color: rgba(255,255,255,.3); transform: translateY(-4px); }
.jmg-location > * { margin: 0; }
.jmg-location__icon { display: grid; place-items: center; width: 3rem; height: 3rem; margin-bottom: .5rem; color: #fff; background: var(--jmg-blue); -webkit-mask: var(--jmg-shape) center / contain no-repeat; mask: var(--jmg-shape) center / contain no-repeat; }
.jmg-location__icon svg { width: 22px; height: 22px; }
.jmg-location__name { font-size: var(--wp--preset--font-size--x-large); line-height: 1.2; color: #fff; }
.jmg-location__name a { color: inherit; text-decoration: none; }
.jmg-location__name a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.jmg-location__name a:focus-visible { outline: none; }
.jmg-location:has(.jmg-location__name a:focus-visible) { outline: 3px solid var(--jmg-blue); outline-offset: 3px; }
.jmg-location__address { font-size: .875rem; line-height: 1.6; color: rgba(255,255,255,.72); }
.jmg-location__phone { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: .5rem; width: fit-content; font-size: .9375rem; color: #fff; text-decoration: none; }
.jmg-location__phone:hover { text-decoration: underline; text-underline-offset: 4px; }
.jmg-location__phone svg { width: 16px; height: 16px; color: var(--jmg-blue); }
.jmg-location__more { display: inline-flex; align-items: center; gap: .5rem; margin-top: .6rem !important; padding-top: .9rem; border-top: 1px solid rgba(255,255,255,.14); font-size: .875rem; font-weight: 700; color: #fff; }
.jmg-location:hover .jmg-location__more .jmg-chev { transform: translateX(3px); }
/* On light backgrounds */
:not(.is-style-navy) > .jmg-locations .jmg-location { background: #fff; border-color: var(--jmg-line); color: var(--jmg-ink); box-shadow: 0 18px 40px -30px rgba(0,58,82,.35); }
:not(.is-style-navy) > .jmg-locations .jmg-location__name, :not(.is-style-navy) > .jmg-locations .jmg-location__phone, :not(.is-style-navy) > .jmg-locations .jmg-location__more { color: var(--jmg-navy); }
:not(.is-style-navy) > .jmg-locations .jmg-location__address { color: var(--jmg-ink-soft); }
:not(.is-style-navy) > .jmg-locations .jmg-location__more { border-top-color: var(--jmg-line); }
.jmg-locations-foot { margin-top: 2.25rem !important; }
.jmg-locations > * { margin: 0 !important; }
@media (max-width: 599px) {
	.jmg-locations { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; padding-bottom: .5rem; margin-right: calc(-1 * var(--jmg-gutter)) !important; padding-right: var(--jmg-gutter); }
	.jmg-locations::-webkit-scrollbar { display: none; }
	.jmg-location { scroll-snap-align: start; }
	.jmg-location:hover { transform: none; }
}
.is-style-navy .jmg-link-arrow { color: #fff; }

/* ---------- Brand cards (businesses within the Group) ---------- */

.jmg-brands { display: grid; gap: 1.5rem; align-items: stretch; margin-top: 3rem !important; }
@media (min-width: 900px) { .jmg-brands { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; } }
/* Same look as the location cards: see-through panels on navy. */
.jmg-brand { display: grid; gap: 1.1rem; align-content: start; grid-template-rows: auto auto auto 1fr auto; height: 100%; box-sizing: border-box; padding: clamp(1.75rem, 1.25rem + 2vw, 2.5rem) !important; border-radius: 18px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); color: #fff; transition: background .4s var(--jmg-ease), border-color .4s var(--jmg-ease); }
.jmg-brand:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.28); }
.jmg-brand > * { margin: 0 !important; }
.jmg-brand__logo { display: flex; align-items: center; height: 96px; padding-bottom: 1.25rem; margin-bottom: .35rem !important; border-bottom: 1px solid rgba(255,255,255,.14); }
.jmg-brand__logo .wp-block-image { margin: 0; }
.jmg-brand__logo img { display: block; width: auto; max-width: 220px; max-height: 72px; object-fit: contain; }
.jmg-brand h3 { color: #fff !important; font-size: var(--wp--preset--font-size--x-large); }
.jmg-brand p { color: rgba(255,255,255,.8) !important; }
.jmg-brand .wp-block-list.is-style-ticks { gap: .65rem; font-size: .9375rem; color: rgba(255,255,255,.88); align-self: start; }
.jmg-brand .wp-block-buttons { margin-top: .75rem !important; }
.jmg-brand .wp-block-button__link { background: #fff; border-color: #fff; color: var(--jmg-navy); }
.jmg-brand .wp-block-button__link:hover { background: var(--jmg-blue); border-color: var(--jmg-blue); color: #fff; }
.jmg-brands > * { margin: 0 !important; }

/* ---------- Specialist page extras ---------- */

.jmg-split-logo { margin: 0 0 .5rem !important; }
.jmg-split-logo img { display: block; width: auto; height: auto; max-height: 64px; max-width: 240px; object-fit: contain; }
.jmg-split-badge { margin: .25rem 0 0 !important; }
.jmg-split-badge img { display: block; width: auto; max-width: 260px; height: auto; }
.jmg-facts { list-style: none; margin: .5rem 0 0 !important; padding: 1.25rem 0 0; display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; border-top: 1px solid var(--jmg-line); }
.jmg-facts li { margin: 0; display: grid; gap: .1rem; max-width: 18ch; font-size: .875rem; line-height: 1.45; color: var(--jmg-ink-soft); }
.jmg-facts strong { font-size: clamp(1.75rem, 1.4rem + 1vw, 2.25rem); font-weight: 300; line-height: 1.1; color: var(--jmg-navy); white-space: nowrap; }
.is-style-navy .jmg-facts { border-top-color: rgba(255,255,255,.16); }
.is-style-navy .jmg-facts li { color: rgba(255,255,255,.75); }
.is-style-navy .jmg-facts strong { color: #fff; }
.is-style-navy .wp-block-list.is-style-ticks { color: rgba(255,255,255,.88); }
.jmg-jump { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-top: 2rem !important; }
.jmg-jump a { display: inline-flex; align-items: center; padding: .6rem 1.1rem; border: 1px solid var(--jmg-line); border-radius: 999px; background: #fff; color: var(--jmg-navy); font-size: .875rem; font-weight: 700; text-decoration: none; transition: background .3s var(--jmg-ease), color .3s var(--jmg-ease), border-color .3s var(--jmg-ease); }
.jmg-jump a:hover { background: var(--jmg-navy); border-color: var(--jmg-navy); color: #fff; }
.jmg-statement p:not(.is-style-eyebrow) { margin-inline: auto !important; max-width: 62ch; }
.jmg-statement .wp-block-heading { text-align: center; }
html { scroll-padding-top: 6rem; }
/* Team cards on light backgrounds: soft blue-grey panels, navy text. */
.jmg-teams-light .jmg-brand { background: var(--jmg-mist); border-color: var(--jmg-line); color: var(--jmg-ink); }
.jmg-teams-light .jmg-brand:hover { background: #EAF1F6; border-color: #C9D6E0; }
.jmg-teams-light .jmg-brand h3 { color: var(--jmg-navy) !important; }
.jmg-teams-light .jmg-brand p:not(.is-style-eyebrow) { color: var(--jmg-ink) !important; }
.jmg-teams-light .jmg-brand .is-style-eyebrow { color: var(--jmg-blue-ink) !important; }
.jmg-teams-light .jmg-brand .wp-block-list.is-style-ticks { color: var(--jmg-ink); }
.jmg-teams-light .jmg-brand .wp-block-button__link { background: var(--jmg-navy); border-color: var(--jmg-navy); color: #fff; }
.jmg-teams-light .jmg-brand { grid-template-rows: auto auto auto 1fr auto; }

.jmg-brand .jmg-facts { border-top-color: rgba(255,255,255,.16); margin-top: auto !important; }
.jmg-brand .jmg-facts li { color: rgba(255,255,255,.75); }
.jmg-brand .jmg-facts strong { color: #fff; }
.is-style-navy .jmg-brand .is-style-eyebrow { color: var(--jmg-blue) !important; }
.jmg-brand { grid-template-rows: auto auto 1fr auto auto; }

/* ---------- Team ---------- */

/* Team: portrait grid; each card opens a profile panel. */
.jmg-team { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(3rem, 2rem + 4vw, 6rem) clamp(1.5rem, .75rem + 4vw, 5rem); }
@media (min-width: 1024px) { .jmg-team { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.jmg-member { position: relative; display: grid; gap: 1.25rem; align-content: start; }
.jmg-member__media { overflow: hidden; }
.jmg-member__media img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; transition: transform .9s var(--jmg-ease); }
.jmg-member:hover .jmg-member__media img { transform: scale(1.04); }
.jmg-member__body { display: grid; gap: .4rem; min-width: 0; }
.jmg-member__name { margin: 0; font-size: var(--wp--preset--font-size--x-large); line-height: 1.2; }
.jmg-member__open { all: unset; cursor: pointer; color: var(--jmg-navy); }
.jmg-member__open::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.jmg-member__open:focus-visible { outline: none; }
.jmg-member:has(.jmg-member__open:focus-visible) { outline: 3px solid var(--jmg-blue); outline-offset: 8px; border-radius: 12px; }
.jmg-member__role { margin: 0; font-size: .8125rem; line-height: 1.55; letter-spacing: .16em; text-transform: uppercase; color: var(--jmg-blue-ink); }
.jmg-member__cta { display: inline-flex; align-items: center; gap: .75rem; margin-top: .85rem; padding-top: .85rem; border-top: 1px solid var(--jmg-line); font-size: .875rem; font-weight: 700; color: var(--jmg-navy); }
.jmg-member__plus { position: relative; width: 1.75rem; height: 1.75rem; border-radius: 50%; border: 1px solid var(--jmg-line); margin-left: auto; transition: background .4s var(--jmg-ease), border-color .4s var(--jmg-ease); }
.jmg-member__plus::before, .jmg-member__plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 1.5px; background: var(--jmg-navy); transform: translate(-50%, -50%); transition: background .4s var(--jmg-ease); }
.jmg-member__plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.jmg-member:hover .jmg-member__plus { background: var(--jmg-navy); border-color: var(--jmg-navy); }
.jmg-member:hover .jmg-member__plus::before, .jmg-member:hover .jmg-member__plus::after { background: #fff; }
@media (max-width: 599px) { .jmg-team { grid-template-columns: 1fr; gap: 3.5rem; } .jmg-member { width: 100%; max-width: 320px; justify-self: center; } }
.jmg-member__contact { list-style: none; margin: 0; padding: 0; display: grid; gap: .65rem; }
.jmg-member__contact a { display: inline-flex; align-items: center; gap: .65rem; color: var(--jmg-navy); text-decoration: none; font-size: .9375rem; overflow-wrap: anywhere; }
.jmg-member__contact a:hover { color: var(--jmg-blue-ink); text-decoration: underline; text-underline-offset: 3px; }
.jmg-member__contact svg { width: 18px; height: 18px; flex: none; color: var(--jmg-blue); }

/* Profile panel: slides in from the right. */
.jmg-profile { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(560px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; padding: 0; border: 0; background: #fff; color: var(--jmg-ink); box-shadow: -30px 0 80px -30px rgba(0,30,45,.45); transform: translateX(100%); transition: transform .55s var(--jmg-ease), overlay .55s allow-discrete, display .55s allow-discrete; }
.jmg-profile[open] { transform: none; }
@starting-style { .jmg-profile[open] { transform: translateX(100%); } }
.jmg-profile::backdrop { background: rgba(0,42,60,.55); backdrop-filter: blur(4px); opacity: 0; transition: opacity .45s var(--jmg-ease), overlay .45s allow-discrete, display .45s allow-discrete; }
.jmg-profile[open]::backdrop { opacity: 1; }
@starting-style { .jmg-profile[open]::backdrop { opacity: 0; } }
.jmg-profile__panel { height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: clamp(4.5rem, 3rem + 4vw, 6rem) clamp(1.5rem, 1rem + 3vw, 3.5rem) 3rem; display: grid; gap: 1.75rem; align-content: start; }
.jmg-profile__close { position: absolute; top: 1.25rem; right: 1.25rem; width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 1px solid var(--jmg-line); background: #fff; cursor: pointer; transition: background .3s var(--jmg-ease); }
.jmg-profile__close::before, .jmg-profile__close::after { content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 1.5px; background: var(--jmg-navy); transform: translate(-50%, -50%) rotate(45deg); }
.jmg-profile__close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.jmg-profile__close:hover { background: var(--jmg-mist); }
.jmg-profile__close:focus-visible { outline: 3px solid var(--jmg-blue); outline-offset: 2px; }
.jmg-profile__top { display: grid; grid-template-columns: clamp(96px, 28vw, 140px) 1fr; gap: 1.5rem; align-items: center; }
.jmg-profile__media img { display: block; width: 100%; height: auto; }
.jmg-profile__name { margin: 0 0 .4rem; font-size: var(--wp--preset--font-size--xx-large); line-height: 1.15; color: var(--jmg-navy); }
.jmg-profile .jmg-member__contact { padding-block: 1.25rem; border-block: 1px solid var(--jmg-line); }
.jmg-profile__bio p { margin: 0 0 1.1rem; line-height: 1.7; }
html:has(.jmg-profile[open]) { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .jmg-profile, .jmg-profile::backdrop { transition: none; } .jmg-member__media img { transition: none; } }
/* Editor: show the card only. */
.editor-styles-wrapper .jmg-profile { display: none; }

/* ---------- News ---------- */

.jmg-news__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 3rem; }
.jmg-news__head h2 { margin: 0; }
.jmg-cards { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .jmg-cards { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; } }
@media (min-width: 1024px) { .jmg-cards { gap: 2rem; } }
.jmg-card { position: relative; display: grid; grid-template-rows: auto 1fr; background: #fff; border: 1px solid var(--jmg-line); border-radius: var(--jmg-radius); overflow: hidden; transition: transform .25s var(--jmg-ease), box-shadow .25s var(--jmg-ease); }
.jmg-card:hover { transform: translateY(-4px); box-shadow: 0 14px 32px rgba(0,58,82,.12); }
.jmg-card__img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--jmg-mist); }
.jmg-card__img img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.jmg-card__body { display: grid; gap: 1rem; padding: 1.5rem; align-content: start; grid-template-rows: auto auto 1fr auto; }
.jmg-card__title { margin: 0; font-size: 1.1875rem; line-height: 1.3; }
.jmg-card__title a { text-decoration: none; color: var(--jmg-navy); }
.jmg-card__title a::after { content: ""; position: absolute; inset: 0; }
.jmg-card time { display: flex; align-items: center; gap: .45rem; font-size: .875rem; color: var(--jmg-blue-ink); }
.jmg-card time svg { width: .9rem; height: .9rem; }
.jmg-card p { margin: 0; color: var(--jmg-ink-soft); font-size: .9625rem; }
.jmg-card__more { font-weight: 700; color: var(--jmg-navy); font-size: .9375rem; display: inline-flex; gap: .5rem; align-items: center; }
.jmg-card:hover .jmg-card__more .jmg-chev { transform: translateX(3px); }
@media (min-width: 700px) and (max-width: 1023px) { .jmg-card__body { padding: 1rem; } .jmg-card__title { font-size: 1.0625rem; } .jmg-card p { font-size: .9rem; } }
/* Newest article on the News page: a large card across the top. */
@media (min-width: 700px) {
	.jmg-card.is-featured { grid-column: 1 / -1; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); grid-template-rows: none; }
	.jmg-card.is-featured .jmg-card__img { aspect-ratio: auto; min-height: 100%; }
	.jmg-card.is-featured .jmg-card__img img { height: 100%; min-height: 360px; }
	.jmg-card.is-featured .jmg-card__body { padding: clamp(1.75rem, 1rem + 2.5vw, 3.25rem); gap: 1.25rem; align-content: center; grid-template-rows: none; }
	.jmg-card.is-featured .jmg-card__title { font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.125rem); line-height: 1.2; }
	.jmg-card.is-featured p { font-size: 1.0625rem; line-height: 1.65; }
}
.jmg-pagination { margin-top: 3rem; }
.jmg-pagination ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.jmg-pagination a, .jmg-pagination span { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 .9rem; border: 1px solid var(--jmg-line); border-radius: var(--jmg-radius); text-decoration: none; color: var(--jmg-navy); background: #fff; }
.jmg-pagination .current { background: var(--jmg-navy); border-color: var(--jmg-navy); color: #fff; }
.jmg-pagination a:hover { border-color: var(--jmg-navy); }

/* ---------- Company logo strap ---------- */

.jmg-logos { background: var(--jmg-blue); padding-block: clamp(2.5rem, 2rem + 2vw, 3.5rem); margin-block: 0; }
.jmg-logos ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; }
.jmg-logo + .jmg-logo { border-top: 1px solid rgba(255,255,255,.35); }
.jmg-logo a, .jmg-logo > span { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.25rem; color: #fff; text-decoration: none; }
.jmg-logo img { height: 42px; width: auto; max-width: calc(100% - 2rem); transition: transform .25s var(--jmg-ease); }
.jmg-logo .jmg-chev { width: .7rem; height: .7rem; opacity: .85; }
/* The JMG Insurance Brokers logo file has more empty space around it than the other two,
   so it is drawn about 20% taller to look the same size. */
.jmg-logo img[src*="JMGIB"] { height: 50px; }
.jmg-hero__logo img[src*="JMGIB"] { height: clamp(53px, 3.6vw + 36px, 77px); }
@media (min-width: 760px) {
	.jmg-logos ul { grid-template-columns: repeat(3, 1fr); }
	.jmg-logo + .jmg-logo { border-top: 0; border-left: 1px solid rgba(255,255,255,.35); }
	.jmg-logo a, .jmg-logo > span { justify-content: center; padding: .75rem 1rem; }
	.jmg-logo img { height: clamp(46px, 2vw + 22px, 60px); }
	.jmg-logo img[src*="JMGIB"] { height: clamp(55px, 2.4vw + 26px, 72px); }
	.jmg-logo a:hover img { transform: translateY(-3px); }
	.jmg-logo .jmg-chev { display: none; }
}

/* ---------- Single news article ---------- */

.jmg-article-hero .wp-block-post-title { color: #fff; font-size: clamp(2rem, 1.4rem + 2.4vw, 3.25rem); }
.jmg-article-hero .wp-block-post-date { color: var(--jmg-blue); font-size: .9375rem; letter-spacing: .08em; }
.jmg-article-hero { padding-top: clamp(8rem, 6rem + 6vw, 11rem) !important; }
.jmg-article-hero.has-media { position: relative; isolation: isolate; clip-path: inset(0); overflow: hidden; }
.jmg-article-hero.has-media > .jmg-hero__media { position: fixed; inset: 0; height: 100vh; height: 100lvh; z-index: -1; max-width: none !important; margin: 0 !important; }
.jmg-article-hero.has-media > *:not(.jmg-hero__media) { position: relative; }
.jmg-article .wp-block-post-featured-image img { border-radius: var(--jmg-radius); }
.jmg-article .wp-block-post-content { font-size: 1.0625rem; line-height: 1.75; }
.jmg-article .wp-block-post-content a { color: var(--jmg-blue-ink); }
.jmg-article .wp-block-post-content img { border-radius: var(--jmg-radius); height: auto; }
.jmg-back { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; text-decoration: none; color: var(--jmg-navy); }
.jmg-back .jmg-chev { transform: rotate(180deg); }

/* ---------- Footer ---------- */

.jmg-footer { position: relative; overflow: hidden; background: var(--jmg-navy-deep); color: rgba(255,255,255,.82); font-size: .9375rem; font-weight: 300; padding-block: clamp(4rem, 3rem + 4vw, 6rem) 2rem; margin-block: 0; }
.jmg-footer::before { content: ""; position: absolute; inset: 0; background: var(--jmg-lines) 40% 30% / cover no-repeat; opacity: .09; filter: brightness(3); pointer-events: none; }
.jmg-footer > * { position: relative; }
.jmg-footer p { margin: 0; }
.jmg-footer a { color: #fff; text-decoration: none; transition: color .2s var(--jmg-ease); font-weight: 300; }
.jmg-footer a:hover { color: var(--jmg-blue); }
.jmg-footer .jmg-foot-grid { display: grid; gap: 3rem; }
@media (min-width: 640px) { .jmg-footer .jmg-foot-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .jmg-footer .jmg-foot-grid { grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 2rem; } }
.jmg-footer .jmg-foot-grid > * { display: grid; gap: 1rem; align-content: start; margin: 0; }
.jmg-foot-label { font-size: .75rem !important; font-weight: 400; letter-spacing: .22em; text-transform: uppercase; color: var(--jmg-blue); padding-bottom: .85rem; border-bottom: 1px solid rgba(255,255,255,.14); }
.jmg-menu { display: grid; gap: 1rem; }
.jmg-menu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.jmg-footer .jmg-site-logo img { width: 170px; }
.jmg-foot-phone { font-size: 1.375rem !important; letter-spacing: .01em; }
.jmg-foot-mail { word-break: break-word; }
.jmg-footer .wp-block-social-links { gap: .75rem; margin: 0; }
.jmg-footer .wp-block-social-links .wp-social-link { background: transparent !important; color: #fff !important; border: 1px solid rgba(255,255,255,.28); transition: background-color .2s var(--jmg-ease), border-color .2s var(--jmg-ease); }
.jmg-footer .wp-block-social-links .wp-social-link:hover { background: var(--jmg-blue) !important; border-color: var(--jmg-blue); transform: none; }
.jmg-footer .wp-block-social-links .wp-social-link a { padding: .7rem; }
.jmg-foot-legal { margin-top: clamp(3rem, 2rem + 3vw, 4.5rem) !important; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,.14); display: grid; gap: 1.5rem; font-size: .8125rem; line-height: 1.7; color: rgba(255,255,255,.66); }
.jmg-foot-legal p { max-width: 120ch; font-weight: 300; font-size: .78rem; line-height: 1.75; color: rgba(255,255,255,.55); letter-spacing: .01em; }
/* Bottom row: copyright and legal links on one line, back to top on the right. */
.jmg-foot-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 2rem; }
.jmg-foot-bottom > *, .jmg-foot-links > *, .jmg-foot-links .jmg-menu > * { margin: 0 !important; }
.jmg-foot-links { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 2.5rem; }
.jmg-copyright { font-size: .8125rem; line-height: 1.5; color: rgba(255,255,255,.55); }
.jmg-foot-bottom .jmg-menu { display: block; }
.jmg-foot-bottom .jmg-menu ul { display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; }
.jmg-foot-bottom .jmg-menu li { margin: 0; }
.jmg-foot-bottom .jmg-menu a { font-size: .8125rem; line-height: 1.5; color: rgba(255,255,255,.75); text-decoration: none; transition: color .25s var(--jmg-ease); }
.jmg-foot-bottom .jmg-menu a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 599px) {
	.jmg-foot-bottom { display: grid; gap: 1.5rem; }
	.jmg-foot-links { display: grid; gap: 1rem; }
	.jmg-foot-bottom .jmg-menu ul { display: grid; grid-template-columns: repeat(2, max-content); gap: .75rem 2.5rem; }
	.jmg-to-top { display: flex; padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,.12); }
}
.jmg-to-top { display: inline-flex; align-items: center; gap: .55rem; color: #fff; font-weight: 400 !important; font-size: .8125rem; letter-spacing: .12em; text-transform: uppercase; }
.jmg-to-top .jmg-chev { transform: rotate(-90deg); }

/* ---------- Motion ---------- */

.js .jmg-reveal { transition: opacity 1.1s var(--jmg-soft), transform 1.3s var(--jmg-soft); }
.js .jmg-reveal.is-pending { opacity: 0; transform: translateY(24px); }
.js .jmg-reveal-img { transition: opacity 1.4s var(--jmg-soft), transform 1.8s var(--jmg-soft); }
.js .jmg-reveal-img.is-pending { opacity: 0; transform: scale(.97); }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.js .jmg-reveal.is-pending, .js .jmg-reveal-img.is-pending { opacity: 1; transform: none; }
	.js .jmg-reveal.is-pending .jmg-mark { background-size: 100% 100%; }
	*, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---------- Editor tweaks ---------- */

.editor-styles-wrapper .jmg-header { position: relative; }
.editor-styles-wrapper .wp-block-group.is-style-textured::before { position: absolute; }
.editor-styles-wrapper .jmg-reveal.is-pending { opacity: 1; transform: none; }
.editor-styles-wrapper .jmg-btn:has([data-rich-text-placeholder]) { background: transparent; border-style: dashed; opacity: .6; }

/* Footer link arrows (CSS so editors can edit the links as plain text) */
.jmg-foot-find a, .jmg-to-top a, .jmg-back { display: inline-flex; align-items: center; gap: .5rem; }
.jmg-foot-find a { font-weight: 400 !important; }
.jmg-to-top a { color: #fff; font-weight: 400 !important; font-size: .8125rem; letter-spacing: .12em; text-transform: uppercase; }
.jmg-foot-find a::after, .jmg-to-top a::after, .jmg-back::before {
	content: ""; width: .6rem; height: .6rem; background: currentColor; flex: none; transition: transform .2s var(--jmg-ease);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M4 1.5 8.5 6 4 10.5' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M4 1.5 8.5 6 4 10.5' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
}
.jmg-foot-find a:hover::after { transform: translateX(3px); }
.jmg-to-top a::after { transform: rotate(-90deg); }
.jmg-back::before { transform: rotate(180deg); }
.jmg-foot-address { line-height: 1.7; }
.jmg-footer-part, .jmg-header-part { margin: 0 !important; }
.wp-site-blocks > * + * { margin-block-start: 0; }
.jmg-main > .wp-block-post-content > :first-child { margin-top: 0; }
.jmg-main > .wp-block-post-content > .alignfull + .alignfull { margin-top: 0; }
.jmg-article-hero { padding-bottom: clamp(3rem, 2rem + 3vw, 4.5rem) !important; }
.jmg-article-hero .wp-block-post-title, .jmg-article-hero .wp-block-query-title { color: #fff !important; margin-top: .75rem; }
.jmg-article > * + * { margin-top: 2.5rem; }
.jmg-article .wp-block-post-featured-image { max-width: 960px; }

/* ---------- Page-specific pieces ---------- */

/* Curved image style for the Image block */
.wp-block-image.is-style-pillow img { aspect-ratio: 1 / 1; object-fit: cover; -webkit-mask: var(--jmg-shape) center / contain no-repeat; mask: var(--jmg-shape) center / contain no-repeat; }

/* Sell To Us: contact card beside the text */
.jmg-sell-columns { gap: clamp(2rem, 5vw, 5rem) !important; align-items: center !important; }
.jmg-contact-card { position: relative; isolation: isolate; overflow: hidden; display: grid; gap: 1.1rem; justify-items: start; max-width: 460px; margin-inline: auto; padding: clamp(2rem, 1.5rem + 2vw, 3rem) !important; border: 0 !important; border-radius: 22px !important; background: linear-gradient(150deg, var(--jmg-navy) 0%, var(--jmg-navy-deep) 100%) !important; color: #fff; box-shadow: 0 30px 60px -28px rgba(0,42,60,.55) !important; }
.jmg-contact-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: url(../img/lines.svg) 100% 100% / 160% auto no-repeat; opacity: .14; }
.jmg-contact-card > * { margin: 0 !important; }
.jmg-contact-card .wp-block-image { width: 128px; margin-bottom: .4rem !important; }
.jmg-contact-card .is-style-eyebrow { text-transform: none; letter-spacing: .02em; font-size: .9375rem; font-weight: 400; color: var(--jmg-blue); }
.jmg-contact-card h3 { font-size: clamp(1.5rem, 1.2rem + 1vw, 1.875rem); line-height: 1.2; color: #fff; }
.jmg-contact-card .wp-block-buttons { margin-top: .6rem !important; }
.jmg-contact-card .wp-block-button__link { background: #fff; border-color: #fff; color: var(--jmg-navy); }
.jmg-contact-card .wp-block-button__link:hover { background: var(--jmg-blue); border-color: var(--jmg-blue); color: #fff; }

/* Careers: cards inside the navy band */
.is-style-navy .jmg-card-columns { margin-top: 3rem !important; gap: 2rem !important; }
.is-style-navy .is-style-card { color: var(--jmg-ink); border: 0; display: grid; gap: 1rem; align-content: start; height: 100%; }
.is-style-navy .is-style-card > * { margin: 0 !important; }
.is-style-navy .is-style-card h3 { color: var(--jmg-navy); }
.is-style-navy .is-style-card p { font-weight: 400; }
.jmg-card-icon img { width: 64px; height: auto; }

/* Contact */
.jmg-contact-line { font-size: 1.25rem; font-weight: 300; }
.jmg-contact-line a { text-decoration: none; }
.jmg-map img { border-radius: var(--jmg-radius); box-shadow: 0 14px 32px rgba(0,58,82,.12); }

/* Regulations: one block per company, linkable by #anchor */
.jmg-reg { scroll-margin-top: 90px; padding-block: 2.5rem !important; border-top: 1px solid var(--jmg-line); }
.jmg-reg + .jmg-reg { padding-top: 2.5rem !important; }
.jmg-reg-logo img { max-height: 56px; width: auto; }
.jmg-reg p { font-size: .9375rem; }

/* Timeline under the Our Story text */
.jmg-story-timeline { margin-top: var(--jmg-section) !important; }

/* Section rhythm for headings and intros at the top of a band */
.wp-block-group.is-style-textured > .wp-block-heading, .wp-block-group.is-style-mist > .wp-block-heading, .wp-block-group.is-style-navy > .wp-block-heading { margin-top: .5rem; }
.wp-block-group[class*="is-style-"] > .is-style-eyebrow { margin-bottom: 0; }
.wp-block-group[class*="is-style-"] > .wp-block-heading + .wp-block-paragraph { margin-top: 1.25rem; }
.wp-block-group[class*="is-style-"] > .jmg-steps, .wp-block-group[class*="is-style-"] > .jmg-team, .wp-block-group[class*="is-style-"] > .jmg-tiles.is-style-left { margin-top: 3rem; }
.wp-block-group.is-style-navy > .wp-block-columns { margin-top: 0; }
.wp-block-group.is-style-navy .is-style-lead { font-size: clamp(1.0625rem, .95rem + .45vw, 1.25rem); line-height: 1.6; }

/* Tables in policies scroll sideways on small screens instead of widening the page */
.jmg-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-block: 1.5rem; }
.jmg-table-scroll table { border-collapse: collapse; min-width: 560px; width: 100%; font-size: .9375rem; }
.jmg-table-scroll th, .jmg-table-scroll td { border: 1px solid var(--jmg-line); padding: .6rem .8rem; text-align: left; vertical-align: top; }
.jmg-table-scroll tr:first-child td, .jmg-table-scroll th { background: var(--jmg-mist); font-weight: 700; color: var(--jmg-navy); }
