/* Element Related Posts - Frontend Styles */

.erp-related-posts {
    margin: 30px 0;
    padding: 0;
}

.erp-post-item {
    display: flex;
    gap: 20px;
    margin-bottom: 0;
    padding: 0;
}

.erp-post-item:last-child {
    margin-bottom: 0;
}

/* Thumbnail */
.erp-post-thumbnail {
    flex-shrink: 0;
    width: 150px;
}

.erp-post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

/* Clickable post link wrapper */
a.erp-post-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

/* Content */
.erp-post-content {
    flex: 1;
    min-width: 0; /* Prevent flex item from overflowing */
}

.erp-post-title {
    margin: 0 0 10px 0;
    font-size: 1.25em;
    font-weight: 600;
    line-height: 1.3;
}

a.erp-post-link:hover .erp-post-title {
    color: #0073aa;
}

.erp-post-excerpt {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 0.95em;
    line-height: 1.6;
}

.erp-post-excerpt p {
    margin: 0 0 10px 0;
}

.erp-post-excerpt p:last-child {
    margin-bottom: 0;
}

.erp-post-meta {
    font-size: 0.85em;
    color: #999;
}

.erp-post-date {
    display: inline-block;
}

/* Separator */
.erp-separator {
    height: 1px;
    background: #e0e0e0;
    margin: 25px 0;
    border: none;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .erp-post-item {
        flex-direction: column;
        gap: 15px;
    }
    
    .erp-post-thumbnail {
        width: 100%;
        max-width: 300px;
    }
}

/* Alternative layout - stacked thumbnails on top */
.erp-related-posts.erp-layout-stacked .erp-post-item {
    flex-direction: column;
    gap: 15px;
}

.erp-related-posts.erp-layout-stacked .erp-post-thumbnail {
    width: 100%;
    max-width: 100%;
}

/* Alternative layout - no thumbnails (text only) */
.erp-related-posts.erp-layout-text-only .erp-post-item {
    display: block;
}

/* Alternative layout - grid */
.erp-related-posts.erp-layout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.erp-related-posts.erp-layout-grid .erp-post-item {
    flex-direction: column;
    gap: 15px;
    margin-bottom: 0;
}

.erp-related-posts.erp-layout-grid .erp-post-thumbnail {
    width: 100%;
}

.erp-related-posts.erp-layout-grid .erp-separator {
    display: none;
}
