/* wrapper outside */
.news-slide-bg {
    background:
        linear-gradient(to bottom,
            rgba(0, 0, 0, 0.7),
            rgba(0, 0, 0, 0.3)),
        url('../img/news-bg.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    height: auto;
    padding: 2rem 0 2rem 0;
}

/* slide container */
#news-slide, #knowledge-slide {
    padding: 1rem 50px;
}

.news-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    height: 100%;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.card-img-container {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    border-top-left-radius: unset;
    border-top-right-radius: unset;
}

.news-card:hover .card-img-top {
    transform: scale(1.05);
}

.card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-title {
    min-height: 52px;
    font-family: "Kanit", serif;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.card-text {
    font-family: "Sarabun", serif;
    color: #555;
    line-height: 1.5;
    flex-grow: 1;
    margin-bottom: 1rem;
}

.read-more {
    color: #3498db;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: #2980b9;
}

.read-more i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.read-more:hover i {
    transform: translateX(3px);
}

.card-footer {
    background-color: transparent;
    border-top: 1px solid #eaeaea;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.publish-date {
    color: #7f8c8d;
    font-size: 0.85rem;
}

.badge-category {
    background-color: #3498db;
    color: white;
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
}


/* Content limiting styles */
.text-limit {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.title-limit {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}