body {
    margin: 0;
    padding: 0;
    font-family: 'Pixelify Sans', sans-serif;
    background: linear-gradient(160deg, rgb(147, 253, 8), rgb(227, 255, 160), rgb(227, 255, 160), rgb(94, 255, 0));
}

.container {
    display: grid;
    grid-template-columns: 25% 1fr;
    height: 100vh;
}

.hero-section a {
    font-size: larger;
    color: #050505;
    text-decoration: none;
}

.hero-section a:hover {
    transform: scale(1.5);
    opacity: 0.8;
    transition: transform 0.4s ease-in-out, opacity 0.4s ease-in-out;
    text-decoration: underline;
    color: blue;
}

.fa {
    padding: 2px;
    margin: 5px;
}

.hero-section {
    color: #000000;
    text-align: center;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.quote {
    color: #0e0909;
    margin-top: 50px;
}

.hero-section img {
    width: 100%;
    max-width: 200px;
    border-radius: 50%;
    margin-bottom: 10px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
    grid-auto-rows: minmax(300px, auto); /* Ensure cards have a minimum height */
}

.grid-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    perspective: 1000px;
    border: 6px outset #000000;
    border-radius: 15px;
}

.card {
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 1s;
}

.grid-item.expanded .card {
    transform: rotateY(180deg);
}

.card-inner {
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.5s;
}

.card-front,
.card-back {
    width: 100%;
    height: 100%;
    position: absolute;
    backface-visibility: hidden;
}

.card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.card-back {
    background-color: #2ecc71;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: rotateY(180deg);
}

.card-text {
    text-align: center;
    color: #fff;
}

.card-text a {
    color: #fff;
    text-decoration: none;
    border: 1px solid #fff;
    padding: 5px 10px;
}

.card-text a:hover {
    background: #fff;
    color: #333;
}

.grid-item:nth-child(odd) .card-back {
    background-color: #e74c3c;
}

.grid-item:nth-child(even) .card-back {
    background-color: #2ecc71;
}

.grid-item:nth-child(3n) .card-back {
    background-color: #f39c12;
}

.grid-item:nth-child(4n) .card-back {
    background-color: #3498db;
}

.grid-item:nth-child(5n) .card-back {
    background-color: #9b59b6;
}

.grid-item:nth-child(6n) .card-back {
    background-color: #3d3d1d;
}

/* Media Query for Tablets and Mobiles (up to 1024px) */
@media screen and (max-width: 1024px) {
    .container {
        display: flex;
        flex-direction: column;
    }

    .hero-section {
        padding: 15px;
        font-size: 1em;
    }

    .quote {
        margin-top: 20px;
    }

    .grid {
        padding: 15px;
    }
}

/* Media Query for Mobiles (up to 767px) */
@media screen and (max-width: 767px) {
    .hero-section {
        padding: 5px;
        font-size: 0.8em;
    }

    .hero-section img {
        max-width: 100px;
        display: none;
    }

    .quote {
        margin-top: 10px;
    }

    .backchod {
        display: none;
    }

    .grid {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 10px;
    }

    .grid-item {
        width: 80%;
        margin-bottom: 15px;
    }

    .card {
        position: relative;
        height: 0;
        padding-bottom: 100%; /* Makes cards square on mobile */
    }

    .card-inner {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

    .card-front,
    .card-back {
        border-radius: 15px;
    }

    .card-front img {
        border-radius: 15px;
    }
}