/* Related Articles Section Styles */
.related-articles {
    margin-top: 4rem;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.05) 0%, rgba(220, 20, 60, 0.03) 100%);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.related-articles::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(220, 20, 60, 0.5) 20%, 
        rgba(220, 20, 60, 0.5) 80%, 
        transparent 100%);
}

.related-articles h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 2.5rem;
    text-align: center;
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.9) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    padding-bottom: 1rem;
}

.related-articles h2::after {
    content: '❤';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.2rem;
    color: rgba(220, 20, 60, 0.5);
}

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

.related-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.8rem;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.related-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        transparent 0%, 
        rgba(220, 20, 60, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.related-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(220, 20, 60, 0.3);
    box-shadow: 
        0 10px 30px rgba(220, 20, 60, 0.15),
        0 5px 15px rgba(0, 0, 0, 0.3);
}

.related-card:hover::before {
    opacity: 1;
}

.related-card-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.4;
    margin: 0;
    transition: color 0.3s ease;
}

.related-card:hover .related-card-title {
    color: #ff6b9d;
}

.related-card-excerpt {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    margin: 0;
    flex-grow: 1;
}

.related-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.related-card-meta i {
    color: rgba(220, 20, 60, 0.6);
}

/* Responsive Design */
@media (max-width: 768px) {
    .related-articles {
        padding: 2rem 1rem;
        margin-top: 3rem;
    }
    
    .related-articles h2 {
        font-size: 2rem;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .related-card {
        padding: 1.5rem;
    }
}

/* Dark theme enhancements */
@media (prefers-color-scheme: dark) {
    .related-articles {
        background: linear-gradient(135deg, 
            rgba(139, 0, 0, 0.08) 0%, 
            rgba(220, 20, 60, 0.05) 100%);
    }
    
    .related-card {
        background: rgba(0, 0, 0, 0.3);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .related-card:hover {
        background: rgba(0, 0, 0, 0.5);
        border-color: rgba(220, 20, 60, 0.5);
    }
}

/* Animation for entrance */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.related-articles {
    animation: fadeInUp 0.8s ease-out;
}

.related-card {
    animation: fadeInUp 0.6s ease-out backwards;
}

.related-card:nth-child(1) {
    animation-delay: 0.1s;
}

.related-card:nth-child(2) {
    animation-delay: 0.2s;
}

.related-card:nth-child(3) {
    animation-delay: 0.3s;
}

/* Hover effect for heart icon */
.related-articles h2:hover::after {
    animation: heartbeat 1s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% {
        transform: translateX(-50%) scale(1);
    }
    50% {
        transform: translateX(-50%) scale(1.2);
    }
}

/* Special styling for featured articles */
.related-card.featured {
    background: linear-gradient(135deg, 
        rgba(220, 20, 60, 0.1) 0%, 
        rgba(139, 0, 0, 0.05) 100%);
    border-color: rgba(220, 20, 60, 0.2);
}

.related-card.featured .related-card-title {
    background: linear-gradient(135deg, #ff6b9d 0%, #dc143c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Loading state */
.related-card.loading {
    pointer-events: none;
    opacity: 0.6;
}

.related-card.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.1) 50%, 
        transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    to {
        left: 100%;
    }
}