/* Base Grid Styles */
.cchsad-articles-grid,
.cchsad-vc-articles-grid {
    display: grid;
    gap: 30px;
    margin: 20px 0;
}

#site-navigation li.menu-item a{
    color:#333 !important;
}

.cchsad-article-download{
    color:#fff !important;
}

.cchsad-articles-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* Column Variations */
.cchsad-columns-2,
.cchsad-vc-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.cchsad-columns-3,
.cchsad-vc-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.cchsad-columns-4,
.cchsad-vc-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Article Card Styles */
.cchsad-article-card,
.cchsad-vc-article-card {
    border: 1px solid #e0e0e0;
    border-radius: 15px;
    /* padding: 20px; */
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    background: #fff;
}

.cchsad-article-card:hover,
.cchsad-vc-article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Featured Image Styles */
.cchsad-article-image {
    height: 130px !important;
    overflow: hidden;
}

.cchsad-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cchsad-article-card:hover .cchsad-article-image img {
    transform: scale(1.05);
}

/* Content Area Styles */
.cchsad-article-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Category, Title, Excerpt Styles */
.cchsad-article-category,
.cchsad-vc-article-category {
    font-size: 12px;
    font-weight: bold;
    color: #00a32e;
    text-transform: uppercase;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.cchsad-article-title,
.cchsad-vc-article-title {
    font-size: 18px;
    margin: 0 0 15px 0;
    color: #333;
    line-height: 1.4;
    flex-grow: 1;
    font-weight: bold;
}

.cchsad-article-excerpt {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

/* Download Button Styles */
.cchsad-article-download,
.cchsad-vc-article-download {
    display: inline-block;
    padding: 12px 38px;
    background-color: #00a32e;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 16px;
    transition: all 0.3s ease;
    margin-top: auto;
    align-self: center; /* Changed from flex-start to center */
    text-align: center; /* Ensures text is centered within the button */
    width: fit-content; /* Makes the button only as wide as its content */
    margin-left: auto; /* These two margin properties help with centering */
    margin-right: auto;
    border-radius: 25px;
    font-weight: bold;
}

.cchsad-article-download:hover,
.cchsad-vc-article-download:hover {
    background-color: #1a68d1;
}

/* No Articles Message */
.cchsad-no-articles,
.cchsad-vc-no-articles {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #666;
    background-color: #f9f9f9;
    border-radius: 8px;
}

/* Pagination Styles */
.cchsad-pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.cchsad-pagination .page-numbers {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.cchsad-pagination .page-numbers.current {
    background-color: #2c7be5;
    color: white;
    border-color: #2c7be5;
}

.cchsad-pagination .page-numbers:hover:not(.current) {
    background-color: #f5f5f5;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .cchsad-columns-4,
    .cchsad-vc-columns-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .cchsad-articles-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .cchsad-columns-3,
    .cchsad-columns-4,
    .cchsad-vc-columns-3,
    .cchsad-vc-columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .cchsad-article-image {
        height: 150px;
    }
}

@media (max-width: 480px) {
    .cchsad-articles-grid,
    .cchsad-vc-articles-grid {
        grid-template-columns: 1fr;
    }
    
    .cchsad-article-image {
        height: 200px;
    }
}


/* Pagination Styles */
.cchsad-pagination {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    margin-top: 40px;
    padding: 20px 0;
}

.cchsad-pagination .page-numbers {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 4px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    text-decoration: none;
    color: #2c7be5;
    transition: all 0.3s ease;
    font-size: 14px;
}

.cchsad-pagination .page-numbers.current {
    background-color: #2c7be5;
    color: white;
    border-color: #2c7be5;
}

.cchsad-pagination .page-numbers:hover:not(.current) {
    background-color: #f5f9ff;
    border-color: #2c7be5;
}

.cchsad-pagination .page-numbers.dots {
    border: none;
    padding: 8px 8px;
}

/* Responsive Pagination */
@media (max-width: 480px) {
    .cchsad-pagination .page-numbers {
        padding: 8px 12px;
        margin: 0 2px;
    }
}