/****************************** Title & Description Game ******************************/

:root {
	--ottanio-palette: #01796F;
    --marrone-palette: #805E2B;
    --azzurro-palette: #0bd6c5;
    --giallo-palette: #ffe784;
    --arancione-palette:#ddb374;
    --blu-palette:#98d3e6;
}

body {
	background-color: white !important;
}

.external-container {
	display: flex;
	flex-direction: column;
	justify-content: space-around;
	align-items: center;
	position: relative;
	width: 100%;
	height: auto;
	/* padding-top: 40px;
	padding: clamp(10px, 3vw, 40px); */
}

.titolo {
	font-size: clamp(23px, 8vw, 70px);
	font-weight: bold;
	color: var(--marrone-palette);
	text-align: center;
	padding: clamp(23px, 3.2vw, 80px);
	text-align: center;
    font-family: Abril Fatface;
    font-weight: 500;
    font-style: normal;
}

/************ KEYFRAMES ************/

@keyframes scalatura {
	0% {
	  transform: scaleX(0) scaleY(0);
	}
	100% {
	  transform: scaleX(1) scaleY(1);
	}
}


/************ Carousel ************/

#myCar {
	position: relative;
	width: 100%;
	height: 67%;
	overflow: hidden;
}

#myCar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.carousel-inner {
    position: relative;
    overflow: hidden;
	height: 74vh;
	width: 100%;
}

.carousel-inner div {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
	width: 100%;
    height: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
}

.carousel-inner .active {
    opacity: 1;
}

/***** Articoli *****/

.container-articoli {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	grid-gap: clamp(10px, 4.5vw, 40px);
	padding: clamp(10px, 3vw, 40px);
}

.card-articolo {
	display: flex;
	flex-direction: column;
	position: relative;
	width: 24vw;
	height: 28vw;
	padding: clamp(5px, 2.2vw, 30px);
	border: 4px solid var(--ottanio-palette);
	justify-content: space-between;
}

.card-titolo {
	font-size: clamp(16px, 2.7vw, 36px);
	font-weight: 600;
	color: var(--ottanio-palette);
	text-align: center;
	padding: clamp(3px, 0.8vw, 8px);
	margin: 0 !important;
	word-wrap: break-word;
	overflow-wrap: break-word;
}

.card-testo {
	font-size: clamp(16px, 2vw, 24px);
	color: var(--marrone-palette);
	margin: 0 !important;
	word-wrap: break-word;
	overflow-wrap: break-word;
}

.title-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.link-button {
    opacity: 0;
    position: relative;
    padding: clamp(4px, 2vw, 20px);
    border-radius: 14px;
    background-color: var(--arancione-palette);
    transition: opacity 0.3s ease, transform 0.3s ease;
    color: #00001f;
    font-size: clamp(15px, 2.5vw, 23px);
    font-weight: 600;
    text-align: center;
}

.description-container {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
	height: 70%;
	width: 100%;
	word-wrap: break-word;
	overflow-wrap: break-word;
}

.card-articolo:hover {
    /* border: 4px solid var(--ottanio-palette); */
}

.card-articolo:hover .card-text {
	/* transform: scale(1.05); */
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.card-articolo:hover .link-button {
	/* transform: scale(1.05); */
    opacity: 1;

}

.link-button:hover {
    background-color: var(--giallo-palette);
    color: black;
	text-decoration: none;
	transition: background-color 0.3s ease;
}


/******************* media query *******************/

@media screen and (max-width: 1400px) {
	.container-articoli {
		grid-template-columns: 1fr 1fr;
	}

	.card-articolo {
		height: 40vw;
		width: 35vw;
	}
}

@media screen and (max-width: 1192px) {
	.external-container {
		flex-direction: column;
		align-items: center;
	}

}

@media screen and (max-width: 992px) {

	.external-container {
		padding-top: 70px;
	}

	#myCar { height: 56%; }

	.carousel-inner { height: 64vh; }

	.link-button {
		opacity: 1;
	}

	.container-articoli {
		grid-template-columns: 1fr;
	}

	/* .description-container {
		width: 70%;
		height: 70%;
	} */

	.link-button {
		width: 50%;
	}

	.card-articolo {
		height: 50vw;
		width: 65vw;
	}

}

@media screen and (max-width: 768px) {

	#myCar { height: 46.5%; }
	.carousel-inner { height: 52vh; }

	.card-articolo {
		height: 57vw;
	}

	.link-button {
		width: 55%;
	}

}

@media screen and (max-width: 576px) {

	#myCar { height: 38%; }
	.carousel-inner { height: 40.5vh; }

	.card-articolo {
		height: 65vw;
	}

	.link-button {
		width: 60%;
	}

}

@media screen and (max-width: 480px) {

	#myCar { height: 33%; }
	.carousel-inner { height: 36vh; }

	.card-articolo {
		height: 70vw;
	}

	.link-button {
		width: 65%;
	}
}
