/*
 * Dezign Format mega menus (Projects / Services), layout per client document 22.10.26.
 * MPD 2026-10. Scoped to .df-mm-v2 so the older Additional CSS rules stay valid for anything else.
 */

/* Shared */
.megamenu-main.df-mm-v2 {
	padding: 2.25rem 1rem 2rem;
}
.df-mm-v2 .df-mm-container {
	max-width: 1000px;
	width: 100%;
	margin: 0 auto;
	padding: 0 !important;
}
.df-mm-v2 .df-mm-heading,
.df-mm-v2 .df-mm-heading a {
	color: #ffffff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
	margin: 0 0 1rem;
	padding: 0;
}
.df-mm-v2 .df-mm-viewall-link {
	color: #ffffff !important;
	font-size: 14px;
	font-weight: 700;
	white-space: nowrap;
}
.df-mm-v2 .df-mm-viewall-link:hover,
.df-mm-v2 .df-mm-heading a:hover {
	text-decoration: underline;
}
.df-mm-v2 ul {
	list-style: none;
	margin: 0 !important;
	padding: 0;
}

/* Projects: featured slider + "View All" on one row */
.df-mm-v2 .df-mm-featured-row {
	display: flex;
	align-items: center;
	gap: 48px;
}
.df-mm-v2 .df-mm-featured {
	flex: 0 1 auto;
	min-width: 0;
}
.df-mm-v2 .df-mm-featured .row {
	margin: 0;
}
.df-mm-v2 .df-mm-featured .df-mm-swiper {
	padding-left: 0;
	padding-right: 28px;
}
.df-mm-v2 .df-mm-viewall {
	flex: 0 0 auto;
	margin-top: 1.75rem; /* centres the link on the cards, below the heading */
}

/* Projects: categories as one row under a thin rule */
.df-mm-v2 .df-mm-categories {
	display: flex;
	align-items: baseline;
	flex-wrap: nowrap;
	gap: 6px 24px;
	border-top: 1px solid #55514d;
	margin-top: 1.25rem;
	padding-top: 1rem;
}
.df-mm-v2 .df-mm-categories .df-mm-heading {
	margin: 0;
	white-space: nowrap;
}
.df-mm-v2 .df-mm-categories ul {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
}
.df-mm-v2 .df-mm-categories li {
	margin: 0;
	padding: 0;
	font-size: 13px;
}

/* Services: list on the left, steps on the right, thin divider between */
.df-mm-v2 .df-mm-services {
	display: flex;
	align-items: stretch;
}
.df-mm-v2 .df-mm-services-left {
	flex: 0 0 300px;
	display: flex;
	flex-direction: column;
	padding-right: 48px;
	border-right: 1px solid #55514d;
}
.df-mm-v2 .df-mm-service-links li {
	margin: 0;
	padding: 0;
	border-bottom: 1px solid #55514d;
}
.df-mm-v2 .df-mm-service-links a {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	padding: 10px 0;
	color: #ffffff;
	font-size: 13px;
}
.df-mm-v2 .df-mm-service-links .df-mm-arrow {
	font-size: 15px;
	line-height: 1;
	transition: transform 0.2s ease;
}
.df-mm-v2 .df-mm-service-links a:hover .df-mm-arrow {
	transform: translateX(4px);
}
.df-mm-v2 .df-mm-services-left .df-mm-viewall-link {
	margin-top: auto; /* aligns with the bottom of the right-hand content */
	padding-top: 1.5rem;
}
.df-mm-v2 .df-mm-services-right {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	justify-content: space-between; /* steps span the full height of the list, so the last step ends level with "View All" */
	gap: 22px;
	padding-left: 48px;
	padding-top: 2.4rem; /* first step lines up with the first service link */
}
.df-mm-v2 .df-mm-step {
	display: flex;
	align-items: flex-start;
	gap: 20px;
}
.df-mm-v2 .df-mm-step-icon {
	flex: 0 0 40px;
}
.df-mm-v2 .df-mm-step-icon img {
	display: block;
	width: 40px;
	height: 40px;
	object-fit: contain;
}
.df-mm-v2 .df-mm-step-text .headh5p {
	color: #ffffff;
	font-size: 14px;
	font-weight: 700;
	margin: 0 0 4px;
	padding: 0;
}
.df-mm-v2 .df-mm-step-desc,
.df-mm-v2 .df-mm-step-desc p {
	color: #d6d6d6;
	font-size: 13px;
	line-height: 1.55;
	margin: 0;
	padding: 0;
}

@media (max-width: 1199px) {
	.df-mm-v2 .swiper {
		width: min(765px, calc(100vw - 260px)) !important; /* older rule fixed it at 500px below 1200px */
	}
	.df-mm-v2 .df-mm-featured-row {
		gap: 32px;
	}
	.df-mm-v2 .df-mm-services-left {
		flex-basis: 260px;
		padding-right: 32px;
	}
	.df-mm-v2 .df-mm-services-right {
		padding-left: 32px;
	}
}

/* Revision round, client document 02.11.26 (MPD 2026-11-04) */

/* Both panels fit their content. The full-width element is still the hover area (the
   open/close script is unchanged), but it is transparent and the dark box moves inside it. */
.megamenu-main.df-mm-v2 {
	background: transparent;
	padding-left: 24px;
	padding-right: 24px;
}
.df-mm-v2 > .projects-menu {
	background: rgba(0, 0, 0, 0.8);
	width: fit-content;
	max-width: 100%;
	margin: 0 auto;
	padding: 28px 40px 26px;
}
.df-mm-v2 .df-mm-container {
	width: auto !important;
	max-width: none;
}
/* MPD 2026-11-12: out of the flow, so an open panel no longer stretches #header-outer. Once the
   page scrolls (or on a solid-header page), Salient paints #header-outer white, and that white
   filled the whole transparent hover area around the dark box. z-index auto keeps the nav bar
   (#top, z-index 9998) above the hover area, as before. */
#header-outer > .megamenu-main.df-mm-v2 {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	z-index: auto;
}

/* Projects: the arrow and "View All" sit on the middle of the 200px images */
.df-mm-v2 .df-mm-swiper {
	height: auto !important; /* the older rule fixed it at 350px, which left a large gap */
}
.df-mm-v2 .df-mm-swiper .swiper-button-next,
.df-mm-v2 .df-mm-swiper .swiper-button-prev {
	top: 100px !important; /* the Swiper 8 stylesheet centres on the whole card, titles included */
	margin-top: -22px !important;
	/* MPD 2026-11-12: the visible chevron is a 22px background image from Additional CSS, pinned
	   at "0 0" (top of the 44px button), so it sat 11px above the image centre. */
	background-position: 0 50% !important;
}
.df-mm-v2 .df-mm-featured-row {
	align-items: flex-start;
}
.df-mm-v2 .df-mm-viewall {
	margin-top: calc(36px + 100px - 0.7em); /* heading row + half the image - half the link */
	line-height: 1.4;
}

/* Projects: smaller gap, and the rule ends with the last category */
.df-mm-v2 .df-mm-featured .contact-txt p {
	margin-bottom: 0;
	padding-bottom: 0;
}
.df-mm-v2 .df-mm-categories {
	width: fit-content;
	max-width: 100%;
	margin-top: 22px;
}
@media (max-width: 1199px) {
	/* keeps the categories on one line at 1024px, so the rule still ends with the last one */
	.df-mm-v2 > .projects-menu {
		padding-left: 28px;
		padding-right: 28px;
	}
	.df-mm-v2 .df-mm-categories {
		gap: 6px 16px;
	}
	.df-mm-v2 .df-mm-categories ul {
		gap: 6px 12px;
	}
	.df-mm-v2 .df-mm-categories li {
		font-size: 12px;
	}
}

/* Services: lighter process steps so the category list leads */
.df-mm-v2 .df-mm-services-right {
	gap: 16px;
}
.df-mm-v2 .df-mm-step {
	gap: 14px;
}
.df-mm-v2 .df-mm-step-icon {
	flex: 0 0 28px;
	padding-top: 2px;
}
.df-mm-v2 .df-mm-step-icon img {
	width: 28px;
	height: 28px;
}
.df-mm-v2 .df-mm-step-text .headh5p {
	font-size: 13px;
	margin-bottom: 2px;
}
.df-mm-v2 .df-mm-step-desc,
.df-mm-v2 .df-mm-step-desc p {
	color: #bdbdbd;
	font-size: 12px;
	line-height: 1.5;
}

/* Services page, "Our Process" (client documents 22.10.26 appendix and 02.11.26).
   Each card: a fixed icon and title, then a native Salient Flip Box that holds only the
   points (front) and the description (back). The card toggles Salient's "flipped" state
   (script in functions.php), so only the lower part turns. */
.df-process-row .df-process-col > .vc_column-inner {
	border: 1px solid #e3ddd4;
	padding: 34px 20px 24px !important;
	text-align: center;
	height: 100%;
}
.df-process-row .df-process-col > .vc_column-inner:focus {
	outline: none;
}
.df-process-row .df-process-col > .vc_column-inner:focus-visible {
	outline: 2px solid #866d4b;
	outline-offset: 4px;
}
.df-process-row .nectar_icon_wrap {
	margin: 0 auto;
	text-align: center;
}
.df-process-row .df-process-title,
.df-process-row .df-process-title h4 {
	margin: 0;
	padding: 0;
}
.df-process-row .df-process-title h4 {
	color: #2b2b2b;
	font-size: 18px;
	font-weight: 400;
	line-height: 1.3;
	margin: 14px 0 10px;
}
.df-process-row .nectar-flip-box,
.df-process-row .nectar-flip-box .flip-box-front,
.df-process-row .nectar-flip-box .flip-box-back {
	height: 150px !important; /* the same on every card (Salient sizes each face itself); the longest description fits */
	min-height: 150px !important;
	background-color: transparent !important; /* the card is white; a white face would hide its border */
	border: 0;
	border-radius: 0;
	box-shadow: none;
}
.df-process-row .nectar-flip-box .inner {
	text-align: center;
	padding: 0 4px;
}
.df-process-row .nectar-flip-box p {
	color: #6e6e6e;
	font-size: 14px;
	line-height: 1.65;
	margin: 0;
	padding: 0;
}
/* No "pop": Salient lifts the text 60px towards the viewer and shrinks it while turning.
   The text also starts at the top, just under the title, on both faces. */
.df-process-row .nectar-flip-box .flip-box-front .inner,
.df-process-row .nectar-flip-box .flip-box-back .inner {
	top: 0 !important;
	-webkit-transform: none !important;
	transform: none !important;
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
}
.df-process-row .nectar-flip-box .flip-box-front,
.df-process-row .nectar-flip-box .flip-box-back {
	-webkit-transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
	transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
}
@media (prefers-reduced-motion: reduce) {
	.df-process-row .nectar-flip-box .flip-box-front,
	.df-process-row .nectar-flip-box .flip-box-back {
		-webkit-transition: none !important;
		transition: none !important;
	}
}
@media (min-width: 690px) and (max-width: 1199px) {
	/* Tablet: 2 x 2 instead of four narrow columns */
	.df-process-row .row_col_wrap_12 {
		flex-wrap: wrap;
	}
	.df-process-row .df-process-col {
		width: calc(50% - 15px) !important;
		flex: 0 0 calc(50% - 15px) !important;
		margin-bottom: 30px !important;
	}
}

/*
 * Project grids (2026-11-14): show the first two rows before the delayed portfolio JS runs.
 * AccelerateWP delays Salient's portfolio scripts until the first user input, and Salient hides
 * every animated card (opacity 0) until those scripts add .animated-in. Later rows keep the animation.
 */
.portfolio-items:not(.carousel) .col:nth-child(-n+6) .inner-wrap.animated {
	opacity: 1;
	transform: none;
	transition: none;
}
@media only screen and (min-width: 690px) and (max-width: 999px) {
	/* Before Isotope runs, Salient's tablet floats clear the even cards and leave card 1 alone */
	.portfolio-items:not(.carousel):not(.isotope-activated) > .col {
		clear: none;
	}
	.portfolio-items:not(.carousel):not(.isotope-activated) > .col:nth-child(2n+1) {
		clear: left;
	}
}
