* .grid-container{
    box-sizing: border-box;
}

body .grid-container{
    font-family: Arial, sans-serif;
    margin: 5;
    padding: 20px;
    background: #f0f2f5;
}

.grid-container {
    margin-left: 8%;
    margin-right: 8%;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5%;
    justify-content: space-between;
}

.card {
    background: transparent;
    width: 25%;
    perspective: 1000px;
}

.card-inner {
    position: relative;
    width: 100%;
    padding-top: 125%;
    /* 4:5 aspect ratio for passport size */
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.card:hover .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 80%;
    backface-visibility: hidden;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.card-front {
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1em;
}

.card-front img {
    width: 55%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 10px;
}

.card-front h3 {
    margin: 5px 0;
    font-size: 1rem;
    text-align: center;
}

.card-front p {
    margin: 0;
    font-size: 0.9rem;
    color: #555;
    text-align: center;
}

.card-back {
    background: #2c3e50;
    color: #fff;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 15px;
    text-align: center;
}

.card-back p {
    margin: 8px 0;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 1200px) {
    .card {
        width: 25%;
    }
    .card-front img {
        width: 25%;
    }
}

@media (max-width: 900px) {
    .card {
        width: 33.33%;
    }
    .card-front img {
        width: 33.33%;
    }
}

@media (max-width: 600px) {
    .card {
        width: 50%;
    }
    .card-front img {
        width: 50%;
    }
}

@media (max-width: 400px) {
    .card {
        width: 100%;
    }
    .card-front img {
        width: 60%;
    }
}
