/* ==========================================================================
   HG CTA Box
   ========================================================================== */

.hgcta {
	--hgcta-accent: #4f46e5;
	--hgcta-hl: #fde68a;
	--hgcta-jc: left;
	--hgcta-shape: rgba(255, 255, 255, .12);
	--hgcta-shape-size: 340px;
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
	overflow: hidden;
	isolation: isolate;
	box-sizing: border-box;
	border-radius: 24px;
	text-align: left;
}

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

.hgcta__inner {
	position: relative;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: var(--hgcta-jc);
	gap: 48px;
	width: 100%;
	min-width: 0;
}

.hgcta__content {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 32px;
	flex: 1 1 auto;
	min-width: 0;
}

.hgcta__body {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.hgcta__text {
	min-width: 0;
}

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

.hgcta .hgcta__icon-wrap {
	margin-bottom: 22px;
}

.hgcta .hgcta__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	font-size: 28px;
	line-height: 1;
	color: inherit;
	background-color: rgba(255, 255, 255, .16);
	border-radius: 18px;
}

.hgcta .hgcta__icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.hgcta .hgcta__eyebrow-wrap {
	margin-bottom: 18px;
}

.hgcta .hgcta__eyebrow {
	display: inline-flex;
	align-items: center;
	padding: 7px 16px;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: inherit;
	background-color: rgba(255, 255, 255, .16);
	border: 1px solid rgba(255, 255, 255, .22);
	border-radius: 999px;
}

.hgcta .hgcta__title {
	margin: 0 0 16px;
	padding: 0;
	font-size: clamp(30px, 4.2vw, 52px);
	font-weight: 800;
	line-height: 1.12;
	letter-spacing: -.02em;
	color: inherit;
}

.hgcta .hgcta__title span {
	color: var(--hgcta-hl);
}

.hgcta .hgcta__desc {
	margin: 0;
	font-size: 18px;
	line-height: 1.65;
	color: inherit;
	opacity: .9;
}

.hgcta .hgcta__desc p {
	margin: 0;
	color: inherit;
}

.hgcta .hgcta__desc p + p {
	margin-top: .8em;
}

.hgcta .hgcta__note {
	margin-top: 16px;
	font-size: 13.5px;
	line-height: 1.4;
	color: inherit;
	opacity: .78;
}

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

.hgcta .hgcta__buttons {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: var(--hgcta-jc);
	gap: 14px;
}

.hgcta .hgcta__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 16px 32px;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.1;
	text-decoration: none;
	color: var(--hgcta-fg, #fff);
	border: 2px solid transparent;
	border-radius: 999px;
	box-shadow: none;
	cursor: pointer;
	transition: transform .3s ease, box-shadow .3s ease, background-color .3s ease, color .3s ease, border-color .3s ease, filter .3s ease;
}

.hgcta .hgcta__btn--icon-before {
	flex-direction: row-reverse;
}

.hgcta .hgcta__btn:hover,
.hgcta .hgcta__btn:focus {
	color: var(--hgcta-fg, #fff);
	text-decoration: none;
	transform: translateY(-3px);
}

.hgcta .hgcta__btn:focus-visible {
	outline: 3px solid rgba(255, 255, 255, .6);
	outline-offset: 3px;
}

.hgcta .hgcta__btn-icon {
	display: inline-flex;
	font-size: .9em;
	transition: transform .3s ease;
}

.hgcta .hgcta__btn-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.hgcta .hgcta__btn--icon-after:hover .hgcta__btn-icon {
	transform: translateX(4px);
}

.hgcta .hgcta__btn--icon-before:hover .hgcta__btn-icon {
	transform: translateX(-4px);
}

/* Primary */
.hgcta .hgcta__btn--primary {
	--hgcta-fg: #fff;
	background-color: var(--hgcta-accent);
}

.hgcta .hgcta__btn--primary:hover,
.hgcta .hgcta__btn--primary:focus {
	filter: brightness(1.1);
	box-shadow: 0 14px 30px rgba(0, 0, 0, .25);
}

/* Secondary (outline) */
.hgcta .hgcta__btn--secondary {
	--hgcta-fg: #fff;
	background-color: transparent;
	border-color: rgba(255, 255, 255, .45);
}

.hgcta .hgcta__btn--secondary:hover,
.hgcta .hgcta__btn--secondary:focus {
	background-color: rgba(255, 255, 255, .14);
	border-color: #fff;
}

/* ---------- Decorative shapes ---------- */

.hgcta__shape {
	position: absolute;
	z-index: 1;
	width: var(--hgcta-shape-size);
	height: var(--hgcta-shape-size);
	border-radius: 50%;
	background: var(--hgcta-shape);
	pointer-events: none;
}

.hgcta__shape--1 {
	top: calc(var(--hgcta-shape-size) * -.38);
	left: calc(var(--hgcta-shape-size) * -.28);
}

.hgcta__shape--2 {
	bottom: calc(var(--hgcta-shape-size) * -.45);
	right: calc(var(--hgcta-shape-size) * -.22);
	transform: scale(.82);
}

/* ==========================================================================
   Layout 1 – Centered Gradient Banner
   ========================================================================== */

.hgcta--centered {
	--hgcta-jc: center;
	padding: 88px 48px;
	color: #fff;
	text-align: center;
	background-color: #4f46e5;
}

.hgcta--centered:not(.hgcta--custom-bg) {
	background-image: linear-gradient(135deg, #4f46e5 0%, #7c3aed 55%, #db2777 100%);
}

.hgcta--centered .hgcta__content {
	flex: 0 1 780px;
	align-items: stretch;
}

.hgcta--centered .hgcta__btn--primary {
	--hgcta-fg: var(--hgcta-accent);
	background-color: #fff;
}

.hgcta--centered .hgcta__btn--primary:hover,
.hgcta--centered .hgcta__btn--primary:focus {
	filter: none;
	background-color: #f1f5f9;
}

/* ==========================================================================
   Layout 2 – Split Image Card
   ========================================================================== */

.hgcta--split {
	--hgcta-hl: var(--hgcta-accent);
	padding: 0;
	color: #0f172a;
	background-color: #fff;
	box-shadow: 0 24px 64px rgba(15, 23, 42, .12);
}

.hgcta--split .hgcta__inner {
	gap: 0;
	align-items: stretch;
}

.hgcta--split.hgcta--media-right .hgcta__inner {
	flex-direction: row-reverse;
}

.hgcta--split .hgcta__media {
	position: relative;
	flex: 0 0 46%;
	min-height: 400px;
	overflow: hidden;
}

.hgcta--split .hgcta__media img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center center;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.hgcta--split .hgcta__content {
	flex: 1 1 0;
	justify-content: center;
	padding: 64px 56px;
}

.hgcta--split .hgcta__desc {
	color: #475569;
	opacity: 1;
}

.hgcta--split .hgcta__note {
	color: #64748b;
	opacity: 1;
}

.hgcta--split .hgcta__eyebrow,
.hgcta--split .hgcta__icon {
	color: var(--hgcta-accent);
	background-color: rgba(79, 70, 229, .1);
	background-color: color-mix(in srgb, var(--hgcta-accent) 12%, transparent);
	border-color: transparent;
}

.hgcta--split .hgcta__btn--secondary {
	--hgcta-fg: #0f172a;
	border-color: rgba(15, 23, 42, .18);
}

.hgcta--split .hgcta__btn--secondary:hover,
.hgcta--split .hgcta__btn--secondary:focus {
	background-color: rgba(15, 23, 42, .05);
	border-color: rgba(15, 23, 42, .5);
}

.hgcta--split .hgcta__btn:focus-visible {
	outline-color: var(--hgcta-accent);
}

/* ==========================================================================
   Layout 3 – Compact Action Bar
   ========================================================================== */

.hgcta--bar {
	--hgcta-hl: #a5b4fc;
	--hgcta-shape-size: 240px;
	--hgcta-shape: rgba(129, 140, 248, .16);
	padding: 40px 48px;
	color: #fff;
	background-color: #0f172a;
	border-radius: 20px;
}

.hgcta--bar:not(.hgcta--custom-bg) {
	background-image: linear-gradient(100deg, rgba(79, 70, 229, .45) 0%, rgba(79, 70, 229, 0) 60%);
}

.hgcta--bar .hgcta__content {
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: 40px;
}

.hgcta--bar .hgcta__body {
	flex: 1 1 auto;
	flex-direction: row;
	align-items: center;
	gap: 22px;
}

.hgcta--bar .hgcta__icon-wrap {
	flex: 0 0 auto;
	margin-bottom: 0;
}

.hgcta--bar .hgcta__eyebrow-wrap {
	margin-bottom: 10px;
}

.hgcta--bar .hgcta__title {
	margin-bottom: 8px;
	font-size: clamp(22px, 2.6vw, 32px);
}

.hgcta--bar .hgcta__desc {
	font-size: 16px;
	line-height: 1.55;
}

.hgcta--bar .hgcta__actions {
	--hgcta-jc: flex-start;
	flex: 0 0 auto;
}

.hgcta--bar .hgcta__btn {
	padding: 15px 28px;
	white-space: nowrap;
}

/* ==========================================================================
   Layout 4 – Image Overlay + Glass Panel
   ========================================================================== */

.hgcta--overlay {
	min-height: 480px;
	padding: 72px 56px;
	color: #fff;
	background-color: #0b1020;
}

.hgcta--overlay:not(.hgcta--custom-bg) {
	background-image: linear-gradient(135deg, #0f172a 0%, #312e81 100%);
}

.hgcta__bgimg {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.hgcta__bgimg img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center center;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.hgcta__overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
}

.hgcta--overlay:not(.hgcta--custom-overlay) .hgcta__overlay {
	background-image: linear-gradient(90deg, rgba(8, 12, 28, .86) 0%, rgba(8, 12, 28, .55) 55%, rgba(8, 12, 28, .18) 100%);
}

.hgcta--overlay .hgcta__content {
	flex: 0 1 680px;
}

.hgcta--glass .hgcta__content {
	flex: 0 1 640px;
	padding: 48px 52px;
	background-color: rgba(255, 255, 255, .1);
	border: 1px solid rgba(255, 255, 255, .22);
	border-radius: 24px;
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
	box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
	.hgcta--centered { padding: 72px 40px; }
	.hgcta--overlay { padding: 56px 36px; }
	.hgcta--bar { padding: 34px 36px; }
	.hgcta--split .hgcta__content { padding: 48px 40px; }
	.hgcta--glass .hgcta__content { padding: 40px 36px; }

	.hgcta--stack-tablet.hgcta--split .hgcta__inner {
		flex-direction: column;
		align-items: stretch;
	}

	.hgcta--stack-tablet.hgcta--split .hgcta__media {
		flex: 0 0 auto !important;
		width: 100% !important;
		min-height: 280px;
	}

	.hgcta--stack-tablet.hgcta--bar .hgcta__content {
		flex-direction: column;
		align-items: flex-start;
		gap: 26px;
	}

	.hgcta--stack-tablet.hgcta--bar .hgcta__actions {
		width: 100%;
	}
}

@media (max-width: 767px) {
	.hgcta--centered { padding: 56px 24px; }
	.hgcta--overlay { min-height: 0; padding: 40px 18px; }
	.hgcta--bar { padding: 30px 24px; }
	.hgcta--split .hgcta__content { padding: 34px 26px; }
	.hgcta--glass .hgcta__content { padding: 30px 24px; border-radius: 20px; }

	.hgcta .hgcta__desc { font-size: 16px; }
	.hgcta__inner { gap: 28px; }

	.hgcta--stack-mobile.hgcta--split .hgcta__inner {
		flex-direction: column;
		align-items: stretch;
	}

	.hgcta--stack-mobile.hgcta--split .hgcta__media {
		flex: 0 0 auto !important;
		width: 100% !important;
		min-height: 240px;
	}

	.hgcta--stack-mobile.hgcta--bar .hgcta__content,
	.hgcta--stack-tablet.hgcta--bar .hgcta__content {
		flex-direction: column;
		align-items: flex-start;
		gap: 24px;
	}

	.hgcta--stack-mobile.hgcta--bar .hgcta__actions,
	.hgcta--stack-tablet.hgcta--bar .hgcta__actions {
		width: 100%;
	}

	.hgcta--bar .hgcta__body {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
	}

	.hgcta--bar .hgcta__btn {
		white-space: normal;
	}

	.hgcta--btn-full-mobile .hgcta__buttons {
		flex-direction: column;
		align-items: stretch;
	}

	.hgcta--btn-full-mobile .hgcta__btn {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hgcta .hgcta__btn,
	.hgcta .hgcta__btn-icon {
		transition: none;
	}

	.hgcta .hgcta__btn:hover,
	.hgcta .hgcta__btn:focus {
		transform: none;
	}
}
