/* Block 4 Compact - 4 Column Grid */
.block-4-compact .col-sm-3 {
    padding-left: 8px;
    padding-right: 8px;
}

.block-4-compact .post-item-mid .title {
    font-size: 14px;
    line-height: 1.3;
    margin-bottom: 5px;
}

.block-4-compact .post-item-mid .post-meta {
    font-size: 11px;
}

.block-4-compact .post-image-lg {
    height: 180px;
}

.block-4-compact .post-image-lg img {
    border-radius: 3px 3px 0 0;
}

@media (max-width: 767px) {
    .block-4-compact .col-xs-6 {
        padding-left: 6px;
        padding-right: 6px;
    }
    
    .block-4-compact .post-item-mid .title {
        font-size: 13px;
        line-height: 1.2;
    }
    
    .block-4-compact .post-image-lg {
        height: 140px;
    }
    
    .block-4-compact .post-image-lg img {
        border-radius: 3px 3px 0 0;
    }
}

/* Latest Posts Dark Mode - Desktop & Mobile */
body.dark-mode .latest-articles .post-item-horizontal .item-content h3.title a,
body.dark-mode .latest-articles .post-item-horizontal .item-content .title a {
    color: #ffffff !important;
}

body.dark-mode .latest-articles .post-item-horizontal .small-post-meta,
body.dark-mode .latest-articles .post-item-horizontal .small-post-meta a,
body.dark-mode .latest-articles .post-item-horizontal .small-post-meta span {
    color: #bbb !important;
}

/* Latest Posts Mobile - Like Popular Posts */
@media (max-width: 767px) {
    .latest-articles {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .latest-articles .col-sm-12 {
        padding-left: 0;
        padding-right: 0;
    }
    
    .latest-articles .row {
        margin-left: 0;
        margin-right: 0;
    }
    
    .latest-articles .post-item-horizontal {
        display: flex !important;
        align-items: flex-start;
        padding: 8px 0 !important;
        border-bottom: 1px solid #eee;
        border-top: none !important;
    }
    
    .latest-articles .post-item-horizontal:first-child {
        padding-top: 0 !important;
    }
    
    .latest-articles .post-item-horizontal:last-child {
        border-bottom: none;
        padding-bottom: 0 !important;
    }
    
    .latest-articles .post-item-horizontal .item-image {
        width: 100px !important;
        flex-shrink: 0;
        padding: 0 !important;
        margin-right: 12px;
    }
    
    .latest-articles .post-item-horizontal .item-image .post-item-image {
        width: 100px;
        height: 75px;
        overflow: hidden;
        border-radius: 4px;
    }
    
    .latest-articles .post-item-horizontal .item-image .post-item-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .latest-articles .post-item-horizontal .item-content {
        flex: 1;
        padding: 0 !important;
        width: auto !important;
    }
    
    .latest-articles .post-item-horizontal .category-label-horizontal {
        display: inline-block;
        margin-bottom: 5px;
        font-size: 10px;
        padding: 2px 6px;
    }
    
    .latest-articles .post-item-horizontal .title {
        font-size: 14px;
        line-height: 1.4;
        margin: 0 0 5px 0;
    }
    
    .latest-articles .post-item-horizontal .title a {
        color: #333;
        font-weight: 500;
    }
    
    .latest-articles .post-item-horizontal .small-post-meta {
        font-size: 11px;
        margin: 0;
        color: #999;
    }
    
    .latest-articles .post-item-horizontal .description {
        display: none;
    }
    
    /* Dark Mode Styles for Latest Posts Mobile */
    body.dark-mode .latest-articles .post-item-horizontal {
        border-bottom-color: #373737 !important;
    }
    
    body.dark-mode .latest-articles .post-item-horizontal .item-content h3.title a {
        color: #ffffff !important;
        font-weight: 500 !important;
    }
    
    body.dark-mode .latest-articles .post-item-horizontal .item-content .title a {
        color: #ffffff !important;
        font-weight: 500 !important;
    }
    
    body.dark-mode .latest-articles .post-item-horizontal .small-post-meta {
        color: #bbb !important;
    }
    
    body.dark-mode .latest-articles .post-item-horizontal .small-post-meta a {
        color: #bbb !important;
    }
    
    body.dark-mode .latest-articles .post-item-horizontal .small-post-meta span {
        color: #bbb !important;
    }
    
    body.dark-mode .latest-articles .post-item-horizontal .category-label-horizontal {
        opacity: 0.9;
    }
}

/* Block Type 6 - Manual Carousel with Navigation */
.section-block-6 .carousel-container {
    position: relative;
    padding: 0 50px;
}

.section-block-6 .carousel-wrapper {
    overflow: hidden;
    position: relative;
}

.section-block-6 .carousel-track {
    display: flex;
    transition: transform 0.4s ease;
}

/* Carousel Items - Desktop 3 columns visible */
.section-block-6 .carousel-item {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    padding-right: 15px;
    padding-left: 15px;
}

.section-block-6 .carousel-item .post-item-mid {
    width: 100%;
    margin-bottom: 20px;
}

/* Navigation Buttons */
.section-block-6 .carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.section-block-6 .carousel-nav:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-50%) scale(1.1);
}

.section-block-6 .carousel-nav i {
    font-size: 18px;
    color: #333;
}

.section-block-6 .carousel-prev {
    left: 0;
}

.section-block-6 .carousel-next {
    right: 0;
}

.section-block-6 .carousel-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* Dark mode */
body.dark-mode .section-block-6 .carousel-nav {
    background: rgba(45, 45, 45, 0.9);
    border-color: #555;
}

body.dark-mode .section-block-6 .carousel-nav:hover {
    background: #2d2d2d;
}

body.dark-mode .section-block-6 .carousel-nav i {
    color: #e0e0e0;
}

/* Mobile - 2 columns visible */
@media (max-width: 767px) {
    .section-block-6 .carousel-container {
        padding: 0 35px;
    }
    
    .section-block-6 .carousel-item {
        flex: 0 0 50%;
        max-width: 50%;
        padding-right: 8px;
        padding-left: 8px;
    }
    
    .section-block-6 .carousel-item .post-item-mid {
        margin-bottom: 15px;
    }
    
    .section-block-6 .carousel-item .post-item-mid .post-item-image {
        margin-bottom: 8px;
    }
    
    .section-block-6 .carousel-item .post-item-mid .title {
        font-size: 14px;
        line-height: 1.3;
        margin-bottom: 5px;
    }
    
    .section-block-6 .carousel-item .post-item-mid .post-meta {
        font-size: 11px;
    }
    
    .section-block-6 .carousel-nav {
        width: 30px;
        height: 30px;
    }
    
    .section-block-6 .carousel-nav i {
        font-size: 14px;
    }
}
