/* =================================================================
   Emerald Program Tabs widget — flex layout
   ================================================================= */

.emerald-program-tabs {
	--emerald-pt-nav-width: 28%;
	--emerald-pt-gap: 40px;
	--emerald-pt-panel-min-h: 480px;
	--emerald-pt-tab-gap: 8px;
	display: flex;
	flex-direction: row;
	align-items: stretch;
	gap: var(--emerald-pt-gap);
	width: 100%;
}

.emerald-program-tabs__nav {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: var(--emerald-pt-tab-gap);
	flex: 0 0 var(--emerald-pt-nav-width);
	width: var(--emerald-pt-nav-width);
	max-width: 320px;
	min-width: 200px;
}

.emerald-program-tabs__tab {
	display: block;
	width: 100%;
	padding: 14px 22px;
	margin: 0;
	border: 0;
	border-radius: 12px;
	background: transparent;
	box-shadow: none;
	color: var(--emerald-text-color, #1f2d2a);
	font-family: 'Manrope', sans-serif;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	text-align: left;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}

.emerald-program-tabs__tab-chevron {
	display: none;
}

.emerald-program-tabs__tab:hover {
	color: var(--emerald-accent-color, #1d5f51);
}

.emerald-program-tabs__tab.is-active {
	background: var(--emerald-accent-color, #1d5f51);
	color: #ffffff;
}

.emerald-program-tabs__tab.is-active:hover {
	color: #ffffff;
}

.emerald-program-tabs__panels {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
	min-height: var(--emerald-pt-panel-min-h);
	align-self: stretch;
}

.emerald-program-tabs__panel {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: flex-start;
	overflow: hidden;
	border-radius: 24px;
	background-color: #e8eceb;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.35s ease, visibility 0.35s ease;
}

.emerald-program-tabs__panel.is-loaded {
	background-color: var(--emerald-secondary-color, #1d5f51);
}

.emerald-program-tabs__panel.is-active {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	z-index: 1;
}

.emerald-program-tabs__panel > .emerald-img-loader {
	position: absolute;
	inset: 0;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	background: rgba(232, 236, 235, 0.55);
	opacity: 1;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

.emerald-program-tabs__panel > .emerald-img-loader::after {
	content: "";
	width: 32px;
	height: 32px;
	border: 2.5px solid rgba(29, 95, 81, 0.18);
	border-top-color: var(--emerald-accent-color, #1d5f51);
	border-radius: 50%;
	animation: emerald-pt-spin 0.7s linear infinite;
}

.emerald-program-tabs__panel.is-loaded > .emerald-img-loader {
	opacity: 0;
	visibility: hidden;
}

@keyframes emerald-pt-spin {
	to {
		transform: rotate(360deg);
	}
}

.emerald-program-tabs__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(4, 18, 15, 0.72) 0%, rgba(4, 18, 15, 0.35) 55%, rgba(4, 18, 15, 0.1) 100%);
	pointer-events: none;
}

.emerald-program-tabs__content {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 520px;
	padding: 40px;
}

.emerald-program-tabs__title {
	margin: 0 0 14px;
	color: #ffffff;
	font-family: 'Manrope', sans-serif;
	font-size: 28px;
	font-weight: 700;
	line-height: 1.2;
}

.emerald-program-tabs__text {
	margin: 0 0 22px;
	color: rgba(255, 255, 255, 0.9);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.55;
}

/* Tablet + mobile: accordion look — chevron + dividers, panel under tab. */
@media (max-width: 1024px) {
	.emerald-program-tabs {
		flex-direction: column !important;
		align-items: stretch !important;
		gap: 0;
	}

	.emerald-program-tabs__nav {
		display: flex;
		flex-direction: column;
		flex: none !important;
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0 !important;
		gap: 0;
	}

	.emerald-program-tabs__panels {
		display: none;
	}

	.emerald-program-tabs__tab {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 16px;
		width: 100%;
		padding: 18px 4px;
		border-radius: 0;
		background: transparent;
		color: var(--emerald-text-color, #1f2d2a);
		border-bottom: 1px solid #e8e9ec;
	}

	.emerald-program-tabs__tab:hover {
		color: var(--emerald-text-color, #1f2d2a);
	}

	.emerald-program-tabs__tab.is-active {
		padding: 14px 18px;
		margin: 8px 0 10px;
		border-radius: 12px;
		border-bottom: none;
		background: var(--emerald-accent-color, #1d5f51);
		color: #ffffff;
	}

	.emerald-program-tabs__tab.is-active:hover {
		color: #ffffff;
	}

	.emerald-program-tabs__tab-label {
		flex: 1 1 auto;
		min-width: 0;
		text-align: left;
	}

	.emerald-program-tabs__tab-chevron {
		display: block;
		position: relative;
		flex: 0 0 18px;
		width: 18px;
		height: 18px;
		color: #b4b6c8;
		transition: transform 0.25s ease, color 0.2s ease;
	}

	.emerald-program-tabs__tab-chevron::before {
		content: "";
		position: absolute;
		top: 5px;
		left: 3px;
		width: 10px;
		height: 10px;
		border-right: 2px solid currentColor;
		border-bottom: 2px solid currentColor;
		transform: rotate(45deg);
		box-sizing: border-box;
	}

	.emerald-program-tabs__tab.is-active .emerald-program-tabs__tab-chevron {
		color: #ffffff;
		transform: rotate(180deg);
	}

	.emerald-program-tabs__panel {
		position: relative;
		inset: auto;
		display: none;
		width: 100%;
		min-height: 320px;
		margin: 0 0 8px;
		border-radius: 20px;
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
	}

	.emerald-program-tabs__panel.is-active {
		display: flex;
	}

	.emerald-program-tabs__overlay {
		background: linear-gradient(180deg, rgba(4, 18, 15, 0.55) 0%, rgba(4, 18, 15, 0.35) 45%, rgba(4, 18, 15, 0.55) 100%);
	}

	.emerald-program-tabs__content {
		padding: 28px;
		max-width: 100%;
	}

	.emerald-program-tabs__title {
		font-size: 22px;
	}
}

@media (max-width: 767px) {
	.emerald-program-tabs__tab {
		padding: 16px 2px !important;
		font-size: 15px;
	}

	.emerald-program-tabs__tab.is-active {
		padding: 14px 16px;
	}

	.emerald-program-tabs__panel {
		min-height: 280px;
	}

	.emerald-program-tabs__content {
		padding: 24px;
	}

	.emerald-program-tabs__title {
		font-size: 20px;
	}
}
