/* Enhanced Card Component Styles */

.row {
    display: flex;
    flex-wrap: wrap;
}

.col-md-4 {
    display: flex;
    margin-bottom: 2rem;
}

.text-gradient {
    background: linear-gradient(45deg, #ff9a56, #ff6b35);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.border-radius-lg {
    border-radius: 0.75rem;
}

.z-index-1 {
    z-index: 1;
}

.avatar {
    width: 40px;
    height: 40px;
    object-fit: cover;
}

.card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

.tags-section {
    min-height: 60px; /* Reserve consistent space for tags */
    margin-bottom: 1rem;
}

/* Push author section to bottom */
.author {
    margin-top: auto;
}

/* Consistent title height */
.card-body h5 {
    min-height: 3.5em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

/* Fixed image height for consistency */
.card-img {
    height: 200px;
    object-fit: cover;
    width: 100%;
}

/* Apply your existing truncation to descriptions */
.card-description {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 4.5em; /* 3 lines worth of space */
    margin-bottom: 1rem;
}

.tag-pill {
    background: linear-gradient(45deg, #006666, #20B2AA);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    margin: 0.125rem;
    transition: all 0.3s ease;
}

.tag-pill:hover {
    transform: scale(1.05);
    color: white;
    box-shadow: 0 4px 15px rgba(32, 178, 170, 0.4);
}

.read-more-btn {
    background: linear-gradient(45deg, #006666, #20B2AA);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.read-more-btn:hover {
    background: linear-gradient(45deg, #20B2AA, #006666);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(32, 178, 170, 0.4);
    color: white;
}

/* .card-img-placeholder {
    background: url('https:seedglobaleducation.com/study-abroad/assets/technology.jpg');
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
} */

.avatar-placeholder {
    background: linear-gradient(135deg, #ff9a56, #ff6b35);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.card-description.css-truncate {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
