/**
 * Related Posts Block - Frontend Styles
 */

/* Container */
.nwp-related-posts {
    margin: 40px 0;
}

/* Section title */
.nwp-related-title {
    margin: 0 0 24px 0;
    font-size: 1.5em;
    font-weight: 700;
    color: #1e1e1e;
    position: relative;
    padding-bottom: 12px;
}

.nwp-related-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
}

/* Grid */
.nwp-related-grid {
    display: grid;
    gap: 24px;
}

/* Item */
.nwp-related-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nwp-related-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

/* Thumbnail */
.nwp-related-thumbnail {
    position: relative;
    overflow: hidden;
    background: #f0f0f0;
}

.nwp-related-thumbnail-link {
    display: block;
}

.nwp-related-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.nwp-related-item:hover .nwp-related-image {
    transform: scale(1.05);
}

.nwp-related-no-image {
    width: 100%;
    height: 100%;
    min-height: 150px;
    background: linear-gradient(135deg, #f5f5f5, #e5e5e5);
}

/* Content */
.nwp-related-content {
    padding: 20px;
}

.nwp-related-item-title {
    margin: 0 0 10px 0;
    font-size: 1.1em;
    font-weight: 600;
    line-height: 1.4;
}

.nwp-related-item-title a {
    color: #1e1e1e;
    text-decoration: none;
    transition: color 0.2s ease;
}

.nwp-related-item-title a:hover {
    color: #667eea;
}

/* Meta */
.nwp-related-meta {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.nwp-related-author::after {
    content: '•';
    margin-left: 8px;
    color: #ccc;
}

.nwp-related-date {
    color: #888;
}

/* Excerpt */
.nwp-related-excerpt {
    font-size: 0.95em;
    color: #555;
    line-height: 1.6;
    margin: 0;
}

/* Card Style: Minimal */
.nwp-related-style-minimal .nwp-related-item {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}

.nwp-related-style-minimal .nwp-related-item:hover {
    transform: none;
    box-shadow: none;
}

.nwp-related-style-minimal .nwp-related-thumbnail {
    border-radius: 8px;
}

.nwp-related-style-minimal .nwp-related-content {
    padding: 16px 0;
}

/* Card Style: Overlay */
.nwp-related-style-overlay .nwp-related-item {
    position: relative;
    min-height: 280px;
}

.nwp-related-style-overlay .nwp-related-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.nwp-related-style-overlay .nwp-related-thumbnail::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,0.8) 100%);
}

.nwp-related-style-overlay .nwp-related-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    z-index: 1;
}

.nwp-related-style-overlay .nwp-related-item-title a,
.nwp-related-style-overlay .nwp-related-meta,
.nwp-related-style-overlay .nwp-related-excerpt {
    color: #fff;
}

.nwp-related-style-overlay .nwp-related-item-title a:hover {
    color: #ddd;
}

.nwp-related-style-overlay .nwp-related-author::after {
    color: rgba(255,255,255,0.5);
}

/* Post Subtitle (frontend) */
.nwp-post-subtitle {
    font-size: 1.25em;
    color: #666;
    margin-top: -10px;
    margin-bottom: 24px;
    font-weight: 400;
    line-height: 1.5;
    font-style: italic;
}

/* Featured Image Caption (frontend) */
.nwp-featured-caption {
    font-size: 0.9em;
    color: #666;
    margin-top: 10px;
    font-style: italic;
    text-align: center;
}

.nwp-featured-caption a {
    color: #667eea;
    text-decoration: none;
}

.nwp-featured-caption a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .nwp-related-posts {
        margin: 30px 0;
    }
    
    .nwp-related-title {
        font-size: 1.3em;
    }
    
    .nwp-related-content {
        padding: 16px;
    }
    
    .nwp-related-item-title {
        font-size: 1em;
    }
    
    .nwp-related-style-overlay .nwp-related-item {
        min-height: 220px;
    }
}

@media (max-width: 480px) {
    .nwp-related-grid {
        gap: 16px;
    }
    
    .nwp-related-style-overlay .nwp-related-item {
        min-height: 180px;
    }
    
    .nwp-related-style-overlay .nwp-related-content {
        padding: 16px;
    }
}
