/* Card Container */
.preview-card {
    display: flex;
    align-items: center; /* Aligns content vertically */
    justify-content: space-between; /* Spaces out the image and text */
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.preview-card:hover {
    transform: translateY(-5px);
}

/* Image Section */
.preview-card__img {
    width: 40%; /* Sets the image section width */
    height: 100%; /* Makes the image cover the container height */
    overflow: hidden;
}

.preview-card__img img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    border-radius: 8px;
    background-position: center; /* Center the image */
    background-repeat: no-repeat; /* Do not repeat the image */
    background-size: cover; /* Resize the background image to cover the entire container */
}

/* Content Section */
.preview-card__content {
    width: 60%; /* Ensures the content takes up remaining space */
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.preview-card__code {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 10px;
}

.preview-card__title {
    font-size: 20px;
    font-weight: bold;
    color: #343a40;
    margin-bottom: 10px;
}

.preview-card__text {
    font-size: 16px;
    color: #6c757d;
    margin-bottom: 20px;
}
.preview-card__item {
    display: flex;
}

.preview-card__button {
    align-self: flex-start;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    color: #ffffff;
    background-color: #000000;
    border-radius: 20px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.preview-card__button:hover {
    background-color: #343a40;
}

/* Responsive Design */
@media (max-width: 768px) {
    .preview-card {
        flex-direction: column; /* Stacks the image and content vertically */
        margin: 0 10px;
    }

    .preview-card__img {
        width: 100%; /* Image takes full width on small screens */
        height: auto; /* Maintains aspect ratio */
    }

    .preview-card__content {
        width: 100%; /* Content takes full width */
        padding: 15px;
    }

    .preview-card__title {
        font-size: 18px;
    }
    .preview-card__item {
        flex-direction: column;
    }

    .preview-card__text {
        font-size: 14px;
    }
}
