/**
 * Estilos para o Blog Loader
 */

/* Loading State */
.blog-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 3rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.blog-loading p {
    color: #6c757d;
    font-size: 1rem;
    margin: 0;
}

/* Error State */
.blog-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 3rem;
    text-align: center;
}

.blog-error i {
    font-size: 4rem;
    color: #dc3545;
    margin-bottom: 1rem;
}

.blog-error p {
    color: #6c757d;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.btn-retry {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-retry:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

.btn-retry i {
    margin-right: 0.5rem;
}

/* No Posts State */
.no-posts {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 3rem;
    text-align: center;
}

.no-posts i {
    font-size: 4rem;
    color: #adb5bd;
    margin-bottom: 1rem;
}

.no-posts p {
    color: #6c757d;
    font-size: 1.1rem;
    margin: 0;
}

/* Blog Cards Container */
#blog-posts-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    #blog-posts-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Blog Card */
.blog-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* Blog Card Image */
.blog-card-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    animation: fadeInImage 0.5s ease-in forwards;
}

@keyframes fadeInImage {
    to {
        opacity: 1;
    }
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    z-index: 1;
}

/* Blog Card Content */
.blog-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: #6c757d;
}

.blog-card-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.blog-card-meta i {
    color: #adb5bd;
}

.blog-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    line-height: 1.4;
}

.blog-card-title a {
    color: #212529;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-card-title a:hover {
    color: #667eea;
}

.blog-card-excerpt {
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 1rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* Blog Card Footer */
.blog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
    margin-bottom: 1rem;
}

.blog-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.blog-card-tag {
    font-size: 0.8rem;
    color: #667eea;
    background: #f8f9fa;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-weight: 500;
}

.blog-card-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.blog-card-views {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    color: #6c757d;
}

.blog-card-views i {
    color: #adb5bd;
}

/* Read More Button */
.blog-card-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.blog-card-read-more:hover {
    gap: 0.8rem;
    color: #5568d3;
}

.blog-card-read-more i {
    transition: transform 0.3s ease;
}

.blog-card-read-more:hover i {
    transform: translateX(4px);
}

/* Post Count */
#post-count {
    font-size: 1.1rem;
    color: #6c757d;
    margin-top: 1rem;
    text-align: center;
}

/* Category Filters */
.category-filter {
    transition: all 0.3s ease;
}

.category-filter.active {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-card {
    animation: fadeIn 0.5s ease forwards;
}

.blog-card:nth-child(1) { animation-delay: 0.05s; }
.blog-card:nth-child(2) { animation-delay: 0.1s; }
.blog-card:nth-child(3) { animation-delay: 0.15s; }
.blog-card:nth-child(4) { animation-delay: 0.2s; }
.blog-card:nth-child(5) { animation-delay: 0.25s; }
.blog-card:nth-child(6) { animation-delay: 0.3s; }

/* Pagination Styles */
#pagination-container {
    margin-top: 3rem;
    margin-bottom: 2rem;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: white;
    border: 2px solid #667eea;
    border-radius: 8px;
    color: #667eea;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-btn:hover:not(:disabled) {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: #adb5bd;
    color: #adb5bd;
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-number {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    color: #6c757d;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-number:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
}

.pagination-number.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.pagination-ellipsis {
    color: #6c757d;
    font-weight: 600;
    padding: 0 0.5rem;
}

/* Responsive Pagination */
@media (max-width: 768px) {
    .pagination {
        gap: 0.5rem;
    }
    
    .pagination-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .pagination-number {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .pagination-btn span {
        display: none;
    }
    
    .pagination-btn {
        padding: 0.6rem 0.8rem;
    }
}
