/*
 * Site header and footer, matching the DeltaBridge AI Training design.
 * Palette: ink #0b1f33, navy #012b40 / #013954 / #024b78 / #14587f, accent #00cffe, teal #08779c / #0aa3cf,
 * button blue #005a81, WhatsApp green #128c3e, greys #e6ebf0 / #e1e8ee / #f8f9fb. Font: Montserrat.
 */

/* ---------- Page frame ---------- */
body { font-family: 'Montserrat', system-ui, sans-serif; color: #0b1f33; background: #ffffff; -webkit-font-smoothing: antialiased; }
.site-wrap { padding-top: 0; padding-bottom: 0; }

/* ---------- Header ---------- */
.dbh {
	position: sticky;
	top: 0;
	z-index: 100;
	background: #ffffff;
	border-bottom: 1px solid #e6ebf0;
	font-family: 'Montserrat', system-ui, sans-serif;
	color: #0b1f33;
}
body.admin-bar .dbh { top: 32px; }
.dbh__inner {
	max-width: 1240px;
	margin: 0 auto;
	padding: 14px 24px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}
.dbh__logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #024b78; }
.dbh__logo-img { display: block; height: 52px; width: auto; }
.dbh__wordmark { font-weight: 700; font-size: 20px; line-height: 1; letter-spacing: -0.3px; }

.dbh__nav .dbh__menu { display: flex; flex-wrap: wrap; gap: 28px; margin: 0; padding: 0; list-style: none; font-size: 14px; font-weight: 600; white-space: nowrap; }
.dbh__nav .dbh__menu a { color: #0b1f33; text-decoration: none; letter-spacing: 0; transition: color 0.15s; }
.dbh__nav .dbh__menu a:hover, .dbh__nav .dbh__menu .current-menu-item > a { color: #08779c; }
.dbh__nav .dbh__menu li { position: relative; }
.dbh__nav .dbh__menu a:not([href]), .dbf__menu a:not([href]) { cursor: default; }

/* Dropdown (items nested under a menu item in Appearance > Menus) */
.dbh__nav .menu-item-has-children { padding: 10px 0; margin: -10px 0; }
.dbh__nav .sub-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: -14px;
	min-width: 270px;
	margin: 0;
	padding: 8px;
	list-style: none;
	flex-direction: column;
	gap: 2px;
	white-space: normal;
	background: #ffffff;
	border: 1px solid #e1e8ee;
	border-radius: 12px;
	box-shadow: 0 18px 40px rgba(2, 75, 120, 0.16);
	z-index: 20;
}
.dbh__nav .menu-item-has-children:hover > .sub-menu,
.dbh__nav .menu-item-has-children:focus-within > .sub-menu { display: flex; }
.dbh__nav .sub-menu a { display: block; padding: 10px 14px; border-radius: 8px; font-size: 14px; font-weight: 600; }
.dbh__nav .sub-menu a:hover { background: #f8f9fb; color: #024b78; }

/* Desktop dropdown: a wide two-column panel that fades in, with a pointer, an accent bar and an arrow on hover */
@media (min-width: 821px) {
	.dbh__nav .dbh__menu > .menu-item-has-children > a::after {
		content: "";
		display: inline-block;
		width: 6px;
		height: 6px;
		margin: 0 0 3px 8px;
		border-right: 2px solid currentColor;
		border-bottom: 2px solid currentColor;
		transform: rotate(45deg);
		transition: transform 0.2s;
	}
	.dbh__nav .dbh__menu > .menu-item-has-children:hover > a::after,
	.dbh__nav .dbh__menu > .menu-item-has-children:focus-within > a::after { transform: rotate(-135deg) translate(-2px, -2px); }

	.dbh__nav .dbh__menu > .menu-item-has-children > .sub-menu {
		display: grid;
		grid-template-columns: repeat(2, minmax(250px, 1fr));
		gap: 4px 8px;
		width: 760px;
		min-width: 0;
		left: -24px;
		margin-top: 6px;
		padding: 14px;
		border: 1px solid #e6ebf0;
		border-radius: 16px;
		box-shadow: 0 24px 60px rgba(1, 43, 64, 0.18), 0 2px 6px rgba(1, 43, 64, 0.06);
		opacity: 0;
		visibility: hidden;
		transform-origin: 44px 0;
		transform: translateY(-6px) scale(0.98);
		transition: opacity 0.22s ease, transform 0.32s cubic-bezier(0.32, 0.72, 0, 1), visibility 0s linear 0.32s;
	}
	.dbh__nav .dbh__menu > .menu-item-has-children:hover > .sub-menu,
	.dbh__nav .dbh__menu > .menu-item-has-children:focus-within > .sub-menu {
		opacity: 1;
		visibility: visible;
		transform: none;
		transition-delay: 0s;
	}
	/* pointer towards the parent item */
	.dbh__nav .dbh__menu > .menu-item-has-children > .sub-menu::before {
		content: "";
		position: absolute;
		top: -7px;
		left: 44px;
		width: 12px;
		height: 12px;
		background: #ffffff;
		border-top: 1px solid #e6ebf0;
		border-left: 1px solid #e6ebf0;
		transform: rotate(45deg);
	}
	.dbh__nav .dbh__menu > .menu-item-has-children > .sub-menu > li { display: flex; }
	.dbh__nav .sub-menu a {
		position: relative;
		display: grid;
		grid-template-columns: 48px 1fr;
		column-gap: 14px;
		align-items: center;
		align-content: center;
		width: 100%;
		padding: 12px 36px 12px 12px;
		border-radius: 14px;
		line-height: 1.3;
		transition: background-color 0.2s, transform 0.12s ease-out;
	}
	/* icon tile; the picture for each service is chosen by its page address below */
	.dbh__nav .sub-menu a::before {
		content: "";
		grid-row: 1 / span 2;
		width: 48px;
		height: 48px;
		border-radius: 12px;
		background: #f0f7fb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='%230aa3cf'%3E%3Crect x='5' y='12' width='3.4' height='7' rx='1.2'/%3E%3Crect x='10.3' y='8' width='3.4' height='11' rx='1.2'/%3E%3Crect x='15.6' y='4' width='3.4' height='15' rx='1.2'/%3E%3C/g%3E%3C/svg%3E") center / 26px no-repeat;
		transition: background-color 0.25s, transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
	}
	.dbh__nav .sub-menu a[href*="/fractional-cfo-and-advisory-services"]::before { background-image: url("../images/menu/menu-cfo.png"); }
	.dbh__nav .sub-menu a[href*="/outsourced-fp-a-and-accounting-services"]::before { background-image: url("../images/menu/menu-fpa.png"); }
	.dbh__nav .sub-menu a[href*="/outsourced-finance-talent"]::before { background-image: url("../images/menu/menu-talent.png"); }
	.dbh__nav .sub-menu a[href*="/deltabridge-cyber-security"]::before { background-image: url("../images/menu/menu-cyber.png"); }
	.dbh__nav .sub-menu a[href*="/data-analytics-bi-dashboards"]::before { background-image: url("../images/menu/menu-analytics.png"); }
	.dbh__nav .sub-menu a[href*="/erp-finance-technical-execution"]::before { background-image: url("../images/menu/menu-erp.png"); }
	.dbh__nav .sub-menu a[href*="/saudi-business-set-up"]::before { background-image: url("../images/menu/menu-saudi.png"); }
	.dbh__nav .sub-menu a::before { background-size: 34px; }
	.dbh__nav .sub-menu .dbh__sub-title { grid-column: 2; align-self: end; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; color: #0b1f33; }
	.dbh__nav .sub-menu .dbh__sub-desc { grid-column: 2; align-self: start; margin-top: 3px; font-size: 12.5px; font-weight: 400; line-height: 1.4; letter-spacing: 0.005em; color: #5b6b7a; white-space: normal; }
	.dbh__nav .sub-menu a:not(:has(.dbh__sub-desc)) .dbh__sub-title { grid-row: 1 / span 2; align-self: center; }
	.dbh__nav .sub-menu a::after {
		content: "\2192";
		position: absolute;
		right: 16px;
		top: 50%;
		color: #0aa3cf;
		opacity: 0;
		transform: translate(-6px, -50%);
		transition: opacity 0.2s, transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
	}
	.dbh__nav .sub-menu a:hover,
	.dbh__nav .sub-menu a:focus-visible { background: #f3fafd; }
	.dbh__nav .sub-menu a:hover .dbh__sub-title,
	.dbh__nav .sub-menu a:focus-visible .dbh__sub-title { color: #024b78; }
	.dbh__nav .sub-menu a:hover::before,
	.dbh__nav .sub-menu a:focus-visible::before { background-color: #dff0f8; transform: scale(1.06); }
	.dbh__nav .sub-menu a:hover::after,
	.dbh__nav .sub-menu a:focus-visible::after { opacity: 1; transform: translate(0, -50%); }
	/* instant press feedback */
	.dbh__nav .sub-menu a:active { transform: scale(0.98); background: #eaf5fa; }
}

@media (min-width: 821px) and (prefers-reduced-motion: reduce) {
	.dbh__nav .dbh__menu > .menu-item-has-children > .sub-menu { transform: none; transition: opacity 0.15s ease; }
	.dbh__nav .sub-menu a, .dbh__nav .sub-menu a::before, .dbh__nav .sub-menu a::after { transition: none; }
	.dbh__nav .sub-menu a:hover::before, .dbh__nav .sub-menu a:focus-visible::before, .dbh__nav .sub-menu a:active { transform: none; }
	.dbh__nav .dbh__menu > .menu-item-has-children > a::after { transition: none; }
}

@media (max-width: 820px) {
	.dbh__nav .sub-menu .dbh__sub-desc { display: none; }
}

.dbh__cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.dbh__cta a {
	display: inline-block;
	background: #005a81;
	color: #ffffff;
	text-decoration: none;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none;
	padding: 12px 26px;
	border-radius: 24px;
	transition: filter 0.15s;
}
.dbh__cta .menu-whatsapp { order: -1; }
.dbh__cta .menu-whatsapp a { background: #128c3e; padding: 12px 18px; border-radius: 8px; min-height: 20px; }
.dbh__cta a:hover { filter: brightness(1.12); color: #ffffff; }

.dbh__toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.dbh__toggle span { display: block; width: 24px; height: 2px; margin: 5px 0; background: #024b78; }

/* ---------- Footer ---------- */
.dbf { background: #012b40; color: #c3d6e2; font-family: 'Montserrat', system-ui, sans-serif; }
.dbf a { color: #c3d6e2; text-decoration: none; }
.dbf a:hover { color: #ffffff; }
.dbf__inner {
	max-width: 1240px;
	margin: 0 auto;
	padding: 56px 24px 32px;
	display: flex;
	flex-wrap: wrap;
	gap: 40px;
	justify-content: space-between;
}
.dbf__brand { flex: 1 1 220px; min-width: 0; }
.dbf .dbf__wordmark { display: block; margin-bottom: 14px; font-weight: 700; font-size: 20px; color: #ffffff; }
.dbf .dbf__wordmark:hover { color: #ffffff; }
.dbf .dbf__menu { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: 14px; }

/* The office blocks are footer columns of their own, next to the brand column. */
.dbf__locations, .dbf__locations .footer-widget, .dbf__locations .widget_block { display: contents; }
.dbf .footer-location { flex: 1 1 240px; min-width: 0; font-size: 14px; line-height: 1.7; }
.dbf .footer-location .footer-location__city { margin: 0 0 8px; font-family: inherit; font-size: 14px; font-weight: 700; line-height: 1.7; color: #ffffff; }
.dbf .footer-location .footer-location__address { margin: 0; font-size: 14px; line-height: 1.7; color: #c3d6e2; }

.dbf__bar {
	max-width: 1240px;
	margin: 0 auto;
	padding: 18px 24px 28px;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 12px;
	font-size: 12px;
	color: #9fb7c7;
}
.dbf__copy p, .dbf__copy .footer-widget { margin: 0; color: #9fb7c7; font-size: 12px; }
.dbf .dbf__legal { display: flex; flex-wrap: wrap; gap: 18px; margin: 0; padding: 0; list-style: none; }
.dbf .dbf__legal a { color: #9fb7c7; font-size: 12px; }
.dbf .dbf__legal a:hover { color: #ffffff; }

/* ---------- Small screens ---------- */
@media (max-width: 820px) {
	.dbh__toggle { display: block; order: 2; margin-left: auto; }
	.dbh__nav { display: none; order: 4; width: 100%; }
	.dbh__nav.is-open { display: block; }
	.dbh__nav .dbh__menu { flex-direction: column; gap: 4px; white-space: normal; }
	.dbh__nav .dbh__menu > li > a { display: block; padding: 10px 0; }
	.dbh__nav .menu-item-has-children { padding: 0; margin: 0; }
	.dbh__nav .sub-menu { display: flex; position: static; min-width: 0; padding: 0 0 0 14px; border: 0; box-shadow: none; }
	.dbh__cta { order: 3; width: 100%; }
}
