.blog-carousel-item {
    padding: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease-in-out, transform 0.3s ease-in-out;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 525px;
    position: relative; /* Add this */
    text-align: center; /* Center text horizontally */
}

.blog-carousel-item img {
    max-width: 100%;
    display: block;
    height: 300px;
    width: 100%;
    object-fit: cover;
    object-position: center;
}
.blog-carousel-item h2, .blog-carousel-item p {
    width: 100%;
    text-align: center;
    padding: 5px 0;
}
.blog-carousel-item h2 {
    font-size: 18px;  /* Reducing font size for h2 elements */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    min-height: 4em; /* Slightly increased from 3em to hide the third line completely */
}

.blog-carousel-item:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    transform: scale(1.03);
}
.blog-carousel-item {
    height: 420px;
}
@media screen and (max-width: 767px) {
    .blog-carousel-item {
        height: auto;
    }
    .blog-carousel-item img {
        height: 200px;
    }
    /* Resetting hover effects on mobile */
    .blog-carousel-item:hover {
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        transform: none;
    }
    .blog-carousel-item h2 {
        -webkit-line-clamp: 5;
        line-clamp: 5;
        min-height: 7.5em; /* Adjusting for 5 lines on smaller screens */
    }
}
.blog-carousel-item:hover {
    margin: 0;
}
.owl-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}
.blog-carousel-item {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.blog-carousel-item h2, 
.blog-carousel-item p {
    flex: 0;
}
.blog-carousel-item img {
    flex: 1;
}
.read-article-btn {
    background-color: black;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease-in-out, transform 0.3s ease-in-out;
    margin-top: 10px;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0px 4px 5px -2px rgba(0,0,0,.75);
    display: inline-block;
    padding: 1em 2em;
    text-align: center; /* Added this to center the text */

}
.read-article-btn:hover, .read-article-btn:focus {
    background-color: #444;
    transform: scale(1.05);
    transform: translatey(-10px);
    box-shadow: 0px 18px 8px -10px rgba(0,0,0,.6);
  }
.read-article-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 0, 255, 0.5); /* Adds a blue outline */
}


/* assets/custom/css/customcss/blogpost1.css 
<link rel="stylesheet" href="{{cdn 'assets/custom/css/customcss/blogpost1.css '}}">
