/* ============================================
   CAROUSEL WRAPPER
   ============================================ */
.ccs-carousel-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

.slick-prev:before, 
.slick-next:before {
    font-family: sans-serif !important;
}

.ccs-carousel {
    margin: 0 -10px;
}

/* ============================================
   INDIVIDUAL SLIDE - STANDARDIZED HEIGHTS
   ============================================ */
.ccs-slide {
    padding: 0 10px;
    display: flex !important;
    height: auto !important;
    min-height: 420px; /* Minimum height for consistency */
}

.ccs-slide-inner {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.ccs-slide-inner:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

/* ============================================
   FEATURED IMAGE - FIXED HEIGHT FOR CONSISTENCY
   ============================================ */
.ccs-featured-image {
    position: relative;
    height: 220px; /* Fixed height instead of aspect-ratio */
    overflow: hidden;
    background: #f0f0f0;
    flex-shrink: 0; /* Prevent image from shrinking */
}

.ccs-featured-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
}

/* New Badge */
.ccs-new-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #FA732C;
    color: #ffffff;
    padding: 4px 14px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    font-family: "Roboto", Sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.ccs-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8e8e8;
    color: #999;
    font-size: 14px;
    font-family: "Roboto", Sans-serif;
    width: 100%;
    height: 100%;
}

/* ============================================
   CONTENT AREA - FLEX TO FILL REMAINING SPACE
   ============================================ */
.ccs-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #ffffff;
}

/* Title */
.ccs-title {
    margin: 0 0 5px 0;
    line-height: 1.4;
    font-family: "Poppins", Sans-serif;
    font-size: 16px !important;
    font-weight: 600 !important;
    letter-spacing: 0px;
    color: #000000;
    flex-shrink: 0;
}

.ccs-title a {
    text-decoration: none;
    transition: color 0.3s ease;
    line-height: 1.4;
    font-family: "Poppins", Sans-serif;
    font-size: 16px !important;
    font-weight: 600 !important;
    letter-spacing: 0px;
    color: #000000;
}

.ccs-title a:hover {
    color: #FA732C;
}

/* Date */
.ccs-date {
    font-size: 14px;
    font-weight: 600;
    color: #046843;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.ccs-date .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 4px;
}

/* Excerpt - Hidden */
.ccs-excerpt {
    display: none !important;
}

/* ============================================
   READ MORE BUTTON - PUSHED TO BOTTOM
   ============================================ */
.ccs-readmore {
    display: inline-block;
    background-color: transparent;
    font-family: "Roboto", Sans-serif;
    font-weight: 500;
    width: 100%;
    fill: #FA732C;
    color: #FA732C;
    border-style: solid;
    border-width: 1px;
    border-color: #FA732C;
    border-radius: 8px;
    padding: 10px 50px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    text-align: center;
    line-height: 1.2;
    margin-top: auto; /* Pushes button to bottom of content area */
    flex-shrink: 0;
}

.ccs-readmore:hover {
    background-color: #FA732C;
    color: #ffffff;
    border-color: #FA732C;
    transform: scale(1.02);
}

/* ============================================
   SLIDE COUNTER
   ============================================ */
.ccs-slide-counter {
    text-align: center;
    margin-top: 30px;
    font-family: "Roboto", Sans-serif;
    font-size: 14px;
    color: #666;
    font-weight: 500;
    padding: 8px 0;
    background: transparent;
    letter-spacing: 0.5px;
}

/* Optional: Style for the counter with a background */
.ccs-slide-counter {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 6px 24px;
    display: inline-block;
    margin: 30px auto 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* If you want the counter inside the carousel */
.ccs-carousel-wrapper .ccs-slide-counter {
    position: absolute;
    display: none;
    bottom: -55px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

/* ============================================
   SLICK CAROUSEL OVERRIDES
   ============================================ */
.slick-prev,
.slick-next {
    z-index: 1;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    transition: background 0.3s ease;
}

.slick-prev:hover,
.slick-next:hover {
    background: rgba(0, 0, 0, 0.8);
}

.slick-prev:before,
.slick-next:before {
    font-size: 20px;
}

/* Slick Dots */
.slick-dots {
    bottom: -40px;
}

/* Extra specificity to override theme button styles */
.ccs-carousel-wrapper .slick-dots li button,
.ccs-carousel-wrapper .slick-dots li button:hover,
.ccs-carousel-wrapper .slick-dots li button:focus {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.slick-dots li button:before {
    font-size: 12px;
    color: #333;
}

.slick-dots li.slick-active button:before {
    color: #FA732C;
}

/* Slick Track - Flex for equal heights */
.slick-track {
    display: flex !important;
    align-items: stretch !important;
    padding-bottom: 5px;
}

/* Slick Slide - Allow flex stretching */
.slick-slide {
    height: auto !important;
}

.slick-slide > div {
    height: 100%;
}

/* ============================================
   TWO ROWS SPECIFIC STYLES
   ============================================ */
.ccs-two-rows .ccs-slide {
    min-height: 350px;
}

.ccs-two-rows .ccs-featured-image {
    height: 160px;
}

.ccs-two-rows .ccs-content {
    padding: 10px 15px;
}

.ccs-two-rows .ccs-title {
    font-size: 13px !important;
    margin-bottom: 3px;
}

.ccs-two-rows .ccs-title a {
    font-size: 13px !important;
}

.ccs-two-rows .ccs-date {
    font-size: 11px;
    margin-bottom: 5px;
}

.ccs-two-rows .ccs-readmore {
    padding: 5px 15px;
    font-size: 11px;
}

/* Two rows counter adjustment */
.ccs-two-rows .ccs-slide-counter {
    margin-top: 25px;
    font-size: 13px;
    padding: 5px 20px;
}

/* Slick rows support */
.slick-slider .slick-track,
.slick-slider .slick-list {
    display: flex;
}

.slick-slider .slick-slide {
    display: flex;
    height: auto;
    align-items: stretch;
}

.slick-slider .slick-slide > div {
    width: 100%;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Large screens */
@media (min-width: 992px) {
    .ccs-slide {
        padding: 0 15px;
        min-height: 440px;
    }
    
    .ccs-featured-image {
        height: 240px;
    }
}

/* Tablets */
@media (max-width: 991px) and (min-width: 768px) {
    .ccs-slide {
        padding: 0 12px;
        min-height: 400px;
    }
    
    .ccs-featured-image {
        height: 200px;
    }
    
    .ccs-title {
        font-size: 15px !important;
    }
    
    .ccs-title a {
        font-size: 15px !important;
    }
    
    .ccs-content {
        padding: 15px;
    }
    
    .ccs-readmore {
        padding: 8px 35px;
        font-size: 13px;
    }
    
    .ccs-slide-counter {
        font-size: 13px;
        padding: 5px 20px;
        margin-top: 25px;
    }
    
    .ccs-two-rows .ccs-slide-counter {
        font-size: 12px;
        padding: 4px 18px;
        margin-top: 20px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .ccs-carousel-wrapper {
        padding: 10px;
    }
    
    .ccs-slide {
        padding: 0 8px;
        min-height: 380px;
    }
    
    .ccs-featured-image {
        height: 180px;
    }
    
    .ccs-title {
        font-size: 14px !important;
    }
    
    .ccs-title a {
        font-size: 14px !important;
    }
    
    .ccs-content {
        padding: 12px;
    }
    
    .ccs-date {
        font-size: 12px;
    }
    
    .ccs-readmore {
        padding: 8px 30px;
        font-size: 12px;
        width: 100%;
        text-align: center;
    }
    
    .ccs-slide-counter {
        font-size: 12px;
        padding: 4px 16px;
        margin-top: 20px;
    }
    
    .ccs-carousel-wrapper .ccs-slide-counter {
        bottom: -48px;
    }
    
    .ccs-two-rows .ccs-slide-counter {
        font-size: 11px;
        padding: 3px 14px;
        margin-top: 18px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .ccs-slide {
        min-height: 360px;
    }
    
    .ccs-featured-image {
        height: 200px;
    }
    
    .ccs-readmore {
        padding: 8px 20px;
        font-size: 12px;
    }
    
    .ccs-slide-counter {
        font-size: 11px;
        padding: 3px 14px;
        margin-top: 18px;
    }
    
    .ccs-carousel-wrapper .ccs-slide-counter {
        bottom: -45px;
    }
}

/* ============================================
   ACCESSIBILITY & UTILITY
   ============================================ */

/* Focus states for accessibility */
.ccs-readmore:focus,
.ccs-title a:focus {
    outline: 2px solid #FA732C;
    outline-offset: 2px;
}

/* No posts message */
.ccs-no-posts {
    text-align: center;
    padding: 40px 20px;
    font-family: "Roboto", Sans-serif;
    font-size: 16px;
    color: #666;
    background: #f9f9f9;
    border-radius: 8px;
}

/* Print styles */
@media print {
    .ccs-carousel-wrapper {
        max-width: 100%;
        padding: 0;
    }
    
    .ccs-slide-inner {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .ccs-slide-inner:hover {
        transform: none;
    }
    
    .slick-prev,
    .slick-next,
    .slick-dots,
    .ccs-slide-counter {
        display: none !important;
    }
}
/* ============================================
   PAGINATION WITH CLICKABLE NUMBERS
   ============================================ */
.ccs-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
    padding: 10px 0;
    flex-wrap: wrap;
}

.ccs-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 6px;
    font-family: "Roboto", Sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    background: transparent;
    border: 1px solid transparent;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.ccs-page-link:hover {
    background: #f5f5f5;
    border-color: #ddd;
    color: #FA732C;
    text-decoration: none;
}

.ccs-page-link.ccs-current-page {
    background: #FA732C;
    color: #ffffff;
    border-color: #FA732C;
    cursor: default;
    font-weight: 700;
}

.ccs-page-link.ccs-current-page:hover {
    background: #FA732C;
    color: #ffffff;
}

.ccs-page-link.ccs-prev-page,
.ccs-page-link.ccs-next-page {
    font-weight: 500;
    color: #FA732C;
    min-width: 80px;
    border: 1px solid #FA732C;
    background: transparent;
}

.ccs-page-link.ccs-prev-page:hover,
.ccs-page-link.ccs-next-page:hover {
    background: #FA732C;
    color: #ffffff;
    text-decoration: none;
}

.ccs-page-link.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    color: #999;
    border-color: #ddd;
    pointer-events: none;
}

.ccs-page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    font-family: "Roboto", Sans-serif;
    font-size: 14px;
    color: #999;
    user-select: none;
}

/* Pagination responsive */
@media (max-width: 768px) {
    .ccs-pagination {
        gap: 5px;
        margin-top: 25px;
        padding: 8px 0;
    }
    
    .ccs-page-link {
        min-width: 32px;
        height: 32px;
        font-size: 13px;
        padding: 0 8px;
    }
    
    .ccs-page-link.ccs-prev-page,
    .ccs-page-link.ccs-next-page {
        min-width: 70px;
        font-size: 12px;
    }
    
    .ccs-page-ellipsis {
        min-width: 32px;
        height: 32px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .ccs-pagination {
        gap: 3px;
        margin-top: 20px;
    }
    
    .ccs-page-link {
        min-width: 28px;
        height: 28px;
        font-size: 12px;
        padding: 0 6px;
        border-radius: 4px;
    }
    
    .ccs-page-link.ccs-prev-page,
    .ccs-page-link.ccs-next-page {
        min-width: 60px;
        font-size: 11px;
        padding: 0 8px;
    }
    
    .ccs-page-ellipsis {
        min-width: 28px;
        height: 28px;
        font-size: 12px;
    }
}
/* Hide dots when disabled via shortcode */
.ccs-carousel-wrapper[data-show-dots="false"] .slick-dots {
    display: none !important;
}

/* Hide arrows when disabled via shortcode */
.ccs-carousel-wrapper[data-show-arrows="false"] .slick-prev,
.ccs-carousel-wrapper[data-show-arrows="false"] .slick-next {
    display: none !important;
}

/* Hide pagination when disabled via shortcode */
.ccs-carousel-wrapper[data-show-pagination="false"] .ccs-pagination {
    display: none !important;
}