/**
 * Estilos para a página de listagem de posts do blog
 * 
 * @package Upgram
 * @since 1.27.0
 */

.upgram-blog-listing-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.upgram-blog-listing-header {
    text-align: center;
    margin-bottom: 50px;
}

.upgram-blog-listing-title {
    font-size: 42px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 10px 0;
    line-height: 1.2;
}

.upgram-blog-listing-subtitle {
    font-size: 18px;
    color: #666;
    margin: 0;
}

.upgram-blog-listing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

@media (min-width: 768px) {
    .upgram-blog-listing-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 767px) {
    .upgram-blog-listing-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .upgram-blog-listing-grid {
        grid-template-columns: 1fr;
    }
}

.upgram-blog-post-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.upgram-blog-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.upgram-blog-post-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.upgram-blog-post-card-image-wrapper {
    width: 100%;
    padding-top: 62.5%; /* 16:10 aspect ratio */
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
}

.upgram-blog-post-card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.upgram-blog-post-card-image-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ccc;
    width: 60px;
    height: 60px;
}

.upgram-blog-post-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.upgram-blog-post-card-title {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 12px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.upgram-blog-post-card-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 15px 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.upgram-blog-post-card-meta {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.upgram-blog-post-card-date {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.upgram-blog-listing-empty {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.upgram-blog-listing-load-more-container {
    text-align: center;
    margin-top: 40px;
}

.upgram-blog-listing-load-more-btn {
    background: linear-gradient(135deg, #7C51F3 0%, #5a3fc7 100%);
    color: #ffffff;
    border: none;
    padding: 16px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(124, 81, 243, 0.3);
}

.upgram-blog-listing-load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 81, 243, 0.4);
}

.upgram-blog-listing-load-more-btn:active {
    transform: translateY(0);
}

.upgram-blog-listing-load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.upgram-blog-listing-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    color: #666;
}

.upgram-blog-listing-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #7C51F3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsividade adicional */
@media (max-width: 1024px) {
    .upgram-blog-listing-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .upgram-blog-listing-container {
        padding: 30px 15px;
    }
    
    .upgram-blog-listing-title {
        font-size: 32px;
    }
    
    .upgram-blog-listing-subtitle {
        font-size: 16px;
    }
}



