/**
 * Services page styles.
 */

/* -------------------------------------------------------------------------- */
/* Shared accents                                                             */
/* -------------------------------------------------------------------------- */

.dit-title-accent,
.dit-section__title em {
	color: var(--dit-teal);
	font-style: normal;
}

.dit-eyebrow--center {
	justify-content: center;
	width: 100%;
}

.dit-section__title--center {
	margin-inline: auto;
	text-align: center;
	max-width: 22ch;
}

.dit-section__text--center {
	margin-inline: auto;
	text-align: center;
}

.dit-btn--ghost-light .wp-block-button__link {
	--dit-btn-glow: rgba(255, 255, 255, 0.22);
	background: transparent;
	border: 1.5px solid rgba(255, 255, 255, 0.85);
	color: var(--dit-white);
}

.dit-btn--ghost-light .wp-block-button__link:hover,
.dit-btn--ghost-light .wp-block-button__link:focus-visible {
	background: rgba(255, 255, 255, 0.14);
	border-color: var(--dit-white);
	color: var(--dit-white);
}

/* -------------------------------------------------------------------------- */
/* Hero                                                                       */
/* -------------------------------------------------------------------------- */

.dit-services-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	min-height: clamp(420px, 62vh, 580px);
	padding-block: clamp(3rem, 7vw, 5.25rem);
	background-color: #eef5f6;
	background-image: url("../assets/img/services-hero.png");
	background-repeat: no-repeat;
	background-position: center right;
	background-size: cover;
}

.dit-services-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background: linear-gradient(
		90deg,
		rgba(247, 251, 251, 0.97) 0%,
		rgba(247, 251, 251, 0.92) 36%,
		rgba(247, 251, 251, 0.55) 54%,
		rgba(247, 251, 251, 0.12) 70%,
		transparent 84%
	);
}

.dit-services-hero::after {
	content: "";
	position: absolute;
	right: -8%;
	bottom: -22%;
	width: min(50vw, 520px);
	height: min(32vw, 260px);
	background: var(--dit-teal);
	border-radius: 55% 45% 0 70% / 70% 40% 0 60%;
	opacity: 0.95;
	z-index: 0;
	pointer-events: none;
	transform: translateY(var(--dit-hero-shift, 0)) rotate(-8deg);
	will-change: transform;
}

.dit-services-hero__inner {
	position: relative;
	z-index: 1;
	display: grid;
	align-items: center;
	width: 100%;
	min-height: inherit;
}

.dit-services-hero__content {
	position: relative;
	z-index: 2;
	max-width: 38rem;
	opacity: 0;
	transform: translateY(1.1rem);
	animation: dit-services-hero-in 0.85s var(--dit-ease) forwards;
	animation-delay: 0.08s;
}

.dit-services-hero__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.65rem;
	margin: 0 0 1.1rem;
	color: var(--dit-teal);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.dit-services-hero__title {
	color: var(--dit-navy);
	font-size: clamp(2rem, 4.2vw, 3.05rem);
	line-height: 1.15;
	margin: 0 0 1.15rem;
	max-width: 18ch;
}

.dit-services-hero__title-accent,
.dit-services-hero__title em {
	color: var(--dit-teal);
	font-style: normal;
}

.dit-services-hero__lead {
	color: var(--dit-muted);
	font-size: clamp(1rem, 1.6vw, 1.1rem);
	line-height: 1.65;
	margin: 0 0 1.75rem;
	max-width: 36rem;
}

.dit-services-hero__actions {
	margin: 0;
}

@keyframes dit-services-hero-in {
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (max-width: 1023px) {
	.dit-services-hero {
		background-position: 70% 24%;
		background-size: cover;
		min-height: auto;
		padding-block: 2.75rem 3.25rem;
	}

	.dit-services-hero::before {
		background: linear-gradient(
			180deg,
			rgba(247, 251, 251, 0.72) 0%,
			rgba(247, 251, 251, 0.58) 45%,
			rgba(247, 251, 251, 0.35) 100%
		);
	}

	.dit-services-hero__inner {
		justify-items: center;
		text-align: center;
	}

	.dit-services-hero__content {
		max-width: 34rem;
		margin-inline: auto;
		padding: 1.1rem 1rem;
		border-radius: 18px;
		background: rgba(247, 251, 251, 0.88);
		text-align: center;
	}

	.dit-services-hero__title {
		max-width: none;
		margin-inline: auto;
	}

	.dit-services-hero__lead {
		margin-inline: auto;
	}

	.dit-services-hero::after {
		width: 70vw;
		height: 110px;
		right: -28%;
		bottom: -18%;
		opacity: 0.28;
	}

	.dit-services-hero__actions {
		justify-content: center;
		margin-inline: auto;
	}
}

/* -------------------------------------------------------------------------- */
/* Introduction                                                               */
/* -------------------------------------------------------------------------- */

.dit-services-intro {
	background: var(--dit-white);
}

.dit-services-intro__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
	gap: clamp(1.75rem, 4vw, 3.5rem);
	align-items: center;
	width: 100%;
}

.dit-services-intro__content {
	max-width: 38rem;
}

.dit-services-intro .dit-section__title {
	max-width: 18ch;
}

.dit-services-intro .dit-section__text {
	margin-bottom: 1rem;
}

.dit-services-intro .dit-section__text:last-child {
	margin-bottom: 0;
}

.dit-services-intro__media {
	position: relative;
	isolation: isolate;
}

.dit-services-intro__figure {
	margin: 0;
	border-radius: 18px;
	overflow: hidden;
	background: var(--dit-mist);
	box-shadow: 0 18px 40px rgba(11, 42, 74, 0.1);
}

.dit-services-intro__figure img {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 360px;
	object-fit: cover;
}

.dit-services-intro__badge,
.dit-services-intro__badge.wp-block-group {
	position: absolute;
	top: 1rem;
	right: 1rem;
	z-index: 1;
	display: flex;
	align-items: flex-start;
	gap: 0.65rem;
	max-width: 11.5rem;
	padding: 0.85rem 0.95rem;
	background: var(--dit-white);
	border-radius: 12px;
	box-shadow: 0 12px 28px rgba(11, 42, 74, 0.14);
}

.dit-services-intro__badge-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3.25rem;
	height: 3.25rem;
	flex-shrink: 0;
	border-radius: 50%;
	background: var(--dit-mist);
	color: var(--dit-teal);
}

.dit-services-intro__badge-icon svg {
	display: block;
	width: 1.75rem;
	height: 1.75rem;
}

.dit-services-intro__badge-text {
	margin: 0;
	color: var(--dit-navy);
	font-size: 0.82rem;
	font-weight: 700;
	line-height: 1.35;
}

@media (max-width: 900px) {
	.dit-services-intro__grid {
		grid-template-columns: 1fr;
	}

	.dit-services-intro__figure img {
		min-height: 240px;
	}
}

/* -------------------------------------------------------------------------- */
/* Core service cards                                                         */
/* -------------------------------------------------------------------------- */

.dit-services-core {
	background: #f5f8f9;
}

.dit-services-core .dit-eyebrow {
	margin-bottom: 1.75rem;
}

.dit-core-cards {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	grid-auto-rows: auto;
	gap: 1.5rem;
	margin: 0;
	padding: 0;
	align-items: stretch;
	isolation: isolate;
}

.dit-core-card {
	position: relative;
	z-index: 0;
	isolation: isolate;
	display: flex !important;
	flex-direction: column;
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	min-height: 0;
	height: auto;
	margin: 0;
	padding: 0;
	background: var(--dit-white);
	border: 1px solid rgba(13, 115, 119, 0.1);
	border-radius: 18px;
	box-shadow: 0 12px 32px rgba(11, 42, 74, 0.07);
	overflow: hidden;
	transition:
		border-color 0.35s ease,
		box-shadow 0.35s var(--dit-ease),
		transform 0.35s var(--dit-ease);
}

.dit-core-card::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 3px;
	background: linear-gradient(90deg, var(--dit-teal) 0%, var(--dit-teal-mid) 100%);
	transform: scaleX(0.4);
	transform-origin: left;
	transition: transform 0.55s var(--dit-ease);
	pointer-events: none;
	z-index: 3;
}

.dit-core-card:hover,
.dit-core-card:focus-within {
	z-index: 1;
	border-color: rgba(13, 115, 119, 0.28);
	box-shadow:
		0 24px 48px rgba(11, 42, 74, 0.14),
		0 8px 18px rgba(13, 115, 119, 0.1);
	transform: translateY(-6px);
}

.dit-core-card:hover::before,
.dit-core-card:focus-within::before {
	transform: scaleX(1);
}

.dit-core-card:hover .dit-core-card__media img,
.dit-core-card:focus-within .dit-core-card__media img {
	transform: scale(1.06);
}

.dit-core-card:hover .dit-core-card__title,
.dit-core-card:focus-within .dit-core-card__title {
	color: var(--dit-teal);
}

.dit-core-card:hover .dit-core-card__link,
.dit-core-card:focus-within .dit-core-card__link {
	background: var(--dit-teal);
	color: var(--dit-white);
	border-color: var(--dit-teal);
	box-shadow: 0 10px 22px rgba(13, 115, 119, 0.22);
}

.dit-core-card__media {
	position: relative;
	z-index: 1;
	margin: 0;
	overflow: hidden;
	aspect-ratio: 16 / 10;
	background: var(--dit-mist);
}

.dit-core-card__media .wp-block-image,
.dit-core-card__media figure {
	margin: 0;
	height: 100%;
}

.dit-core-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.65s var(--dit-ease);
}

.dit-core-card__cta {
	margin: 0;
	margin-top: auto;
}

.dit-core-card__cta .dit-core-card__link {
	margin-top: 0;
}

.dit-core-card__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 55%, rgba(11, 42, 74, 0.3) 100%);
	pointer-events: none;
}

.dit-core-card__index {
	position: absolute;
	right: 0.9rem;
	bottom: 0.75rem;
	z-index: 2;
	margin: 0;
	color: rgba(255, 255, 255, 0.95);
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.85rem;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.02em;
	text-shadow: 0 2px 10px rgba(11, 42, 74, 0.35);
}

.dit-core-card__body {
	position: relative;
	z-index: 1;
	display: flex !important;
	flex: 1 1 auto;
	flex-direction: column;
	padding: 1.35rem 1.35rem 1.5rem;
}

/* Serif title */
.dit-core-card__title {
	margin: 0 0 0.35rem;
	color: var(--dit-navy);
	font-family: var(--wp--preset--font-family--heading), Georgia, "Times New Roman", serif;
	font-size: 1.22rem;
	font-weight: 700;
	line-height: 1.3;
	transition: color 0.3s ease;
}

/* Italic teal subtitle */
.dit-core-card__subtitle {
	margin: 0 0 1rem;
	color: var(--dit-teal);
	font-size: 0.95rem;
	font-style: italic;
	font-weight: 500;
	line-height: 1.4;
}

/* Simple bulleted feature list */
.dit-core-card__list {
	list-style: none;
	margin: 0 0 1.5rem;
	padding: 0;
	flex: 1 1 auto;
}

.dit-core-card__list li {
	position: relative;
	padding-left: 1.1rem;
	margin-bottom: 0.65rem;
	color: var(--dit-navy);
	font-size: 0.95rem;
	font-weight: 500;
	line-height: 1.45;
}

.dit-core-card__list li:last-child {
	margin-bottom: 0;
}

.dit-core-card__list li::before {
	content: "";
	position: absolute;
	left: 0.1rem;
	top: 0.55em;
	width: 0.36rem;
	height: 0.36rem;
	border-radius: 50%;
	background: var(--dit-navy);
}

/* Pill button */
.dit-core-card__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	align-self: flex-start;
	margin-top: auto;
	padding: 0.7rem 1.25rem;
	border: 1.5px solid var(--dit-teal);
	border-radius: 999px;
	background: transparent;
	color: var(--dit-teal);
	font-size: 0.9rem;
	font-weight: 700;
	text-decoration: none;
	letter-spacing: 0.01em;
	transition:
		background-color 0.3s ease,
		color 0.3s ease,
		border-color 0.3s ease,
		box-shadow 0.3s ease,
		transform 0.3s var(--dit-ease);
}

.dit-core-card__link:hover,
.dit-core-card__link:focus-visible {
	background: var(--dit-teal);
	border-color: var(--dit-teal);
	color: var(--dit-white);
	box-shadow: 0 10px 22px rgba(13, 115, 119, 0.22);
}

@media (max-width: 1100px) and (min-width: 701px) {
	.dit-core-cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 1.35rem;
	}
}

@media (max-width: 700px) {
	.dit-core-cards {
		grid-template-columns: 1fr;
		gap: 1.15rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.dit-core-card,
	.dit-core-card::before,
	.dit-core-card__media img,
	.dit-core-card__title,
	.dit-core-card__link {
		transition: none;
	}

	.dit-core-card:hover,
	.dit-core-card:focus-within {
		transform: none;
	}

	.dit-core-card:hover .dit-core-card__media img,
	.dit-core-card:focus-within .dit-core-card__media img {
		transform: none;
	}
}

/* -------------------------------------------------------------------------- */
/* Connected workflow                                                         */
/* -------------------------------------------------------------------------- */

.dit-services-flow {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background: #f0f8f8;
	padding-block: clamp(3.5rem, 7vw, 5.75rem);
}

.dit-services-flow::before,
.dit-services-flow::after {
	content: "";
	position: absolute;
	z-index: 0;
	pointer-events: none;
	border-radius: 55% 45% 50% 50% / 60% 40% 60% 40%;
	background: rgba(13, 115, 119, 0.07);
}

.dit-services-flow::before {
	left: -12%;
	bottom: -42%;
	width: min(46vw, 420px);
	height: min(34vw, 280px);
	transform: rotate(-18deg);
}

.dit-services-flow::after {
	right: -10%;
	bottom: -48%;
	width: min(48vw, 460px);
	height: min(36vw, 300px);
	transform: rotate(12deg);
	background: rgba(13, 115, 119, 0.09);
}

.dit-services-flow__inner {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.35fr);
	gap: clamp(2rem, 4.5vw, 3.75rem);
	align-items: start;
	width: 100%;
}

.dit-services-flow__copy {
	max-width: 22rem;
	padding-top: 0.35rem;
}

.dit-services-flow__title {
	max-width: 14ch;
	margin-bottom: 1rem;
	font-size: clamp(1.85rem, 3.2vw, 2.55rem);
	line-height: 1.18;
}

.dit-services-flow__lead {
	margin: 0;
	max-width: 28rem;
	font-size: 1.02rem;
	line-height: 1.6;
	color: var(--dit-muted);
}

.dit-services-flow__process {
	min-width: 0;
	padding-top: 0.15rem;
}

.dit-flow-steps {
	--dit-flow-gap: clamp(1.5rem, 3vw, 2.5rem);
	list-style: none;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	column-gap: var(--dit-flow-gap);
	row-gap: 0;
	align-items: start;
	margin: 0 0 2.15rem;
	padding: 0;
	width: 100%;
	counter-reset: none;
}

.dit-flow-step {
	--dit-flow-icon: 4.75rem;
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 0.85rem;
	padding: 0;
}

/* Connector line + arrowhead centered on the icon circle and gap */
.dit-flow-step:not(:last-child)::after {
	content: "";
	position: absolute;
	top: calc(var(--dit-flow-icon) / 2);
	left: calc(65% + (var(--dit-flow-icon) / 2));
	width: calc(50% - (var(--dit-flow-icon) / 2) + var(--dit-flow-gap));
	height: 1.5px;
	background: rgba(13, 115, 119, 0.55);
	transform: translateY(-50%);
	pointer-events: none;
}

.dit-flow-step:not(:last-child)::before {
	content: "";
	position: absolute;
	top: calc(var(--dit-flow-icon) / 2);
	left: calc(121% + (var(--dit-flow-gap) / 2));
	width: 0.55rem;
	height: 0.55rem;
	border-top: 1.5px solid var(--dit-teal);
	border-right: 1.5px solid var(--dit-teal);
	transform: translate(-50%, -50%) rotate(45deg);
	z-index: 1;
	pointer-events: none;
}

.dit-flow-step__icon {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--dit-flow-icon);
	height: var(--dit-flow-icon);
	border-radius: 50%;
	background: var(--dit-teal);
	color: var(--dit-white);
	box-shadow: none;
}

.dit-flow-step__icon svg {
	display: block;
	width: 2.1rem;
	height: 2.1rem;
}

.dit-flow-step__label {
	display: block;
	margin: 0;
	color: var(--dit-navy);
	font-size: 1.02rem;
	font-weight: 700;
	line-height: 1.3;
}

.dit-flow-step__text {
	display: block;
	max-width: 12.5rem;
	margin: 0;
	color: var(--dit-muted);
	font-size: 0.92rem;
	line-height: 1.5;
}

.dit-services-flow__note {
	position: relative;
	margin: 0;
	padding-top: 1.35rem;
	max-width: 46rem;
	color: var(--dit-teal);
	font-size: 0.92rem;
	font-weight: 600;
	line-height: 1.55;
}

.dit-services-flow__note::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: min(100%, 34rem);
	height: 1px;
	background: rgba(13, 115, 119, 0.28);
}

@media (max-width: 980px) {
	.dit-services-flow__inner {
		grid-template-columns: 1fr;
		gap: 2.25rem;
	}

	.dit-services-flow__copy {
		max-width: 34rem;
	}

	.dit-services-flow__title {
		max-width: 18ch;
	}
}

@media (max-width: 720px) {
	.dit-services-flow__copy {
		text-align: left;
		padding-inline: 0;
		max-width: none;
	}

	.dit-services-flow__process {
		display: flex;
		flex-direction: column;
		align-items: center;
		width: 100%;
	}

	.dit-flow-steps {
		grid-template-columns: 1fr;
		gap: 2.75rem;
		max-width: 18rem;
		width: 100%;
		margin-inline: auto;
		justify-items: center;
	}

	.dit-flow-step {
		padding: 0;
		align-items: center;
		text-align: center;
		width: 100%;
	}

	.dit-flow-step:not(:last-child)::after {
		top: auto;
		left: 50%;
		bottom: -1.85rem;
		right: auto;
		width: 1.5px;
		height: 1rem;
		background: var(--dit-teal);
		opacity: 0.55;
		transform: translateX(-50%);
	}

	.dit-flow-step:not(:last-child)::before {
		top: auto;
		right: auto;
		left: 50%;
		bottom: -2.2rem;
		transform: translateX(-50%) rotate(135deg);
	}

	.dit-flow-step__text {
		max-width: 16rem;
		margin-inline: auto;
	}

	.dit-services-flow__note {
		max-width: none;
		text-align: center;
	}

	.dit-services-flow__note::before {
		left: 50%;
		transform: translateX(-50%);
	}
}

/* -------------------------------------------------------------------------- */
/* Final CTA                                                                  */
/* -------------------------------------------------------------------------- */

.dit-services-cta {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background-color: var(--dit-navy);
	background-image:
		linear-gradient(
			100deg,
			rgba(11, 42, 74, 0.97) 0%,
			rgba(11, 42, 74, 0.92) 42%,
			rgba(11, 42, 74, 0.72) 62%,
			rgba(11, 42, 74, 0.55) 100%
		),
		url("../assets/img/why.jpg");
	background-repeat: no-repeat;
	background-position: center right;
	background-size: cover;
	padding-block: clamp(3.5rem, 7vw, 5.5rem);
}

.dit-services-cta__inner {
	position: relative;
	z-index: 1;
	width: 100%;
}

.dit-services-cta__copy {
	max-width: 40rem;
}

.dit-services-cta .dit-section__title {
	max-width: 18ch;
	color: var(--dit-white);
}

.dit-services-cta .dit-eyebrow--on-dark {
	color: #9ad5d8;
}

.dit-services-cta .dit-section__text {
	margin-inline: 0;
	margin-bottom: 1rem;
	max-width: 38rem;
}

.dit-services-cta .dit-section__text:last-of-type {
	margin-bottom: 0;
}

.dit-services-cta__actions {
	margin-top: 1.5rem;
	gap: 0.85rem;
}

@media (max-width: 900px) {
	.dit-services-cta {
		background-position: 70% center;
	}

	.dit-services-cta::before {
		content: "";
		position: absolute;
		inset: 0;
		background: rgba(11, 42, 74, 0.35);
		pointer-events: none;
	}
}

@media (max-width: 520px) {
	.dit-services-cta__actions {
		flex-direction: column;
		align-items: stretch;
		width: 100%;
	}

	.dit-services-cta__actions .wp-block-button,
	.dit-services-cta__actions .wp-block-button__link {
		width: 100%;
		text-align: center;
	}
}

/* -------------------------------------------------------------------------- */
/* Reduced motion                                                             */
/* -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.dit-services-hero__content {
		opacity: 1;
		transform: none;
		animation: none;
	}
}