/**
 * Novixa Addons - Expanding Panels
 *
 * Every selector is scoped to .novixa-expanding-panels. Presets only set
 * defaults; the Elementor controls override the same properties through
 * higher-specificity selectors.
 *
 * The expand animation is a flex-grow transition: the active panel grows to
 * --nep-grow, every other panel keeps flex-grow 1, so the rest of the space
 * is shared proportionally between the collapsed panels.
 */

/* ------------------------------------------------------------------ */
/* Root + custom properties                                            */
/* ------------------------------------------------------------------ */

.novixa-expanding-panels {
	--nep-grow: 4;
	--nep-dur: 750ms;
	--nep-ease: cubic-bezier(.22, .8, .24, 1);
	--nep-zoom: 1.08;
	/* Orientation helpers (the Direction control rewrites these together). */
	--nep-wm: vertical-rl;
	--nep-lbl-left: 50%;
	--nep-lbl-t: translate(-50%, -50%) rotate(180deg);
	--nep-cmin: min(380px, 80vw);

	position: relative;
	width: 100%;
	box-sizing: border-box;
}

.novixa-expanding-panels *,
.novixa-expanding-panels *::before,
.novixa-expanding-panels *::after {
	box-sizing: border-box;
}

.novixa-expanding-panels .novixa-expanding-panels__list {
	display: flex;
	flex-direction: row;
	height: 480px;
	margin: 0;
	padding: 0;
	gap: 14px;
}

/* Fallback until Elementor's generated CSS is present. */
@media (max-width: 767px) {
	.novixa-expanding-panels {
		--nep-wm: horizontal-tb;
		--nep-lbl-left: 28px;
		--nep-lbl-t: translateY(-50%);
		--nep-cmin: 0px;
	}

	.novixa-expanding-panels .novixa-expanding-panels__list {
		flex-direction: column;
		height: 520px;
	}
}

/* ------------------------------------------------------------------ */
/* Panel                                                               */
/* ------------------------------------------------------------------ */

.novixa-expanding-panels .novixa-expanding-panels__panel {
	position: relative;
	flex: 1 1 0;
	min-width: 0;
	min-height: 0;
	overflow: hidden;
	isolation: isolate;
	border-radius: 22px;
	background-color: #1e293b;
	color: #fff;
	cursor: pointer;
	contain: layout paint;
	will-change: flex-grow;
	backface-visibility: hidden;
	transition: flex-grow var(--nep-dur) var(--nep-ease), box-shadow var(--nep-dur) var(--nep-ease), border-color var(--nep-dur) var(--nep-ease);
}

.novixa-expanding-panels .novixa-expanding-panels__panel.is-active {
	flex-grow: var(--nep-grow);
	cursor: default;
}

.novixa-expanding-panels .novixa-expanding-panels__media {
	position: absolute;
	inset: 0;
	z-index: 0;
	display: block;
	overflow: hidden;
}

/* Higher specificity than ".elementor img { height:auto; max-width:100% }". */
.novixa-expanding-panels .novixa-expanding-panels__media img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	transform: scale(1) translateZ(0);
	will-change: transform;
	transition: transform calc(var(--nep-dur) * 1.2) var(--nep-ease), filter var(--nep-dur) var(--nep-ease);
}

.novixa-expanding-panels .novixa-expanding-panels__overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	transition: background-color var(--nep-dur) var(--nep-ease), opacity var(--nep-dur) var(--nep-ease);
}

/*
 * Legibility layer: a gradient that is darkest at the bottom and fades to
 * fully transparent, so the top of the image is never tinted.
 * --nep-ov-o = strength, --nep-ov-h = how far up it reaches.
 */
.novixa-expanding-panels .novixa-expanding-panels__overlay::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, var(--nep-ov-c, rgba(8, 10, 20, .95)) 0%, rgba(8, 10, 20, 0) var(--nep-ov-h, 70%));
	opacity: var(--nep-ov-o, .85);
}

/* ------------------------------------------------------------------ */
/* Hover effects                                                       */
/* ------------------------------------------------------------------ */

@media (hover: hover) {
	.novixa-expanding-panels--zoom .novixa-expanding-panels__panel:hover .novixa-expanding-panels__media img {
		transform: scale(var(--nep-zoom)) translateZ(0);
	}
}

.novixa-expanding-panels--inactive-grayscale .novixa-expanding-panels__panel:not(.is-active):not(:hover) .novixa-expanding-panels__media img {
	filter: grayscale(1);
}

.novixa-expanding-panels--inactive-dim .novixa-expanding-panels__panel:not(.is-active):not(:hover) .novixa-expanding-panels__media img {
	filter: brightness(.62);
}

/* ------------------------------------------------------------------ */
/* Collapsed label                                                     */
/* ------------------------------------------------------------------ */

.novixa-expanding-panels .novixa-expanding-panels__label {
	position: absolute;
	z-index: 2;
	top: 50%;
	left: var(--nep-lbl-left);
	max-width: calc(100% - 40px);
	max-height: calc(100% - 40px);
	overflow: hidden;
	color: #fff;
	font-size: 1.05rem;
	font-weight: 600;
	letter-spacing: .04em;
	line-height: 1.2;
	white-space: nowrap;
	text-overflow: ellipsis;
	text-shadow: 0 1px 10px rgba(0, 0, 0, .45);
	writing-mode: var(--nep-wm);
	transform: var(--nep-lbl-t);
	pointer-events: none;
	opacity: 1;
	transition: opacity calc(var(--nep-dur) * .35) ease calc(var(--nep-dur) * .25);
}

.novixa-expanding-panels .novixa-expanding-panels__panel.is-active .novixa-expanding-panels__label {
	opacity: 0;
	transition-delay: 0s;
	transition-duration: 180ms;
}

/* ------------------------------------------------------------------ */
/* Trigger (full-panel button, behind the content)                     */
/* ------------------------------------------------------------------ */

.novixa-expanding-panels .novixa-expanding-panels__trigger {
	position: absolute;
	inset: 0;
	z-index: 3;
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: inherit;
	background: transparent;
	color: inherit;
	cursor: inherit;
	appearance: none;
	-webkit-appearance: none;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
}

.novixa-expanding-panels .novixa-expanding-panels__panel:not(.is-active) .novixa-expanding-panels__trigger {
	cursor: pointer;
}

.novixa-expanding-panels .novixa-expanding-panels__trigger:focus {
	outline: none;
}

.novixa-expanding-panels .novixa-expanding-panels__trigger:focus-visible {
	outline: 3px solid #2563eb;
	outline-offset: -3px;
	box-shadow: inset 0 0 0 6px rgba(255, 255, 255, .85);
}

/* ------------------------------------------------------------------ */
/* Content                                                             */
/* ------------------------------------------------------------------ */

.novixa-expanding-panels .novixa-expanding-panels__content {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 4;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: flex-end;
	min-width: var(--nep-cmin);
	padding: 28px;
	text-align: left;
	pointer-events: none;
	/* Collapsed: fade out fast, then leave the tab order / accessibility tree. */
	opacity: 0;
	visibility: hidden;
	transform: translateY(14px);
	transition: opacity 180ms ease, transform 180ms ease, visibility 0s linear 180ms;
}

.novixa-expanding-panels .novixa-expanding-panels__panel.is-active .novixa-expanding-panels__content {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition: opacity calc(var(--nep-dur) * .55) ease calc(var(--nep-dur) * .3), transform calc(var(--nep-dur) * .55) var(--nep-ease) calc(var(--nep-dur) * .3), visibility 0s linear 0s;
}

.novixa-expanding-panels .novixa-expanding-panels__body {
	display: flex;
	flex-direction: column;
	align-items: inherit;
	gap: 10px;
	max-width: 100%;
}

.novixa-expanding-panels .novixa-expanding-panels__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 28px;
	line-height: 1;
}

.novixa-expanding-panels .novixa-expanding-panels__icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.novixa-expanding-panels .novixa-expanding-panels__title {
	margin: 0;
	padding: 0;
	color: #fff;
	font-size: 1.6rem;
	font-weight: 700;
	line-height: 1.2;
}

.novixa-expanding-panels .novixa-expanding-panels__desc {
	max-width: 52ch;
	margin: 0;
	color: rgba(255, 255, 255, .86);
	font-size: .95rem;
	line-height: 1.55;
}

.novixa-expanding-panels .novixa-expanding-panels__cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	align-self: inherit;
	margin-top: 4px;
	padding: 11px 20px;
	border: 2px solid transparent;
	border-radius: 999px;
	background-color: #fff;
	color: #0f172a;
	font-size: .9rem;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	pointer-events: auto;
	transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}

.novixa-expanding-panels .novixa-expanding-panels__cta:hover,
.novixa-expanding-panels .novixa-expanding-panels__cta:focus-visible {
	background-color: #e2e8f0;
	color: #0f172a;
}

.novixa-expanding-panels .novixa-expanding-panels__cta:focus-visible {
	outline: 3px solid #2563eb;
	outline-offset: 2px;
}

.novixa-expanding-panels .novixa-expanding-panels__cta-icon {
	flex: none;
	transition: transform .25s ease;
}

.novixa-expanding-panels--cta-nudge .novixa-expanding-panels__cta:hover .novixa-expanding-panels__cta-icon,
.novixa-expanding-panels--cta-nudge .novixa-expanding-panels__cta:focus-visible .novixa-expanding-panels__cta-icon {
	transform: translateX(4px);
}

.novixa-expanding-panels .novixa-expanding-panels__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.novixa-expanding-panels .novixa-expanding-panels__empty {
	padding: 40px 20px;
	border: 2px dashed #cbd5e1;
	border-radius: 12px;
	color: #64748b;
	text-align: center;
}

/* ------------------------------------------------------------------ */
/* Preset 1 - Modern Cards                                             */
/* ------------------------------------------------------------------ */

.novixa-expanding-panels--cards .novixa-expanding-panels__panel {
	box-shadow: 0 18px 40px -20px rgba(15, 23, 42, .55);
}

.novixa-expanding-panels--cards .novixa-expanding-panels__panel.is-active {
	box-shadow: 0 0 0 3px rgba(255, 255, 255, .9), 0 26px 50px -18px rgba(15, 23, 42, .6);
}

/* ------------------------------------------------------------------ */
/* Preset 2 - Full-Image Panels                                        */
/* ------------------------------------------------------------------ */

.novixa-expanding-panels--full .novixa-expanding-panels__list {
	gap: 0;
	overflow: hidden;
}

.novixa-expanding-panels--full .novixa-expanding-panels__panel {
	border-radius: 0;
	box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .18);
}

.novixa-expanding-panels--full .novixa-expanding-panels__content {
	align-items: center;
	justify-content: center;
	text-align: center;
}

.novixa-expanding-panels--full .novixa-expanding-panels__title {
	font-size: 2rem;
	letter-spacing: -.01em;
}

.novixa-expanding-panels--full .novixa-expanding-panels__cta {
	border-color: #fff;
	background-color: transparent;
	color: #fff;
}

.novixa-expanding-panels--full .novixa-expanding-panels__cta:hover,
.novixa-expanding-panels--full .novixa-expanding-panels__cta:focus-visible {
	background-color: #fff;
	color: #0f172a;
}

/* ------------------------------------------------------------------ */
/* Preset 3 - Minimal Content Panels                                   */
/* ------------------------------------------------------------------ */

.novixa-expanding-panels--minimal .novixa-expanding-panels__list {
	gap: 10px;
}

.novixa-expanding-panels--minimal .novixa-expanding-panels__panel {
	border-radius: 16px;
	background-color: #e2e8f0;
}

/* Minimal: a lighter, shorter fade (the white content box carries the text). */
.novixa-expanding-panels--minimal {
	--nep-ov-c: rgba(15, 23, 42, .75);
	--nep-ov-h: 55%;
}

.novixa-expanding-panels--minimal .novixa-expanding-panels__content {
	padding: 18px;
}

.novixa-expanding-panels--minimal .novixa-expanding-panels__body {
	width: 100%;
	max-width: 380px;
	padding: 22px 24px;
	border-radius: 14px;
	background-color: #fff;
	box-shadow: 0 14px 34px -14px rgba(15, 23, 42, .45);
}

.novixa-expanding-panels--minimal .novixa-expanding-panels__title {
	color: #0f172a;
	font-size: 1.3rem;
}

.novixa-expanding-panels--minimal .novixa-expanding-panels__desc {
	color: #475569;
}

.novixa-expanding-panels--minimal .novixa-expanding-panels__icon {
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background-color: #f1f5f9;
	color: #0f172a;
	font-size: 20px;
}

.novixa-expanding-panels--minimal .novixa-expanding-panels__cta {
	border-radius: 10px;
	background-color: #0f172a;
	color: #fff;
}

.novixa-expanding-panels--minimal .novixa-expanding-panels__cta:hover,
.novixa-expanding-panels--minimal .novixa-expanding-panels__cta:focus-visible {
	background-color: #1e293b;
	color: #fff;
}

.novixa-expanding-panels--minimal .novixa-expanding-panels__label {
	padding: 10px 7px;
	border-radius: 8px;
	background-color: rgba(255, 255, 255, .92);
	color: #0f172a;
	font-size: .95rem;
	text-shadow: none;
}

/* ------------------------------------------------------------------ */
/* Responsive + motion                                                 */
/* ------------------------------------------------------------------ */

@media (max-width: 767px) {
	.novixa-expanding-panels .novixa-expanding-panels__content {
		padding: 18px;
	}

	.novixa-expanding-panels .novixa-expanding-panels__title {
		font-size: 1.3rem;
	}

	.novixa-expanding-panels--full .novixa-expanding-panels__title {
		font-size: 1.5rem;
	}

	.novixa-expanding-panels--minimal .novixa-expanding-panels__body {
		padding: 16px 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.novixa-expanding-panels,
	.novixa-expanding-panels *,
	.novixa-expanding-panels *::before,
	.novixa-expanding-panels *::after {
		transition-duration: .001ms !important;
		transition-delay: 0s !important;
		animation: none !important;
	}

	.novixa-expanding-panels .novixa-expanding-panels__content {
		transform: none !important;
	}
}
