/* Custom Posts Stream for Elementor - Styles (ukrnews.live inspired) */

.custom-posts-timeline {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 100%;
}

.timeline-date-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.timeline-date-header {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 15px 0;
    padding: 12px 0;
    border-top: 3px solid #000;
    border-bottom: 1px solid #e0e0e0;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeline-item {
    display: flex;
    gap: 0;
    border-left: 3px solid #ff0000;
    padding-left: 20px;
    position: relative;
}

.timeline-item.no-border {
    border-left: none;
    padding-left: 0;
}

.timeline-item.time-center {
    align-items: center;
}

.timeline-item.time-top {
    align-items: flex-start;
}

.post-time {
    position: absolute;
    left: -55px;
    top: 0;
    flex-shrink: 0;
    font-weight: 700;
    font-size: 13px;
    color: #666;
    text-align: right;
    width: 50px;
}

.timeline-item.time-center .post-time {
    top: 50%;
    transform: translateY(-50%);
}

.timeline-item.no-border .post-time {
    position: static;
    text-align: left;
    margin-bottom: 8px;
    width: auto;
    transform: none;
    left: auto;
    top: auto;
}

.timeline-content {
    flex: 1;
    width: 100%;
}

.post-card {
    background-color: transparent;
    padding: 0;
    border: none;
    transition: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.post-card:hover {
    transform: none;
}

/* Категорія як маленький тег */
.post-category {
    display: inline-block;
    margin: 0 0 8px 0;
    padding: 0;
    font-size: 12px;
    font-weight: 600;
    color: #ff0000;
    background-color: transparent;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-radius: 0;
    text-decoration: none;
}

.post-category::before {
    content: "• ";
    color: #ff0000;
    margin-right: 4px;
}

.post-category a {
    color: #ff0000;
    text-decoration: none;
}

.post-category a:hover {
    text-decoration: underline;
}

/* Заголовок */
.post-title {
    margin: 0;
    padding: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
    color: #000;
}

.post-title a {
    text-decoration: none;
    color: #000;
    transition: color 0.2s ease;
}

.post-title a:hover {
    color: #ff0000;
}

.post-title.highlighted a {
    font-weight: 700;
    color: #ff0000;
}

/* Дата посту */
.post-date {
    margin: 5px 0 0 0;
    padding: 0;
    font-size: 12px;
    color: #999;
    line-height: 1.4;
    font-weight: 500;
}

/* Основний текст */
.post-excerpt {
    margin: 10px 0 0 0;
    padding: 0;
    font-size: 15px;
    color: #333;
    line-height: 1.5;
    font-weight: 400;
}

/* Зображення */
.post-image {
    width: 100%;
    height: 280px;
    overflow: hidden;
    border-radius: 0;
    margin: 15px 0 0 0;
    background-color: #f5f5f5;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    will-change: transform;
    backface-visibility: hidden;
}

.post-card:hover .post-image img {
    transform: scale(1.05);
}

/* Адаптивність */
@media (max-width: 768px) {
    .timeline-item {
        padding-left: 15px;
        border-left-width: 2px;
    }
    
    .post-time {
        position: static;
        text-align: left;
        margin-bottom: 8px;
        width: auto;
        font-size: 12px;
    }
    
    .timeline-date-header {
        font-size: 14px;
        padding: 10px 0;
        border-top-width: 2px;
    }
    
    .post-title {
        font-size: 18px;
    }
    
    .post-image {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .timeline-item {
        padding-left: 12px;
    }
    
    .post-title {
        font-size: 16px;
    }
    
    .post-excerpt {
        font-size: 14px;
    }
    
    .post-image {
        height: 150px;
    }
    
    .timeline-date-header {
        font-size: 12px;
    }
}