/* ========================================
   RECENT POSTS WIDGET STYLES
   ======================================== */

.recent-posts-widget {
    margin: 2rem 0;
}

.recent-posts-widget h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

/* Grid Layout */
.recent-posts-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Recent Post Card */
.recent-post-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    position: relative;
    min-height: 140px;
}

.recent-post-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* Recent Post Content */
.recent-post-content {
    flex: 1;
    min-width: 0; /* Prevents flex item from overflowing */
}

.recent-post-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
}

.recent-post-title a {
    color: #1e293b;
    text-decoration: none;
    transition: color 0.2s ease;
}

.recent-post-title a:hover {
    color: #3b82f6;
}

.recent-post-date {
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.recent-post-excerpt {
    color: #4b5563;
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
}

/* Recent Post Image */
.recent-post-image {
    flex-shrink: 0;
    width: 130px;
    aspect-ratio: 1 / 1;
    height: auto;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.recent-post-card:hover .recent-post-image {
    transform: scale(1.05);
}

.recent-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 14px;
}

.recent-post-card:hover .recent-post-image img {
    transform: scale(1.1);
}

/* Widget Footer */
.widget-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.widget-footer a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.widget-footer a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .recent-post-card {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        padding: 0.75rem;
        min-height: 0;
    }
    .recent-post-image {
        width: 100%;
        max-width: 200px;
        aspect-ratio: 1 / 1;
        margin: 0 auto 0.5rem auto;
    }
    
    .recent-post-title {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .recent-post-card {
        padding: 0.75rem;
    }
    
    .recent-post-image {
        max-width: 140px;
    }
    
    .recent-post-title {
        font-size: 0.95rem;
    }
    
    .recent-post-excerpt {
        font-size: 0.8125rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .recent-post-card {
        background: #1f2937;
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .recent-post-title a {
        color: #f9fafb;
    }
    
    .recent-post-title a:hover {
        color: #60a5fa;
    }
    
    .recent-post-excerpt {
        color: #d1d5db;
    }
    
    .recent-post-date {
        color: #9ca3af;
    }
    
    .widget-footer {
        border-top-color: #374151;
    }
    
    .widget-footer a {
        color: #60a5fa;
    }
    
    .widget-footer a:hover {
        color: #93c5fd;
    }
}

/* Animation Enhancements */
.recent-post-card {
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animation for multiple cards */
.recent-post-card:nth-child(1) { animation-delay: 0.1s; }
.recent-post-card:nth-child(2) { animation-delay: 0.2s; }
.recent-post-card:nth-child(3) { animation-delay: 0.3s; }
.recent-post-card:nth-child(4) { animation-delay: 0.4s; }
.recent-post-card:nth-child(5) { animation-delay: 0.5s; } 