/*
 * Giltech Industries We Serve – Elementor widget styles.
 * Everything is scoped under .gwis-section so it cannot leak into the theme or other widgets.
 * Values reproduce giltech-industries-we-serve-premium-image-cards.html exactly.
 * Elementor style controls override them (their selectors are more specific).
 */

/*
 * Elementor flex containers: make this widget's own wrapper take the full available width so the
 * section can never shrink to its (empty) intrinsic width and disappear. Scoped to this widget only.
 */
.elementor-widget-gwis_industries_served {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	flex-shrink: 0;
}

.elementor-widget-gwis_industries_served > .elementor-widget-container {
	width: 100%;
	min-width: 0;
}

/*
 * Safety net: prevent Elementor from hiding this widget with visibility:hidden
 * when no real Elementor motion effect (which would set [data-animation]) is configured.
 */
.elementor-widget-gwis_industries_served.elementor-invisible:not([data-animation]) {
	visibility: visible !important;
	opacity: 1 !important;
}

.gwis-section,
.gwis-section *,
.gwis-section *::before,
.gwis-section *::after {
	box-sizing: border-box;
}

.gwis-section {
	--gwis-ease: cubic-bezier(.2, .72, .2, 1);
	--gwis-glow: rgba(227, 6, 19, .045);
	--gwis-ov: rgba(12, 12, 13, .84);
	--gwis-ov-h: rgba(12, 12, 13, .9);
	--gwis-sat: .84;
	--gwis-sat-h: 1;
	--gwis-text-max: 90px;
	--gwis-btn-shadow: rgba(227, 6, 19, .16);
	position: relative;
	width: 100%;
	padding: clamp(48px, 6vw, 86px) clamp(16px, 4.5vw, 72px) clamp(46px, 5.5vw, 72px);
	background: linear-gradient(180deg, #fff 0%, #f7f7f6 100%);
	overflow: hidden;
	color: #171719;
	font-family: "DM Sans", Manrope, Arial, sans-serif;
	font-size: 16px;
	line-height: normal;
	text-align: start;
	-webkit-font-smoothing: antialiased;
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

/* Soft corner glow (its own layer, so the Background control keeps working). */
.gwis-section::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	background: radial-gradient(ellipse at 90% 0%, var(--gwis-glow), transparent 29rem);
	pointer-events: none;
}

/* Edge-to-edge: CSS fallback, the script then sets exact pixel values. */
.gwis-section.gwis-fullwidth {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
}

.gwis-section.gwis-fullwidth.gwis-fit-failed {
	width: 100%;
	max-width: 100%;
	margin-left: 0;
	margin-right: 0;
}

.gwis-section .gwis-inner {
	position: relative;
	z-index: 1;
	max-width: 1360px;
	margin: 0 auto;
}

/* ---------- Header ---------- */
.gwis-section .gwis-header {
	display: grid;
	grid-template-columns: minmax(0, 1.08fr) minmax(270px, .72fr);
	align-items: end;
	gap: clamp(28px, 5vw, 78px);
	padding-bottom: 30px;
}

.gwis-section .gwis-header-main {
	min-width: 0;
}

.gwis-section .gwis-kicker {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 15px;
	padding: 0;
	color: #E30613;
	font-size: 11px;
	line-height: 1.2;
	font-weight: 700;
	letter-spacing: .17em;
	text-transform: uppercase;
}

.gwis-section .gwis-kicker::before {
	content: "";
	display: block;
	flex: 0 0 auto;
	width: 27px;
	height: 2px;
	background: currentColor;
}

.gwis-section .gwis-title {
	display: block;
	max-width: 760px;
	margin: 0;
	padding: 0;
	border: 0;
	color: #171719;
	font-family: Manrope, "DM Sans", sans-serif;
	font-size: clamp(36px, 4.55vw, 64px);
	font-weight: 500;
	line-height: 1.04;
	letter-spacing: -.055em;
	text-transform: none;
	text-align: start;
	overflow-wrap: break-word;
}

.gwis-section .gwis-title .gwis-title-hl {
	color: #E30613;
	letter-spacing: inherit;
}

.gwis-section .gwis-header-copy {
	max-width: 440px;
	margin: 0 0 4px auto;
	padding: 0;
	color: #666970;
	font-size: 14px;
	line-height: 1.85;
	letter-spacing: normal;
}

/* ---------- Label line ---------- */
.gwis-section .gwis-topline {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	margin-bottom: 17px;
	padding-top: 17px;
	border-top: 1px solid #e4e4e2;
}

.gwis-section .gwis-topline-label {
	color: #77797e;
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: .14em;
	font-weight: 600;
}

.gwis-section .gwis-topline-count {
	color: #898b90;
	font-size: 11px;
	letter-spacing: normal;
	font-variant-numeric: tabular-nums;
}

/* ---------- Grid ---------- */
.gwis-section .gwis-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 15px;
}

.gwis-section .gwis-card {
	position: relative;
	min-width: 0;
	height: clamp(270px, 27vw, 350px);
	margin: 0;
	overflow: hidden;
	isolation: isolate;
	border-radius: 13px;
	background-color: #d9d9d9;
	color: #fff;
	box-shadow: 0 4px 16px rgba(0, 0, 0, .04);
	transform: translateY(0);
	/* Own compositing layer: smooth hover lift and the same crisp text rendering as the original design. */
	will-change: transform;
	transition: transform .42s var(--gwis-ease), box-shadow .42s var(--gwis-ease);
}

.gwis-section .gwis-card:focus-within,
.gwis-section .gwis-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 20px 40px rgba(0, 0, 0, .15);
}

.gwis-section .gwis-media {
	position: absolute;
	inset: 0;
	z-index: -2;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	object-fit: cover;
	transition: transform .9s var(--gwis-ease), filter .7s ease;
	filter: saturate(var(--gwis-sat));
}

.gwis-section .gwis-card:hover .gwis-media {
	transform: scale(1.055);
	filter: saturate(var(--gwis-sat-h));
}

/* Bottom-fade overlay */
.gwis-section .gwis-card::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(180deg, rgba(12, 12, 13, .08) 0%, rgba(12, 12, 13, .12) 31%, var(--gwis-ov) 100%);
	transition: background .35s ease;
	pointer-events: none;
}

.gwis-section .gwis-card:hover::before {
	background: linear-gradient(180deg, rgba(12, 12, 13, .12) 0%, rgba(12, 12, 13, .2) 23%, var(--gwis-ov-h) 100%);
}

/* Optional whole-card link (stretched). */
.gwis-section a.gwis-card-link,
.gwis-section a.gwis-card-link:hover,
.gwis-section a.gwis-card-link:focus {
	position: absolute;
	inset: 0;
	z-index: 3;
	display: block;
	background: transparent;
	text-decoration: none;
	box-shadow: none;
}

.gwis-section a.gwis-card-link:focus-visible {
	outline: 2px solid #fff;
	outline-offset: -4px;
}

/* ---------- Card top (number + icon) ---------- */
.gwis-section .gwis-card-top {
	position: absolute;
	top: 15px;
	left: 15px;
	right: 15px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.gwis-section .gwis-number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 30px;
	padding: 0 9px;
	border: 1px solid rgba(255, 255, 255, .38);
	border-radius: 6px;
	background-color: rgba(20, 20, 20, .18);
	color: #fff;
	font-size: 10px;
	line-height: normal;
	letter-spacing: .08em;
	-webkit-backdrop-filter: blur(9px);
	backdrop-filter: blur(9px);
}

.gwis-section .gwis-mark {
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	letter-spacing: normal;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, .56);
	color: #fff;
	background-color: rgba(20, 20, 20, .14);
	transition: background-color .3s ease, border-color .3s ease, transform .3s var(--gwis-ease);
	-webkit-backdrop-filter: blur(9px);
	backdrop-filter: blur(9px);
}

.gwis-section .gwis-mark svg {
	display: block;
	width: 15px;
	height: 15px;
}

.gwis-section .gwis-mark--custom svg {
	fill: currentColor;
}

.gwis-section .gwis-mark--custom i {
	display: block;
	font-size: 15px;
	line-height: 1;
}

.gwis-section .gwis-card:hover .gwis-mark {
	background-color: #E30613;
	border-color: #E30613;
	transform: rotate(45deg);
}

/* ---------- Card content ---------- */
.gwis-section .gwis-card-content {
	position: absolute;
	left: 19px;
	right: 19px;
	bottom: 20px;
}

.gwis-section .gwis-tag {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin-bottom: 10px;
	color: #fff;
	font-size: 9px;
	line-height: 1.4;
	letter-spacing: .13em;
	text-transform: uppercase;
	font-weight: 600;
	opacity: .84;
}

.gwis-section .gwis-tag::before {
	content: "";
	flex: 0 0 auto;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background-color: #E30613;
	box-shadow: 0 0 0 3px rgba(227, 6, 19, .2);
}

.gwis-section .gwis-card-title {
	max-width: 290px;
	margin: 0;
	padding: 0;
	border: 0;
	color: #fff;
	font-family: Manrope, "DM Sans", sans-serif;
	font-size: clamp(17px, 1.45vw, 21px);
	line-height: 1.22;
	letter-spacing: -.035em;
	font-weight: 600;
	text-transform: none;
	text-align: start;
	overflow-wrap: break-word;
}

.gwis-section .gwis-card-text {
	max-width: 310px;
	max-height: 0;
	overflow: hidden;
	margin: 0;
	padding: 0;
	color: rgba(255, 255, 255, .84);
	font-size: 11px;
	line-height: 1.65;
	letter-spacing: normal;
	opacity: 0;
	transform: translateY(7px);
	transition: max-height .45s var(--gwis-ease), opacity .35s ease, transform .4s var(--gwis-ease), margin .35s ease;
}

.gwis-section .gwis-card:hover .gwis-card-text,
.gwis-section .gwis-card:focus-within .gwis-card-text,
.gwis-section.gwis-text-always .gwis-card-text {
	max-height: var(--gwis-text-max);
	margin-top: 9px;
	opacity: 1;
	transform: translateY(0);
}

/* ---------- Entrance animation ---------- */
/*
 * "backwards" (not "both"): the card is hidden during its delay and starts from the faded-down pose,
 * but once the animation has finished the normal styles take over again. With "both", the finished
 * animation would keep overriding the hover lift (transform) of the card.
 */
.gwis-section.gwis-animate .gwis-card {
	animation: gwisFadeUp .7s var(--gwis-ease) backwards;
}

.gwis-section.gwis-animate .gwis-card:nth-child(2)    { animation-delay: .06s; }
.gwis-section.gwis-animate .gwis-card:nth-child(3)    { animation-delay: .12s; }
.gwis-section.gwis-animate .gwis-card:nth-child(4)    { animation-delay: .18s; }
.gwis-section.gwis-animate .gwis-card:nth-child(5)    { animation-delay: .24s; }
.gwis-section.gwis-animate .gwis-card:nth-child(6)    { animation-delay: .30s; }
.gwis-section.gwis-animate .gwis-card:nth-child(7)    { animation-delay: .36s; }
.gwis-section.gwis-animate .gwis-card:nth-child(8)    { animation-delay: .42s; }
.gwis-section.gwis-animate .gwis-card:nth-child(9)    { animation-delay: .48s; }
.gwis-section.gwis-animate .gwis-card:nth-child(10)   { animation-delay: .54s; }
.gwis-section.gwis-animate .gwis-card:nth-child(11)   { animation-delay: .60s; }
.gwis-section.gwis-animate .gwis-card:nth-child(12)   { animation-delay: .66s; }
.gwis-section.gwis-animate .gwis-card:nth-child(n+13) { animation-delay: .72s; }

/* "Play when scrolled into view": the script holds the animation until the section is visible. */
.gwis-section.gwis-animate.gwis-pending .gwis-card {
	opacity: 0;
	animation: gwisFailsafe .6s var(--gwis-ease) 3s forwards;
}

/* CSS-only safety net: if the script never releases the cards, they still appear after 3 seconds. */
@keyframes gwisFailsafe {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@keyframes gwisFadeUp {
	from {
		opacity: 0;
		transform: translateY(13px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ---------- Bottom bar ---------- */
.gwis-section .gwis-bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	margin-top: 24px;
	padding: 23px 0 0;
	border-top: 1px solid #e1e1df;
}

.gwis-section .gwis-bottom-copy {
	min-width: 0;
	color: #666970;
	font-size: 12px;
	line-height: 1.65;
}

.gwis-section .gwis-bottom-title {
	display: block;
	margin-bottom: 3px;
	color: #171719;
	font-family: Manrope, "DM Sans", sans-serif;
	font-size: 17px;
	font-weight: 600;
	letter-spacing: -.025em;
}

.gwis-section .gwis-bottom-text {
	font-size: inherit;
	color: inherit;
	letter-spacing: inherit;
}

/* ---------- Button ---------- */
.gwis-section .gwis-cta,
.gwis-section a.gwis-cta,
.gwis-section a.gwis-cta:visited {
	min-height: 47px;
	padding: 0 20px;
	border: 1px solid #E30613;
	border-radius: 7px;
	background-color: #E30613;
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 18px;
	text-decoration: none;
	font-size: 10px;
	line-height: 1;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	white-space: nowrap;
	cursor: pointer;
	box-shadow: none;
	transition: background-color .25s ease, border-color .25s ease, transform .25s var(--gwis-ease), box-shadow .25s ease;
}

.gwis-section .gwis-cta-text {
	letter-spacing: inherit;
}

.gwis-section .gwis-cta-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: inherit;
	letter-spacing: inherit;
	transition: transform .25s var(--gwis-ease);
}

.gwis-section .gwis-cta-icon svg {
	display: block;
	width: 15px;
	height: 15px;
}

.gwis-section .gwis-cta-icon--custom svg {
	fill: currentColor;
}

.gwis-section .gwis-cta-icon--custom i {
	display: block;
	font-size: 15px;
	line-height: 1;
}

.gwis-section a.gwis-cta:hover,
.gwis-section a.gwis-cta:focus-visible {
	background-color: #BC0010;
	border-color: #BC0010;
	color: #fff;
	text-decoration: none;
	transform: translateY(-2px);
	box-shadow: 0 9px 18px var(--gwis-btn-shadow);
}

.gwis-section a.gwis-cta:hover .gwis-cta-icon,
.gwis-section a.gwis-cta:focus-visible .gwis-cta-icon {
	transform: translateX(3px);
}

/* ---------- Large screens ---------- */
@media (min-width: 1500px) {
	.gwis-section .gwis-card {
		height: 360px;
	}
}

/* ---------- Tablet ---------- */
@media (max-width: 1050px) {
	.gwis-section {
		padding-left: 28px;
		padding-right: 28px;
	}

	.gwis-section .gwis-header {
		grid-template-columns: 1fr;
		gap: 19px;
	}

	.gwis-section .gwis-header-copy {
		margin: 0;
		max-width: 650px;
	}

	.gwis-section .gwis-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 14px;
	}

	.gwis-section .gwis-card {
		height: 330px;
	}

	.gwis-section .gwis-card-title {
		font-size: 22px;
	}

	/* No hover on touch screens: the card text is always shown. */
	.gwis-section .gwis-card-text {
		max-height: var(--gwis-text-max);
		margin-top: 9px;
		opacity: 1;
		transform: none;
	}
}

/* ---------- Phone ---------- */
@media (max-width: 600px) {
	.gwis-section {
		padding: 42px 15px 42px;
	}

	.gwis-section .gwis-header {
		padding-bottom: 24px;
		gap: 14px;
	}

	.gwis-section .gwis-kicker {
		font-size: 10px;
		margin-bottom: 13px;
	}

	.gwis-section .gwis-title {
		font-size: clamp(35px, 9vw, 47px);
		line-height: 1.05;
	}

	.gwis-section .gwis-header-copy {
		font-size: 13px;
		line-height: 1.75;
	}

	.gwis-section .gwis-topline {
		margin-bottom: 12px;
		padding-top: 14px;
	}

	.gwis-section .gwis-grid {
		gap: 9px;
	}

	.gwis-section .gwis-card {
		height: 270px;
		border-radius: 10px;
	}

	.gwis-section .gwis-card-top {
		top: 10px;
		left: 10px;
		right: 10px;
	}

	.gwis-section .gwis-number {
		height: 27px;
		min-width: 30px;
		font-size: 9px;
	}

	.gwis-section .gwis-mark {
		width: 28px;
		height: 28px;
	}

	.gwis-section .gwis-card-content {
		left: 12px;
		right: 12px;
		bottom: 14px;
	}

	.gwis-section .gwis-tag {
		font-size: 8px;
		letter-spacing: .08em;
		margin-bottom: 7px;
	}

	.gwis-section .gwis-card-title {
		font-size: 15px;
		line-height: 1.25;
	}

	.gwis-section .gwis-card-text,
	.gwis-section .gwis-card:hover .gwis-card-text,
	.gwis-section .gwis-card:focus-within .gwis-card-text,
	.gwis-section.gwis-text-always .gwis-card-text {
		font-size: 10px;
		line-height: 1.5;
		margin-top: 7px;
	}

	.gwis-section .gwis-bottom {
		display: block;
		margin-top: 20px;
		padding-top: 18px;
	}

	.gwis-section .gwis-bottom-copy {
		font-size: 12px;
	}

	.gwis-section .gwis-bottom-title {
		font-size: 17px;
	}

	.gwis-section .gwis-cta,
	.gwis-section a.gwis-cta {
		display: flex;
		width: 100%;
		margin-top: 15px;
		min-height: 46px;
	}
}

/* ---------- Very small phones ---------- */
@media (max-width: 390px) {
	.gwis-section .gwis-grid {
		grid-template-columns: 1fr;
	}

	.gwis-section .gwis-card {
		height: 300px;
	}

	.gwis-section .gwis-card-title {
		font-size: 20px;
	}

	.gwis-section .gwis-card-text,
	.gwis-section .gwis-card:hover .gwis-card-text,
	.gwis-section .gwis-card:focus-within .gwis-card-text,
	.gwis-section.gwis-text-always .gwis-card-text {
		font-size: 11px;
	}
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	.gwis-section,
	.gwis-section *,
	.gwis-section *::before,
	.gwis-section *::after {
		animation: none !important;
		transition: none !important;
	}

	.gwis-section .gwis-card {
		transform: none !important;
	}
}
