/**
 * Latest Posts Plugin Styles
 * Mobile-first responsive design using Bootstrap 5
 */

.latest-posts-container {
    margin: 2rem 0;
}

.latest-post-card {
    border: 1px solid #e0e0e0;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.latest-post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-img-top-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem 0.5rem 0 0;
}

.latest-post-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.latest-post-card:hover .latest-post-thumbnail {
    transform: scale(1.05);
}

.latest-post-card .card-body {
    padding: 1.25rem;
}

.latest-post-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.latest-post-card .card-title a {
    color: #333;
    text-decoration: none;
}

.latest-post-card .card-title a:hover {
    color: #0d6efd;
}

.latest-post-card .card-text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #666;
    margin-bottom: 1rem;
}

.card-footer-info {
    border-top: 1px solid #f0f0f0;
    padding-top: 0.75rem;
    margin-top: 0.75rem;
}

.card-footer-info small {
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.card-footer-info .bi {
    margin-right: 0.25rem;
}

.latest-post-card .btn {
    font-size: 0.85rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
}

/* Mobile optimizations */
@media (max-width: 576px) {
    .latest-posts-container {
        margin: 1rem 0;
    }
    
    .latest-post-thumbnail {
        height: 180px;
    }
    
    .latest-post-card .card-body {
        padding: 1rem;
    }
    
    .latest-post-card .card-title {
        font-size: 1rem;
    }
    
    .latest-post-card .card-text {
        font-size: 0.85rem;
    }
}

/* Tablet optimizations */
@media (min-width: 577px) and (max-width: 768px) {
    .latest-post-thumbnail {
        height: 190px;
    }
}

/* Desktop optimizations */
@media (min-width: 992px) {
    .latest-post-thumbnail {
        height: 220px;
    }
    
    .latest-post-card .card-title {
        font-size: 1.15rem;
    }
}

/* Accessibility improvements */
.latest-post-card:focus-within {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

.latest-post-card a:focus {
    outline: none;
}

/* Loading state */
.latest-post-thumbnail[loading="lazy"] {
    background-color: #f8f9fa;
}

/* Print styles */
@media print {
    .latest-post-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .latest-post-card .btn {
        display: none;
    }
}