/* ===== CRI Category Page ===== */

.cri-category-header {
    text-align: center;
    padding-top: 20px;
}

.cri-category-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 15px;
}

.cri-category-description {
    font-size: 1rem;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== Posts Grid ===== */
.cri-posts-grid {
    margin-bottom: 40px;
}

.cri-posts-grid .row {
    margin: 0 -12px;
}

.cri-posts-grid .col-lg-4,
.cri-posts-grid .col-md-6,
.cri-posts-grid .col-sm-12 {
    padding: 12px;
}

.cri-post-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cri-post-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
    border-color: #00a651;
}

.cri-post-card-image {
    position: relative;
    overflow: hidden;
    height: 240px;
    background: #f5f5f5;
}

.cri-post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cri-post-card:hover .cri-post-card-image img {
    transform: scale(1.08);
}

.cri-post-card-link {
    display: block;
    width: 100%;
    height: 100%;
}

.cri-post-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cri-post-card-title {
    margin-bottom: 10px;
}

.cri-post-card-title-link {
    color: #1a1a1a;
    text-decoration: none;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.cri-post-card-title-link:hover {
    color: #00a651;
}

.cri-post-card-meta {
    font-size: 0.9rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.cri-post-card-meta i {
    margin-right: 6px;
    color: #00a651;
}

.cri-post-card-excerpt {
    flex: 1;
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
}

/* ===== Pagination ===== */
.cri-pagination-wrapper {
    display: flex;
    justify-content: center;
}

.cri-pagination-wrapper .pagination {
    gap: 5px;
}

.cri-pagination-wrapper .page-numbers {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    color: #1a1a1a;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.cri-pagination-wrapper .page-numbers:hover,
.cri-pagination-wrapper .page-numbers.current {
    background-color: #00a651;
    border-color: #00a651;
    color: white;
}

/* ===== Categories Carousel ===== */
.cri-categories-carousel-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid #e0e0e0;
}

.cri-carousel-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a1a1a;
}

.cri-categories-carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 15px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.cri-categories-carousel::-webkit-scrollbar {
    height: 6px;
}

.cri-categories-carousel::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.cri-categories-carousel::-webkit-scrollbar-thumb {
    background: #00a651;
    border-radius: 10px;
}

.cri-categories-carousel::-webkit-scrollbar-thumb:hover {
    background: #008a42;
}

.cri-carousel-item {
    flex: 0 0 280px;
    min-width: 280px;
}

.cri-carousel-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
}

.cri-carousel-link {
    display: block;
    text-decoration: none;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.cri-carousel-card:hover {
    box-shadow: 0 12px 32px rgba(0, 166, 81, 0.2);
    border-color: #00a651;
    transform: translateY(-6px);
}

.cri-carousel-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.cri-carousel-placeholder {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

.cri-carousel-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cri-carousel-category-name {
    color: #1a1a1a;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 10px;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.cri-carousel-card:hover .cri-carousel-category-name {
    color: #00a651;
}

.cri-carousel-count {
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
    .cri-category-title {
        font-size: 1.8rem;
    }

    .cri-carousel-item {
        flex: 0 0 250px;
        min-width: 250px;
    }

    .cri-carousel-img,
    .cri-carousel-placeholder {
        height: 150px;
    }

    .cri-carousel-content {
        padding: 15px;
    }
}

@media (max-width: 576px) {
    .cri-category-title {
        font-size: 1.5rem;
    }

    .cri-carousel-item {
        flex: 0 0 200px;
        min-width: 200px;
    }

    .cri-carousel-title {
        font-size: 1.4rem;
    }
}
