
.blog-wrapper{
    margin-top: 5rem;
}
.blog-heading {
    font-family: Arial, sans-serif;
    text-align: center;
    font-size: 2rem;
    margin-bottom: 20px;
    
}

.blog-container {
    font-family: Arial, sans-serif;
    width: 90%;
    margin: 4rem auto;
    overflow: hidden;
    height: 400px;
    padding: 10px;
    
}

.blog-slider {
    display: flex;
    justify-content: space-around;
    animation: slide 15s linear infinite;
    will-change: transform; /* Better for performance */
}

.blog {
    background-color: teal;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 0 10px;
    flex-shrink: 0;
    width: 250px;
    overflow: hidden;
    transition: transform .1s ease-in-out;
}

.blog:hover {
    transform: scale(1.02); /* Slightly enlarges the card on hover */
}

.blog img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.blog-content {
    padding: 15px;
}
.blog-content h2 {
    font-size: large;
}

.author {
    display: flex;
    align-items: center;
    margin-top: 15px;
}

.author-info {
    margin-left: 10px;
}

.author-info span {
    display: block;
    font-size: 12px;
    color: black;
}

/* Media Queries for different screen sizes */
@media (max-width: 768px) {
    .blog-slider {
        justify-content: flex-start;
        animation: slide 8s linear infinite; /* Adjust speed */
    }

    .blog {
        width: 220px;
    }
}

@media (max-width: 480px) {
    .blog-slider {
        justify-content: flex-start;
        animation: slide 10s linear infinite; /* Slower for small screens */
    }

    .blog {
        width: 180px;
    }

    .blog img {
        height: 150px;
    }

    h1 {
        font-size: 1.5em;
    }
}

@keyframes slide {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-46%);
    }
}

