/**
 * Non-Profits and Startups pages (patterns pdfflipbook/nonprofit-*, pdfflipbook/startup-*, pdfflipbook/program-steps).
 * Values from the Figma "Non-Profits Program" and "Startups Program" frames (1920px wide).
 */

/* ---------- Intro ---------- */
.pf-prog-hero--np {
	background-color: #021414;
	background-image:
		url("../../images/nonprofit/hands.svg"),
		radial-gradient(69.37% 86.06% at 53.9% 57.25%, #01595d 0%, #023739 50%, #022526 75%, #021414 100%);
	background-size: 955px 497px, 100% 100%;
	background-position: calc(50% + 482.5px) 86px, 0 0;
	background-repeat: no-repeat;
}
.pf-prog-hero--startup {
	background-color: #021414;
	background-image:
		url("../../images/startup/founder.svg"),
		radial-gradient(69.37% 86.06% at 53.9% 57.25%, #01595d 0%, #023739 50%, #022526 75%, #021414 100%);
	background-size: 725px 569px, 100% 100%;
	background-position: calc(50% + 597.5px) 22px, 0 0;
	background-repeat: no-repeat;
}
.pf-prog-hero--startup .pf-prog-hero__lead { max-width: 672px; margin-inline: auto; }
.pf-prog-hero h1 { margin-bottom: 0; font-size: clamp(32px, 1.6vw + 18px, 48px); }
.pf-prog-hero .pf-prog-hero__lead { color: rgba(255, 255, 255, 0.9); }

/* ---------- Cards (who can apply) ---------- */
.pf-prog-card__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	margin-inline: auto;
	margin-bottom: 0;
	border-radius: 50%;
	background: #e6eff2;
}
.pf-prog-card .pf-prog-card__title {
	margin-bottom: 0;
	color: var(--wp--preset--color--neutral);
	font-size: 24px;
	font-weight: 600;
	line-height: 1.5;
	letter-spacing: -0.48px;
}
.pf-prog-card .pf-prog-card__text {
	margin-inline: -11px; /* the text runs 11px wider than the card content, as in the design */
	color: var(--wp--preset--color--paragraph);
	font-weight: 400;
}
/* Hover (as on the Divi site): the card rises 12px and its border turns teal */
.pf-prog-card { transition: border-color 0.3s ease, transform 0.3s ease; }
.pf-prog-card:hover { transform: translateY(-12px); border-color: var(--wp--preset--color--secondary) !important; }

/* ---------- Who is eligible (Startups) ---------- */
.pf-prog-eligible__head > * { max-width: 413px; }
.pf-prog-eligible .pf-prog-eligible__title { margin-bottom: 0; font-size: clamp(32px, 1.6vw + 18px, 48px); }
.pf-prog-eligible .pf-prog-eligible__note { color: #52525b; font-style: italic; font-weight: 400; line-height: 24px; letter-spacing: -0.31px; }
/* Light rule above the items; the item under the pointer gets a dark bar on it (below) */
.pf-prog-eligible hr.wp-block-separator.pf-prog-eligible__line {
	width: 100%;
	height: 3px;
	border: 0;
	background: linear-gradient(var(--wp--preset--color--line), var(--wp--preset--color--line)) left center / 100% 1px no-repeat;
	opacity: 1;
}
.pf-prog-eligible__item { min-width: 0; }
/* Hover (as on the Divi site): a 3px dark bar lights up on the rule above the item.
   Only when the four items sit in one row right under the rule. */
@media (min-width: 1241px) {
	.pf-prog-eligible .pf-prog-eligible__line + .pf-prog-eligible__items { margin-block-start: 0 !important; }
	.pf-prog-eligible__item { position: relative; padding-top: 60px; }
	.pf-prog-eligible__item::before {
		content: "";
		position: absolute;
		top: -3px;
		left: 0;
		right: 0;
		height: 3px;
		background: transparent;
		transition: background-color 0.3s ease;
	}
	.pf-prog-eligible__item:hover::before { background: var(--wp--preset--color--neutral); }
}
.pf-prog-eligible__icon {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: var(--wp--preset--color--tag);
}
.pf-prog-eligible .pf-prog-eligible__text {
	color: var(--wp--preset--color--paragraph);
	font-family: var(--wp--preset--font-family--heading);
	font-size: 20px;
	font-weight: 600;
	line-height: 1.5;
	letter-spacing: -0.4px;
}

/* ---------- Use cases (Startups) ---------- */
.pf-prog-uses .pf-prog-uses__title { margin-bottom: 0; font-size: clamp(32px, 1.6vw + 18px, 48px); }
.pf-prog-use {
	padding: 50px 30px; /* the design box is 168px wide; labels such as "Company brochures" run past it */
	border-radius: 10px;
	background: var(--wp--preset--color--light);
	transition: box-shadow 0.25s ease;
}
.pf-prog-use:hover { box-shadow: inset 0 0 0 1px var(--wp--preset--color--brand); }
.pf-prog-use .pf-prog-use__icon { margin-bottom: 0; }
.pf-prog-use .pf-prog-use__label { color: var(--wp--preset--color--neutral); font-size: 18px; line-height: 28px; letter-spacing: -0.36px; }

/* ---------- What's included ---------- */
.pf-prog-included__inner { justify-content: space-between; }
.pf-prog-media { flex: 0 1 639px; min-width: 0; margin: 0; }
.pf-prog-media video { display: block; width: 100%; height: auto; aspect-ratio: 639 / 496; object-fit: cover; border-radius: 4px; }
.pf-prog-included__text { flex: 0 1 521px; min-width: 0; }
.pf-prog-included .pf-prog-included__title { margin-bottom: 0; font-size: clamp(32px, 1.6vw + 18px, 48px); }

/* List with check marks */
.pf-ticks { display: flex; flex-direction: column; gap: 16px; margin-bottom: 0; padding: 0; list-style: none; }
.pf-ticks li {
	display: flex;
	align-items: center;
	gap: 17px;
	color: var(--wp--preset--color--neutral);
	font-size: 18px;
	font-weight: 400;
	line-height: 28px;
	letter-spacing: -0.44px;
}
.pf-ticks li::before { content: ""; width: 24px; height: 24px; flex-shrink: 0; background: url("../../images/icons/check.svg") center / 24px 24px no-repeat; }

/* ---------- How the application works ---------- */
.pf-prog-steps .pf-prog-steps__title { margin-bottom: 0; font-size: clamp(32px, 1.6vw + 18px, 48px); }
.pf-pstep { position: relative; }
/* Line from one step icon to the next (steps are 30px apart) */
.pf-pstep:not(:last-child)::after {
	content: "";
	position: absolute;
	top: 36px;
	left: calc(50% + 55px);
	width: calc(100% - 94px);
	height: 1px;
	background: #053645;
}
.pf-pstep__icon { position: relative; width: 78px; height: 68px; margin-inline: auto; }
.pf-pstep__icon .wp-block-image {
	position: absolute;
	top: 4px;
	left: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	margin: 0;
	border-radius: 50%;
	background: var(--wp--preset--color--secondary);
}
.pf-pstep__icon .pf-pstep__num {
	position: absolute;
	top: 0;
	left: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	margin: 0;
	border-radius: 50%;
	background: var(--wp--preset--color--brand);
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	line-height: 24px;
	letter-spacing: -0.32px;
}
.pf-pstep .pf-pstep__card {
	--pf-pstep-bg: rgba(255, 255, 255, 0.1);
	position: relative;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 205px;
	padding: 20px 24px;
	border-radius: 4px;
	background: var(--pf-pstep-bg);
	color: rgba(255, 255, 255, 0.9);
	transition: transform 0.35s var(--pf-ease), background-color 0.35s ease, color 0.35s ease;
	font-size: 18px;
	line-height: 28px;
	letter-spacing: -0.36px;
}
.pf-pstep__card::before {
	content: "";
	position: absolute;
	top: -20px;
	left: 50%;
	width: 30px;
	height: 20px;
	margin-left: -15px;
	/* Drawn in the card color so it changes with the card on hover */
	background: var(--pf-pstep-bg);
	-webkit-mask: url("../../images/programs/step-pointer-mask.svg") center / 30px 20px no-repeat;
	mask: url("../../images/programs/step-pointer-mask.svg") center / 30px 20px no-repeat;
	transition: background-color 0.35s ease;
}
.pf-pstep__icon .wp-block-image { transition: transform 0.35s var(--pf-ease); }
/* Hover (desktop and tablet layout): the step's card lifts and brightens, its icon grows a little */
@media (min-width: 601px) {
	.pf-pstep:hover .pf-pstep__card { --pf-pstep-bg: rgba(255, 255, 255, 0.16); transform: translateY(-6px); color: #fff; }
	.pf-pstep:hover .pf-pstep__icon .wp-block-image { transform: scale(1.08); }
}

/* ---------- Application form ---------- */
.pf-prog-apply { background: #fff url("../../images/grid-apply.svg") center top / 1920px 1260px repeat-y; }
.pf-prog-apply .pf-prog-apply__title { margin-bottom: 0; font-weight: 700; line-height: 1.4; letter-spacing: -0.76px; }
.pf-apply-card { border: 1px solid #95a6bb; border-radius: 4px; background: #edf1f6; }

.pf-aform { max-width: 969px; margin: 0 auto; }
.pf-aform__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.pf-afield { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.pf-afield--wide { grid-column: 1 / -1; }
.pf-afield label { color: var(--wp--preset--color--neutral); font-size: 16px; font-weight: 500; line-height: 26px; letter-spacing: -0.32px; }
.pf-afield input,
.pf-afield select,
.pf-afield textarea,
.pf-afile {
	box-sizing: border-box;
	width: 100%;
	height: 56px;
	margin: 0;
	padding: 15px 25px;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 4px;
	background-color: #fff;
	color: var(--wp--preset--color--neutral);
	font-family: var(--wp--preset--font-family--body);
	font-size: 14px;
	font-weight: 400;
	line-height: 24px;
	letter-spacing: -0.28px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.pf-afield textarea { display: block; height: 80px; resize: vertical; }
.pf-afield--tall input { height: 80px; padding-bottom: 39px; } /* single line, text at the top as in the design */
.pf-afield--lg textarea { height: 86px; }
.pf-afield ::placeholder { color: var(--wp--preset--color--paragraph); opacity: 1; }
.pf-afield select {
	-webkit-appearance: none;
	appearance: none;
	padding-right: 48px;
	background: #fff url("../../images/icons/select-arrow.svg") right 24px center / 12px 8px no-repeat;
	cursor: pointer;
}
.pf-afield select:invalid { color: var(--wp--preset--color--paragraph); }
.pf-afield input:focus,
.pf-afield select:focus,
.pf-afield textarea:focus,
.pf-afile:focus-within { outline: none; border-color: var(--wp--preset--color--brand); box-shadow: 0 0 0 3px rgba(9, 99, 126, 0.12); }

/* File upload: the file input covers the box */
.pf-afile { position: relative; display: block; height: 86px; color: var(--wp--preset--color--paragraph); cursor: pointer; }
.pf-afile input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.pf-afile:hover { border-color: var(--wp--preset--color--brand); }
.pf-afile:has(input:valid) { border-color: var(--wp--preset--color--brand); color: var(--wp--preset--color--neutral); }

.pf-aform__confirm {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 20px 0 0;
	color: var(--wp--preset--color--neutral);
	font-size: 14px;
	font-weight: 500;
	line-height: 20px;
	letter-spacing: -0.15px;
}
.pf-aform__confirm input {
	-webkit-appearance: none;
	appearance: none;
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	margin: 0;
	border: 1px solid var(--wp--preset--color--paragraph);
	border-radius: 4px;
	background: #f3f3f5 center / 12px 12px no-repeat;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
	cursor: pointer;
}
.pf-aform__confirm input:checked { border-color: var(--wp--preset--color--brand); background-color: var(--wp--preset--color--brand); background-image: url("../../images/icons/check-white.svg"); }
.pf-aform__confirm input:focus-visible { outline: 2px solid var(--wp--preset--color--brand); outline-offset: 2px; }
.pf-aform__confirm label { cursor: pointer; }

.pf-aform .pf-aform__submit {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	margin-top: 40px;
	padding: 11px 23px;
	border: 1px solid var(--wp--preset--color--brand);
	border-radius: 6px;
	background: var(--wp--preset--color--brand);
	box-shadow: 0 4px 2px rgba(0, 0, 0, 0.05);
	color: #fff;
	font-family: var(--wp--preset--font-family--body);
	font-size: 16px;
	font-weight: 500;
	line-height: 26px;
	letter-spacing: -0.32px;
	cursor: pointer;
	transition: background-color 0.25s ease, border-color 0.25s ease;
}
.pf-aform .pf-aform__submit::after {
	content: "";
	width: 24px;
	height: 24px;
	background-color: currentColor;
	-webkit-mask: url("../../images/icons/angle-right.svg") center / 24px no-repeat;
	mask: url("../../images/icons/angle-right.svg") center / 24px no-repeat;
	transition: transform 0.25s var(--pf-ease);
}
.pf-aform .pf-aform__submit:hover { border-color: var(--wp--preset--color--neutral); background: var(--wp--preset--color--neutral); }
.pf-aform .pf-aform__submit:hover::after { transform: translateX(3px); }

/* ---------- Responsive ---------- */
@media (max-width: 1279px) {
	/* Smaller founder drawing, kept in the bottom right corner */
	.pf-prog-hero--startup { background-size: 435px 341px, 100% 100%; background-position: right -40px bottom 0, 0 0; }
}
@media (max-width: 1240px) {
	.pf-prog-eligible__items.pf-prog-eligible__items { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 30px; }
}
@media (max-width: 1180px) {
	.pf-prog-cards .pf-prog-card { padding: 32px 24px !important; }
	.pf-prog-card .pf-prog-card__text { margin-inline: 0; }
	/* Keep each title on one line so the three cards stay aligned */
	.pf-prog-cards.pf-prog-cards { gap: 20px; }
	.pf-prog-card .pf-prog-card__title { font-size: 20px; letter-spacing: -0.4px; }
	.pf-psteps.pf-psteps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
	.pf-pstep::after { display: none; }
}
@media (max-width: 1023px) {
	.pf-prog-included__inner.pf-prog-included__inner { flex-direction: column; align-items: stretch; gap: 48px; }
	.pf-prog-media { flex: none; align-self: center; width: 100%; max-width: 639px; }
	.pf-prog-included__text { flex: none; }
}
@media (max-width: 781px) {
	.pf-prog-steps > .pf-psteps { margin-block-start: 40px; }
}
@media (max-width: 860px) {
	.pf-prog-cards.pf-prog-cards { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
	.pf-prog-card .pf-prog-card__title { font-size: 24px; letter-spacing: -0.48px; }
}
/* Tablets: the stacked cards use the full content width like the sections around them */
@media (min-width: 601px) and (max-width: 860px) {
	.pf-prog-cards.pf-prog-cards { max-width: none; }
}
@media (max-width: 600px) {
	/* Steps turn into horizontal cards (Figma mobile variant) */
	.pf-psteps.pf-psteps { grid-template-columns: minmax(0, 1fr); gap: 12px; }
	.pf-pstep { display: flex; align-items: center; gap: 23px; padding: 44px 27px; border-radius: 4px; background: rgba(248, 249, 250, 0.18); }
	.pf-pstep > * { margin: 0 !important; }
	.pf-pstep__icon { flex-shrink: 0; }
	.pf-psteps .pf-pstep .pf-pstep__card { display: block; min-height: 0; padding: 0; background: none; text-align: left; }
	/* The design's line breaks strand single words in the narrow mobile cards: let the text wrap */
	.pf-psteps .pf-pstep .pf-pstep__card br { display: none; }
	.pf-pstep__card::before { display: none; }
	.pf-prog-eligible__items.pf-prog-eligible__items { grid-template-columns: minmax(0, 1fr); }
	.pf-prog-eligible .pf-prog-eligible__head .pf-prog-eligible__note { text-align: left; }
	.pf-prog-eligible .pf-prog-eligible__text { font-size: 18px; }
	.pf-prog-uses__grid.pf-prog-uses__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
	.pf-prog-use { padding: 32px 12px; }
	.pf-prog-use .pf-prog-use__label { font-size: 16px; line-height: 24px; }
	.pf-aform__grid { grid-template-columns: minmax(0, 1fr); }
	.pf-afile { height: auto; min-height: 86px; }
}
@media (prefers-reduced-motion: reduce) {
	.pf-aform .pf-aform__submit:hover::after { transform: none; }
	.pf-prog-card:hover, .pf-pstep:hover .pf-pstep__card, .pf-pstep:hover .pf-pstep__icon .wp-block-image { transform: none; }
}

/* Editor: a click on the preview selects the Video block */
.editor-styles-wrapper .pf-prog-media video { pointer-events: none; }
