/* Sectors archive (/sectors/) and the single sector page. Both are Elementor widgets (build/sectors.py);
   the single page's values come from the sector's ACF fields (Plugins/di-site/inc/sectors.php). */

/* -------------------------------------------------------------- archive -- */

.di-sectors-intro p { max-width: 957px; }
.di-sectors-cta__text p { max-width: 815px; }
.di-sectors-cta__btn .elementor-button { padding: 0 47px; }

/* --------------------------------------------------------------- single -- */

.di-sector-intro p { margin: 0 0 9px; }
.di-sector-intro p:last-child { margin-bottom: 0; }
.di-sector-intro a { color: #2B8C84; text-decoration: underline; }
.di-sector-intro ul, .di-sector-intro ol { margin: 0 0 9px; padding-left: 22px; }

/* Slots: a widget bound to an empty field still takes its box, so hide empty ones.
   A heading bound to an empty field renders no .elementor-heading-title; an empty text editor has no p / ul. */
.di-sector-card.di-slot:not(:has(.elementor-heading-title)) { display: none; }
.di-case-row.di-slot:not(:has(.elementor-button-text:not(:empty))) { display: none; }
.di-sector-case:not(:has(.elementor-button-text:not(:empty))) { display: none; }
.di-sector-box__text:not(:has(p)), .di-sector-list:not(:has(li)) { display: none; }
.di-sector__quote:not(:has(.di-sector-quote__text p)) { display: none; }

/* "Key challenges" cards */
.elementor-element.di-sector-card {
	position: relative;
	overflow: hidden;
	box-sizing: border-box;
	border: 1px solid #A9DDD6;
	border-radius: 14px;
	background: #fff;
}
.di-sector-card::after {
	content: "";
	position: absolute;
	z-index: 0;
	right: -5px;
	bottom: -2px;
	width: 151px;
	height: 150px;
	background: url(../../img/di-icon.svg) no-repeat center / contain;
	opacity: .1;
	pointer-events: none;
}
.di-sector-card > * { position: relative; z-index: 1; }
.di-sector-card__title .elementor-heading-title { margin: 0; }
.di-sector-card__text p { margin: 0; max-width: 380px; padding-left: 4px; }

/* gradient boxes: "Our typical services" and "Why ... choose Data Innovations" */
.elementor-element.di-sector-box { box-sizing: border-box; border-radius: 14px; color: #fff; }
.di-sector-box__title .elementor-heading-title { margin: 0; }
.di-sector-box__text p { margin: 0 0 9px; }
.di-sector-box__text p:last-child { margin-bottom: 0; }
.di-sector-list ul { margin: 0; padding: 0; list-style: none; }
.di-sector-list li { position: relative; margin: 0 0 4px; padding: 0 0 0 36px; list-style: none; }
.di-sector-list li:last-child { margin-bottom: 0; }
.di-sector-list li::before { content: "\2022"; position: absolute; left: 0; top: 0; }
.di-sector-box--why .di-sector-list li { padding-left: 23px; }

/* case study download */
.di-sector-case { padding-bottom: 25px; }
.di-sector-case .di-download__heading { padding: 14px 25px 15px; border-bottom: 1px solid #9A9A9A; }
.di-sector-case .di-download__heading .elementor-heading-title { margin: 0; }
.di-sector-case .di-download__body { padding: 20px 25px 22px; }
.elementor-element.di-case-link .elementor-button {
	display: flex; align-items: center; justify-content: flex-start; gap: 12px; width: auto;
	padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none;
	font-size: 16.5px; line-height: 22px; font-weight: 400; color: var(--di-navy); text-decoration: none; text-align: left;
}
.di-case-link .elementor-button::before {
	content: ""; flex: 0 0 22px; width: 22px; height: 22px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 1.5h9l5 5V21a1.5 1.5 0 0 1-1.5 1.5h-12.5A1.5 1.5 0 0 1 3.5 21V3A1.5 1.5 0 0 1 5 1.5z' fill='%23fff' stroke='%23162648' stroke-width='1.5' stroke-linejoin='round'/%3E%3Cpath d='M14 1.5v5h5' fill='none' stroke='%23162648' stroke-width='1.5' stroke-linejoin='round'/%3E%3Crect x='3.5' y='12.5' width='13' height='6' rx='1' fill='%232B8C84'/%3E%3Cpath d='M5.4 17.2v-3.4h1.3a1 1 0 0 1 0 2H5.4m4 1.4v-3.4h.9a1.7 1.7 0 0 1 0 3.4zm4.6 0v-3.4h1.7m-1.7 1.6h1.2' fill='none' stroke='%23fff' stroke-width='.7'/%3E%3C/svg%3E") no-repeat center / contain;
}
.di-case-link .elementor-button-text { color: inherit; }
.di-case-link a.elementor-button[href]:hover .elementor-button-text { color: var(--di-teal); text-decoration: underline; text-underline-offset: 2px; }

/* testimonial */
.di-sector-quote__text, .di-sector-quote__text p { color: var(--di-teal); }
.di-sector-quote__text p { margin: 0; font-size: 25.5px; line-height: 31px; }
.di-sector-quote__by, .di-sector-quote__by p { color: var(--di-teal); }
.di-sector-quote__by p { margin: 0; font-size: 15px; line-height: 22px; text-align: right; }

/* call to action */
.single-di_sector .di-ctabody__text p { margin: 0 0 9px; }
.single-di_sector .di-ctabody__text p:last-child { margin-bottom: 0; }
.single-di_sector .di-ctabody .di-btn--cta .elementor-button { padding: 0 48px; }

/* ----------------------------------------------- between 1025 and 1430 -- */

@media (max-width: 1430px) and (min-width: 1025px) {
	.di-sector__grid { column-gap: 32px !important; }
	.di-sector__extras { column-gap: 32px !important; }
	.di-sector__quote { padding-left: 0 !important; padding-right: 0 !important; }
}

/* --------------------------------------------------- tablet and below -- */

@media (max-width: 1024px) {
	.di-sector-case { padding-bottom: 0; }
	.di-sectors-intro p, .di-sectors-cta__text p, .di-sector-intro { max-width: none; padding-left: 0; }
	.di-sectors-cta__text br { display: none; }
	.di-sector-card__text p { max-width: none; }
	.single-di_sector .di-ctabody .di-btn--cta .elementor-button { padding: 0 24px; }
	.di-sectors-cta__btn .elementor-button { padding: 0 24px; }
}

@media (max-width: 767px) {
	.di-sector-case .di-download__heading { padding-left: 0; padding-right: 0; margin-left: 0; }
}

/* ---------------------------------------------------- client feedback -- */

/* archive: quote to the right of the intro */
.elementor-element.di-sectors-quote { width: 470px; max-width: 100%; }
.di-sectors-quote .di-quote { max-width: none; }
.di-sectors-quote .di-quote p { font-family: Arial, sans-serif; }
@media (max-width: 1024px) { .elementor-element.di-sectors-quote { width: 100%; } }

.di-sector__extras { align-items: start; }
.di-sectors-introrow > .di-sectors-intro.elementor-widget { flex: 1 1 0; min-width: 0; }
.di-sectors-introrow .di-sectors-intro p { max-width: 880px; }
@media (max-width: 1024px) { .di-sectors-introrow .di-sectors-intro p { max-width: none; } }
