/**
 * Vojia Horizontal Blog Posts Widget
 * Transparent background, horizontal scrolling, progressive loading
 */

.vojia-blog-widget {
    background: transparent;
    padding: 0;
    margin: 0;
    border: none;
    width: 100%;
    position: relative;
    min-height: 400px;
}

.vojia-blog-posts {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 20px;
    padding: 20px 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.vojia-blog-posts::-webkit-scrollbar {
    height: 8px;
}

.vojia-blog-posts::-webkit-scrollbar-track {
    background: transparent;
}

.vojia-blog-posts::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.vojia-blog-posts::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.4);
}

.vojia-blog-post {
    flex: 0 0 300px;
    min-height: 350px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.vojia-blog-post .vojia-blog-post-image {
    overflow: hidden;
}

.vojia-blog-post:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: inherit;
}

.vojia-blog-post-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
    transition: transform 0.4s ease;
}

.vojia-blog-post:hover .vojia-blog-post-image {
    transform: scale(1.08);
}

.vojia-blog-post-content {
    padding: 20px;
    height: calc(100% - 180px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.vojia-blog-post-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 12px 0;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vojia-blog-post-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin: 0 0 15px 0;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vojia-blog-post-meta {
    font-size: 12px;
    color: #888;
    border-top: 1px solid #f0f0f0;
    padding-top: 12px;
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vojia-blog-post-date {
    font-weight: 500;
}

.vojia-blog-post-author {
    font-style: italic;
}

/* Loading Animation */
.vojia-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.vojia-loading-circle {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: vojia-spin 1s linear infinite;
}

@keyframes vojia-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* Responsive Design */
@media screen and (max-width: 768px) {
    .vojia-blog-post {
        flex: 0 0 280px;
        min-height: 320px;
    }
    
    .vojia-blog-post-image {
        height: 160px;
    }
    
    .vojia-blog-post-content {
        height: calc(100% - 160px);
        padding: 15px;
    }
    
    .vojia-blog-post-title {
        font-size: 16px;
    }
    
    .vojia-blog-post-excerpt {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }
}

@media screen and (max-width: 480px) {
    .vojia-blog-posts {
        gap: 15px;
        padding: 15px 0;
    }
    
    .vojia-blog-post {
        flex: 0 0 260px;
        min-height: 300px;
    }
    
    .vojia-blog-post-image {
        height: 140px;
    }
    
    .vojia-blog-post-content {
        height: calc(100% - 140px);
        padding: 12px;
    }
    
    .vojia-blog-post-title {
        font-size: 15px;
    }
}

/* Smooth entrance animation for new posts */
.vojia-blog-post {
    opacity: 0;
    animation: vojia-fadeInUp 0.6s ease forwards;
}

.vojia-blog-post:nth-child(1) { animation-delay: 0.1s; }
.vojia-blog-post:nth-child(2) { animation-delay: 0.2s; }
.vojia-blog-post:nth-child(3) { animation-delay: 0.3s; }
.vojia-blog-post:nth-child(4) { animation-delay: 0.4s; }
.vojia-blog-post:nth-child(5) { animation-delay: 0.5s; }

@keyframes vojia-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}