/**
 * Portfolio Completo - CSS para Projetos, Produtos e Inovações
 * Autor: Cubomagicodesign
 * Versão: 2.1.0
 */

/* Container principal dos cards */
.pcp-cards-container {
    display: grid;
    gap: 30px;
    margin: 40px 0;
    padding: 0;
    
    /* Grid principal - auto-fill garante que cards mantenham tamanho consistente */
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    
    /* Máximo de 3 colunas mesmo em telas grandes */
    max-width: 1200px;
}

/* Card individual */
.pcp-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    
    /* IMPORTANTE: Fixar largura máxima para manter consistência */
    max-width: 380px;
    width: 100%;
    justify-self: center;
}

.pcp-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.pcp-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #253a6b, #4a69bd);
    z-index: 1;
}

/* Variações de cores para diferentes tipos */
.pcp-card.produto::before {
    background: linear-gradient(135deg, #2e7d32, #4caf50);
}

.pcp-card.inovacao::before {
    background: linear-gradient(135deg, #f57c00, #ff9800);
}

/* Imagem do card */
.pcp-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.pcp-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.pcp-card:hover .pcp-thumb {
    transform: scale(1.1);
}

/* Conteúdo do card */
.pcp-content {
    padding: 25px;
    background: #fff;
    position: relative;
}

.pcp-title {
    font-size: 1.35em;
    font-weight: 700;
    margin: 0 0 15px 0;
    color: #253a6b;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.pcp-card:hover .pcp-title {
    color: #4a69bd;
}

/* Variações de cores para títulos */
.pcp-card.produto .pcp-title {
    color: #2e7d32;
}

.pcp-card.produto:hover .pcp-title {
    color: #4caf50;
}

.pcp-card.inovacao .pcp-title {
    color: #f57c00;
}

.pcp-card.inovacao:hover .pcp-title {
    color: #ff9800;
}

.pcp-excerpt {
    font-size: 0.95em;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    height: 3.2em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Ações do card */
.pcp-actions {
    margin-top: 20px;
}

.pcp-btn {
    display: inline-block;
    background: linear-gradient(135deg, #253a6b, #4a69bd);
    color: white !important;
    border: 2px solid white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9em;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pcp-btn:hover {
    transform: translateY(-2px);
    color: white !important;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(37, 58, 107, 0.4);
}

.pcp-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.pcp-btn:hover::before {
    left: 100%;
}

/* Variações de botões */
.pcp-card.produto .pcp-btn {
    background: linear-gradient(135deg, #2e7d32, #4caf50);
    border: 2px solid white;
    color: white !important;
}

.pcp-card.produto .pcp-btn:hover {
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.4);
    color: white !important;
}

.pcp-card.inovacao .pcp-btn {
    background: linear-gradient(135deg, #f57c00, #ff9800);
    border: 2px solid white;
    color: white !important;
}

.pcp-card.inovacao .pcp-btn:hover {
    box-shadow: 0 6px 20px rgba(245, 124, 0, 0.4);
    color: white !important;
}

/* RESPONSIVIDADE DETALHADA */

/* Desktop grande (≥1200px) - 3 colunas */
@media (min-width: 1200px) {
    .pcp-cards-container {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1200px;
        gap: 35px;
    }
    
    .pcp-card {
        max-width: none;
    }
}

/* Desktop médio (992px a 1199px) - 3 colunas adaptadas */
@media (min-width: 992px) and (max-width: 1199px) {
    .pcp-cards-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
        max-width: 980px;
    }
    
    .pcp-card {
        max-width: none;
    }
    
    .pcp-title {
        font-size: 1.25em;
    }
}

/* Tablet (768px a 991px) - 2 colunas */
@media (min-width: 768px) and (max-width: 991px) {
    .pcp-cards-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
        max-width: 750px;
    }
    
    .pcp-card {
        max-width: none;
    }
    
    .pcp-content {
        padding: 20px;
    }
    
    .pcp-title {
        font-size: 1.25em;
    }
}

/* Tablet pequeno (576px a 767px) - 2 colunas compactas */
@media (min-width: 576px) and (max-width: 767px) {
    .pcp-cards-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        margin: 30px 0;
    }
    
    .pcp-card {
        max-width: none;
    }
    
    .pcp-image {
        height: 180px;
    }
    
    .pcp-content {
        padding: 18px;
    }
    
    .pcp-title {
        font-size: 1.2em;
    }
    
    .pcp-excerpt {
        font-size: 0.9em;
        margin-bottom: 15px;
    }
    
    .pcp-btn {
        padding: 10px 18px;
        font-size: 0.85em;
    }
}

/* Mobile (≤575px) - 1 coluna */
@media (max-width: 575px) {
    .pcp-cards-container {
        grid-template-columns: 1fr;
        gap: 20px;
        margin: 25px 10px;
    }
    
    .pcp-card {
        max-width: none;
        margin: 0 auto;
    }
    
    .pcp-image {
        height: 200px;
    }
    
    .pcp-content {
        padding: 20px;
    }
    
    .pcp-title {
        font-size: 1.3em;
    }
    
    .pcp-excerpt {
        font-size: 0.95em;
        margin-bottom: 18px;
    }
    
    .pcp-btn {
        padding: 12px 20px;
        font-size: 0.9em;
        display: block;
        text-align: center;
        width: 100%;
    }
}

/* Estados especiais */
.pcp-card.no-image .pcp-content {
    padding-top: 35px;
}

.pcp-card.no-image::after {
    content: '🖼️';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2em;
    opacity: 0.1;
}

/* Placeholder para cards sem imagem */
.pcp-image-placeholder {
    height: 220px;
    background: linear-gradient(135deg, #253a6b, #4a69bd);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3em;
    position: relative;
    overflow: hidden;
}

.pcp-image-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Variações de placeholder por tipo */
.pcp-card.produto .pcp-image-placeholder {
    background: linear-gradient(135deg, #2e7d32, #4caf50);
}

.pcp-card.inovacao .pcp-image-placeholder {
    background: linear-gradient(135deg, #f57c00, #ff9800);
}