.stats {
    position: relative;
    background-color: var(--section-bg-color);
}

.stats h2 {
    margin: 0 auto 40px;
    width: fit-content;
    font-size: 40px;
}

.stats .container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 40px;
}

.stats .container .box {
    background-color: white;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.8;
    position: relative;
}

.stats .container .box::before,
.stats .container .box::after {
    content: "";
    position: absolute;
    width: 3px;
    height: 0;
    background-color: var(--main-color);
    transition: 0.5s;
}

.stats .container .box::before {
    left: 0;
    bottom: 0;
}

.stats .container .box::after {
    right: 0;
    top: 0;
}

.stats .container .box:hover::before,
.stats .container .box:hover::after {
    height: 100%;
}


.stats .container .box:hover {
    opacity: 1;
}

.stats .container .box span {
    display: block;
}

.stats .container .box span:first-of-type {
    font-size: 60px;
    font-weight: bold;
}

.stats .container .box span:last-of-type {
    font-size: 20px;
    font-weight: bold;
    font-style: italic;
    color: var(--font-color);
}