/* Services Grid — numbered textbox cards (2/3/4-up grid on desktop, per the widget's Columns control; see .cols-2/.cols-4 below). */
.services-grid { background: var(--tint-teal-10); padding: 100px 0; }
.services-grid.bg-white { background: var(--brand-white); }
.services-grid.bg-tint-teal-20 { background: var(--tint-teal-20); }

.services-grid h3 { margin-bottom: 24px; }
.services-grid-lead { margin-bottom: 48px; max-width: 900px; }
.services-grid-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* default = 3 columns, matches the widget's "Columns" control default */
    gap: 32px;
}
/* Columns control  */
.services-grid.cols-2 .services-grid-grid { grid-template-columns: repeat(2, 1fr); }
.services-grid.cols-4 .services-grid-grid { grid-template-columns: repeat(4, 1fr); }
.service-textbox {
    background: var(--brand-white);
    border: 1px solid var(--tint-teal-20); /* keeps the card visible if the section's own Background Color is also set to White */
    border-radius: 20px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.service-textbox-num span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: var(--tint-teal-10);
    color: var(--brand-teal);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 18px;
}
.service-textbox-body { display: flex; flex-direction: column; gap: 12px; }
.service-textbox-body h4 { color: var(--brand-teal); }
.service-textbox-body p { font-family: var(--font-body); font-size: 16px; line-height: 24px; color: var(--brand-dark-grey); margin: 0; }

/* Style 2 — icon  */
.service-textbox-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
}
.service-textbox-icon img { max-width: 100%; max-height: 100%; }

/* Style 3 — steps */
.services-grid.style3 h3,
.services-grid.style3 .services-grid-lead {
    text-align: center;
}
.services-grid.style3 .services-grid-lead { margin-left: auto; margin-right: auto; }

.services-grid-steps {
    position: relative;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 32px 16px;
    margin-top: 48px;
}
.step-item {
    position: relative;
    z-index: 1;
    flex: 1 1 160px;
    max-width: 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
}

.step-item:not(:first-child)::before {
	position: absolute;
	z-index: 0;
}

.step-item:not(:last-child)::after {
	position: absolute;
	z-index: -1;
}

.step-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--brand-teal);
    color: var(--brand-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
	position: relative;
	z-index: 10;
}
.step-title { color: var(--brand-dark-teal); margin: 0; }
.step-desc { font-family: var(--font-body); font-size: 15px; line-height: 22px; color: var(--brand-dark-grey); margin: 0; }

.services-grid-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin-top: 40px;
}
.services-grid-cta-link {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 15px;
    color: var(--brand-teal);
    text-decoration: underline;
}
.services-grid-cta-link:hover { color: var(--brand-dark-teal); }
@media (min-width: 1025px) {
	/* Connecting line  */
	.services-grid-steps {
		padding: 0 60px;
	}
	.step-item:not(:first-child)::before {
		content: '';
		top: 24px; /* vertical center of the 48px step-circle below */
		right: 50%;
		width: calc(100% + 16px);
		height: 2px;
		background: var(--tint-teal-20);
	}

	.step-item:not(:last-child)::after {
		content: '';
		top: 24px; /* vertical center of the 48px step-circle below */
		left: 50%;
		width: calc(100% + 16px);
		height: 2px;
		background: var(--tint-teal-20);
	}
}

@media (max-width: 1199.98px) {
    /* Every column count collapses to 2 here — .cols-2/.cols-4 selectors are
       repeated (not just the bare .services-grid-grid) because they carry
       higher specificity (3 classes vs. 1) than a plain override would, so a
       lower-specificity rule in this media query could never actually beat
       them; matching specificity is required to win the cascade. */
    .services-grid-grid,
    .services-grid.cols-2 .services-grid-grid,
    .services-grid.cols-4 .services-grid-grid {
        grid-template-columns: repeat(2, 1fr);
    }
	
	.step-item {
		flex: 1 1 50%;
		max-width: auto;
	}
}

@media (max-width: 767.98px) {
    .services-grid { padding: 56px 0; }
    .services-grid-grid,
    .services-grid.cols-2 .services-grid-grid,
    .services-grid.cols-4 .services-grid-grid {
        grid-template-columns: 1fr;
    }
    .service-textbox { padding: 28px; }

    /* Steps stack vertically below tablet — the horizontal connecting line
       only makes sense when every step sits in one row, so it's dropped
       entirely rather than trying to reorient it. */
    .services-grid-steps { flex-direction: column; align-items: center; margin-top: 32px; }
    .step-item::after { display: none; }
    .step-item { max-width: 320px; }
}
