/* ==========================================================================
   Team Section — layout, tipografia, stack immagine, stati hover
   ========================================================================== */

.team-section {
	padding: 80px 40px;
}

.team-section__inner {
	max-width: 1512px;
	margin: 0 auto;
}

.team-section__title {
	margin: 0 0 40px;
	font-size: 80px;
	line-height: 96px;
	letter-spacing: -0.4px;
	color: #162641;
	text-align: center;
}

/* ---------- Carosello: un solo membro visibile alla volta ---------- */

.team-carousel {
	position: relative;
	min-height: 510px;
	perspective: 1400px;
	transform-style: preserve-3d;
	overflow: hidden;
}

.team-card {
	position: absolute;
	inset: 0;

	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;

	gap:80px;
	padding:0 128px;

	transform-style:preserve-3d;
	transform-origin:right center;

	backface-visibility:hidden;

	will-change:transform, opacity;

	pointer-events:none;

	z-index: 1;
}

.team-card:first-child {
	pointer-events:auto;
}

.team-card__info {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.team-card__info--left {
	padding-top: 40px;
	align-self: stretch;
}

.team-card__info--right {
	justify-content: flex-end;
	padding-bottom: 40px;
	align-self: stretch;
}

.team-card__role {
	margin: 0;
	font-size: 32px;
	line-height: 40px;
	letter-spacing: -0.4px;
	color: #d14a5c;
}

.team-card__name {
	margin: 0;
	font-size: 24px;
	line-height: 28px;
	color: #4e4945;
}

.team-card__help {
	margin: 0;
	font-size: 20px;
	line-height: 24px;
	letter-spacing: -0.4px;
	color: #4e4945;
}

/* ---------- Stack immagine (due livelli sovrapposti) ---------- */

.team-card__stack {
	position:relative;

	width:400px;
	height:510px;

	display:flex;
	align-items:center;
	justify-content:center;

	transform-style:preserve-3d;
}

.team-card__image {
	position:relative;

	width:360px;
	height:480px;

	margin:0;

	border-radius:24px;

	overflow:hidden;

	transform:rotate(-5deg);

	box-shadow:
	0 24px 48px rgba(22,38,65,.18);

	transform-style:preserve-3d;

	backface-visibility:hidden;
}


.team-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ---------- Bottoni navigazione ---------- */

.team-section__nav {
	display: flex;
	justify-content: center;
	gap: 16px;
	margin-top: 40px;
}

.team-nav-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	padding: 24px;
	border: none;
	border-radius: 8px;
	background: #d14a5c;
	color: #fff;
	cursor: pointer;
	transition: background-color 0.25s ease, transform 0.25s ease;
}

.team-nav-btn:hover {
	background: #9e3647;
	transform: translateY(-2px);
}

.team-nav-btn:active {
	transform: translateY(0);
}

.team-nav-btn:disabled {
	opacity: 0.5;
	cursor: default;
	pointer-events: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {

	.team-section {
		padding: 56px 24px;
	}

	.team-section__title {
		font-size: 40px;
		line-height: 48px;
	}

	.team-card {
		grid-template-columns: 1fr;
		gap: 24px;
		padding: 0;
		text-align: center;
	}

	.team-carousel{
	perspective:900px;
}

.team-card{
	transform-origin:center right;
}

	.team-card__info--left,
	.team-card__info--right {
		padding: 0;
		align-items: center;
	}

	.team-card__stack {
		width: 280px;
		height: 360px;
		margin: 0 auto;
	}

	.team-card__stack-layer,
	.team-card__image {
		width: 240px;
		height: 320px;
	}
}