
.fancy-line {
    position: absolute;
    width: 2px;
    background-color: #4CAF50;
    top: 0;
    bottom: 0;
    z-index: -1;
}

.fancy-line.left {
    left: 5%;
}

.fancy-line.right {
    right: 5%;
}


.fancy-line::before,
.fancy-line::after {
    content: '';
    width: 10px;
    height: 10px;
    background-color: #4CAF50;
    border-radius: 50%;
    position: absolute;
}

.fancy-line::before {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.fancy-line::after {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}


.flip-card {
    background-color: transparent;
    width: 450px; 
    max-width: 450px; 
    height: 450px;
    perspective: 1000px;
    margin: 1.5em 0;
    position: relative;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 10px;
}

.flip-card-front {
    background-color: #fff;
    color: black;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.flip-card-front h3 {
    padding-bottom: 1.5em;
}

.flip-card-front img {
    max-width: 90%;
    border-radius: 10px;
    margin-bottom: 10px;
}

.flip-card-back {
    background-color: #4CAF50;
    color: white;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.flip-card-back {
    padding: .5em;
}

.flip-card-back a {
    color: white;
    text-decoration: none;
    margin-top: 10px;
    border: 1px solid white;
    padding: 5px 10px;
    border-radius: 5px;
}

.flip-card-back a:hover {
    background-color: white;
    color: #4CAF50;
    transition: .3s;
}


.flip-card:nth-child(odd) {
    align-self: flex-start;
    margin-left: auto;
    margin-right: -45%; 
}

.flip-card:nth-child(even) {
    align-self: flex-end;
    margin-left: -45%; 
    margin-right: auto;
}



@media screen and (min-width: 851px) {

}

@media screen and (max-width: 850px) and (min-width: 481px) {
    h2 {
        margin-bottom: 1em;
    }

    .container {
        width: 400px;
    }

    .flip-card {
        width: 400px; 
        height: 400px;
    }

    .flip-card-front img {
        max-width: 100%;
    }

    .fancy-line {
        display: none; 
    }

    .flip-card:nth-child(odd),
    .flip-card:nth-child(even) {
        align-self: center; 
        margin: 1.5em 0px; 
    }

    .fix-height {
        width: 100%;
        height: 70%;
    }
}

@media screen and (max-width: 480px) {
    h2 {
        margin-bottom: 1em;
    }

    .container {
        width: 100%;
        margin: 0;
    }

    .flip-card {
        width: 80%; 
        height: 300px;
    }

    .flip-card-front img {
        max-width: 80%;
    }

    .fancy-line {
        display: none; 
    }

    .flip-card:nth-child(odd),
    .flip-card:nth-child(even) {
        align-self: center; 
        margin: 1em 0; 
    }
}