/*
 * Embassy Freight — theme styles. Same design system as the PanMed Global
 * site (layout, type, spacing), in Embassy's navy and blue. Colours, fonts
 * and sizes come from theme.json.
 */

:root {
	--ef-navy: var(--wp--preset--color--navy);
	--ef-blue: var(--wp--preset--color--blue);
	--ef-sky: var(--wp--preset--color--sky);
	--ef-ink: var(--wp--preset--color--ink);
	--ef-mist: var(--wp--preset--color--mist);
	--ef-header-h: 128px;
}

html {
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

:where(h1, h2, h3, h4) {
	text-wrap: balance;
}

[id] {
	scroll-margin-top: calc(var(--ef-header-h) + 1rem);
}

:focus-visible {
	outline: 2px solid var(--ef-navy);
	outline-offset: 3px;
}

.has-navy-background-color :focus-visible,
.has-navy-deep-background-color :focus-visible,
.has-blue-background-color :focus-visible,
.wp-block-cover :focus-visible {
	outline-color: var(--wp--preset--color--white);
}

/* ---------- Sections ---------- */

.ef-section {
	padding-top: var(--wp--preset--spacing--70);
	padding-bottom: var(--wp--preset--spacing--70);
}

.wp-site-blocks > main,
.wp-site-blocks > footer {
	margin-block-start: 0;
}

.has-navy-background-color :where(h1, h2, h3, h4),
.has-navy-deep-background-color :where(h1, h2, h3, h4),
.has-blue-background-color :where(h1, h2, h3, h4) {
	color: var(--wp--preset--color--white);
}

.has-navy-background-color a:where(:not(.wp-element-button)),
.has-navy-deep-background-color a:where(:not(.wp-element-button)),
.wp-block-cover a:where(:not(.wp-element-button)) {
	color: inherit;
	text-decoration-color: var(--ef-sky);
	text-underline-offset: 0.2em;
}

.has-navy-background-color a:where(:not(.wp-element-button)):hover,
.has-navy-deep-background-color a:where(:not(.wp-element-button)):hover {
	color: var(--ef-sky);
}

.ef-center {
	text-align: center;
}

/* Body text: justified, like the PanMed site. */
.wp-block-post-content p:not([class*="has-text-align"]):not(.is-style-ef-eyebrow):not(.ef-strip__num):not(.ef-strip__label):not(.ef-card__num):not(.ef-stat__value):not(.ef-hero__lead):not(.ef-contact__address):not(.ef-contact__lines) {
	text-align: justify;
	hyphens: auto;
	-webkit-hyphens: auto;
}

/* ---------- Small label, rule, lists ---------- */

.is-style-ef-eyebrow {
	font-size: var(--wp--preset--font-size--label);
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--wp--preset--color--blue);
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 0.5rem;
}

.is-style-ef-eyebrow::before {
	content: "";
	flex: 0 0 1.75rem;
	height: 2px;
	background: var(--ef-blue);
}

hr.wp-block-separator.is-style-ef-rule {
	border: 0;
	height: 4px;
	width: 100% !important;
	max-width: none !important;
	background: linear-gradient(var(--ef-blue), var(--ef-blue)) left center / 3.5rem 4px no-repeat;
	opacity: 1;
	margin-top: 1.25rem;
	margin-bottom: 1.5rem;
}

.ef-center hr.is-style-ef-rule,
.has-text-align-center + hr.is-style-ef-rule {
	background-position: center;
}

.has-navy-background-color hr.is-style-ef-rule,
.wp-block-cover hr.is-style-ef-rule {
	background-image: linear-gradient(var(--ef-sky), var(--ef-sky));
}

.wp-block-cover.ef-contact hr.is-style-ef-rule {
	background-image: linear-gradient(#fff, #fff);
}

.is-style-ef-ticks,
.is-style-ef-countries {
	list-style: none;
	padding-left: 0 !important;
}

.is-style-ef-ticks li,
.is-style-ef-countries li {
	position: relative;
	padding-left: 1.4rem;
	margin-bottom: 0.45rem;
	break-inside: avoid;
}

.is-style-ef-ticks li::before,
.is-style-ef-countries li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.62em;
	width: 0.5rem;
	height: 0.5rem;
	background: var(--ef-blue);
}

.is-style-ef-countries {
	columns: 2;
	column-gap: 2rem;
	font-size: var(--wp--preset--font-size--large);
	font-weight: 500;
	color: var(--ef-ink);
}

.is-style-ef-countries li {
	padding-top: 0.35rem;
	padding-bottom: 0.35rem;
	margin-bottom: 0;
	border-bottom: 1px solid #dfe4ee;
}

.is-style-ef-countries li::before {
	top: 1.05em;
}

@media (min-width: 700px) {
	.is-style-ef-countries {
		columns: 3;
	}
}

@media (min-width: 1000px) {
	.is-style-ef-countries {
		columns: 4;
	}
}

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

.wp-element-button {
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
	border: 2px solid transparent;
}

.wp-block-button.is-style-ef-ghost .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--white);
	border-color: rgba(255, 255, 255, 0.75);
}

.wp-block-button.is-style-ef-ghost .wp-block-button__link:hover {
	background: var(--wp--preset--color--white);
	color: var(--ef-navy);
	border-color: var(--wp--preset--color--white);
}

.wp-block-button.is-style-ef-navy .wp-block-button__link {
	background: var(--ef-navy);
	color: var(--wp--preset--color--white);
}

.wp-block-button.is-style-ef-navy .wp-block-button__link:hover {
	background: var(--wp--preset--color--navy-mid);
}

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

.ef-site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--wp--preset--color--white);
	box-shadow: 0 1px 0 rgba(0, 33, 99, 0.08);
}

.admin-bar .ef-site-header {
	top: var(--wp-admin--admin-bar--height, 32px);
}

.ef-topbar p {
	margin: 0;
	letter-spacing: 0.06em;
}

.ef-topbar a {
	text-decoration: none;
	font-weight: 600;
}

.ef-topbar a:hover {
	color: var(--ef-sky);
}

.ef-topbar__sep {
	opacity: 0.45;
	margin: 0 0.5rem;
}

.ef-header__inner {
	min-height: 88px;
	padding-top: 0.6rem;
	padding-bottom: 0.6rem;
	transition: min-height 0.25s ease, padding 0.25s ease;
}

.ef-logo {
	margin: 0;
	flex-shrink: 0;
}

.ef-logo img {
	display: block;
	width: 46px;
	height: auto;
	transition: width 0.25s ease;
}

.ef-site-header.is-scrolled .ef-header__inner {
	min-height: 66px;
	padding-top: 0.3rem;
	padding-bottom: 0.3rem;
}

.ef-site-header.is-scrolled .ef-logo img {
	width: 40px !important;
}

/* Logo lockup, as on the PanMed site: mark, then the company name on one
   line with "Member Of PanMed Group" under it. The mark is as tall as both lines. */
.ef-brand {
	order: -1;
	gap: 0.7rem !important;
	flex-shrink: 0;
}

.ef-brand__text {
	gap: 0 !important;
}

.ef-brand__text p {
	margin: 0;
	white-space: nowrap;
	font-family: var(--wp--preset--font-family--brand);
	text-align: left !important;
}

.ef-brand__name {
	font-size: 1.3rem;
	font-weight: 600;
	line-height: 1;
	letter-spacing: -0.005em;
	color: var(--ef-navy);
}

.ef-brand__member {
	margin-top: 0.3rem !important;
	font-size: 0.75rem;
	font-weight: 500;
	line-height: 1.2;
	color: var(--wp--preset--color--grey);
}

.ef-header .wp-block-navigation-item__content {
	color: var(--ef-ink);
	text-decoration: none;
	padding: 0.5rem 0;
	box-shadow: inset 0 -3px 0 transparent;
	transition: box-shadow 0.2s ease, color 0.2s ease;
}

.ef-header .wp-block-navigation-item__content:hover {
	box-shadow: inset 0 -3px 0 var(--ef-blue);
}

.ef-header .ef-nav-cta > .wp-block-navigation-item__content {
	background: var(--ef-navy);
	color: var(--wp--preset--color--white);
	padding: 0.65rem 1.2rem;
	border-radius: 3px;
	box-shadow: none;
}

.ef-header .ef-nav-cta > .wp-block-navigation-item__content:hover {
	background: var(--ef-blue);
	color: var(--wp--preset--color--white);
}

.ef-nav-desktop {
	display: none !important;
}

/* The full menu needs about 1200px next to the logo; below that the menu button shows. */
@media (max-width: 1199px) {
	.ef-header__inner {
		min-height: 66px;
		padding-top: 0.5rem;
		padding-bottom: 0.5rem;
	}
	.ef-brand {
		gap: 0.6rem !important;
	}
	.ef-logo img,
	.ef-footer__logo img {
		width: 38px !important;
	}
	.ef-site-header.is-scrolled .ef-logo img {
		width: 34px !important;
	}
	.ef-brand__name {
		font-size: 0.9rem;
	}
	.ef-brand__member {
		font-size: 0.625rem;
	}
	.ef-site-header.is-scrolled .ef-topbar {
		display: none;
	}
}

@media (min-width: 1200px) {
	.ef-nav-desktop {
		display: flex !important;
	}
	.ef-nav-desktop .wp-block-navigation__container {
		gap: 1.35rem;
		align-items: center;
		flex-wrap: nowrap;
	}
	.ef-nav-desktop .wp-block-navigation-item__content {
		letter-spacing: 0.08em;
		white-space: nowrap;
	}
	.ef-nav-mobile {
		display: none !important;
	}
}

@media (max-width: 600px) {
	.ef-topbar .ef-social {
		display: none;
	}
}

/* Mobile menu */
.ef-nav-mobile .wp-block-navigation__responsive-container-open {
	width: 48px;
	height: 48px;
	justify-content: center;
	align-items: center;
	color: var(--ef-navy);
}

.ef-nav-mobile .wp-block-navigation__responsive-container-open svg,
.ef-nav-mobile .wp-block-navigation__responsive-container-close svg {
	width: 32px;
	height: 32px;
}

.ef-nav-mobile .wp-block-navigation__responsive-container.is-menu-open {
	padding: 1.5rem clamp(1rem, 6vw, 3rem);
}

.ef-nav-mobile .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	gap: 0.25rem;
	width: 100%;
}

.ef-nav-mobile .is-menu-open .wp-block-navigation-item {
	width: 100%;
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.ef-nav-mobile .is-menu-open .wp-block-navigation-item__content {
	display: block;
	width: 100%;
	padding: 0.9rem 0 !important;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.5rem;
	letter-spacing: 0.06em;
	color: var(--wp--preset--color--white) !important;
	text-decoration: none;
}

.ef-nav-mobile .is-menu-open .wp-block-navigation-item__content:hover {
	color: var(--ef-sky) !important;
}

/* ---------- Social icons ---------- */

.ef-social.wp-block-social-links {
	gap: 0.9rem;
	margin: 0;
}

.ef-social .wp-social-link {
	color: var(--wp--preset--color--white);
	background: none !important;
}

.ef-social .wp-social-link a {
	padding: 0 !important;
	color: inherit !important;
	fill: currentColor;
}

.ef-social .wp-social-link svg {
	width: 18px;
	height: 18px;
}

.ef-social .wp-social-link:hover {
	color: var(--ef-sky);
	transform: none;
}

.ef-social--footer {
	margin-top: 1.5rem !important;
}

.ef-social--footer .wp-social-link svg {
	width: 22px;
	height: 22px;
}

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

.wp-block-cover.ef-hero,
.wp-block-cover.ef-tech,
.wp-block-cover.ef-contact {
	padding-top: var(--wp--preset--spacing--70);
	padding-bottom: var(--wp--preset--spacing--70);
	padding-left: var(--wp--style--root--padding-left);
	padding-right: var(--wp--style--root--padding-right);
	align-items: center;
	overflow: hidden;
}

.ef-hero .wp-block-cover__inner-container,
.ef-tech .wp-block-cover__inner-container,
.ef-contact .wp-block-cover__inner-container {
	width: 100%;
	max-width: 1200px;
	margin-inline: auto;
}

.ef-hero__title {
	max-width: 18ch;
	font-size: clamp(2.5rem, 1.4rem + 4vw, 4.5rem) !important;
	margin-top: 0.5rem;
	margin-bottom: 1.25rem;
}

.ef-tech__text {
	color: rgba(255, 255, 255, 0.9);
	line-height: 1.55;
}

.ef-hero__lead {
	max-width: 44rem;
	color: rgba(255, 255, 255, 0.9);
	line-height: 1.55;
}

.wp-block-cover .wp-block-buttons {
	margin-top: 2rem;
	gap: 0.75rem;
}

@media (prefers-reduced-motion: no-preference) {
	.ef-hero .wp-block-cover__image-background {
		animation: ef-drift 24s ease-out both;
	}
	@keyframes ef-drift {
		from { transform: scale(1.12); }
		to { transform: scale(1); }
	}
}

/* ---------- Blue strip ---------- */

.ef-strip {
	padding-top: 1.5rem;
	padding-bottom: 1.5rem;
}

.ef-strip__grid {
	gap: 0.75rem 1.5rem !important;
}

.ef-strip__grid.is-layout-grid {
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

@media (min-width: 700px) {
	.ef-strip__grid.is-layout-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	}
}

@media (min-width: 1100px) {
	.ef-strip__grid.is-layout-grid {
		grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
	}
}

.ef-strip__item {
	border-left: 2px solid rgba(255, 255, 255, 0.35);
	padding-left: 1rem;
}

.ef-strip__item p {
	margin: 0;
	color: var(--wp--preset--color--white);
}

.ef-strip__num {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	font-size: var(--wp--preset--font-size--label);
	letter-spacing: 0.12em;
	opacity: 0.75;
}

.ef-strip__label {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	font-size: 1.05rem;
	line-height: 1.2;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

/* ---------- Statement band ---------- */

.ef-statement__title {
	font-size: var(--wp--preset--font-size--huge) !important;
	line-height: 1.02;
}

.ef-statement p {
	color: rgba(255, 255, 255, 0.85);
}

/* ---------- Split (text + photo) ---------- */

.ef-split {
	gap: var(--wp--preset--spacing--60) !important;
}

.ef-photo {
	position: relative;
	margin: 0;
}

.ef-photo img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	display: block;
}

.ef-photo::after {
	content: "";
	position: absolute;
	left: -14px;
	bottom: -14px;
	width: 38%;
	height: 38%;
	border-left: 4px solid var(--ef-blue);
	border-bottom: 4px solid var(--ef-blue);
	pointer-events: none;
}

.ef-photo--plain::after {
	display: none;
}

@media (max-width: 781px) {
	.ef-split--reverse {
		flex-direction: column-reverse;
	}
	.ef-photo::after {
		left: -8px;
		bottom: -8px;
	}
}

/* ---------- Cards ---------- */

.is-style-ef-card {
	border-top: 4px solid var(--ef-blue);
	padding: clamp(1.5rem, 3vw, 2.25rem);
	height: 100%;
	box-sizing: border-box;
}

.is-style-ef-card > :first-child {
	margin-top: 0;
}

.is-style-ef-card h3 {
	margin-top: 0.25rem;
	margin-bottom: 0.75rem;
}

.ef-card__num {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	font-size: 2.25rem;
	line-height: 1;
	color: #b9c5dc;
	margin: 0 0 0.75rem;
}

/* Service cards: photo on top, text below. */
.ef-services {
	gap: 1rem !important;
}

.is-style-ef-card.ef-service {
	padding: 0;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.ef-card__photo {
	margin: 0 !important;
	overflow: hidden;
}

.ef-card__photo img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.ef-service:hover .ef-card__photo img {
	transform: scale(1.04);
}

.ef-card__body {
	padding: clamp(1.5rem, 3vw, 2rem);
	margin-top: 0 !important;
}

.ef-card__body > p:last-child {
	margin-bottom: 0;
}

/* ---------- Heritage ---------- */

.ef-timeline {
	gap: 1rem !important;
	margin-top: var(--wp--preset--spacing--40) !important;
}

.ef-timeline .is-style-ef-eyebrow {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.75rem;
	font-weight: 700;
	letter-spacing: 0.06em;
}

.ef-heritage__photos {
	margin-top: var(--wp--preset--spacing--60) !important;
	gap: var(--wp--preset--spacing--40) !important;
}

/* ---------- Network ---------- */

.ef-network {
	background-color: var(--wp--preset--color--white);
}

.ef-network__lead,
.ef-network__text {
	text-align-last: center;
}

.ef-network__lead {
	color: var(--ef-ink);
	line-height: 1.5;
	font-weight: 500;
}

/* ---------- Numbers ---------- */

.ef-stats {
	gap: 2rem 1.75rem !important;
	margin-top: var(--wp--preset--spacing--40) !important;
	grid-template-columns: 1fr !important;
}

@media (min-width: 700px) {
	.ef-stats {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	}
}

.ef-stat {
	border-top: 2px solid var(--ef-navy);
	padding-top: 1.25rem;
}

.ef-stat__value {
	margin: 0;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	font-size: clamp(3rem, 2rem + 4vw, 4.5rem);
	line-height: 1;
	letter-spacing: 0.02em;
	color: var(--ef-blue);
	font-variant-numeric: tabular-nums;
}

.ef-stat__label {
	margin: 0.75rem 0 0;
}

/* ---------- Standards ---------- */

.ef-badges {
	gap: 1rem !important;
}

.ef-badge-card {
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #dfe4ee;
	border-top: 4px solid var(--ef-blue);
	min-height: 11rem;
}

.ef-badge {
	margin: 0 !important;
}

.ef-badge img {
	display: block;
	max-height: 7rem;
	width: auto;
	max-width: 100%;
	margin: 0 auto;
}

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

.ef-contact__address,
.ef-contact__lines {
	font-size: var(--wp--preset--font-size--large);
	font-weight: 500;
	letter-spacing: 0.04em;
	line-height: 1.6;
	color: var(--wp--preset--color--white);
}

.ef-contact a:where(:not(.wp-element-button)) {
	text-decoration: none;
}

.ef-contact a:where(:not(.wp-element-button)):hover {
	text-decoration: underline;
	text-decoration-color: #fff;
}

@media (min-width: 782px) {
	.ef-cta__buttons {
		justify-content: flex-end;
	}
}

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

.ef-footer p,
.ef-footer li {
	color: rgba(255, 255, 255, 0.82);
}

.ef-footer h3 {
	margin-top: 0;
}

.ef-footer__logo {
	margin: 0;
	flex-shrink: 0;
}

.ef-footer__logo img {
	display: block;
	width: 46px;
	height: auto;
}

.ef-brand--footer {
	order: 0;
	margin-bottom: 1.5rem;
}

.ef-footer .ef-brand--footer .ef-brand__name {
	color: var(--wp--preset--color--white);
}

.ef-footer .ef-brand--footer .ef-brand__member {
	color: rgba(255, 255, 255, 0.8);
}

.ef-footer__lines a {
	color: var(--wp--preset--color--white);
	text-decoration: none;
}

.ef-footer__lines a:hover {
	color: var(--ef-sky);
}

.ef-footer__nav .wp-block-navigation-item__content {
	color: rgba(255, 255, 255, 0.85);
	text-decoration: none;
	padding: 0.2rem 0;
}

.ef-footer__nav .wp-block-navigation-item__content:hover {
	color: var(--ef-sky);
}

.ef-footer-bottom p {
	margin: 0;
	opacity: 0.75;
}

/* ---------- Gentle fade-in as sections scroll into view ---------- */

@media (prefers-reduced-motion: no-preference) {
	.ef-js .ef-reveal {
		opacity: 0;
		transform: translateY(24px);
		transition: opacity 0.7s ease, transform 0.7s ease;
	}
	.ef-js .ef-reveal.is-visible {
		opacity: 1;
		transform: none;
	}
}
