/**
 * SFM Post Carousel Styles
 */

.sfm-post-carousel {
    padding: 0;
}

.editor-styles-wrapper .sfm-post-carousel a {
    pointer-events: none !important;
    cursor: default !important;
}

body .entry-content a.sfm-post-carousel-view-all:hover,
.editor-styles-wrapper a.sfm-post-carousel-view-all:hover {
    text-decoration: underline;
}


.sfm-post-carousel-header {
    margin-bottom: 1.5rem;
}

.sfm-post-carousel-heading {
    font-size: 2rem;
    font-weight: 400;
    margin: 0;
    line-height: 1.2;
}

.sfm-post-carousel-content {
    position: relative;
}

/* Splide Carousel */
.sfm-post-carousel .splide {
    position: relative;
    padding: 0;
}

.sfm-post-carousel .splide__track {
   
}

.sfm-post-carousel .splide__list {
    display: flex;
}

.sfm-post-carousel .splide__slide {
    display: flex;
    flex-direction: column;
    border:1px solid transparent;
}

/* Post Item - Vertical Card Layout */
.sfm-post-carousel__link{
    border: 1px solid var(--gray-300);
    display:block;
    height:100%;
    border-radius: 8px;
    text-decoration: none;
}
.sfm-post-carousel__link:hover {
    text-decoration: none;
}
.sfm-post-carousel__link:focus{
    border-color: var(--utility-blue);
    outline-offset:-1px;
}

.sfm-post-item {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--gray-100);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.sfm-post-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.sfm-post-thumbnail {
    position: relative;
    overflow: hidden;
    background: var(--primary-100);
    aspect-ratio: 16 / 9;
}

.sfm-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.sfm-post-thumbnail a:hover img {

}

.sfm-post-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Categories */
.sfm-post-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.sfm-post-category {
    display: inline-block;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--body-color);
    background-color: var(--primary-400);
 	border: 0.5px solid var(--primary-700);
    border-radius: 4px;
    text-transform: capitalize;
}

/* Meta */
.sfm-post-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom:0;
    font-size: 0.875rem;
	line-height:1;
	color: var(--gray-700);
}

.sfm-post-separator {
    color: var(--primary-600);
	font-size:1.5rem;
}

/* Title */
.sfm-post-carousel-content .sfm-post-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-800);
    line-height: 1.4;
    margin: 1rem 0 0.75rem 0;
}

.sfm-post-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.sfm-post-title a:hover {
    color:var(--gray-800);
}

/* Excerpt */
.sfm-post-excerpt {
    font-size: 0.9rem;
    line-height: 1.6;
    color:var(--gray-700);
    margin: 0;
    flex-grow: 1;
}

.sfm-post-excerpt p {
    margin: 0;
}

/* Custom Arrows */
.sfm-post-carousel .splide__arrows {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

.sfm-post-carousel .splide:not(.is-overflow) .splide__arrow,
.sfm-post-carousel .splide:not(.is-overflow) .splide__pagination-info {
    display: none;
}


.sfm-post-carousel .splide .splide__arrow,
.wp-block-kadence-rowlayout .sfm-post-carousel .splide .splide__arrow {
    position: static;
    transform: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    opacity: 1;
    padding: 0;
    border: none;
    margin: 0;
    width: auto;
    height: auto;
    background: transparent;
}

.sfm-post-carousel .splide .splide__arrow:hover,
.sfm-post-carousel .splide .splide__arrow:focus,
.wp-block-kadence-rowlayout .sfm-post-carousel .splide .splide__arrow:hover,
.wp-block-kadence-rowlayout .sfm-post-carousel .splide .splide__arrow:focus {
    background: transparent;
}


.sfm-post-carousel .splide  .splide__arrow:hover:not(:disabled),
.wp-block-kadence-rowlayout .sfm-post-carousel .splide  .splide__arrow:hover:not(:disabled) {
    background: transparent;
}

.sfm-post-carousel .splide  .splide__arrow:disabled,
.wp-block-kadence-rowlayout .sfm-post-carousel .splide  .splide__arrow:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.sfm-post-carousel .splide  .splide__arrow i,
.wp-block-kadence-rowlayout .sfm-post-carousel .splide  .splide__arrow i {
    font-size: 24px;
    color: var(--gray-800);
}

.sfm-post-carousel .splide  .splide__arrow svg,
.wp-block-kadence-rowlayout .sfm-post-carousel .splide  .splide__arrow svg {
    width: 24px;
    height: 24px;
    fill: var(--gray-800);
}

/* Pagination Info */
.splide__pagination-info {
    font-size: 1rem;
    color: var(--body-color);
    font-weight: 400;
    white-space: nowrap;
}

/* Responsive */
@media (max-width: 992px) {
    .sfm-post-carousel .splide {
        padding: 0;
    }
    
    .sfm-post-carousel-heading {
        font-size: 1.75rem;
    }
}

@media (max-width: 767px) {
    .sfm-post-carousel .splide {
        padding: 0;
    }
    
    .sfm-post-carousel-heading {
        font-size: 1.5rem;
        padding:1rem 0;
    }
    /*.splide__pagination-info{*/
    /*    display:none;*/
    /*}*/
    
    /*.sfm-post-carousel .splide__arrows {*/
    /*    flex-wrap: wrap;*/
    /*    justify-content: center;*/
    /*}*/
    
    /*.splide__posts-count {*/
    /*    width: 100%;*/
    /*    text-align: center;*/
    /*    margin-bottom: 1rem;*/
    /*}*/
}

/* Editor Specific Styles (when Bootstrap is not loaded) */
.block-editor-block-list__layout .sfm-post-carousel {
    margin: 1rem 0;
}

/* Editor: Replicate Bootstrap row/col behavior */
.block-editor-block-list__layout .sfm-post-carousel-header .row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.block-editor-block-list__layout .sfm-post-carousel-header .col {
    flex: 1 0 0%;
    padding: 0 24px;
}

.block-editor-block-list__layout .sfm-post-carousel-header .col-auto {
    flex: 0 0 auto;
    width: auto;
    padding: 0 24px;
    padding-left: 0;
}

.block-editor-block-list__layout .sfm-post-carousel-header .col-lg {
    flex: 1 0 0;
}

.block-editor-block-list__layout .sfm-post-carousel-header .d-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.block-editor-block-list__layout .sfm-post-carousel-header .align-items-center {
    align-items: center;
}

/* Editor: Ensure img-fluid class works */
.block-editor-block-list__layout .sfm-post-thumbnail .img-fluid {
    max-width: 100%;
    height: auto;
}
