:root {
    --card-height: 300px;
    --card-width: calc(var(--card-height) / 1.5);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: white;
    overflow-x: hidden; /* Removes horizontal scrollbar */
}

.card {
    width: var(--card-width);
    height: var(--card-height);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding: 0 36px;
    perspective: 2500px;
    margin: 0 5px;
    overflow: visible; /* Ensures no content is clipped */
    border: none; /* Removes any border */
    background: none; /* Removes background if necessary */
    box-shadow: none; /* Removes any shadows that may appear as a border */
}

.cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
}

.wrapper {
    transition: all 0.5s;
    position: absolute;
    width: 100%;
    z-index: -1;
    overflow: visible; /* Prevents clipping */
}

.card:hover .wrapper {
    transform: perspective(900px) translateY(-5%) rotateX(25deg);
    box-shadow: 2px 35px 32px -8px rgba(0, 0, 0, 0.75);
}

.wrapper::before,
.wrapper::after {
    content: "";
    opacity: 0;
    width: 100%;
    height: 80px;
    transition: all 0.5s;
    position: absolute;
    left: 0;
}

.wrapper::before {
    top: 0;
    height: 100%;
    background-image: linear-gradient(
        to top,
        transparent 46%,
        rgba(12, 13, 19, 0.5) 68%,
        rgba(12, 13, 19) 97%
    );
}

.wrapper::after {
    bottom: 0;
    opacity: 1;
    background-image: linear-gradient(
        to bottom,
        transparent 46%,
        rgba(12, 13, 19, 0.5) 68%,
        rgba(12, 13, 19) 97%
    );
}

.card:hover .wrapper::before,
.card:hover .wrapper::after {
    opacity: 1;
}

.card:hover .wrapper::after {
    height: 120px;
}

.title {
    width: 100%;
    transition: transform 0.5s;
}

.card:hover .title {
    transform: translate3d(0%, -50px, 100px);
}

.character {
    width: 100%;
    opacity: 0;
    transition: all 0.5s;
    position: absolute;
    z-index: 3; /* Ensures it's above other elements */
    overflow: visible; /* Prevents clipping */
}

.card:hover .character {
    opacity: 1;
    transform: translate3d(0, -30%, 100px);
}

.top-text {
    
    
   
    
    
    margin-top: 15px; /* Adjust spacing as needed */
}

.top-text a {
    font-size: 20px; /* Adjust font size */
    font-weight: bold; /* Make text bold */
    text-decoration: none;
    color: #000; /* Default text color */
    transition: color 0.3s ease-in-out;
    
    
}

.top-text a:hover {
    color: #7D25EC; /* Hover color */
}

@media (max-width: 768px) {
    .row {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        margin: 0;
    }

    .col-2 {
        width: 50%;
        padding: 10px;
        text-align: center;
    }

    .card {
        --card-height: 250px;
        --card-width: 100%;
        width: 100%;
        height: var(--card-height);
        display: flex;
        justify-content: center;
        align-items: flex-end;
        padding: 0;
        margin: 0 auto;
        perspective: 2500px;
        overflow: visible;
    }

    .wrapper {
        position: absolute;
        width: 100%;
        height: 100%;
        transition: all 0.5s;
        z-index: -1;
    }

    .cover-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 5px;
    }

    .character {
        width: 100%;
        position: absolute;
        bottom: 0;
        z-index: 3;
        opacity: 0;
        transition: all 0.5s;
    }

    .card:hover .wrapper {
        transform: perspective(900px) translateY(-5%) rotateX(25deg);
        box-shadow: 2px 35px 32px -8px rgba(0, 0, 0, 0.75);
    }

    .card:hover .wrapper::before,
    .card:hover .wrapper::after {
        opacity: 1;
    }

    .card:hover .character {
        opacity: 1;
        transform: translate3d(0, -30%, 100px);
    }

    .top-text {
        margin-top: 10px;
    }

    .top-text a {
        font-size: 16px;
        display: inline-block;
    }
}





