/*
 * Alnafie Metal Industries – CTA Boxes
 * ------------------------------------------------------------------
 * Styled after alnafie-indust.com: Avada global colours (#157EBF blue,
 * #F2F2F2 / #E5E5E5 / #737373 / #474747 greys), the footer's grey
 * gradient, square buttons with the site's diagonal dark corner, and
 * the theme font (Tajawal on the site, inherited here).
 *
 * Colours and corner radius come from the settings page; the values
 * below are only the fallback. ".nicta.nicta" repeats the class on
 * purpose: it raises specificity so article styles (p, a, h2 …) from
 * the theme can't override the boxes.
 */

.nicta.nicta {
	--nicta-brand: #157EBF;
	--nicta-brand-dark: #11679C;
	--nicta-dark-from: #595959;
	--nicta-dark-to: #262626;
	--nicta-light-bg: #F2F2F2;
	--nicta-light-border: #E5E5E5;
	--nicta-light-pill: #E3F0F7;
	--nicta-heading: #474747;
	--nicta-muted: #737373;
	--nicta-radius: 4px;
	--nicta-btn-radius: 0px;

	box-sizing: border-box;
	clear: both;
	width: 100%;
	max-width: 100%;
	margin: 2rem 0;
	padding: 0;
	border-radius: var(--nicta-radius);
	overflow: hidden;
	text-align: center;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.55;
	letter-spacing: normal;
}

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

.nicta.nicta .nicta__body {
	padding: 22px 24px 17px;
}

/* ---------- Text ---------- */

.nicta.nicta .nicta__title {
	margin: 0;
	padding: 0;
	border: 0;
	font-family: inherit;
	font-size: 16.5px;
	font-weight: 700;
	line-height: 1.45;
	text-transform: none;
	letter-spacing: normal;
}

.nicta.nicta .nicta__title::before,
.nicta.nicta .nicta__title::after {
	content: none;
	display: none;
}

.nicta.nicta .nicta__sub {
	margin: 8px 0 0;
	padding: 0;
	font-size: 14px;
	line-height: 1.5;
}

.nicta.nicta .nicta__name {
	margin: 0;
	padding: 0;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.4;
}

.nicta.nicta .nicta__tagline {
	margin: 6px 0 0;
	padding: 0;
	font-size: 13px;
	line-height: 1.55;
}

.nicta.nicta .nicta__pill {
	display: inline-block;
	margin: 12px 0 0;
	padding: 5px 14px;
	border-radius: var(--nicta-radius);
	font-size: 12px;
	font-weight: 700;
	line-height: 17px;
	letter-spacing: .02em;
}

/* ---------- Buttons ---------- */

.nicta.nicta .nicta__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin: 18px 0 0;
	padding: 0;
}

.nicta.nicta .nicta-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	min-width: 150px;
	min-height: 42px;
	margin: 0;
	padding: 8px 22px;
	border: 2px solid transparent;
	border-radius: var(--nicta-btn-radius);
	box-shadow: none;
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	text-transform: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.nicta.nicta .nicta-btn:hover,
.nicta.nicta .nicta-btn:focus,
.nicta.nicta .nicta-btn:active {
	text-decoration: none;
	box-shadow: none;
}

.nicta.nicta .nicta-btn:focus-visible {
	outline: 2px solid var(--nicta-brand);
	outline-offset: 3px;
}

.nicta.nicta .nicta-ico {
	display: block;
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	margin: 0;
	color: currentColor;
}

.nicta.nicta .nicta-ico--mail {
	width: 17px;
	height: 17px;
}

/* The site's primary button: blue with a small darker diagonal corner (fixed size at any width). */
.nicta.nicta .nicta-btn--call,
.nicta.nicta .nicta-btn--call:visited {
	background: var(--nicta-brand);
	background-image: linear-gradient(135deg, var(--nicta-brand) calc(100% - 18px), var(--nicta-brand-dark) calc(100% - 18px));
	border-color: var(--nicta-brand);
	color: #fff;
}

.nicta.nicta .nicta-btn--call:hover {
	background: var(--nicta-brand-dark);
	background-image: none;
	border-color: var(--nicta-brand-dark);
	color: #fff;
}

/* ---------- Product box (light) ---------- */

.nicta.nicta--product {
	background: var(--nicta-light-bg);
	border: 1px solid var(--nicta-light-border);
	border-top: 3px solid var(--nicta-brand);
	color: var(--nicta-heading);
}

.nicta.nicta--product .nicta__title {
	color: var(--nicta-heading);
}

.nicta.nicta--product .nicta__sub,
.nicta.nicta--product .nicta__tagline {
	color: var(--nicta-muted);
}

.nicta.nicta--product .nicta-btn--msg,
.nicta.nicta--product .nicta-btn--msg:visited {
	background: #fff;
	border-color: var(--nicta-brand);
	color: var(--nicta-brand);
}

.nicta.nicta--product .nicta-btn--msg:hover {
	background: var(--nicta-brand);
	color: #fff;
}

.nicta.nicta--product .nicta__brand {
	margin: 17px 0 0;
	padding: 14px 0 0;
	border-top: 1px solid var(--nicta-light-border);
}

.nicta.nicta--product .nicta__name {
	color: var(--nicta-brand);
}

.nicta.nicta--product .nicta__pill {
	background: var(--nicta-light-pill);
	color: var(--nicta-brand);
}

/* Optional product image */
.nicta.nicta--has-img {
	display: grid;
	grid-template-columns: minmax(150px, 30%) 1fr;
	align-items: stretch;
}

.nicta.nicta .nicta__media {
	position: relative;
	margin: 0;
	min-height: 160px;
	overflow: hidden;
	background: var(--nicta-light-border);
}

.nicta.nicta .nicta__media .nicta__img {
	position: absolute;
	top: 0;
	left: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	margin: 0;
	border: 0;
	border-radius: 0;
	object-fit: cover;
}

.nicta.nicta--has-img .nicta__body {
	align-self: center;
}

/* ---------- Industrial projects box (dark, before the FAQ) ---------- */

.nicta.nicta--general {
	background: var(--nicta-dark-to);
	background-image: linear-gradient(180deg, var(--nicta-dark-from) 0%, var(--nicta-dark-to) 100%);
	border: 0;
	border-top: 4px solid var(--nicta-brand);
	color: #fff;
}

.nicta.nicta--general .nicta__body {
	padding: 24px 24px 19px;
}

.nicta.nicta--general .nicta__title {
	color: #fff;
	font-size: 19px;
	line-height: 1.4;
}

.nicta.nicta--general .nicta__sub {
	color: rgba(255, 255, 255, .85);
}

.nicta.nicta--general .nicta__tagline {
	color: rgba(255, 255, 255, .75);
}

.nicta.nicta--general .nicta__sub + .nicta__actions {
	margin-top: 18px;
}

.nicta.nicta--general .nicta-btn--msg,
.nicta.nicta--general .nicta-btn--msg:visited {
	background: transparent;
	border-color: #fff;
	color: #fff;
}

.nicta.nicta--general .nicta-btn--msg:hover {
	background: #fff;
	color: var(--nicta-dark-to);
}

.nicta.nicta--general .nicta-btn:focus-visible {
	outline-color: #fff;
}

.nicta.nicta--general .nicta__brand {
	margin: 18px 0 0;
	padding: 15px 0 0;
	border-top: 1px solid rgba(255, 255, 255, .2);
}

.nicta.nicta--general .nicta__name {
	color: #fff;
}

.nicta.nicta--general .nicta__pill {
	background: rgba(255, 255, 255, .1);
	color: #fff;
}

/* ---------- Mobile ---------- */

@media (max-width: 600px) {
	.nicta.nicta--has-img {
		grid-template-columns: 1fr;
	}

	.nicta.nicta .nicta__media {
		min-height: 0;
		height: 180px;
	}
}

@media (max-width: 480px) {
	.nicta.nicta .nicta__body,
	.nicta.nicta--general .nicta__body {
		padding: 22px 16px 18px;
	}

	.nicta.nicta .nicta__actions {
		flex-direction: column;
		align-items: stretch;
	}

	.nicta.nicta .nicta-btn {
		width: 100%;
		min-height: 48px;
	}

	.nicta.nicta--general .nicta__title {
		font-size: 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.nicta.nicta .nicta-btn {
		transition: none;
	}
}

@media print {
	.nicta.nicta {
		display: none;
	}
}
