.card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 305px;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease-in-out;
}

.card .media-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card .media-wrapper img,
.card .media-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.custom-controls {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.play-button,
.stop-button {
    font-size: 24px;
    color: #fff;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(2px);
    padding: 10px;
    margin: 5px;
    width: 55px;
    height: 55px;
    border-radius: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.stop-button {
    transition: opacity 0.5s ease;
    opacity: 0;
}

.stop-button img {
    object-fit: contain !important;
    height: 25px !important;
    width: auto !important;
}

.card:hover .stop-button {
    opacity: 1;
}

.card .text-wrapper {
    width: 80%;
    height: fit-content;
    display: flex;
    align-items: center;
    padding: 8px 11px 11px 11px;
    min-height: 55px;
    color: black;
    background: white;
    font-size: 20px;
    font-weight: 400;
    line-height: 27px;
    border-top-right-radius: 24px;
    position: absolute;
    left: 0px;
    bottom: 0px;
    z-index: 1;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.card .text-wrapper p {
    margin: 0px;
}

.card button {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: white;
    border-radius: 100%;
    width: 43px;
    height: 43px;
    position: absolute;
    bottom: 17px;
    right: 17px;
    border: none;
}

.card button img {
    transition: all 0.2s ease-in-out;
}

.card:hover button img {
    transform: rotate(45deg);
}

.card.video {
    width: 267px !important;
    height: 293px !important;
    position: relative;
    z-index: 1;
    cursor: pointer;
}

.card.video.active {
    width: 364px !important;
    height: 351px !important;
    transition: all 0.2s ease-in-out;
}

.card.video.small {
    width: 244px !important;
    height: 239px !important;
    z-index: 0;
    filter: blur(5px);
    opacity: 0.3;
    transition: all 0.2s ease-in-out;
}

.card.video.small.prev {
    left: 10%;
}

.card.video.small.next {
    right: 10%;
}

.card.video .text-wrapper {
    width: 90%;
    height: fit-content;
    display: flex;
    padding: 9px 10px 11px 11px;
    color: black;
    background: white;
    font-size: 18px;
    font-weight: 400;
    line-height: normal;
    border-top-right-radius: 24px;
    position: absolute;
    left: 0px;
    bottom: 0px;
    z-index: 1;
}

@media screen and (max-width: 768px) {
    .card .text-wrapper {
        width: 70%;
        height: fit-content;
        padding: 8px 11px 11px 8px;
        font-size: 15px;
        font-weight: 400;
        min-height: 50px;
        line-height: normal;
    }

    .card.video {
        width: 267px !important;
        height: 351px !important;
        position: relative;
        z-index: 1;
    }

    .card.video.active {
        width: 267px !important;
        height: 351px !important;
        transition: all 0.2s ease-in-out;
    }

    .card.video.small {
        width: 267px !important;
        height: 351px !important;
        z-index: 0;
        filter: blur(5px);
        opacity: 0.3;
        transition: all 0.2s ease-in-out;
    }
}
