/* Custom Posts Carousel Styles */
.custom-posts-carousel-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

.custom-posts-carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 10px 0;
}

.custom-posts-carousel::-webkit-scrollbar {
    display: none;
}

.custom-post-slide {
    flex: 0 0 calc(33.333% - 14px);
    min-width: 320px;
}

@media (max-width: 768px) {
    .custom-post-slide {
        flex: 0 0 calc(50% - 10px);
        min-width: 280px;
    }
}

@media (max-width: 480px) {
    .custom-post-slide {
        flex: 0 0 calc(100% - 20px);
        min-width: 260px;
    }
}

.custom-post-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.custom-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.custom-post-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.custom-post-image .img-custom-post {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.custom-post-card:hover .custom-post-image img {
    transform: scale(1.05);
}

.custom-post-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.3) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.custom-post-card:hover .custom-post-overlay {
    opacity: 1;
}

.custom-post-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.custom-post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 12px;
    font-weight: 500;
}

.custom-post-type {
    font-size: 10px;
    background: #fa872e;
    color: white;
    padding: 0 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.custom-post-card[data-post-type="evento"] .custom-post-type {
    background: #37d600;
}

.custom-post-card[data-post-type="relatorio"] .custom-post-type {
    background: #F5A623;
}

.custom-post-date {
    color: #1761ad;
}

.custom-post-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 12px 0;
    color: #1d1563;
    min-height: 50px;
}

.custom-post-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin: 0 0 20px 0;
    flex: 1;
}

.custom-post-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #b2f3b3;
    color: #1d1563;
    text-decoration: none;
    padding: 4px 24px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    align-self: flex-start;
    box-shadow: 0 2px 10px rgba(74, 144, 226, 0.3);
}

.custom-post-button:hover {
    background: linear-gradient(135deg, #357ABD, #2E5B8A);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.4);
    color: white;
    text-decoration: none;
}

.custom-post-button svg {
    transition: transform 0.3s ease;
}

.custom-post-button:hover svg {
    transform: translateX(3px);
}

/* Carousel Navigation */
.custom-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.custom-carousel-arrow:hover {
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-50%) scale(1.1);
}

.custom-prev-arrow {
    left: -24px;
}

.custom-next-arrow {
    right: -24px;
}

.custom-carousel-arrow svg {
    color: #4A90E2;
    transition: color 0.3s ease;
}

.custom-carousel-arrow:hover svg {
    color: #357ABD;
}

/* Carousel Dots */
.custom-carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
}

.custom-carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: #E0E0E0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-carousel-dot.active,
.custom-carousel-dot:hover {
    background: #4A90E2;
    transform: scale(1.2);
}

/* No posts message */
.custom-no-posts {
    text-align: center;
    padding: 40px 20px;
    font-size: 16px;
    color: #666;
    background: #f8f9fa;
    border-radius: 8px;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .custom-prev-arrow {
        left: 10px;
    }
    
    .custom-next-arrow {
        right: 10px;
    }
    
    .custom-carousel-arrow {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 768px) {
    .custom-posts-carousel-container {
        padding: 20px 10px;
    }
    
    .custom-posts-carousel {
        gap: 15px;
        padding: 10px 5px;
    }
    
    .custom-post-content {
        padding: 20px;
    }
    
    .custom-post-title {
        font-size: 16px;
        min-height: 44px;
    }
    
    .custom-carousel-arrow {
        display: none;
    }
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .custom-post-card {
        background: #2C3E50;
        color: #ECF0F1;
    }
    
    .custom-post-title {
        color: #1d1563;
    }
    
    .custom-post-excerpt {
        color: #BDC3C7;
    }
    
    .custom-post-date {
        color: #95A5A6;
    }
    
    .custom-no-posts {
        background: #34495E;
        color: #ECF0F1;
    }
}
