/* 関連記事セクション専用CSS */

.related-articles {
    margin: 4rem 0 2rem 0;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 16px;
    border: 1px solid #cbd5e1;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.related-articles h2 {
    font-size: 2rem;
    color: #1e293b;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
}

.related-articles h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    margin: 0.8rem auto 0;
    border-radius: 2px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2.5rem;
}

/* 関連記事カード */
.related-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.related-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.related-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
    border-color: #3b82f6;
}

.related-card:hover::before {
    transform: scaleX(1);
}

.related-card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.related-image {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.related-content {
    flex: 1;
}

.related-card h3 {
    font-size: 1.25rem;
    line-height: 1.4;
    margin: 0 0 0.8rem 0;
    color: #1e293b;
    font-weight: 600;
    transition: color 0.3s ease;
}

.related-card:hover h3 {
    color: #3b82f6;
}

.related-card p {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

/* カテゴリーバッジ */
.related-category {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* テーマ別カラーリング */
.related-card.baby-theme {
    border-left: 4px solid #f472b6;
}

.related-card.baby-theme .related-image {
    background: linear-gradient(135deg, #f472b6, #ec4899);
    box-shadow: 0 4px 8px rgba(244, 114, 182, 0.3);
}

.related-card.baby-theme:hover h3 {
    color: #f472b6;
}

.related-card.baby-theme .related-category {
    background: rgba(244, 114, 182, 0.1);
    color: #f472b6;
    border-color: rgba(244, 114, 182, 0.2);
}

.related-card.single-theme {
    border-left: 4px solid #10b981;
}

.related-card.single-theme .related-image {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.related-card.single-theme:hover h3 {
    color: #10b981;
}

.related-card.single-theme .related-category {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.2);
}

.related-card.cost-theme {
    border-left: 4px solid #f59e0b;
}

.related-card.cost-theme .related-image {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 4px 8px rgba(245, 158, 11, 0.3);
}

.related-card.cost-theme:hover h3 {
    color: #f59e0b;
}

.related-card.cost-theme .related-category {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.2);
}

.related-card.maintenance-theme {
    border-left: 4px solid #8b5cf6;
}

.related-card.maintenance-theme .related-image {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    box-shadow: 0 4px 8px rgba(139, 92, 246, 0.3);
}

.related-card.maintenance-theme:hover h3 {
    color: #8b5cf6;
}

.related-card.maintenance-theme .related-category {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
    border-color: rgba(139, 92, 246, 0.2);
}

/* CTA関連記事セクション */
.cta-related-section {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: white;
    padding: 3rem 2rem;
    border-radius: 16px;
    margin: 3rem 0;
    text-align: center;
}

.cta-related-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: white;
}

.cta-related-section p {
    opacity: 0.9;
    margin-bottom: 2rem;
}

.cta-related-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-btn {
    background: white;
    color: #1e40af;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.cta-btn:hover {
    background: transparent;
    color: white;
    border-color: white;
    transform: translateY(-2px);
}

.cta-btn.outline {
    background: transparent;
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
}

.cta-btn.outline:hover {
    background: white;
    color: #1e40af;
    border-color: white;
}

/* 読了率向上のための要素 */
.reading-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.progress-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.progress-text {
    color: #1e293b;
    font-size: 0.9rem;
    font-weight: 500;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .related-articles {
        padding: 2rem 1rem;
        margin: 3rem 0 1rem 0;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .related-card {
        padding: 1.5rem;
    }
    
    .related-card-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.8rem;
    }
    
    .related-image {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .related-category {
        position: static;
        display: inline-block;
        margin-top: 0.5rem;
    }
    
    .cta-related-section {
        padding: 2rem 1rem;
    }
    
    .cta-related-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .related-articles h2 {
        font-size: 1.5rem;
    }
    
    .related-card h3 {
        font-size: 1.1rem;
    }
    
    .related-card p {
        font-size: 0.9rem;
    }
}