﻿.teams {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}

.teams .team {
	position: relative;
	border-radius: 10px;
	overflow: hidden;
	aspect-ratio: 1 / 1;
}

.teams .team img {
	border-radius: 10px;
	width: 100%;
	height: 100%;
	transition: transform 0.5s ease;
}

.teams .team:hover img {
	transform: scale(1.2);
}

.teams .team .infos {
	position: absolute;
	bottom: 0;
	left: 0;
	transition: height 2s ease;
	pointer-events: none;
	background-color: rgba(255, 0, 0, 0.8);
	color: white;
	width: 100%;
	max-height: 0;
	opacity: 0;
	transition: max-height 1.5s ease, opacity 0.5s ease, padding 0.3s ease;
	padding: 0 10px;
}

.teams .team:hover .infos {
	max-height: 150px;
	opacity: 1;
	padding: 10px;
}

@media (max-width: 900px) {
	.teams {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.teams {
		grid-template-columns: 1fr;
	}

	.teams .team {
		aspect-ratio: auto;
		height: 250px;
	}

	.teams .team img {
		object-fit: cover;
	}
}
