/* ===== RESET E BASE ===== */
.mkr-trilha-single {
    max-width: 1000px;
    margin: 30px auto;
    padding: 0 20px;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.5;
    color: #333;
}

.mkr-error {
    background: #fee;
    border: 1px solid #fcc;
    color: #c33;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin: 50px auto;
    max-width: 500px;
}

/* ===== HEADER DA TRILHA ===== */
.trilha-header {
    background: #fff;
    border-left: 5px solid #0073aa;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.trilha-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #0073aa;
}

.trilha-descricao {
    font-size: 1.1rem;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

/* ===== METADADOS ===== */
.trilha-metadata {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
}

.metadata-title {
    font-size: 1.3rem;
    color: #0073aa;
    margin: 0 0 20px 0;
    font-weight: 600;
}

.metadata-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 12px;
}

.metadata-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
}

.metadata-item {
  display: flex;
  align-items: center;
  gap: .4rem;         /* controla o espacinho entre label e valor */
  padding: 8px 0;
}

.metadata-label {
  font-weight: 600;
  color: #333;
  min-width: 0;       /* remove a largura mínima de 100px */
  margin-right: 0;    /* nada de margem extra */
}

.metadata-value {
  color: #666;
  font-weight: 400;
}


/* ===== SEÇÃO DE MATERIAIS ===== */
.materiais-section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 20px;
    font-weight: 600;
}

.materiais-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ===== CARDS DE MATERIAL ===== */
.material-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    transition: all 0.2s ease;
}

.material-card:hover {
    border-color: #0073aa;
    box-shadow: 0 2px 8px rgba(0,115,170,0.1);
}

.material-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    gap: 15px;
}

.material-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin: 0;
    flex: 1;
}

.download-btn {
    background: #0073aa;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s ease;
    font-size: 0.9rem;
    white-space: nowrap;
}

.download-btn:hover {
    background: #005a87;
    color: white;
}

/* ===== TÓPICOS ===== */
.material-content {
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.topicos-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.topicos-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.topico-item {
    padding: 6px 0;
    color: #666;
    font-size: 0.95rem;
    border-bottom: 1px solid #f5f5f5;
}

.topico-item:last-child {
    border-bottom: none;
}

/* ===== SEM MATERIAIS ===== */
.no-materials {
    text-align: center;
    padding: 40px;
    background: #f8f9fa;
    border: 1px dashed #ccc;
    border-radius: 8px;
    color: #666;
}

.no-materials p {
    font-size: 1rem;
    margin: 0;
}

/* ===== AÇÕES ===== */
.trilha-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 20px 0;
    border-top: 1px solid #eee;
    margin-top: 30px;
}

.action-btn {
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.edit-btn {
    background: #0073aa;
    color: white;
}

.edit-btn:hover {
    background: #005a87;
    color: white;
}

.delete-btn {
    background: #dc3545;
    color: white;
}

.delete-btn:hover {
    background: #c82333;
    color: white;
}

.back-btn {
    background: #6c757d;
    color: white;
}

.back-btn:hover {
    background: #545b62;
    color: white;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
    .mkr-trilha-single {
        padding: 0 15px;
        margin: 20px auto;
    }
    
    .trilha-header {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .trilha-title {
        font-size: 1.8rem;
    }
    
    .material-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .material-title {
        text-align: center;
    }
    
    .download-btn {
        align-self: center;
    }
    
    .metadata-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .metadata-label {
        min-width: auto;
        margin-right: 0;
        font-size: 0.9rem;
    }
    
    .trilha-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .action-btn {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .trilha-header {
        padding: 15px;
    }
    
    .trilha-title {
        font-size: 1.5rem;
    }
    
    .material-card {
        padding: 20px;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
}

/* ===== ANIMAÇÕES SIMPLES ===== */
.material-card {
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== ACESSIBILIDADE ===== */
@media (prefers-reduced-motion: reduce) {
    .material-card {
        transition: none;
        animation: none;
    }
}