:root {
	--main-color: #af3d4e;
	--second-color: #333;
}

body.active {
	overflow-y: hidden;
}

main {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-direction: column;
}

img {
	content: url("../imgs/homelab.webp");
}

@media screen and (width <= 450px) {
	img {
		content: url("../imgs/homelab-mobile.webp");
	}
}

h1 {
	margin: 120px 0 20px 0;
	padding: 20px;
	font-weight: normal;
	font-size: clamp(40px, 10vw, 50px);
	color: var(--main-color);
	text-align: center;
}

@media screen and (width <= 375px) {
	h1 {
		margin-top: 100px;
	}
}

.description {
	padding: 10px;
	font-size: 20px;
	text-align: center;
	color: var(--second-color);
	width: clamp(300px, 50%, 925px);
	font-weight: bold;
}

.wrapper {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
	margin: 30px auto;
	max-width: 1500px;
}

.img {
	display: grid;
	place-items: center;
	width: 500px;
}

img {
	width: 500px;
	border-radius: 5px;
}

.img button {
	display: grid;
	place-items: center;
	padding: 10px;
	background-color: transparent;
	border: none;
	border-radius: 10px;
	cursor: pointer;
	outline: none;
	box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;
	transition: box-shadow 0.3s;
}

.img button:hover,
.img button:focus {
	box-shadow: none;
}

@media screen and (width <= 560px) {
	.img {
		width: 100%;
	}

	.img button img {
		width: 100% !important;
	}
}

.box-container {
	display: flex;
	justify-content: space-evenly;
	align-content: flex-start;
	flex-wrap: wrap;
	gap: 20px;
	margin: 20px;
	margin-top: 40px;
	width: clamp(100px, 50%, 700px);
}

@media screen and (width <= 1096px) {
	.box-container {
		width: 100%;
	}
}

.box {
	width: 250px;
	max-height: 250px;
}

.box-container:nth-child(4) {
	opacity: 0;
	margin-top: 200px;
}

.box:nth-child(3),
.box:nth-child(4) {
	max-height: 400px;
}

.box:nth-child(3) .box-info.active,
.box:nth-child(4) .box-info.active {
	height: 330px;
	opacity: 1;
}

.box button {
	width: 100%;
	border: none;
	background: transparent;
	cursor: pointer;
	outline: none;
}

.box-title {
	position: relative;
	padding: 10px;
	padding-left: 30px;
	width: 100%;
	background-color: var(--second-color);
	color: #fff;
	font-size: 19px;
	text-align: left;
	border-radius: 5px 5px 15px 5px;
	overflow: hidden;
	box-shadow: rgba(50, 50, 93, 0.25) 0px 6px 12px -2px,
		rgba(0, 0, 0, 0.3) 0px 3px 7px -3px;
	transition: border-radius 0.3s;
}

.box-title.active,
.box-title:hover {
	border-radius: 5px;
}

.box-title::before {
	content: "";
	position: absolute;
	left: -5px;
	top: -5px;
	width: 20px;
	height: 75px;
	background-color: var(--main-color);
	transition: left 0.3s;
}

.box button:hover > .box-title::before,
.box button:focus > .box-title::before {
	left: -30px;
}

.box .box-info {
	display: flex;
	justify-content: center;
	flex-direction: column;
	padding: 10px;
	height: 0;
	border-radius: 5px;
	font-size: 19px;
	overflow: hidden;
	opacity: 0;
	box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
	transition: height 0.3s, opacity 0.3s;
}

.box .box-info.active {
	height: 200px;
	opacity: 1;
}

.box:first-child .box-info {
	align-items: center;
}

.box .box-info span:not(span.underline) {
	margin-left: 5px;
}

.box .box-info .underline {
	width: 100%;
	height: 1px;
	background-color: var(--second-color);
	margin: 20px 0;
	border-radius: 20px;
	box-shadow: rgba(0, 0, 0, 0.15) 2.4px 2.4px 3.2px;
}

.box .box-info.servers {
	padding: 0;
}

.box .box-info.servers p {
	color: #fff;
	background-color: var(--second-color);
	text-align: center;
}

.box .box-info.servers ul {
	margin-left: 20px;
	padding: 10px;
	list-style: circle;
}

.box .box-info.usage ul {
	margin-left: 25px;
	list-style: circle;
}
