/* CSS cho trang tin tức */

/* Post Card Styles */
.post-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    height: 100%;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.post-img-container {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.post-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card:hover .post-img {
    transform: scale(1.1);
}

.post-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.post-card:hover .post-overlay {
    opacity: 1;
}

.post-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.post-title-link {
    text-decoration: none;
    color: inherit;
}

.post-card:hover .post-title {
    color: var(--primary-pink);
}

.post-excerpt {
    font-size: 0.875rem;
    color: #666;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-date,
.post-views {
    font-size: 0.75rem;
    color: #888;
}

.post-read-more {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-pink);
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.post-card:hover .post-read-more {
    opacity: 1;
}

.card-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.post-category,
.post-title-link,
.post-read-more,
.post-img-link {
    position: relative;
    z-index: 2;
}

/* Responsive adjustments for posts */
@media (max-width: 767px) {
    .post-img-container {
        aspect-ratio: 3/2;
    }

    .post-title {
        font-size: 0.9rem;
    }

    .post-excerpt {
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
    }

    .post-date,
    .post-views {
        font-size: 0.7rem;
    }
}
