/* ===================================== */
/* BLOG CARDS - CSS SIMPLIFICADO V4      */
/* ===================================== */

/* Container Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Card Principal */
.post-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    display: block;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 20px rgba(255, 140, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #FFD700, #FF8C00, #FF4500);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.post-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(255, 140, 0, 0.2);
}

.post-card:hover::before {
    transform: scaleX(1);
}

/* Imagem do Post */
.post-card-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.post-card:hover .post-card-image {
    transform: scale(1.05);
}

/* Placeholder quando não há imagem */
.post-card-placeholder {
    background: linear-gradient(135deg, #FFD700, #FF8C00);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.post-card-placeholder::after {
    content: '📝';
}

/* Conteúdo do Card */
.post-card-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Título */
.post-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.3;
    margin: 0;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card:hover .post-card-title {
    color: #FF8C00;
}

/* Data */
.post-card-date {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
}

.post-card-date i {
    color: #FF8C00;
}

/* Resumo */
.post-card-excerpt {
    font-size: 1rem;
    color: #64748b;
    line-height: 1.7;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Footer do Card */
.post-card-footer {
    margin-top: auto;
    padding-top: 1rem;
}

/* Botão Ler Mais */
.post-card-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #FF8C00;
    font-size: 0.95rem;
    transition: gap 0.3s ease;
}

.post-card:hover .post-card-read-more {
    gap: 12px;
}

.post-card-read-more i {
    font-size: 0.85rem;
}

/* ===================================== */
/* RESPONSIVIDADE                        */
/* ===================================== */

@media (max-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.75rem;
    }
    
    .post-card-image {
        height: 220px;
    }
}

@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 15px;
    }
    
    .post-card-image {
        height: 200px;
    }
    
    .post-card-content {
        padding: 1.5rem;
    }
    
    .post-card-title {
        font-size: 1.3rem;
    }
    
    .post-card-excerpt {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .post-card-image {
        height: 180px;
    }
    
    .post-card-content {
        padding: 1.25rem;
        gap: 0.75rem;
    }
    
    .post-card-title {
        font-size: 1.2rem;
    }
    
    .post-card-excerpt {
        font-size: 0.9rem;
    }
}

/* ===================================== */
/* ANIMAÇÕES                             */
/* ===================================== */

.post-card {
    animation: fadeInUp 0.5s ease backwards;
}

.post-card:nth-child(1) { animation-delay: 0.1s; }
.post-card:nth-child(2) { animation-delay: 0.2s; }
.post-card:nth-child(3) { animation-delay: 0.3s; }
.post-card:nth-child(4) { animation-delay: 0.4s; }
.post-card:nth-child(5) { animation-delay: 0.5s; }
.post-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================== */
/* ESTADOS ESPECIAIS                     */
/* ===================================== */

/* 1 post - centralizado */
.posts-grid:has(.post-card:only-child) {
    grid-template-columns: minmax(320px, 600px);
    justify-content: center;
}

/* 2 posts - lado a lado */
.posts-grid:has(.post-card:nth-child(2):last-child) {
    grid-template-columns: repeat(auto-fit, minmax(320px, 500px));
    justify-content: center;
}

/* Loading / Empty State */
.posts-grid > p {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
    font-size: 1.1rem;
}