/* ==========================================================================
   DeshipOS — Solutions widget
   Header + responsive grid of image cards with overlapping icon + arrow.
   Depends on assets/css/base.css for design tokens.
   ========================================================================== */

.deshipos-solutions {
	--dsl-text:        var(--dew-ink, #0F172A);
	--dsl-muted:       var(--dew-muted, #475569);
	--dsl-accent:      var(--dew-brand, #16A34A);
	--dsl-accent-soft: var(--dew-brand-soft, rgba(22, 163, 74, .12));
	--dsl-border:      var(--dew-divider, #E2E8F0);
	--dsl-card-bg:     #FFFFFF;

	box-sizing: border-box;
	width: 100%;
	padding: 56px 20px;
	background: transparent;
	color: var(--dsl-text);
}
.deshipos-solutions *,
.deshipos-solutions *::before,
.deshipos-solutions *::after { box-sizing: border-box; }

.deshipos-solutions__inner {
	max-width: 1200px;
	margin: 0 auto;
}

/* ----- Header ----- */
.deshipos-solutions__head {
	text-align: center;
	margin: 0 auto 36px;
	max-width: 680px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
}
.deshipos-solutions__eyebrow {
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--dsl-accent);
}
.deshipos-solutions__heading {
	margin: 0;
	font-size: clamp(1.5rem, 3.4vw, 2.125rem);
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: var(--dew-tracking-tight);
	color: var(--dsl-text);
}

/* ----- Grid ----- */
.deshipos-solutions__grid {
	display: grid;
	grid-template-columns: repeat(1, 1fr);
	gap: 24px;
}

/* ----- Card ----- */
.deshipos-solutions__card {
	display: flex;
	flex-direction: column;
	background: var(--dsl-card-bg);
	border: 1px solid var(--dsl-border);
	border-radius: 16px;
	overflow: hidden;
	transition: transform var(--dew-dur-base) var(--dew-ease-out),
	            box-shadow var(--dew-dur-base) var(--dew-ease-out);
}
.deshipos-solutions__card:hover {
	transform: translateY(-4px);
	box-shadow: var(--dew-shadow-lg);
}

/* ----- Media (image + overlapping icon) ----- */
.deshipos-solutions__media {
	position: relative;
	height: 210px;
	border-radius: 16px 16px 0 0;
	overflow: visible; /* let the icon spill below the image edge */
	background: var(--dsl-accent-soft);
}
.deshipos-solutions__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border-radius: 16px 16px 0 0;
}

/* Soft white fade — the photo blends into the card body toward the bottom,
   so the overlapping icon sits in a clean area (matches the reference). */
.deshipos-solutions__media::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 60%;
	background: linear-gradient(to bottom,
		rgba(255, 255, 255, 0) 0%,
		rgba(255, 255, 255, .7) 55%,
		var(--dsl-card-bg) 100%);
	pointer-events: none;
	z-index: 1;
}

/* Green circle icon — overlaps the bottom edge of the image. */
.deshipos-solutions__icon {
	position: absolute;
	left: 18px;
	bottom: -24px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--dsl-accent);
	color: #FFFFFF;
	box-shadow: 0 6px 16px rgba(22, 163, 74, .35);
}
.deshipos-solutions__icon svg {
	width: 20px;
	height: 20px;
	display: block;
	fill: currentColor;
}
.deshipos-solutions__icon svg path,
.deshipos-solutions__icon svg g,
.deshipos-solutions__icon svg circle,
.deshipos-solutions__icon svg rect,
.deshipos-solutions__icon svg polygon {
	fill: currentColor;
}
.deshipos-solutions__icon i { font-size: 19px; line-height: 1; color: currentColor; }

/* ----- Body ----- */
.deshipos-solutions__body {
	position: relative;
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 44px 24px 28px; /* top padding clears the overlapping icon */
}

.deshipos-solutions__title {
	margin: 0;
	font-size: 1.1875rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--dsl-text);
	letter-spacing: var(--dew-tracking-snug);
}

.deshipos-solutions__desc {
	margin: 0;
	font-size: .9375rem;
	line-height: 1.6;
	color: var(--dsl-muted);
	padding-right: 48px; /* keep text clear of the arrow button */
}

/* ----- Arrow button (bottom-right) ----- */
.deshipos-solutions__arrow {
	position: absolute;
	right: 18px;
	bottom: 18px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--dsl-accent-soft);
	color: var(--dsl-accent);
	text-decoration: none;
	flex-shrink: 0;
	transition: background-color var(--dew-dur-fast) var(--dew-ease-out),
	            color var(--dew-dur-fast) var(--dew-ease-out),
	            transform var(--dew-dur-fast) var(--dew-ease-out);
}
.deshipos-solutions__arrow:hover {
	background: var(--dsl-accent);
	color: #FFFFFF;
	transform: translateX(2px);
}
.deshipos-solutions__arrow svg { display: block; }

/* ==========================================================================
   Responsive — 1 col (mobile) → 2 col (tablet) → 4 col (desktop).
   The `columns` control overrides these per-breakpoint when used.
   ========================================================================== */
@media (min-width: 600px) {
	.deshipos-solutions {
		padding: 64px 32px;
	}
	.deshipos-solutions__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 960px) {
	.deshipos-solutions {
		padding: 80px 40px;
	}
	.deshipos-solutions__grid {
		grid-template-columns: repeat(4, 1fr);
	}
	.deshipos-solutions__head {
		margin-bottom: 44px;
	}
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.deshipos-solutions__card,
	.deshipos-solutions__arrow {
		transition-duration: .01ms !important;
	}
}
