/* News Cards Styling */
.news-card {
    background: var(--kpy-white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid #f0f0f0;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    border-color: var(--kpy-primary);
}

.news-card .card-image {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.news-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .card-image img {
    transform: scale(1.05);
}

.news-card .card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(25,69,157,0.3) 0%, rgba(25,69,157,0.2) 100%);
    opacity: 1;
    transition: opacity 0.3s ease;
}

.news-card:hover .card-overlay {
    opacity: 0.8;
}

.news-card .card-content {
    padding: 25px;
    position: relative;
    z-index: 2;
}

.news-card .card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    margin-bottom: 15px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.news-card .card-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.news-card .card-category {
    background: rgba(255,255,255,0.9);
    color: var(--kpy-primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: none;
}

.news-card .card-date {
    color: rgba(255,255,255,0.9);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.news-card .card-date i {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

.news-card .card-excerpt {
    color: rgba(255,255,255,0.9);
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.95rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.news-card .read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--kpy-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    padding: 8px 0;
}

.news-card .read-more:hover {
    color: var(--kpy-accent);
    transform: translateX(5px);
}

.news-card .read-more i {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.news-card:hover .read-more i {
    transform: translateX(3px);
}

/* Category Filter Styling */
.category-filter {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e9ecef;
    margin-bottom: 30px;
}

.category-filter h5 {
    color: var(--kpy-dark);
    font-weight: 600;
    margin-bottom: 15px;
}

.category-filter .btn {
    border-radius: 25px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-bottom: 5px;
    border: 2px solid var(--kpy-primary);
    color: var(--kpy-primary);
    background: transparent;
}

.category-filter .btn:hover,
.category-filter .btn.active {
    background: linear-gradient(135deg, var(--kpy-primary), var(--kpy-accent));
    border-color: var(--kpy-primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(25, 69, 157, 0.3);
}

/* Responsive adjustments for news cards */
@media (max-width: 768px) {
    .news-card .card-image {
        height: 180px;
    }

    .news-card .card-content {
        padding: 20px;
    }

    .news-card .card-title {
        font-size: 1.1rem;
    }

    .news-card .card-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .category-filter {
        padding: 15px;
    }

    .category-filter .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
    }

    .category-filter h5 {
        margin-bottom: 15px;
    }

    .category-filter .btn {
        margin-right: 10px;
        margin-bottom: 10px;
    }
}

/* Single Post Page Styles */
.post-featured-image img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

.post-meta {
    flex-wrap: wrap;
}

.post-meta .badge {
    font-size: 0.85rem;
    font-weight: 500;
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    color: var(--kpy-dark);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.post-content ul,
.post-content ol {
    padding-left: 2rem;
    margin-bottom: 1.5rem;
}

.post-content blockquote {
    border-left: 4px solid var(--kpy-primary);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #666;
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
}

/* Sidebar Styles */
.sidebar-widget {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border: 1px solid #f0f0f0;
}

.widget-header {
    border-bottom: 2px solid var(--kpy-primary);
    padding-bottom: 10px;
}

.widget-title {
    color: var(--kpy-dark);
    font-weight: 600;
    font-size: 1.1rem;
}

.recent-posts .recent-post-item:last-child {
    border-bottom: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

.recent-post-item:hover {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 8px;
    margin: -8px;
    transition: all 0.3s ease;
}

.post-thumbnail img {
    border: 2px solid #f0f0f0;
    transition: border-color 0.3s ease;
}

.recent-post-item:hover .post-thumbnail img {
    border-color: var(--kpy-primary);
}

.post-title {
    font-weight: 500;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.recent-post-item:hover .post-title {
    color: var(--kpy-primary);
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Categories Widget */
.categories-list .category-link {
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    color: #495057;
}

.categories-list .category-link:hover {
    background: var(--kpy-primary) !important;
    color: white !important;
    transform: translateX(5px);
    border-color: var(--kpy-primary);
}

.categories-list .category-link .badge {
    background: #e9ecef !important;
    color: #6c757d !important;
}

.categories-list .category-link:hover .badge {
    background: rgba(255,255,255,0.2) !important;
    color: white !important;
}

/* Pagination Styling */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.pagination {
    margin: 0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.page-link {
    color: var(--kpy-primary);
    background-color: #fff;
    border: 1px solid #dee2e6;
    padding: 0.5rem 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.page-link:hover {
    color: var(--kpy-accent);
    background-color: #f8f9fa;
    border-color: var(--kpy-primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(25, 69, 157, 0.2);
}

.page-item.active .page-link {
    background-color: var(--kpy-primary);
    border-color: var(--kpy-primary);
    color: white;
}

.page-item.disabled .page-link {
    color: #6c757d;
    background-color: #fff;
    border-color: #dee2e6;
}

/* Responsive Design for Single Post */
@media (max-width: 992px) {
    .post-meta {
        justify-content: center;
        text-align: center;
    }

    .sidebar-widget {
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    .post-featured-image img {
        max-height: 300px;
    }

    .post-content {
        font-size: 1rem;
    }

    .sidebar-widget {
        padding: 20px;
    }

    .recent-post-item {
        padding: 10px 0;
    }

    .post-thumbnail {
        margin-right: 15px;
    }

    .post-thumbnail img {
        width: 60px;
        height: 45px;
    }

    .pagination {
        flex-wrap: wrap;
    }

    .page-link {
        padding: 0.4rem 0.6rem;
        font-size: 0.9rem;
    }
}
