/* Custom CSS for equal height blog cards */
.blog-card-link {
    display: block;
    height: 100%;
}

.equal-height-blog {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.fixed-height-img img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* This ensures the image covers the area without distortion */
}

.fixed-height-text {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px;
    height: 200px; /* Fixed height for text section */
    overflow: hidden;
}

.fixed-height-text h5 {
    margin-top: 0;
    margin-bottom: 10px;
}

.fixed-height-text p {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Limit to 3 lines */
    -webkit-box-orient: vertical;
}

.fixed-height-text ul {
    margin-top: auto;
    margin-bottom: 0;
}

.alphabet-filter a:hover {
    background-color: #000;
    color: #fff;
}

/* Responsive styles for tablet devices */
@media (max-width: 991px) {
    .fixed-height-text {
        height: 180px; /* Matching height for text section */
        padding: 15px;
    }

    .fixed-height-text h5 {
        font-size: 16px; /* Slightly smaller font size */
    }

    .fixed-height-text p {
        font-size: 14px;
        -webkit-line-clamp: 2; /* Limit to 2 lines on tablet */
    }
}

/* Alphabet filter styles */
.alphabet-filter {
    margin: 20px 0;
    text-align: center;
}

.alphabet-filter .btn {
    margin: 3px;
    min-width: 40px;
}

.alphabet-filter .btn-outline-primary {
    color: #000;
    border-color: #000;
}

.alphabet-filter .btn-primary {
    background-color: #000;
    border-color: #000;
}

/* Responsive styles for alphabet filter */
@media (max-width: 991px) {
    .alphabet-filter .btn {
        min-width: 35px;
        font-size: 14px;
        margin: 2px;
        padding: 5px 8px;
    }
}

/* Responsive styles for mobile devices */
@media (max-width: 767px) {
    .fixed-height-text {
        height: 160px; /* Matching height for text section */
        padding: 12px;
    }

    .fixed-height-text h5 {
        font-size: 15px;
        margin-bottom: 5px;
    }

    .fixed-height-text p {
        font-size: 13px;
    }

    .fixed-height-text ul {
        font-size: 12px;
    }

    .alphabet-filter .btn {
        min-width: 30px;
        font-size: 12px;
        margin: 1px;
        padding: 4px 6px;
    }
}

/* Extra small devices */
@media (max-width: 575px) {
    .fixed-height-text {
        height: 140px; /* Matching height for text section */
        padding: 10px;
    }
}
