/* Mobile-first approach: styles for mobile devices */
.opportunities-section {
	width: 100%;
	height: 50dvh;
	background-color: var(--white-primary);
	padding: 0;
	position: relative;
	transition: margin-top 0.3s ease;
	margin: 50px 0;
}

.opportunities-section.section-active {
	margin-top: 0;
}

.opportunities-container {
	width: 100%;
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 7rem;
}

.opportunity-item {
	position: sticky;
	top: 0;
	width: 100%;
/* 	min-height: 100dvh; */
	height: 50dvh;
	display: flex;
	align-items: flex-end;
	justify-content: flex-start;
	flex-shrink: 0;
	background: linear-gradient(252.67deg, rgba(0, 0, 0, 0) 0.07%, rgba(0, 0, 0, 0.2) 77.42%), linear-gradient(252.67deg, rgba(43, 5, 72, 0) 0.07%, rgba(43, 5, 72, 0.2) 77.42%);
}

/* Z-index dla nakładania się elementów - pierwszy element na dole */
.opportunity-item:nth-child(1) {
	z-index: 1;
}
.opportunity-item:nth-child(2) {
	z-index: 2;
}
.opportunity-item:nth-child(3) {
	z-index: 3;
}
.opportunity-item:nth-child(4) {
	z-index: 4;
}
.opportunity-item:nth-child(5) {
	z-index: 5;
}
.opportunity-item:nth-child(6) {
	z-index: 6;
}

.opportunity-cta-btn {
	display: none;
}

.opportunity-bg {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	z-index: -1;
	rotate: y -180deg;
}

#primary > section.service-page-content > section.opportunities-section > div > div:nth-child(1) > img {
	object-position: left center;
}

#primary > section.service-page-content > section.opportunities-section > div > div:nth-child(2) > img {
	object-position: right center;
}

.opportunity-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(0deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), linear-gradient(174.43deg, rgba(43, 5, 72, 0) 49.34%, rgba(43, 5, 72, 0.52) 95.55%);
	z-index: -1;
}

.opportunity-box {
	position: relative;
	z-index: 10;
	width: 95%;
	padding: 20px;
	color: var(--white-primary);
	/* background: rgba(254, 254, 254, 0.16);
	Fallback solid border for mobile/older browsers */
	border: 1px solid rgba(138, 56, 245, 0.5);
	backdrop-filter: blur(16px);
	margin-bottom: 32px;
	margin: 0 auto 32px auto;
}

/* Progressive enhancement: gradient border for modern browsers */
@supports (border-image-source: linear-gradient(to right, red, blue)) {
	.opportunity-box {
		border: 1px solid;
		border-image-source: linear-gradient(263.25deg, rgba(255, 255, 255, 0) 2.18%, #8a38f5 97.82%);
		border-image-slice: 1;
	}
}

.opportunity-pre-title {
	font-family: var(--font-family-primary);
	display: block;
	font-size: 10px;
	font-weight: 500;
	margin-bottom: 10px;
	font-variant: small-caps;
	letter-spacing: -2%;
}

.opportunity-title {
	font-family: var(--font-family-primary);
	font-size: 24px;
	font-weight: 700;
	font-style: bold;
	margin: 0 0 12px 0;
	line-height: 1.2;
	letter-spacing: -3%;
}

/* Desktop title - ukryty na mobile */
.opportunity-title-desktop {
	display: none;
}

/* Mobile title - widoczny na mobile */
.opportunity-title-mobile {
	display: block;
}

.opportunity-description {
	font-family: var(--font-family-primary);
	font-size: 12px;
	line-height: 1.5;
	margin: 0 0 20px 0;
	opacity: 0.95;
}

/* Tablet styles - 768px and up */
@media (min-width: 768px) {
	.opportunity-box {
		padding: 30px;
		max-width: 500px;
		margin: 0 auto 40px 40px;
	}

	.opportunity-pre-title {
		font-size: 16px;
	}

	.opportunity-title {
		font-size: 32px;
		margin-bottom: 16px;
	}

	/* Na tablet+ pokaż desktop title, ukryj mobile title */
	.opportunity-title-desktop {
		display: block;
	}

	.opportunity-title-mobile {
		display: none;
	}

	.opportunity-description {
		font-size: 18px;
		margin-bottom: 24px;
	}

	.opportunity-item .opportunity-cta-btn {
		font-family: var(--font-family-primary);
		font-weight: 500;
		font-style: medium;
		line-height: 1.5;
		letter-spacing: -2%;
		display: block;
		padding: 14px 28px;
		font-size: 16px;
		background: var(--white-primary);
		color: var(--primary-violet-dark);
		border: 1px solid var(--viol, rgba(43, 5, 72, 1));
		text-decoration: none;
		border-radius: 4px;
		cursor: pointer;
		white-space: nowrap;
		transition: all 0.35s ease;
	}

	.opportunity-item .opportunity-cta-btn:hover {
		background: var(--cta-button-hover-gradient);
		color: var(--white-primary);
	}
}

/* Desktop styles - 992px and up */
@media (min-width: 992px) {
	.opportunities-section {
		margin-bottom: 100px;
		height: 100dvh;
	}
	.opportunity-item {
		min-height: 100dvh;
		height: 100dvh;
		justify-content: flex-end;
	}

	.opportunity-overlay {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		background: linear-gradient(255.52deg, rgba(43, 5, 72, 0) -46.47%, rgba(43, 5, 72, 0.7) 132.06%), linear-gradient(246.94deg, rgba(43, 5, 72, 0) 27.84%, rgba(43, 5, 72, 0.315) 86.39%), linear-gradient(246.94deg, rgba(43, 5, 72, 0) 27.84%, rgba(43, 5, 72, 0.315) 86.39%);
		z-index: 2;
	}

	.opportunity-box {
		padding: 40px;
		width: 100%;
		max-width: 1300px;
		margin: 0 auto 80px 40px;
		border: 1px solid;
		border-image-source: linear-gradient(263.25deg, rgba(255, 255, 255, 0) 2.18%, #8a38f5 97.82%);
		box-shadow: 3px 3px 0px -3px rgba(0, 0, 0, 0.5) inset;

		box-shadow: -2px -2px 1px -2px rgba(179, 179, 179, 1) inset;

		box-shadow: 2px 2px 1px -2px rgba(179, 179, 179, 1) inset;

		box-shadow: 0px 0px 0px 1px rgba(153, 153, 153, 1) inset;

		box-shadow: 0px 0px 6px 0px rgba(242, 242, 242, 1) inset;

		backdrop-filter: blur(20px);
		border-radius: 2px;
	}

	.opportunity-pre-title {
		font-size: 24px;
		font-weight: 500;
		letter-spacing: -2%;
		font-variant: small-caps;
	}

	.opportunity-title {
		font-size: 64px;
		margin-bottom: 24px;
	}

	.opportunity-title-desktop {
		display: block;
	}

	.opportunity-title-mobile {
		display: none;
	}

	.opportunity-description {
		font-size: 20px;
	}

	.opportunity-cta-btn {
		width: fit-content;
		height: fit-content;
		font-family: var(--font-family-primary);
		font-weight: 500;
		font-style: medium;
		font-size: 20px;
		line-height: 1.5;
		letter-spacing: -2%;
		display: inline-block;
		padding: 16px 56px 16px 56px;
		background: var(--white-primary);
		color: var(--primary-violet-dark);
		border: 1px solid var(--viol, rgba(43, 5, 72, 1));
		text-decoration: none;
		border-radius: 4px;
		cursor: pointer;
		white-space: nowrap;
		transition: all 0.35s ease;
	}

	.opportunity-cta-btn:hover {
		background: var(--cta-button-hover-gradient);
		color: var(--white-primary);
	}
}

/* Large desktop styles - 1200px and up */
@media (min-width: 1200px) {
	.opportunities-container {
		gap: 12rem;
	}
	.opportunity-box {
		width: 50%;
		padding: 32px 100px 32px 32px;
		max-width: 1600px;
		margin: 0 3rem 40px 4rem;
	}

	.opportunity-title {
		font-size: 52px;
	}

	/* Na large desktop pokaż desktop title, ukryj mobile title */
	.opportunity-title-desktop {
		display: block;
	}

	.opportunity-title-mobile {
		display: none;
	}

	.opportunity-description {
		font-size: 20px;
		line-height: 1.5;
		letter-spacing: -2%;
	}
}

@media (min-width: 1400px) {
	.opportunity-box {	
		margin: 0 3.25rem 40px 4rem;
	}
}

@media (min-width: 1800px) {
	.opportunity-item {
		justify-content: flex-start;
	}
	.opportunities-container {
		gap: 14rem;
	}
	.opportunity-box {
		width: 100%;
		margin: 0 auto 40px auto;
	}
}
