/* Estilos que já estavam no código e foram mantidos */
.planos-grid {
    display: grid;
    /* Ajustado para usar repetição explícita, que é mais previsível com Elementor */
    grid-template-columns: repeat(4, 1fr); 
    gap: 1.5rem;
    margin: 2rem 0;
    padding: 0;
    list-style: none;
    align-items: stretch; /* MANTIDO: Essencial para cards de mesma altura */
    width: 100%; /* Garante que o grid preencha o wrapper */
}

/* Melhorias no Layout do Grid/Wrapper */
.mkr-planos-wrapper {
    max-width: 1400px; /* Max-width para limitar o shortcode no Elementor */
    margin: 0 auto;    /* Centraliza o wrapper do shortcode */
    padding: 0 15px; /* Adiciona respiro nas laterais */
}
/* Revertido o .planos-grid-container para manter a compatibilidade do último PHP */
.planos-grid-container {
    display: flex;
    justify-content: center;
    width: 100%;
}


/* AJUSTES CRÍTICOS PARA ALTURA E TÍTULO */
.card-plano-wrapper {
    height: 100%; /* ESSENCIAL: Garante que o wrapper ocupe a altura da célula da grid */
    position: relative;
    display: flex; /* Adicionado display flex para que .card-plano ocupe o espaço */
    flex-direction: column;
}

.card-plano {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    color: #333;
    transition: all 0.3s ease;
    display: flex; /* Alterado para flex */
    flex-direction: column; /* Conteúdo interno empilhado */
    text-decoration: none;
    height: 100%; /* ESSENCIAL: Garante que o card preencha o wrapper */
}
.card-conteudo {
    padding: 1.5rem;
    flex-grow: 1; /* Permite que o conteúdo interno empurre o status para baixo */
    display: flex;
    flex-direction: column;
}
.card-plano h3 {
    font-size: 1.2rem;
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
    line-height: 1.4;
    font-weight: 600;
    
    /* TRUNCAMENTO EM DUAS LINHAS COM RETICÊNCIAS */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limite de 2 linhas */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: calc(1.4rem * 2); /* Altura mínima para 2 linhas de texto */
}

/* Garante que o status fique no rodapé */
.status-plano-wrapper {
    margin-top: auto; /* Empurra o status para o fundo do card-conteudo */
    padding-top: 10px;
}
.status-plano {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    /* Alinhamento ao canto inferior esquerdo */
    align-self: flex-start;
}
/* FIM AJUSTES CRÍTICOS */


.card-capa {
    width: 100%;
    height: 120px;
    background-image: url('<?php echo plugin_dir_url(__FILE__); ?>../../assets/images/capaplanilha.jpg');
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid #eee;
}

.card-plano:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.12);
}

.trilha-nome {
    display: block;
    font-size: 0.9rem;
    color: #3498db;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.instrutor {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 0.5rem;
}

.data-aula {
    font-size: 0.85rem;
    color: #95a5a6;
    margin-top: 0.5rem;
}

/* Responsividade */
@media (max-width: 1200px) {
    .planos-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .planos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .planos-grid {
        grid-template-columns: 1fr;
    }

    .card-capa {
        height: 100px;
    }
    .mkr-planos-wrapper {
        padding: 0 10px; /* Mais estreito em telas pequenas */
    }
}

/* --- Estilo para o bloco de filtros (mantido do seu código) --- */
.filtros-planos {
    background: #f5f5f5;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.filtros-planos form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.filtro-group {
    display: flex;
    flex-direction: column;
    min-width: 150px;
    flex-grow: 1;
}

.filtro-busca {
    min-width: 250px;
}

.filtros-planos label {
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.filtros-planos select,
.filtros-planos input[type="text"] {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: white;
    font-size: 14px;
    width: 100%;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
}

.filtros-planos select:focus,
.filtros-planos input[type="text"]:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.2);
}

.filtro-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-filtrar,
.btn-limpar,
.btn-criar {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
}

.btn-filtrar {
    background-color: #2271b1;
    color: white;
}

.btn-filtrar:hover {
    background-color: #135e96;
}

.btn-limpar {
    background-color: #f0f0f0;
    color: #50575e;
    border: 1px solid #ddd;
}

.btn-limpar:hover {
    background-color: #e0e0e0;
}

.btn-criar {
    background-color: #4CAF50;
    color: white;
}

.btn-criar:hover {
    background-color: #3e8e41;
}

.btn-criar::before {
    content: "+";
    margin-right: 5px;
    font-weight: bold;
}

@media (max-width: 992px) {
    .filtro-group {
        min-width: calc(50% - 10px);
    }

    .filtro-busca {
        min-width: 100%;
    }
}

@media (max-width: 768px) {
    .filtros-planos form {
        flex-direction: column;
        align-items: stretch;
    }

    .filtro-group,
    .filtro-actions,
    .btn-filtrar,
    .btn-limpar,
    .btn-criar {
        width: 100%;
    }
}
.instrutor,
.data-aula {
    display: block;
}


/* Estilos de Status (Mantidos) */
.status-aprovado {
    background-color: #c7f5c1;
    color: #217a00;
}

.status-reprovado {
    background-color: #ffd8d8;
    color: #a00;
}

.status-pendente {
    background-color: #fff3cd;
    color: #856404;
}

/* Estilos de Bulk Actions/Filtros (Mantidos) */
.filtros-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    align-items: end;
}
/* ... (outros estilos de .filtros-wrapper) */

/* Foto do Instrutor (Mantidos) */
.card-header-with-photo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px 0 15px; 
    margin-bottom: -15px; 
}
.instrutor-photo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #ddd;
    flex-shrink: 0;
}

/* Tamanho da Paginação (Mantidos) */
.mkr-pagination .page-numbers {
    font-size: 1.1rem; 
    font-weight: 600;
}

/* Ajustes finais (Mantidos) */
.data-aula strong{font-weight:600}